* To construct a Model, call {@link Model.fromGltfAsync}. Do not call the constructor directly.
@@ -467,6 +471,24 @@ function Model(options) {
*/
this.showOutline = defaultValue(options.showOutline, true);
+ this._enableShowGaussianSplatting = defaultValue(
+ options.enableShowGaussianSplatting,
+ true,
+ );
+
+ /**
+ * Whether to display Gaussing Splatting (will fall back to point cloud rendering if false)
+ *
+ * @type {boolean}
+ */
+ this.showGaussianSplatting = defaultValue(
+ options.showGaussianSplatting,
+ true,
+ );
+
+ //track last camera view to determine if gaussian splats need to be re-sorted
+ this._previousViewProj = undefined;
+
/**
* The color to use when rendering outlines.
*
@@ -798,6 +820,36 @@ Object.defineProperties(Model.prototype, {
},
},
+ /**
+ *
+ * {@link Cesium3DTileset}.
+ *
+ * @memberof Model.prototype
+ *
+ * @type {PointCloudShading}
+ */
+ enableShowGaussianSplatting: {
+ get: function () {
+ return this._enableShowGaussianSplatting;
+ },
+ set: function (value) {
+ if (value !== this._enableShowGaussianSplatting) {
+ this.resetDrawCommands();
+ }
+ this._enableShowGaussianSplatting = value;
+ // Warning for improper setup of gaussian splatting
+ if (
+ this._enableShowGaussianSplatting === true ||
+ this.type !== ModelType.GLTF
+ ) {
+ oneTimeWarning(
+ "model-enable-show-gaussian-splatting-ignored",
+ "enableShowGaussian splatting must be used with a glTF model that has the KHR_gaussian_splatting extension",
+ );
+ }
+ },
+ },
+
/**
* The model's custom shader, if it exists. Using custom shaders with a {@link Cesium3DTileStyle}
* may lead to undefined behavior.
@@ -1914,6 +1966,7 @@ Model.prototype.update = function (frameState) {
updateSceneMode(this, frameState);
updateFog(this, frameState);
updateVerticalExaggeration(this, frameState);
+ updateGaussianSplatting(this, frameState);
this._defaultTexture = frameState.context.defaultTexture;
@@ -2062,6 +2115,75 @@ function updatePointCloudShading(model) {
}
}
+function updateGaussianSplatting(model, frameState) {
+ //if the camera has rotated enough, update commands
+ const viewProj = new Matrix4();
+ Matrix4.multiply(
+ frameState.camera.frustum.projectionMatrix,
+ frameState.camera.viewMatrix,
+ viewProj,
+ );
+
+ if (model._previousViewProj === undefined) {
+ model._previousViewProj = viewProj;
+ return;
+ }
+
+ const sg = model._sceneGraph;
+ const prim = sg._components.nodes[0].primitives[0]; //walk more primitives
+ //texture generation is done and we have one ready to use
+ //rebuild our draw commands this one time
+ if (prim.gaussianSplatTexturePending && prim.hasGaussianSplatTexture) {
+ prim.gaussianSplatTexturePending = false;
+ model.resetDrawCommands();
+ }
+
+ const dot =
+ model._previousViewProj[2] * viewProj[2] +
+ model._previousViewProj[6] * viewProj[6] +
+ model._previousViewProj[10] * viewProj[10];
+
+ if (Math.abs(dot - 1) > CesiumMath.EPSILON2) {
+ if (prim?.isGaussianSplatPrimitive ?? false) {
+ const idxAttr = prim.attributes.find((a) => a.name === "_SPLAT_INDEXES");
+ const posAttr = prim.attributes.find((a) => a.name === "POSITION");
+
+ const modelView = new Matrix4();
+ Matrix4.multiply(
+ frameState.camera.viewMatrix,
+ model.modelMatrix,
+ modelView,
+ );
+ try {
+ const promise = GaussianSplatSorter.radixSortIndexes({
+ primitive: {
+ positions: new Float32Array(posAttr.typedArray),
+ modelView: Float32Array.from(modelView),
+ count: idxAttr.count,
+ },
+ sortType: "Index",
+ });
+
+ if (promise === undefined) {
+ return;
+ }
+
+ promise.catch((err) => {
+ console.error(`${err}`);
+ });
+ promise.then((sortedData) => {
+ idxAttr.typedArray = sortedData;
+ model.resetDrawCommands();
+ });
+ } catch (e) {
+ console.log(`${e}`);
+ }
+ }
+ //model.resetDrawCommands();
+ model._previousViewProj = viewProj;
+ }
+}
+
function updateSilhouette(model, frameState) {
if (model._silhouetteDirty) {
// Only rebuild draw commands if silhouettes are supported in the first place.
@@ -2964,6 +3086,7 @@ Model.fromGltfAsync = async function (options) {
loadIndicesForWireframe: options.enableDebugWireframe,
loadPrimitiveOutline: options.enableShowOutline,
loadForClassification: defined(options.classificationType),
+ loadGaussianSplatting: options.enableShowGaussianSplatting,
};
const basePath = defaultValue(options.basePath, "");
@@ -3235,6 +3358,7 @@ function makeModelOptions(loader, modelType, options) {
pointCloudShading: options.pointCloudShading,
classificationType: options.classificationType,
pickObject: options.pickObject,
+ showGaussianSplatting: options.showGaussianSplatting,
};
}
diff --git a/packages/engine/Source/Scene/Model/Model3DTileContent.js b/packages/engine/Source/Scene/Model/Model3DTileContent.js
index bdc0b3831a81..33782da132f5 100644
--- a/packages/engine/Source/Scene/Model/Model3DTileContent.js
+++ b/packages/engine/Source/Scene/Model/Model3DTileContent.js
@@ -516,6 +516,7 @@ function makeModelOptions(tileset, tile, content, additionalOptions) {
enableShowOutline: tileset._enableShowOutline,
showOutline: tileset.showOutline,
outlineColor: tileset.outlineColor,
+ showGaussianSplatting: tileset.showGaussianSplatting,
};
return combine(additionalOptions, mainOptions);
diff --git a/packages/engine/Source/Scene/Model/ModelAnimationChannel.js b/packages/engine/Source/Scene/Model/ModelAnimationChannel.js
index 9dbb92a00b5c..b8f8e0ea4fca 100644
--- a/packages/engine/Source/Scene/Model/ModelAnimationChannel.js
+++ b/packages/engine/Source/Scene/Model/ModelAnimationChannel.js
@@ -280,12 +280,12 @@ ModelAnimationChannel.prototype.animate = function (time) {
) {
runtimeNode[path] = spline.evaluate(
localAnimationTime,
- scratchCartesian3,
+ scratchCartesian3
);
} else if (path === AnimatedPropertyType.ROTATION) {
runtimeNode[path] = spline.evaluate(
localAnimationTime,
- scratchQuaternion,
+ scratchQuaternion
);
}
}
diff --git a/packages/engine/Source/Scene/Model/ModelAnimationCollection.js b/packages/engine/Source/Scene/Model/ModelAnimationCollection.js
index 3c441c0aa94f..d3d18aaccf72 100644
--- a/packages/engine/Source/Scene/Model/ModelAnimationCollection.js
+++ b/packages/engine/Source/Scene/Model/ModelAnimationCollection.js
@@ -174,7 +174,7 @@ ModelAnimationCollection.prototype.add = function (options) {
//>>includeStart('debug', pragmas.debug);
if (!model.ready) {
throw new DeveloperError(
- "Animations are not loaded. Wait for Model.ready to be true.",
+ "Animations are not loaded. Wait for Model.ready to be true."
);
}
//>>includeEnd('debug');
@@ -184,7 +184,7 @@ ModelAnimationCollection.prototype.add = function (options) {
//>>includeStart('debug', pragmas.debug);
if (!defined(options.name) && !defined(options.index)) {
throw new DeveloperError(
- "Either options.name or options.index must be defined.",
+ "Either options.name or options.index must be defined."
);
}
@@ -258,7 +258,7 @@ ModelAnimationCollection.prototype.addAll = function (options) {
//>>includeStart('debug', pragmas.debug);
if (!model.ready) {
throw new DeveloperError(
- "Animations are not loaded. Wait for Model.ready to be true.",
+ "Animations are not loaded. Wait for Model.ready to be true."
);
}
@@ -371,7 +371,7 @@ ModelAnimationCollection.prototype.get = function (index) {
if (index >= this._runtimeAnimations.length || index < 0) {
throw new DeveloperError(
- "index must be valid within the range of the collection",
+ "index must be valid within the range of the collection"
);
}
//>>includeEnd('debug');
@@ -384,7 +384,7 @@ const animationsToRemove = [];
function createAnimationRemovedFunction(
modelAnimationCollection,
model,
- animation,
+ animation
) {
return function () {
modelAnimationCollection.animationRemoved.raiseEvent(model, animation);
@@ -428,7 +428,7 @@ ModelAnimationCollection.prototype.update = function (frameState) {
runtimeAnimation._computedStartTime = JulianDate.addSeconds(
defaultValue(runtimeAnimation.startTime, sceneTime),
runtimeAnimation.delay,
- new JulianDate(),
+ new JulianDate()
);
}
@@ -450,7 +450,7 @@ ModelAnimationCollection.prototype.update = function (frameState) {
if (duration !== 0.0) {
const seconds = JulianDate.secondsDifference(
reachedStopTime ? stopTime : sceneTime,
- startTime,
+ startTime
);
delta = defined(runtimeAnimation._animationTime)
? runtimeAnimation._animationTime(duration, seconds)
@@ -511,7 +511,7 @@ ModelAnimationCollection.prototype.update = function (frameState) {
localAnimationTime = CesiumMath.clamp(
localAnimationTime,
runtimeAnimation.localStartTime,
- runtimeAnimation.localStopTime,
+ runtimeAnimation.localStopTime
);
runtimeAnimation.animate(localAnimationTime);
@@ -542,7 +542,7 @@ ModelAnimationCollection.prototype.update = function (frameState) {
const animationToRemove = animationsToRemove[j];
runtimeAnimations.splice(runtimeAnimations.indexOf(animationToRemove), 1);
frameState.afterRender.push(
- createAnimationRemovedFunction(this, model, animationToRemove),
+ createAnimationRemovedFunction(this, model, animationToRemove)
);
}
animationsToRemove.length = 0;
diff --git a/packages/engine/Source/Scene/Model/ModelArticulation.js b/packages/engine/Source/Scene/Model/ModelArticulation.js
index bc3f745d9d6d..401be000165b 100644
--- a/packages/engine/Source/Scene/Model/ModelArticulation.js
+++ b/packages/engine/Source/Scene/Model/ModelArticulation.js
@@ -184,7 +184,7 @@ ModelArticulation.prototype.apply = function () {
let articulationMatrix = Matrix4.clone(
Matrix4.IDENTITY,
- scratchArticulationMatrix,
+ scratchArticulationMatrix
);
let i;
@@ -205,7 +205,7 @@ ModelArticulation.prototype.apply = function () {
const transform = Matrix4.multiplyTransformation(
node.originalTransform,
articulationMatrix,
- scratchNodeMatrix,
+ scratchNodeMatrix
);
node.transform = transform;
}
diff --git a/packages/engine/Source/Scene/Model/ModelArticulationStage.js b/packages/engine/Source/Scene/Model/ModelArticulationStage.js
index 772c03966732..e0805f8aa651 100644
--- a/packages/engine/Source/Scene/Model/ModelArticulationStage.js
+++ b/packages/engine/Source/Scene/Model/ModelArticulationStage.js
@@ -155,7 +155,7 @@ Object.defineProperties(ModelArticulationStage.prototype, {
!CesiumMath.equalsEpsilon(
this._currentValue,
value,
- articulationEpsilon,
+ articulationEpsilon
)
) {
this._currentValue = value;
@@ -194,21 +194,21 @@ ModelArticulationStage.prototype.applyStageToMatrix = function (result) {
case ArticulationStageType.XROTATE:
rotation = Matrix3.fromRotationX(
CesiumMath.toRadians(value),
- scratchArticulationRotation,
+ scratchArticulationRotation
);
result = Matrix4.multiplyByMatrix3(result, rotation, result);
break;
case ArticulationStageType.YROTATE:
rotation = Matrix3.fromRotationY(
CesiumMath.toRadians(value),
- scratchArticulationRotation,
+ scratchArticulationRotation
);
result = Matrix4.multiplyByMatrix3(result, rotation, result);
break;
case ArticulationStageType.ZROTATE:
rotation = Matrix3.fromRotationZ(
CesiumMath.toRadians(value),
- scratchArticulationRotation,
+ scratchArticulationRotation
);
result = Matrix4.multiplyByMatrix3(result, rotation, result);
break;
diff --git a/packages/engine/Source/Scene/Model/ModelClippingPlanesPipelineStage.js b/packages/engine/Source/Scene/Model/ModelClippingPlanesPipelineStage.js
index f9107a4a9f70..8d9945f244d4 100644
--- a/packages/engine/Source/Scene/Model/ModelClippingPlanesPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/ModelClippingPlanesPipelineStage.js
@@ -36,7 +36,7 @@ const textureResolutionScratch = new Cartesian2();
ModelClippingPlanesPipelineStage.process = function (
renderResources,
model,
- frameState,
+ frameState
) {
const clippingPlanes = model.clippingPlanes;
const context = frameState.context;
@@ -45,20 +45,20 @@ ModelClippingPlanesPipelineStage.process = function (
shaderBuilder.addDefine(
"HAS_CLIPPING_PLANES",
undefined,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addDefine(
"CLIPPING_PLANES_LENGTH",
clippingPlanes.length,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
if (clippingPlanes.unionClippingRegions) {
shaderBuilder.addDefine(
"UNION_CLIPPING_REGIONS",
undefined,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
}
@@ -66,42 +66,42 @@ ModelClippingPlanesPipelineStage.process = function (
shaderBuilder.addDefine(
"USE_CLIPPING_PLANES_FLOAT_TEXTURE",
undefined,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
}
const textureResolution = ClippingPlaneCollection.getTextureResolution(
clippingPlanes,
context,
- textureResolutionScratch,
+ textureResolutionScratch
);
shaderBuilder.addDefine(
"CLIPPING_PLANES_TEXTURE_WIDTH",
textureResolution.x,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addDefine(
"CLIPPING_PLANES_TEXTURE_HEIGHT",
textureResolution.y,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addUniform(
"sampler2D",
"model_clippingPlanes",
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addUniform(
"vec4",
"model_clippingPlanesEdgeStyle",
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addUniform(
"mat4",
"model_clippingPlanesMatrix",
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addFragmentLines(ModelClippingPlanesStageFS);
diff --git a/packages/engine/Source/Scene/Model/ModelClippingPolygonsPipelineStage.js b/packages/engine/Source/Scene/Model/ModelClippingPolygonsPipelineStage.js
index 56e9d25c6c8b..c9eb597140c7 100644
--- a/packages/engine/Source/Scene/Model/ModelClippingPolygonsPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/ModelClippingPolygonsPipelineStage.js
@@ -35,7 +35,7 @@ const ModelClippingPolygonsPipelineStage = {
ModelClippingPolygonsPipelineStage.process = function (
renderResources,
model,
- frameState,
+ frameState
) {
const clippingPolygons = model.clippingPolygons;
const shaderBuilder = renderResources.shaderBuilder;
@@ -43,33 +43,33 @@ ModelClippingPolygonsPipelineStage.process = function (
shaderBuilder.addDefine(
"ENABLE_CLIPPING_POLYGONS",
undefined,
- ShaderDestination.BOTH,
+ ShaderDestination.BOTH
);
if (clippingPolygons.inverse) {
shaderBuilder.addDefine(
"CLIPPING_INVERSE",
undefined,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
}
shaderBuilder.addDefine(
"CLIPPING_POLYGON_REGIONS_LENGTH",
clippingPolygons.extentsCount,
- ShaderDestination.BOTH,
+ ShaderDestination.BOTH
);
shaderBuilder.addUniform(
"sampler2D",
"model_clippingDistance",
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addUniform(
"sampler2D",
"model_clippingExtents",
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
shaderBuilder.addVarying("vec2", "v_clippingPosition");
diff --git a/packages/engine/Source/Scene/Model/ModelColorPipelineStage.js b/packages/engine/Source/Scene/Model/ModelColorPipelineStage.js
index 04a026f1d140..fc9c26284962 100644
--- a/packages/engine/Source/Scene/Model/ModelColorPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/ModelColorPipelineStage.js
@@ -37,14 +37,14 @@ const ModelColorPipelineStage = {
ModelColorPipelineStage.process = function (
renderResources,
model,
- frameState,
+ frameState
) {
const shaderBuilder = renderResources.shaderBuilder;
shaderBuilder.addDefine(
"HAS_MODEL_COLOR",
undefined,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addFragmentLines(ModelColorStageFS);
@@ -69,7 +69,7 @@ ModelColorPipelineStage.process = function (
shaderBuilder.addUniform(
"vec4",
ModelColorPipelineStage.COLOR_UNIFORM_NAME,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
stageUniforms[ModelColorPipelineStage.COLOR_UNIFORM_NAME] = function () {
return model.color;
@@ -79,19 +79,20 @@ ModelColorPipelineStage.process = function (
shaderBuilder.addUniform(
"float",
ModelColorPipelineStage.COLOR_BLEND_UNIFORM_NAME,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
- stageUniforms[ModelColorPipelineStage.COLOR_BLEND_UNIFORM_NAME] =
- function () {
- return ColorBlendMode.getColorBlend(
- model.colorBlendMode,
- model.colorBlendAmount,
- );
- };
+ stageUniforms[
+ ModelColorPipelineStage.COLOR_BLEND_UNIFORM_NAME
+ ] = function () {
+ return ColorBlendMode.getColorBlend(
+ model.colorBlendMode,
+ model.colorBlendAmount
+ );
+ };
renderResources.uniformMap = combine(
stageUniforms,
- renderResources.uniformMap,
+ renderResources.uniformMap
);
};
diff --git a/packages/engine/Source/Scene/Model/ModelDrawCommand.js b/packages/engine/Source/Scene/Model/ModelDrawCommand.js
index 4bbc2a841aca..83323fc1ec7d 100644
--- a/packages/engine/Source/Scene/Model/ModelDrawCommand.js
+++ b/packages/engine/Source/Scene/Model/ModelDrawCommand.js
@@ -299,7 +299,7 @@ Object.defineProperties(ModelDrawCommand.prototype, {
this._boundingVolume = BoundingSphere.transform(
this.runtimePrimitive.boundingSphere,
this._modelMatrix,
- this._boundingVolume,
+ this._boundingVolume
);
},
},
@@ -413,7 +413,7 @@ function updateModelMatrix2D(drawCommand, frameState) {
const modelMatrix = drawCommand._modelMatrix;
drawCommand._modelMatrix2D = Matrix4.clone(
modelMatrix,
- drawCommand._modelMatrix2D,
+ drawCommand._modelMatrix2D
);
// Change the translation's y-component so it appears on the opposite side
@@ -427,7 +427,7 @@ function updateModelMatrix2D(drawCommand, frameState) {
drawCommand._boundingVolume2D = BoundingSphere.transform(
drawCommand.runtimePrimitive.boundingSphere,
drawCommand._modelMatrix2D,
- drawCommand._boundingVolume2D,
+ drawCommand._boundingVolume2D
);
}
@@ -537,7 +537,7 @@ ModelDrawCommand.prototype.pushCommands = function (frameState, result) {
pushCommand(
tileset._backfaceCommands,
this._skipLodBackfaceCommand,
- use2D,
+ use2D
);
}
@@ -578,7 +578,7 @@ ModelDrawCommand.prototype.pushCommands = function (frameState, result) {
*/
ModelDrawCommand.prototype.pushSilhouetteCommands = function (
frameState,
- result,
+ result
) {
const use2D = shouldUse2DCommands(this, frameState);
pushCommand(result, this._silhouetteColorCommand, use2D);
diff --git a/packages/engine/Source/Scene/Model/ModelDrawCommands.js b/packages/engine/Source/Scene/Model/ModelDrawCommands.js
index 7d609ac36c82..7714d58c42dd 100644
--- a/packages/engine/Source/Scene/Model/ModelDrawCommands.js
+++ b/packages/engine/Source/Scene/Model/ModelDrawCommands.js
@@ -24,6 +24,11 @@ import DeveloperError from "../../Core/DeveloperError.js";
*/
function ModelDrawCommands() {}
+import Geometry from "../../Core/Geometry.js";
+import GeometryAttribute from "../../Core/GeometryAttribute.js";
+import ComponentDatatype from "../../Core/ComponentDatatype.js";
+import PrimitiveType from "../../Core/PrimitiveType.js";
+import BufferUsage from "../../Renderer/BufferUsage.js";
/**
* Builds the {@link ModelDrawCommand} for a {@link ModelRuntimePrimitive}
* using its render resources. If the model classifies another asset, it
@@ -46,11 +51,18 @@ ModelDrawCommands.buildModelDrawCommand = function (
frameState,
);
- const command = buildDrawCommandForModel(
- primitiveRenderResources,
- shaderProgram,
- frameState,
- );
+ const command = primitiveRenderResources.runtimePrimitive.primitive
+ .isGaussianSplatPrimitive
+ ? buildDrawCommandForGaussianSplatPrimitive(
+ primitiveRenderResources,
+ shaderProgram,
+ frameState,
+ )
+ : buildDrawCommandForModel(
+ primitiveRenderResources,
+ shaderProgram,
+ frameState,
+ );
const model = primitiveRenderResources.model;
const hasClassification = defined(model.classificationType);
@@ -103,6 +115,7 @@ function buildDrawCommandForModel(
frameState,
) {
const indexBuffer = getIndexBuffer(primitiveRenderResources);
+ const model = primitiveRenderResources.model;
const vertexArray = new VertexArray({
context: frameState.context,
@@ -110,7 +123,193 @@ function buildDrawCommandForModel(
attributes: primitiveRenderResources.attributes,
});
+ model._pipelineResources.push(vertexArray);
+
+ const pass = primitiveRenderResources.alphaOptions.pass;
+ const sceneGraph = model.sceneGraph;
+
+ const is3D = frameState.mode === SceneMode.SCENE3D;
+ let modelMatrix, boundingSphere;
+
+ if (!is3D && !frameState.scene3DOnly && model._projectTo2D) {
+ modelMatrix = Matrix4.multiplyTransformation(
+ sceneGraph._computedModelMatrix,
+ primitiveRenderResources.runtimeNode.computedTransform,
+ new Matrix4(),
+ );
+
+ const runtimePrimitive = primitiveRenderResources.runtimePrimitive;
+ boundingSphere = runtimePrimitive.boundingSphere2D;
+ } else {
+ const computedModelMatrix = is3D
+ ? sceneGraph._computedModelMatrix
+ : sceneGraph._computedModelMatrix2D;
+
+ modelMatrix = Matrix4.multiplyTransformation(
+ computedModelMatrix,
+ primitiveRenderResources.runtimeNode.computedTransform,
+ new Matrix4(),
+ );
+
+ boundingSphere = BoundingSphere.transform(
+ primitiveRenderResources.boundingSphere,
+ modelMatrix,
+ );
+ }
+
+ // Initialize render state with default values
+ let renderState = clone(
+ RenderState.fromCache(primitiveRenderResources.renderStateOptions),
+ true,
+ );
+
+ renderState.cull.face = ModelUtility.getCullFace(
+ modelMatrix,
+ primitiveRenderResources.primitiveType,
+ );
+ renderState = RenderState.fromCache(renderState);
+
+ const hasClassification = defined(model.classificationType);
+ const castShadows = hasClassification
+ ? false
+ : ShadowMode.castShadows(model.shadows);
+ const receiveShadows = hasClassification
+ ? false
+ : ShadowMode.receiveShadows(model.shadows);
+ // Pick IDs are only added to specific draw commands for classification.
+ // This behavior is handled by ClassificationModelDrawCommand.
+ const pickId = hasClassification
+ ? undefined
+ : primitiveRenderResources.pickId;
+
+ const command = new DrawCommand({
+ boundingVolume: boundingSphere,
+ modelMatrix: modelMatrix,
+ uniformMap: primitiveRenderResources.uniformMap,
+ renderState: renderState,
+ vertexArray: vertexArray,
+ shaderProgram: shaderProgram,
+ cull: model.cull,
+ pass: pass,
+ count: primitiveRenderResources.count,
+ owner: model,
+ pickId: pickId,
+ pickMetadataAllowed: true,
+ instanceCount: primitiveRenderResources.instanceCount,
+ primitiveType: primitiveRenderResources.primitiveType,
+ debugShowBoundingVolume: model.debugShowBoundingVolume,
+ castShadows: castShadows,
+ receiveShadows: receiveShadows,
+ });
+ return command;
+}
+
+/**
+ * Builds the {@link DrawCommand} that serves as the basis for either creating
+ * a {@link ModelDrawCommand} or a {@link ModelRuntimePrimitive}
+ *
+ * @param {PrimitiveRenderResources} primitiveRenderResources The render resources for a primitive.
+ * @param {ShaderProgram} shaderProgram The shader program
+ * @param {FrameState} frameState The frame state for creating GPU resources.
+ *
+ * @returns {DrawCommand} The generated DrawCommand, to be passed to
+ * the ModelDrawCommand or ClassificationModelDrawCommand
+ *
+ * @private
+ */
+function buildDrawCommandForGaussianSplatPrimitive(
+ primitiveRenderResources,
+ shaderProgram,
+ frameState,
+) {
+ const indexBuffer = getIndexBuffer(primitiveRenderResources);
const model = primitiveRenderResources.model;
+
+ const vertexArray = (() => {
+ if (
+ !(
+ primitiveRenderResources.runtimePrimitive.primitive
+ ?.hasGaussianSplatTexture ?? false
+ )
+ ) {
+ const splatQuadAttrLocations = {
+ 0: 9,
+ 1: 1,
+ 2: 2,
+ 3: 3,
+ 4: 4,
+ splatPosition: 7,
+ splatColor: 8,
+ };
+ const geometry = new Geometry({
+ attributes: {
+ screenQuadPosition: new GeometryAttribute({
+ componentDatatype: ComponentDatatype.FLOAT,
+ componentsPerAttribute: 2,
+ values: [-2, -2, 2, -2, 2, 2, -2, 2],
+ name: "_SCREEN_QUAD_POS",
+ variableName: "screenQuadPos",
+ }),
+ ...primitiveRenderResources.runtimePrimitive.primitive.attributes,
+ splatPosition: {
+ ...primitiveRenderResources.runtimePrimitive.primitive.attributes.find(
+ (a) => a.name === "POSITION",
+ ),
+ name: "_SPLAT_POSITION",
+ variableName: "splatPosition",
+ },
+ splatColor: {
+ ...primitiveRenderResources.runtimePrimitive.primitive.attributes.find(
+ (a) => a.name === "COLOR_0",
+ ),
+ name: "_SPLAT_COLOR",
+ variableName: "splatColor",
+ },
+ },
+ indices: indexBuffer,
+ primitiveType: PrimitiveType.TRIANGLE_STRIP,
+ });
+
+ return VertexArray.fromGeometry({
+ context: frameState.context,
+ geometry: geometry,
+ attributeLocations: splatQuadAttrLocations,
+ bufferUsage: BufferUsage.STATIC_DRAW,
+ interleave: false,
+ });
+ }
+ const splatQuadAttrLocations = {
+ 5: 5,
+ splatIndex: 7,
+ };
+ const geometry = new Geometry({
+ attributes: {
+ screenQuadPosition: new GeometryAttribute({
+ componentDatatype: ComponentDatatype.FLOAT,
+ componentsPerAttribute: 2,
+ values: [-1, -1, 1, -1, 1, 1, -1, 1],
+ name: "_SCREEN_QUAD_POS",
+ variableName: "screenQuadPosition",
+ }),
+ splatIndex: {
+ ...primitiveRenderResources.runtimePrimitive.primitive.attributes.find(
+ (a) => a.name === "_SPLAT_INDEXES",
+ ),
+ },
+ },
+ indices: indexBuffer,
+ primitiveType: PrimitiveType.TRIANGLE_STRIP,
+ });
+
+ return VertexArray.fromGeometry({
+ context: frameState.context,
+ geometry: geometry,
+ attributeLocations: splatQuadAttrLocations,
+ bufferUsage: BufferUsage.STATIC_DRAW,
+ interleave: false,
+ });
+ })();
+
model._pipelineResources.push(vertexArray);
const pass = primitiveRenderResources.alphaOptions.pass;
diff --git a/packages/engine/Source/Scene/Model/ModelFeatureTable.js b/packages/engine/Source/Scene/Model/ModelFeatureTable.js
index dff95e0582e8..1a18a39029d8 100644
--- a/packages/engine/Source/Scene/Model/ModelFeatureTable.js
+++ b/packages/engine/Source/Scene/Model/ModelFeatureTable.js
@@ -167,7 +167,7 @@ ModelFeatureTable.prototype.update = function (frameState) {
const currentStyleCommandsNeeded = StyleCommandsNeeded.getStyleCommandsNeeded(
this._featuresLength,
- this._batchTexture.translucentFeaturesLength,
+ this._batchTexture.translucentFeaturesLength
);
if (this._styleCommandsNeeded !== currentStyleCommandsNeeded) {
@@ -214,7 +214,7 @@ ModelFeatureTable.prototype.hasProperty = function (featureId, propertyName) {
ModelFeatureTable.prototype.hasPropertyBySemantic = function (
featureId,
- propertyName,
+ propertyName
) {
return this._propertyTable.hasPropertyBySemantic(featureId, propertyName);
};
@@ -225,7 +225,7 @@ ModelFeatureTable.prototype.getProperty = function (featureId, name) {
ModelFeatureTable.prototype.getPropertyBySemantic = function (
featureId,
- semantic,
+ semantic
) {
return this._propertyTable.getPropertyBySemantic(featureId, semantic);
};
@@ -266,13 +266,13 @@ ModelFeatureTable.prototype.applyStyle = function (style) {
const color = defined(style.color)
? defaultValue(
style.color.evaluateColor(feature, scratchColor),
- BatchTexture.DEFAULT_COLOR_VALUE,
+ BatchTexture.DEFAULT_COLOR_VALUE
)
: BatchTexture.DEFAULT_COLOR_VALUE;
const show = defined(style.show)
? defaultValue(
style.show.evaluate(feature),
- BatchTexture.DEFAULT_SHOW_VALUE,
+ BatchTexture.DEFAULT_SHOW_VALUE
)
: BatchTexture.DEFAULT_SHOW_VALUE;
diff --git a/packages/engine/Source/Scene/Model/ModelMatrixUpdateStage.js b/packages/engine/Source/Scene/Model/ModelMatrixUpdateStage.js
index dbc23e758d6b..6ad9b7b63c20 100644
--- a/packages/engine/Source/Scene/Model/ModelMatrixUpdateStage.js
+++ b/packages/engine/Source/Scene/Model/ModelMatrixUpdateStage.js
@@ -42,7 +42,7 @@ ModelMatrixUpdateStage.update = function (runtimeNode, sceneGraph, frameState) {
runtimeNode,
sceneGraph,
modelMatrix,
- runtimeNode.transformToRoot,
+ runtimeNode.transformToRoot
);
runtimeNode._transformDirty = false;
}
@@ -57,11 +57,11 @@ function updateDrawCommand(drawCommand, modelMatrix, transformToRoot) {
drawCommand.modelMatrix = Matrix4.multiplyTransformation(
modelMatrix,
transformToRoot,
- drawCommand.modelMatrix,
+ drawCommand.modelMatrix
);
drawCommand.cullFace = ModelUtility.getCullFace(
drawCommand.modelMatrix,
- drawCommand.primitiveType,
+ drawCommand.primitiveType
);
}
@@ -74,7 +74,7 @@ function updateRuntimeNode(
runtimeNode,
sceneGraph,
modelMatrix,
- transformToRoot,
+ transformToRoot
) {
let i;
@@ -82,7 +82,7 @@ function updateRuntimeNode(
transformToRoot = Matrix4.multiplyTransformation(
transformToRoot,
runtimeNode.transform,
- new Matrix4(),
+ new Matrix4()
);
runtimeNode.updateComputedTransform();
@@ -93,7 +93,7 @@ function updateRuntimeNode(
updateDrawCommand(
runtimePrimitive.drawCommand,
modelMatrix,
- transformToRoot,
+ transformToRoot
);
}
@@ -104,14 +104,14 @@ function updateRuntimeNode(
// Update transformToRoot to accommodate changes in the transforms of this node and its ancestors
childRuntimeNode._transformToRoot = Matrix4.clone(
transformToRoot,
- childRuntimeNode._transformToRoot,
+ childRuntimeNode._transformToRoot
);
updateRuntimeNode(
childRuntimeNode,
sceneGraph,
modelMatrix,
- transformToRoot,
+ transformToRoot
);
childRuntimeNode._transformDirty = false;
}
diff --git a/packages/engine/Source/Scene/Model/ModelRenderResources.js b/packages/engine/Source/Scene/Model/ModelRenderResources.js
index 5cab3dc11504..e3f7610bd852 100644
--- a/packages/engine/Source/Scene/Model/ModelRenderResources.js
+++ b/packages/engine/Source/Scene/Model/ModelRenderResources.js
@@ -76,7 +76,7 @@ function ModelRenderResources(model) {
enabled: true,
func: DepthFunction.LESS_OR_EQUAL,
},
- }),
+ })
);
/**
diff --git a/packages/engine/Source/Scene/Model/ModelRuntimeNode.js b/packages/engine/Source/Scene/Model/ModelRuntimeNode.js
index a45a3078304e..ac1eba5e805f 100644
--- a/packages/engine/Source/Scene/Model/ModelRuntimeNode.js
+++ b/packages/engine/Source/Scene/Model/ModelRuntimeNode.js
@@ -328,7 +328,7 @@ Object.defineProperties(ModelRuntimeNode.prototype, {
//>>includeStart('debug', pragmas.debug);
if (!defined(transformParameters)) {
throw new DeveloperError(
- "The translation of a node cannot be set if it was defined using a matrix in the model.",
+ "The translation of a node cannot be set if it was defined using a matrix in the model."
);
}
//>>includeEnd('debug');
@@ -340,7 +340,7 @@ Object.defineProperties(ModelRuntimeNode.prototype, {
transformParameters.translation = Cartesian3.clone(
value,
- transformParameters.translation,
+ transformParameters.translation
);
updateTransformFromParameters(this, transformParameters);
@@ -372,7 +372,7 @@ Object.defineProperties(ModelRuntimeNode.prototype, {
//>>includeStart('debug', pragmas.debug);
if (!defined(transformParameters)) {
throw new DeveloperError(
- "The rotation of a node cannot be set if it was defined using a matrix in the model.",
+ "The rotation of a node cannot be set if it was defined using a matrix in the model."
);
}
//>>includeEnd('debug');
@@ -384,7 +384,7 @@ Object.defineProperties(ModelRuntimeNode.prototype, {
transformParameters.rotation = Quaternion.clone(
value,
- transformParameters.rotation,
+ transformParameters.rotation
);
updateTransformFromParameters(this, transformParameters);
@@ -415,7 +415,7 @@ Object.defineProperties(ModelRuntimeNode.prototype, {
//>>includeStart('debug', pragmas.debug);
if (!defined(transformParameters)) {
throw new DeveloperError(
- "The scale of a node cannot be set if it was defined using a matrix in the model.",
+ "The scale of a node cannot be set if it was defined using a matrix in the model."
);
}
//>>includeEnd('debug');
@@ -426,7 +426,7 @@ Object.defineProperties(ModelRuntimeNode.prototype, {
transformParameters.scale = Cartesian3.clone(
value,
- transformParameters.scale,
+ transformParameters.scale
);
updateTransformFromParameters(this, transformParameters);
@@ -451,7 +451,7 @@ Object.defineProperties(ModelRuntimeNode.prototype, {
//>>includeStart('debug', pragmas.debug);
if (this._morphWeights.length !== valueLength) {
throw new DeveloperError(
- "value must have the same length as the original weights array.",
+ "value must have the same length as the original weights array."
);
}
//>>includeEnd('debug');
@@ -499,7 +499,7 @@ function initialize(runtimeNode) {
runtimeNode._computedTransform = Matrix4.multiply(
transformToRoot,
transform,
- computedTransform,
+ computedTransform
);
const node = runtimeNode.node;
@@ -507,7 +507,7 @@ function initialize(runtimeNode) {
runtimeNode._transformParameters = new TranslationRotationScale(
node.translation,
node.rotation,
- node.scale,
+ node.scale
);
}
@@ -534,7 +534,7 @@ function updateTransformFromParameters(runtimeNode, transformParameters) {
runtimeNode._transform = Matrix4.fromTranslationRotationScale(
transformParameters,
- runtimeNode._transform,
+ runtimeNode._transform
);
}
@@ -559,7 +559,7 @@ ModelRuntimeNode.prototype.getChild = function (index) {
Check.typeOf.number("index", index);
if (index < 0 || index >= this.children.length) {
throw new DeveloperError(
- "index must be greater than or equal to 0 and less than the number of children.",
+ "index must be greater than or equal to 0 and less than the number of children."
);
}
//>>includeEnd('debug');
@@ -599,7 +599,7 @@ ModelRuntimeNode.prototype.updateComputedTransform = function () {
this._computedTransform = Matrix4.multiply(
this._transformToRoot,
this._transform,
- this._computedTransform,
+ this._computedTransform
);
};
@@ -629,18 +629,18 @@ ModelRuntimeNode.prototype.updateJointMatrices = function () {
const nodeWorldTransform = Matrix4.multiplyTransformation(
this.transformToRoot,
this.transform,
- computedJointMatrices[i],
+ computedJointMatrices[i]
);
const inverseNodeWorldTransform = Matrix4.inverseTransformation(
nodeWorldTransform,
- computedJointMatrices[i],
+ computedJointMatrices[i]
);
computedJointMatrices[i] = Matrix4.multiplyTransformation(
inverseNodeWorldTransform,
skinJointMatrices[i],
- computedJointMatrices[i],
+ computedJointMatrices[i]
);
}
};
diff --git a/packages/engine/Source/Scene/Model/ModelRuntimePrimitive.js b/packages/engine/Source/Scene/Model/ModelRuntimePrimitive.js
index dca730224b55..9f1d5b4f7931 100644
--- a/packages/engine/Source/Scene/Model/ModelRuntimePrimitive.js
+++ b/packages/engine/Source/Scene/Model/ModelRuntimePrimitive.js
@@ -27,6 +27,8 @@ import SelectedFeatureIdPipelineStage from "./SelectedFeatureIdPipelineStage.js"
import SkinningPipelineStage from "./SkinningPipelineStage.js";
import VerticalExaggerationPipelineStage from "./VerticalExaggerationPipelineStage.js";
import WireframePipelineStage from "./WireframePipelineStage.js";
+import GaussianSplatPipelineStage from "./GaussianSplatPipelineStage.js";
+import GaussianSplatTexturePipelineStage from "./GaussianSplatTexturePipelineStage.js";
/**
* In memory representation of a single primitive, that is, a primitive
@@ -215,6 +217,7 @@ ModelRuntimePrimitive.prototype.configurePipeline = function (frameState) {
const hasQuantization = ModelUtility.hasQuantizedAttributes(
primitive.attributes,
);
+
const generateWireframeIndices =
model.debugWireframe &&
PrimitiveType.isTriangles(primitive.primitiveType) &&
@@ -239,6 +242,13 @@ ModelRuntimePrimitive.prototype.configurePipeline = function (frameState) {
const hasClassification = defined(model.classificationType);
+ // const hasGaussianSplats =
+ // model.enableShowGaussianSplatting
+ // && model.showGaussianSplatting
+ // && (primitive?.isGaussianSplatPrimitive ?? false);
+ const hasGaussianSplats =
+ model.showGaussianSplatting &&
+ (primitive?.isGaussianSplatPrimitive ?? false);
// Start of pipeline -----------------------------------------------------
if (use2D) {
pipelineStages.push(SceneMode2DPipelineStage);
@@ -308,6 +318,14 @@ ModelRuntimePrimitive.prototype.configurePipeline = function (frameState) {
pipelineStages.push(PrimitiveStatisticsPipelineStage);
+ if (hasGaussianSplats) {
+ if (primitive?.hasGaussianSplatTexture ?? false) {
+ pipelineStages.push(GaussianSplatTexturePipelineStage);
+ } else {
+ pipelineStages.push(GaussianSplatPipelineStage);
+ }
+ }
+
return;
};
diff --git a/packages/engine/Source/Scene/Model/ModelSceneGraph.js b/packages/engine/Source/Scene/Model/ModelSceneGraph.js
index 11e3918c0589..29fb80b9279d 100644
--- a/packages/engine/Source/Scene/Model/ModelSceneGraph.js
+++ b/packages/engine/Source/Scene/Model/ModelSceneGraph.js
@@ -158,7 +158,7 @@ function ModelSceneGraph(options) {
this._axisCorrectionMatrix = ModelUtility.getAxisCorrectionMatrix(
components.upAxis,
components.forwardAxis,
- new Matrix4(),
+ new Matrix4()
);
// Store articulations from the AGI_articulations extension
@@ -271,7 +271,7 @@ function initialize(sceneGraph) {
const rootNodeIndex = traverseAndCreateSceneGraph(
sceneGraph,
rootNode,
- transformToRoot,
+ transformToRoot
);
sceneGraph._rootNodes.push(rootNodeIndex);
@@ -288,7 +288,7 @@ function initialize(sceneGraph) {
new ModelSkin({
skin: skin,
sceneGraph: sceneGraph,
- }),
+ })
);
}
@@ -318,19 +318,19 @@ function computeModelMatrix(sceneGraph, modelMatrix) {
sceneGraph._computedModelMatrix = Matrix4.multiplyTransformation(
modelMatrix,
components.transform,
- sceneGraph._computedModelMatrix,
+ sceneGraph._computedModelMatrix
);
sceneGraph._computedModelMatrix = Matrix4.multiplyTransformation(
sceneGraph._computedModelMatrix,
sceneGraph._axisCorrectionMatrix,
- sceneGraph._computedModelMatrix,
+ sceneGraph._computedModelMatrix
);
sceneGraph._computedModelMatrix = Matrix4.multiplyByUniformScale(
sceneGraph._computedModelMatrix,
model.computedScale,
- sceneGraph._computedModelMatrix,
+ sceneGraph._computedModelMatrix
);
}
@@ -340,33 +340,33 @@ function computeModelMatrix2D(sceneGraph, frameState) {
const computedModelMatrix = sceneGraph._computedModelMatrix;
const translation = Matrix4.getTranslation(
computedModelMatrix,
- scratchComputedTranslation,
+ scratchComputedTranslation
);
if (!Cartesian3.equals(translation, Cartesian3.ZERO)) {
sceneGraph._computedModelMatrix2D = Transforms.basisTo2D(
frameState.mapProjection,
computedModelMatrix,
- sceneGraph._computedModelMatrix2D,
+ sceneGraph._computedModelMatrix2D
);
} else {
const center = sceneGraph.boundingSphere.center;
const to2D = Transforms.ellipsoidTo2DModelMatrix(
frameState.mapProjection,
center,
- sceneGraph._computedModelMatrix2D,
+ sceneGraph._computedModelMatrix2D
);
sceneGraph._computedModelMatrix2D = Matrix4.multiply(
to2D,
computedModelMatrix,
- sceneGraph._computedModelMatrix2D,
+ sceneGraph._computedModelMatrix2D
);
}
sceneGraph._boundingSphere2D = BoundingSphere.transform(
sceneGraph._boundingSphere,
sceneGraph._computedModelMatrix2D,
- sceneGraph._boundingSphere2D,
+ sceneGraph._boundingSphere2D
);
}
@@ -393,13 +393,13 @@ function traverseAndCreateSceneGraph(sceneGraph, node, transformToRoot) {
const childNodeTransformToRoot = Matrix4.multiplyTransformation(
transformToRoot,
transform,
- new Matrix4(),
+ new Matrix4()
);
const childIndex = traverseAndCreateSceneGraph(
sceneGraph,
childNode,
- childNodeTransformToRoot,
+ childNodeTransformToRoot
);
childrenIndices.push(childIndex);
}
@@ -420,7 +420,7 @@ function traverseAndCreateSceneGraph(sceneGraph, node, transformToRoot) {
primitive: node.primitives[i],
node: node,
model: sceneGraph._model,
- }),
+ })
);
}
@@ -475,13 +475,13 @@ ModelSceneGraph.prototype.buildDrawCommands = function (frameState) {
Number.MAX_VALUE,
Number.MAX_VALUE,
Number.MAX_VALUE,
- scratchModelPositionMin,
+ scratchModelPositionMin
);
const modelPositionMax = Cartesian3.fromElements(
-Number.MAX_VALUE,
-Number.MAX_VALUE,
-Number.MAX_VALUE,
- scratchModelPositionMax,
+ scratchModelPositionMax
);
for (i = 0; i < this._runtimeNodes.length; i++) {
@@ -498,7 +498,7 @@ ModelSceneGraph.prototype.buildDrawCommands = function (frameState) {
const nodeRenderResources = new NodeRenderResources(
modelRenderResources,
- runtimeNode,
+ runtimeNode
);
for (j = 0; j < nodePipelineStages.length; j++) {
@@ -507,7 +507,7 @@ ModelSceneGraph.prototype.buildDrawCommands = function (frameState) {
nodePipelineStage.process(
nodeRenderResources,
runtimeNode.node,
- frameState,
+ frameState
);
}
@@ -520,7 +520,7 @@ ModelSceneGraph.prototype.buildDrawCommands = function (frameState) {
const primitiveRenderResources = new PrimitiveRenderResources(
nodeRenderResources,
- runtimePrimitive,
+ runtimePrimitive
);
for (k = 0; k < primitivePipelineStages.length; k++) {
@@ -529,40 +529,40 @@ ModelSceneGraph.prototype.buildDrawCommands = function (frameState) {
primitivePipelineStage.process(
primitiveRenderResources,
runtimePrimitive.primitive,
- frameState,
+ frameState
);
}
runtimePrimitive.boundingSphere = BoundingSphere.clone(
primitiveRenderResources.boundingSphere,
- new BoundingSphere(),
+ new BoundingSphere()
);
const primitivePositionMin = Matrix4.multiplyByPoint(
nodeTransform,
primitiveRenderResources.positionMin,
- scratchPrimitivePositionMin,
+ scratchPrimitivePositionMin
);
const primitivePositionMax = Matrix4.multiplyByPoint(
nodeTransform,
primitiveRenderResources.positionMax,
- scratchPrimitivePositionMax,
+ scratchPrimitivePositionMax
);
Cartesian3.minimumByComponent(
modelPositionMin,
primitivePositionMin,
- modelPositionMin,
+ modelPositionMin
);
Cartesian3.maximumByComponent(
modelPositionMax,
primitivePositionMax,
- modelPositionMax,
+ modelPositionMax
);
const drawCommand = ModelDrawCommands.buildModelDrawCommand(
primitiveRenderResources,
- frameState,
+ frameState
);
runtimePrimitive.drawCommand = drawCommand;
}
@@ -571,25 +571,25 @@ ModelSceneGraph.prototype.buildDrawCommands = function (frameState) {
this._boundingSphere = BoundingSphere.fromCornerPoints(
modelPositionMin,
modelPositionMax,
- new BoundingSphere(),
+ new BoundingSphere()
);
this._boundingSphere = BoundingSphere.transformWithoutScale(
this._boundingSphere,
this._axisCorrectionMatrix,
- this._boundingSphere,
+ this._boundingSphere
);
this._boundingSphere = BoundingSphere.transform(
this._boundingSphere,
this._components.transform,
- this._boundingSphere,
+ this._boundingSphere
);
model._boundingSphere = BoundingSphere.transform(
this._boundingSphere,
model.modelMatrix,
- model._boundingSphere,
+ model._boundingSphere
);
model._initialRadius = model._boundingSphere.radius;
@@ -686,7 +686,7 @@ ModelSceneGraph.prototype.update = function (frameState, updateForAnimations) {
ModelSceneGraph.prototype.updateModelMatrix = function (
modelMatrix,
- frameState,
+ frameState
) {
computeModelMatrix(this, modelMatrix);
if (frameState.mode !== SceneMode.SCENE3D) {
@@ -747,7 +747,7 @@ function traverseSceneGraph(
runtimeNode,
visibleNodesOnly,
callback,
- callbackOptions,
+ callbackOptions
) {
if (visibleNodesOnly && !runtimeNode.show) {
return;
@@ -761,7 +761,7 @@ function traverseSceneGraph(
childRuntimeNode,
visibleNodesOnly,
callback,
- callbackOptions,
+ callbackOptions
);
}
@@ -777,7 +777,7 @@ function forEachRuntimePrimitive(
sceneGraph,
visibleNodesOnly,
callback,
- callbackOptions,
+ callbackOptions
) {
const rootNodes = sceneGraph._rootNodes;
const rootNodesLength = rootNodes.length;
@@ -789,7 +789,7 @@ function forEachRuntimePrimitive(
runtimeNode,
visibleNodesOnly,
callback,
- callbackOptions,
+ callbackOptions
);
}
}
@@ -812,7 +812,7 @@ ModelSceneGraph.prototype.updateBackFaceCulling = function (backFaceCulling) {
this,
false,
updatePrimitiveBackFaceCulling,
- backFaceCullingOptions,
+ backFaceCullingOptions
);
};
@@ -857,7 +857,7 @@ const scratchShowBoundingVolumeOptions = {
* @private
*/
ModelSceneGraph.prototype.updateShowBoundingVolume = function (
- debugShowBoundingVolume,
+ debugShowBoundingVolume
) {
const showBoundingVolumeOptions = scratchShowBoundingVolumeOptions;
showBoundingVolumeOptions.debugShowBoundingVolume = debugShowBoundingVolume;
@@ -866,7 +866,7 @@ ModelSceneGraph.prototype.updateShowBoundingVolume = function (
this,
false,
updatePrimitiveShowBoundingVolume,
- showBoundingVolumeOptions,
+ showBoundingVolumeOptions
);
};
@@ -908,7 +908,7 @@ ModelSceneGraph.prototype.pushDrawCommands = function (frameState) {
this,
true,
pushPrimitiveDrawCommands,
- pushDrawCommandOptions,
+ pushDrawCommandOptions
);
frameState.commandList.push.apply(frameState.commandList, silhouetteCommands);
@@ -943,7 +943,7 @@ function pushPrimitiveDrawCommands(runtimePrimitive, options) {
*/
ModelSceneGraph.prototype.setArticulationStage = function (
articulationStageKey,
- value,
+ value
) {
const names = articulationStageKey.split(" ");
if (names.length !== 2) {
diff --git a/packages/engine/Source/Scene/Model/ModelSilhouettePipelineStage.js b/packages/engine/Source/Scene/Model/ModelSilhouettePipelineStage.js
index 2a7a0116d9c6..abcdee908fc0 100644
--- a/packages/engine/Source/Scene/Model/ModelSilhouettePipelineStage.js
+++ b/packages/engine/Source/Scene/Model/ModelSilhouettePipelineStage.js
@@ -51,7 +51,7 @@ ModelSilhouettePipelineStage.silhouettesLength = 0;
ModelSilhouettePipelineStage.process = function (
renderResources,
model,
- frameState,
+ frameState
) {
if (!defined(model._silhouetteId)) {
model._silhouetteId = ++ModelSilhouettePipelineStage.silhouettesLength;
@@ -66,13 +66,13 @@ ModelSilhouettePipelineStage.process = function (
shaderBuilder.addUniform(
"vec4",
"model_silhouetteColor",
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addUniform(
"float",
"model_silhouetteSize",
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
// Rendering silhouettes requires two draw commands:
@@ -86,7 +86,7 @@ ModelSilhouettePipelineStage.process = function (
shaderBuilder.addUniform(
"bool",
"model_silhouettePass",
- ShaderDestination.BOTH,
+ ShaderDestination.BOTH
);
const uniformMap = {
diff --git a/packages/engine/Source/Scene/Model/ModelSkin.js b/packages/engine/Source/Scene/Model/ModelSkin.js
index 2a62ef61dcfb..72f7dca5549c 100644
--- a/packages/engine/Source/Scene/Model/ModelSkin.js
+++ b/packages/engine/Source/Scene/Model/ModelSkin.js
@@ -136,7 +136,7 @@ function initialize(runtimeSkin) {
const jointMatrix = computeJointMatrix(
runtimeNode,
inverseBindMatrix,
- new Matrix4(),
+ new Matrix4()
);
runtimeJointMatrices.push(jointMatrix);
}
@@ -146,13 +146,13 @@ function computeJointMatrix(joint, inverseBindMatrix, result) {
const jointWorldTransform = Matrix4.multiplyTransformation(
joint.transformToRoot,
joint.transform,
- result,
+ result
);
result = Matrix4.multiplyTransformation(
jointWorldTransform,
inverseBindMatrix,
- result,
+ result
);
return result;
@@ -172,7 +172,7 @@ ModelSkin.prototype.updateJointMatrices = function () {
jointMatrices[i] = computeJointMatrix(
joint,
inverseBindMatrix,
- jointMatrices[i],
+ jointMatrices[i]
);
}
};
diff --git a/packages/engine/Source/Scene/Model/ModelSplitterPipelineStage.js b/packages/engine/Source/Scene/Model/ModelSplitterPipelineStage.js
index 5d8130537807..909e9c5452d6 100644
--- a/packages/engine/Source/Scene/Model/ModelSplitterPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/ModelSplitterPipelineStage.js
@@ -33,14 +33,14 @@ const ModelSplitterPipelineStage = {
ModelSplitterPipelineStage.process = function (
renderResources,
model,
- frameState,
+ frameState
) {
const shaderBuilder = renderResources.shaderBuilder;
shaderBuilder.addDefine(
"HAS_MODEL_SPLITTER",
undefined,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addFragmentLines(ModelSplitterStageFS);
@@ -49,16 +49,17 @@ ModelSplitterPipelineStage.process = function (
shaderBuilder.addUniform(
"float",
ModelSplitterPipelineStage.SPLIT_DIRECTION_UNIFORM_NAME,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
- stageUniforms[ModelSplitterPipelineStage.SPLIT_DIRECTION_UNIFORM_NAME] =
- function () {
- return model.splitDirection;
- };
+ stageUniforms[
+ ModelSplitterPipelineStage.SPLIT_DIRECTION_UNIFORM_NAME
+ ] = function () {
+ return model.splitDirection;
+ };
renderResources.uniformMap = combine(
stageUniforms,
- renderResources.uniformMap,
+ renderResources.uniformMap
);
};
diff --git a/packages/engine/Source/Scene/Model/ModelUtility.js b/packages/engine/Source/Scene/Model/ModelUtility.js
index a117a878b10f..0c35a187d34b 100644
--- a/packages/engine/Source/Scene/Model/ModelUtility.js
+++ b/packages/engine/Source/Scene/Model/ModelUtility.js
@@ -59,7 +59,7 @@ ModelUtility.getNodeTransform = function (node) {
return Matrix4.fromTranslationQuaternionRotationScale(
defined(node.translation) ? node.translation : Cartesian3.ZERO,
defined(node.rotation) ? node.rotation : Quaternion.IDENTITY,
- defined(node.scale) ? node.scale : Cartesian3.ONE,
+ defined(node.scale) ? node.scale : Cartesian3.ONE
);
};
@@ -220,11 +220,11 @@ const cartesianMinScratch = new Cartesian3();
ModelUtility.getPositionMinMax = function (
primitive,
instancingTranslationMin,
- instancingTranslationMax,
+ instancingTranslationMax
) {
const positionGltfAttribute = ModelUtility.getAttributeBySemantic(
primitive,
- "POSITION",
+ "POSITION"
);
let positionMax = positionGltfAttribute.max;
@@ -234,12 +234,12 @@ ModelUtility.getPositionMinMax = function (
positionMin = Cartesian3.add(
positionMin,
instancingTranslationMin,
- cartesianMinScratch,
+ cartesianMinScratch
);
positionMax = Cartesian3.add(
positionMax,
instancingTranslationMax,
- cartesianMaxScratch,
+ cartesianMaxScratch
);
}
@@ -364,6 +364,7 @@ ModelUtility.supportedExtensions = {
KHR_mesh_quantization: true,
KHR_texture_basisu: true,
KHR_texture_transform: true,
+ KHR_gaussian_splatting: true,
WEB3D_quantized_attributes: true,
};
diff --git a/packages/engine/Source/Scene/Model/MorphTargetsPipelineStage.js b/packages/engine/Source/Scene/Model/MorphTargetsPipelineStage.js
index 2e34fa1776d1..01f13db68c0e 100644
--- a/packages/engine/Source/Scene/Model/MorphTargetsPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/MorphTargetsPipelineStage.js
@@ -48,7 +48,7 @@ MorphTargetsPipelineStage.process = function (renderResources, primitive) {
shaderBuilder.addDefine(
"HAS_MORPH_TARGETS",
undefined,
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
addGetMorphedAttributeFunctionDeclarations(shaderBuilder);
@@ -75,7 +75,7 @@ MorphTargetsPipelineStage.process = function (renderResources, primitive) {
renderResources,
attribute,
renderResources.attributeIndex,
- i,
+ i
);
renderResources.attributeIndex++;
}
@@ -88,7 +88,7 @@ MorphTargetsPipelineStage.process = function (renderResources, primitive) {
shaderBuilder.addUniform(
"float",
`u_morphWeights[${weightsLength}]`,
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
shaderBuilder.addVertexLines(MorphTargetsStageVS);
@@ -111,32 +111,32 @@ function processMorphTargetAttribute(
renderResources,
attribute,
attributeIndex,
- morphTargetIndex,
+ morphTargetIndex
) {
const shaderBuilder = renderResources.shaderBuilder;
addMorphTargetAttributeToRenderResources(
renderResources,
attribute,
- attributeIndex,
+ attributeIndex
);
const attributeInfo = getMorphTargetAttributeInfo(
attribute,
- scratchAttributeInfo,
+ scratchAttributeInfo
);
addMorphTargetAttributeDeclarationAndFunctionLine(
shaderBuilder,
attributeInfo,
- morphTargetIndex,
+ morphTargetIndex
);
}
function addMorphTargetAttributeToRenderResources(
renderResources,
attribute,
- attributeIndex,
+ attributeIndex
) {
const vertexAttribute = {
index: attributeIndex,
@@ -179,7 +179,7 @@ function getMorphTargetAttributeInfo(attribute, result) {
function addMorphTargetAttributeDeclarationAndFunctionLine(
shaderBuilder,
attributeInfo,
- morphTargetIndex,
+ morphTargetIndex
) {
const attributeString = attributeInfo.attributeString;
const attributeName = `a_target${attributeString}_${morphTargetIndex}`;
@@ -192,37 +192,37 @@ function addGetMorphedAttributeFunctionDeclarations(shaderBuilder) {
shaderBuilder.addFunction(
MorphTargetsPipelineStage.FUNCTION_ID_GET_MORPHED_POSITION,
MorphTargetsPipelineStage.FUNCTION_SIGNATURE_GET_MORPHED_POSITION,
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
const positionLine = "vec3 morphedPosition = position;";
shaderBuilder.addFunctionLines(
MorphTargetsPipelineStage.FUNCTION_ID_GET_MORPHED_POSITION,
- [positionLine],
+ [positionLine]
);
shaderBuilder.addFunction(
MorphTargetsPipelineStage.FUNCTION_ID_GET_MORPHED_NORMAL,
MorphTargetsPipelineStage.FUNCTION_SIGNATURE_GET_MORPHED_NORMAL,
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
const normalLine = "vec3 morphedNormal = normal;";
shaderBuilder.addFunctionLines(
MorphTargetsPipelineStage.FUNCTION_ID_GET_MORPHED_NORMAL,
- [normalLine],
+ [normalLine]
);
shaderBuilder.addFunction(
MorphTargetsPipelineStage.FUNCTION_ID_GET_MORPHED_TANGENT,
MorphTargetsPipelineStage.FUNCTION_SIGNATURE_GET_MORPHED_TANGENT,
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
const tangentLine = "vec3 morphedTangent = tangent;";
shaderBuilder.addFunctionLines(
MorphTargetsPipelineStage.FUNCTION_ID_GET_MORPHED_TANGENT,
- [tangentLine],
+ [tangentLine]
);
}
@@ -230,19 +230,19 @@ function addGetMorphedAttributeFunctionReturns(shaderBuilder) {
const positionLine = "return morphedPosition;";
shaderBuilder.addFunctionLines(
MorphTargetsPipelineStage.FUNCTION_ID_GET_MORPHED_POSITION,
- [positionLine],
+ [positionLine]
);
const normalLine = "return morphedNormal;";
shaderBuilder.addFunctionLines(
MorphTargetsPipelineStage.FUNCTION_ID_GET_MORPHED_NORMAL,
- [normalLine],
+ [normalLine]
);
const tangentLine = "return morphedTangent;";
shaderBuilder.addFunctionLines(
MorphTargetsPipelineStage.FUNCTION_ID_GET_MORPHED_TANGENT,
- [tangentLine],
+ [tangentLine]
);
}
diff --git a/packages/engine/Source/Scene/Model/NodeRenderResources.js b/packages/engine/Source/Scene/Model/NodeRenderResources.js
index 8c3d485850b7..aa908ffaee85 100644
--- a/packages/engine/Source/Scene/Model/NodeRenderResources.js
+++ b/packages/engine/Source/Scene/Model/NodeRenderResources.js
@@ -76,7 +76,7 @@ function NodeRenderResources(modelRenderResources, runtimeNode) {
*/
this.renderStateOptions = clone(
modelRenderResources.renderStateOptions,
- true,
+ true
);
/**
diff --git a/packages/engine/Source/Scene/Model/NodeStatisticsPipelineStage.js b/packages/engine/Source/Scene/Model/NodeStatisticsPipelineStage.js
index acb633bfe64a..11cef8855abf 100644
--- a/packages/engine/Source/Scene/Model/NodeStatisticsPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/NodeStatisticsPipelineStage.js
@@ -23,7 +23,7 @@ const NodeStatisticsPipelineStage = {
NodeStatisticsPipelineStage.process = function (
renderResources,
node,
- frameState,
+ frameState
) {
const statistics = renderResources.model.statistics;
const instances = node.instances;
diff --git a/packages/engine/Source/Scene/Model/PickingPipelineStage.js b/packages/engine/Source/Scene/Model/PickingPipelineStage.js
index 76563792d191..166f71e814f8 100644
--- a/packages/engine/Source/Scene/Model/PickingPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/PickingPipelineStage.js
@@ -33,7 +33,7 @@ const PickingPipelineStage = {
PickingPipelineStage.process = function (
renderResources,
primitive,
- frameState,
+ frameState
) {
const context = frameState.context;
const runtimeNode = renderResources.runtimeNode;
@@ -57,7 +57,7 @@ PickingPipelineStage.process = function (
shaderBuilder.addUniform(
"vec4",
"czm_pickColor",
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
const uniformMap = renderResources.uniformMap;
@@ -129,14 +129,14 @@ function processPickTexture(renderResources, primitive, instances) {
// Extract the Feature Table ID from the instanced Feature ID attributes.
featureIdAttribute = ModelUtility.getFeatureIdsByLabel(
instances.featureIds,
- instanceFeatureIdLabel,
+ instanceFeatureIdLabel
);
featureTableId = featureIdAttribute.propertyTableId;
} else {
// Extract the Feature Table ID from the primitive Feature ID attributes.
featureIdAttribute = ModelUtility.getFeatureIdsByLabel(
primitive.featureIds,
- featureIdLabel,
+ featureIdLabel
);
featureTableId = featureIdAttribute.propertyTableId;
}
@@ -147,7 +147,7 @@ function processPickTexture(renderResources, primitive, instances) {
shaderBuilder.addUniform(
"sampler2D",
"model_pickTexture",
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
const batchTexture = featureTable.batchTexture;
diff --git a/packages/engine/Source/Scene/Model/PntsLoader.js b/packages/engine/Source/Scene/Model/PntsLoader.js
index fafb851851c4..2565dd01a420 100644
--- a/packages/engine/Source/Scene/Model/PntsLoader.js
+++ b/packages/engine/Source/Scene/Model/PntsLoader.js
@@ -350,7 +350,7 @@ function transcodeAttributeType(componentsPerAttribute) {
//>>includeStart('debug', pragmas.debug);
default:
throw new DeveloperError(
- "componentsPerAttribute must be a number from 1-4",
+ "componentsPerAttribute must be a number from 1-4"
);
//>>includeEnd('debug');
}
@@ -404,7 +404,7 @@ function makeAttribute(loader, attributeInfo, context) {
quantization.quantizedVolumeStepSize = Cartesian3.divideByScalar(
quantizedVolumeDimensions,
normalizationRange,
- new Cartesian3(),
+ new Cartesian3()
);
quantization.componentDatatype = attributeInfo.quantizedComponentDatatype;
quantization.type = attributeInfo.quantizedType;
@@ -628,7 +628,7 @@ function makeComponents(loader, context) {
const customAttributeOutput = [];
components.structuralMetadata = makeStructuralMetadata(
parsedContent,
- customAttributeOutput,
+ customAttributeOutput
);
if (customAttributeOutput.length > 0) {
@@ -636,7 +636,7 @@ function makeComponents(loader, context) {
loader,
primitive,
customAttributeOutput,
- context,
+ context
);
}
@@ -644,7 +644,7 @@ function makeComponents(loader, context) {
components.transform = Matrix4.multiplyByTranslation(
components.transform,
parsedContent.rtcCenter,
- components.transform,
+ components.transform
);
}
@@ -655,7 +655,7 @@ function makeComponents(loader, context) {
components.transform = Matrix4.multiplyByTranslation(
components.transform,
positions.quantizedVolumeOffset,
- components.transform,
+ components.transform
);
}
@@ -670,7 +670,7 @@ function addPropertyAttributesToPrimitive(
loader,
primitive,
customAttributes,
- context,
+ context
) {
const attributes = primitive.attributes;
diff --git a/packages/engine/Source/Scene/Model/PointCloudStylingPipelineStage.js b/packages/engine/Source/Scene/Model/PointCloudStylingPipelineStage.js
index 967e07fcfe98..9abb174126d3 100644
--- a/packages/engine/Source/Scene/Model/PointCloudStylingPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/PointCloudStylingPipelineStage.js
@@ -58,7 +58,7 @@ const PointCloudStylingPipelineStage = {
PointCloudStylingPipelineStage.process = function (
renderResources,
primitive,
- frameState,
+ frameState
) {
const shaderBuilder = renderResources.shaderBuilder;
const model = renderResources.model;
@@ -81,11 +81,12 @@ PointCloudStylingPipelineStage.process = function (
const hasBatchTable = !defined(propertyAttributes) && hasFeatureTable;
if (defined(style) && !hasBatchTable) {
- const variableSubstitutionMap =
- getVariableSubstitutionMap(propertyAttributes);
+ const variableSubstitutionMap = getVariableSubstitutionMap(
+ propertyAttributes
+ );
const shaderFunctionInfo = getStyleShaderFunctionInfo(
style,
- variableSubstitutionMap,
+ variableSubstitutionMap
);
addShaderFunctionsAndDefines(shaderBuilder, shaderFunctionInfo);
@@ -94,19 +95,19 @@ PointCloudStylingPipelineStage.process = function (
const usesNormalSemantic = propertyNames.indexOf("normalMC") >= 0;
const hasNormals = ModelUtility.getAttributeBySemantic(
primitive,
- VertexAttributeSemantic.NORMAL,
+ VertexAttributeSemantic.NORMAL
);
if (usesNormalSemantic && !hasNormals) {
throw new RuntimeError(
- "Style references the NORMAL semantic but the point cloud does not have normals",
+ "Style references the NORMAL semantic but the point cloud does not have normals"
);
}
shaderBuilder.addDefine(
"COMPUTE_POSITION_WC_STYLE",
undefined,
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
// If the style is translucent, the alpha options must be adjusted.
@@ -121,7 +122,7 @@ PointCloudStylingPipelineStage.process = function (
shaderBuilder.addDefine(
"HAS_POINT_CLOUD_ATTENUATION",
undefined,
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
}
@@ -129,7 +130,7 @@ PointCloudStylingPipelineStage.process = function (
shaderBuilder.addDefine(
"HAS_POINT_CLOUD_BACK_FACE_CULLING",
undefined,
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
}
@@ -146,7 +147,7 @@ PointCloudStylingPipelineStage.process = function (
shaderBuilder.addUniform(
"vec4",
"model_pointCloudParameters",
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
shaderBuilder.addVertexLines(PointCloudStylingStageVS);
@@ -164,7 +165,7 @@ PointCloudStylingPipelineStage.process = function (
}
vec4.x = defaultValue(
pointCloudShading.maximumAttenuation,
- defaultPointSize,
+ defaultPointSize
);
vec4.x *= frameState.pixelRatio;
@@ -173,7 +174,7 @@ PointCloudStylingPipelineStage.process = function (
renderResources,
primitive,
pointCloudShading,
- content,
+ content
);
vec4.y = geometricError * pointCloudShading.geometricErrorScale;
@@ -209,7 +210,7 @@ function getGeometricError(
renderResources,
primitive,
pointCloudShading,
- content,
+ content
) {
if (defined(content)) {
const geometricError = content.tile.geometricError;
@@ -225,7 +226,7 @@ function getGeometricError(
const positionAttribute = ModelUtility.getAttributeBySemantic(
primitive,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const pointsLength = positionAttribute.count;
@@ -234,13 +235,13 @@ function getGeometricError(
let dimensions = Cartesian3.subtract(
positionAttribute.max,
positionAttribute.min,
- scratchDimensions,
+ scratchDimensions
);
// dimensions is a vector, as it is a subtraction between two points
dimensions = Matrix4.multiplyByPointAsVector(
nodeTransform,
dimensions,
- scratchDimensions,
+ scratchDimensions
);
const volume = dimensions.x * dimensions.y * dimensions.z;
const geometricErrorEstimate = CesiumMath.cbrt(volume / pointsLength);
@@ -295,17 +296,17 @@ function getStyleShaderFunctionInfo(style, variableSubstitutionMap) {
info.colorStyleFunction = style.getColorShaderFunction(
`getColorFromStyle(${parameterList})`,
variableSubstitutionMap,
- shaderState,
+ shaderState
);
info.showStyleFunction = style.getShowShaderFunction(
`getShowFromStyle(${parameterList})`,
variableSubstitutionMap,
- shaderState,
+ shaderState
);
info.pointSizeStyleFunction = style.getPointSizeShaderFunction(
`getPointSizeFromStyle(${parameterList})`,
variableSubstitutionMap,
- shaderState,
+ shaderState
);
info.styleTranslucent =
defined(info.colorStyleFunction) && shaderState.translucent;
@@ -319,7 +320,7 @@ function addShaderFunctionsAndDefines(shaderBuilder, shaderFunctionInfo) {
shaderBuilder.addDefine(
"HAS_POINT_CLOUD_COLOR_STYLE",
undefined,
- ShaderDestination.BOTH,
+ ShaderDestination.BOTH
);
shaderBuilder.addVertexLines(colorStyleFunction);
@@ -333,7 +334,7 @@ function addShaderFunctionsAndDefines(shaderBuilder, shaderFunctionInfo) {
shaderBuilder.addDefine(
"HAS_POINT_CLOUD_SHOW_STYLE",
undefined,
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
shaderBuilder.addVertexLines(showStyleFunction);
}
@@ -343,7 +344,7 @@ function addShaderFunctionsAndDefines(shaderBuilder, shaderFunctionInfo) {
shaderBuilder.addDefine(
"HAS_POINT_CLOUD_POINT_SIZE_STYLE",
undefined,
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
shaderBuilder.addVertexLines(pointSizeStyleFunction);
}
diff --git a/packages/engine/Source/Scene/Model/PrimitiveOutlineGenerator.js b/packages/engine/Source/Scene/Model/PrimitiveOutlineGenerator.js
index d21e59662b7c..2e6e73a2cfe6 100644
--- a/packages/engine/Source/Scene/Model/PrimitiveOutlineGenerator.js
+++ b/packages/engine/Source/Scene/Model/PrimitiveOutlineGenerator.js
@@ -213,7 +213,7 @@ function initialize(outlineGenerator) {
i2,
hasEdge01,
hasEdge12,
- hasEdge20,
+ hasEdge20
);
while (defined(unmatchableVertexIndex)) {
// Copy the unmatchable index and try again.
@@ -277,7 +277,7 @@ function initialize(outlineGenerator) {
i2,
hasEdge01,
hasEdge12,
- hasEdge20,
+ hasEdge20
);
}
}
@@ -285,7 +285,7 @@ function initialize(outlineGenerator) {
// Store the triangle indices in case we had to expand to 32-bit indices
outlineGenerator._triangleIndices = triangleIndices;
outlineGenerator._outlineCoordinatesTypedArray = new Float32Array(
- outlineCoordinates,
+ outlineCoordinates
);
}
@@ -312,7 +312,7 @@ function matchAndStoreCoordinates(
i2,
hasEdge01,
hasEdge12,
- hasEdge20,
+ hasEdge20
) {
const a0 = hasEdge20 ? 1.0 : 0.0;
const b0 = hasEdge01 ? 1.0 : 0.0;
@@ -510,7 +510,7 @@ function popcount6Bit(value) {
* @private
*/
PrimitiveOutlineGenerator.prototype.updateAttribute = function (
- attributeTypedArray,
+ attributeTypedArray
) {
const extraVertices = this._extraVertices;
@@ -525,7 +525,7 @@ PrimitiveOutlineGenerator.prototype.updateAttribute = function (
// Make a larger typed array of the same type as the input
const ArrayType = attributeTypedArray.constructor;
const result = new ArrayType(
- attributeTypedArray.length + extraVerticesLength * stride,
+ attributeTypedArray.length + extraVerticesLength * stride
);
// Copy original vertices
diff --git a/packages/engine/Source/Scene/Model/PrimitiveOutlinePipelineStage.js b/packages/engine/Source/Scene/Model/PrimitiveOutlinePipelineStage.js
index f51803984b32..23b9b034896f 100644
--- a/packages/engine/Source/Scene/Model/PrimitiveOutlinePipelineStage.js
+++ b/packages/engine/Source/Scene/Model/PrimitiveOutlinePipelineStage.js
@@ -32,7 +32,7 @@ const PrimitiveOutlinePipelineStage = {
PrimitiveOutlinePipelineStage.process = function (
renderResources,
primitive,
- frameState,
+ frameState
) {
const shaderBuilder = renderResources.shaderBuilder;
const uniformMap = renderResources.uniformMap;
@@ -40,7 +40,7 @@ PrimitiveOutlinePipelineStage.process = function (
shaderBuilder.addDefine(
"HAS_PRIMITIVE_OUTLINE",
undefined,
- ShaderDestination.BOTH,
+ ShaderDestination.BOTH
);
shaderBuilder.addAttribute("vec3", "a_outlineCoordinates");
@@ -51,7 +51,7 @@ PrimitiveOutlinePipelineStage.process = function (
index: renderResources.attributeIndex++,
vertexBuffer: outlineCoordinates.buffer,
componentsPerAttribute: AttributeType.getNumberOfComponents(
- outlineCoordinates.type,
+ outlineCoordinates.type
),
componentDatatype: outlineCoordinates.componentDatatype,
offsetInBytes: outlineCoordinates.byteOffset,
@@ -63,12 +63,12 @@ PrimitiveOutlinePipelineStage.process = function (
shaderBuilder.addUniform(
"sampler2D",
"model_outlineTexture",
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
// This automatically handles caching the texture on the context
const outlineTexture = PrimitiveOutlineGenerator.createTexture(
- frameState.context,
+ frameState.context
);
uniformMap.model_outlineTexture = function () {
return outlineTexture;
@@ -78,7 +78,7 @@ PrimitiveOutlinePipelineStage.process = function (
shaderBuilder.addUniform(
"vec4",
"model_outlineColor",
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
uniformMap.model_outlineColor = function () {
return model.outlineColor;
@@ -86,7 +86,7 @@ PrimitiveOutlinePipelineStage.process = function (
shaderBuilder.addUniform(
"bool",
"model_showOutline",
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
uniformMap.model_showOutline = function () {
return model.showOutline;
diff --git a/packages/engine/Source/Scene/Model/PrimitiveRenderResources.js b/packages/engine/Source/Scene/Model/PrimitiveRenderResources.js
index b354b9b51958..ce24f71f05ce 100644
--- a/packages/engine/Source/Scene/Model/PrimitiveRenderResources.js
+++ b/packages/engine/Source/Scene/Model/PrimitiveRenderResources.js
@@ -235,7 +235,7 @@ function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
const positionMinMax = ModelUtility.getPositionMinMax(
primitive,
this.runtimeNode.instancingTranslationMin,
- this.runtimeNode.instancingTranslationMax,
+ this.runtimeNode.instancingTranslationMax
);
/**
@@ -269,7 +269,7 @@ function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
this.boundingSphere = BoundingSphere.fromCornerPoints(
this.positionMin,
this.positionMax,
- new BoundingSphere(),
+ new BoundingSphere()
);
/**
diff --git a/packages/engine/Source/Scene/Model/PrimitiveStatisticsPipelineStage.js b/packages/engine/Source/Scene/Model/PrimitiveStatisticsPipelineStage.js
index d01e85df5efd..2b872c6fb61e 100644
--- a/packages/engine/Source/Scene/Model/PrimitiveStatisticsPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/PrimitiveStatisticsPipelineStage.js
@@ -30,7 +30,7 @@ const PrimitiveStatisticsPipelineStage = {
PrimitiveStatisticsPipelineStage.process = function (
renderResources,
primitive,
- frameState,
+ frameState
) {
const model = renderResources.model;
const statistics = model.statistics;
diff --git a/packages/engine/Source/Scene/Model/SceneMode2DPipelineStage.js b/packages/engine/Source/Scene/Model/SceneMode2DPipelineStage.js
index d870ca0518d4..8f4856c0c719 100644
--- a/packages/engine/Source/Scene/Model/SceneMode2DPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/SceneMode2DPipelineStage.js
@@ -52,11 +52,11 @@ const SceneMode2DPipelineStage = {
SceneMode2DPipelineStage.process = function (
renderResources,
primitive,
- frameState,
+ frameState
) {
const positionAttribute = ModelUtility.getAttributeBySemantic(
primitive,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const shaderBuilder = renderResources.shaderBuilder;
@@ -66,13 +66,13 @@ SceneMode2DPipelineStage.process = function (
const computedModelMatrix = Matrix4.multiplyTransformation(
modelMatrix,
nodeComputedTransform,
- scratchModelMatrix,
+ scratchModelMatrix
);
const boundingSphere2D = computeBoundingSphere2D(
renderResources,
computedModelMatrix,
- frameState,
+ frameState
);
const runtimePrimitive = renderResources.runtimePrimitive;
@@ -92,7 +92,7 @@ SceneMode2DPipelineStage.process = function (
positionAttribute,
computedModelMatrix,
boundingSphere2D,
- frameState,
+ frameState
);
// Since this buffer will persist even if the pipeline is re-run,
@@ -110,14 +110,14 @@ SceneMode2DPipelineStage.process = function (
shaderBuilder.addDefine(
"USE_2D_POSITIONS",
undefined,
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
shaderBuilder.addUniform("mat4", "u_modelView2D", ShaderDestination.VERTEX);
const modelMatrix2D = Matrix4.fromTranslation(
boundingSphere2D.center,
- new Matrix4(),
+ new Matrix4()
);
const context = frameState.context;
@@ -126,7 +126,7 @@ SceneMode2DPipelineStage.process = function (
return Matrix4.multiplyTransformation(
context.uniformState.view,
modelMatrix2D,
- scratchModelView2D,
+ scratchModelView2D
);
},
};
@@ -142,31 +142,31 @@ function computeBoundingSphere2D(renderResources, modelMatrix, frameState) {
const transformedPositionMin = Matrix4.multiplyByPoint(
modelMatrix,
renderResources.positionMin,
- scratchProjectedMin,
+ scratchProjectedMin
);
const projectedMin = SceneTransforms.computeActualEllipsoidPosition(
frameState,
transformedPositionMin,
- transformedPositionMin,
+ transformedPositionMin
);
const transformedPositionMax = Matrix4.multiplyByPoint(
modelMatrix,
renderResources.positionMax,
- scratchProjectedMax,
+ scratchProjectedMax
);
const projectedMax = SceneTransforms.computeActualEllipsoidPosition(
frameState,
transformedPositionMax,
- transformedPositionMax,
+ transformedPositionMax
);
return BoundingSphere.fromCornerPoints(
projectedMin,
projectedMax,
- new BoundingSphere(),
+ new BoundingSphere()
);
}
@@ -184,17 +184,17 @@ function dequantizePositionsTypedArray(typedArray, quantization) {
const initialPosition = Cartesian3.fromArray(
typedArray,
i,
- scratchPosition,
+ scratchPosition
);
const scaledPosition = Cartesian3.multiplyComponents(
initialPosition,
quantizedVolumeStepSize,
- initialPosition,
+ initialPosition
);
const dequantizedPosition = Cartesian3.add(
scaledPosition,
quantizedVolumeOffset,
- scaledPosition,
+ scaledPosition
);
dequantizedArray[i] = dequantizedPosition.x;
@@ -209,14 +209,14 @@ function createPositionsTypedArrayFor2D(
attribute,
modelMatrix,
referencePoint,
- frameState,
+ frameState
) {
let result;
if (defined(attribute.quantization)) {
// Dequantize the positions if necessary.
result = dequantizePositionsTypedArray(
attribute.typedArray,
- attribute.quantization,
+ attribute.quantization
);
} else {
result = attribute.typedArray.slice();
@@ -241,19 +241,19 @@ function createPositionsTypedArrayFor2D(
const transformedPosition = Matrix4.multiplyByPoint(
modelMatrix,
initialPosition,
- initialPosition,
+ initialPosition
);
const projectedPosition = SceneTransforms.computeActualEllipsoidPosition(
frameState,
transformedPosition,
- transformedPosition,
+ transformedPosition
);
const relativePosition = Cartesian3.subtract(
projectedPosition,
referencePoint,
- projectedPosition,
+ projectedPosition
);
result[i] = relativePosition.x;
@@ -268,7 +268,7 @@ function createPositionBufferFor2D(
positionAttribute,
modelMatrix,
boundingSphere2D,
- frameState,
+ frameState
) {
// Force the scene mode to be CV. In 2D, projected positions will have
// an x-coordinate of 0, which eliminates the height data that is
@@ -284,7 +284,7 @@ function createPositionBufferFor2D(
positionAttribute,
modelMatrix,
referencePoint,
- frameStateCV,
+ frameStateCV
);
// Put the resulting data in a GPU buffer.
diff --git a/packages/engine/Source/Scene/Model/SelectedFeatureIdPipelineStage.js b/packages/engine/Source/Scene/Model/SelectedFeatureIdPipelineStage.js
index 6a95e14384c3..df30ad52509f 100644
--- a/packages/engine/Source/Scene/Model/SelectedFeatureIdPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/SelectedFeatureIdPipelineStage.js
@@ -33,7 +33,7 @@ const SelectedFeatureIdPipelineStage = {
SelectedFeatureIdPipelineStage.process = function (
renderResources,
primitive,
- frameState,
+ frameState
) {
const shaderBuilder = renderResources.shaderBuilder;
@@ -47,7 +47,7 @@ SelectedFeatureIdPipelineStage.process = function (
shaderBuilder.addDefine(
"HAS_SELECTED_FEATURE_ID",
undefined,
- shaderDestination,
+ shaderDestination
);
// Add a define to insert the variable to use.
@@ -56,7 +56,7 @@ SelectedFeatureIdPipelineStage.process = function (
shaderBuilder.addDefine(
"SELECTED_FEATURE_ID",
selectedFeatureIds.variableName,
- shaderDestination,
+ shaderDestination
);
// Add a define to the shader to distinguish feature ID attributes from
@@ -65,7 +65,7 @@ SelectedFeatureIdPipelineStage.process = function (
shaderBuilder.addDefine(
selectedFeatureIds.featureIdDefine,
undefined,
- shaderDestination,
+ shaderDestination
);
updateFeatureStruct(shaderBuilder);
@@ -76,7 +76,7 @@ SelectedFeatureIdPipelineStage.process = function (
shaderBuilder.addDefine(
"HAS_NULL_FEATURE_ID",
undefined,
- shaderDestination,
+ shaderDestination
);
shaderBuilder.addUniform("int", "model_nullFeatureId", shaderDestination);
uniformMap.model_nullFeatureId = function () {
@@ -115,7 +115,7 @@ function getSelectedFeatureIds(model, node, primitive) {
if (defined(node.instances)) {
featureIds = ModelUtility.getFeatureIdsByLabel(
node.instances.featureIds,
- model.instanceFeatureIdLabel,
+ model.instanceFeatureIdLabel
);
if (defined(featureIds)) {
@@ -133,7 +133,7 @@ function getSelectedFeatureIds(model, node, primitive) {
featureIds = ModelUtility.getFeatureIdsByLabel(
primitive.featureIds,
- model.featureIdLabel,
+ model.featureIdLabel
);
// again, prefer label for being more descriptive
variableName = defaultValue(featureIds.label, featureIds.positionalLabel);
@@ -162,19 +162,19 @@ function updateFeatureStruct(shaderBuilder) {
shaderBuilder.addStructField(
SelectedFeatureIdPipelineStage.STRUCT_ID_SELECTED_FEATURE,
"int",
- "id",
+ "id"
);
shaderBuilder.addStructField(
SelectedFeatureIdPipelineStage.STRUCT_ID_SELECTED_FEATURE,
"vec2",
- "st",
+ "st"
);
shaderBuilder.addStructField(
SelectedFeatureIdPipelineStage.STRUCT_ID_SELECTED_FEATURE,
"vec4",
- "color",
+ "color"
);
}
diff --git a/packages/engine/Source/Scene/Model/SkinningPipelineStage.js b/packages/engine/Source/Scene/Model/SkinningPipelineStage.js
index 4475a35c3e07..0f7fc1b84fdc 100644
--- a/packages/engine/Source/Scene/Model/SkinningPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/SkinningPipelineStage.js
@@ -45,7 +45,7 @@ SkinningPipelineStage.process = function (renderResources, primitive) {
shaderBuilder.addUniform(
"mat4",
`u_jointMatrices[${jointMatrices.length}]`,
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
shaderBuilder.addVertexLines(SkinningStageVS);
@@ -83,13 +83,13 @@ function addGetSkinningMatrixFunction(shaderBuilder, primitive) {
shaderBuilder.addFunction(
SkinningPipelineStage.FUNCTION_ID_GET_SKINNING_MATRIX,
SkinningPipelineStage.FUNCTION_SIGNATURE_GET_SKINNING_MATRIX,
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
const initialLine = "mat4 skinnedMatrix = mat4(0);";
shaderBuilder.addFunctionLines(
SkinningPipelineStage.FUNCTION_ID_GET_SKINNING_MATRIX,
- [initialLine],
+ [initialLine]
);
let setIndex;
@@ -103,7 +103,7 @@ function addGetSkinningMatrixFunction(shaderBuilder, primitive) {
const line = `skinnedMatrix += a_weights_${setIndex}.${component} * u_jointMatrices[int(a_joints_${setIndex}.${component})];`;
shaderBuilder.addFunctionLines(
SkinningPipelineStage.FUNCTION_ID_GET_SKINNING_MATRIX,
- [line],
+ [line]
);
}
}
@@ -111,7 +111,7 @@ function addGetSkinningMatrixFunction(shaderBuilder, primitive) {
const returnLine = "return skinnedMatrix;";
shaderBuilder.addFunctionLines(
SkinningPipelineStage.FUNCTION_ID_GET_SKINNING_MATRIX,
- [returnLine],
+ [returnLine]
);
}
diff --git a/packages/engine/Source/Scene/Model/StyleCommandsNeeded.js b/packages/engine/Source/Scene/Model/StyleCommandsNeeded.js
index c5e1188d1fd7..a673bbf3b1bc 100644
--- a/packages/engine/Source/Scene/Model/StyleCommandsNeeded.js
+++ b/packages/engine/Source/Scene/Model/StyleCommandsNeeded.js
@@ -16,7 +16,7 @@ const StyleCommandsNeeded = {
*/
StyleCommandsNeeded.getStyleCommandsNeeded = function (
featuresLength,
- translucentFeaturesLength,
+ translucentFeaturesLength
) {
if (translucentFeaturesLength === 0) {
return StyleCommandsNeeded.ALL_OPAQUE;
diff --git a/packages/engine/Source/Scene/Model/TextureManager.js b/packages/engine/Source/Scene/Model/TextureManager.js
index 683ebaee443d..fb13fda62919 100644
--- a/packages/engine/Source/Scene/Model/TextureManager.js
+++ b/packages/engine/Source/Scene/Model/TextureManager.js
@@ -138,11 +138,11 @@ function getWebGL1Texture(textureUniform, image, context) {
// typedArray is non-power-of-two but can't be resized. Warn and return raw texture (no mipmaps)
if (needMipmap) {
console.warn(
- "Texture requires resizing for mipmaps but pixelDataType cannot be resized. The texture may be rendered incorrectly.",
+ "Texture requires resizing for mipmaps but pixelDataType cannot be resized. The texture may be rendered incorrectly."
);
} else if (samplerRepeats) {
console.warn(
- "Texture requires resizing for wrapping but pixelDataType cannot be resized. The texture may be rendered incorrectly.",
+ "Texture requires resizing for wrapping but pixelDataType cannot be resized. The texture may be rendered incorrectly."
);
}
return getTextureFromTypedArray(textureUniform, context);
diff --git a/packages/engine/Source/Scene/Model/TextureUniform.js b/packages/engine/Source/Scene/Model/TextureUniform.js
index a8b6db4b2483..ef0b4b809806 100644
--- a/packages/engine/Source/Scene/Model/TextureUniform.js
+++ b/packages/engine/Source/Scene/Model/TextureUniform.js
@@ -35,12 +35,12 @@ function TextureUniform(options) {
const hasUrl = defined(options.url);
if (hasTypedArray === hasUrl) {
throw new DeveloperError(
- "exactly one of options.typedArray, options.url must be defined",
+ "exactly one of options.typedArray, options.url must be defined"
);
}
if (hasTypedArray && (!defined(options.width) || !defined(options.height))) {
throw new DeveloperError(
- "options.width and options.height are required when options.typedArray is defined",
+ "options.width and options.height are required when options.typedArray is defined"
);
}
//>>includeEnd('debug');
@@ -51,7 +51,7 @@ function TextureUniform(options) {
this.pixelFormat = defaultValue(options.pixelFormat, PixelFormat.RGBA);
this.pixelDatatype = defaultValue(
options.pixelDatatype,
- PixelDatatype.UNSIGNED_BYTE,
+ PixelDatatype.UNSIGNED_BYTE
);
let resource = options.url;
diff --git a/packages/engine/Source/Scene/Model/TilesetPipelineStage.js b/packages/engine/Source/Scene/Model/TilesetPipelineStage.js
index 33dd3718b2de..7a3257ff6869 100644
--- a/packages/engine/Source/Scene/Model/TilesetPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/TilesetPipelineStage.js
@@ -43,7 +43,7 @@ TilesetPipelineStage.process = function (renderResources, model, frameState) {
shaderBuilder.addDefine(
"POLYGON_OFFSET",
undefined,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
// This value will be overriden by the depth-only back face derived command.
@@ -58,7 +58,7 @@ TilesetPipelineStage.process = function (renderResources, model, frameState) {
renderResources.uniformMap = combine(
uniformMap,
- renderResources.uniformMap,
+ renderResources.uniformMap
);
renderResources.hasSkipLevelOfDetail = true;
}
diff --git a/packages/engine/Source/Scene/Model/VerticalExaggerationPipelineStage.js b/packages/engine/Source/Scene/Model/VerticalExaggerationPipelineStage.js
index 9dd8aa83a3fa..19f26b1001d3 100644
--- a/packages/engine/Source/Scene/Model/VerticalExaggerationPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/VerticalExaggerationPipelineStage.js
@@ -28,7 +28,7 @@ const scratchExaggerationUniform = new Cartesian2();
VerticalExaggerationPipelineStage.process = function (
renderResources,
primitive,
- frameState,
+ frameState
) {
const { shaderBuilder, uniformMap } = renderResources;
@@ -37,20 +37,20 @@ VerticalExaggerationPipelineStage.process = function (
shaderBuilder.addDefine(
"HAS_VERTICAL_EXAGGERATION",
undefined,
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
shaderBuilder.addUniform(
"vec2",
"u_verticalExaggerationAndRelativeHeight",
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
uniformMap.u_verticalExaggerationAndRelativeHeight = function () {
return Cartesian2.fromElements(
frameState.verticalExaggeration,
frameState.verticalExaggerationRelativeHeight,
- scratchExaggerationUniform,
+ scratchExaggerationUniform
);
};
};
diff --git a/packages/engine/Source/Scene/Model/WireframePipelineStage.js b/packages/engine/Source/Scene/Model/WireframePipelineStage.js
index 0461597b12fe..7aed34818ea6 100644
--- a/packages/engine/Source/Scene/Model/WireframePipelineStage.js
+++ b/packages/engine/Source/Scene/Model/WireframePipelineStage.js
@@ -34,7 +34,7 @@ const WireframePipelineStage = {
WireframePipelineStage.process = function (
renderResources,
primitive,
- frameState,
+ frameState
) {
// Applying normal mapping to the lines will result in rendering
// errors on Linux. This define is added to disable normal
@@ -43,14 +43,14 @@ WireframePipelineStage.process = function (
shaderBuilder.addDefine(
"HAS_WIREFRAME",
undefined,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
const model = renderResources.model;
const wireframeIndexBuffer = createWireframeIndexBuffer(
primitive,
renderResources.indices,
- frameState,
+ frameState
);
model._pipelineResources.push(wireframeIndexBuffer);
renderResources.wireframeIndexBuffer = wireframeIndexBuffer;
@@ -69,14 +69,14 @@ WireframePipelineStage.process = function (
renderResources.primitiveType = PrimitiveType.LINES;
renderResources.count = WireframeIndexGenerator.getWireframeIndicesCount(
originalPrimitiveType,
- originalCount,
+ originalCount
);
};
function createWireframeIndexBuffer(primitive, indices, frameState) {
const positionAttribute = ModelUtility.getAttributeBySemantic(
primitive,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const vertexCount = positionAttribute.count;
const webgl2 = frameState.context.webgl2;
@@ -101,10 +101,10 @@ function createWireframeIndexBuffer(primitive, indices, frameState) {
const wireframeIndices = WireframeIndexGenerator.createWireframeIndices(
primitiveType,
vertexCount,
- originalIndices,
+ originalIndices
);
const indexDatatype = IndexDatatype.fromSizeInBytes(
- wireframeIndices.BYTES_PER_ELEMENT,
+ wireframeIndices.BYTES_PER_ELEMENT
);
return Buffer.createIndexBuffer({
diff --git a/packages/engine/Source/Scene/Model/pickModel.js b/packages/engine/Source/Scene/Model/pickModel.js
index 244ea0e3b45f..9dc7cc768be4 100644
--- a/packages/engine/Source/Scene/Model/pickModel.js
+++ b/packages/engine/Source/Scene/Model/pickModel.js
@@ -48,7 +48,7 @@ export default function pickModel(
verticalExaggeration,
relativeHeight,
ellipsoid,
- result,
+ result
) {
//>>includeStart('debug', pragmas.debug);
Check.typeOf.object("model", model);
@@ -70,11 +70,11 @@ export default function pickModel(
let nodeComputedTransform = Matrix4.clone(
runtimeNode.computedTransform,
- scratchNodeComputedTransform,
+ scratchNodeComputedTransform
);
let modelMatrix = Matrix4.clone(
sceneGraph.computedModelMatrix,
- scratchModelMatrix,
+ scratchModelMatrix
);
const instances = node.instances;
@@ -84,13 +84,13 @@ export default function pickModel(
modelMatrix = Matrix4.multiplyTransformation(
model.modelMatrix,
sceneGraph.components.transform,
- modelMatrix,
+ modelMatrix
);
nodeComputedTransform = Matrix4.multiplyTransformation(
sceneGraph.axisCorrectionMatrix,
runtimeNode.computedTransform,
- nodeComputedTransform,
+ nodeComputedTransform
);
}
}
@@ -98,14 +98,14 @@ export default function pickModel(
let computedModelMatrix = Matrix4.multiplyTransformation(
modelMatrix,
nodeComputedTransform,
- scratchcomputedModelMatrix,
+ scratchcomputedModelMatrix
);
if (frameState.mode !== SceneMode.SCENE3D) {
computedModelMatrix = Transforms.basisTo2D(
frameState.mapProjection,
computedModelMatrix,
- computedModelMatrix,
+ computedModelMatrix
);
}
@@ -122,7 +122,7 @@ export default function pickModel(
if (defined(instanceTransformsBuffer) && frameState.context.webgl2) {
transformsTypedArray = ComponentDatatype.createTypedArray(
instanceComponentDatatype,
- transformsCount * transformElements,
+ transformsCount * transformElements
);
instanceTransformsBuffer.getBufferData(transformsTypedArray);
}
@@ -148,21 +148,21 @@ export default function pickModel(
0,
0,
0,
- 1,
+ 1
);
if (instances.transformInWorldSpace) {
Matrix4.multiplyTransformation(
transform,
nodeComputedTransform,
- transform,
+ transform
);
Matrix4.multiplyTransformation(modelMatrix, transform, transform);
} else {
Matrix4.multiplyTransformation(
transform,
computedModelMatrix,
- transform,
+ transform
);
}
transforms.push(transform);
@@ -183,11 +183,11 @@ export default function pickModel(
const boundingSphere = BoundingSphere.transform(
runtimePrimitive.boundingSphere,
computedModelMatrix,
- scratchBoundingSphere,
+ scratchBoundingSphere
);
const boundsIntersection = IntersectionTests.raySphere(
ray,
- boundingSphere,
+ boundingSphere
);
if (!defined(boundsIntersection)) {
continue;
@@ -196,7 +196,7 @@ export default function pickModel(
const positionAttribute = ModelUtility.getAttributeBySemantic(
primitive,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const byteOffset = positionAttribute.byteOffset;
const byteStride = positionAttribute.byteStride;
@@ -256,13 +256,13 @@ export default function pickModel(
if (defined(verticesBuffer) && frameState.context.webgl2) {
vertices = ComponentDatatype.createTypedArray(
componentDatatype,
- elementCount,
+ elementCount
);
verticesBuffer.getBufferData(
vertices,
isInterleaved ? 0 : byteOffset,
0,
- elementCount,
+ elementCount
);
}
@@ -271,7 +271,7 @@ export default function pickModel(
vertices,
componentDatatype,
attributeType,
- vertexCount,
+ vertexCount
);
}
}
@@ -301,7 +301,7 @@ export default function pickModel(
verticalExaggeration,
relativeHeight,
ellipsoid,
- scratchV0,
+ scratchV0
);
const v1 = getVertexPosition(
vertices,
@@ -313,7 +313,7 @@ export default function pickModel(
verticalExaggeration,
relativeHeight,
ellipsoid,
- scratchV1,
+ scratchV1
);
const v2 = getVertexPosition(
vertices,
@@ -325,7 +325,7 @@ export default function pickModel(
verticalExaggeration,
relativeHeight,
ellipsoid,
- scratchV2,
+ scratchV2
);
const t = IntersectionTests.rayTriangleParametric(
@@ -333,7 +333,7 @@ export default function pickModel(
v0,
v1,
v2,
- defaultValue(model.backFaceCulling, true),
+ defaultValue(model.backFaceCulling, true)
);
if (defined(t)) {
@@ -374,7 +374,7 @@ function getVertexPosition(
verticalExaggeration,
relativeHeight,
ellipsoid,
- result,
+ result
) {
const i = offset + index * numElements;
result.x = vertices[i];
@@ -386,7 +386,7 @@ function getVertexPosition(
result = AttributeCompression.octDecodeInRange(
result,
quantization.normalizationRange,
- result,
+ result
);
if (quantization.octEncodedZXY) {
@@ -399,13 +399,13 @@ function getVertexPosition(
result = Cartesian3.multiplyComponents(
result,
quantization.quantizedVolumeStepSize,
- result,
+ result
);
result = Cartesian3.add(
result,
quantization.quantizedVolumeOffset,
- result,
+ result
);
}
}
@@ -418,7 +418,7 @@ function getVertexPosition(
ellipsoid,
verticalExaggeration,
relativeHeight,
- result,
+ result
);
}
diff --git a/packages/engine/Source/Scene/ModelComponents.js b/packages/engine/Source/Scene/ModelComponents.js
index fc72bf5baac6..3f3a88ed86b8 100644
--- a/packages/engine/Source/Scene/ModelComponents.js
+++ b/packages/engine/Source/Scene/ModelComponents.js
@@ -1246,7 +1246,7 @@ function MetallicRoughness() {
* @private
*/
this.baseColorFactor = Cartesian4.clone(
- MetallicRoughness.DEFAULT_BASE_COLOR_FACTOR,
+ MetallicRoughness.DEFAULT_BASE_COLOR_FACTOR
);
/**
@@ -1316,7 +1316,7 @@ function SpecularGlossiness() {
* @private
*/
this.diffuseFactor = Cartesian4.clone(
- SpecularGlossiness.DEFAULT_DIFFUSE_FACTOR,
+ SpecularGlossiness.DEFAULT_DIFFUSE_FACTOR
);
/**
@@ -1327,7 +1327,7 @@ function SpecularGlossiness() {
* @private
*/
this.specularFactor = Cartesian3.clone(
- SpecularGlossiness.DEFAULT_SPECULAR_FACTOR,
+ SpecularGlossiness.DEFAULT_SPECULAR_FACTOR
);
/**
@@ -1381,7 +1381,7 @@ function Specular() {
* @private
*/
this.specularColorFactor = Cartesian3.clone(
- Specular.DEFAULT_SPECULAR_COLOR_FACTOR,
+ Specular.DEFAULT_SPECULAR_COLOR_FACTOR
);
/**
diff --git a/packages/engine/Source/Scene/Moon.js b/packages/engine/Source/Scene/Moon.js
index 879eed33117a..aef70fb880b3 100644
--- a/packages/engine/Source/Scene/Moon.js
+++ b/packages/engine/Source/Scene/Moon.js
@@ -116,17 +116,16 @@ Moon.prototype.update = function (frameState) {
Matrix3.transpose(rotation, rotation);
Matrix3.multiply(icrfToFixed, rotation, rotation);
- const translation =
- Simon1994PlanetaryPositions.computeMoonPositionInEarthInertialFrame(
- date,
- translationScratch,
- );
+ const translation = Simon1994PlanetaryPositions.computeMoonPositionInEarthInertialFrame(
+ date,
+ translationScratch
+ );
Matrix3.multiplyByVector(icrfToFixed, translation, translation);
Matrix4.fromRotationTranslation(
rotation,
translation,
- ellipsoidPrimitive.modelMatrix,
+ ellipsoidPrimitive.modelMatrix
);
const savedCommandList = frameState.commandList;
diff --git a/packages/engine/Source/Scene/Multiple3DTileContent.js b/packages/engine/Source/Scene/Multiple3DTileContent.js
index ddf096d8979f..42ede698a349 100644
--- a/packages/engine/Source/Scene/Multiple3DTileContent.js
+++ b/packages/engine/Source/Scene/Multiple3DTileContent.js
@@ -66,7 +66,7 @@ function Multiple3DTileContent(tileset, tile, tilesetResource, contentsJson) {
});
const serverKey = RequestScheduler.getServerKey(
- contentResource.getUrlComponent(),
+ contentResource.getUrlComponent()
);
this._innerContentResources[i] = contentResource;
@@ -301,7 +301,7 @@ Object.defineProperties(Multiple3DTileContent.prototype, {
set: function () {
//>>includeStart('debug', pragmas.debug);
throw new DeveloperError(
- "Multiple3DTileContent cannot have group metadata",
+ "Multiple3DTileContent cannot have group metadata"
);
//>>includeEnd('debug');
},
@@ -328,8 +328,7 @@ Object.defineProperties(Multiple3DTileContent.prototype, {
function updatePendingRequests(multipleContents, deltaRequestCount) {
multipleContents._requestsInFlight += deltaRequestCount;
- multipleContents.tileset.statistics.numberOfPendingRequests +=
- deltaRequestCount;
+ multipleContents.tileset.statistics.numberOfPendingRequests += deltaRequestCount;
}
function cancelPendingRequests(multipleContents, originalContentState) {
@@ -367,8 +366,7 @@ Multiple3DTileContent.prototype.requestInnerContents = function () {
// if we can schedule all the requests at once. If not, no requests are
// scheduled
if (!canScheduleAllRequests(this._serverKeys)) {
- this.tileset.statistics.numberOfAttemptedRequests +=
- this._serverKeys.length;
+ this.tileset.statistics.numberOfAttemptedRequests += this._serverKeys.length;
return;
}
@@ -383,7 +381,7 @@ Multiple3DTileContent.prototype.requestInnerContents = function () {
this,
i,
originalCancelCount,
- this._tile._contentState,
+ this._tile._contentState
);
}
@@ -422,12 +420,13 @@ function requestInnerContent(
multipleContents,
index,
originalCancelCount,
- originalContentState,
+ originalContentState
) {
// it is important to clone here. The fetchArrayBuffer() below here uses
// throttling, but other uses of the resources do not.
- const contentResource =
- multipleContents._innerContentResources[index].clone();
+ const contentResource = multipleContents._innerContentResources[
+ index
+ ].clone();
const tile = multipleContents.tile;
// Always create a new request. If the tile gets canceled, this
@@ -497,7 +496,7 @@ async function createInnerContents(multipleContents) {
}
const promises = arrayBuffers.map((arrayBuffer, i) =>
- createInnerContent(multipleContents, arrayBuffer, i),
+ createInnerContent(multipleContents, arrayBuffer, i)
);
// Even if we had a partial success (in which case the inner promise will be handled, but the content will not be returned), mark that we finished creating
@@ -520,7 +519,7 @@ async function createInnerContent(multipleContents, arrayBuffer, index) {
if (preprocessed.contentType === Cesium3DTileContentType.EXTERNAL_TILESET) {
throw new RuntimeError(
- "External tilesets are disallowed inside multiple contents",
+ "External tilesets are disallowed inside multiple contents"
);
}
@@ -542,13 +541,13 @@ async function createInnerContent(multipleContents, arrayBuffer, index) {
tile,
resource,
preprocessed.binaryPayload.buffer,
- 0,
- ),
+ 0
+ )
);
} else {
// JSON formats
content = await Promise.resolve(
- contentFactory(tileset, tile, resource, preprocessed.jsonPayload),
+ contentFactory(tileset, tile, resource, preprocessed.jsonPayload)
);
}
diff --git a/packages/engine/Source/Scene/OIT.js b/packages/engine/Source/Scene/OIT.js
index 572120d40510..8fe326e758c2 100644
--- a/packages/engine/Source/Scene/OIT.js
+++ b/packages/engine/Source/Scene/OIT.js
@@ -238,7 +238,7 @@ OIT.prototype.update = function (
passState,
framebuffer,
useHDR,
- numSamples,
+ numSamples
) {
if (!this.isSupported()) {
return;
@@ -365,7 +365,7 @@ OIT.prototype.update = function (
const useScissorTest = !BoundingRectangle.equals(
this._viewport,
- passState.viewport,
+ passState.viewport
);
let updateScissor = useScissorTest !== this._useScissorTest;
this._useScissorTest = useScissorTest;
@@ -373,7 +373,7 @@ OIT.prototype.update = function (
if (!BoundingRectangle.equals(this._scissorRectangle, passState.viewport)) {
this._scissorRectangle = BoundingRectangle.clone(
passState.viewport,
- this._scissorRectangle,
+ this._scissorRectangle
);
updateScissor = true;
}
@@ -442,7 +442,7 @@ function getTranslucentRenderState(
context,
translucentBlending,
cache,
- renderState,
+ renderState
) {
let translucentState = cache[renderState.id];
if (!defined(translucentState)) {
@@ -462,7 +462,7 @@ function getTranslucentMRTRenderState(oit, context, renderState) {
context,
translucentMRTBlend,
oit._translucentRenderStateCache,
- renderState,
+ renderState
);
}
@@ -471,7 +471,7 @@ function getTranslucentColorRenderState(oit, context, renderState) {
context,
translucentColorBlend,
oit._translucentRenderStateCache,
- renderState,
+ renderState
);
}
@@ -480,7 +480,7 @@ function getTranslucentAlphaRenderState(oit, context, renderState) {
context,
translucentAlphaBlend,
oit._alphaRenderStateCache,
- renderState,
+ renderState
);
}
@@ -523,7 +523,7 @@ function getTranslucentShaderProgram(context, shaderProgram, keyword, source) {
.replace(/out_FragColor/g, "czm_out_FragColor")
.replace(
/layout\s*\(location\s*=\s*0\)\s*out\s+vec4\s+out_FragColor;/g,
- "",
+ ""
)
.replace(/\bdiscard\b/g, "czm_discard = true")
.replace(/czm_phong/g, "czm_translucentPhong");
@@ -534,7 +534,7 @@ function getTranslucentShaderProgram(context, shaderProgram, keyword, source) {
fs.sources.splice(
0,
0,
- `vec4 czm_out_FragColor;\n` + `bool czm_discard = false;\n`,
+ `vec4 czm_out_FragColor;\n` + `bool czm_discard = false;\n`
);
const fragDataMatches = [...source.matchAll(/out_FragData_(\d+)/g)];
@@ -554,7 +554,7 @@ function getTranslucentShaderProgram(context, shaderProgram, keyword, source) {
" {\n" +
" discard;\n" +
" }\n"
- }${source}}\n`,
+ }${source}}\n`
);
return shaderCache.createDerivedShaderProgram(shaderProgram, keyword, {
@@ -569,7 +569,7 @@ function getTranslucentMRTShaderProgram(context, shaderProgram) {
context,
shaderProgram,
"translucentMRT",
- mrtShaderSource,
+ mrtShaderSource
);
}
@@ -578,7 +578,7 @@ function getTranslucentColorShaderProgram(context, shaderProgram) {
context,
shaderProgram,
"translucentMultipass",
- colorShaderSource,
+ colorShaderSource
);
}
@@ -587,7 +587,7 @@ function getTranslucentAlphaShaderProgram(context, shaderProgram) {
context,
shaderProgram,
"alphaMultipass",
- alphaShaderSource,
+ alphaShaderSource
);
}
@@ -613,7 +613,7 @@ OIT.prototype.createDerivedCommands = function (command, context, result) {
result.translucentCommand = DrawCommand.shallowClone(
command,
- result.translucentCommand,
+ result.translucentCommand
);
if (
@@ -622,12 +622,12 @@ OIT.prototype.createDerivedCommands = function (command, context, result) {
) {
result.translucentCommand.shaderProgram = getTranslucentMRTShaderProgram(
context,
- command.shaderProgram,
+ command.shaderProgram
);
result.translucentCommand.renderState = getTranslucentMRTRenderState(
this,
context,
- command.renderState,
+ command.renderState
);
result.shaderProgramId = command.shaderProgram.id;
} else {
@@ -650,7 +650,7 @@ OIT.prototype.createDerivedCommands = function (command, context, result) {
result.translucentCommand = DrawCommand.shallowClone(
command,
- result.translucentCommand,
+ result.translucentCommand
);
result.alphaCommand = DrawCommand.shallowClone(command, result.alphaCommand);
@@ -660,21 +660,21 @@ OIT.prototype.createDerivedCommands = function (command, context, result) {
) {
result.translucentCommand.shaderProgram = getTranslucentColorShaderProgram(
context,
- command.shaderProgram,
+ command.shaderProgram
);
result.translucentCommand.renderState = getTranslucentColorRenderState(
this,
context,
- command.renderState,
+ command.renderState
);
result.alphaCommand.shaderProgram = getTranslucentAlphaShaderProgram(
context,
- command.shaderProgram,
+ command.shaderProgram
);
result.alphaCommand.renderState = getTranslucentAlphaRenderState(
this,
context,
- command.renderState,
+ command.renderState
);
result.shaderProgramId = command.shaderProgram.id;
} else {
@@ -702,7 +702,7 @@ function executeTranslucentCommandsSortedMultipass(
executeFunction,
passState,
commands,
- invertClassification,
+ invertClassification
) {
const { context, frameState } = scene;
const { useLogDepth, shadowState } = frameState;
@@ -779,7 +779,7 @@ function executeTranslucentCommandsSortedMRT(
executeFunction,
passState,
commands,
- invertClassification,
+ invertClassification
) {
const { context, frameState } = scene;
const { useLogDepth, shadowState } = frameState;
@@ -830,7 +830,7 @@ OIT.prototype.executeCommands = function (
executeFunction,
passState,
commands,
- invertClassification,
+ invertClassification
) {
if (this._translucentMRTSupport) {
executeTranslucentCommandsSortedMRT(
@@ -839,7 +839,7 @@ OIT.prototype.executeCommands = function (
executeFunction,
passState,
commands,
- invertClassification,
+ invertClassification
);
return;
}
@@ -850,7 +850,7 @@ OIT.prototype.executeCommands = function (
executeFunction,
passState,
commands,
- invertClassification,
+ invertClassification
);
};
diff --git a/packages/engine/Source/Scene/OpenStreetMapImageryProvider.js b/packages/engine/Source/Scene/OpenStreetMapImageryProvider.js
index a170c06aebc5..1ff19fded150 100644
--- a/packages/engine/Source/Scene/OpenStreetMapImageryProvider.js
+++ b/packages/engine/Source/Scene/OpenStreetMapImageryProvider.js
@@ -8,7 +8,7 @@ import WebMercatorTilingScheme from "../Core/WebMercatorTilingScheme.js";
import UrlTemplateImageryProvider from "./UrlTemplateImageryProvider.js";
const defaultCredit = new Credit(
- "MapQuest, Open Street Map and contributors, CC-BY-SA",
+ "MapQuest, Open Street Map and contributors, CC-BY-SA"
);
/**
@@ -60,7 +60,7 @@ function OpenStreetMapImageryProvider(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
const resource = Resource.createIfNeeded(
- defaultValue(options.url, "https://tile.openstreetmap.org/"),
+ defaultValue(options.url, "https://tile.openstreetmap.org/")
);
resource.appendForwardSlash();
resource.url += `{z}/{x}/{y}${
@@ -84,18 +84,18 @@ function OpenStreetMapImageryProvider(options) {
// level will cause too many tiles to be downloaded and rendered.
const swTile = tilingScheme.positionToTileXY(
Rectangle.southwest(rectangle),
- minimumLevel,
+ minimumLevel
);
const neTile = tilingScheme.positionToTileXY(
Rectangle.northeast(rectangle),
- minimumLevel,
+ minimumLevel
);
const tileCount =
(Math.abs(neTile.x - swTile.x) + 1) * (Math.abs(neTile.y - swTile.y) + 1);
//>>includeStart('debug', pragmas.debug);
if (tileCount > 4) {
throw new DeveloperError(
- `The rectangle and minimumLevel indicate that there are ${tileCount} tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.`,
+ `The rectangle and minimumLevel indicate that there are ${tileCount} tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.`
);
}
//>>includeEnd('debug');
@@ -119,10 +119,9 @@ function OpenStreetMapImageryProvider(options) {
if (defined(Object.create)) {
OpenStreetMapImageryProvider.prototype = Object.create(
- UrlTemplateImageryProvider.prototype,
+ UrlTemplateImageryProvider.prototype
);
- OpenStreetMapImageryProvider.prototype.constructor =
- OpenStreetMapImageryProvider;
+ OpenStreetMapImageryProvider.prototype.constructor = OpenStreetMapImageryProvider;
}
export default OpenStreetMapImageryProvider;
diff --git a/packages/engine/Source/Scene/OrderedGroundPrimitiveCollection.js b/packages/engine/Source/Scene/OrderedGroundPrimitiveCollection.js
index 74b5f9df50d8..f52d0cb95301 100644
--- a/packages/engine/Source/Scene/OrderedGroundPrimitiveCollection.js
+++ b/packages/engine/Source/Scene/OrderedGroundPrimitiveCollection.js
@@ -99,7 +99,7 @@ OrderedGroundPrimitiveCollection.prototype.set = function (primitive, zIndex) {
*/
OrderedGroundPrimitiveCollection.prototype.remove = function (
primitive,
- doNotDestroy,
+ doNotDestroy
) {
if (this.contains(primitive)) {
const index = primitive._zIndex;
@@ -118,7 +118,7 @@ OrderedGroundPrimitiveCollection.prototype.remove = function (
if (collection.length === 0) {
this._collectionsArray.splice(
this._collectionsArray.indexOf(collection),
- 1,
+ 1
);
this._collections[index] = undefined;
collection.destroy();
diff --git a/packages/engine/Source/Scene/Particle.js b/packages/engine/Source/Scene/Particle.js
index 26f104eabaea..a304f03475eb 100644
--- a/packages/engine/Source/Scene/Particle.js
+++ b/packages/engine/Source/Scene/Particle.js
@@ -39,7 +39,7 @@ function Particle(options) {
* @default Cartesian3.ZERO
*/
this.position = Cartesian3.clone(
- defaultValue(options.position, Cartesian3.ZERO),
+ defaultValue(options.position, Cartesian3.ZERO)
);
/**
* The velocity of the particle in world coordinates.
@@ -47,7 +47,7 @@ function Particle(options) {
* @default Cartesian3.ZERO
*/
this.velocity = Cartesian3.clone(
- defaultValue(options.velocity, Cartesian3.ZERO),
+ defaultValue(options.velocity, Cartesian3.ZERO)
);
/**
* The life of the particle in seconds.
@@ -91,7 +91,7 @@ function Particle(options) {
* @default new Cartesian(1.0, 1.0)
*/
this.imageSize = Cartesian2.clone(
- defaultValue(options.imageSize, defaultSize),
+ defaultValue(options.imageSize, defaultSize)
);
this._age = 0.0;
diff --git a/packages/engine/Source/Scene/ParticleEmitter.js b/packages/engine/Source/Scene/ParticleEmitter.js
index ef02d378f56e..c8a11276b80d 100644
--- a/packages/engine/Source/Scene/ParticleEmitter.js
+++ b/packages/engine/Source/Scene/ParticleEmitter.js
@@ -19,7 +19,7 @@ import DeveloperError from "../Core/DeveloperError.js";
function ParticleEmitter(options) {
//>>includeStart('debug', pragmas.debug);
throw new DeveloperError(
- "This type should not be instantiated directly. Instead, use BoxEmitter, CircleEmitter, ConeEmitter or SphereEmitter.",
+ "This type should not be instantiated directly. Instead, use BoxEmitter, CircleEmitter, ConeEmitter or SphereEmitter."
);
//>>includeEnd('debug');
}
diff --git a/packages/engine/Source/Scene/ParticleSystem.js b/packages/engine/Source/Scene/ParticleSystem.js
index 032755713956..7fab2c50d985 100644
--- a/packages/engine/Source/Scene/ParticleSystem.js
+++ b/packages/engine/Source/Scene/ParticleSystem.js
@@ -95,70 +95,70 @@ function ParticleSystem(options) {
this._bursts = options.bursts;
this._modelMatrix = Matrix4.clone(
- defaultValue(options.modelMatrix, Matrix4.IDENTITY),
+ defaultValue(options.modelMatrix, Matrix4.IDENTITY)
);
this._emitterModelMatrix = Matrix4.clone(
- defaultValue(options.emitterModelMatrix, Matrix4.IDENTITY),
+ defaultValue(options.emitterModelMatrix, Matrix4.IDENTITY)
);
this._matrixDirty = true;
this._combinedMatrix = new Matrix4();
this._startColor = Color.clone(
- defaultValue(options.color, defaultValue(options.startColor, Color.WHITE)),
+ defaultValue(options.color, defaultValue(options.startColor, Color.WHITE))
);
this._endColor = Color.clone(
- defaultValue(options.color, defaultValue(options.endColor, Color.WHITE)),
+ defaultValue(options.color, defaultValue(options.endColor, Color.WHITE))
);
this._startScale = defaultValue(
options.scale,
- defaultValue(options.startScale, 1.0),
+ defaultValue(options.startScale, 1.0)
);
this._endScale = defaultValue(
options.scale,
- defaultValue(options.endScale, 1.0),
+ defaultValue(options.endScale, 1.0)
);
this._emissionRate = defaultValue(options.emissionRate, 5.0);
this._minimumSpeed = defaultValue(
options.speed,
- defaultValue(options.minimumSpeed, 1.0),
+ defaultValue(options.minimumSpeed, 1.0)
);
this._maximumSpeed = defaultValue(
options.speed,
- defaultValue(options.maximumSpeed, 1.0),
+ defaultValue(options.maximumSpeed, 1.0)
);
this._minimumParticleLife = defaultValue(
options.particleLife,
- defaultValue(options.minimumParticleLife, 5.0),
+ defaultValue(options.minimumParticleLife, 5.0)
);
this._maximumParticleLife = defaultValue(
options.particleLife,
- defaultValue(options.maximumParticleLife, 5.0),
+ defaultValue(options.maximumParticleLife, 5.0)
);
this._minimumMass = defaultValue(
options.mass,
- defaultValue(options.minimumMass, 1.0),
+ defaultValue(options.minimumMass, 1.0)
);
this._maximumMass = defaultValue(
options.mass,
- defaultValue(options.maximumMass, 1.0),
+ defaultValue(options.maximumMass, 1.0)
);
this._minimumImageSize = Cartesian2.clone(
defaultValue(
options.imageSize,
- defaultValue(options.minimumImageSize, defaultImageSize),
- ),
+ defaultValue(options.minimumImageSize, defaultImageSize)
+ )
);
this._maximumImageSize = Cartesian2.clone(
defaultValue(
options.imageSize,
- defaultValue(options.maximumImageSize, defaultImageSize),
- ),
+ defaultValue(options.maximumImageSize, defaultImageSize)
+ )
);
this._sizeInMeters = defaultValue(options.sizeInMeters, false);
@@ -557,7 +557,7 @@ function updateParticlePool(system) {
const particlePool = system._particlePool;
const numToAdd = Math.max(
particleEstimate - particles.length - particlePool.length,
- 0,
+ 0
);
for (let j = 0; j < numToAdd; ++j) {
@@ -630,22 +630,22 @@ function updateBillboard(system, particle) {
const r = CesiumMath.lerp(
particle.startColor.red,
particle.endColor.red,
- particle.normalizedAge,
+ particle.normalizedAge
);
const g = CesiumMath.lerp(
particle.startColor.green,
particle.endColor.green,
- particle.normalizedAge,
+ particle.normalizedAge
);
const b = CesiumMath.lerp(
particle.startColor.blue,
particle.endColor.blue,
- particle.normalizedAge,
+ particle.normalizedAge
);
const a = CesiumMath.lerp(
particle.startColor.alpha,
particle.endColor.alpha,
- particle.normalizedAge,
+ particle.normalizedAge
);
billboard.color = new Color(r, g, b, a);
@@ -653,7 +653,7 @@ function updateBillboard(system, particle) {
billboard.scale = CesiumMath.lerp(
particle.startScale,
particle.endScale,
- particle.normalizedAge,
+ particle.normalizedAge
);
}
@@ -665,19 +665,19 @@ function addParticle(system, particle) {
particle.image = system.image;
particle.life = CesiumMath.randomBetween(
system._minimumParticleLife,
- system._maximumParticleLife,
+ system._maximumParticleLife
);
particle.mass = CesiumMath.randomBetween(
system._minimumMass,
- system._maximumMass,
+ system._maximumMass
);
particle.imageSize.x = CesiumMath.randomBetween(
system._minimumImageSize.x,
- system._maximumImageSize.x,
+ system._maximumImageSize.x
);
particle.imageSize.y = CesiumMath.randomBetween(
system._minimumImageSize.y,
- system._maximumImageSize.y,
+ system._maximumImageSize.y
);
// Reset the normalizedAge and age in case the particle was reused.
@@ -686,7 +686,7 @@ function addParticle(system, particle) {
const speed = CesiumMath.randomBetween(
system._minimumSpeed,
- system._maximumSpeed,
+ system._maximumSpeed
);
Cartesian3.multiplyByScalar(particle.velocity, speed, particle.velocity);
@@ -787,7 +787,7 @@ ParticleSystem.prototype.update = function (frameState) {
this._combinedMatrix = Matrix4.multiply(
this.modelMatrix,
this.emitterModelMatrix,
- this._combinedMatrix,
+ this._combinedMatrix
);
this._matrixDirty = false;
}
@@ -805,26 +805,26 @@ ParticleSystem.prototype.update = function (frameState) {
Cartesian3.add(
particle.position,
particle.velocity,
- rotatedVelocityScratch,
+ rotatedVelocityScratch
);
Matrix4.multiplyByPoint(
combinedMatrix,
rotatedVelocityScratch,
- rotatedVelocityScratch,
+ rotatedVelocityScratch
);
// Change the position to be in world coordinates
particle.position = Matrix4.multiplyByPoint(
combinedMatrix,
particle.position,
- particle.position,
+ particle.position
);
// Orient the velocity in world space as well.
Cartesian3.subtract(
rotatedVelocityScratch,
particle.position,
- particle.velocity,
+ particle.velocity
);
Cartesian3.normalize(particle.velocity, particle.velocity);
diff --git a/packages/engine/Source/Scene/PerInstanceColorAppearance.js b/packages/engine/Source/Scene/PerInstanceColorAppearance.js
index a896ddd43b12..a2a32ec136b9 100644
--- a/packages/engine/Source/Scene/PerInstanceColorAppearance.js
+++ b/packages/engine/Source/Scene/PerInstanceColorAppearance.js
@@ -108,7 +108,7 @@ function PerInstanceColorAppearance(options) {
this._renderState = Appearance.getDefaultRenderState(
translucent,
closed,
- options.renderState,
+ options.renderState
);
this._closed = closed;
diff --git a/packages/engine/Source/Scene/PickDepth.js b/packages/engine/Source/Scene/PickDepth.js
index 726ccbc8a6f8..a29d9fe86c8b 100644
--- a/packages/engine/Source/Scene/PickDepth.js
+++ b/packages/engine/Source/Scene/PickDepth.js
@@ -54,7 +54,7 @@ void main()
},
},
owner: pickDepth,
- },
+ }
);
}
@@ -72,7 +72,7 @@ const packedDepthScale = new Cartesian4(
1.0,
1.0 / 255.0,
1.0 / 65025.0,
- 1.0 / 16581375.0,
+ 1.0 / 16581375.0
);
/**
diff --git a/packages/engine/Source/Scene/PickDepthFramebuffer.js b/packages/engine/Source/Scene/PickDepthFramebuffer.js
index 72ece64a45d2..3e22fe1f10a9 100644
--- a/packages/engine/Source/Scene/PickDepthFramebuffer.js
+++ b/packages/engine/Source/Scene/PickDepthFramebuffer.js
@@ -46,7 +46,7 @@ function createResources(pickDepth, context) {
PickDepthFramebuffer.prototype.update = function (
context,
drawingBufferPosition,
- viewport,
+ viewport
) {
const width = viewport.width;
const height = viewport.height;
diff --git a/packages/engine/Source/Scene/PickFramebuffer.js b/packages/engine/Source/Scene/PickFramebuffer.js
index 69645bb7cc50..80abd4284578 100644
--- a/packages/engine/Source/Scene/PickFramebuffer.js
+++ b/packages/engine/Source/Scene/PickFramebuffer.js
@@ -34,7 +34,7 @@ PickFramebuffer.prototype.begin = function (screenSpaceRectangle, viewport) {
BoundingRectangle.clone(
screenSpaceRectangle,
- this._passState.scissorTest.rectangle,
+ this._passState.scissorTest.rectangle
);
// Create or recreate renderbuffers and framebuffer used for picking
@@ -96,17 +96,17 @@ PickFramebuffer.prototype.end = function (screenSpaceRectangle) {
colorScratchForPickFramebuffer.red = Color.byteToFloat(pixels[index]);
colorScratchForPickFramebuffer.green = Color.byteToFloat(
- pixels[index + 1],
+ pixels[index + 1]
);
colorScratchForPickFramebuffer.blue = Color.byteToFloat(
- pixels[index + 2],
+ pixels[index + 2]
);
colorScratchForPickFramebuffer.alpha = Color.byteToFloat(
- pixels[index + 3],
+ pixels[index + 3]
);
const object = context.getObjectByPickColor(
- colorScratchForPickFramebuffer,
+ colorScratchForPickFramebuffer
);
if (defined(object)) {
return object;
diff --git a/packages/engine/Source/Scene/Picking.js b/packages/engine/Source/Scene/Picking.js
index fc38a4a90955..1e2ab94fb48f 100644
--- a/packages/engine/Source/Scene/Picking.js
+++ b/packages/engine/Source/Scene/Picking.js
@@ -60,7 +60,7 @@ function Picking(scene) {
this._pickOffscreenView = new View(
scene,
pickOffscreenCamera,
- pickOffscreenViewport,
+ pickOffscreenViewport
);
}
@@ -89,7 +89,7 @@ function getPickOrthographicCullingVolume(
drawingBufferPosition,
width,
height,
- viewport,
+ viewport
) {
const camera = scene.camera;
let frustum = camera.frustum;
@@ -108,7 +108,7 @@ function getPickOrthographicCullingVolume(
const transform = Matrix4.clone(
camera.transform,
- scratchOrthoPickVolumeMatrix4,
+ scratchOrthoPickVolumeMatrix4
);
camera._setTransform(Matrix4.IDENTITY);
@@ -129,7 +129,7 @@ function getPickOrthographicCullingVolume(
viewport.height,
1.0,
1.0,
- scratchOrthoPixelSize,
+ scratchOrthoPixelSize
);
const ortho = scratchOrthoPickingFrustum;
@@ -151,7 +151,7 @@ function getPickPerspectiveCullingVolume(
drawingBufferPosition,
width,
height,
- viewport,
+ viewport
) {
const camera = scene.camera;
const frustum = camera.frustum;
@@ -175,7 +175,7 @@ function getPickPerspectiveCullingVolume(
viewport.height,
1.0,
1.0,
- scratchPerspPixelSize,
+ scratchPerspPixelSize
);
const pickWidth = pixelSize.x * width * 0.5;
const pickHeight = pixelSize.y * height * 0.5;
@@ -191,7 +191,7 @@ function getPickPerspectiveCullingVolume(
return offCenter.computeCullingVolume(
camera.positionWC,
camera.directionWC,
- camera.upWC,
+ camera.upWC
);
}
@@ -200,7 +200,7 @@ function getPickCullingVolume(
drawingBufferPosition,
width,
height,
- viewport,
+ viewport
) {
const frustum = scene.camera.frustum;
if (
@@ -212,7 +212,7 @@ function getPickCullingVolume(
drawingBufferPosition,
width,
height,
- viewport,
+ viewport
);
}
@@ -221,7 +221,7 @@ function getPickCullingVolume(
drawingBufferPosition,
width,
height,
- viewport,
+ viewport
);
}
@@ -253,7 +253,7 @@ function computePickingDrawingBufferRectangle(
position,
width,
height,
- result,
+ result
) {
result.width = defaultValue(width, 3.0);
result.height = defaultValue(height, result.width);
@@ -296,14 +296,14 @@ Picking.prototype.pick = function (scene, windowPosition, width, height) {
const drawingBufferPosition = SceneTransforms.transformWindowToDrawingBuffer(
scene,
windowPosition,
- scratchPosition,
+ scratchPosition
);
const drawingBufferRectangle = computePickingDrawingBufferRectangle(
context.drawingBufferHeight,
drawingBufferPosition,
width,
height,
- scratchRectangle,
+ scratchRectangle
);
scene.jobScheduler.disableThisFrame();
@@ -314,7 +314,7 @@ Picking.prototype.pick = function (scene, windowPosition, width, height) {
drawingBufferPosition,
drawingBufferRectangle.width,
drawingBufferRectangle.height,
- viewport,
+ viewport
);
frameState.invertClassification = false;
frameState.passes.pick = true;
@@ -349,7 +349,7 @@ Picking.prototype.pickVoxelCoordinate = function (
scene,
windowPosition,
width,
- height,
+ height
) {
//>>includeStart('debug', pragmas.debug);
Check.defined("windowPosition", windowPosition);
@@ -371,14 +371,14 @@ Picking.prototype.pickVoxelCoordinate = function (
const drawingBufferPosition = SceneTransforms.transformWindowToDrawingBuffer(
scene,
windowPosition,
- scratchPosition,
+ scratchPosition
);
const drawingBufferRectangle = computePickingDrawingBufferRectangle(
context.drawingBufferHeight,
drawingBufferPosition,
width,
height,
- scratchRectangle,
+ scratchRectangle
);
scene.jobScheduler.disableThisFrame();
@@ -389,7 +389,7 @@ Picking.prototype.pickVoxelCoordinate = function (
drawingBufferPosition,
drawingBufferRectangle.width,
drawingBufferRectangle.height,
- viewport,
+ viewport
);
frameState.invertClassification = false;
frameState.passes.pickVoxel = true;
@@ -435,7 +435,7 @@ Picking.prototype.pickVoxelCoordinate = function (
Picking.prototype.pickMetadata = function (
scene,
windowPosition,
- pickedMetadataInfo,
+ pickedMetadataInfo
) {
//>>includeStart('debug', pragmas.debug);
Check.typeOf.object("windowPosition", windowPosition);
@@ -458,14 +458,14 @@ Picking.prototype.pickMetadata = function (
const drawingBufferPosition = SceneTransforms.transformWindowToDrawingBuffer(
scene,
windowPosition,
- scratchPosition,
+ scratchPosition
);
const drawingBufferRectangle = computePickingDrawingBufferRectangle(
context.drawingBufferHeight,
drawingBufferPosition,
1.0,
1.0,
- scratchRectangle,
+ scratchRectangle
);
scene.jobScheduler.disableThisFrame();
@@ -476,7 +476,7 @@ Picking.prototype.pickMetadata = function (
drawingBufferPosition,
drawingBufferRectangle.width,
drawingBufferRectangle.height,
- viewport,
+ viewport
);
frameState.invertClassification = false;
@@ -509,7 +509,7 @@ Picking.prototype.pickMetadata = function (
scene._environmentState.useOIT = oldOIT;
const rawMetadataPixel = pickFramebuffer.readCenterPixel(
- drawingBufferRectangle,
+ drawingBufferRectangle
);
context.endFrame();
@@ -517,7 +517,7 @@ Picking.prototype.pickMetadata = function (
const metadataValue = MetadataPicking.decodeMetadataValues(
pickedMetadataInfo.classProperty,
- rawMetadataPixel,
+ rawMetadataPixel
);
return metadataValue;
@@ -557,7 +557,7 @@ function renderTranslucentDepthForPick(scene, drawingBufferPosition) {
drawingBufferPosition,
1,
1,
- viewport,
+ viewport
);
frameState.tilesetPassState = pickTilesetPassState;
@@ -566,7 +566,7 @@ function renderTranslucentDepthForPick(scene, drawingBufferPosition) {
passState = pickDepthFramebuffer.update(
context,
drawingBufferPosition,
- viewport,
+ viewport
);
scene.updateAndExecuteCommands(passState, scratchColorZero);
@@ -583,7 +583,7 @@ const scratchOrthographicOffCenterFrustum = new OrthographicOffCenterFrustum();
Picking.prototype.pickPositionWorldCoordinates = function (
scene,
windowPosition,
- result,
+ result
) {
if (!scene.useDepthPicking) {
return undefined;
@@ -593,7 +593,7 @@ Picking.prototype.pickPositionWorldCoordinates = function (
Check.defined("windowPosition", windowPosition);
if (!scene.context.depthTexture) {
throw new DeveloperError(
- "Picking from the depth buffer is not supported. Check pickPositionSupported.",
+ "Picking from the depth buffer is not supported. Check pickPositionSupported."
);
}
//>>includeEnd('debug');
@@ -615,7 +615,7 @@ Picking.prototype.pickPositionWorldCoordinates = function (
const drawingBufferPosition = SceneTransforms.transformWindowToDrawingBuffer(
scene,
windowPosition,
- scratchPosition,
+ scratchPosition
);
if (scene.pickTranslucentDepth) {
renderTranslucentDepthForPick(scene, drawingBufferPosition);
@@ -645,7 +645,7 @@ Picking.prototype.pickPositionWorldCoordinates = function (
const depth = pickDepth.getDepth(
context,
drawingBufferPosition.x,
- drawingBufferPosition.y,
+ drawingBufferPosition.y
);
if (!defined(depth)) {
continue;
@@ -672,7 +672,7 @@ Picking.prototype.pickPositionWorldCoordinates = function (
scene,
drawingBufferPosition,
depth,
- result,
+ result
);
if (scene.mode === SceneMode.SCENE2D) {
@@ -753,7 +753,7 @@ function drillPick(limit, pickCallback) {
hasShowAttribute = true;
attributes.show = ShowGeometryInstanceAttribute.toValue(
false,
- attributes.show,
+ attributes.show
);
pickedAttributes.push(attributes);
}
@@ -784,7 +784,7 @@ function drillPick(limit, pickCallback) {
attributes = pickedAttributes[i];
attributes.show = ShowGeometryInstanceAttribute.toValue(
true,
- attributes.show,
+ attributes.show
);
}
@@ -800,7 +800,7 @@ Picking.prototype.drillPick = function (
windowPosition,
limit,
width,
- height,
+ height
) {
const that = this;
const pickCallback = function () {
@@ -850,7 +850,7 @@ function updateOffscreenCameraFromRay(picking, ray, width, camera) {
return camera.frustum.computeCullingVolume(
camera.positionWC,
camera.directionWC,
- camera.upWC,
+ camera.upWC
);
}
@@ -864,7 +864,7 @@ function updateMostDetailedRayPick(picking, scene, rayPick) {
picking,
ray,
width,
- camera,
+ camera
);
const tilesetPassState = mostDetailedPreloadTilesetPassState;
@@ -924,7 +924,7 @@ function launchMostDetailedRayPick(
ray,
objectsToExclude,
width,
- callback,
+ callback
) {
const tilesets = [];
getTilesets(scene.primitives, objectsToExclude, tilesets);
@@ -961,7 +961,7 @@ function getRayIntersection(
objectsToExclude,
width,
requirePosition,
- mostDetailed,
+ mostDetailed
) {
const { context, frameState } = scene;
const uniformState = context.uniformState;
@@ -973,12 +973,12 @@ function getRayIntersection(
const drawingBufferRectangle = BoundingRectangle.clone(
view.viewport,
- scratchRectangle,
+ scratchRectangle
);
const passState = view.pickFramebuffer.begin(
drawingBufferRectangle,
- view.viewport,
+ view.viewport
);
scene.jobScheduler.disableThisFrame();
@@ -1047,7 +1047,7 @@ function getRayIntersections(
objectsToExclude,
width,
requirePosition,
- mostDetailed,
+ mostDetailed
) {
const pickCallback = function () {
return getRayIntersection(
@@ -1057,7 +1057,7 @@ function getRayIntersections(
objectsToExclude,
width,
requirePosition,
- mostDetailed,
+ mostDetailed
);
};
return drillPick(limit, pickCallback);
@@ -1070,7 +1070,7 @@ function pickFromRay(
objectsToExclude,
width,
requirePosition,
- mostDetailed,
+ mostDetailed
) {
const results = getRayIntersections(
picking,
@@ -1080,7 +1080,7 @@ function pickFromRay(
objectsToExclude,
width,
requirePosition,
- mostDetailed,
+ mostDetailed
);
if (results.length > 0) {
return results[0];
@@ -1095,7 +1095,7 @@ function drillPickFromRay(
objectsToExclude,
width,
requirePosition,
- mostDetailed,
+ mostDetailed
) {
return getRayIntersections(
picking,
@@ -1105,7 +1105,7 @@ function drillPickFromRay(
objectsToExclude,
width,
requirePosition,
- mostDetailed,
+ mostDetailed
);
}
@@ -1132,7 +1132,7 @@ Picking.prototype.pickFromRay = function (scene, ray, objectsToExclude, width) {
Check.defined("ray", ray);
if (scene.mode !== SceneMode.SCENE3D) {
throw new DeveloperError(
- "Ray intersections are only supported in 3D mode.",
+ "Ray intersections are only supported in 3D mode."
);
}
//>>includeEnd('debug');
@@ -1145,13 +1145,13 @@ Picking.prototype.drillPickFromRay = function (
ray,
limit,
objectsToExclude,
- width,
+ width
) {
//>>includeStart('debug', pragmas.debug);
Check.defined("ray", ray);
if (scene.mode !== SceneMode.SCENE3D) {
throw new DeveloperError(
- "Ray intersections are only supported in 3D mode.",
+ "Ray intersections are only supported in 3D mode."
);
}
//>>includeEnd('debug');
@@ -1164,7 +1164,7 @@ Picking.prototype.drillPickFromRay = function (
objectsToExclude,
width,
false,
- false,
+ false
);
};
@@ -1172,13 +1172,13 @@ Picking.prototype.pickFromRayMostDetailed = function (
scene,
ray,
objectsToExclude,
- width,
+ width
) {
//>>includeStart('debug', pragmas.debug);
Check.defined("ray", ray);
if (scene.mode !== SceneMode.SCENE3D) {
throw new DeveloperError(
- "Ray intersections are only supported in 3D mode.",
+ "Ray intersections are only supported in 3D mode."
);
}
//>>includeEnd('debug');
@@ -1204,10 +1204,10 @@ Picking.prototype.pickFromRayMostDetailed = function (
objectsToExclude,
width,
false,
- true,
+ true
);
- },
- ),
+ }
+ )
);
};
@@ -1216,13 +1216,13 @@ Picking.prototype.drillPickFromRayMostDetailed = function (
ray,
limit,
objectsToExclude,
- width,
+ width
) {
//>>includeStart('debug', pragmas.debug);
Check.defined("ray", ray);
if (scene.mode !== SceneMode.SCENE3D) {
throw new DeveloperError(
- "Ray intersections are only supported in 3D mode.",
+ "Ray intersections are only supported in 3D mode."
);
}
//>>includeEnd('debug');
@@ -1249,10 +1249,10 @@ Picking.prototype.drillPickFromRayMostDetailed = function (
objectsToExclude,
width,
false,
- true,
+ true
);
- },
- ),
+ }
+ )
);
};
@@ -1266,12 +1266,12 @@ function getRayForSampleHeight(scene, cartographic) {
const height = ApproximateTerrainHeights._defaultMaxTerrainHeight;
const surfaceNormal = ellipsoid.geodeticSurfaceNormalCartographic(
cartographic,
- scratchSurfaceNormal,
+ scratchSurfaceNormal
);
const surfacePosition = Cartographic.toCartesian(
cartographic,
ellipsoid,
- scratchSurfacePosition,
+ scratchSurfacePosition
);
const surfaceRay = scratchSurfaceRay;
surfaceRay.origin = surfacePosition;
@@ -1287,7 +1287,7 @@ function getRayForClampToHeight(scene, cartesian) {
const cartographic = Cartographic.fromCartesian(
cartesian,
ellipsoid,
- scratchCartographic,
+ scratchCartographic
);
return getRayForSampleHeight(scene, cartographic);
}
@@ -1297,7 +1297,7 @@ function getHeightFromCartesian(scene, cartesian) {
const cartographic = Cartographic.fromCartesian(
cartesian,
ellipsoid,
- scratchCartographic,
+ scratchCartographic
);
return cartographic.height;
}
@@ -1307,7 +1307,7 @@ function sampleHeightMostDetailed(
scene,
cartographic,
objectsToExclude,
- width,
+ width
) {
const ray = getRayForSampleHeight(scene, cartographic);
return launchMostDetailedRayPick(
@@ -1324,12 +1324,12 @@ function sampleHeightMostDetailed(
objectsToExclude,
width,
true,
- true,
+ true
);
if (defined(pickResult)) {
return getHeightFromCartesian(scene, pickResult.position);
}
- },
+ }
);
}
@@ -1339,7 +1339,7 @@ function clampToHeightMostDetailed(
cartesian,
objectsToExclude,
width,
- result,
+ result
) {
const ray = getRayForClampToHeight(scene, cartesian);
return launchMostDetailedRayPick(
@@ -1356,12 +1356,12 @@ function clampToHeightMostDetailed(
objectsToExclude,
width,
true,
- true,
+ true
);
if (defined(pickResult)) {
return Cartesian3.clone(pickResult.position, result);
}
- },
+ }
);
}
@@ -1369,7 +1369,7 @@ Picking.prototype.sampleHeight = function (
scene,
position,
objectsToExclude,
- width,
+ width
) {
//>>includeStart('debug', pragmas.debug);
Check.defined("position", position);
@@ -1378,7 +1378,7 @@ Picking.prototype.sampleHeight = function (
}
if (!scene.sampleHeightSupported) {
throw new DeveloperError(
- "sampleHeight requires depth texture support. Check sampleHeightSupported.",
+ "sampleHeight requires depth texture support. Check sampleHeightSupported."
);
}
//>>includeEnd('debug');
@@ -1391,7 +1391,7 @@ Picking.prototype.sampleHeight = function (
objectsToExclude,
width,
true,
- false,
+ false
);
if (defined(pickResult)) {
return getHeightFromCartesian(scene, pickResult.position);
@@ -1403,7 +1403,7 @@ Picking.prototype.clampToHeight = function (
cartesian,
objectsToExclude,
width,
- result,
+ result
) {
//>>includeStart('debug', pragmas.debug);
Check.defined("cartesian", cartesian);
@@ -1412,7 +1412,7 @@ Picking.prototype.clampToHeight = function (
}
if (!scene.clampToHeightSupported) {
throw new DeveloperError(
- "clampToHeight requires depth texture support. Check clampToHeightSupported.",
+ "clampToHeight requires depth texture support. Check clampToHeightSupported."
);
}
//>>includeEnd('debug');
@@ -1425,7 +1425,7 @@ Picking.prototype.clampToHeight = function (
objectsToExclude,
width,
true,
- false,
+ false
);
if (defined(pickResult)) {
return Cartesian3.clone(pickResult.position, result);
@@ -1436,18 +1436,18 @@ Picking.prototype.sampleHeightMostDetailed = function (
scene,
positions,
objectsToExclude,
- width,
+ width
) {
//>>includeStart('debug', pragmas.debug);
Check.defined("positions", positions);
if (scene.mode !== SceneMode.SCENE3D) {
throw new DeveloperError(
- "sampleHeightMostDetailed is only supported in 3D mode.",
+ "sampleHeightMostDetailed is only supported in 3D mode."
);
}
if (!scene.sampleHeightSupported) {
throw new DeveloperError(
- "sampleHeightMostDetailed requires depth texture support. Check sampleHeightSupported.",
+ "sampleHeightMostDetailed requires depth texture support. Check sampleHeightSupported."
);
}
//>>includeEnd('debug');
@@ -1463,7 +1463,7 @@ Picking.prototype.sampleHeightMostDetailed = function (
scene,
positions[i],
objectsToExclude,
- width,
+ width
);
}
return deferPromiseUntilPostRender(
@@ -1474,7 +1474,7 @@ Picking.prototype.sampleHeightMostDetailed = function (
positions[i].height = heights[i];
}
return positions;
- }),
+ })
);
};
@@ -1482,18 +1482,18 @@ Picking.prototype.clampToHeightMostDetailed = function (
scene,
cartesians,
objectsToExclude,
- width,
+ width
) {
//>>includeStart('debug', pragmas.debug);
Check.defined("cartesians", cartesians);
if (scene.mode !== SceneMode.SCENE3D) {
throw new DeveloperError(
- "clampToHeightMostDetailed is only supported in 3D mode.",
+ "clampToHeightMostDetailed is only supported in 3D mode."
);
}
if (!scene.clampToHeightSupported) {
throw new DeveloperError(
- "clampToHeightMostDetailed requires depth texture support. Check clampToHeightSupported.",
+ "clampToHeightMostDetailed requires depth texture support. Check clampToHeightSupported."
);
}
//>>includeEnd('debug');
@@ -1510,7 +1510,7 @@ Picking.prototype.clampToHeightMostDetailed = function (
cartesians[i],
objectsToExclude,
width,
- cartesians[i],
+ cartesians[i]
);
}
return deferPromiseUntilPostRender(
@@ -1521,7 +1521,7 @@ Picking.prototype.clampToHeightMostDetailed = function (
cartesians[i] = clampedCartesians[i];
}
return cartesians;
- }),
+ })
);
};
diff --git a/packages/engine/Source/Scene/PntsParser.js b/packages/engine/Source/Scene/PntsParser.js
index e58c52317b33..eb60db304b65 100644
--- a/packages/engine/Source/Scene/PntsParser.js
+++ b/packages/engine/Source/Scene/PntsParser.js
@@ -43,7 +43,7 @@ PntsParser.parse = function (arrayBuffer, byteOffset) {
const version = view.getUint32(byteOffset, true);
if (version !== 1) {
throw new RuntimeError(
- `Only Point Cloud tile version 1 is supported. Version ${version} is not.`,
+ `Only Point Cloud tile version 1 is supported. Version ${version} is not.`
);
}
byteOffset += sizeOfUint32;
@@ -54,7 +54,7 @@ PntsParser.parse = function (arrayBuffer, byteOffset) {
const featureTableJsonByteLength = view.getUint32(byteOffset, true);
if (featureTableJsonByteLength === 0) {
throw new RuntimeError(
- "Feature table must have a byte length greater than zero",
+ "Feature table must have a byte length greater than zero"
);
}
byteOffset += sizeOfUint32;
@@ -70,14 +70,14 @@ PntsParser.parse = function (arrayBuffer, byteOffset) {
const featureTableJson = getJsonFromTypedArray(
uint8Array,
byteOffset,
- featureTableJsonByteLength,
+ featureTableJsonByteLength
);
byteOffset += featureTableJsonByteLength;
const featureTableBinary = new Uint8Array(
arrayBuffer,
byteOffset,
- featureTableBinaryByteLength,
+ featureTableBinaryByteLength
);
byteOffset += featureTableBinaryByteLength;
@@ -89,7 +89,7 @@ PntsParser.parse = function (arrayBuffer, byteOffset) {
batchTableJson = getJsonFromTypedArray(
uint8Array,
byteOffset,
- batchTableJsonByteLength,
+ batchTableJsonByteLength
);
byteOffset += batchTableJsonByteLength;
@@ -98,7 +98,7 @@ PntsParser.parse = function (arrayBuffer, byteOffset) {
batchTableBinary = new Uint8Array(
arrayBuffer,
byteOffset,
- batchTableBinaryByteLength,
+ batchTableBinaryByteLength
);
byteOffset += batchTableBinaryByteLength;
}
@@ -106,7 +106,7 @@ PntsParser.parse = function (arrayBuffer, byteOffset) {
const featureTable = new Cesium3DTileFeatureTable(
featureTableJson,
- featureTableBinary,
+ featureTableBinary
);
const pointsLength = featureTable.getGlobalProperty("POINTS_LENGTH");
@@ -114,14 +114,14 @@ PntsParser.parse = function (arrayBuffer, byteOffset) {
if (!defined(pointsLength)) {
throw new RuntimeError(
- "Feature table global property: POINTS_LENGTH must be defined",
+ "Feature table global property: POINTS_LENGTH must be defined"
);
}
let rtcCenter = featureTable.getGlobalProperty(
"RTC_CENTER",
ComponentDatatype.FLOAT,
- 3,
+ 3
);
if (defined(rtcCenter)) {
rtcCenter = Cartesian3.unpack(rtcCenter);
@@ -142,7 +142,7 @@ PntsParser.parse = function (arrayBuffer, byteOffset) {
if (!parsedContent.hasPositions) {
throw new RuntimeError(
- "Either POSITION or POSITION_QUANTIZED must be defined.",
+ "Either POSITION or POSITION_QUANTIZED must be defined."
);
}
@@ -170,7 +170,7 @@ PntsParser.parse = function (arrayBuffer, byteOffset) {
const batchLength = featureTable.getGlobalProperty("BATCH_LENGTH");
if (!defined(batchLength)) {
throw new RuntimeError(
- "Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.",
+ "Global property: BATCH_LENGTH must be defined when BATCH_ID is defined."
);
}
parsedContent.batchLength = batchLength;
@@ -219,12 +219,12 @@ function parseDracoProperties(featureTable, batchTableJson) {
!defined(dracoByteLength)
) {
throw new RuntimeError(
- "Draco properties, byteOffset, and byteLength must be defined",
+ "Draco properties, byteOffset, and byteLength must be defined"
);
}
dracoBuffer = featureTable.buffer.slice(
dracoByteOffset,
- dracoByteOffset + dracoByteLength,
+ dracoByteOffset + dracoByteLength
);
hasPositions = defined(dracoFeatureTableProperties.POSITION);
hasColors =
@@ -243,7 +243,7 @@ function parseDracoProperties(featureTable, batchTableJson) {
batchTableProperties: dracoBatchTableProperties,
properties: combine(
dracoFeatureTableProperties,
- dracoBatchTableProperties,
+ dracoBatchTableProperties
),
dequantizeInShader: true,
};
@@ -267,7 +267,7 @@ function parsePositions(featureTable) {
positions = featureTable.getPropertyArray(
"POSITION",
ComponentDatatype.FLOAT,
- 3,
+ 3
);
return {
@@ -282,17 +282,17 @@ function parsePositions(featureTable) {
positions = featureTable.getPropertyArray(
"POSITION_QUANTIZED",
ComponentDatatype.UNSIGNED_SHORT,
- 3,
+ 3
);
const quantizedVolumeScale = featureTable.getGlobalProperty(
"QUANTIZED_VOLUME_SCALE",
ComponentDatatype.FLOAT,
- 3,
+ 3
);
if (!defined(quantizedVolumeScale)) {
throw new RuntimeError(
- "Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.",
+ "Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions."
);
}
const quantizedRange = (1 << 16) - 1;
@@ -300,11 +300,11 @@ function parsePositions(featureTable) {
const quantizedVolumeOffset = featureTable.getGlobalProperty(
"QUANTIZED_VOLUME_OFFSET",
ComponentDatatype.FLOAT,
- 3,
+ 3
);
if (!defined(quantizedVolumeOffset)) {
throw new RuntimeError(
- "Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.",
+ "Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions."
);
}
@@ -332,7 +332,7 @@ function parseColors(featureTable) {
colors = featureTable.getPropertyArray(
"RGBA",
ComponentDatatype.UNSIGNED_BYTE,
- 4,
+ 4
);
return {
name: VertexAttributeSemantic.COLOR,
@@ -349,7 +349,7 @@ function parseColors(featureTable) {
colors = featureTable.getPropertyArray(
"RGB",
ComponentDatatype.UNSIGNED_BYTE,
- 3,
+ 3
);
return {
name: "COLOR",
@@ -366,7 +366,7 @@ function parseColors(featureTable) {
colors = featureTable.getPropertyArray(
"RGB565",
ComponentDatatype.UNSIGNED_SHORT,
- 1,
+ 1
);
return {
name: "COLOR",
@@ -387,7 +387,7 @@ function parseColors(featureTable) {
const constantRGBA = featureTable.getGlobalProperty(
"CONSTANT_RGBA",
ComponentDatatype.UNSIGNED_BYTE,
- 4,
+ 4
);
const alpha = constantRGBA[3];
@@ -395,7 +395,7 @@ function parseColors(featureTable) {
constantRGBA[0],
constantRGBA[1],
constantRGBA[2],
- alpha,
+ alpha
);
const isTranslucent = alpha < 255;
@@ -421,7 +421,7 @@ function parseNormals(featureTable) {
normals = featureTable.getPropertyArray(
"NORMAL",
ComponentDatatype.FLOAT,
- 3,
+ 3
);
return {
name: VertexAttributeSemantic.NORMAL,
@@ -436,7 +436,7 @@ function parseNormals(featureTable) {
normals = featureTable.getPropertyArray(
"NORMAL_OCT16P",
ComponentDatatype.UNSIGNED_BYTE,
- 2,
+ 2
);
const quantizationBits = 8;
return {
@@ -462,7 +462,7 @@ function parseBatchIds(featureTable) {
const batchIds = featureTable.getPropertyArray(
"BATCH_ID",
ComponentDatatype.UNSIGNED_SHORT,
- 1,
+ 1
);
return {
name: VertexAttributeSemantic.FEATURE_ID,
diff --git a/packages/engine/Source/Scene/PointCloud.js b/packages/engine/Source/Scene/PointCloud.js
index 6f41c9fc7330..0dc44523cd53 100644
--- a/packages/engine/Source/Scene/PointCloud.js
+++ b/packages/engine/Source/Scene/PointCloud.js
@@ -152,7 +152,7 @@ function PointCloud(options) {
*/
this.splitDirection = defaultValue(
options.splitDirection,
- SplitDirection.NONE,
+ SplitDirection.NONE
);
this._splittingEnabled = false;
@@ -204,7 +204,7 @@ Object.defineProperties(PointCloud.prototype, {
function initialize(pointCloud, options) {
const parsedContent = PntsParser.parse(
options.arrayBuffer,
- options.byteOffset,
+ options.byteOffset
);
pointCloud._parsedContent = parsedContent;
pointCloud._rtcCenter = parsedContent.rtcCenter;
@@ -216,12 +216,11 @@ function initialize(pointCloud, options) {
// If points are not batched and there are per-point properties, use the
// properties as metadata for styling purposes.
if (!parsedContent.hasBatchIds && defined(parsedContent.batchTableBinary)) {
- parsedContent.styleableProperties =
- Cesium3DTileBatchTable.getBinaryProperties(
- parsedContent.pointsLength,
- parsedContent.batchTableJson,
- parsedContent.batchTableBinary,
- );
+ parsedContent.styleableProperties = Cesium3DTileBatchTable.getBinaryProperties(
+ parsedContent.pointsLength,
+ parsedContent.batchTableJson,
+ parsedContent.batchTableBinary
+ );
}
if (defined(parsedContent.draco)) {
@@ -248,7 +247,7 @@ function initialize(pointCloud, options) {
if (defined(colors.constantColor)) {
pointCloud._constantColor = Color.clone(
colors.constantColor,
- pointCloud._constantColor,
+ pointCloud._constantColor
);
// Constant colors are handled as a uniform rather than a vertex
@@ -272,7 +271,7 @@ function initialize(pointCloud, options) {
pointCloud._batchTableLoaded(
parsedContent.batchLength,
parsedContent.batchTableJson,
- parsedContent.batchTableBinary,
+ parsedContent.batchTableBinary
);
}
@@ -333,15 +332,14 @@ function prepareVertexAttribute(typedArray, name) {
) {
oneTimeWarning(
"Cast pnts property to floats",
- `Point cloud property "${name}" will be cast to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.`,
+ `Point cloud property "${name}" will be cast to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.`
);
return new Float32Array(typedArray);
}
return typedArray;
}
-const scratchPointSizeAndTimeAndGeometricErrorAndDepthMultiplier =
- new Cartesian4();
+const scratchPointSizeAndTimeAndGeometricErrorAndDepthMultiplier = new Cartesian4();
const scratchQuantizedVolumeScaleAndOctEncodedRange = new Cartesian4();
const scratchColor = new Color();
@@ -452,7 +450,7 @@ function createResources(pointCloud, frameState) {
if (hasBatchIds) {
batchIds.typedArray = prepareVertexAttribute(
batchIds.typedArray,
- "batchIds",
+ "batchIds"
);
batchIdsVertexBuffer = Buffer.createVertexBuffer({
context: context,
@@ -489,11 +487,12 @@ function createResources(pointCloud, frameState) {
if (isQuantized || isQuantizedDraco) {
pointCloud._boundingSphere = BoundingSphere.fromCornerPoints(
Cartesian3.ZERO,
- pointCloud._quantizedVolumeScale,
+ pointCloud._quantizedVolumeScale
);
} else {
- pointCloud._boundingSphere =
- computeApproximateBoundingSphereFromPositions(positions.typedArray);
+ pointCloud._boundingSphere = computeApproximateBoundingSphereFromPositions(
+ positions.typedArray
+ );
}
}
@@ -591,7 +590,7 @@ function createResources(pointCloud, frameState) {
pointCloud._opaqueRenderState = RenderState.fromCache(opaqueRenderState);
pointCloud._translucentRenderState = RenderState.fromCache(
- translucentRenderState,
+ translucentRenderState
);
pointCloud._drawCommand = new DrawCommand({
@@ -622,8 +621,7 @@ function createUniformMap(pointCloud, frameState) {
let uniformMap = {
u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier: function () {
- const scratch =
- scratchPointSizeAndTimeAndGeometricErrorAndDepthMultiplier;
+ const scratch = scratchPointSizeAndTimeAndGeometricErrorAndDepthMultiplier;
scratch.x = pointCloud._attenuation
? pointCloud.maximumAttenuation
: pointCloud._pointSize;
@@ -681,22 +679,22 @@ function createUniformMap(pointCloud, frameState) {
const clippingPlanesOriginMatrix = defaultValue(
pointCloud.clippingPlanesOriginMatrix,
- pointCloud._modelMatrix,
+ pointCloud._modelMatrix
);
Matrix4.multiply(
context.uniformState.view3D,
clippingPlanesOriginMatrix,
- scratchClippingPlanesMatrix,
+ scratchClippingPlanesMatrix
);
const transform = Matrix4.multiply(
scratchClippingPlanesMatrix,
clippingPlanes.modelMatrix,
- scratchClippingPlanesMatrix,
+ scratchClippingPlanesMatrix
);
return Matrix4.inverseTranspose(
transform,
- scratchInverseTransposeClippingPlanesMatrix,
+ scratchInverseTransposeClippingPlanesMatrix
);
},
};
@@ -710,7 +708,7 @@ function createUniformMap(pointCloud, frameState) {
if (defined(pointCloud._quantizedVolumeScale)) {
const scale = Cartesian3.clone(
pointCloud._quantizedVolumeScale,
- scratch,
+ scratch
);
Cartesian3.divideByScalar(scale, pointCloud._quantizedRange, scratch);
}
@@ -804,8 +802,9 @@ function createShaders(pointCloud, frameState, style) {
for (name in styleableShaderAttributes) {
if (styleableShaderAttributes.hasOwnProperty(name)) {
attribute = styleableShaderAttributes[name];
- variableSubstitutionMap[name] =
- `czm_3dtiles_property_${attribute.location}`;
+ variableSubstitutionMap[
+ name
+ ] = `czm_3dtiles_property_${attribute.location}`;
propertyIdToAttributeMap[attribute.location] = attribute;
}
}
@@ -824,17 +823,17 @@ function createShaders(pointCloud, frameState, style) {
colorStyleFunction = style.getColorShaderFunction(
`getColorFromStyle${parameterList}`,
variableSubstitutionMap,
- shaderState,
+ shaderState
);
showStyleFunction = style.getShowShaderFunction(
`getShowFromStyle${parameterList}`,
variableSubstitutionMap,
- shaderState,
+ shaderState
);
pointSizeStyleFunction = style.getPointSizeShaderFunction(
`getPointSizeFromStyle${parameterList}`,
variableSubstitutionMap,
- shaderState,
+ shaderState
);
if (defined(colorStyleFunction) && shaderState.translucent) {
styleTranslucent = true;
@@ -870,7 +869,7 @@ function createShaders(pointCloud, frameState, style) {
if (usesNormalSemantic && !hasNormals) {
throw new RuntimeError(
- "Style references the NORMAL semantic but the point cloud does not have normals",
+ "Style references the NORMAL semantic but the point cloud does not have normals"
);
}
@@ -881,7 +880,7 @@ function createShaders(pointCloud, frameState, style) {
const enabled = styleablePropertyIds.indexOf(attribute.location) >= 0;
const vertexAttribute = getVertexAttribute(
vertexArray,
- attribute.location,
+ attribute.location
);
vertexAttribute.enabled = enabled;
}
@@ -900,7 +899,7 @@ function createShaders(pointCloud, frameState, style) {
// Disable the normal vertex attribute if normals are not used
const normalVertexAttribute = getVertexAttribute(
vertexArray,
- normalLocation,
+ normalLocation
);
normalVertexAttribute.enabled = usesNormals;
}
@@ -1111,7 +1110,7 @@ function createShaders(pointCloud, frameState, style) {
if (hasClippedContent) {
fs +=
- "uniform highp sampler2D u_clippingPlanes; \n" +
+ "uniform highp sampler2D u_clippingPlanes; \nff" +
"uniform mat4 u_clippingPlanesMatrix; \n" +
"uniform vec4 u_clippingPlanesEdgeStyle; \n";
fs += "\n";
@@ -1128,7 +1127,7 @@ function createShaders(pointCloud, frameState, style) {
fs += getClipAndStyleCode(
"u_clippingPlanes",
"u_clippingPlanesMatrix",
- "u_clippingPlanesEdgeStyle",
+ "u_clippingPlanesEdgeStyle"
);
}
@@ -1164,7 +1163,7 @@ function createShaders(pointCloud, frameState, style) {
} catch (error) {
// Rephrase the error.
throw new RuntimeError(
- "Error generating style shader: this may be caused by a type mismatch, index out-of-bounds, or other syntax error.",
+ "Error generating style shader: this may be caused by a type mismatch, index out-of-bounds, or other syntax error."
);
}
}
@@ -1208,10 +1207,10 @@ function decodeDraco(pointCloud, context) {
pointCloud._quantizedVolumeScale = Cartesian3.fromElements(
range,
range,
- range,
+ range
);
pointCloud._quantizedVolumeOffset = Cartesian3.unpack(
- quantization.minValues,
+ quantization.minValues
);
pointCloud._quantizedRange =
(1 << quantization.quantizationBits) - 1.0;
@@ -1318,7 +1317,7 @@ PointCloud.prototype.update = function (frameState) {
Matrix4.multiplyByTranslation(
modelMatrix,
this._quantizedVolumeOffset,
- modelMatrix,
+ modelMatrix
);
}
@@ -1327,7 +1326,7 @@ PointCloud.prototype.update = function (frameState) {
const translation = Matrix4.getColumn(
modelMatrix,
3,
- scratchComputedTranslation,
+ scratchComputedTranslation
);
if (!Cartesian4.equals(translation, Cartesian4.UNIT_W)) {
Transforms.basisTo2D(projection, modelMatrix, modelMatrix);
diff --git a/packages/engine/Source/Scene/PointCloudEyeDomeLighting.js b/packages/engine/Source/Scene/PointCloudEyeDomeLighting.js
index 0b51dca79435..a4ef56deca6f 100644
--- a/packages/engine/Source/Scene/PointCloudEyeDomeLighting.js
+++ b/packages/engine/Source/Scene/PointCloudEyeDomeLighting.js
@@ -129,13 +129,13 @@ function getECShaderProgram(context, shaderProgram) {
fs.sources.splice(
0,
0,
- `layout (location = 0) out vec4 out_FragData_0;\nlayout (location = 1) out vec4 out_FragData_1;`,
+ `layout (location = 0) out vec4 out_FragData_0;\nlayout (location = 1) out vec4 out_FragData_1;`
);
fs.sources = fs.sources.map(function (source) {
source = ShaderSource.replaceMain(
source,
- "czm_point_cloud_post_process_main",
+ "czm_point_cloud_post_process_main"
);
source = source.replaceAll(/out_FragColor/g, "out_FragData_0");
return source;
@@ -151,7 +151,7 @@ function getECShaderProgram(context, shaderProgram) {
"#else\n" +
" out_FragData_1 = czm_packDepth(gl_FragCoord.z);\n" +
"#endif\n" +
- "}",
+ "}"
);
shader = context.shaderCache.createDerivedShaderProgram(
@@ -161,7 +161,7 @@ function getECShaderProgram(context, shaderProgram) {
vertexShaderSource: shaderProgram.vertexShaderSource,
fragmentShaderSource: fs,
attributeLocations: attributeLocations,
- },
+ }
);
}
@@ -172,7 +172,7 @@ PointCloudEyeDomeLighting.prototype.update = function (
frameState,
commandStart,
pointCloudShading,
- boundingVolume,
+ boundingVolume
) {
if (!isSupported(frameState.context)) {
return;
@@ -219,7 +219,7 @@ PointCloudEyeDomeLighting.prototype.update = function (
derivedCommand.framebuffer = this.framebuffer;
derivedCommand.shaderProgram = getECShaderProgram(
frameState.context,
- command.shaderProgram,
+ command.shaderProgram
);
derivedCommand.castShadows = false;
derivedCommand.receiveShadows = false;
diff --git a/packages/engine/Source/Scene/PointCloudShading.js b/packages/engine/Source/Scene/PointCloudShading.js
index 23a85575ee65..2a46b8fc75c0 100644
--- a/packages/engine/Source/Scene/PointCloudShading.js
+++ b/packages/engine/Source/Scene/PointCloudShading.js
@@ -36,7 +36,7 @@ function PointCloudShading(options) {
*/
this.geometricErrorScale = defaultValue(
pointCloudShading.geometricErrorScale,
- 1.0,
+ 1.0
);
/**
@@ -70,7 +70,7 @@ function PointCloudShading(options) {
*/
this.eyeDomeLightingStrength = defaultValue(
pointCloudShading.eyeDomeLightingStrength,
- 1.0,
+ 1.0
);
/**
@@ -80,7 +80,7 @@ function PointCloudShading(options) {
*/
this.eyeDomeLightingRadius = defaultValue(
pointCloudShading.eyeDomeLightingRadius,
- 1.0,
+ 1.0
);
/**
diff --git a/packages/engine/Source/Scene/PointPrimitive.js b/packages/engine/Source/Scene/PointPrimitive.js
index db93554292cc..dfa57c8ed830 100644
--- a/packages/engine/Source/Scene/PointPrimitive.js
+++ b/packages/engine/Source/Scene/PointPrimitive.js
@@ -50,7 +50,7 @@ function PointPrimitive(options, pointPrimitiveCollection) {
options.disableDepthTestDistance < 0.0
) {
throw new DeveloperError(
- "disableDepthTestDistance must be greater than or equal to 0.0.",
+ "disableDepthTestDistance must be greater than or equal to 0.0."
);
}
//>>includeEnd('debug');
@@ -62,7 +62,7 @@ function PointPrimitive(options, pointPrimitiveCollection) {
//>>includeStart('debug', pragmas.debug);
if (translucencyByDistance.far <= translucencyByDistance.near) {
throw new DeveloperError(
- "translucencyByDistance.far must be greater than translucencyByDistance.near.",
+ "translucencyByDistance.far must be greater than translucencyByDistance.near."
);
}
//>>includeEnd('debug');
@@ -72,7 +72,7 @@ function PointPrimitive(options, pointPrimitiveCollection) {
//>>includeStart('debug', pragmas.debug);
if (scaleByDistance.far <= scaleByDistance.near) {
throw new DeveloperError(
- "scaleByDistance.far must be greater than scaleByDistance.near.",
+ "scaleByDistance.far must be greater than scaleByDistance.near."
);
}
//>>includeEnd('debug');
@@ -82,23 +82,23 @@ function PointPrimitive(options, pointPrimitiveCollection) {
//>>includeStart('debug', pragmas.debug);
if (distanceDisplayCondition.far <= distanceDisplayCondition.near) {
throw new DeveloperError(
- "distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.",
+ "distanceDisplayCondition.far must be greater than distanceDisplayCondition.near."
);
}
//>>includeEnd('debug');
distanceDisplayCondition = DistanceDisplayCondition.clone(
- distanceDisplayCondition,
+ distanceDisplayCondition
);
}
this._show = defaultValue(options.show, true);
this._position = Cartesian3.clone(
- defaultValue(options.position, Cartesian3.ZERO),
+ defaultValue(options.position, Cartesian3.ZERO)
);
this._actualPosition = Cartesian3.clone(this._position); // For columbus view and 2D
this._color = Color.clone(defaultValue(options.color, Color.WHITE));
this._outlineColor = Color.clone(
- defaultValue(options.outlineColor, Color.TRANSPARENT),
+ defaultValue(options.outlineColor, Color.TRANSPARENT)
);
this._outlineWidth = defaultValue(options.outlineWidth, 0.0);
this._pixelSize = defaultValue(options.pixelSize, 10.0);
@@ -107,7 +107,7 @@ function PointPrimitive(options, pointPrimitiveCollection) {
this._distanceDisplayCondition = distanceDisplayCondition;
this._disableDepthTestDistance = defaultValue(
options.disableDepthTestDistance,
- 0.0,
+ 0.0
);
this._id = options.id;
this._collection = defaultValue(options.collection, pointPrimitiveCollection);
@@ -121,7 +121,7 @@ function PointPrimitive(options, pointPrimitiveCollection) {
this._splitDirection = defaultValue(
options.splitDirection,
- SplitDirection.NONE,
+ SplitDirection.NONE
);
}
@@ -132,12 +132,9 @@ const OUTLINE_COLOR_INDEX = (PointPrimitive.OUTLINE_COLOR_INDEX = 3);
const OUTLINE_WIDTH_INDEX = (PointPrimitive.OUTLINE_WIDTH_INDEX = 4);
const PIXEL_SIZE_INDEX = (PointPrimitive.PIXEL_SIZE_INDEX = 5);
const SCALE_BY_DISTANCE_INDEX = (PointPrimitive.SCALE_BY_DISTANCE_INDEX = 6);
-const TRANSLUCENCY_BY_DISTANCE_INDEX =
- (PointPrimitive.TRANSLUCENCY_BY_DISTANCE_INDEX = 7);
-const DISTANCE_DISPLAY_CONDITION_INDEX =
- (PointPrimitive.DISTANCE_DISPLAY_CONDITION_INDEX = 8);
-const DISABLE_DEPTH_DISTANCE_INDEX =
- (PointPrimitive.DISABLE_DEPTH_DISTANCE_INDEX = 9);
+const TRANSLUCENCY_BY_DISTANCE_INDEX = (PointPrimitive.TRANSLUCENCY_BY_DISTANCE_INDEX = 7);
+const DISTANCE_DISPLAY_CONDITION_INDEX = (PointPrimitive.DISTANCE_DISPLAY_CONDITION_INDEX = 8);
+const DISABLE_DEPTH_DISTANCE_INDEX = (PointPrimitive.DISABLE_DEPTH_DISTANCE_INDEX = 9);
const SPLIT_DIRECTION_INDEX = (PointPrimitive.SPLIT_DIRECTION_INDEX = 10);
PointPrimitive.NUMBER_OF_PROPERTIES = 11;
@@ -146,7 +143,7 @@ function makeDirty(pointPrimitive, propertyChanged) {
if (defined(pointPrimitiveCollection)) {
pointPrimitiveCollection._updatePointPrimitive(
pointPrimitive,
- propertyChanged,
+ propertyChanged
);
pointPrimitive._dirty = true;
}
@@ -234,7 +231,7 @@ Object.defineProperties(PointPrimitive.prototype, {
//>>includeStart('debug', pragmas.debug);
if (defined(value) && value.far <= value.near) {
throw new DeveloperError(
- "far distance must be greater than near distance.",
+ "far distance must be greater than near distance."
);
}
//>>includeEnd('debug');
@@ -277,7 +274,7 @@ Object.defineProperties(PointPrimitive.prototype, {
//>>includeStart('debug', pragmas.debug);
if (defined(value) && value.far <= value.near) {
throw new DeveloperError(
- "far distance must be greater than near distance.",
+ "far distance must be greater than near distance."
);
}
//>>includeEnd('debug');
@@ -286,7 +283,7 @@ Object.defineProperties(PointPrimitive.prototype, {
if (!NearFarScalar.equals(translucencyByDistance, value)) {
this._translucencyByDistance = NearFarScalar.clone(
value,
- translucencyByDistance,
+ translucencyByDistance
);
makeDirty(this, TRANSLUCENCY_BY_DISTANCE_INDEX);
}
@@ -420,7 +417,7 @@ Object.defineProperties(PointPrimitive.prototype, {
) {
this._distanceDisplayCondition = DistanceDisplayCondition.clone(
value,
- this._distanceDisplayCondition,
+ this._distanceDisplayCondition
);
makeDirty(this, DISTANCE_DISPLAY_CONDITION_INDEX);
}
@@ -443,7 +440,7 @@ Object.defineProperties(PointPrimitive.prototype, {
//>>includeStart('debug', pragmas.debug);
if (!defined(value) || value < 0.0) {
throw new DeveloperError(
- "disableDepthTestDistance must be greater than or equal to 0.0.",
+ "disableDepthTestDistance must be greater than or equal to 0.0."
);
}
//>>includeEnd('debug');
@@ -541,7 +538,7 @@ const tempCartesian3 = new Cartesian4();
PointPrimitive._computeActualPosition = function (
position,
frameState,
- modelMatrix,
+ modelMatrix
) {
if (frameState.mode === SceneMode.SCENE3D) {
return position;
@@ -550,7 +547,7 @@ PointPrimitive._computeActualPosition = function (
Matrix4.multiplyByPoint(modelMatrix, position, tempCartesian3);
return SceneTransforms.computeActualEllipsoidPosition(
frameState,
- tempCartesian3,
+ tempCartesian3
);
};
@@ -561,7 +558,7 @@ PointPrimitive._computeScreenSpacePosition = function (
modelMatrix,
position,
scene,
- result,
+ result
) {
// Model to world coordinates
const positionWorld = Matrix4.multiplyByVector(
@@ -571,14 +568,14 @@ PointPrimitive._computeScreenSpacePosition = function (
position.y,
position.z,
1,
- scratchCartesian4,
+ scratchCartesian4
),
- scratchCartesian4,
+ scratchCartesian4
);
const positionWC = SceneTransforms.worldToWindowCoordinates(
scene,
positionWorld,
- result,
+ result
);
return positionWC;
};
@@ -617,7 +614,7 @@ PointPrimitive.prototype.computeScreenSpacePosition = function (scene, result) {
modelMatrix,
this._actualPosition,
scene,
- result,
+ result
);
if (!defined(windowCoordinates)) {
return undefined;
@@ -639,7 +636,7 @@ PointPrimitive.prototype.computeScreenSpacePosition = function (scene, result) {
PointPrimitive.getScreenSpaceBoundingBox = function (
point,
screenSpacePosition,
- result,
+ result
) {
const size = point.pixelSize;
const halfSize = size * 0.5;
@@ -682,11 +679,11 @@ PointPrimitive.prototype.equals = function (other) {
NearFarScalar.equals(this._scaleByDistance, other._scaleByDistance) &&
NearFarScalar.equals(
this._translucencyByDistance,
- other._translucencyByDistance,
+ other._translucencyByDistance
) &&
DistanceDisplayCondition.equals(
this._distanceDisplayCondition,
- other._distanceDisplayCondition,
+ other._distanceDisplayCondition
) &&
this._disableDepthTestDistance === other._disableDepthTestDistance &&
this._splitDirection === other._splitDirection)
diff --git a/packages/engine/Source/Scene/PointPrimitiveCollection.js b/packages/engine/Source/Scene/PointPrimitiveCollection.js
index c49029fcc16a..20ab1c5d6e1d 100644
--- a/packages/engine/Source/Scene/PointPrimitiveCollection.js
+++ b/packages/engine/Source/Scene/PointPrimitiveCollection.js
@@ -170,7 +170,7 @@ function PointPrimitiveCollection(options) {
* @see Transforms.eastNorthUpToFixedFrame
*/
this.modelMatrix = Matrix4.clone(
- defaultValue(options.modelMatrix, Matrix4.IDENTITY),
+ defaultValue(options.modelMatrix, Matrix4.IDENTITY)
);
this._modelMatrix = Matrix4.clone(Matrix4.IDENTITY);
@@ -186,7 +186,7 @@ function PointPrimitiveCollection(options) {
*/
this.debugShowBoundingVolume = defaultValue(
options.debugShowBoundingVolume,
- false,
+ false
);
/**
@@ -199,7 +199,7 @@ function PointPrimitiveCollection(options) {
*/
this.blendOption = defaultValue(
options.blendOption,
- BlendOption.OPAQUE_AND_TRANSLUCENT,
+ BlendOption.OPAQUE_AND_TRANSLUCENT
);
this._blendOption = undefined;
@@ -380,11 +380,12 @@ function removePointPrimitives(pointPrimitiveCollection) {
PointPrimitiveCollection.prototype._updatePointPrimitive = function (
pointPrimitive,
- propertyChanged,
+ propertyChanged
) {
if (!pointPrimitive._dirty) {
- this._pointPrimitivesToUpdate[this._pointPrimitivesToUpdateIndex++] =
- pointPrimitive;
+ this._pointPrimitivesToUpdate[
+ this._pointPrimitivesToUpdateIndex++
+ ] = pointPrimitive;
}
++this._propertiesChanged[propertyChanged];
@@ -499,7 +500,7 @@ function createVAF(context, numberOfPointPrimitives, buffersUsage) {
usage: buffersUsage[DISTANCE_DISPLAY_CONDITION_INDEX],
},
],
- numberOfPointPrimitives,
+ numberOfPointPrimitives
); // 1 vertex per pointPrimitive
}
@@ -514,7 +515,7 @@ function writePositionSizeAndOutline(
pointPrimitiveCollection,
context,
vafWriters,
- pointPrimitive,
+ pointPrimitive
) {
const i = pointPrimitive._index;
const position = pointPrimitive._getActualPosition();
@@ -523,7 +524,7 @@ function writePositionSizeAndOutline(
BoundingSphere.expand(
pointPrimitiveCollection._baseVolume,
position,
- pointPrimitiveCollection._baseVolume,
+ pointPrimitiveCollection._baseVolume
);
pointPrimitiveCollection._boundingVolumeDirty = true;
}
@@ -534,7 +535,7 @@ function writePositionSizeAndOutline(
pointPrimitiveCollection._maxPixelSize = Math.max(
pointPrimitiveCollection._maxPixelSize,
- pixelSize + outlineWidth,
+ pixelSize + outlineWidth
);
const positionHighWriter = vafWriters[attributeLocations.positionHighAndSize];
@@ -554,7 +555,7 @@ function writeCompressedAttrib0(
pointPrimitiveCollection,
context,
vafWriters,
- pointPrimitive,
+ pointPrimitive
) {
const i = pointPrimitive._index;
@@ -590,7 +591,7 @@ function writeCompressedAttrib1(
pointPrimitiveCollection,
context,
vafWriters,
- pointPrimitive,
+ pointPrimitive
) {
const i = pointPrimitive._index;
@@ -640,7 +641,7 @@ function writeScaleByDistance(
pointPrimitiveCollection,
context,
vafWriters,
- pointPrimitive,
+ pointPrimitive
) {
const i = pointPrimitive._index;
const writer = vafWriters[attributeLocations.scaleByDistance];
@@ -670,7 +671,7 @@ function writeDistanceDisplayConditionAndDepthDisableAndSplitDirection(
pointPrimitiveCollection,
context,
vafWriters,
- pointPrimitive,
+ pointPrimitive
) {
const i = pointPrimitive._index;
const writer =
@@ -713,37 +714,37 @@ function writePointPrimitive(
pointPrimitiveCollection,
context,
vafWriters,
- pointPrimitive,
+ pointPrimitive
) {
writePositionSizeAndOutline(
pointPrimitiveCollection,
context,
vafWriters,
- pointPrimitive,
+ pointPrimitive
);
writeCompressedAttrib0(
pointPrimitiveCollection,
context,
vafWriters,
- pointPrimitive,
+ pointPrimitive
);
writeCompressedAttrib1(
pointPrimitiveCollection,
context,
vafWriters,
- pointPrimitive,
+ pointPrimitive
);
writeScaleByDistance(
pointPrimitiveCollection,
context,
vafWriters,
- pointPrimitive,
+ pointPrimitive
);
writeDistanceDisplayConditionAndDepthDisableAndSplitDirection(
pointPrimitiveCollection,
context,
vafWriters,
- pointPrimitive,
+ pointPrimitive
);
}
@@ -753,7 +754,7 @@ function recomputeActualPositions(
length,
frameState,
modelMatrix,
- recomputeBoundingVolume,
+ recomputeBoundingVolume
) {
let boundingVolume;
if (frameState.mode === SceneMode.SCENE3D) {
@@ -770,7 +771,7 @@ function recomputeActualPositions(
const actualPosition = PointPrimitive._computeActualPosition(
position,
frameState,
- modelMatrix,
+ modelMatrix
);
if (defined(actualPosition)) {
pointPrimitive._setActualPosition(actualPosition);
@@ -817,7 +818,7 @@ function updateMode(pointPrimitiveCollection, frameState) {
pointPrimitives.length,
frameState,
modelMatrix,
- true,
+ true
);
}
} else if (mode === SceneMode.MORPHING) {
@@ -827,7 +828,7 @@ function updateMode(pointPrimitiveCollection, frameState) {
pointPrimitives.length,
frameState,
modelMatrix,
- true,
+ true
);
} else if (mode === SceneMode.SCENE2D || mode === SceneMode.COLUMBUS_VIEW) {
recomputeActualPositions(
@@ -836,7 +837,7 @@ function updateMode(pointPrimitiveCollection, frameState) {
pointPrimitiveCollection._pointPrimitivesToUpdateIndex,
frameState,
modelMatrix,
- false,
+ false
);
}
}
@@ -845,7 +846,7 @@ function updateBoundingVolume(collection, frameState, boundingVolume) {
const pixelSize = frameState.camera.getPixelSize(
boundingVolume,
frameState.context.drawingBufferWidth,
- frameState.context.drawingBufferHeight,
+ frameState.context.drawingBufferHeight
);
const size = pixelSize * collection._maxPixelSize;
boundingVolume.radius += size;
@@ -938,7 +939,7 @@ PointPrimitiveCollection.prototype.update = function (frameState) {
properties[SPLIT_DIRECTION_INDEX]
) {
writers.push(
- writeDistanceDisplayConditionAndDepthDisableAndSplitDirection,
+ writeDistanceDisplayConditionAndDepthDisableAndSplitDirection
);
}
@@ -992,7 +993,7 @@ PointPrimitiveCollection.prototype.update = function (frameState) {
BoundingSphere.transform(
this._baseVolume,
this.modelMatrix,
- this._baseVolumeWC,
+ this._baseVolumeWC
);
}
@@ -1002,12 +1003,12 @@ PointPrimitiveCollection.prototype.update = function (frameState) {
modelMatrix = this.modelMatrix;
boundingVolume = BoundingSphere.clone(
this._baseVolumeWC,
- this._boundingVolume,
+ this._boundingVolume
);
} else {
boundingVolume = BoundingSphere.clone(
this._baseVolume2D,
- this._boundingVolume,
+ this._boundingVolume
);
}
updateBoundingVolume(this, frameState, boundingVolume);
@@ -1133,10 +1134,8 @@ PointPrimitiveCollection.prototype.update = function (frameState) {
}
this._compiledShaderScaleByDistance = this._shaderScaleByDistance;
- this._compiledShaderTranslucencyByDistance =
- this._shaderTranslucencyByDistance;
- this._compiledShaderDistanceDisplayCondition =
- this._shaderDistanceDisplayCondition;
+ this._compiledShaderTranslucencyByDistance = this._shaderTranslucencyByDistance;
+ this._compiledShaderDistanceDisplayCondition = this._shaderDistanceDisplayCondition;
this._compiledShaderDisableDepthDistance = this._shaderDisableDepthDistance;
}
diff --git a/packages/engine/Source/Scene/Polyline.js b/packages/engine/Source/Scene/Polyline.js
index 3a070db7fc0d..b8eda50752e0 100644
--- a/packages/engine/Source/Scene/Polyline.js
+++ b/packages/engine/Source/Scene/Polyline.js
@@ -57,7 +57,7 @@ function Polyline(options, polylineCollection) {
this._positions = positions;
this._actualPositions = arrayRemoveDuplicates(
positions,
- Cartesian3.equalsEpsilon,
+ Cartesian3.equalsEpsilon
);
if (this._loop && this._actualPositions.length > 2) {
@@ -78,7 +78,7 @@ function Polyline(options, polylineCollection) {
this._modelMatrix = modelMatrix;
this._segments = PolylinePipeline.wrapLongitude(
this._actualPositions,
- modelMatrix,
+ modelMatrix
);
this._actualLength = undefined;
@@ -91,7 +91,7 @@ function Polyline(options, polylineCollection) {
this._boundingVolume = BoundingSphere.fromPoints(this._actualPositions);
this._boundingVolumeWC = BoundingSphere.transform(
this._boundingVolume,
- this._modelMatrix,
+ this._modelMatrix
);
this._boundingVolume2D = new BoundingSphere(); // modified in PolylineCollection
}
@@ -181,12 +181,12 @@ Object.defineProperties(Polyline.prototype, {
this._length = positions.length;
this._boundingVolume = BoundingSphere.fromPoints(
this._actualPositions,
- this._boundingVolume,
+ this._boundingVolume
);
this._boundingVolumeWC = BoundingSphere.transform(
this._boundingVolume,
this._modelMatrix,
- this._boundingVolumeWC,
+ this._boundingVolumeWC
);
makeDirty(this, POSITION_INDEX);
@@ -340,7 +340,7 @@ Object.defineProperties(Polyline.prototype, {
//>>includeStart('debug', pragmas.debug);
if (defined(value) && value.far <= value.near) {
throw new DeveloperError(
- "far distance must be greater than near distance.",
+ "far distance must be greater than near distance."
);
}
//>>includeEnd('debug');
@@ -349,7 +349,7 @@ Object.defineProperties(Polyline.prototype, {
) {
this._distanceDisplayCondition = DistanceDisplayCondition.clone(
value,
- this._distanceDisplayCondition,
+ this._distanceDisplayCondition
);
makeDirty(this, DISTANCE_DISPLAY_CONDITION);
}
@@ -375,12 +375,12 @@ Polyline.prototype.update = function () {
if (!Matrix4.equals(modelMatrix, this._modelMatrix) || positionsChanged) {
this._segments = PolylinePipeline.wrapLongitude(
this._actualPositions,
- modelMatrix,
+ modelMatrix
);
this._boundingVolumeWC = BoundingSphere.transform(
this._boundingVolume,
modelMatrix,
- this._boundingVolumeWC,
+ this._boundingVolumeWC
);
}
diff --git a/packages/engine/Source/Scene/PolylineCollection.js b/packages/engine/Source/Scene/PolylineCollection.js
index 5805ac5a9f02..81973318e16e 100644
--- a/packages/engine/Source/Scene/PolylineCollection.js
+++ b/packages/engine/Source/Scene/PolylineCollection.js
@@ -135,7 +135,7 @@ function PolylineCollection(options) {
* @default {@link Matrix4.IDENTITY}
*/
this.modelMatrix = Matrix4.clone(
- defaultValue(options.modelMatrix, Matrix4.IDENTITY),
+ defaultValue(options.modelMatrix, Matrix4.IDENTITY)
);
this._modelMatrix = Matrix4.clone(Matrix4.IDENTITY);
@@ -151,7 +151,7 @@ function PolylineCollection(options) {
*/
this.debugShowBoundingVolume = defaultValue(
options.debugShowBoundingVolume,
- false,
+ false
);
this._opaqueRS = undefined;
@@ -402,7 +402,7 @@ function createBatchTable(collection, context) {
collection._batchTable = new BatchTable(
context,
attributes,
- collection._polylines.length,
+ collection._polylines.length
);
}
@@ -437,7 +437,7 @@ PolylineCollection.prototype.update = function (frameState) {
if (this._createBatchTable) {
if (ContextLimits.maximumVertexTextureImageUnits === 0) {
throw new RuntimeError(
- "Vertex texture fetch support is required to render polylines. The maximum number of vertex texture image units must be greater than zero.",
+ "Vertex texture fetch support is required to render polylines. The maximum number of vertex texture image units must be greater than zero."
);
}
createBatchTable(this, context);
@@ -477,7 +477,7 @@ PolylineCollection.prototype.update = function (frameState) {
index,
polyline,
this._positionBuffer,
- projection,
+ projection
);
}
break;
@@ -490,7 +490,7 @@ PolylineCollection.prototype.update = function (frameState) {
this._batchTable.setBatchedAttribute(
polyline._index,
0,
- new Cartesian2(polyline._width, polyline._show),
+ new Cartesian2(polyline._width, polyline._show)
);
}
@@ -502,19 +502,19 @@ PolylineCollection.prototype.update = function (frameState) {
: polyline._boundingVolumeWC;
const encodedCenter = EncodedCartesian3.fromCartesian(
boundingSphere.center,
- scratchUpdatePolylineEncodedCartesian,
+ scratchUpdatePolylineEncodedCartesian
);
const low = Cartesian4.fromElements(
encodedCenter.low.x,
encodedCenter.low.y,
encodedCenter.low.z,
boundingSphere.radius,
- scratchUpdatePolylineCartesian4,
+ scratchUpdatePolylineCartesian4
);
this._batchTable.setBatchedAttribute(
polyline._index,
2,
- encodedCenter.high,
+ encodedCenter.high
);
this._batchTable.setBatchedAttribute(polyline._index, 3, low);
}
@@ -533,7 +533,7 @@ PolylineCollection.prototype.update = function (frameState) {
this._batchTable.setBatchedAttribute(
polyline._index,
4,
- nearFarCartesian,
+ nearFarCartesian
);
}
}
@@ -598,7 +598,7 @@ function createCommandLists(
polylineCollection,
frameState,
commands,
- modelMatrix,
+ modelMatrix
) {
const context = frameState.context;
const commandList = frameState.commandList;
@@ -653,12 +653,12 @@ function createCommandLists(
uniformMap = combine(
uniformCallback(currentMaterial._uniforms),
- polylineCollection._uniformMap,
+ polylineCollection._uniformMap
);
command.boundingVolume = BoundingSphere.clone(
boundingSphereScratch,
- command.boundingVolume,
+ command.boundingVolume
);
command.modelMatrix = modelMatrix;
command.shaderProgram = sp;
@@ -704,7 +704,7 @@ function createCommandLists(
if (defined(polyline._boundingVolume2D)) {
boundingVolume = BoundingSphere.clone(
polyline._boundingVolume2D,
- boundingSphereScratch2,
+ boundingSphereScratch2
);
boundingVolume.center.x = 0.0;
}
@@ -715,7 +715,7 @@ function createCommandLists(
boundingVolume = BoundingSphere.union(
polyline._boundingVolumeWC,
polyline._boundingVolume2D,
- boundingSphereScratch2,
+ boundingSphereScratch2
);
}
@@ -726,7 +726,7 @@ function createCommandLists(
BoundingSphere.union(
boundingVolume,
boundingSphereScratch,
- boundingSphereScratch,
+ boundingSphereScratch
);
}
}
@@ -745,12 +745,12 @@ function createCommandLists(
uniformMap = combine(
uniformCallback(currentMaterial._uniforms),
- polylineCollection._uniformMap,
+ polylineCollection._uniformMap
);
command.boundingVolume = BoundingSphere.clone(
boundingSphereScratch,
- command.boundingVolume,
+ command.boundingVolume
);
command.modelMatrix = modelMatrix;
command.shaderProgram = sp;
@@ -897,7 +897,7 @@ function createVertexArrays(collection, context, projection) {
texCoordExpandAndBatchIndexIndex,
batchTable,
context,
- projection,
+ projection
);
if (mode === SceneMode.MORPHING) {
@@ -915,7 +915,7 @@ function createVertexArrays(collection, context, projection) {
totalIndices,
vertexBufferOffset,
vertexArrayBuckets,
- offset,
+ offset
);
}
}
@@ -1168,7 +1168,7 @@ function sortPolylinesIntoBuckets(collection) {
value = polylineBuckets[material.type] = new PolylineBucket(
material,
mode,
- modelMatrix,
+ modelMatrix
);
}
value.addPolyline(p);
@@ -1236,7 +1236,7 @@ function destroyVertexArrays(collection) {
PolylineCollection.prototype._updatePolyline = function (
polyline,
- propertyChanged,
+ propertyChanged
) {
this._polylinesUpdated = true;
if (!polyline._dirty) {
@@ -1281,7 +1281,7 @@ PolylineBucket.prototype.addPolyline = function (p) {
PolylineBucket.prototype.updateShader = function (
context,
batchTable,
- useHighlightColor,
+ useHighlightColor
) {
if (defined(this.shaderProgram)) {
return;
@@ -1362,7 +1362,7 @@ PolylineBucket.prototype.write = function (
texCoordExpandAndBatchIndexIndex,
batchTable,
context,
- projection,
+ projection
) {
const mode = this.mode;
const maxLon = projection.ellipsoid.maximumRadius * CesiumMath.PI;
@@ -1409,7 +1409,7 @@ PolylineBucket.prototype.write = function (
Cartesian3.subtract(
positions[positionsLength - 1],
positions[positionsLength - 2],
- position,
+ position
);
Cartesian3.add(positions[positionsLength - 1], position, position);
}
@@ -1464,17 +1464,17 @@ PolylineBucket.prototype.write = function (
EncodedCartesian3.writeElements(
scratchWritePosition,
positionArray,
- positionIndex,
+ positionIndex
);
EncodedCartesian3.writeElements(
scratchWritePrevPosition,
positionArray,
- positionIndex + 6,
+ positionIndex + 6
);
EncodedCartesian3.writeElements(
scratchWriteNextPosition,
positionArray,
- positionIndex + 12,
+ positionIndex + 12
);
const direction = k - 2 < 0 ? -1.0 : 1.0;
@@ -1482,10 +1482,12 @@ PolylineBucket.prototype.write = function (
j / (positionsLength - 1); // s tex coord
texCoordExpandAndBatchIndexArray[texCoordExpandAndBatchIndexIndex + 1] =
2 * (k % 2) - 1; // expand direction
- texCoordExpandAndBatchIndexArray[texCoordExpandAndBatchIndexIndex + 2] =
- direction;
- texCoordExpandAndBatchIndexArray[texCoordExpandAndBatchIndexIndex + 3] =
- polylineBatchIndex;
+ texCoordExpandAndBatchIndexArray[
+ texCoordExpandAndBatchIndexIndex + 2
+ ] = direction;
+ texCoordExpandAndBatchIndexArray[
+ texCoordExpandAndBatchIndexIndex + 3
+ ] = polylineBatchIndex;
positionIndex += 6 * 3;
texCoordExpandAndBatchIndexIndex += 4;
@@ -1508,7 +1510,7 @@ PolylineBucket.prototype.write = function (
: polyline._boundingVolumeWC;
const encodedCenter = EncodedCartesian3.fromCartesian(
boundingSphere.center,
- scratchUpdatePolylineEncodedCartesian,
+ scratchUpdatePolylineEncodedCartesian
);
const high = encodedCenter.high;
const low = Cartesian4.fromElements(
@@ -1516,7 +1518,7 @@ PolylineBucket.prototype.write = function (
encodedCenter.low.y,
encodedCenter.low.z,
boundingSphere.radius,
- scratchUpdatePolylineCartesian4,
+ scratchUpdatePolylineCartesian4
);
const nearFarCartesian = scratchNearFarCartesian2;
@@ -1547,7 +1549,7 @@ const morphVectorScratch = new Cartesian3();
PolylineBucket.prototype.writeForMorph = function (
positionArray,
- positionIndex,
+ positionIndex
) {
const modelMatrix = this.modelMatrix;
const polylines = this.polylines;
@@ -1578,13 +1580,13 @@ PolylineBucket.prototype.writeForMorph = function (
prevPosition = Matrix4.multiplyByPoint(
modelMatrix,
prevPosition,
- morphPrevPositionScratch,
+ morphPrevPositionScratch
);
const position = Matrix4.multiplyByPoint(
modelMatrix,
positions[j],
- morphPositionScratch,
+ morphPositionScratch
);
let nextPosition;
@@ -1596,12 +1598,12 @@ PolylineBucket.prototype.writeForMorph = function (
Cartesian3.subtract(
positions[positionsLength - 1],
positions[positionsLength - 2],
- nextPosition,
+ nextPosition
);
Cartesian3.add(
positions[positionsLength - 1],
nextPosition,
- nextPosition,
+ nextPosition
);
}
} else {
@@ -1611,7 +1613,7 @@ PolylineBucket.prototype.writeForMorph = function (
nextPosition = Matrix4.multiplyByPoint(
modelMatrix,
nextPosition,
- morphNextPositionScratch,
+ morphNextPositionScratch
);
const segmentLength = lengths[segmentIndex];
@@ -1631,12 +1633,12 @@ PolylineBucket.prototype.writeForMorph = function (
EncodedCartesian3.writeElements(
prevPosition,
positionArray,
- positionIndex + 6,
+ positionIndex + 6
);
EncodedCartesian3.writeElements(
nextPosition,
positionArray,
- positionIndex + 12,
+ positionIndex + 12
);
positionIndex += 6 * 3;
@@ -1651,7 +1653,7 @@ PolylineBucket.prototype.updateIndices = function (
totalIndices,
vertexBufferOffset,
vertexArrayBuckets,
- offset,
+ offset
) {
let vaCount = vertexArrayBuckets.length - 1;
let bucketLocator = new VertexArrayBucketLocator(0, offset, this);
@@ -1785,21 +1787,21 @@ PolylineBucket.prototype.getSegments = function (polyline, projection) {
p = Matrix4.multiplyByPoint(modelMatrix, position, p);
newPositions.push(
projection.project(
- ellipsoid.cartesianToCartographic(p, scratchCartographic),
- ),
+ ellipsoid.cartesianToCartographic(p, scratchCartographic)
+ )
);
}
if (newPositions.length > 0) {
polyline._boundingVolume2D = BoundingSphere.fromPoints(
newPositions,
- polyline._boundingVolume2D,
+ polyline._boundingVolume2D
);
const center2D = polyline._boundingVolume2D.center;
polyline._boundingVolume2D.center = new Cartesian3(
center2D.z,
center2D.x,
- center2D.y,
+ center2D.y
);
}
@@ -1814,7 +1816,7 @@ PolylineBucket.prototype.writeUpdate = function (
index,
polyline,
positionBuffer,
- projection,
+ projection
) {
const mode = this.mode;
const maxLon = projection.ellipsoid.maximumRadius * CesiumMath.PI;
@@ -1831,13 +1833,13 @@ PolylineBucket.prototype.writeUpdate = function (
positionArray.length < positionsArrayLength
) {
positionArray = scratchPositionsArray = new Float32Array(
- positionsArrayLength,
+ positionsArrayLength
);
} else if (positionArray.length > positionsArrayLength) {
positionArray = new Float32Array(
positionArray.buffer,
0,
- positionsArrayLength,
+ positionsArrayLength
);
}
@@ -1875,7 +1877,7 @@ PolylineBucket.prototype.writeUpdate = function (
Cartesian3.subtract(
positions[positionsLength - 1],
positions[positionsLength - 2],
- position,
+ position
);
Cartesian3.add(positions[positionsLength - 1], position, position);
}
@@ -1930,17 +1932,17 @@ PolylineBucket.prototype.writeUpdate = function (
EncodedCartesian3.writeElements(
scratchWritePosition,
positionArray,
- positionIndex,
+ positionIndex
);
EncodedCartesian3.writeElements(
scratchWritePrevPosition,
positionArray,
- positionIndex + 6,
+ positionIndex + 6
);
EncodedCartesian3.writeElements(
scratchWriteNextPosition,
positionArray,
- positionIndex + 12,
+ positionIndex + 12
);
positionIndex += 6 * 3;
}
@@ -1948,7 +1950,7 @@ PolylineBucket.prototype.writeUpdate = function (
positionBuffer.copyFromArrayView(
positionArray,
- 6 * 3 * Float32Array.BYTES_PER_ELEMENT * index,
+ 6 * 3 * Float32Array.BYTES_PER_ELEMENT * index
);
}
};
diff --git a/packages/engine/Source/Scene/PolylineColorAppearance.js b/packages/engine/Source/Scene/PolylineColorAppearance.js
index 1bb49df68936..27c577fa1b7c 100644
--- a/packages/engine/Source/Scene/PolylineColorAppearance.js
+++ b/packages/engine/Source/Scene/PolylineColorAppearance.js
@@ -78,16 +78,16 @@ function PolylineColorAppearance(options) {
this._vertexShaderSource = defaultValue(
options.vertexShaderSource,
- defaultVertexShaderSource,
+ defaultVertexShaderSource
);
this._fragmentShaderSource = defaultValue(
options.fragmentShaderSource,
- defaultFragmentShaderSource,
+ defaultFragmentShaderSource
);
this._renderState = Appearance.getDefaultRenderState(
translucent,
closed,
- options.renderState,
+ options.renderState
);
this._closed = closed;
diff --git a/packages/engine/Source/Scene/PolylineMaterialAppearance.js b/packages/engine/Source/Scene/PolylineMaterialAppearance.js
index d47e73d2bb6c..0f048aa81ea2 100644
--- a/packages/engine/Source/Scene/PolylineMaterialAppearance.js
+++ b/packages/engine/Source/Scene/PolylineMaterialAppearance.js
@@ -80,16 +80,16 @@ function PolylineMaterialAppearance(options) {
this._vertexShaderSource = defaultValue(
options.vertexShaderSource,
- defaultVertexShaderSource,
+ defaultVertexShaderSource
);
this._fragmentShaderSource = defaultValue(
options.fragmentShaderSource,
- defaultFragmentShaderSource,
+ defaultFragmentShaderSource
);
this._renderState = Appearance.getDefaultRenderState(
translucent,
closed,
- options.renderState,
+ options.renderState
);
this._closed = closed;
diff --git a/packages/engine/Source/Scene/PostProcessStage.js b/packages/engine/Source/Scene/PostProcessStage.js
index 44012ca77b56..1b93e702417a 100644
--- a/packages/engine/Source/Scene/PostProcessStage.js
+++ b/packages/engine/Source/Scene/PostProcessStage.js
@@ -105,7 +105,7 @@ function PostProcessStage(options) {
Check.typeOf.number.lessThanOrEquals(
"options.textureScale",
textureScale,
- 1.0,
+ 1.0
);
if (!PixelFormat.isColorFormat(pixelFormat)) {
throw new DeveloperError("options.pixelFormat must be a color format.");
@@ -118,12 +118,12 @@ function PostProcessStage(options) {
this._forcePowerOfTwo = defaultValue(options.forcePowerOfTwo, false);
this._sampleMode = defaultValue(
options.sampleMode,
- PostProcessStageSampleMode.NEAREST,
+ PostProcessStageSampleMode.NEAREST
);
this._pixelFormat = pixelFormat;
this._pixelDatatype = defaultValue(
options.pixelDatatype,
- PixelDatatype.UNSIGNED_BYTE,
+ PixelDatatype.UNSIGNED_BYTE
);
this._clearColor = defaultValue(options.clearColor, Color.BLACK);
@@ -509,7 +509,7 @@ function createUniformMap(stage) {
) {
uniformMap[`${name}Dimensions`] = getUniformMapDimensionsFunction(
uniformMap,
- name,
+ name
);
}
}
@@ -673,12 +673,13 @@ function updateUniformTextures(stage, context) {
for (let i = 0; i < dirtyUniforms.length; ++i) {
const name = dirtyUniforms[i];
const stageNameUrlOrImage = uniforms[name];
- const stageWithName =
- stage._textureCache.getStageByName(stageNameUrlOrImage);
+ const stageWithName = stage._textureCache.getStageByName(
+ stageNameUrlOrImage
+ );
if (defined(stageWithName)) {
stage._actualUniforms[name] = createStageOutputTextureFunction(
stage,
- stageNameUrlOrImage,
+ stageNameUrlOrImage
);
} else if (typeof stageNameUrlOrImage === "string") {
const resource = new Resource({
@@ -686,7 +687,7 @@ function updateUniformTextures(stage, context) {
});
promises.push(
- resource.fetchImage().then(createLoadImageFunction(stage, name)),
+ resource.fetchImage().then(createLoadImageFunction(stage, name))
);
} else {
stage._texturesToCreate.push({
@@ -917,7 +918,7 @@ PostProcessStage.prototype.update = function (context, useLogDepth) {
0,
0,
colorTexture.width,
- colorTexture.height,
+ colorTexture.height
),
});
}
@@ -938,7 +939,7 @@ PostProcessStage.prototype.execute = function (
context,
colorTexture,
depthTexture,
- idTexture,
+ idTexture
) {
if (
!defined(this._command) ||
diff --git a/packages/engine/Source/Scene/PostProcessStageCollection.js b/packages/engine/Source/Scene/PostProcessStageCollection.js
index 59ca0e293923..af65a360285d 100644
--- a/packages/engine/Source/Scene/PostProcessStageCollection.js
+++ b/packages/engine/Source/Scene/PostProcessStageCollection.js
@@ -347,32 +347,29 @@ Object.defineProperties(PostProcessStageCollection.prototype, {
switch (value) {
case Tonemapper.REINHARD:
- tonemapping =
- PostProcessStageLibrary.createReinhardTonemappingStage(
- useAutoExposure,
- );
+ tonemapping = PostProcessStageLibrary.createReinhardTonemappingStage(
+ useAutoExposure
+ );
break;
case Tonemapper.MODIFIED_REINHARD:
- tonemapping =
- PostProcessStageLibrary.createModifiedReinhardTonemappingStage(
- useAutoExposure,
- );
+ tonemapping = PostProcessStageLibrary.createModifiedReinhardTonemappingStage(
+ useAutoExposure
+ );
break;
case Tonemapper.FILMIC:
- tonemapping =
- PostProcessStageLibrary.createFilmicTonemappingStage(
- useAutoExposure,
- );
+ tonemapping = PostProcessStageLibrary.createFilmicTonemappingStage(
+ useAutoExposure
+ );
break;
case Tonemapper.PBR_NEUTRAL:
- tonemapping =
- PostProcessStageLibrary.createPbrNeutralTonemappingStage(
- useAutoExposure,
- );
+ tonemapping = PostProcessStageLibrary.createPbrNeutralTonemappingStage(
+ useAutoExposure
+ );
break;
default:
- tonemapping =
- PostProcessStageLibrary.createAcesTonemappingStage(useAutoExposure);
+ tonemapping = PostProcessStageLibrary.createAcesTonemappingStage(
+ useAutoExposure
+ );
break;
}
@@ -459,7 +456,7 @@ PostProcessStageCollection.prototype.add = function (stage) {
//>>includeStart('debug', pragmas.debug);
if (defined(stageNames[currentStage.name])) {
throw new DeveloperError(
- `${currentStage.name} has already been added to the collection or does not have a unique name.`,
+ `${currentStage.name} has already been added to the collection or does not have a unique name.`
);
}
//>>includeEnd('debug');
@@ -584,7 +581,7 @@ PostProcessStageCollection.prototype.getStageByName = function (name) {
PostProcessStageCollection.prototype.update = function (
context,
useLogDepth,
- useHdr,
+ useHdr
) {
removeStages(this);
@@ -757,7 +754,7 @@ function execute(stage, context, colorTexture, depthTexture, idTexture) {
context,
getOutputTexture(stage.get(i - 1)),
depthTexture,
- idTexture,
+ idTexture
);
}
} else {
@@ -781,7 +778,7 @@ PostProcessStageCollection.prototype.execute = function (
context,
colorTexture,
depthTexture,
- idTexture,
+ idTexture
) {
const activeStages = this._activeStages;
const length = activeStages.length;
@@ -835,7 +832,7 @@ PostProcessStageCollection.prototype.execute = function (
context,
getOutputTexture(activeStages[i - 1]),
depthTexture,
- idTexture,
+ idTexture
);
}
lastTexture = getOutputTexture(activeStages[length - 1]);
diff --git a/packages/engine/Source/Scene/PostProcessStageComposite.js b/packages/engine/Source/Scene/PostProcessStageComposite.js
index 6745ac7546d5..bcea9587afa0 100644
--- a/packages/engine/Source/Scene/PostProcessStageComposite.js
+++ b/packages/engine/Source/Scene/PostProcessStageComposite.js
@@ -81,14 +81,14 @@ function PostProcessStageComposite(options) {
Check.typeOf.number.greaterThan(
"options.stages.length",
options.stages.length,
- 0,
+ 0
);
//>>includeEnd('debug');
this._stages = options.stages;
this._inputPreviousStageTexture = defaultValue(
options.inputPreviousStageTexture,
- true,
+ true
);
let name = options.name;
diff --git a/packages/engine/Source/Scene/PostProcessStageLibrary.js b/packages/engine/Source/Scene/PostProcessStageLibrary.js
index f4329daee77f..18aaa1d974b5 100644
--- a/packages/engine/Source/Scene/PostProcessStageLibrary.js
+++ b/packages/engine/Source/Scene/PostProcessStageLibrary.js
@@ -661,7 +661,7 @@ PostProcessStageLibrary.createFXAAStage = function () {
* @private
*/
PostProcessStageLibrary.createAcesTonemappingStage = function (
- useAutoExposure,
+ useAutoExposure
) {
let fs = useAutoExposure ? "#define AUTO_EXPOSURE\n" : "";
fs += AcesTonemapping;
@@ -682,7 +682,7 @@ PostProcessStageLibrary.createAcesTonemappingStage = function (
* @private
*/
PostProcessStageLibrary.createFilmicTonemappingStage = function (
- useAutoExposure,
+ useAutoExposure
) {
let fs = useAutoExposure ? "#define AUTO_EXPOSURE\n" : "";
fs += FilmicTonemapping;
@@ -703,7 +703,7 @@ PostProcessStageLibrary.createFilmicTonemappingStage = function (
* @private
*/
PostProcessStageLibrary.createPbrNeutralTonemappingStage = function (
- useAutoExposure,
+ useAutoExposure
) {
let fs = useAutoExposure ? "#define AUTO_EXPOSURE\n" : "";
fs += PbrNeutralTonemapping;
@@ -724,7 +724,7 @@ PostProcessStageLibrary.createPbrNeutralTonemappingStage = function (
* @private
*/
PostProcessStageLibrary.createReinhardTonemappingStage = function (
- useAutoExposure,
+ useAutoExposure
) {
let fs = useAutoExposure ? "#define AUTO_EXPOSURE\n" : "";
fs += ReinhardTonemapping;
@@ -745,7 +745,7 @@ PostProcessStageLibrary.createReinhardTonemappingStage = function (
* @private
*/
PostProcessStageLibrary.createModifiedReinhardTonemappingStage = function (
- useAutoExposure,
+ useAutoExposure
) {
let fs = useAutoExposure ? "#define AUTO_EXPOSURE\n" : "";
fs += ModifiedReinhardTonemapping;
diff --git a/packages/engine/Source/Scene/PostProcessStageTextureCache.js b/packages/engine/Source/Scene/PostProcessStageTextureCache.js
index 391b7dd3aff6..cdc6e21a3986 100644
--- a/packages/engine/Source/Scene/PostProcessStageTextureCache.js
+++ b/packages/engine/Source/Scene/PostProcessStageTextureCache.js
@@ -38,7 +38,7 @@ function getStageDependencies(
context,
dependencies,
stage,
- previousName,
+ previousName
) {
if (!stage.enabled || !stage._isSupported(context)) {
return previousName;
@@ -72,7 +72,7 @@ function getCompositeDependencies(
context,
dependencies,
composite,
- previousName,
+ previousName
) {
if (
(defined(composite.enabled) && !composite.enabled) ||
@@ -96,7 +96,7 @@ function getCompositeDependencies(
context,
dependencies,
stage,
- previousName,
+ previousName
);
} else {
currentName = getStageDependencies(
@@ -104,7 +104,7 @@ function getCompositeDependencies(
context,
dependencies,
stage,
- previousName,
+ previousName
);
}
// Stages in a series only depend on the previous stage
@@ -153,28 +153,28 @@ function getDependencies(collection, context) {
context,
dependencies,
ao,
- undefined,
+ undefined
);
previousName = getCompositeDependencies(
collection,
context,
dependencies,
bloom,
- previousName,
+ previousName
);
previousName = getStageDependencies(
collection,
context,
dependencies,
tonemapping,
- previousName,
+ previousName
);
previousName = getCompositeDependencies(
collection,
context,
dependencies,
collection,
- previousName,
+ previousName
);
getStageDependencies(collection, context, dependencies, fxaa, previousName);
} else {
@@ -183,7 +183,7 @@ function getDependencies(collection, context) {
context,
dependencies,
collection,
- undefined,
+ undefined
);
}
@@ -262,7 +262,7 @@ function createFramebuffers(cache, context) {
cache._stageNameToFramebuffer[stageName] = getFramebuffer(
cache,
stageName,
- dependencies[stageName],
+ dependencies[stageName]
);
}
}
diff --git a/packages/engine/Source/Scene/Primitive.js b/packages/engine/Source/Scene/Primitive.js
index 5b9f38b70526..f1128facaa7a 100644
--- a/packages/engine/Source/Scene/Primitive.js
+++ b/packages/engine/Source/Scene/Primitive.js
@@ -225,7 +225,7 @@ function Primitive(options) {
* p.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin);
*/
this.modelMatrix = Matrix4.clone(
- defaultValue(options.modelMatrix, Matrix4.IDENTITY),
+ defaultValue(options.modelMatrix, Matrix4.IDENTITY)
);
this._modelMatrix = new Matrix4();
@@ -243,7 +243,7 @@ function Primitive(options) {
this._interleave = defaultValue(options.interleave, false);
this._releaseGeometryInstances = defaultValue(
options.releaseGeometryInstances,
- true,
+ true
);
this._allowPicking = defaultValue(options.allowPicking, true);
this._asynchronous = defaultValue(options.asynchronous, true);
@@ -272,7 +272,7 @@ function Primitive(options) {
*/
this.debugShowBoundingVolume = defaultValue(
options.debugShowBoundingVolume,
- false,
+ false
);
/**
@@ -288,7 +288,7 @@ function Primitive(options) {
this.geometryInstances.length !== 1))
) {
throw new DeveloperError(
- "Relative-to-center rendering only supports one geometry instance.",
+ "Relative-to-center rendering only supports one geometry instance."
);
}
//>>includeEnd('debug');
@@ -607,7 +607,7 @@ function createBatchTable(primitive, context) {
functionName: "czm_batchTable_boundingSphereRadius",
componentDatatype: ComponentDatatype.FLOAT,
componentsPerAttribute: 1,
- },
+ }
);
boundingSphereAttributeIndices.center3DHigh = attributes.length - 5;
boundingSphereAttributeIndices.center3DLow = attributes.length - 4;
@@ -670,8 +670,7 @@ function createBatchTable(primitive, context) {
primitive._batchTable = batchTable;
primitive._batchTableAttributeIndices = attributeIndices;
- primitive._batchTableBoundingSphereAttributeIndices =
- boundingSphereAttributeIndices;
+ primitive._batchTableBoundingSphereAttributeIndices = boundingSphereAttributeIndices;
primitive._batchTableOffsetAttribute2DIndex = offset2DIndex;
}
@@ -732,7 +731,7 @@ const positionRegex = /in\s+vec(?:3|4)\s+(.*)3DHigh;/g;
Primitive._modifyShaderPosition = function (
primitive,
vertexShaderSource,
- scene3DOnly,
+ scene3DOnly
) {
let match;
@@ -744,7 +743,7 @@ Primitive._modifyShaderPosition = function (
const name = match[1];
const functionName = `vec4 czm_compute${name[0].toUpperCase()}${name.substr(
- 1,
+ 1
)}()`;
// Don't forward-declare czm_computePosition because computePosition.glsl already does.
@@ -789,11 +788,11 @@ Primitive._modifyShaderPosition = function (
// Use RTC
vertexShaderSource = vertexShaderSource.replace(
/in\s+vec(?:3|4)\s+position3DHigh;/g,
- "",
+ ""
);
vertexShaderSource = vertexShaderSource.replace(
/in\s+vec(?:3|4)\s+position3DLow;/g,
- "",
+ ""
);
forwardDecl += "uniform mat4 u_modifiedModelView;\n";
@@ -807,17 +806,17 @@ Primitive._modifyShaderPosition = function (
vertexShaderSource = vertexShaderSource.replace(
/czm_modelViewRelativeToEye\s+\*\s+/g,
- "",
+ ""
);
vertexShaderSource = vertexShaderSource.replace(
/czm_modelViewProjectionRelativeToEye/g,
- "czm_projection",
+ "czm_projection"
);
}
}
return [forwardDecl, attributes, vertexShaderSource, computeFunctions].join(
- "\n",
+ "\n"
);
};
@@ -828,7 +827,7 @@ Primitive._appendShowToShader = function (primitive, vertexShaderSource) {
const renamedVS = ShaderSource.replaceMain(
vertexShaderSource,
- "czm_non_show_main",
+ "czm_non_show_main"
);
const showMain =
"void main() \n" +
@@ -843,7 +842,7 @@ Primitive._appendShowToShader = function (primitive, vertexShaderSource) {
Primitive._updateColorAttribute = function (
primitive,
vertexShaderSource,
- isDepthFail,
+ isDepthFail
) {
// some appearances have a color attribute for per vertex color.
// only remove if color is a per instance attribute.
@@ -864,7 +863,7 @@ Primitive._updateColorAttribute = function (
!defined(primitive._batchTableAttributeIndices.depthFailColor)
) {
throw new DeveloperError(
- "A depthFailColor per-instance attribute is required when using a depth fail appearance that uses a color attribute.",
+ "A depthFailColor per-instance attribute is required when using a depth fail appearance that uses a color attribute."
);
}
//>>includeEnd('debug');
@@ -874,12 +873,12 @@ Primitive._updateColorAttribute = function (
if (!isDepthFail) {
modifiedVS = modifiedVS.replace(
/(\b)color(\b)/g,
- "$1czm_batchTable_color(batchId)$2",
+ "$1czm_batchTable_color(batchId)$2"
);
} else {
modifiedVS = modifiedVS.replace(
/(\b)color(\b)/g,
- "$1czm_batchTable_depthFailColor(batchId)$2",
+ "$1czm_batchTable_depthFailColor(batchId)$2"
);
}
return modifiedVS;
@@ -906,7 +905,7 @@ Primitive._updatePickColorAttribute = function (source) {
let vsPick = source.replace(/in\s+vec4\s+pickColor;/g, "");
vsPick = vsPick.replace(
/(\b)pickColor(\b)/g,
- "$1czm_batchTable_pickColor(batchId)$2",
+ "$1czm_batchTable_pickColor(batchId)$2"
);
return vsPick;
};
@@ -920,7 +919,7 @@ Primitive._appendOffsetToShader = function (primitive, vertexShaderSource) {
attr += "in float applyOffset;";
let modifiedShader = vertexShaderSource.replace(
/in\s+float\s+batchId;/g,
- attr,
+ attr
);
let str = "vec4 $1 = czm_computePosition();\n";
@@ -936,7 +935,7 @@ Primitive._appendOffsetToShader = function (primitive, vertexShaderSource) {
str += " }\n";
modifiedShader = modifiedShader.replace(
/vec4\s+([A-Za-z0-9_]+)\s+=\s+czm_computePosition\(\);/g,
- str,
+ str
);
return modifiedShader;
};
@@ -944,7 +943,7 @@ Primitive._appendOffsetToShader = function (primitive, vertexShaderSource) {
Primitive._appendDistanceDisplayConditionToShader = function (
primitive,
vertexShaderSource,
- scene3DOnly,
+ scene3DOnly
) {
if (
!defined(primitive._batchTableAttributeIndices.distanceDisplayCondition)
@@ -954,7 +953,7 @@ Primitive._appendDistanceDisplayConditionToShader = function (
const renamedVS = ShaderSource.replaceMain(
vertexShaderSource,
- "czm_non_distanceDisplayCondition_main",
+ "czm_non_distanceDisplayCondition_main"
);
let distanceDisplayConditionMain =
"void main() \n" +
@@ -1089,7 +1088,7 @@ function modifyForEncodedNormals(primitive, vertexShaderSource) {
function depthClampVS(vertexShaderSource) {
let modifiedVS = ShaderSource.replaceMain(
vertexShaderSource,
- "czm_non_depth_clamp_main",
+ "czm_non_depth_clamp_main"
);
modifiedVS +=
"void main() {\n" +
@@ -1102,7 +1101,7 @@ function depthClampVS(vertexShaderSource) {
function depthClampFS(fragmentShaderSource) {
let modifiedFS = ShaderSource.replaceMain(
fragmentShaderSource,
- "czm_non_depth_clamp_main",
+ "czm_non_depth_clamp_main"
);
modifiedFS +=
"void main() {\n" +
@@ -1133,7 +1132,7 @@ function validateShaderMatching(shaderProgram, attributeLocations) {
if (shaderAttributes.hasOwnProperty(name)) {
if (!defined(attributeLocations[name])) {
throw new DeveloperError(
- `Appearance/Geometry mismatch. The appearance requires vertex shader attribute input '${name}', which was not computed as part of the Geometry. Use the appearance's vertexFormat property when constructing the geometry.`,
+ `Appearance/Geometry mismatch. The appearance requires vertex shader attribute input '${name}', which was not computed as part of the Geometry. Use the appearance's vertexFormat property when constructing the geometry.`
);
}
}
@@ -1149,7 +1148,7 @@ function getUniformFunction(uniforms, name) {
const numberOfCreationWorkers = Math.max(
FeatureDetection.hardwareConcurrency - 1,
- 1,
+ 1
);
let createGeometryTaskProcessors;
const combineGeometryTaskProcessor = new TaskProcessor("combineGeometry");
@@ -1180,7 +1179,7 @@ function loadAsynchronous(primitive, frameState) {
(!defined(geometry._workerName) && !defined(geometry._workerPath))
) {
throw new DeveloperError(
- "Must define either _workerName or _workerPath for asynchronous geometry.",
+ "Must define either _workerName or _workerPath for asynchronous geometry."
);
}
//>>includeEnd('debug');
@@ -1213,7 +1212,7 @@ function loadAsynchronous(primitive, frameState) {
subTask.offset = packedLength;
packedLength += defaultValue(
geometry.constructor.packedLength,
- geometry.packedLength,
+ geometry.packedLength
);
}
}
@@ -1239,8 +1238,8 @@ function loadAsynchronous(primitive, frameState) {
{
subTasks: subTasks[i],
},
- subTaskTransferableObjects,
- ),
+ subTaskTransferableObjects
+ )
);
}
@@ -1277,9 +1276,9 @@ function loadAsynchronous(primitive, frameState) {
modelMatrix: primitive.modelMatrix,
createPickOffsets: primitive._createPickOffsets,
},
- transferableObjects,
+ transferableObjects
),
- transferableObjects,
+ transferableObjects
);
primitive._createGeometryResults = undefined;
@@ -1287,13 +1286,14 @@ function loadAsynchronous(primitive, frameState) {
Promise.resolve(promise)
.then(function (packedResult) {
- const result =
- PrimitivePipeline.unpackCombineGeometryResults(packedResult);
+ const result = PrimitivePipeline.unpackCombineGeometryResults(
+ packedResult
+ );
primitive._geometries = result.geometries;
primitive._attributeLocations = result.attributeLocations;
primitive.modelMatrix = Matrix4.clone(
result.modelMatrix,
- primitive.modelMatrix,
+ primitive.modelMatrix
);
primitive._pickOffsets = result.pickOffsets;
primitive._offsetInstanceExtend = result.offsetInstanceExtend;
@@ -1364,7 +1364,7 @@ function loadSynchronous(primitive, frameState) {
primitive._attributeLocations = result.attributeLocations;
primitive.modelMatrix = Matrix4.clone(
result.modelMatrix,
- primitive.modelMatrix,
+ primitive.modelMatrix
);
primitive._pickOffsets = result.pickOffsets;
primitive._offsetInstanceExtend = result.offsetInstanceExtend;
@@ -1403,7 +1403,7 @@ function recomputeBoundingSpheres(primitive, frameState) {
const offset = primitive._batchTable.getBatchedAttribute(
i,
offsetIndex,
- new Cartesian3(),
+ new Cartesian3()
);
newBS = boundingSpheres[i].clone(newBS);
transformBoundingSphere(newBS, offset, offsetInstanceExtend[i]);
@@ -1458,7 +1458,7 @@ function recomputeBoundingSpheres(primitive, frameState) {
primitive._boundingSphereCV[i] = BoundingSphere.projectTo2D(
boundingSphere,
frameState.mapProjection,
- primitive._boundingSphereCV[i],
+ primitive._boundingSphereCV[i]
);
}
@@ -1466,7 +1466,7 @@ function recomputeBoundingSpheres(primitive, frameState) {
primitive,
frameState,
primitive.modelMatrix,
- true,
+ true
);
primitive._recomputeBoundingSpheres = false;
}
@@ -1478,7 +1478,7 @@ const scratchBoundingSphere = new BoundingSphere();
function updateBatchTableBoundingSpheres(primitive, frameState) {
const hasDistanceDisplayCondition = defined(
- primitive._batchTableAttributeIndices.distanceDisplayCondition,
+ primitive._batchTableAttributeIndices.distanceDisplayCondition
);
if (
!hasDistanceDisplayCondition ||
@@ -1512,7 +1512,7 @@ function updateBatchTableBoundingSpheres(primitive, frameState) {
boundingSphere = BoundingSphere.transform(
boundingSphere,
modelMatrix,
- scratchBoundingSphere,
+ scratchBoundingSphere
);
}
@@ -1521,7 +1521,7 @@ function updateBatchTableBoundingSpheres(primitive, frameState) {
let encodedCenter = EncodedCartesian3.fromCartesian(
center,
- scratchBoundingSphereCenterEncoded,
+ scratchBoundingSphereCenterEncoded
);
batchTable.setBatchedAttribute(i, center3DHighIndex, encodedCenter.high);
batchTable.setBatchedAttribute(i, center3DLowIndex, encodedCenter.low);
@@ -1529,15 +1529,15 @@ function updateBatchTableBoundingSpheres(primitive, frameState) {
if (!frameState.scene3DOnly) {
const cartographic = ellipsoid.cartesianToCartographic(
center,
- scratchBoundingSphereCartographic,
+ scratchBoundingSphereCartographic
);
const center2D = projection.project(
cartographic,
- scratchBoundingSphereCenter2D,
+ scratchBoundingSphereCenter2D
);
encodedCenter = EncodedCartesian3.fromCartesian(
center2D,
- scratchBoundingSphereCenterEncoded,
+ scratchBoundingSphereCenterEncoded
);
batchTable.setBatchedAttribute(i, center2DHighIndex, encodedCenter.high);
batchTable.setBatchedAttribute(i, center2DLowIndex, encodedCenter.low);
@@ -1577,7 +1577,7 @@ function updateBatchTableOffsets(primitive, frameState) {
}
const offset = batchTable.getBatchedAttribute(
i,
- primitive._batchTableAttributeIndices.offset,
+ primitive._batchTableAttributeIndices.offset
);
if (Cartesian3.equals(offset, Cartesian3.ZERO)) {
batchTable.setBatchedAttribute(i, index2D, Cartesian3.ZERO);
@@ -1589,7 +1589,7 @@ function updateBatchTableOffsets(primitive, frameState) {
boundingSphere = BoundingSphere.transform(
boundingSphere,
modelMatrix,
- scratchBoundingSphere,
+ scratchBoundingSphere
);
}
@@ -1597,11 +1597,11 @@ function updateBatchTableOffsets(primitive, frameState) {
center = ellipsoid.scaleToGeodeticSurface(center, offsetCenterScratch);
let cartographic = ellipsoid.cartesianToCartographic(
center,
- scratchBoundingSphereCartographic,
+ scratchBoundingSphereCartographic
);
const center2D = projection.project(
cartographic,
- scratchBoundingSphereCenter2D,
+ scratchBoundingSphereCenter2D
);
const newPoint = Cartesian3.add(offset, center, offsetScratchCartesian);
@@ -1609,13 +1609,13 @@ function updateBatchTableOffsets(primitive, frameState) {
const newPointProjected = projection.project(
cartographic,
- offsetScratchCartesian,
+ offsetScratchCartesian
);
const newVector = Cartesian3.subtract(
newPointProjected,
center2D,
- offsetScratchCartesian,
+ offsetScratchCartesian
);
const x = newVector.x;
@@ -1647,14 +1647,14 @@ function createVertexArray(primitive, frameState) {
attributeLocations: attributeLocations,
bufferUsage: BufferUsage.STATIC_DRAW,
interleave: primitive._interleave,
- }),
+ })
);
if (defined(primitive._createBoundingVolumeFunction)) {
primitive._createBoundingVolumeFunction(frameState, geometry);
} else {
primitive._boundingSpheres.push(
- BoundingSphere.clone(geometry.boundingSphere),
+ BoundingSphere.clone(geometry.boundingSphere)
);
primitive._boundingSphereWC.push(new BoundingSphere());
@@ -1668,7 +1668,7 @@ function createVertexArray(primitive, frameState) {
center.z = y;
primitive._boundingSphereCV.push(
- BoundingSphere.clone(geometry.boundingSphereCV),
+ BoundingSphere.clone(geometry.boundingSphereCV)
);
primitive._boundingSphere2D.push(new BoundingSphere());
primitive._boundingSphereMorph.push(new BoundingSphere());
@@ -1737,14 +1737,14 @@ function createShaderProgram(primitive, frameState, appearance) {
const attributeLocations = primitive._attributeLocations;
let vs = primitive._batchTable.getVertexShaderCallback()(
- appearance.vertexShaderSource,
+ appearance.vertexShaderSource
);
vs = Primitive._appendOffsetToShader(primitive, vs);
vs = Primitive._appendShowToShader(primitive, vs);
vs = Primitive._appendDistanceDisplayConditionToShader(
primitive,
vs,
- frameState.scene3DOnly,
+ frameState.scene3DOnly
);
vs = appendPickToVertexShader(vs);
vs = Primitive._updateColorAttribute(primitive, vs, false);
@@ -1764,13 +1764,13 @@ function createShaderProgram(primitive, frameState, appearance) {
if (defined(primitive._depthFailAppearance)) {
vs = primitive._batchTable.getVertexShaderCallback()(
- primitive._depthFailAppearance.vertexShaderSource,
+ primitive._depthFailAppearance.vertexShaderSource
);
vs = Primitive._appendShowToShader(primitive, vs);
vs = Primitive._appendDistanceDisplayConditionToShader(
primitive,
vs,
- frameState.scene3DOnly,
+ frameState.scene3DOnly
);
vs = appendPickToVertexShader(vs);
vs = Primitive._updateColorAttribute(primitive, vs, true);
@@ -1809,14 +1809,14 @@ function getUniforms(primitive, appearance, material, frameState) {
if (defined(materialUniformMap) && defined(materialUniformMap[name])) {
// Later, we could rename uniforms behind-the-scenes if needed.
throw new DeveloperError(
- `Appearance and material have a uniform with the same name: ${name}`,
+ `Appearance and material have a uniform with the same name: ${name}`
);
}
//>>includeEnd('debug');
appearanceUniformMap[name] = getUniformFunction(
appearanceUniforms,
- name,
+ name
);
}
}
@@ -1830,17 +1830,17 @@ function getUniforms(primitive, appearance, material, frameState) {
Matrix4.multiply(
viewMatrix,
primitive._modelMatrix,
- modifiedModelViewScratch,
+ modifiedModelViewScratch
);
Matrix4.multiplyByPoint(
modifiedModelViewScratch,
primitive.rtcCenter,
- rtcScratch,
+ rtcScratch
);
Matrix4.setTranslation(
modifiedModelViewScratch,
rtcScratch,
- modifiedModelViewScratch,
+ modifiedModelViewScratch
);
return modifiedModelViewScratch;
};
@@ -1857,7 +1857,7 @@ function createCommands(
twoPasses,
colorCommands,
pickCommands,
- frameState,
+ frameState
) {
const uniforms = getUniforms(primitive, appearance, material, frameState);
@@ -1867,7 +1867,7 @@ function createCommands(
primitive,
primitive._depthFailAppearance,
primitive._depthFailAppearance.material,
- frameState,
+ frameState
);
}
@@ -1954,7 +1954,7 @@ Primitive._updateBoundingVolumes = function (
primitive,
frameState,
modelMatrix,
- forceUpdate,
+ forceUpdate
) {
let i;
let length;
@@ -1969,17 +1969,17 @@ Primitive._updateBoundingVolumes = function (
primitive._boundingSphereWC[i] = BoundingSphere.transform(
boundingSphere,
modelMatrix,
- primitive._boundingSphereWC[i],
+ primitive._boundingSphereWC[i]
);
if (!frameState.scene3DOnly) {
primitive._boundingSphere2D[i] = BoundingSphere.clone(
primitive._boundingSphereCV[i],
- primitive._boundingSphere2D[i],
+ primitive._boundingSphere2D[i]
);
primitive._boundingSphere2D[i].center.x = 0.0;
primitive._boundingSphereMorph[i] = BoundingSphere.union(
primitive._boundingSphereWC[i],
- primitive._boundingSphereCV[i],
+ primitive._boundingSphereCV[i]
);
}
}
@@ -1997,7 +1997,7 @@ Primitive._updateBoundingVolumes = function (
const pixelSizeInMeters = frameState.camera.getPixelSize(
boundingSphere,
frameState.context.drawingBufferWidth,
- frameState.context.drawingBufferHeight,
+ frameState.context.drawingBufferHeight
);
const sizeInMeters = pixelSizeInMeters * pixelSize;
boundingSphereWC.radius = boundingSphere.radius + sizeInMeters;
@@ -2013,7 +2013,7 @@ function updateAndQueueCommands(
modelMatrix,
cull,
debugShowBoundingVolume,
- twoPasses,
+ twoPasses
) {
//>>includeStart('debug', pragmas.debug);
if (
@@ -2021,7 +2021,7 @@ function updateAndQueueCommands(
!Matrix4.equals(modelMatrix, Matrix4.IDENTITY)
) {
throw new DeveloperError(
- "Primitive.modelMatrix is only supported in 3D mode.",
+ "Primitive.modelMatrix is only supported in 3D mode."
);
}
//>>includeEnd('debug');
@@ -2107,7 +2107,7 @@ Primitive.prototype.update = function (frameState) {
//>>includeStart('debug', pragmas.debug);
if (defined(this.rtcCenter) && !frameState.scene3DOnly) {
throw new DeveloperError(
- "RTC rendering is only available for 3D only scenes.",
+ "RTC rendering is only available for 3D only scenes."
);
}
//>>includeEnd('debug');
@@ -2123,7 +2123,7 @@ Primitive.prototype.update = function (frameState) {
if (this._batchTable.attributes.length > 0) {
if (ContextLimits.maximumVertexTextureImageUnits === 0) {
throw new RuntimeError(
- "Vertex texture fetch support is required to render primitives with per-instance attributes. The maximum number of vertex texture image units must be greater than zero.",
+ "Vertex texture fetch support is required to render primitives with per-instance attributes. The maximum number of vertex texture image units must be greater than zero."
);
}
this._batchTable.update(frameState);
@@ -2203,7 +2203,7 @@ Primitive.prototype.update = function (frameState) {
if (createRS) {
const rsFunc = defaultValue(
this._createRenderStatesFunction,
- createRenderStates,
+ createRenderStates
);
rsFunc(this, context, appearance, twoPasses);
}
@@ -2211,7 +2211,7 @@ Primitive.prototype.update = function (frameState) {
if (createSP) {
const spFunc = defaultValue(
this._createShaderProgramFunction,
- createShaderProgram,
+ createShaderProgram
);
spFunc(this, frameState, appearance);
}
@@ -2219,7 +2219,7 @@ Primitive.prototype.update = function (frameState) {
if (createRS || createSP) {
const commandFunc = defaultValue(
this._createCommandsFunction,
- createCommands,
+ createCommands
);
commandFunc(
this,
@@ -2229,13 +2229,13 @@ Primitive.prototype.update = function (frameState) {
twoPasses,
this._colorCommands,
this._pickCommands,
- frameState,
+ frameState
);
}
const updateAndQueueCommandsFunc = defaultValue(
this._updateAndQueueCommandsFunction,
- updateAndQueueCommands,
+ updateAndQueueCommands
);
updateAndQueueCommandsFunc(
this,
@@ -2245,7 +2245,7 @@ Primitive.prototype.update = function (frameState) {
this.modelMatrix,
this.cull,
this.debugShowBoundingVolume,
- twoPasses,
+ twoPasses
);
};
@@ -2255,11 +2255,11 @@ function transformBoundingSphere(boundingSphere, offset, offsetAttribute) {
if (offsetAttribute === GeometryOffsetAttribute.TOP) {
const origBS = BoundingSphere.clone(
boundingSphere,
- offsetBoundingSphereScratch1,
+ offsetBoundingSphereScratch1
);
const offsetBS = BoundingSphere.clone(
boundingSphere,
- offsetBoundingSphereScratch2,
+ offsetBoundingSphereScratch2
);
offsetBS.center = Cartesian3.add(offsetBS.center, offset, offsetBS.center);
boundingSphere = BoundingSphere.union(origBS, offsetBS, boundingSphere);
@@ -2267,7 +2267,7 @@ function transformBoundingSphere(boundingSphere, offset, offsetAttribute) {
boundingSphere.center = Cartesian3.add(
boundingSphere.center,
offset,
- boundingSphere.center,
+ boundingSphere.center
);
}
@@ -2278,13 +2278,13 @@ function createGetFunction(batchTable, instanceIndex, attributeIndex) {
return function () {
const attributeValue = batchTable.getBatchedAttribute(
instanceIndex,
- attributeIndex,
+ attributeIndex
);
const attribute = batchTable.attributes[attributeIndex];
const componentsPerAttribute = attribute.componentsPerAttribute;
const value = ComponentDatatype.createTypedArray(
attribute.componentDatatype,
- componentsPerAttribute,
+ componentsPerAttribute
);
if (defined(attributeValue.constructor.pack)) {
attributeValue.constructor.pack(attributeValue, value, 0);
@@ -2300,7 +2300,7 @@ function createSetFunction(
instanceIndex,
attributeIndex,
primitive,
- name,
+ name
) {
return function (value) {
//>>includeStart('debug', pragmas.debug);
@@ -2311,7 +2311,7 @@ function createSetFunction(
value.length > 4
) {
throw new DeveloperError(
- "value must be and array with length between 1 and 4.",
+ "value must be and array with length between 1 and 4."
);
}
//>>includeEnd('debug');
@@ -2319,7 +2319,7 @@ function createSetFunction(
batchTable.setBatchedAttribute(
instanceIndex,
attributeIndex,
- attributeValue,
+ attributeValue
);
if (name === "offset") {
primitive._recomputeBoundingSpheres = true;
@@ -2342,13 +2342,13 @@ function createBoundingSphereProperties(primitive, properties, index) {
transformBoundingSphere(
boundingSphere,
Cartesian3.fromArray(offset.get(), 0, offsetScratch),
- primitive._offsetInstanceExtend[index],
+ primitive._offsetInstanceExtend[index]
);
}
if (defined(modelMatrix)) {
boundingSphere = BoundingSphere.transform(
boundingSphere,
- modelMatrix,
+ modelMatrix
);
}
}
@@ -2393,7 +2393,7 @@ Primitive.prototype.getGeometryInstanceAttributes = function (id) {
}
if (!defined(this._batchTable)) {
throw new DeveloperError(
- "must call update before calling getGeometryInstanceAttributes",
+ "must call update before calling getGeometryInstanceAttributes"
);
}
//>>includeEnd('debug');
diff --git a/packages/engine/Source/Scene/PrimitiveCollection.js b/packages/engine/Source/Scene/PrimitiveCollection.js
index 4dc20383fc36..c28e0ed24c2b 100644
--- a/packages/engine/Source/Scene/PrimitiveCollection.js
+++ b/packages/engine/Source/Scene/PrimitiveCollection.js
@@ -142,7 +142,7 @@ PrimitiveCollection.prototype.add = function (primitive, index) {
throw new DeveloperError("index must be greater than or equal to zero.");
} else if (index > this._primitives.length) {
throw new DeveloperError(
- "index must be less than or equal to the number of primitives.",
+ "index must be less than or equal to the number of primitives."
);
}
}
diff --git a/packages/engine/Source/Scene/PrimitiveLoadPlan.js b/packages/engine/Source/Scene/PrimitiveLoadPlan.js
index 40e7c0e7a4df..cfa038c71f30 100644
--- a/packages/engine/Source/Scene/PrimitiveLoadPlan.js
+++ b/packages/engine/Source/Scene/PrimitiveLoadPlan.js
@@ -7,6 +7,11 @@ import BufferUsage from "../Renderer/BufferUsage.js";
import AttributeType from "./AttributeType.js";
import ModelComponents from "./ModelComponents.js";
import PrimitiveOutlineGenerator from "./Model/PrimitiveOutlineGenerator.js";
+import GaussianSplatTextureGenerator from "./Model/GaussianSplatTextureGenerator.js";
+import Texture from "../Renderer/Texture.js";
+import PixelFormat from "../Core/PixelFormat.js";
+import PixelDatatype from "../Renderer/PixelDatatype.js";
+import Sampler from "../Renderer/Sampler.js";
/**
* Simple struct for tracking whether an attribute will be loaded as a buffer
@@ -157,6 +162,23 @@ function PrimitiveLoadPlan(primitive) {
* @private
*/
this.outlineIndices = undefined;
+
+ /**
+ * Set this true to indicate that the primitive has the
+ * KHR_gaussian_splatting extension and needs to be post-processed
+ *
+ * @type {boolean}
+ * @private
+ */
+ this.needsGaussianSplats = false;
+
+ /**
+ * Set this to true if generating textures for Gaussian Splat rendering
+ *
+ * @type {boolean}
+ * @private
+ */
+ this.generateGaussianSplatTexture = true;
}
/**
@@ -174,6 +196,16 @@ PrimitiveLoadPlan.prototype.postProcess = function (context) {
generateOutlines(this);
generateBuffers(this, context);
}
+
+ //handle splat post-processing for point primitives
+ if (this.needsGaussianSplats) {
+ this.primitive.isGaussianSplatPrimitive = true;
+ if (this.generateGaussianSplatTexture) {
+ generateSplatTexture(this, context);
+ } else {
+ setupGaussianSplatBuffers(this, context);
+ }
+ }
};
function generateOutlines(loadPlan) {
@@ -226,6 +258,56 @@ function makeOutlineCoordinatesAttribute(outlineCoordinatesTypedArray) {
return attribute;
}
+function setupGaussianSplatBuffers(loadPlan, context) {
+ const attributePlans = loadPlan.attributePlans;
+ const attrLen = attributePlans.length;
+ for (let i = 0; i < attrLen; i++) {
+ const attributePlan = attributePlans[i];
+ //defer til much later into the pipeline
+ attributePlan.loadBuffer = false;
+ attributePlan.loadTypedArray = true;
+ }
+}
+
+function generateSplatTexture(loadPlan, context) {
+ loadPlan.primitive.gaussianSplatTexturePending = true;
+
+ GaussianSplatTextureGenerator.generateFromAttrs(
+ loadPlan.primitive.attributes,
+ loadPlan.primitive.attributes[0].count,
+ ).then((splatTextureData) => {
+ const splatTex = new Texture({
+ context,
+ source: {
+ width: splatTextureData.width,
+ height: splatTextureData.height,
+ arrayBufferView: splatTextureData.data,
+ },
+ preMultiplyAlpha: false,
+ skipColorSpaceConversion: true,
+ pixelFormat: PixelFormat.RGBA_INTEGER,
+ pixelDatatype: PixelDatatype.UNSIGNED_INT,
+ flipY: false,
+ sampler: Sampler.NEAREST,
+ });
+ const count = loadPlan.primitive.attributes[0].count;
+ const attribute = new ModelComponents.Attribute();
+
+ attribute.name = "_SPLAT_INDEXES";
+ attribute.typedArray = new Uint32Array([...Array(count).keys()]);
+ attribute.componentDatatype = ComponentDatatype.UNSIGNED_INT;
+ attribute.type = AttributeType.SCALAR;
+ attribute.normalized = false;
+ attribute.count = count;
+ attribute.constant = 0;
+ attribute.instanceDivisor = 1;
+
+ loadPlan.primitive.attributes.push(attribute);
+ loadPlan.primitive.gaussianSplatTexture = splatTex;
+ loadPlan.primitive.hasGaussianSplatTexture = true;
+ });
+}
+
function generateBuffers(loadPlan, context) {
generateAttributeBuffers(loadPlan.attributePlans, context);
diff --git a/packages/engine/Source/Scene/PrimitivePipeline.js b/packages/engine/Source/Scene/PrimitivePipeline.js
index f90dd5058a95..fa1312ee8406 100644
--- a/packages/engine/Source/Scene/PrimitivePipeline.js
+++ b/packages/engine/Source/Scene/PrimitivePipeline.js
@@ -17,7 +17,7 @@ import WebMercatorProjection from "../Core/WebMercatorProjection.js";
function transformToWorldCoordinates(
instances,
primitiveModelMatrix,
- scene3DOnly,
+ scene3DOnly
) {
let toWorld = !scene3DOnly;
const length = instances.length;
@@ -45,7 +45,7 @@ function transformToWorldCoordinates(
Matrix4.multiplyTransformation(
primitiveModelMatrix,
instances[0].modelMatrix,
- primitiveModelMatrix,
+ primitiveModelMatrix
);
}
}
@@ -113,7 +113,7 @@ function geometryPipeline(parameters) {
instances[i].geometry.primitiveType !== primitiveType
) {
throw new DeveloperError(
- "All instance geometries must have the same primitiveType.",
+ "All instance geometries must have the same primitiveType."
);
}
}
@@ -145,17 +145,17 @@ function geometryPipeline(parameters) {
defined(instance.eastHemisphereGeometry)
) {
GeometryPipeline.reorderForPostVertexCache(
- instance.westHemisphereGeometry,
+ instance.westHemisphereGeometry
);
GeometryPipeline.reorderForPreVertexCache(
- instance.westHemisphereGeometry,
+ instance.westHemisphereGeometry
);
GeometryPipeline.reorderForPostVertexCache(
- instance.eastHemisphereGeometry,
+ instance.eastHemisphereGeometry
);
GeometryPipeline.reorderForPreVertexCache(
- instance.eastHemisphereGeometry,
+ instance.eastHemisphereGeometry
);
}
}
@@ -185,11 +185,11 @@ function geometryPipeline(parameters) {
name,
name3D,
name2D,
- projection,
+ projection
);
if (defined(geometry.boundingSphere) && name === "position") {
geometry.boundingSphereCV = BoundingSphere.fromVertices(
- geometry.attributes.position2D.values,
+ geometry.attributes.position2D.values
);
}
@@ -197,13 +197,13 @@ function geometryPipeline(parameters) {
geometry,
name3D,
`${name3D}High`,
- `${name3D}Low`,
+ `${name3D}Low`
);
GeometryPipeline.encodeAttribute(
geometry,
name2D,
`${name2D}High`,
- `${name2D}Low`,
+ `${name2D}Low`
);
}
}
@@ -217,7 +217,7 @@ function geometryPipeline(parameters) {
geometry,
name,
`${name}3DHigh`,
- `${name}3DLow`,
+ `${name}3DLow`
);
}
}
@@ -236,7 +236,7 @@ function geometryPipeline(parameters) {
for (i = 0; i < length; ++i) {
geometry = geometries[i];
splitGeometries = splitGeometries.concat(
- GeometryPipeline.fitToUnsignedShortIndices(geometry),
+ GeometryPipeline.fitToUnsignedShortIndices(geometry)
);
}
@@ -294,13 +294,13 @@ function createInstancePickOffsets(instances, geometries) {
instances,
"westHemisphereGeometry",
geometries,
- pickOffsets,
+ pickOffsets
);
createPickOffsets(
instances,
"eastHemisphereGeometry",
geometries,
- pickOffsets,
+ pickOffsets
);
return pickOffsets;
}
@@ -326,7 +326,7 @@ PrimitivePipeline.combineGeometry = function (parameters) {
geometries = geometryPipeline(parameters);
if (geometries.length > 0) {
attributeLocations = GeometryPipeline.createAttributeLocations(
- geometries[0],
+ geometries[0]
);
if (parameters.createPickOffsets) {
pickOffsets = createInstancePickOffsets(instances, geometries);
@@ -363,7 +363,7 @@ PrimitivePipeline.combineGeometry = function (parameters) {
) {
boundingSpheres[i] = BoundingSphere.union(
eastHemisphereGeometry.boundingSphere,
- westHemisphereGeometry.boundingSphere,
+ westHemisphereGeometry.boundingSphere
);
}
if (
@@ -372,7 +372,7 @@ PrimitivePipeline.combineGeometry = function (parameters) {
) {
boundingSpheresCV[i] = BoundingSphere.union(
eastHemisphereGeometry.boundingSphereCV,
- westHemisphereGeometry.boundingSphereCV,
+ westHemisphereGeometry.boundingSphereCV
);
}
}
@@ -451,7 +451,7 @@ function countCreateGeometryResults(items) {
*/
PrimitivePipeline.packCreateGeometryResults = function (
items,
- transferableObjects,
+ transferableObjects
) {
const packedData = new Float64Array(countCreateGeometryResults(items));
const stringTable = [];
@@ -543,7 +543,7 @@ PrimitivePipeline.packCreateGeometryResults = function (
* @private
*/
PrimitivePipeline.unpackCreateGeometryResults = function (
- createGeometryResult,
+ createGeometryResult
) {
const stringTable = createGeometryResult.stringTable;
const packedGeometry = createGeometryResult.packedData;
@@ -574,7 +574,7 @@ PrimitivePipeline.unpackCreateGeometryResults = function (
if (validBoundingSphere) {
boundingSphere = BoundingSphere.unpack(
packedGeometry,
- packedGeometryIndex,
+ packedGeometryIndex
);
}
@@ -584,7 +584,7 @@ PrimitivePipeline.unpackCreateGeometryResults = function (
if (validBoundingSphereCV) {
boundingSphereCV = BoundingSphere.unpack(
packedGeometry,
- packedGeometryIndex,
+ packedGeometryIndex
);
}
@@ -677,7 +677,7 @@ function unpackInstancesForCombine(data) {
offset: new OffsetGeometryInstanceAttribute(
packedInstances[i],
packedInstances[i + 1],
- packedInstances[i + 2],
+ packedInstances[i + 2]
),
};
}
@@ -697,7 +697,7 @@ function unpackInstancesForCombine(data) {
*/
PrimitivePipeline.packCombineGeometryParameters = function (
parameters,
- transferableObjects,
+ transferableObjects
) {
const createGeometryResults = parameters.createGeometryResults;
const length = createGeometryResults.length;
@@ -710,7 +710,7 @@ PrimitivePipeline.packCombineGeometryParameters = function (
createGeometryResults: parameters.createGeometryResults,
packedInstances: packInstancesForCombine(
parameters.instances,
- transferableObjects,
+ transferableObjects
),
ellipsoid: parameters.ellipsoid,
isGeographic: parameters.projection instanceof GeographicProjection,
@@ -727,7 +727,7 @@ PrimitivePipeline.packCombineGeometryParameters = function (
* @private
*/
PrimitivePipeline.unpackCombineGeometryParameters = function (
- packedParameters,
+ packedParameters
) {
const instances = unpackInstancesForCombine(packedParameters.packedInstances);
const createGeometryResults = packedParameters.createGeometryResults;
@@ -736,7 +736,7 @@ PrimitivePipeline.unpackCombineGeometryParameters = function (
for (let resultIndex = 0; resultIndex < length; resultIndex++) {
const geometries = PrimitivePipeline.unpackCreateGeometryResults(
- createGeometryResults[resultIndex],
+ createGeometryResults[resultIndex]
);
const geometriesLength = geometries.length;
for (
@@ -812,7 +812,7 @@ function unpackBoundingSpheres(buffer) {
*/
PrimitivePipeline.packCombineGeometryResults = function (
results,
- transferableObjects,
+ transferableObjects
) {
if (defined(results.geometries)) {
transferGeometries(results.geometries, transferableObjects);
@@ -820,11 +820,11 @@ PrimitivePipeline.packCombineGeometryResults = function (
const packedBoundingSpheres = packBoundingSpheres(results.boundingSpheres);
const packedBoundingSpheresCV = packBoundingSpheres(
- results.boundingSpheresCV,
+ results.boundingSpheresCV
);
transferableObjects.push(
packedBoundingSpheres.buffer,
- packedBoundingSpheresCV.buffer,
+ packedBoundingSpheresCV.buffer
);
return {
diff --git a/packages/engine/Source/Scene/PropertyTable.js b/packages/engine/Source/Scene/PropertyTable.js
index cbb73b3cfd9b..19860c82de18 100644
--- a/packages/engine/Source/Scene/PropertyTable.js
+++ b/packages/engine/Source/Scene/PropertyTable.js
@@ -298,21 +298,21 @@ PropertyTable.prototype.getPropertyIds = function (index, results) {
// concat in place to avoid unnecessary array allocation
results.push.apply(
results,
- this._metadataTable.getPropertyIds(scratchResults),
+ this._metadataTable.getPropertyIds(scratchResults)
);
}
if (defined(this._batchTableHierarchy)) {
results.push.apply(
results,
- this._batchTableHierarchy.getPropertyIds(index, scratchResults),
+ this._batchTableHierarchy.getPropertyIds(index, scratchResults)
);
}
if (defined(this._jsonMetadataTable)) {
results.push.apply(
results,
- this._jsonMetadataTable.getPropertyIds(scratchResults),
+ this._jsonMetadataTable.getPropertyIds(scratchResults)
);
}
@@ -434,7 +434,7 @@ PropertyTable.prototype.getPropertyBySemantic = function (index, semantic) {
PropertyTable.prototype.setPropertyBySemantic = function (
index,
semantic,
- value,
+ value
) {
if (defined(this._metadataTable)) {
return this._metadataTable.setPropertyBySemantic(index, semantic, value);
@@ -497,7 +497,7 @@ function checkFeatureId(featureId, featuresLength) {
if (!defined(featureId) || featureId < 0 || featureId >= featuresLength) {
throw new DeveloperError(
`featureId is required and must be between zero and featuresLength - 1 (${featuresLength}` -
- +").",
+ +")."
);
}
}
diff --git a/packages/engine/Source/Scene/PropertyTextureProperty.js b/packages/engine/Source/Scene/PropertyTextureProperty.js
index 765c2507313e..aed6e39e4bab 100644
--- a/packages/engine/Source/Scene/PropertyTextureProperty.js
+++ b/packages/engine/Source/Scene/PropertyTextureProperty.js
@@ -188,25 +188,25 @@ PropertyTextureProperty.prototype.isGpuCompatible = function () {
// only support arrays of 1-4 UINT8 scalars (normalized or unnormalized)
if (classProperty.isVariableLengthArray) {
oneTimeWarning(
- `Property texture property ${classProperty.id} is a variable-length array, which is not supported`,
+ `Property texture property ${classProperty.id} is a variable-length array, which is not supported`
);
return false;
}
if (classProperty.arrayLength > 4) {
oneTimeWarning(
- `Property texture property ${classProperty.id} is an array of length ${classProperty.arrayLength}, but may have at most a length of 4`,
+ `Property texture property ${classProperty.id} is an array of length ${classProperty.arrayLength}, but may have at most a length of 4`
);
return false;
}
if (type !== MetadataType.SCALAR) {
oneTimeWarning(
- `Property texture property ${classProperty.id} is an array of type ${type}, but only SCALAR is supported`,
+ `Property texture property ${classProperty.id} is an array of type ${type}, but only SCALAR is supported`
);
return false;
}
if (componentType !== MetadataComponentType.UINT8) {
oneTimeWarning(
- `Property texture property ${classProperty.id} is an array with component type ${componentType}, but only UINT8 is supported`,
+ `Property texture property ${classProperty.id} is an array with component type ${componentType}, but only UINT8 is supported`
);
return false;
}
@@ -216,7 +216,7 @@ PropertyTextureProperty.prototype.isGpuCompatible = function () {
if (MetadataType.isVectorType(type) || type === MetadataType.SCALAR) {
if (componentType !== MetadataComponentType.UINT8) {
oneTimeWarning(
- `Property texture property ${classProperty.id} has component type ${componentType}, but only UINT8 is supported`,
+ `Property texture property ${classProperty.id} has component type ${componentType}, but only UINT8 is supported`
);
return false;
}
@@ -226,7 +226,7 @@ PropertyTextureProperty.prototype.isGpuCompatible = function () {
// For this initial implementation, only UINT8-based properties
// are supported.
oneTimeWarning(
- `Property texture property ${classProperty.id} has an unsupported type`,
+ `Property texture property ${classProperty.id} has an unsupported type`
);
return false;
};
diff --git a/packages/engine/Source/Scene/QuadtreePrimitive.js b/packages/engine/Source/Scene/QuadtreePrimitive.js
index 545b7ecde978..66ed2109ca30 100644
--- a/packages/engine/Source/Scene/QuadtreePrimitive.js
+++ b/packages/engine/Source/Scene/QuadtreePrimitive.js
@@ -47,7 +47,7 @@ function QuadtreePrimitive(options) {
}
if (defined(options.tileProvider.quadtree)) {
throw new DeveloperError(
- "A QuadtreeTileProvider can only be used with a single QuadtreePrimitive",
+ "A QuadtreeTileProvider can only be used with a single QuadtreePrimitive"
);
}
//>>includeEnd('debug');
@@ -110,7 +110,7 @@ function QuadtreePrimitive(options) {
*/
this.maximumScreenSpaceError = defaultValue(
options.maximumScreenSpaceError,
- 2,
+ 2
);
/**
@@ -395,7 +395,7 @@ function updateTileLoadProgress(primitive, frameState) {
) {
const raiseEvent = Event.prototype.raiseEvent.bind(
primitive._tileLoadProgressEvent,
- currentLoadQueueLength,
+ currentLoadQueueLength
);
frameState.afterRender.push(() => {
raiseEvent();
@@ -420,7 +420,7 @@ function updateTileLoadProgress(primitive, frameState) {
debug.maxDepthVisited !== debug.lastMaxDepthVisited
) {
console.log(
- `Visited ${debug.tilesVisited}, Rendered: ${debug.tilesRendered}, Culled: ${debug.tilesCulled}, Max Depth Rendered: ${debug.maxDepth}, Max Depth Visited: ${debug.maxDepthVisited}, Waiting for children: ${debug.tilesWaitingForChildren}`,
+ `Visited ${debug.tilesVisited}, Rendered: ${debug.tilesRendered}, Culled: ${debug.tilesCulled}, Max Depth Rendered: ${debug.maxDepth}, Max Depth Visited: ${debug.maxDepthVisited}, Waiting for children: ${debug.tilesWaitingForChildren}`
);
debug.lastTilesVisited = debug.tilesVisited;
@@ -523,8 +523,9 @@ function selectTilesForRendering(primitive, frameState) {
const tilingScheme = tileProvider.tilingScheme;
if (defined(tilingScheme)) {
const tilingScheme = tileProvider.tilingScheme;
- primitive._levelZeroTiles =
- QuadtreeTile.createLevelZeroTiles(tilingScheme);
+ primitive._levelZeroTiles = QuadtreeTile.createLevelZeroTiles(
+ tilingScheme
+ );
const numberOfRootTiles = primitive._levelZeroTiles.length;
if (rootTraversalDetails.length < numberOfRootTiles) {
rootTraversalDetails = new Array(numberOfRootTiles);
@@ -572,13 +573,12 @@ function selectTilesForRendering(primitive, frameState) {
primitive._cameraPositionCartographic = camera.positionCartographic;
const cameraFrameOrigin = Matrix4.getTranslation(
camera.transform,
- cameraOriginScratch,
+ cameraOriginScratch
+ );
+ primitive._cameraReferenceFrameOriginCartographic = primitive.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(
+ cameraFrameOrigin,
+ primitive._cameraReferenceFrameOriginCartographic
);
- primitive._cameraReferenceFrameOriginCartographic =
- primitive.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(
- cameraFrameOrigin,
- primitive._cameraReferenceFrameOriginCartographic,
- );
// Traverse in depth-first, near-to-far order.
for (i = 0, len = levelZeroTiles.length; i < len; ++i) {
@@ -595,7 +595,7 @@ function selectTilesForRendering(primitive, frameState) {
frameState,
occluders,
false,
- rootTraversalDetails[i],
+ rootTraversalDetails[i]
);
}
}
@@ -611,7 +611,7 @@ function queueTileLoad(primitive, queue, tile, frameState) {
if (primitive.tileProvider.computeTileLoadPriority !== undefined) {
tile._loadPriority = primitive.tileProvider.computeTileLoadPriority(
tile,
- frameState,
+ frameState
);
}
queue.push(tile);
@@ -713,7 +713,7 @@ function visitTile(
frameState,
tile,
ancestorMeetsSse,
- traversalDetails,
+ traversalDetails
) {
const debug = primitive._debug;
@@ -787,7 +787,7 @@ function visitTile(
primitive,
primitive._tileLoadQueueMedium,
tile,
- frameState,
+ frameState
);
}
addTileToRenderList(primitive, tile);
@@ -838,7 +838,7 @@ function visitTile(
primitive,
primitive._tileLoadQueueMedium,
tile,
- frameState,
+ frameState
);
// Make sure we don't unload the children and forget they're upsampled.
@@ -882,7 +882,7 @@ function visitTile(
northeastChild,
frameState,
ancestorMeetsSse,
- traversalDetails,
+ traversalDetails
);
// If no descendant tiles were added to the render list by the function above, it means they were all
@@ -912,7 +912,7 @@ function visitTile(
workTile !== tile
) {
workTile._lastSelectionResult = TileSelectionResult.kick(
- workTile._lastSelectionResult,
+ workTile._lastSelectionResult
);
workTile = workTile.parent;
}
@@ -942,7 +942,7 @@ function visitTile(
primitive,
primitive._tileLoadQueueMedium,
tile,
- frameState,
+ frameState
);
traversalDetails.notYetRenderableCount = tile.renderable ? 0 : 1;
queuedForLoad = true;
@@ -991,7 +991,7 @@ function visitVisibleChildrenNearToFar(
northeast,
frameState,
ancestorMeetsSse,
- traversalDetails,
+ traversalDetails
) {
const cameraPosition = frameState.camera.positionCartographic;
const tileProvider = primitive._tileProvider;
@@ -1013,7 +1013,7 @@ function visitVisibleChildrenNearToFar(
frameState,
occluders,
ancestorMeetsSse,
- southwestDetails,
+ southwestDetails
);
visitIfVisible(
primitive,
@@ -1022,7 +1022,7 @@ function visitVisibleChildrenNearToFar(
frameState,
occluders,
ancestorMeetsSse,
- southeastDetails,
+ southeastDetails
);
visitIfVisible(
primitive,
@@ -1031,7 +1031,7 @@ function visitVisibleChildrenNearToFar(
frameState,
occluders,
ancestorMeetsSse,
- northwestDetails,
+ northwestDetails
);
visitIfVisible(
primitive,
@@ -1040,7 +1040,7 @@ function visitVisibleChildrenNearToFar(
frameState,
occluders,
ancestorMeetsSse,
- northeastDetails,
+ northeastDetails
);
} else {
// Camera in northwest quadrant
@@ -1051,7 +1051,7 @@ function visitVisibleChildrenNearToFar(
frameState,
occluders,
ancestorMeetsSse,
- northwestDetails,
+ northwestDetails
);
visitIfVisible(
primitive,
@@ -1060,7 +1060,7 @@ function visitVisibleChildrenNearToFar(
frameState,
occluders,
ancestorMeetsSse,
- southwestDetails,
+ southwestDetails
);
visitIfVisible(
primitive,
@@ -1069,7 +1069,7 @@ function visitVisibleChildrenNearToFar(
frameState,
occluders,
ancestorMeetsSse,
- northeastDetails,
+ northeastDetails
);
visitIfVisible(
primitive,
@@ -1078,7 +1078,7 @@ function visitVisibleChildrenNearToFar(
frameState,
occluders,
ancestorMeetsSse,
- southeastDetails,
+ southeastDetails
);
}
} else if (cameraPosition.latitude < southwest.rectangle.north) {
@@ -1090,7 +1090,7 @@ function visitVisibleChildrenNearToFar(
frameState,
occluders,
ancestorMeetsSse,
- southeastDetails,
+ southeastDetails
);
visitIfVisible(
primitive,
@@ -1099,7 +1099,7 @@ function visitVisibleChildrenNearToFar(
frameState,
occluders,
ancestorMeetsSse,
- southwestDetails,
+ southwestDetails
);
visitIfVisible(
primitive,
@@ -1108,7 +1108,7 @@ function visitVisibleChildrenNearToFar(
frameState,
occluders,
ancestorMeetsSse,
- northeastDetails,
+ northeastDetails
);
visitIfVisible(
primitive,
@@ -1117,7 +1117,7 @@ function visitVisibleChildrenNearToFar(
frameState,
occluders,
ancestorMeetsSse,
- northwestDetails,
+ northwestDetails
);
} else {
// Camera in northeast quadrant
@@ -1128,7 +1128,7 @@ function visitVisibleChildrenNearToFar(
frameState,
occluders,
ancestorMeetsSse,
- northeastDetails,
+ northeastDetails
);
visitIfVisible(
primitive,
@@ -1137,7 +1137,7 @@ function visitVisibleChildrenNearToFar(
frameState,
occluders,
ancestorMeetsSse,
- northwestDetails,
+ northwestDetails
);
visitIfVisible(
primitive,
@@ -1146,7 +1146,7 @@ function visitVisibleChildrenNearToFar(
frameState,
occluders,
ancestorMeetsSse,
- southeastDetails,
+ southeastDetails
);
visitIfVisible(
primitive,
@@ -1155,7 +1155,7 @@ function visitVisibleChildrenNearToFar(
frameState,
occluders,
ancestorMeetsSse,
- southwestDetails,
+ southwestDetails
);
}
@@ -1170,7 +1170,7 @@ function containsNeededPosition(primitive, tile) {
(defined(primitive._cameraReferenceFrameOriginCartographic) &&
Rectangle.contains(
rectangle,
- primitive._cameraReferenceFrameOriginCartographic,
+ primitive._cameraReferenceFrameOriginCartographic
))
);
}
@@ -1182,7 +1182,7 @@ function visitIfVisible(
frameState,
occluders,
ancestorMeetsSse,
- traversalDetails,
+ traversalDetails
) {
if (
tileProvider.computeTileVisibility(tile, frameState, occluders) !==
@@ -1193,7 +1193,7 @@ function visitIfVisible(
frameState,
tile,
ancestorMeetsSse,
- traversalDetails,
+ traversalDetails
);
}
@@ -1213,7 +1213,7 @@ function visitIfVisible(
primitive,
primitive._tileLoadQueueMedium,
tile,
- frameState,
+ frameState
);
}
@@ -1251,8 +1251,9 @@ function screenSpaceError(primitive, frameState, tile) {
return screenSpaceError2D(primitive, frameState, tile);
}
- const maxGeometricError =
- primitive._tileProvider.getLevelMaximumGeometricError(tile.level);
+ const maxGeometricError = primitive._tileProvider.getLevelMaximumGeometricError(
+ tile.level
+ );
const distance = tile._distance;
const height = frameState.context.drawingBufferHeight;
@@ -1282,8 +1283,9 @@ function screenSpaceError2D(primitive, frameState, tile) {
const width = context.drawingBufferWidth;
const height = context.drawingBufferHeight;
- const maxGeometricError =
- primitive._tileProvider.getLevelMaximumGeometricError(tile.level);
+ const maxGeometricError = primitive._tileProvider.getLevelMaximumGeometricError(
+ tile.level
+ );
const pixelSize =
Math.max(frustum.top - frustum.bottom, frustum.right - frustum.left) /
Math.max(width, height);
@@ -1330,7 +1332,7 @@ function processTileLoadQueue(primitive, frameState) {
tileProvider,
endTime,
tileLoadQueueHigh,
- false,
+ false
);
didSomeLoading = processSinglePriorityLoadQueue(
primitive,
@@ -1338,7 +1340,7 @@ function processTileLoadQueue(primitive, frameState) {
tileProvider,
endTime,
tileLoadQueueMedium,
- didSomeLoading,
+ didSomeLoading
);
processSinglePriorityLoadQueue(
primitive,
@@ -1346,7 +1348,7 @@ function processTileLoadQueue(primitive, frameState) {
tileProvider,
endTime,
tileLoadQueueLow,
- didSomeLoading,
+ didSomeLoading
);
}
@@ -1360,7 +1362,7 @@ function processSinglePriorityLoadQueue(
tileProvider,
endTime,
loadQueue,
- didSomeLoading,
+ didSomeLoading
) {
if (tileProvider.computeTileLoadPriority !== undefined) {
loadQueue.sort(sortByLoadPriority);
@@ -1441,14 +1443,14 @@ function updateHeights(primitive, frameState) {
data.positionCartographic.longitude,
data.positionCartographic.latitude,
0.0,
- ellipsoid,
+ ellipsoid
);
}
if (mode === SceneMode.SCENE3D) {
const surfaceNormal = ellipsoid.geodeticSurfaceNormal(
data.positionOnEllipsoidSurface,
- scratchRay.direction,
+ scratchRay.direction
);
// compute origin point
@@ -1458,7 +1460,7 @@ function updateHeights(primitive, frameState) {
const rayOrigin = ellipsoid.getSurfaceNormalIntersectionWithZAxis(
data.positionOnEllipsoidSurface,
11500.0,
- scratchRay.origin,
+ scratchRay.origin
);
// Theoretically, not with Earth datums, the intersection point can be outside the ellipsoid
@@ -1475,12 +1477,12 @@ function updateHeights(primitive, frameState) {
const vectorToMinimumPoint = Cartesian3.multiplyByScalar(
surfaceNormal,
Math.abs(magnitude) + 1,
- scratchPosition,
+ scratchPosition
);
Cartesian3.subtract(
data.positionOnEllipsoidSurface,
vectorToMinimumPoint,
- scratchRay.origin,
+ scratchRay.origin
);
}
} else {
@@ -1493,7 +1495,7 @@ function updateHeights(primitive, frameState) {
scratchPosition.z,
scratchPosition.x,
scratchPosition.y,
- scratchPosition,
+ scratchPosition
);
Cartesian3.clone(scratchPosition, scratchRay.origin);
Cartesian3.clone(Cartesian3.UNIT_X, scratchRay.direction);
@@ -1504,7 +1506,7 @@ function updateHeights(primitive, frameState) {
mode,
projection,
false,
- scratchPosition,
+ scratchPosition
);
if (defined(position)) {
if (defined(data.callback)) {
diff --git a/packages/engine/Source/Scene/QuadtreeTile.js b/packages/engine/Source/Scene/QuadtreeTile.js
index c0ccdde4dc97..601458acbbf7 100644
--- a/packages/engine/Source/Scene/QuadtreeTile.js
+++ b/packages/engine/Source/Scene/QuadtreeTile.js
@@ -28,12 +28,12 @@ function QuadtreeTile(options) {
throw new DeveloperError("options.y is required.");
} else if (options.x < 0 || options.y < 0) {
throw new DeveloperError(
- "options.x and options.y must be greater than or equal to zero.",
+ "options.x and options.y must be greater than or equal to zero."
);
}
if (!defined(options.level)) {
throw new DeveloperError(
- "options.level is required and must be greater than or equal to zero.",
+ "options.level is required and must be greater than or equal to zero."
);
}
if (!defined(options.tilingScheme)) {
@@ -49,7 +49,7 @@ function QuadtreeTile(options) {
this._rectangle = this._tilingScheme.tileXYToRectangle(
this._x,
this._y,
- this._level,
+ this._level
);
this._southwestChild = undefined;
@@ -146,7 +146,7 @@ QuadtreeTile.createLevelZeroTiles = function (tilingScheme) {
QuadtreeTile.prototype._updateCustomData = function (
frameNumber,
added,
- removed,
+ removed
) {
let customData = this.customData;
diff --git a/packages/engine/Source/Scene/QuadtreeTileProvider.js b/packages/engine/Source/Scene/QuadtreeTileProvider.js
index 9f1bfee43906..75cce94869f8 100644
--- a/packages/engine/Source/Scene/QuadtreeTileProvider.js
+++ b/packages/engine/Source/Scene/QuadtreeTileProvider.js
@@ -22,7 +22,7 @@ function QuadtreeTileProvider() {
* @returns {number} The maximum geometric error at level zero, in meters.
*/
QuadtreeTileProvider.computeDefaultLevelZeroMaximumGeometricError = function (
- tilingScheme,
+ tilingScheme
) {
return (
(tilingScheme.ellipsoid.maximumRadius * 2 * Math.PI * 0.25) /
diff --git a/packages/engine/Source/Scene/ResourceCache.js b/packages/engine/Source/Scene/ResourceCache.js
index 8d6c2a6afab6..e29571cfb994 100644
--- a/packages/engine/Source/Scene/ResourceCache.js
+++ b/packages/engine/Source/Scene/ResourceCache.js
@@ -89,7 +89,7 @@ ResourceCache.add = function (resourceLoader) {
if (defined(ResourceCache.cacheEntries[cacheKey])) {
throw new DeveloperError(
- `Resource with this cacheKey is already in the cache: ${cacheKey}`,
+ `Resource with this cacheKey is already in the cache: ${cacheKey}`
);
}
//>>includeEnd('debug');
@@ -151,7 +151,7 @@ ResourceCache.getSchemaLoader = function (options) {
//>>includeStart('debug', pragmas.debug);
if (defined(schema) === defined(resource)) {
throw new DeveloperError(
- "One of options.schema and options.resource must be defined.",
+ "One of options.schema and options.resource must be defined."
);
}
//>>includeEnd('debug');
@@ -434,7 +434,7 @@ ResourceCache.getVertexBufferLoader = function (options) {
Check.typeOf.object("options.frameState", frameState);
if (!loadBuffer && !loadTypedArray) {
throw new DeveloperError(
- "At least one of loadBuffer and loadTypedArray must be true.",
+ "At least one of loadBuffer and loadTypedArray must be true."
);
}
@@ -445,19 +445,19 @@ ResourceCache.getVertexBufferLoader = function (options) {
if (hasBufferViewId === hasDraco) {
throw new DeveloperError(
- "One of options.bufferViewId and options.draco must be defined.",
+ "One of options.bufferViewId and options.draco must be defined."
);
}
if (hasDraco && !hasAttributeSemantic) {
throw new DeveloperError(
- "When options.draco is defined options.attributeSemantic must also be defined.",
+ "When options.draco is defined options.attributeSemantic must also be defined."
);
}
if (hasDraco && !hasAccessorId) {
throw new DeveloperError(
- "When options.draco is defined options.haAccessorId must also be defined.",
+ "When options.draco is defined options.haAccessorId must also be defined."
);
}
@@ -551,7 +551,7 @@ ResourceCache.getIndexBufferLoader = function (options) {
Check.typeOf.object("options.frameState", frameState);
if (!loadBuffer && !loadTypedArray) {
throw new DeveloperError(
- "At least one of loadBuffer and loadTypedArray must be true.",
+ "At least one of loadBuffer and loadTypedArray must be true."
);
}
//>>includeEnd('debug');
diff --git a/packages/engine/Source/Scene/ResourceCacheKey.js b/packages/engine/Source/Scene/ResourceCacheKey.js
index 085a2d3d0b70..6763461cebcb 100644
--- a/packages/engine/Source/Scene/ResourceCacheKey.js
+++ b/packages/engine/Source/Scene/ResourceCacheKey.js
@@ -63,7 +63,7 @@ function getDracoCacheKey(gltf, draco, gltfResource, baseResource) {
buffer,
bufferId,
gltfResource,
- baseResource,
+ baseResource
);
const bufferViewCacheKey = getBufferViewCacheKey(bufferView);
@@ -91,7 +91,7 @@ function getImageCacheKey(gltf, imageId, gltfResource, baseResource) {
buffer,
bufferId,
gltfResource,
- baseResource,
+ baseResource
);
const bufferViewCacheKey = getBufferViewCacheKey(bufferView);
@@ -126,7 +126,7 @@ ResourceCacheKey.getSchemaCacheKey = function (options) {
//>>includeStart('debug', pragmas.debug);
if (defined(schema) === defined(resource)) {
throw new DeveloperError(
- "One of options.schema and options.resource must be defined.",
+ "One of options.schema and options.resource must be defined."
);
}
//>>includeEnd('debug');
@@ -179,7 +179,7 @@ ResourceCacheKey.getEmbeddedBufferCacheKey = function (options) {
return `embedded-buffer:${getEmbeddedBufferCacheKey(
parentResource,
- bufferId,
+ bufferId
)}`;
};
@@ -238,7 +238,7 @@ ResourceCacheKey.getBufferViewCacheKey = function (options) {
buffer,
bufferId,
gltfResource,
- baseResource,
+ baseResource
);
const bufferViewCacheKey = getBufferViewCacheKey(bufferView);
@@ -319,13 +319,13 @@ ResourceCacheKey.getVertexBufferCacheKey = function (options) {
if (hasBufferViewId === hasDraco) {
throw new DeveloperError(
- "One of options.bufferViewId and options.draco must be defined.",
+ "One of options.bufferViewId and options.draco must be defined."
);
}
if (hasDraco && !hasAttributeSemantic) {
throw new DeveloperError(
- "When options.draco is defined options.attributeSemantic must also be defined.",
+ "When options.draco is defined options.attributeSemantic must also be defined."
);
}
@@ -336,7 +336,7 @@ ResourceCacheKey.getVertexBufferCacheKey = function (options) {
if (!loadBuffer && !loadTypedArray) {
throw new DeveloperError(
- "At least one of loadBuffer and loadTypedArray must be true.",
+ "At least one of loadBuffer and loadTypedArray must be true."
);
}
//>>includeEnd('debug');
@@ -360,7 +360,7 @@ ResourceCacheKey.getVertexBufferCacheKey = function (options) {
gltf,
draco,
gltfResource,
- baseResource,
+ baseResource
);
return `vertex-buffer:${dracoCacheKey}-draco-${attributeSemantic}${cacheKeySuffix}`;
}
@@ -373,7 +373,7 @@ ResourceCacheKey.getVertexBufferCacheKey = function (options) {
buffer,
bufferId,
gltfResource,
- baseResource,
+ baseResource
);
const bufferViewCacheKey = getBufferViewCacheKey(bufferView);
@@ -427,7 +427,7 @@ ResourceCacheKey.getIndexBufferCacheKey = function (options) {
if (!loadBuffer && !loadTypedArray) {
throw new DeveloperError(
- "At least one of loadBuffer and loadTypedArray must be true.",
+ "At least one of loadBuffer and loadTypedArray must be true."
);
}
//>>includeEnd('debug');
@@ -447,7 +447,7 @@ ResourceCacheKey.getIndexBufferCacheKey = function (options) {
gltf,
draco,
gltfResource,
- baseResource,
+ baseResource
);
return `index-buffer:${dracoCacheKey}-draco${cacheKeySuffix}`;
}
@@ -462,7 +462,7 @@ ResourceCacheKey.getIndexBufferCacheKey = function (options) {
buffer,
bufferId,
gltfResource,
- baseResource,
+ baseResource
);
const accessorCacheKey = getAccessorCacheKey(accessor, bufferView);
@@ -497,7 +497,7 @@ ResourceCacheKey.getImageCacheKey = function (options) {
gltf,
imageId,
gltfResource,
- baseResource,
+ baseResource
);
return `image:${imageCacheKey}`;
@@ -549,7 +549,7 @@ ResourceCacheKey.getTextureCacheKey = function (options) {
gltf,
imageId,
gltfResource,
- baseResource,
+ baseResource
);
// Include the sampler cache key in the texture cache key since textures and
diff --git a/packages/engine/Source/Scene/Scene.js b/packages/engine/Source/Scene/Scene.js
index e751dda94087..cfaf2da03a19 100644
--- a/packages/engine/Source/Scene/Scene.js
+++ b/packages/engine/Source/Scene/Scene.js
@@ -2364,7 +2364,6 @@ function executeTranslucentCommandsFrontToBack(
executeFunction(commands[i], scene, passState);
}
}
-
/**
* Execute commands to render voxels in the scene.
*
@@ -2387,6 +2386,20 @@ function performVoxelsPass(scene, passState, frustumCommands) {
}
}
+function performGaussianSplatPass(scene, passState, frustumCommands) {
+ scene.context.uniformState.updatePass(Pass.GAUSSIAN_SPLATS);
+
+ const commands = frustumCommands.commands[Pass.GAUSSIAN_SPLATS];
+ commands.length = frustumCommands.indices[Pass.GAUSSIAN_SPLATS];
+
+ //still necessary?
+ mergeSort(commands, backToFront, scene.camera.positionWC);
+
+ for (let i = 0; i < commands.length; ++i) {
+ executeCommand(commands[i], scene, passState);
+ }
+}
+
const scratchPerspectiveFrustum = new PerspectiveFrustum();
const scratchPerspectiveOffCenterFrustum = new PerspectiveOffCenterFrustum();
const scratchOrthographicFrustum = new OrthographicFrustum();
@@ -2784,6 +2797,8 @@ function executeCommands(scene, passState) {
performPass(frustumCommands, Pass.OPAQUE);
+ performGaussianSplatPass(scene, passState, frustumCommands);
+
if (index !== 0 && scene.mode !== SceneMode.SCENE2D) {
// Do not overlap frustums in the translucent pass to avoid blending artifacts
frustum.near = frustumCommands.near;
diff --git a/packages/engine/Source/Scene/SceneFramebuffer.js b/packages/engine/Source/Scene/SceneFramebuffer.js
index 72e2611d58d4..274c623a5e8a 100644
--- a/packages/engine/Source/Scene/SceneFramebuffer.js
+++ b/packages/engine/Source/Scene/SceneFramebuffer.js
@@ -54,7 +54,7 @@ SceneFramebuffer.prototype.update = function (
context,
viewport,
hdr,
- numSamples,
+ numSamples
) {
const width = viewport.width;
const height = viewport.height;
@@ -69,7 +69,7 @@ SceneFramebuffer.prototype.update = function (
width,
height,
numSamples,
- pixelDatatype,
+ pixelDatatype
);
this._idFramebuffer.update(context, width, height);
};
diff --git a/packages/engine/Source/Scene/SceneTransforms.js b/packages/engine/Source/Scene/SceneTransforms.js
index d982dbd8308e..84ae7a032b52 100644
--- a/packages/engine/Source/Scene/SceneTransforms.js
+++ b/packages/engine/Source/Scene/SceneTransforms.js
@@ -48,7 +48,7 @@ SceneTransforms.worldToWindowCoordinates = function (scene, position, result) {
scene,
position,
Cartesian3.ZERO,
- result,
+ result
);
};
@@ -65,15 +65,15 @@ function worldToClip(position, eyeOffset, camera, result) {
position.y,
position.z,
1,
- scratchCartesian4,
+ scratchCartesian4
),
- scratchCartesian4,
+ scratchCartesian4
);
const zEyeOffset = Cartesian3.multiplyComponents(
eyeOffset,
Cartesian3.normalize(positionEC, scratchEyeOffset),
- scratchEyeOffset,
+ scratchEyeOffset
);
positionEC.x += eyeOffset.x + zEyeOffset.x;
positionEC.y += eyeOffset.y + zEyeOffset.y;
@@ -82,13 +82,13 @@ function worldToClip(position, eyeOffset, camera, result) {
return Matrix4.multiplyByVector(
camera.frustum.projectionMatrix,
positionEC,
- result,
+ result
);
}
const scratchMaxCartographic = new Cartographic(
Math.PI,
- CesiumMath.PI_OVER_TWO,
+ CesiumMath.PI_OVER_TWO
);
const scratchProjectedCartesian = new Cartesian3();
const scratchCameraPosition = new Cartesian3();
@@ -100,7 +100,7 @@ SceneTransforms.worldWithEyeOffsetToWindowCoordinates = function (
scene,
position,
eyeOffset,
- result,
+ result
) {
//>>includeStart('debug', pragmas.debug);
if (!defined(scene)) {
@@ -116,7 +116,7 @@ SceneTransforms.worldWithEyeOffsetToWindowCoordinates = function (
const actualPosition = SceneTransforms.computeActualEllipsoidPosition(
frameState,
position,
- actualPositionScratch,
+ actualPositionScratch
);
if (!defined(actualPosition)) {
@@ -139,12 +139,12 @@ SceneTransforms.worldWithEyeOffsetToWindowCoordinates = function (
const maxCartographic = scratchMaxCartographic;
const maxCoord = projection.project(
maxCartographic,
- scratchProjectedCartesian,
+ scratchProjectedCartesian
);
const cameraPosition = Cartesian3.clone(
camera.position,
- scratchCameraPosition,
+ scratchCameraPosition
);
const frustum = camera.frustum.clone();
@@ -152,7 +152,7 @@ SceneTransforms.worldWithEyeOffsetToWindowCoordinates = function (
viewport,
0.0,
1.0,
- new Matrix4(),
+ new Matrix4()
);
const projectionMatrix = camera.frustum.projectionMatrix;
@@ -160,12 +160,12 @@ SceneTransforms.worldWithEyeOffsetToWindowCoordinates = function (
const eyePoint = Cartesian3.fromElements(
CesiumMath.sign(x) * maxCoord.x - x,
0.0,
- -camera.positionWC.x,
+ -camera.positionWC.x
);
const windowCoordinates = Transforms.pointToGLWindowCoordinates(
projectionMatrix,
viewportTransformation,
- eyePoint,
+ eyePoint
);
if (
@@ -184,7 +184,7 @@ SceneTransforms.worldWithEyeOffsetToWindowCoordinates = function (
SceneTransforms.clipToGLWindowCoordinates(
viewport,
positionCC,
- scratchWindowCoord0,
+ scratchWindowCoord0
);
viewport.x += windowCoordinates.x;
@@ -199,7 +199,7 @@ SceneTransforms.worldWithEyeOffsetToWindowCoordinates = function (
SceneTransforms.clipToGLWindowCoordinates(
viewport,
positionCC,
- scratchWindowCoord1,
+ scratchWindowCoord1
);
} else {
viewport.x += windowCoordinates.x;
@@ -211,7 +211,7 @@ SceneTransforms.worldWithEyeOffsetToWindowCoordinates = function (
SceneTransforms.clipToGLWindowCoordinates(
viewport,
positionCC,
- scratchWindowCoord0,
+ scratchWindowCoord0
);
viewport.x = viewport.x - viewport.width;
@@ -226,7 +226,7 @@ SceneTransforms.worldWithEyeOffsetToWindowCoordinates = function (
SceneTransforms.clipToGLWindowCoordinates(
viewport,
positionCC,
- scratchWindowCoord1,
+ scratchWindowCoord1
);
}
@@ -254,7 +254,7 @@ SceneTransforms.worldWithEyeOffsetToWindowCoordinates = function (
result = SceneTransforms.clipToGLWindowCoordinates(
viewport,
positionCC,
- result,
+ result
);
}
@@ -282,7 +282,7 @@ SceneTransforms.worldWithEyeOffsetToWindowCoordinates = function (
SceneTransforms.worldToDrawingBufferCoordinates = function (
scene,
position,
- result,
+ result
) {
result = SceneTransforms.worldToWindowCoordinates(scene, position, result);
if (!defined(result)) {
@@ -301,7 +301,7 @@ const positionInCartographic = new Cartographic();
SceneTransforms.computeActualEllipsoidPosition = function (
frameState,
position,
- result,
+ result
) {
const mode = frameState.mode;
@@ -312,7 +312,7 @@ SceneTransforms.computeActualEllipsoidPosition = function (
const projection = frameState.mapProjection;
const cartographic = projection.ellipsoid.cartesianToCartographic(
position,
- positionInCartographic,
+ positionInCartographic
);
if (!defined(cartographic)) {
return undefined;
@@ -325,7 +325,7 @@ SceneTransforms.computeActualEllipsoidPosition = function (
projectedPosition.z,
projectedPosition.x,
projectedPosition.y,
- result,
+ result
);
}
@@ -334,7 +334,7 @@ SceneTransforms.computeActualEllipsoidPosition = function (
0.0,
projectedPosition.x,
projectedPosition.y,
- result,
+ result
);
}
@@ -344,7 +344,7 @@ SceneTransforms.computeActualEllipsoidPosition = function (
CesiumMath.lerp(projectedPosition.z, position.x, morphTime),
CesiumMath.lerp(projectedPosition.x, position.y, morphTime),
CesiumMath.lerp(projectedPosition.y, position.z, morphTime),
- result,
+ result
);
};
@@ -358,7 +358,7 @@ const viewportTransform = new Matrix4();
SceneTransforms.clipToGLWindowCoordinates = function (
viewport,
position,
- result,
+ result
) {
// Perspective divide to transform from clip coordinates to normalized device coordinates
Cartesian3.divideByScalar(position, position.w, positionNDC);
@@ -376,7 +376,7 @@ SceneTransforms.clipToGLWindowCoordinates = function (
SceneTransforms.transformWindowToDrawingBuffer = function (
scene,
windowPosition,
- result,
+ result
) {
const canvas = scene.canvas;
const xScale = scene.drawingBufferWidth / canvas.clientWidth;
@@ -384,7 +384,7 @@ SceneTransforms.transformWindowToDrawingBuffer = function (
return Cartesian2.fromElements(
windowPosition.x * xScale,
windowPosition.y * yScale,
- result,
+ result
);
};
@@ -398,7 +398,7 @@ SceneTransforms.drawingBufferToWorldCoordinates = function (
scene,
drawingBufferPosition,
depth,
- result,
+ result
) {
const context = scene.context;
const uniformState = context.uniformState;
@@ -445,13 +445,13 @@ SceneTransforms.drawingBufferToWorldCoordinates = function (
worldCoords = Matrix4.multiplyByVector(
uniformState.inverseView,
worldCoords,
- worldCoords,
+ worldCoords
);
} else {
worldCoords = Matrix4.multiplyByVector(
uniformState.inverseViewProjection,
ndc,
- scratchWorldCoords,
+ scratchWorldCoords
);
// Reverse perspective divide
diff --git a/packages/engine/Source/Scene/SceneTransitioner.js b/packages/engine/Source/Scene/SceneTransitioner.js
index 56e177cc08b1..4e632f36e53d 100644
--- a/packages/engine/Source/Scene/SceneTransitioner.js
+++ b/packages/engine/Source/Scene/SceneTransitioner.js
@@ -58,7 +58,7 @@ SceneTransitioner.prototype.morphTo2D = function (duration, ellipsoid) {
this,
this._previousMode,
SceneMode.SCENE2D,
- true,
+ true
);
scene._mode = SceneMode.MORPHING;
@@ -98,7 +98,7 @@ const scratchToCVCamera = {
SceneTransitioner.prototype.morphToColumbusView = function (
duration,
- ellipsoid,
+ ellipsoid
) {
if (defined(this._completeMorph)) {
this._completeMorph();
@@ -117,7 +117,7 @@ SceneTransitioner.prototype.morphToColumbusView = function (
this,
this._previousMode,
SceneMode.COLUMBUS_VIEW,
- true,
+ true
);
scene.camera._setTransform(Matrix4.IDENTITY);
@@ -133,7 +133,7 @@ SceneTransitioner.prototype.morphToColumbusView = function (
position = Cartesian3.multiplyByScalar(
Cartesian3.normalize(position, position),
5.0 * ellipsoid.maximumRadius,
- position,
+ position
);
Cartesian3.negate(Cartesian3.normalize(position, direction), direction);
@@ -152,18 +152,18 @@ SceneTransitioner.prototype.morphToColumbusView = function (
const surfacePoint = ellipsoid.scaleToGeodeticSurface(
position,
- scratchToCVSurfacePosition,
+ scratchToCVSurfacePosition
);
const toENU = Transforms.eastNorthUpToFixedFrame(
surfacePoint,
ellipsoid,
- scratchToCVToENU,
+ scratchToCVToENU
);
Matrix4.inverseTransformation(toENU, toENU);
scene.mapProjection.project(
ellipsoid.cartesianToCartographic(position, scratchToCVCartographic),
- position,
+ position
);
Matrix4.multiplyByPointAsVector(toENU, direction, direction);
Matrix4.multiplyByPointAsVector(toENU, up, up);
@@ -196,17 +196,17 @@ SceneTransitioner.prototype.morphToColumbusView = function (
cameraCV.position2D = Matrix4.multiplyByPoint(
Camera.TRANSFORM_2D,
position,
- scratchToCVPosition2D,
+ scratchToCVPosition2D
);
cameraCV.direction2D = Matrix4.multiplyByPointAsVector(
Camera.TRANSFORM_2D,
direction,
- scratchToCVDirection2D,
+ scratchToCVDirection2D
);
cameraCV.up2D = Matrix4.multiplyByPointAsVector(
Camera.TRANSFORM_2D,
up,
- scratchToCVUp2D,
+ scratchToCVUp2D
);
scene._mode = SceneMode.MORPHING;
@@ -244,7 +244,7 @@ SceneTransitioner.prototype.morphTo3D = function (duration, ellipsoid) {
this,
this._previousMode,
SceneMode.SCENE3D,
- true,
+ true
);
scene._mode = SceneMode.MORPHING;
@@ -261,7 +261,7 @@ SceneTransitioner.prototype.morphTo3D = function (duration, ellipsoid) {
0.0,
5.0 * ellipsoid.maximumRadius,
ellipsoid,
- camera3D.position,
+ camera3D.position
);
Cartesian3.negate(camera3D.position, camera3D.direction);
Cartesian3.normalize(camera3D.direction, camera3D.direction);
@@ -323,7 +323,7 @@ SceneTransitioner.prototype.destroy = function () {
function createMorphHandler(transitioner, completeMorphFunction) {
if (transitioner._scene.completeMorphOnUserInput) {
transitioner._morphHandler = new ScreenSpaceEventHandler(
- transitioner._scene.canvas,
+ transitioner._scene.canvas
);
const completeMorph = function () {
@@ -334,19 +334,19 @@ function createMorphHandler(transitioner, completeMorphFunction) {
transitioner._completeMorph = completeMorph;
transitioner._morphHandler.setInputAction(
completeMorph,
- ScreenSpaceEventType.LEFT_DOWN,
+ ScreenSpaceEventType.LEFT_DOWN
);
transitioner._morphHandler.setInputAction(
completeMorph,
- ScreenSpaceEventType.MIDDLE_DOWN,
+ ScreenSpaceEventType.MIDDLE_DOWN
);
transitioner._morphHandler.setInputAction(
completeMorph,
- ScreenSpaceEventType.RIGHT_DOWN,
+ ScreenSpaceEventType.RIGHT_DOWN
);
transitioner._morphHandler.setInputAction(
completeMorph,
- ScreenSpaceEventType.WHEEL,
+ ScreenSpaceEventType.WHEEL
);
}
}
@@ -376,18 +376,18 @@ function getColumbusViewTo3DCamera(transitioner, ellipsoid) {
const positionCarto = scene.mapProjection.unproject(
camera.position,
- scratchCVTo3DCartographic,
+ scratchCVTo3DCartographic
);
ellipsoid.cartographicToCartesian(positionCarto, position);
const surfacePoint = ellipsoid.scaleToGeodeticSurface(
position,
- scratchCVTo3DSurfacePoint,
+ scratchCVTo3DSurfacePoint
);
const fromENU = Transforms.eastNorthUpToFixedFrame(
surfacePoint,
ellipsoid,
- scratchCVTo3DFromENU,
+ scratchCVTo3DFromENU
);
Matrix4.multiplyByPointAsVector(fromENU, camera.direction, direction);
@@ -407,7 +407,7 @@ function morphFromColumbusViewTo3D(
transitioner,
duration,
endCamera,
- complete,
+ complete
) {
duration *= 0.5;
@@ -421,17 +421,17 @@ function morphFromColumbusViewTo3D(
const endPos = Matrix4.multiplyByPoint(
Camera.TRANSFORM_2D_INVERSE,
endCamera.position,
- scratchCVTo3DEndPos,
+ scratchCVTo3DEndPos
);
const endDir = Matrix4.multiplyByPointAsVector(
Camera.TRANSFORM_2D_INVERSE,
endCamera.direction,
- scratchCVTo3DEndDir,
+ scratchCVTo3DEndDir
);
const endUp = Matrix4.multiplyByPointAsVector(
Camera.TRANSFORM_2D_INVERSE,
endCamera.up,
- scratchCVTo3DEndUp,
+ scratchCVTo3DEndUp
);
function update(value) {
@@ -481,7 +481,7 @@ function morphFrom2DTo3D(transitioner, duration, ellipsoid) {
0.0,
5.0 * ellipsoid.maximumRadius,
ellipsoid,
- camera3D.position,
+ camera3D.position
);
Cartesian3.negate(camera3D.position, camera3D.direction);
Cartesian3.normalize(camera3D.direction, camera3D.direction);
@@ -521,7 +521,7 @@ function morphFrom2DTo3D(transitioner, duration, ellipsoid) {
camera3D,
function () {
morphFromColumbusViewTo3D(transitioner, duration, camera3D, complete);
- },
+ }
);
};
}
@@ -535,7 +535,7 @@ function morphFrom2DTo3D(transitioner, duration, ellipsoid) {
0.0,
5.0 * ellipsoid.maximumRadius,
ellipsoid,
- scratch3DToCVEndPos,
+ scratch3DToCVEndPos
),
complete: function () {
scene._mode = SceneMode.MORPHING;
@@ -557,7 +557,7 @@ function morphPerspectiveToOrthographic(
duration,
endCamera,
updateHeight,
- complete,
+ complete
) {
const scene = transitioner._scene;
const camera = scene.camera;
@@ -636,7 +636,7 @@ function morphFromColumbusViewTo2D(transitioner, duration) {
Matrix4.multiplyByPointAsVector(
Camera.TRANSFORM_2D,
startDir,
- ray.direction,
+ ray.direction
);
const globe = scene.globe;
@@ -645,7 +645,7 @@ function morphFromColumbusViewTo2D(transitioner, duration) {
ray,
scene,
true,
- scratchCVTo2DPickPos,
+ scratchCVTo2DPickPos
);
if (defined(pickPos)) {
Matrix4.multiplyByPoint(Camera.TRANSFORM_2D_INVERSE, pickPos, endPos);
@@ -699,7 +699,7 @@ function morphFromColumbusViewTo2D(transitioner, duration) {
duration,
camera2D,
updateHeight,
- complete,
+ complete
);
},
});
@@ -742,7 +742,7 @@ function morphFrom3DTo2D(transitioner, duration, ellipsoid) {
} else {
ellipsoid.cartesianToCartographic(
camera.positionWC,
- scratch3DTo2DCartographic,
+ scratch3DTo2DCartographic
);
scene.mapProjection.project(scratch3DTo2DCartographic, camera2D.position);
@@ -754,19 +754,19 @@ function morphFrom3DTo2D(transitioner, duration, ellipsoid) {
const rayDirection = Cartesian3.clone(camera.directionWC, ray.direction);
const surfacePoint = ellipsoid.scaleToGeodeticSurface(
camera.positionWC,
- scratch3DTo2DSurfacePoint,
+ scratch3DTo2DSurfacePoint
);
const toENU = Transforms.eastNorthUpToFixedFrame(
surfacePoint,
ellipsoid,
- scratch3DTo2DToENU,
+ scratch3DTo2DToENU
);
Matrix4.inverseTransformation(toENU, toENU);
Matrix4.multiplyByPointAsVector(toENU, rayDirection, rayDirection);
Matrix4.multiplyByPointAsVector(
Camera.TRANSFORM_2D,
rayDirection,
- rayDirection,
+ rayDirection
);
const globe = scene.globe;
@@ -775,7 +775,7 @@ function morphFrom3DTo2D(transitioner, duration, ellipsoid) {
ray,
scene,
true,
- scratch3DTo2DPickPosition,
+ scratch3DTo2DPickPosition
);
if (defined(pickedPos)) {
const height = Cartesian3.distance(camera2D.position2D, pickedPos);
@@ -792,17 +792,17 @@ function morphFrom3DTo2D(transitioner, duration, ellipsoid) {
Matrix4.multiplyByPoint(
Camera.TRANSFORM_2D,
camera2D.position,
- camera2D.position2D,
+ camera2D.position2D
);
Matrix4.multiplyByPointAsVector(
Camera.TRANSFORM_2D,
camera2D.direction,
- camera2D.direction2D,
+ camera2D.direction2D
);
Matrix4.multiplyByPointAsVector(
Camera.TRANSFORM_2D,
camera2D.up,
- camera2D.up2D,
+ camera2D.up2D
);
const frustum = camera2D.frustum;
@@ -816,7 +816,7 @@ function morphFrom3DTo2D(transitioner, duration, ellipsoid) {
Matrix4.multiplyByPoint(
Camera.TRANSFORM_2D_INVERSE,
camera2D.position2D,
- endCamera.position,
+ endCamera.position
);
Cartesian3.clone(camera2D.direction, endCamera.direction);
Cartesian3.clone(camera2D.up, endCamera.up);
@@ -831,7 +831,7 @@ function morphFrom3DTo2D(transitioner, duration, ellipsoid) {
duration,
camera2D,
updateHeight,
- complete,
+ complete
);
}
morphFrom3DToColumbusView(transitioner, duration, camera2D, completeCallback);
@@ -841,7 +841,7 @@ function morphOrthographicToPerspective(
transitioner,
duration,
cameraCV,
- complete,
+ complete
) {
const scene = transitioner._scene;
const camera = scene.camera;
@@ -931,7 +931,7 @@ function morphFrom3DToColumbusView(
transitioner,
duration,
endCamera,
- complete,
+ complete
) {
const scene = transitioner._scene;
const camera = scene.camera;
@@ -975,7 +975,7 @@ function addMorphTimeAnimations(
start,
stop,
duration,
- complete,
+ complete
) {
// Later, this will be linear and each object will adjust, if desired, in its vertex shader.
const options = {
@@ -1034,7 +1034,7 @@ function complete3DCallback(camera3D) {
transitioner,
transitioner._previousMode,
SceneMode.SCENE3D,
- wasMorphing,
+ wasMorphing
);
};
}
@@ -1064,7 +1064,7 @@ function complete2DCallback(camera2D) {
transitioner,
transitioner._previousMode,
SceneMode.SCENE2D,
- wasMorphing,
+ wasMorphing
);
};
}
@@ -1104,7 +1104,7 @@ function completeColumbusViewCallback(cameraCV) {
transitioner,
transitioner._previousMode,
SceneMode.COLUMBUS_VIEW,
- wasMorphing,
+ wasMorphing
);
};
}
diff --git a/packages/engine/Source/Scene/ScreenSpaceCameraController.js b/packages/engine/Source/Scene/ScreenSpaceCameraController.js
index 54e7aee3e113..44493e3def42 100644
--- a/packages/engine/Source/Scene/ScreenSpaceCameraController.js
+++ b/packages/engine/Source/Scene/ScreenSpaceCameraController.js
@@ -242,7 +242,7 @@ function ScreenSpaceCameraController(scene) {
* @default 4000.0 or scene.ellipsoid.minimumRadius * 0.00063
*/
this.minimumPickingTerrainDistanceWithInertia = Ellipsoid.WGS84.equals(
- ellipsoid,
+ ellipsoid
)
? 4000.0
: ellipsoid.minimumRadius * 0.00063;
@@ -328,7 +328,7 @@ function ScreenSpaceCameraController(scene) {
const projection = scene.mapProjection;
this._maxCoord = projection.project(
- new Cartographic(Math.PI, CesiumMath.PI_OVER_TWO),
+ new Cartographic(Math.PI, CesiumMath.PI_OVER_TWO)
);
// Constants, Make any of these public?
@@ -355,7 +355,7 @@ function sameMousePosition(movement) {
return Cartesian2.equalsEpsilon(
movement.startPosition,
movement.endPosition,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
}
@@ -372,7 +372,7 @@ function maintainInertia(
decayCoef,
action,
object,
- lastMovementName,
+ lastMovementName
) {
let movementState = object[lastMovementName];
if (!defined(movementState)) {
@@ -410,18 +410,18 @@ function maintainInertia(
movementState.startPosition = Cartesian2.clone(
lastMovement.startPosition,
- movementState.startPosition,
+ movementState.startPosition
);
movementState.endPosition = Cartesian2.multiplyByScalar(
movementState.motion,
d,
- movementState.endPosition,
+ movementState.endPosition
);
movementState.endPosition = Cartesian2.add(
movementState.startPosition,
movementState.endPosition,
- movementState.endPosition,
+ movementState.endPosition
);
// If value from the decreasing exponential function is close to zero,
@@ -431,7 +431,7 @@ function maintainInertia(
isNaN(movementState.endPosition.y) ||
Cartesian2.distance(
movementState.startPosition,
- movementState.endPosition,
+ movementState.endPosition
) < 0.5
) {
return;
@@ -473,7 +473,7 @@ function reactToInput(
eventTypes,
action,
inertiaConstant,
- inertiaStateName,
+ inertiaStateName
) {
if (!defined(eventTypes)) {
return;
@@ -509,7 +509,7 @@ function reactToInput(
inertiaConstant,
action,
controller,
- inertiaStateName,
+ inertiaStateName
);
}
}
@@ -551,14 +551,14 @@ function handleZoom(
movement,
zoomFactor,
distanceMeasure,
- unitPositionDotDirection,
+ unitPositionDotDirection
) {
let percentage = 1.0;
if (defined(unitPositionDotDirection)) {
percentage = CesiumMath.clamp(
Math.abs(unitPositionDotDirection),
0.25,
- 1.0,
+ 1.0
);
}
@@ -577,7 +577,7 @@ function handleZoom(
zoomRate = CesiumMath.clamp(
zoomRate,
object._minimumZoomRate,
- object._maximumZoomRate,
+ object._maximumZoomRate
);
let rangeWindowRatio = diff / object._scene.canvas.clientHeight;
@@ -623,7 +623,7 @@ function handleZoom(
const sameStartPosition = defaultValue(
movement.inertiaEnabled,
- Cartesian2.equals(startPosition, object._zoomMouseStart),
+ Cartesian2.equals(startPosition, object._zoomMouseStart)
);
let zoomingOnVector = object._zoomingOnVector;
let rotatingZoom = object._rotatingZoom;
@@ -632,25 +632,23 @@ function handleZoom(
if (!sameStartPosition) {
object._zoomMouseStart = Cartesian2.clone(
startPosition,
- object._zoomMouseStart,
+ object._zoomMouseStart
);
// When camera transform is set, such as tracking an entity, object._globe will be undefined, and no position should be picked
if (defined(object._globe) && mode === SceneMode.SCENE2D) {
- pickedPosition = camera.getPickRay(
- startPosition,
- scratchZoomPickRay,
- ).origin;
+ pickedPosition = camera.getPickRay(startPosition, scratchZoomPickRay)
+ .origin;
pickedPosition = Cartesian3.fromElements(
pickedPosition.y,
pickedPosition.z,
- pickedPosition.x,
+ pickedPosition.x
);
} else if (defined(object._globe)) {
pickedPosition = pickPosition(
object,
startPosition,
- scratchPickCartesian,
+ scratchPickCartesian
);
}
@@ -658,7 +656,7 @@ function handleZoom(
object._useZoomWorldPosition = true;
object._zoomWorldPosition = Cartesian3.clone(
pickedPosition,
- object._zoomWorldPosition,
+ object._zoomWorldPosition
);
} else {
object._useZoomWorldPosition = false;
@@ -694,7 +692,7 @@ function handleZoom(
const direction = Cartesian3.subtract(
worldPosition,
endPosition,
- scratchZoomDirection,
+ scratchZoomDirection
);
Cartesian3.normalize(direction, direction);
@@ -707,25 +705,23 @@ function handleZoom(
(camera.position.x < 0.0 && savedX > 0.0) ||
(camera.position.x > 0.0 && savedX < 0.0)
) {
- pickedPosition = camera.getPickRay(
- startPosition,
- scratchZoomPickRay,
- ).origin;
+ pickedPosition = camera.getPickRay(startPosition, scratchZoomPickRay)
+ .origin;
pickedPosition = Cartesian3.fromElements(
pickedPosition.y,
pickedPosition.z,
- pickedPosition.x,
+ pickedPosition.x
);
object._zoomWorldPosition = Cartesian3.clone(
pickedPosition,
- object._zoomWorldPosition,
+ object._zoomWorldPosition
);
}
}
} else if (mode === SceneMode.SCENE3D) {
const cameraPositionNormal = Cartesian3.normalize(
camera.position,
- scratchCameraPositionNormal,
+ scratchCameraPositionNormal
);
if (
object._cameraUnderground ||
@@ -744,7 +740,7 @@ function handleZoom(
const centerPosition = pickPosition(
object,
centerPixel,
- scratchCenterPosition,
+ scratchCenterPosition
);
// If centerPosition is not defined, it means the globe does not cover the center position of screen
@@ -776,7 +772,7 @@ function handleZoom(
Cartesian3.add(
cameraPosition,
Cartesian3.multiplyByScalar(forward, 1000, scratchCartesian),
- center,
+ center
);
const positionToTarget = scratchPositionToTarget;
@@ -787,7 +783,7 @@ function handleZoom(
const alphaDot = Cartesian3.dot(
cameraPositionNormal,
- positionToTargetNormal,
+ positionToTargetNormal
);
if (alphaDot >= 0.0) {
// We zoomed past the target, and this zoom is not valid anymore.
@@ -799,22 +795,23 @@ function handleZoom(
const cameraDistance = Cartesian3.magnitude(cameraPosition);
const targetDistance = Cartesian3.magnitude(target);
const remainingDistance = cameraDistance - distance;
- const positionToTargetDistance =
- Cartesian3.magnitude(positionToTarget);
+ const positionToTargetDistance = Cartesian3.magnitude(
+ positionToTarget
+ );
const gamma = Math.asin(
CesiumMath.clamp(
(positionToTargetDistance / targetDistance) * Math.sin(alpha),
-1.0,
- 1.0,
- ),
+ 1.0
+ )
);
const delta = Math.asin(
CesiumMath.clamp(
(remainingDistance / targetDistance) * Math.sin(alpha),
-1.0,
- 1.0,
- ),
+ 1.0
+ )
);
const beta = gamma - delta + alpha;
@@ -826,20 +823,20 @@ function handleZoom(
Cartesian3.normalize(
Cartesian3.cross(up, right, scratchCartesian),
- forward,
+ forward
);
// Calculate new position to move to
Cartesian3.multiplyByScalar(
Cartesian3.normalize(center, scratchCartesian),
Cartesian3.magnitude(center) - distance,
- center,
+ center
);
Cartesian3.normalize(cameraPosition, cameraPosition);
Cartesian3.multiplyByScalar(
cameraPosition,
remainingDistance,
- cameraPosition,
+ cameraPosition
);
// Pan
@@ -849,24 +846,24 @@ function handleZoom(
Cartesian3.multiplyByScalar(
up,
Math.cos(beta) - 1,
- scratchCartesianTwo,
+ scratchCartesianTwo
),
Cartesian3.multiplyByScalar(
forward,
Math.sin(beta),
- scratchCartesianThree,
+ scratchCartesianThree
),
- scratchCartesian,
+ scratchCartesian
),
remainingDistance,
- pMid,
+ pMid
);
Cartesian3.add(cameraPosition, pMid, cameraPosition);
Cartesian3.normalize(center, up);
Cartesian3.normalize(
Cartesian3.cross(up, right, scratchCartesian),
- forward,
+ forward
);
const cMid = scratchCenterMovement;
@@ -875,17 +872,17 @@ function handleZoom(
Cartesian3.multiplyByScalar(
up,
Math.cos(beta) - 1,
- scratchCartesianTwo,
+ scratchCartesianTwo
),
Cartesian3.multiplyByScalar(
forward,
Math.sin(beta),
- scratchCartesianThree,
+ scratchCartesianThree
),
- scratchCartesian,
+ scratchCartesian
),
Cartesian3.magnitude(center),
- cMid,
+ cMid
);
Cartesian3.add(center, cMid, center);
@@ -897,7 +894,7 @@ function handleZoom(
// Set new direction
Cartesian3.normalize(
Cartesian3.subtract(center, cameraPosition, scratchCartesian),
- camera.direction,
+ camera.direction
);
Cartesian3.clone(camera.direction, camera.direction);
@@ -911,11 +908,11 @@ function handleZoom(
} else {
const positionNormal = Cartesian3.normalize(
centerPosition,
- scratchPositionNormal,
+ scratchPositionNormal
);
const pickedNormal = Cartesian3.normalize(
object._zoomWorldPosition,
- scratchPickNormal,
+ scratchPickNormal
);
const dotProduct = Cartesian3.dot(pickedNormal, positionNormal);
@@ -924,7 +921,7 @@ function handleZoom(
const axis = Cartesian3.cross(
pickedNormal,
positionNormal,
- scratchZoomAxis,
+ scratchZoomAxis
);
const denom =
@@ -946,7 +943,7 @@ function handleZoom(
const zoomMouseStart = SceneTransforms.worldToWindowCoordinates(
scene,
object._zoomWorldPosition,
- scratchZoomOffset,
+ scratchZoomOffset
);
if (
mode !== SceneMode.COLUMBUS_VIEW &&
@@ -964,7 +961,7 @@ function handleZoom(
rayDirection.y,
rayDirection.z,
rayDirection.x,
- rayDirection,
+ rayDirection
);
}
@@ -987,10 +984,8 @@ const scratchTranslateP0 = new Cartesian3();
function translate2D(controller, startPosition, movement) {
const scene = controller._scene;
const camera = scene.camera;
- let start = camera.getPickRay(
- movement.startPosition,
- translate2DStart,
- ).origin;
+ let start = camera.getPickRay(movement.startPosition, translate2DStart)
+ .origin;
let end = camera.getPickRay(movement.endPosition, translate2DEnd).origin;
start = Cartesian3.fromElements(start.y, start.z, start.x, start);
@@ -1018,7 +1013,7 @@ function zoom2D(controller, startPosition, movement) {
startPosition,
movement,
controller.zoomFactor,
- camera.getMagnitude(),
+ camera.getMagnitude()
);
}
@@ -1094,7 +1089,7 @@ function update2D(controller) {
controller.zoomEventTypes,
zoom2D,
controller.inertiaZoom,
- "_lastInertiaZoomMovement",
+ "_lastInertiaZoomMovement"
);
if (rotatable2D) {
reactToInput(
@@ -1103,7 +1098,7 @@ function update2D(controller) {
controller.translateEventTypes,
twist2D,
controller.inertiaSpin,
- "_lastInertiaSpinMovement",
+ "_lastInertiaSpinMovement"
);
}
} else {
@@ -1113,7 +1108,7 @@ function update2D(controller) {
controller.translateEventTypes,
translate2D,
controller.inertiaTranslate,
- "_lastInertiaTranslateMovement",
+ "_lastInertiaTranslateMovement"
);
reactToInput(
controller,
@@ -1121,7 +1116,7 @@ function update2D(controller) {
controller.zoomEventTypes,
zoom2D,
controller.inertiaZoom,
- "_lastInertiaZoomMovement",
+ "_lastInertiaZoomMovement"
);
if (rotatable2D) {
reactToInput(
@@ -1130,7 +1125,7 @@ function update2D(controller) {
controller.tiltEventTypes,
twist2D,
controller.inertiaSpin,
- "_lastInertiaTiltMovement",
+ "_lastInertiaTiltMovement"
);
}
}
@@ -1149,7 +1144,7 @@ function pickPosition(controller, mousePosition, result) {
if (scene.pickPositionSupported) {
depthIntersection = scene.pickPositionWorldCoordinates(
mousePosition,
- scratchDepthIntersection,
+ scratchDepthIntersection
);
}
@@ -1163,7 +1158,7 @@ function pickPosition(controller, mousePosition, result) {
ray,
scene,
cullBackFaces,
- scratchRayIntersection,
+ scratchRayIntersection
);
const pickDistance = defined(depthIntersection)
@@ -1192,7 +1187,7 @@ function getDistanceFromSurface(controller) {
if (mode === SceneMode.SCENE3D) {
const cartographic = ellipsoid.cartesianToCartographic(
camera.position,
- scratchDistanceCartographic,
+ scratchDistanceCartographic
);
if (defined(cartographic)) {
height = cartographic.height;
@@ -1227,7 +1222,7 @@ function getTiltCenterUnderground(controller, ray, pickedPosition, result) {
const maximumDistance = CesiumMath.clamp(
distanceFromSurface * 5.0,
controller._minimumUndergroundPickDistance,
- controller._maximumUndergroundPickDistance,
+ controller._maximumUndergroundPickDistance
);
if (distance > maximumDistance) {
@@ -1243,7 +1238,7 @@ function getStrafeStartPositionUnderground(
controller,
ray,
pickedPosition,
- result,
+ result
) {
let distance;
if (!defined(pickedPosition)) {
@@ -1268,7 +1263,7 @@ function continueStrafing(controller, movement) {
const inertialDelta = Cartesian2.subtract(
movement.endPosition,
movement.startPosition,
- scratchInertialDelta,
+ scratchInertialDelta
);
const endPosition = controller._strafeEndMousePosition;
Cartesian2.add(endPosition, inertialDelta, endPosition);
@@ -1311,7 +1306,7 @@ function translateCV(controller, startPosition, movement) {
const cameraUnderground = controller._cameraUnderground;
const startMouse = Cartesian2.clone(
movement.startPosition,
- translateCVStartMouse,
+ translateCVStartMouse
);
const endMouse = Cartesian2.clone(movement.endPosition, translateCVEndMouse);
let startRay = camera.getPickRay(startMouse, translateCVStartRay);
@@ -1338,7 +1333,7 @@ function translateCV(controller, startPosition, movement) {
controller,
startRay,
globePos,
- translateCVStartPos,
+ translateCVStartPos
);
}
Cartesian2.clone(startPosition, controller._strafeMousePosition);
@@ -1355,14 +1350,14 @@ function translateCV(controller, startPosition, movement) {
const startPlanePos = IntersectionTests.rayPlane(
startRay,
plane,
- translateCVStartPos,
+ translateCVStartPos
);
const endRay = camera.getPickRay(endMouse, translateCVEndRay);
const endPlanePos = IntersectionTests.rayPlane(
endRay,
plane,
- translateCVEndPos,
+ translateCVEndPos
);
if (!defined(startPlanePos) || !defined(endPlanePos)) {
@@ -1375,7 +1370,7 @@ function translateCV(controller, startPosition, movement) {
const diff = Cartesian3.subtract(
startPlanePos,
endPlanePos,
- translateCVDifference,
+ translateCVDifference
);
const temp = diff.x;
diff.x = diff.y;
@@ -1472,7 +1467,7 @@ function rotateCVOnPlane(controller, startPosition, movement) {
const transform = Transforms.eastNorthUpToFixedFrame(
center,
ellipsoid,
- rotateCVTransform,
+ rotateCVTransform
);
const oldGlobe = controller._globe;
@@ -1559,7 +1554,7 @@ function rotateCVOnTerrain(controller, startPosition, movement) {
const verticalCenter = IntersectionTests.rayPlane(
ray,
plane,
- rotateCVVerticalCenter,
+ rotateCVVerticalCenter
);
const projection = camera._projection;
@@ -1572,7 +1567,7 @@ function rotateCVOnTerrain(controller, startPosition, movement) {
const transform = Transforms.eastNorthUpToFixedFrame(
center,
ellipsoid,
- rotateCVTransform,
+ rotateCVTransform
);
let verticalTransform;
@@ -1581,7 +1576,7 @@ function rotateCVOnTerrain(controller, startPosition, movement) {
verticalCenter.y,
verticalCenter.z,
verticalCenter.x,
- verticalCenter,
+ verticalCenter
);
cart = projection.unproject(verticalCenter, rotateCVCart);
ellipsoid.cartographicToCartesian(cart, verticalCenter);
@@ -1589,7 +1584,7 @@ function rotateCVOnTerrain(controller, startPosition, movement) {
verticalTransform = Transforms.eastNorthUpToFixedFrame(
verticalCenter,
ellipsoid,
- rotateCVVerticalTransform,
+ rotateCVVerticalTransform
);
} else {
verticalTransform = transform;
@@ -1610,7 +1605,7 @@ function rotateCVOnTerrain(controller, startPosition, movement) {
const tangent = Cartesian3.cross(
Cartesian3.UNIT_Z,
Cartesian3.normalize(camera.position, rotateCVCartesian3),
- rotateCVCartesian3,
+ rotateCVCartesian3
);
const dot = Cartesian3.dot(camera.right, tangent);
@@ -1641,7 +1636,7 @@ function rotateCVOnTerrain(controller, startPosition, movement) {
const right = Cartesian3.cross(
camera.direction,
camera.constrainedAxis,
- tilt3DCartesian3,
+ tilt3DCartesian3
);
if (
!Cartesian3.equalsEpsilon(right, Cartesian3.ZERO, CesiumMath.EPSILON6)
@@ -1668,7 +1663,7 @@ function rotateCVOnTerrain(controller, startPosition, movement) {
const originalPosition = Cartesian3.clone(
camera.positionWC,
- rotateCVCartesian3,
+ rotateCVCartesian3
);
if (controller.enableCollisionDetection) {
@@ -1685,7 +1680,7 @@ function rotateCVOnTerrain(controller, startPosition, movement) {
Cartesian3.multiplyByScalar(
camera.position,
Math.sqrt(magSqrd),
- camera.position,
+ camera.position
);
}
@@ -1693,14 +1688,14 @@ function rotateCVOnTerrain(controller, startPosition, movement) {
const axis = Cartesian3.cross(
originalPosition,
camera.position,
- originalPosition,
+ originalPosition
);
Cartesian3.normalize(axis, axis);
const quaternion = Quaternion.fromAxisAngle(
axis,
angle,
- rotateCVQuaternion,
+ rotateCVQuaternion
);
const rotation = Matrix3.fromQuaternion(quaternion, rotateCVMatrix);
Matrix3.multiplyByVector(rotation, camera.direction, camera.direction);
@@ -1756,7 +1751,7 @@ function zoomCV(controller, startPosition, movement) {
const distanceUnderground = getZoomDistanceUnderground(
controller,
ray,
- height,
+ height
);
if (defined(distance)) {
distance = Math.min(distance, distanceUnderground);
@@ -1776,7 +1771,7 @@ function zoomCV(controller, startPosition, movement) {
startPosition,
movement,
controller.zoomFactor,
- distance,
+ distance
);
}
@@ -1791,7 +1786,7 @@ function updateCV(controller) {
controller.rotateEventTypes,
rotate3D,
controller.inertiaSpin,
- "_lastInertiaSpinMovement",
+ "_lastInertiaSpinMovement"
);
reactToInput(
controller,
@@ -1799,7 +1794,7 @@ function updateCV(controller) {
controller.zoomEventTypes,
zoom3D,
controller.inertiaZoom,
- "_lastInertiaZoomMovement",
+ "_lastInertiaZoomMovement"
);
} else {
const tweens = controller._tweens;
@@ -1814,7 +1809,7 @@ function updateCV(controller) {
controller.tiltEventTypes,
rotateCV,
controller.inertiaSpin,
- "_lastInertiaTiltMovement",
+ "_lastInertiaTiltMovement"
);
reactToInput(
controller,
@@ -1822,7 +1817,7 @@ function updateCV(controller) {
controller.translateEventTypes,
translateCV,
controller.inertiaTranslate,
- "_lastInertiaTranslateMovement",
+ "_lastInertiaTranslateMovement"
);
reactToInput(
controller,
@@ -1830,13 +1825,13 @@ function updateCV(controller) {
controller.zoomEventTypes,
zoomCV,
controller.inertiaZoom,
- "_lastInertiaZoomMovement",
+ "_lastInertiaZoomMovement"
);
reactToInput(
controller,
controller.enableLook,
controller.lookEventTypes,
- look3D,
+ look3D
);
if (
@@ -1844,7 +1839,7 @@ function updateCV(controller) {
!tweens.contains(controller._tween)
) {
const tween = camera.createCorrectPositionTween(
- controller.bounceAnimationTime,
+ controller.bounceAnimationTime
);
if (defined(tween)) {
controller._tween = tweens.add(tween);
@@ -1874,12 +1869,12 @@ function strafe(controller, movement, strafeStartPosition) {
const plane = Plane.fromPointNormal(
strafeStartPosition,
direction,
- scratchStrafePlane,
+ scratchStrafePlane
);
const intersection = IntersectionTests.rayPlane(
ray,
plane,
- scratchStrafeIntersection,
+ scratchStrafeIntersection
);
if (!defined(intersection)) {
return;
@@ -1946,7 +1941,7 @@ function spin3D(controller, startPosition, movement) {
const height = ellipsoid.cartesianToCartographic(
camera.positionWC,
- scratchCartographic,
+ scratchCartographic
).height;
const globe = controller._globe;
@@ -1954,13 +1949,13 @@ function spin3D(controller, startPosition, movement) {
const mousePos = pickPosition(
controller,
movement.startPosition,
- scratchMousePosition,
+ scratchMousePosition
);
if (defined(mousePos)) {
let strafing = false;
const ray = camera.getPickRay(
movement.startPosition,
- pickGlobeScratchRay,
+ pickGlobeScratchRay
);
if (cameraUnderground) {
@@ -2003,8 +1998,8 @@ function spin3D(controller, startPosition, movement) {
camera.pickEllipsoid(
movement.startPosition,
controller._ellipsoid,
- spin3DPick,
- ),
+ spin3DPick
+ )
)
) {
pan3D(controller, startPosition, movement, controller._ellipsoid);
@@ -2026,7 +2021,7 @@ function rotate3D(
movement,
constrainedAxis,
rotateOnlyVertical,
- rotateOnlyHorizontal,
+ rotateOnlyHorizontal
) {
rotateOnlyVertical = defaultValue(rotateOnlyVertical, false);
rotateOnlyHorizontal = defaultValue(rotateOnlyHorizontal, false);
@@ -2059,7 +2054,7 @@ function rotate3D(
phiWindowRatio = Math.min(phiWindowRatio, controller.maximumMovementRatio);
thetaWindowRatio = Math.min(
thetaWindowRatio,
- controller.maximumMovementRatio,
+ controller.maximumMovementRatio
);
const deltaPhi = rotateRate * phiWindowRatio * Math.PI * 2.0;
@@ -2094,15 +2089,15 @@ function pan3D(controller, startPosition, movement, ellipsoid) {
const startMousePosition = Cartesian2.clone(
movement.startPosition,
- pan3DStartMousePosition,
+ pan3DStartMousePosition
);
const endMousePosition = Cartesian2.clone(
movement.endPosition,
- pan3DEndMousePosition,
+ pan3DEndMousePosition
);
const height = ellipsoid.cartesianToCartographic(
camera.positionWC,
- scratchCartographic,
+ scratchCartographic
).height;
let p0, p1;
@@ -2118,7 +2113,7 @@ function pan3D(controller, startPosition, movement, ellipsoid) {
!defined(controller._globe) &&
!Cartesian2.equalsEpsilon(
startMousePosition,
- controller._panLastMousePosition,
+ controller._panLastMousePosition
)
) {
p0 = pickPosition(controller, startMousePosition, pan3DP0);
@@ -2129,7 +2124,7 @@ function pan3D(controller, startPosition, movement, ellipsoid) {
const toCenterProj = Cartesian3.multiplyByScalar(
camera.directionWC,
Cartesian3.dot(camera.directionWC, toCenter),
- pan3DTemp1,
+ pan3DTemp1
);
const distanceToNearPlane = Cartesian3.magnitude(toCenterProj);
const pixelDimensions = camera.frustum.getPixelDimensions(
@@ -2137,35 +2132,33 @@ function pan3D(controller, startPosition, movement, ellipsoid) {
scene.drawingBufferHeight,
distanceToNearPlane,
scene.pixelRatio,
- pan3DPixelDimensions,
+ pan3DPixelDimensions
);
const dragDelta = Cartesian2.subtract(
endMousePosition,
startMousePosition,
- pan3DDiffMousePosition,
+ pan3DDiffMousePosition
);
// Move the camera to the the distance the cursor moved in worldspace
const right = Cartesian3.multiplyByScalar(
camera.rightWC,
dragDelta.x * pixelDimensions.x,
- pan3DTemp1,
+ pan3DTemp1
);
// Move the camera towards the picked position in worldspace as the camera is pointed towards a horizon view
const cameraPositionNormal = Cartesian3.normalize(
camera.positionWC,
- scratchCameraPositionNormal,
+ scratchCameraPositionNormal
);
- const endPickDirection = camera.getPickRay(
- endMousePosition,
- panRay,
- ).direction;
+ const endPickDirection = camera.getPickRay(endMousePosition, panRay)
+ .direction;
const endPickProj = Cartesian3.subtract(
endPickDirection,
Cartesian3.projectVector(endPickDirection, camera.rightWC, pan3DTemp2),
- pan3DTemp2,
+ pan3DTemp2
);
const angle = Cartesian3.angleBetween(endPickProj, camera.directionWC);
let forward = 1.0;
@@ -2173,7 +2166,7 @@ function pan3D(controller, startPosition, movement, ellipsoid) {
forward = Math.max(Math.tan(angle), 0.1); // Clamp so we don't make the magnitude infinitely large when the angle is small
}
let dot = Math.abs(
- Cartesian3.dot(camera.directionWC, cameraPositionNormal),
+ Cartesian3.dot(camera.directionWC, cameraPositionNormal)
);
const magnitude =
((-dragDelta.y * pixelDimensions.y * 2.0) / Math.sqrt(forward)) *
@@ -2181,7 +2174,7 @@ function pan3D(controller, startPosition, movement, ellipsoid) {
const direction = Cartesian3.multiplyByScalar(
endPickDirection,
magnitude,
- pan3DTemp2,
+ pan3DTemp2
);
// Move the camera up the distance the cursor moved in worldspace as the camera is pointed towards the center
@@ -2189,7 +2182,7 @@ function pan3D(controller, startPosition, movement, ellipsoid) {
const up = Cartesian3.multiplyByScalar(
camera.upWC,
-dragDelta.y * (1.0 - dot) * pixelDimensions.y,
- pan3DTemp3,
+ pan3DTemp3
);
p1 = Cartesian3.add(p0, right, pan3DP1);
@@ -2274,11 +2267,11 @@ function pan3D(controller, startPosition, movement, ellipsoid) {
const planeNormal = Cartesian3.cross(basis0, east, pan3DTemp0);
const side0 = Cartesian3.dot(
planeNormal,
- Cartesian3.subtract(p0, basis0, pan3DTemp1),
+ Cartesian3.subtract(p0, basis0, pan3DTemp1)
);
const side1 = Cartesian3.dot(
planeNormal,
- Cartesian3.subtract(p1, basis0, pan3DTemp1),
+ Cartesian3.subtract(p1, basis0, pan3DTemp1)
);
let deltaTheta;
@@ -2332,7 +2325,7 @@ function zoom3D(controller, startPosition, movement) {
let intersection;
const height = ellipsoid.cartesianToCartographic(
camera.position,
- zoom3DCartographic,
+ zoom3DCartographic
).height;
const approachingCollision =
@@ -2356,7 +2349,7 @@ function zoom3D(controller, startPosition, movement) {
const distanceUnderground = getZoomDistanceUnderground(
controller,
ray,
- height,
+ height
);
if (defined(distance)) {
distance = Math.min(distance, distanceUnderground);
@@ -2371,7 +2364,7 @@ function zoom3D(controller, startPosition, movement) {
const unitPosition = Cartesian3.normalize(
camera.position,
- zoom3DUnitPosition,
+ zoom3DUnitPosition
);
handleZoom(
controller,
@@ -2379,7 +2372,7 @@ function zoom3D(controller, startPosition, movement) {
movement,
controller.zoomFactor,
distance,
- Cartesian3.dot(unitPosition, camera.direction),
+ Cartesian3.dot(unitPosition, camera.direction)
);
}
@@ -2415,7 +2408,7 @@ function tilt3D(controller, startPosition, movement) {
if (controller._looking) {
const up = controller._ellipsoid.geodeticSurfaceNormal(
camera.position,
- tilt3DLookUp,
+ tilt3DLookUp
);
look3D(controller, startPosition, movement, up);
return;
@@ -2424,7 +2417,7 @@ function tilt3D(controller, startPosition, movement) {
const ellipsoid = controller._ellipsoid;
const cartographic = ellipsoid.cartesianToCartographic(
camera.position,
- tilt3DCart,
+ tilt3DCart
);
if (
@@ -2447,7 +2440,7 @@ function tilt3DOnEllipsoid(controller, startPosition, movement) {
const minHeight = controller.minimumZoomDistance * 0.25;
const height = ellipsoid.cartesianToCartographic(
camera.positionWC,
- tilt3DOnEllipsoidCartographic,
+ tilt3DOnEllipsoidCartographic
).height;
if (
height - minHeight - 1.0 < CesiumMath.EPSILON3 &&
@@ -2470,25 +2463,25 @@ function tilt3DOnEllipsoid(controller, startPosition, movement) {
} else if (height > controller._minimumTrackBallHeight) {
const grazingAltitudeLocation = IntersectionTests.grazingAltitudeLocation(
ray,
- ellipsoid,
+ ellipsoid
);
if (!defined(grazingAltitudeLocation)) {
return;
}
const grazingAltitudeCart = ellipsoid.cartesianToCartographic(
grazingAltitudeLocation,
- tilt3DCart,
+ tilt3DCart
);
grazingAltitudeCart.height = 0.0;
center = ellipsoid.cartographicToCartesian(
grazingAltitudeCart,
- tilt3DCenter,
+ tilt3DCenter
);
} else {
controller._looking = true;
const up = controller._ellipsoid.geodeticSurfaceNormal(
camera.position,
- tilt3DLookUp,
+ tilt3DLookUp
);
look3D(controller, startPosition, movement, up);
Cartesian2.clone(startPosition, controller._tiltCenterMousePosition);
@@ -2498,7 +2491,7 @@ function tilt3DOnEllipsoid(controller, startPosition, movement) {
const transform = Transforms.eastNorthUpToFixedFrame(
center,
ellipsoid,
- tilt3DTransform,
+ tilt3DTransform
);
const oldGlobe = controller._globe;
@@ -2543,13 +2536,13 @@ function tilt3DOnTerrain(controller, startPosition, movement) {
if (!defined(intersection)) {
const cartographic = ellipsoid.cartesianToCartographic(
camera.position,
- tilt3DCart,
+ tilt3DCart
);
if (cartographic.height <= controller._minimumTrackBallHeight) {
controller._looking = true;
const up = controller._ellipsoid.geodeticSurfaceNormal(
camera.position,
- tilt3DLookUp,
+ tilt3DLookUp
);
look3D(controller, startPosition, movement, up);
Cartesian2.clone(startPosition, controller._tiltCenterMousePosition);
@@ -2595,12 +2588,12 @@ function tilt3DOnTerrain(controller, startPosition, movement) {
const transform = Transforms.eastNorthUpToFixedFrame(
center,
ellipsoid,
- tilt3DTransform,
+ tilt3DTransform
);
const verticalTransform = Transforms.eastNorthUpToFixedFrame(
verticalCenter,
newEllipsoid,
- tilt3DVerticalTransform,
+ tilt3DVerticalTransform
);
const oldGlobe = controller._globe;
@@ -2618,7 +2611,7 @@ function tilt3DOnTerrain(controller, startPosition, movement) {
const tangent = Cartesian3.cross(
verticalCenter,
camera.positionWC,
- tilt3DCartesian3,
+ tilt3DCartesian3
);
const dot = Cartesian3.dot(camera.rightWC, tangent);
@@ -2649,7 +2642,7 @@ function tilt3DOnTerrain(controller, startPosition, movement) {
const right = Cartesian3.cross(
camera.direction,
camera.constrainedAxis,
- tilt3DCartesian3,
+ tilt3DCartesian3
);
if (
!Cartesian3.equalsEpsilon(right, Cartesian3.ZERO, CesiumMath.EPSILON6)
@@ -2676,7 +2669,7 @@ function tilt3DOnTerrain(controller, startPosition, movement) {
const originalPosition = Cartesian3.clone(
camera.positionWC,
- tilt3DCartesian3,
+ tilt3DCartesian3
);
if (controller.enableCollisionDetection) {
@@ -2693,7 +2686,7 @@ function tilt3DOnTerrain(controller, startPosition, movement) {
Cartesian3.multiplyByScalar(
camera.position,
Math.sqrt(magSqrd),
- camera.position,
+ camera.position
);
}
@@ -2701,7 +2694,7 @@ function tilt3DOnTerrain(controller, startPosition, movement) {
const axis = Cartesian3.cross(
originalPosition,
camera.position,
- originalPosition,
+ originalPosition
);
Cartesian3.normalize(axis, axis);
@@ -2812,17 +2805,17 @@ function look3D(controller, startPosition, movement, rotationAxis) {
const direction = camera.direction;
const negativeRotationAxis = Cartesian3.negate(
rotationAxis,
- look3DNegativeRot,
+ look3DNegativeRot
);
const northParallel = Cartesian3.equalsEpsilon(
direction,
rotationAxis,
- CesiumMath.EPSILON2,
+ CesiumMath.EPSILON2
);
const southParallel = Cartesian3.equalsEpsilon(
direction,
negativeRotationAxis,
- CesiumMath.EPSILON2,
+ CesiumMath.EPSILON2
);
if (!northParallel && !southParallel) {
dot = Cartesian3.dot(direction, rotationAxis);
@@ -2854,7 +2847,7 @@ function update3D(controller) {
controller.rotateEventTypes,
spin3D,
controller.inertiaSpin,
- "_lastInertiaSpinMovement",
+ "_lastInertiaSpinMovement"
);
reactToInput(
controller,
@@ -2862,7 +2855,7 @@ function update3D(controller) {
controller.zoomEventTypes,
zoom3D,
controller.inertiaZoom,
- "_lastInertiaZoomMovement",
+ "_lastInertiaZoomMovement"
);
reactToInput(
controller,
@@ -2870,13 +2863,13 @@ function update3D(controller) {
controller.tiltEventTypes,
tilt3D,
controller.inertiaSpin,
- "_lastInertiaTiltMovement",
+ "_lastInertiaTiltMovement"
);
reactToInput(
controller,
controller.enableLook,
controller.lookEventTypes,
- look3D,
+ look3D
);
}
@@ -2951,7 +2944,7 @@ function adjustHeightForTerrain(controller, cameraChanged) {
Cartesian3.multiplyByScalar(
camera.position,
Math.max(mag, controller.minimumZoomDistance),
- camera.position,
+ camera.position
);
Cartesian3.normalize(camera.direction, camera.direction);
Cartesian3.cross(camera.direction, camera.up, camera.right);
@@ -3000,17 +2993,17 @@ ScreenSpaceCameraController.prototype.update = function () {
this._minimumCollisionTerrainHeight = VerticalExaggeration.getHeight(
this.minimumCollisionTerrainHeight,
verticalExaggeration,
- verticalExaggerationRelativeHeight,
+ verticalExaggerationRelativeHeight
);
this._minimumPickingTerrainHeight = VerticalExaggeration.getHeight(
this.minimumPickingTerrainHeight,
verticalExaggeration,
- verticalExaggerationRelativeHeight,
+ verticalExaggerationRelativeHeight
);
this._minimumTrackBallHeight = VerticalExaggeration.getHeight(
this.minimumTrackBallHeight,
verticalExaggeration,
- verticalExaggerationRelativeHeight,
+ verticalExaggerationRelativeHeight
);
this._cameraUnderground = scene.cameraUnderground && defined(this._globe);
@@ -3022,11 +3015,11 @@ ScreenSpaceCameraController.prototype.update = function () {
this._adjustedHeightForTerrain = false;
const previousPosition = Cartesian3.clone(
camera.positionWC,
- scratchPreviousPosition,
+ scratchPreviousPosition
);
const previousDirection = Cartesian3.clone(
camera.directionWC,
- scratchPreviousDirection,
+ scratchPreviousDirection
);
if (mode === SceneMode.SCENE2D) {
diff --git a/packages/engine/Source/Scene/SensorVolumePortionToDisplay.js b/packages/engine/Source/Scene/SensorVolumePortionToDisplay.js
index 1a6bd126eece..98a3389b9e0c 100644
--- a/packages/engine/Source/Scene/SensorVolumePortionToDisplay.js
+++ b/packages/engine/Source/Scene/SensorVolumePortionToDisplay.js
@@ -61,7 +61,7 @@ SensorVolumePortionToDisplay.toString = function (portionToDisplay) {
return "ABOVE_ELLIPSOID_HORIZON";
default:
throw new DeveloperError(
- "SensorVolumePortionToDisplay value is not valid and cannot be converted to a String.",
+ "SensorVolumePortionToDisplay value is not valid and cannot be converted to a String."
);
}
};
diff --git a/packages/engine/Source/Scene/ShadowMap.js b/packages/engine/Source/Scene/ShadowMap.js
index 448d9816bf1e..3d8aaf1bd858 100644
--- a/packages/engine/Source/Scene/ShadowMap.js
+++ b/packages/engine/Source/Scene/ShadowMap.js
@@ -331,15 +331,15 @@ function createRenderStates(shadowMap) {
const colorMask = !shadowMap._usesDepthTexture;
shadowMap._primitiveRenderState = createRenderState(
colorMask,
- shadowMap._primitiveBias,
+ shadowMap._primitiveBias
);
shadowMap._terrainRenderState = createRenderState(
colorMask,
- shadowMap._terrainBias,
+ shadowMap._terrainBias
);
shadowMap._pointRenderState = createRenderState(
colorMask,
- shadowMap._pointBias,
+ shadowMap._pointBias
);
}
@@ -715,7 +715,7 @@ function resize(shadowMap, size) {
size,
size,
size,
- size,
+ size
);
}
@@ -724,7 +724,7 @@ function resize(shadowMap, size) {
0,
0,
textureSize.x,
- textureSize.y,
+ textureSize.y
);
// Transforms shadow coordinates [0, 1] into the pass's region of the texture
@@ -751,7 +751,7 @@ function resize(shadowMap, size) {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
}
}
@@ -988,20 +988,20 @@ function applyDebugSettings(shadowMap, frameState) {
uniformScale,
uniformScale,
uniformScale,
- scratchScale,
+ scratchScale
);
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
scale,
- scratchMatrix,
+ scratchMatrix
);
shadowMap._debugLightFrustum =
shadowMap._debugLightFrustum && shadowMap._debugLightFrustum.destroy();
shadowMap._debugLightFrustum = createDebugPointLight(
modelMatrix,
- Color.YELLOW,
+ Color.YELLOW
);
}
shadowMap._debugLightFrustum.update(frameState);
@@ -1057,7 +1057,7 @@ const scaleBiasMatrix = new Matrix4(
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
ShadowMapCamera.prototype.getViewProjection = function () {
@@ -1067,7 +1067,7 @@ ShadowMapCamera.prototype.getViewProjection = function () {
Matrix4.multiply(
scaleBiasMatrix,
this.viewProjectionMatrix,
- this.viewProjectionMatrix,
+ this.viewProjectionMatrix
);
return this.viewProjectionMatrix;
};
@@ -1121,7 +1121,7 @@ function computeCascades(shadowMap, frameState) {
for (i = 0; i < numberOfCascades; ++i) {
cascadeDistances[i] = Math.min(
cascadeDistances[i],
- shadowMap._maximumCascadeDistances[i],
+ shadowMap._maximumCascadeDistances[i]
);
}
@@ -1159,16 +1159,16 @@ function computeCascades(shadowMap, frameState) {
const viewProjection = Matrix4.multiply(
cascadeSubFrustum.projectionMatrix,
sceneCamera.viewMatrix,
- scratchMatrix,
+ scratchMatrix
);
const inverseViewProjection = Matrix4.inverse(
viewProjection,
- scratchMatrix,
+ scratchMatrix
);
const shadowMapMatrix = Matrix4.multiply(
shadowViewProjection,
inverseViewProjection,
- scratchMatrix,
+ scratchMatrix
);
// Project each corner from camera NDC space to shadow map texture space. Min and max will be from 0 to 1.
@@ -1176,19 +1176,19 @@ function computeCascades(shadowMap, frameState) {
Number.MAX_VALUE,
Number.MAX_VALUE,
Number.MAX_VALUE,
- scratchMin,
+ scratchMin
);
const max = Cartesian3.fromElements(
-Number.MAX_VALUE,
-Number.MAX_VALUE,
-Number.MAX_VALUE,
- scratchMax,
+ scratchMax
);
for (let k = 0; k < 8; ++k) {
const corner = Cartesian4.clone(
frustumCornersNDC[k],
- scratchFrustumCorners[k],
+ scratchFrustumCorners[k]
);
Matrix4.multiplyByVector(shadowMapMatrix, corner, corner);
Cartesian3.divideByScalar(corner, corner.w, corner); // Handle the perspective divide
@@ -1219,7 +1219,7 @@ function computeCascades(shadowMap, frameState) {
pass.cullingVolume = cascadeCamera.frustum.computeCullingVolume(
position,
direction,
- up,
+ up
);
// Transforms from eye space to the cascade's texture space
@@ -1227,7 +1227,7 @@ function computeCascades(shadowMap, frameState) {
Matrix4.multiply(
cascadeCamera.getViewProjection(),
sceneCamera.inverseViewMatrix,
- cascadeMatrix,
+ cascadeMatrix
);
Matrix4.multiply(pass.textureOffsets, cascadeMatrix, cascadeMatrix);
}
@@ -1246,7 +1246,7 @@ function fitShadowMapToScene(shadowMap, frameState) {
const viewProjection = Matrix4.multiply(
sceneCamera.frustum.projectionMatrix,
sceneCamera.viewMatrix,
- scratchMatrix,
+ scratchMatrix
);
const inverseViewProjection = Matrix4.inverse(viewProjection, scratchMatrix);
@@ -1264,7 +1264,7 @@ function fitShadowMapToScene(shadowMap, frameState) {
0.0,
0.0,
0.0,
- scratchTranslation,
+ scratchTranslation
);
let lightView = Matrix4.computeView(
@@ -1272,12 +1272,12 @@ function fitShadowMapToScene(shadowMap, frameState) {
lightDir,
lightUp,
lightRight,
- scratchLightView,
+ scratchLightView
);
const cameraToLight = Matrix4.multiply(
lightView,
inverseViewProjection,
- scratchMatrix,
+ scratchMatrix
);
// Project each corner from NDC space to light view space, and calculate a min and max in light view space
@@ -1285,19 +1285,19 @@ function fitShadowMapToScene(shadowMap, frameState) {
Number.MAX_VALUE,
Number.MAX_VALUE,
Number.MAX_VALUE,
- scratchMin,
+ scratchMin
);
const max = Cartesian3.fromElements(
-Number.MAX_VALUE,
-Number.MAX_VALUE,
-Number.MAX_VALUE,
- scratchMax,
+ scratchMax
);
for (let i = 0; i < 8; ++i) {
const corner = Cartesian4.clone(
frustumCornersNDC[i],
- scratchFrustumCorners[i],
+ scratchFrustumCorners[i]
);
Matrix4.multiplyByVector(cameraToLight, corner, corner);
Cartesian3.divideByScalar(corner, corner.w, corner); // Handle the perspective divide
@@ -1336,11 +1336,11 @@ function fitShadowMapToScene(shadowMap, frameState) {
Matrix4.inverse(lightView, shadowMapCamera.inverseViewMatrix);
Matrix4.getTranslation(
shadowMapCamera.inverseViewMatrix,
- shadowMapCamera.positionWC,
+ shadowMapCamera.positionWC
);
frameState.mapProjection.ellipsoid.cartesianToCartographic(
shadowMapCamera.positionWC,
- shadowMapCamera.positionCartographic,
+ shadowMapCamera.positionCartographic
);
Cartesian3.clone(lightDir, shadowMapCamera.directionWC);
Cartesian3.clone(lightUp, shadowMapCamera.upWC);
@@ -1385,11 +1385,10 @@ function computeOmnidirectional(shadowMap, frameState) {
for (let i = 0; i < 6; ++i) {
const camera = shadowMap._passes[i].camera;
camera.positionWC = shadowMap._shadowMapCamera.positionWC;
- camera.positionCartographic =
- frameState.mapProjection.ellipsoid.cartesianToCartographic(
- camera.positionWC,
- camera.positionCartographic,
- );
+ camera.positionCartographic = frameState.mapProjection.ellipsoid.cartesianToCartographic(
+ camera.positionWC,
+ camera.positionCartographic
+ );
camera.directionWC = directions[i];
camera.upWC = ups[i];
camera.rightWC = rights[i];
@@ -1399,7 +1398,7 @@ function computeOmnidirectional(shadowMap, frameState) {
camera.directionWC,
camera.upWC,
camera.rightWC,
- camera.viewMatrix,
+ camera.viewMatrix
);
Matrix4.inverse(camera.viewMatrix, camera.inverseViewMatrix);
@@ -1428,14 +1427,13 @@ function checkVisibility(shadowMap, frameState) {
}
// If the light source is below the horizon then the shadow map is out of view
- const surfaceNormal =
- frameState.mapProjection.ellipsoid.geodeticSurfaceNormal(
- sceneCamera.positionWC,
- scratchCartesian1,
- );
+ const surfaceNormal = frameState.mapProjection.ellipsoid.geodeticSurfaceNormal(
+ sceneCamera.positionWC,
+ scratchCartesian1
+ );
const lightDirection = Cartesian3.negate(
shadowMapCamera.directionWC,
- scratchCartesian2,
+ scratchCartesian2
);
const dot = Cartesian3.dot(surfaceNormal, lightDirection);
if (shadowMap.fadingEnabled) {
@@ -1445,7 +1443,7 @@ function checkVisibility(shadowMap, frameState) {
shadowMap._darkness = CesiumMath.lerp(
1.0,
shadowMap.darkness,
- darknessAmount,
+ darknessAmount
);
} else {
shadowMap._darkness = shadowMap.darkness;
@@ -1479,9 +1477,9 @@ function checkVisibility(shadowMap, frameState) {
Cartesian3.multiplyByScalar(
shadowMapCamera.directionWC,
frustumRadius,
- scratchCenter,
+ scratchCenter
),
- scratchCenter,
+ scratchCenter
);
boundingSphere.center = frustumCenter;
boundingSphere.radius = frustumRadius;
@@ -1515,7 +1513,7 @@ function updateCameras(shadowMap, frameState) {
Matrix4.multiplyByPointAsVector(
camera.viewMatrix,
shadowMapCamera.directionWC,
- lightDirection,
+ lightDirection
);
Cartesian3.normalize(lightDirection, lightDirection);
Cartesian3.negate(lightDirection, lightDirection);
@@ -1524,7 +1522,7 @@ function updateCameras(shadowMap, frameState) {
Matrix4.multiplyByPoint(
camera.viewMatrix,
shadowMapCamera.positionWC,
- shadowMap._lightPositionEC,
+ shadowMap._lightPositionEC
);
shadowMap._lightPositionEC.w = shadowMap._pointLightRadius;
@@ -1536,7 +1534,7 @@ function updateCameras(shadowMap, frameState) {
// Push the far plane slightly further than the near plane to avoid degenerate frustum
near = Math.min(
frameState.shadowState.nearPlane,
- shadowMap.maximumDistance,
+ shadowMap.maximumDistance
);
far = Math.min(frameState.shadowState.farPlane, shadowMap.maximumDistance);
far = Math.max(far, near + 1.0);
@@ -1586,8 +1584,11 @@ ShadowMap.prototype.update = function (frameState) {
const position = shadowMapCamera.positionWC;
const direction = shadowMapCamera.directionWC;
const up = shadowMapCamera.upWC;
- this._shadowMapCullingVolume =
- shadowMapCamera.frustum.computeCullingVolume(position, direction, up);
+ this._shadowMapCullingVolume = shadowMapCamera.frustum.computeCullingVolume(
+ position,
+ direction,
+ up
+ );
if (this._passes.length === 1) {
// Since there is only one pass, use the shadow map camera as the pass camera.
@@ -1595,7 +1596,7 @@ ShadowMap.prototype.update = function (frameState) {
}
} else {
this._shadowMapCullingVolume = CullingVolume.fromBoundingSphere(
- this._boundingSphere,
+ this._boundingSphere
);
}
}
@@ -1607,7 +1608,7 @@ ShadowMap.prototype.update = function (frameState) {
Matrix4.multiply(
this._shadowMapCamera.getViewProjection(),
inverseView,
- this._shadowMapMatrix,
+ this._shadowMapMatrix
);
}
@@ -1629,8 +1630,8 @@ function combineUniforms(shadowMap, uniforms, isTerrain) {
const bias = shadowMap._isPointLight
? shadowMap._pointBias
: isTerrain
- ? shadowMap._terrainBias
- : shadowMap._primitiveBias;
+ ? shadowMap._terrainBias
+ : shadowMap._primitiveBias;
const mapUniforms = {
shadowMap_texture: function () {
@@ -1667,7 +1668,7 @@ function combineUniforms(shadowMap, uniforms, isTerrain) {
texelStepSize.y,
bias.depthBias,
bias.normalShadingSmooth,
- this.combinedUniforms1,
+ this.combinedUniforms1
);
},
shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness: function () {
@@ -1676,7 +1677,7 @@ function combineUniforms(shadowMap, uniforms, isTerrain) {
shadowMap._distance,
shadowMap.maximumDistance,
shadowMap._darkness,
- this.combinedUniforms2,
+ this.combinedUniforms2
);
},
@@ -1693,7 +1694,7 @@ function createCastDerivedCommand(
command,
context,
oldShaderId,
- result,
+ result
) {
let castShader;
let castRenderState;
@@ -1724,11 +1725,11 @@ function createCastDerivedCommand(
isPointLight,
isTerrain,
usesDepthTexture,
- isOpaque,
+ isOpaque
);
castShader = context.shaderCache.getDerivedShaderProgram(
shaderProgram,
- keyword,
+ keyword
);
if (!defined(castShader)) {
const vertexShaderSource = shaderProgram.vertexShaderSource;
@@ -1737,13 +1738,13 @@ function createCastDerivedCommand(
const castVS = ShadowMapShader.createShadowCastVertexShader(
vertexShaderSource,
isPointLight,
- isTerrain,
+ isTerrain
);
const castFS = ShadowMapShader.createShadowCastFragmentShader(
fragmentShaderSource,
isPointLight,
usesDepthTexture,
- isOpaque,
+ isOpaque
);
castShader = context.shaderCache.createDerivedShaderProgram(
@@ -1753,7 +1754,7 @@ function createCastDerivedCommand(
vertexShaderSource: castVS,
fragmentShaderSource: castFS,
attributeLocations: shaderProgram._attributeLocations,
- },
+ }
);
}
@@ -1788,7 +1789,7 @@ ShadowMap.createReceiveDerivedCommand = function (
command,
shadowsDirty,
context,
- result,
+ result
) {
if (!defined(result)) {
result = {};
@@ -1817,7 +1818,7 @@ ShadowMap.createReceiveDerivedCommand = function (
result.receiveCommand = DrawCommand.shallowClone(
command,
- result.receiveCommand,
+ result.receiveCommand
);
result.castShadows = false;
result.receiveShadows = true;
@@ -1839,24 +1840,24 @@ ShadowMap.createReceiveDerivedCommand = function (
lightShadowMaps[0],
command.castShadows,
isTerrain,
- hasTerrainNormal,
+ hasTerrainNormal
);
receiveShader = context.shaderCache.getDerivedShaderProgram(
shaderProgram,
- keyword,
+ keyword
);
if (!defined(receiveShader)) {
const receiveVS = ShadowMapShader.createShadowReceiveVertexShader(
vertexShaderSource,
isTerrain,
- hasTerrainNormal,
+ hasTerrainNormal
);
const receiveFS = ShadowMapShader.createShadowReceiveFragmentShader(
fragmentShaderSource,
lightShadowMaps[0],
command.castShadows,
isTerrain,
- hasTerrainNormal,
+ hasTerrainNormal
);
receiveShader = context.shaderCache.createDerivedShaderProgram(
@@ -1866,14 +1867,14 @@ ShadowMap.createReceiveDerivedCommand = function (
vertexShaderSource: receiveVS,
fragmentShaderSource: receiveFS,
attributeLocations: shaderProgram._attributeLocations,
- },
+ }
);
}
receiveUniformMap = combineUniforms(
lightShadowMaps[0],
command.uniformMap,
- isTerrain,
+ isTerrain
);
}
@@ -1891,7 +1892,7 @@ ShadowMap.createCastDerivedCommand = function (
command,
shadowsDirty,
context,
- result,
+ result
) {
if (!defined(result)) {
result = {};
@@ -1915,7 +1916,7 @@ ShadowMap.createCastDerivedCommand = function (
command,
context,
oldShaderId,
- castCommands[i],
+ castCommands[i]
);
}
diff --git a/packages/engine/Source/Scene/ShadowMapShader.js b/packages/engine/Source/Scene/ShadowMapShader.js
index e7e56905787f..fc78fcfdd937 100644
--- a/packages/engine/Source/Scene/ShadowMapShader.js
+++ b/packages/engine/Source/Scene/ShadowMapShader.js
@@ -10,7 +10,7 @@ ShadowMapShader.getShadowCastShaderKeyword = function (
isPointLight,
isTerrain,
usesDepthTexture,
- isOpaque,
+ isOpaque
) {
return `castShadow ${isPointLight} ${isTerrain} ${usesDepthTexture} ${isOpaque}`;
};
@@ -18,7 +18,7 @@ ShadowMapShader.getShadowCastShaderKeyword = function (
ShadowMapShader.createShadowCastVertexShader = function (
vs,
isPointLight,
- isTerrain,
+ isTerrain
) {
const defines = vs.defines.slice(0);
const sources = vs.sources.slice(0);
@@ -58,7 +58,7 @@ ShadowMapShader.createShadowCastFragmentShader = function (
fs,
isPointLight,
usesDepthTexture,
- opaque,
+ opaque
) {
const defines = fs.defines.slice(0);
const sources = fs.sources.slice(0);
@@ -127,7 +127,7 @@ ShadowMapShader.getShadowReceiveShaderKeyword = function (
shadowMap,
castShadows,
isTerrain,
- hasTerrainNormal,
+ hasTerrainNormal
) {
const usesDepthTexture = shadowMap._usesDepthTexture;
const polygonOffsetSupported = shadowMap._polygonOffsetSupported;
@@ -143,7 +143,7 @@ ShadowMapShader.getShadowReceiveShaderKeyword = function (
ShadowMapShader.createShadowReceiveVertexShader = function (
vs,
isTerrain,
- hasTerrainNormal,
+ hasTerrainNormal
) {
const defines = vs.defines.slice(0);
const sources = vs.sources.slice(0);
@@ -169,7 +169,7 @@ ShadowMapShader.createShadowReceiveFragmentShader = function (
shadowMap,
castShadows,
isTerrain,
- hasTerrainNormal,
+ hasTerrainNormal
) {
const normalVaryingName = ShaderSource.findNormalVarying(fs);
const hasNormalVarying =
@@ -189,8 +189,8 @@ ShadowMapShader.createShadowReceiveFragmentShader = function (
const bias = isPointLight
? shadowMap._pointBias
: isTerrain
- ? shadowMap._terrainBias
- : shadowMap._primitiveBias;
+ ? shadowMap._terrainBias
+ : shadowMap._primitiveBias;
const defines = fs.defines.slice(0);
const sources = fs.sources.slice(0);
@@ -199,7 +199,7 @@ ShadowMapShader.createShadowReceiveFragmentShader = function (
for (let i = 0; i < length; ++i) {
sources[i] = ShaderSource.replaceMain(
sources[i],
- "czm_shadow_receive_main",
+ "czm_shadow_receive_main"
);
}
diff --git a/packages/engine/Source/Scene/ShadowVolumeAppearance.js b/packages/engine/Source/Scene/ShadowVolumeAppearance.js
index 0e16baa57971..1e6f0603486f 100644
--- a/packages/engine/Source/Scene/ShadowVolumeAppearance.js
+++ b/packages/engine/Source/Scene/ShadowVolumeAppearance.js
@@ -77,7 +77,7 @@ function ShadowVolumeAppearance(extentsCulling, planarExtents, appearance) {
* @returns {ShaderSource} Shader source for the fragment shader.
*/
ShadowVolumeAppearance.prototype.createFragmentShader = function (
- columbusView2D,
+ columbusView2D
) {
//>>includeStart('debug', pragmas.debug);
Check.typeOf.bool("columbusView2D", columbusView2D);
@@ -141,7 +141,7 @@ ShadowVolumeAppearance.prototype.createFragmentShader = function (
};
ShadowVolumeAppearance.prototype.createPickFragmentShader = function (
- columbusView2D,
+ columbusView2D
) {
//>>includeStart('debug', pragmas.debug);
Check.typeOf.bool("columbusView2D", columbusView2D);
@@ -185,7 +185,7 @@ ShadowVolumeAppearance.prototype.createVertexShader = function (
defines,
vertexShaderSource,
columbusView2D,
- mapProjection,
+ mapProjection
) {
//>>includeStart('debug', pragmas.debug);
Check.defined("defines", defines);
@@ -201,7 +201,7 @@ ShadowVolumeAppearance.prototype.createVertexShader = function (
vertexShaderSource,
this._appearance,
mapProjection,
- this._projectionExtentDefines,
+ this._projectionExtentDefines
);
};
@@ -218,7 +218,7 @@ ShadowVolumeAppearance.prototype.createPickVertexShader = function (
defines,
vertexShaderSource,
columbusView2D,
- mapProjection,
+ mapProjection
) {
//>>includeStart('debug', pragmas.debug);
Check.defined("defines", defines);
@@ -234,7 +234,7 @@ ShadowVolumeAppearance.prototype.createPickVertexShader = function (
vertexShaderSource,
undefined,
mapProjection,
- this._projectionExtentDefines,
+ this._projectionExtentDefines
);
};
@@ -252,7 +252,7 @@ function createShadowVolumeAppearanceVS(
vertexShaderSource,
appearance,
mapProjection,
- projectionExtentDefines,
+ projectionExtentDefines
) {
const allDefines = defines.slice();
@@ -263,17 +263,17 @@ function createShadowVolumeAppearanceVS(
eastMostCartographic.height = 0.0;
const eastMostCartesian = mapProjection.project(
eastMostCartographic,
- longitudeExtentsCartesianScratch,
+ longitudeExtentsCartesianScratch
);
let encoded = EncodedCartesian3.encode(
eastMostCartesian.x,
- longitudeExtentsEncodeScratch,
+ longitudeExtentsEncodeScratch
);
projectionExtentDefines.eastMostYhighDefine = `EAST_MOST_X_HIGH ${encoded.high.toFixed(
- `${encoded.high}`.length + 1,
+ `${encoded.high}`.length + 1
)}`;
projectionExtentDefines.eastMostYlowDefine = `EAST_MOST_X_LOW ${encoded.low.toFixed(
- `${encoded.low}`.length + 1,
+ `${encoded.low}`.length + 1
)}`;
const westMostCartographic = longitudeExtentsCartographicScratch;
@@ -282,17 +282,17 @@ function createShadowVolumeAppearanceVS(
westMostCartographic.height = 0.0;
const westMostCartesian = mapProjection.project(
westMostCartographic,
- longitudeExtentsCartesianScratch,
+ longitudeExtentsCartesianScratch
);
encoded = EncodedCartesian3.encode(
westMostCartesian.x,
- longitudeExtentsEncodeScratch,
+ longitudeExtentsEncodeScratch
);
projectionExtentDefines.westMostYhighDefine = `WEST_MOST_X_HIGH ${encoded.high.toFixed(
- `${encoded.high}`.length + 1,
+ `${encoded.high}`.length + 1
)}`;
projectionExtentDefines.westMostYlowDefine = `WEST_MOST_X_LOW ${encoded.low.toFixed(
- `${encoded.low}`.length + 1,
+ `${encoded.low}`.length + 1
)}`;
}
@@ -422,7 +422,7 @@ function pointLineDistance(point1, point2, point) {
(point2.y - point1.y) * point.x -
(point2.x - point1.x) * point.y +
point2.x * point1.y -
- point2.y * point1.x,
+ point2.y * point1.x
) / Cartesian2.distance(point2, point1)
);
}
@@ -438,24 +438,24 @@ const points2DScratch = [
// This allows simulation of baked texture coordinates for EllipseGeometry, RectangleGeometry, and PolygonGeometry.
function addTextureCoordinateRotationAttributes(
attributes,
- textureCoordinateRotationPoints,
+ textureCoordinateRotationPoints
) {
const points2D = points2DScratch;
const minXYCorner = Cartesian2.unpack(
textureCoordinateRotationPoints,
0,
- points2D[0],
+ points2D[0]
);
const maxYCorner = Cartesian2.unpack(
textureCoordinateRotationPoints,
2,
- points2D[1],
+ points2D[1]
);
const maxXCorner = Cartesian2.unpack(
textureCoordinateRotationPoints,
4,
- points2D[2],
+ points2D[2]
);
attributes.uMaxVmax = new GeometryInstanceAttribute({
@@ -570,23 +570,23 @@ function computeRectangleBounds(
height,
southWestCornerResult,
eastVectorResult,
- northVectorResult,
+ northVectorResult
) {
// Compute center of rectangle
const centerCartographic = Rectangle.center(
rectangle,
- rectangleCenterScratch,
+ rectangleCenterScratch
);
centerCartographic.height = height;
const centerCartesian = Cartographic.toCartesian(
centerCartographic,
ellipsoid,
- rectanglePointCartesianScratch,
+ rectanglePointCartesianScratch
);
const enuMatrix = Transforms.eastNorthUpToFixedFrame(
centerCartesian,
ellipsoid,
- enuMatrixScratch,
+ enuMatrixScratch
);
const inverseEnu = Matrix4.inverse(enuMatrix, inverseEnuScratch);
@@ -626,7 +626,7 @@ function computeRectangleBounds(
const pointCartesian = Cartographic.toCartesian(
cartographics[i],
ellipsoid,
- rectanglePointCartesianScratch,
+ rectanglePointCartesianScratch
);
Matrix4.multiplyByPoint(inverseEnu, pointCartesian, pointCartesian);
pointCartesian.z = 0.0; // flatten into XY plane of ENU coordinate system
@@ -686,13 +686,13 @@ ShadowVolumeAppearance.getPlanarTextureCoordinateAttributes = function (
textureCoordinateRotationPoints,
ellipsoid,
projection,
- height,
+ height
) {
//>>includeStart('debug', pragmas.debug);
Check.typeOf.object("boundingRectangle", boundingRectangle);
Check.defined(
"textureCoordinateRotationPoints",
- textureCoordinateRotationPoints,
+ textureCoordinateRotationPoints
);
Check.typeOf.object("ellipsoid", ellipsoid);
Check.typeOf.object("projection", projection);
@@ -707,13 +707,13 @@ ShadowVolumeAppearance.getPlanarTextureCoordinateAttributes = function (
defaultValue(height, 0.0),
corner,
eastward,
- northward,
+ northward
);
const attributes = {};
addTextureCoordinateRotationAttributes(
attributes,
- textureCoordinateRotationPoints,
+ textureCoordinateRotationPoints
);
const encoded = EncodedCartesian3.fromCartesian(corner, encodeScratch);
@@ -757,19 +757,19 @@ function latLongToSpherical(latitude, longitude, ellipsoid, result) {
const spherePoint = Cartographic.toCartesian(
cartographic,
ellipsoid,
- spherePointScratch,
+ spherePointScratch
);
// Project into plane with vertical for latitude
const magXY = Math.sqrt(
- spherePoint.x * spherePoint.x + spherePoint.y * spherePoint.y,
+ spherePoint.x * spherePoint.x + spherePoint.y * spherePoint.y
);
// Use fastApproximateAtan2 for alignment with shader
const sphereLatitude = CesiumMath.fastApproximateAtan2(magXY, spherePoint.z);
const sphereLongitude = CesiumMath.fastApproximateAtan2(
spherePoint.x,
- spherePoint.y,
+ spherePoint.y
);
result.x = sphereLatitude;
@@ -802,13 +802,13 @@ ShadowVolumeAppearance.getSphericalExtentGeometryInstanceAttributes = function (
boundingRectangle,
textureCoordinateRotationPoints,
ellipsoid,
- projection,
+ projection
) {
//>>includeStart('debug', pragmas.debug);
Check.typeOf.object("boundingRectangle", boundingRectangle);
Check.defined(
"textureCoordinateRotationPoints",
- textureCoordinateRotationPoints,
+ textureCoordinateRotationPoints
);
Check.typeOf.object("ellipsoid", ellipsoid);
Check.typeOf.object("projection", projection);
@@ -819,7 +819,7 @@ ShadowVolumeAppearance.getSphericalExtentGeometryInstanceAttributes = function (
boundingRectangle.south,
boundingRectangle.west,
ellipsoid,
- sphericalScratch,
+ sphericalScratch
);
let south = southWestExtents.x;
@@ -829,7 +829,7 @@ ShadowVolumeAppearance.getSphericalExtentGeometryInstanceAttributes = function (
boundingRectangle.north,
boundingRectangle.east,
ellipsoid,
- sphericalScratch,
+ sphericalScratch
);
let north = northEastExtents.x;
let east = northEastExtents.y;
@@ -869,14 +869,14 @@ ShadowVolumeAppearance.getSphericalExtentGeometryInstanceAttributes = function (
addTextureCoordinateRotationAttributes(
attributes,
- textureCoordinateRotationPoints,
+ textureCoordinateRotationPoints
);
add2DTextureCoordinateAttributes(boundingRectangle, projection, attributes);
return attributes;
};
ShadowVolumeAppearance.hasAttributesForTextureCoordinatePlanes = function (
- attributes,
+ attributes
) {
return (
defined(attributes.southWest_HIGH) &&
@@ -891,7 +891,7 @@ ShadowVolumeAppearance.hasAttributesForTextureCoordinatePlanes = function (
};
ShadowVolumeAppearance.hasAttributesForSphericalExtents = function (
- attributes,
+ attributes
) {
return (
defined(attributes.sphericalExtents) &&
diff --git a/packages/engine/Source/Scene/SingleTileImageryProvider.js b/packages/engine/Source/Scene/SingleTileImageryProvider.js
index 6e51fb8d22dc..0487027ae47f 100644
--- a/packages/engine/Source/Scene/SingleTileImageryProvider.js
+++ b/packages/engine/Source/Scene/SingleTileImageryProvider.js
@@ -261,7 +261,7 @@ function failure(resource, error, provider, previousError) {
0,
0,
0,
- error,
+ error
);
if (reportedError.retry) {
return doRequest(resource, provider, reportedError);
@@ -345,7 +345,7 @@ SingleTileImageryProvider.prototype.requestImage = async function (
x,
y,
level,
- request,
+ request
) {
if (!this._hasError && !defined(this._image)) {
const image = await doRequest(this._resource, this);
@@ -373,7 +373,7 @@ SingleTileImageryProvider.prototype.pickFeatures = function (
y,
level,
longitude,
- latitude,
+ latitude
) {
return undefined;
};
diff --git a/packages/engine/Source/Scene/SkyAtmosphere.js b/packages/engine/Source/Scene/SkyAtmosphere.js
index 62bffed2f0ef..628737ce5610 100644
--- a/packages/engine/Source/Scene/SkyAtmosphere.js
+++ b/packages/engine/Source/Scene/SkyAtmosphere.js
@@ -66,7 +66,7 @@ function SkyAtmosphere(ellipsoid) {
const scaleVector = Cartesian3.multiplyByScalar(
ellipsoid.radii,
outerEllipsoidScale,
- new Cartesian3(),
+ new Cartesian3()
);
this._scaleMatrix = Matrix4.fromScale(scaleVector);
this._modelMatrix = new Matrix4();
@@ -251,17 +251,17 @@ SkyAtmosphere.prototype.update = function (frameState, globe) {
const rotationMatrix = Matrix4.fromRotationTranslation(
frameState.context.uniformState.inverseViewRotation,
Cartesian3.ZERO,
- scratchModelMatrix,
+ scratchModelMatrix
);
const rotationOffsetMatrix = Matrix4.multiplyTransformation(
rotationMatrix,
Axis.Y_UP_TO_Z_UP,
- scratchModelMatrix,
+ scratchModelMatrix
);
const modelMatrix = Matrix4.multiply(
this._scaleMatrix,
rotationOffsetMatrix,
- scratchModelMatrix,
+ scratchModelMatrix
);
Matrix4.clone(modelMatrix, this._modelMatrix);
@@ -281,7 +281,7 @@ SkyAtmosphere.prototype.update = function (frameState, globe) {
slicePartitions: 256,
stackPartitions: 256,
vertexFormat: VertexFormat.POSITION_ONLY,
- }),
+ })
);
command.vertexArray = VertexArray.fromGeometry({
context: context,
@@ -346,17 +346,17 @@ function hasColorCorrection(skyAtmosphere) {
CesiumMath.equalsEpsilon(
skyAtmosphere.hueShift,
0.0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
) &&
CesiumMath.equalsEpsilon(
skyAtmosphere.saturationShift,
0.0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
) &&
CesiumMath.equalsEpsilon(
skyAtmosphere.brightnessShift,
0.0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
)
);
}
diff --git a/packages/engine/Source/Scene/SkyBox.js b/packages/engine/Source/Scene/SkyBox.js
index aa175b9d405b..66c374c76099 100644
--- a/packages/engine/Source/Scene/SkyBox.js
+++ b/packages/engine/Source/Scene/SkyBox.js
@@ -119,22 +119,22 @@ SkyBox.prototype.update = function (frameState, useHdr) {
Check.defined("this.sources", sources);
if (
Object.values(CubeMap.FaceName).some(
- (faceName) => !defined(sources[faceName]),
+ (faceName) => !defined(sources[faceName])
)
) {
throw new DeveloperError(
- "this.sources must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.",
+ "this.sources must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties."
);
}
const sourceType = typeof sources.positiveX;
if (
Object.values(CubeMap.FaceName).some(
- (faceName) => typeof sources[faceName] !== sourceType,
+ (faceName) => typeof sources[faceName] !== sourceType
)
) {
throw new DeveloperError(
- "this.sources properties must all be the same type.",
+ "this.sources properties must all be the same type."
);
}
//>>includeEnd('debug');
@@ -167,10 +167,11 @@ SkyBox.prototype.update = function (frameState, useHdr) {
BoxGeometry.fromDimensions({
dimensions: new Cartesian3(2.0, 2.0, 2.0),
vertexFormat: VertexFormat.POSITION_ONLY,
- }),
+ })
);
- const attributeLocations = (this._attributeLocations =
- GeometryPipeline.createAttributeLocations(geometry));
+ const attributeLocations = (this._attributeLocations = GeometryPipeline.createAttributeLocations(
+ geometry
+ ));
command.vertexArray = VertexArray.fromGeometry({
context: context,
diff --git a/packages/engine/Source/Scene/SpatialNode.js b/packages/engine/Source/Scene/SpatialNode.js
index 1617bb41ab23..2cd71600211c 100644
--- a/packages/engine/Source/Scene/SpatialNode.js
+++ b/packages/engine/Source/Scene/SpatialNode.js
@@ -75,12 +75,12 @@ SpatialNode.prototype.computeBoundingVolumes = function (shape) {
this.x,
this.y,
this.z,
- this.orientedBoundingBox,
+ this.orientedBoundingBox
);
const halfScale = Matrix3.getScale(
this.orientedBoundingBox.halfAxes,
- scratchObbHalfScale,
+ scratchObbHalfScale
);
const maximumScale = 2.0 * Cartesian3.maximumComponent(halfScale);
this.approximateVoxelSize =
@@ -134,7 +134,7 @@ SpatialNode.prototype.visibility = function (frameState, visibilityPlaneMask) {
*/
SpatialNode.prototype.computeScreenSpaceError = function (
cameraPosition,
- screenSpaceErrorMultiplier,
+ screenSpaceErrorMultiplier
) {
const obb = this.orientedBoundingBox;
@@ -164,7 +164,7 @@ function findKeyframeIndex(keyframe, keyframeNodes) {
return binarySearch(
keyframeNodes,
scratchBinarySearchKeyframeNode,
- KeyframeNode.searchComparator,
+ KeyframeNode.searchComparator
);
}
@@ -174,7 +174,7 @@ function findKeyframeIndex(keyframe, keyframeNodes) {
* @param {number} keyframeLocation
*/
SpatialNode.prototype.computeSurroundingRenderableKeyframeNodes = function (
- keyframeLocation,
+ keyframeLocation
) {
let spatialNode = this;
const startLevel = spatialNode.level;
@@ -193,7 +193,7 @@ SpatialNode.prototype.computeSurroundingRenderableKeyframeNodes = function (
if (renderableKeyframeNodes.length >= 1) {
const indexPrev = getKeyframeIndexPrev(
targetKeyframePrev,
- renderableKeyframeNodes,
+ renderableKeyframeNodes
);
const keyframeNodePrev = renderableKeyframeNodes[indexPrev];
@@ -207,7 +207,7 @@ SpatialNode.prototype.computeSurroundingRenderableKeyframeNodes = function (
const distancePrev = targetKeyframePrev - keyframeNodePrev.keyframe;
const weightedDistancePrev = getWeightedKeyframeDistance(
startLevel - spatialNode.level,
- distancePrev,
+ distancePrev
);
if (weightedDistancePrev < minimumDistancePrev) {
minimumDistancePrev = weightedDistancePrev;
@@ -217,7 +217,7 @@ SpatialNode.prototype.computeSurroundingRenderableKeyframeNodes = function (
const distanceNext = keyframeNodeNext.keyframe - targetKeyframeNext;
const weightedDistanceNext = getWeightedKeyframeDistance(
startLevel - spatialNode.level,
- distanceNext,
+ distanceNext
);
if (weightedDistanceNext < minimumDistanceNext) {
minimumDistanceNext = weightedDistanceNext;
@@ -249,7 +249,7 @@ SpatialNode.prototype.computeSurroundingRenderableKeyframeNodes = function (
(keyframeLocation - bestKeyframePrev) /
(bestKeyframeNext - bestKeyframePrev),
0.0,
- 1.0,
+ 1.0
);
};
@@ -294,7 +294,7 @@ SpatialNode.prototype.createKeyframeNode = function (keyframe) {
*/
SpatialNode.prototype.destroyKeyframeNode = function (
keyframeNode,
- megatextures,
+ megatextures
) {
const keyframe = keyframeNode.keyframe;
const keyframeIndex = findKeyframeIndex(keyframe, this.keyframeNodes);
@@ -311,7 +311,7 @@ SpatialNode.prototype.destroyKeyframeNode = function (
const renderableKeyframeNodeIndex = findKeyframeIndex(
keyframe,
- this.renderableKeyframeNodes,
+ this.renderableKeyframeNodes
);
if (renderableKeyframeNodeIndex < 0) {
throw new DeveloperError("Renderable keyframe node does not exist.");
@@ -334,7 +334,7 @@ SpatialNode.prototype.destroyKeyframeNode = function (
*/
SpatialNode.prototype.addKeyframeNodeToMegatextures = function (
keyframeNode,
- megatextures,
+ megatextures
) {
if (
keyframeNode.state !== KeyframeNode.LoadState.RECEIVED ||
@@ -354,7 +354,7 @@ SpatialNode.prototype.addKeyframeNodeToMegatextures = function (
const renderableKeyframeNodes = this.renderableKeyframeNodes;
let renderableKeyframeNodeIndex = findKeyframeIndex(
keyframeNode.keyframe,
- renderableKeyframeNodes,
+ renderableKeyframeNodes
);
if (renderableKeyframeNodeIndex >= 0) {
throw new DeveloperError("Keyframe already renderable");
diff --git a/packages/engine/Source/Scene/SphereEmitter.js b/packages/engine/Source/Scene/SphereEmitter.js
index bb58256c0168..4925d0847225 100644
--- a/packages/engine/Source/Scene/SphereEmitter.js
+++ b/packages/engine/Source/Scene/SphereEmitter.js
@@ -60,7 +60,7 @@ SphereEmitter.prototype.emit = function (particle) {
particle.position = Cartesian3.fromElements(x, y, z, particle.position);
particle.velocity = Cartesian3.normalize(
particle.position,
- particle.velocity,
+ particle.velocity
);
};
export default SphereEmitter;
diff --git a/packages/engine/Source/Scene/StructuralMetadata.js b/packages/engine/Source/Scene/StructuralMetadata.js
index f97c513041ad..5d9fae62e338 100644
--- a/packages/engine/Source/Scene/StructuralMetadata.js
+++ b/packages/engine/Source/Scene/StructuralMetadata.js
@@ -231,7 +231,7 @@ StructuralMetadata.prototype.getPropertyTexture = function (propertyTextureId) {
* @private
*/
StructuralMetadata.prototype.getPropertyAttribute = function (
- propertyAttributeId,
+ propertyAttributeId
) {
//>>includeStart('debug', pragmas.debug);
Check.typeOf.number("propertyAttributeId", propertyAttributeId);
diff --git a/packages/engine/Source/Scene/StyleExpression.js b/packages/engine/Source/Scene/StyleExpression.js
index d8ad4339084d..10e49410f645 100644
--- a/packages/engine/Source/Scene/StyleExpression.js
+++ b/packages/engine/Source/Scene/StyleExpression.js
@@ -67,7 +67,7 @@ StyleExpression.prototype.getShaderFunction = function (
functionSignature,
variableSubstitutionMap,
shaderState,
- returnType,
+ returnType
) {
DeveloperError.throwInstantiationError();
};
diff --git a/packages/engine/Source/Scene/Sun.js b/packages/engine/Source/Scene/Sun.js
index 5a3d9d069b51..45eeb785a7c1 100644
--- a/packages/engine/Source/Scene/Sun.js
+++ b/packages/engine/Source/Scene/Sun.js
@@ -270,15 +270,11 @@ Sun.prototype.update = function (frameState, passState, useHdr) {
const position = SceneTransforms.computeActualEllipsoidPosition(
frameState,
sunPosition,
- scratchCartesian4,
+ scratchCartesian4
);
const dist = Cartesian3.magnitude(
- Cartesian3.subtract(
- position,
- frameState.camera.position,
- scratchCartesian4,
- ),
+ Cartesian3.subtract(position, frameState.camera.position, scratchCartesian4)
);
const projMatrix = context.uniformState.projection;
@@ -291,28 +287,28 @@ Sun.prototype.update = function (frameState, passState, useHdr) {
const positionCC = Matrix4.multiplyByVector(
projMatrix,
positionEC,
- scratchCartesian4,
+ scratchCartesian4
);
const positionWC = SceneTransforms.clipToGLWindowCoordinates(
passState.viewport,
positionCC,
- scratchPositionWC,
+ scratchPositionWC
);
positionEC.x = CesiumMath.SOLAR_RADIUS;
const limbCC = Matrix4.multiplyByVector(
projMatrix,
positionEC,
- scratchCartesian4,
+ scratchCartesian4
);
const limbWC = SceneTransforms.clipToGLWindowCoordinates(
passState.viewport,
limbCC,
- scratchLimbWC,
+ scratchLimbWC
);
this._size = Cartesian2.magnitude(
- Cartesian2.subtract(limbWC, positionWC, scratchCartesian4),
+ Cartesian2.subtract(limbWC, positionWC, scratchCartesian4)
);
this._size = 2.0 * this._size * (1.0 + 2.0 * this._glowLengthTS);
this._size = Math.ceil(this._size);
diff --git a/packages/engine/Source/Scene/SunPostProcess.js b/packages/engine/Source/Scene/SunPostProcess.js
index ab025a5d4889..81277c2ef6ca 100644
--- a/packages/engine/Source/Scene/SunPostProcess.js
+++ b/packages/engine/Source/Scene/SunPostProcess.js
@@ -154,18 +154,18 @@ function updateSunPosition(postProcess, context, viewport) {
viewport,
0.0,
1.0,
- postProcessMatrix4Scratch,
+ postProcessMatrix4Scratch
);
const sunPositionEC = Matrix4.multiplyByPoint(
viewMatrix,
sunPosition,
- sunPositionECScratch,
+ sunPositionECScratch
);
let sunPositionWC = Transforms.pointToGLWindowCoordinates(
viewProjectionMatrix,
viewportTransformation,
sunPosition,
- sunPositionWCScratch,
+ sunPositionWCScratch
);
sunPositionEC.x += CesiumMath.SOLAR_RADIUS;
@@ -173,7 +173,7 @@ function updateSunPosition(postProcess, context, viewport) {
projectionMatrix,
viewportTransformation,
sunPositionEC,
- sunPositionEC,
+ sunPositionEC
);
const sunSize =
Cartesian2.magnitude(Cartesian2.subtract(limbWC, sunPositionWC, limbWC)) *
@@ -205,13 +205,13 @@ function updateSunPosition(postProcess, context, viewport) {
downSampleViewport,
0.0,
1.0,
- postProcessMatrix4Scratch,
+ postProcessMatrix4Scratch
);
sunPositionWC = Transforms.pointToGLWindowCoordinates(
viewProjectionMatrix,
viewportTransformation,
sunPosition,
- sunPositionWCScratch,
+ sunPositionWCScratch
);
size.x *= downSampleWidth / width;
diff --git a/packages/engine/Source/Scene/TerrainFillMesh.js b/packages/engine/Source/Scene/TerrainFillMesh.js
index a23c50ce30c5..9d1671493a63 100644
--- a/packages/engine/Source/Scene/TerrainFillMesh.js
+++ b/packages/engine/Source/Scene/TerrainFillMesh.js
@@ -50,7 +50,7 @@ function TerrainFillMesh(tile) {
TerrainFillMesh.prototype.update = function (
tileProvider,
frameState,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
) {
if (this.changedThisFrame) {
createFillMesh(tileProvider, frameState, this.tile, vertexArraysToDestroy);
@@ -73,7 +73,7 @@ TerrainFillMesh.prototype.destroy = function (vertexArraysToDestroy) {
};
TerrainFillMesh.prototype._destroyVertexArray = function (
- vertexArraysToDestroy,
+ vertexArraysToDestroy
) {
if (defined(this.vertexArray)) {
if (defined(vertexArraysToDestroy)) {
@@ -91,7 +91,7 @@ TerrainFillMesh.updateFillTiles = function (
tileProvider,
renderedTiles,
frameState,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
) {
// We want our fill tiles to look natural, which means they should align perfectly with
// adjacent loaded tiles, and their edges that are not adjacent to loaded tiles should have
@@ -136,7 +136,7 @@ TerrainFillMesh.updateFillTiles = function (
TileEdge.EAST,
false,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
visitRenderedTiles(
tileProvider,
@@ -147,7 +147,7 @@ TerrainFillMesh.updateFillTiles = function (
TileEdge.NORTH,
false,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
visitRenderedTiles(
tileProvider,
@@ -158,7 +158,7 @@ TerrainFillMesh.updateFillTiles = function (
TileEdge.WEST,
false,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
visitRenderedTiles(
tileProvider,
@@ -169,7 +169,7 @@ TerrainFillMesh.updateFillTiles = function (
TileEdge.SOUTH,
false,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
const tileToNorthwest = tileToWest.findTileToNorth(levelZeroTiles);
@@ -185,7 +185,7 @@ TerrainFillMesh.updateFillTiles = function (
TileEdge.SOUTHEAST,
false,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
visitRenderedTiles(
tileProvider,
@@ -196,7 +196,7 @@ TerrainFillMesh.updateFillTiles = function (
TileEdge.SOUTHWEST,
false,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
visitRenderedTiles(
tileProvider,
@@ -207,7 +207,7 @@ TerrainFillMesh.updateFillTiles = function (
TileEdge.NORTHEAST,
false,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
visitRenderedTiles(
tileProvider,
@@ -218,7 +218,7 @@ TerrainFillMesh.updateFillTiles = function (
TileEdge.NORTHWEST,
false,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
tile = traversalQueue.dequeue();
@@ -234,7 +234,7 @@ function visitRenderedTiles(
tileEdge,
downOnly,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
) {
if (startTile === undefined) {
// There are no tiles North or South of the poles.
@@ -295,7 +295,7 @@ function visitRenderedTiles(
tileEdge,
currentFrameNumber,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
return;
}
@@ -320,7 +320,7 @@ function visitRenderedTiles(
tileEdge,
true,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
visitRenderedTiles(
tileProvider,
@@ -331,7 +331,7 @@ function visitRenderedTiles(
tileEdge,
true,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
break;
case TileEdge.EAST:
@@ -344,7 +344,7 @@ function visitRenderedTiles(
tileEdge,
true,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
visitRenderedTiles(
tileProvider,
@@ -355,7 +355,7 @@ function visitRenderedTiles(
tileEdge,
true,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
break;
case TileEdge.SOUTH:
@@ -368,7 +368,7 @@ function visitRenderedTiles(
tileEdge,
true,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
visitRenderedTiles(
tileProvider,
@@ -379,7 +379,7 @@ function visitRenderedTiles(
tileEdge,
true,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
break;
case TileEdge.NORTH:
@@ -392,7 +392,7 @@ function visitRenderedTiles(
tileEdge,
true,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
visitRenderedTiles(
tileProvider,
@@ -403,7 +403,7 @@ function visitRenderedTiles(
tileEdge,
true,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
break;
case TileEdge.NORTHWEST:
@@ -416,7 +416,7 @@ function visitRenderedTiles(
tileEdge,
true,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
break;
case TileEdge.NORTHEAST:
@@ -429,7 +429,7 @@ function visitRenderedTiles(
tileEdge,
true,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
break;
case TileEdge.SOUTHWEST:
@@ -442,7 +442,7 @@ function visitRenderedTiles(
tileEdge,
true,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
break;
case TileEdge.SOUTHEAST:
@@ -455,7 +455,7 @@ function visitRenderedTiles(
tileEdge,
true,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
break;
default:
@@ -471,7 +471,7 @@ function visitTile(
tileEdge,
frameNumber,
traversalQueue,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
) {
const destinationSurfaceTile = destinationTile.data;
@@ -495,7 +495,7 @@ function visitTile(
sourceTile,
destinationTile,
tileEdge,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
}
@@ -505,7 +505,7 @@ function propagateEdge(
sourceTile,
destinationTile,
tileEdge,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
) {
const destinationFill = destinationTile.data.fill;
@@ -520,7 +520,7 @@ function propagateEdge(
tileProvider,
frameState,
sourceTile,
- vertexArraysToDestroy,
+ vertexArraysToDestroy
);
sourceFill.changedThisFrame = false;
}
@@ -614,7 +614,7 @@ function propagateEdge(
CesiumMath.greaterThan(
sourceRectangle.north,
existingRectangle.south,
- epsilon,
+ epsilon
)
) {
break;
@@ -627,7 +627,7 @@ function propagateEdge(
CesiumMath.greaterThanOrEquals(
sourceRectangle.south,
existingRectangle.north,
- epsilon,
+ epsilon
)
) {
break;
@@ -646,7 +646,7 @@ function propagateEdge(
CesiumMath.lessThan(
sourceRectangle.west,
existingRectangle.east,
- epsilon,
+ epsilon
)
) {
break;
@@ -659,7 +659,7 @@ function propagateEdge(
CesiumMath.lessThanOrEquals(
sourceRectangle.east,
existingRectangle.west,
- epsilon,
+ epsilon
)
) {
break;
@@ -678,7 +678,7 @@ function propagateEdge(
CesiumMath.lessThan(
sourceRectangle.south,
existingRectangle.north,
- epsilon,
+ epsilon
)
) {
break;
@@ -691,7 +691,7 @@ function propagateEdge(
CesiumMath.lessThanOrEquals(
sourceRectangle.north,
existingRectangle.south,
- epsilon,
+ epsilon
)
) {
break;
@@ -710,7 +710,7 @@ function propagateEdge(
CesiumMath.greaterThan(
sourceRectangle.east,
existingRectangle.west,
- epsilon,
+ epsilon
)
) {
break;
@@ -723,7 +723,7 @@ function propagateEdge(
CesiumMath.greaterThanOrEquals(
sourceRectangle.west,
existingRectangle.east,
- epsilon,
+ epsilon
)
) {
break;
@@ -766,7 +766,7 @@ function fillMissingCorner(
adjacentCorner1,
adjacentCorner2,
oppositeCorner,
- vertex,
+ vertex
) {
if (defined(corner)) {
return corner;
@@ -823,7 +823,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
GlobeSurfaceTile.initialize(
tile,
tileProvider.terrainProvider,
- tileProvider._imageryLayers,
+ tileProvider._imageryLayers
);
const surfaceTile = tile.data;
@@ -848,7 +848,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
fill.northMeshes,
fill.westTiles,
fill.westMeshes,
- nwVertexScratch,
+ nwVertexScratch
);
let swCorner = getCorner(
fill,
@@ -861,7 +861,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
fill.westMeshes,
fill.southTiles,
fill.southMeshes,
- swVertexScratch,
+ swVertexScratch
);
let seCorner = getCorner(
fill,
@@ -874,7 +874,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
fill.southMeshes,
fill.eastTiles,
fill.eastMeshes,
- seVertexScratch,
+ seVertexScratch
);
let neCorner = getCorner(
fill,
@@ -887,7 +887,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
fill.eastMeshes,
fill.northTiles,
fill.northMeshes,
- neVertexScratch,
+ neVertexScratch
);
nwCorner = fillMissingCorner(
@@ -899,7 +899,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
swCorner,
neCorner,
seCorner,
- nwVertexScratch,
+ nwVertexScratch
);
swCorner = fillMissingCorner(
fill,
@@ -910,7 +910,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
nwCorner,
seCorner,
neCorner,
- swVertexScratch,
+ swVertexScratch
);
seCorner = fillMissingCorner(
fill,
@@ -921,7 +921,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
swCorner,
neCorner,
nwCorner,
- seVertexScratch,
+ seVertexScratch
);
neCorner = fillMissingCorner(
fill,
@@ -932,7 +932,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
seCorner,
nwCorner,
swCorner,
- neVertexScratch,
+ neVertexScratch
);
const southwestHeight = swCorner.height;
@@ -944,13 +944,13 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
southwestHeight,
southeastHeight,
northwestHeight,
- northeastHeight,
+ northeastHeight
);
let maximumHeight = Math.max(
southwestHeight,
southeastHeight,
northwestHeight,
- northeastHeight,
+ northeastHeight
);
const middleHeight = (minimumHeight + maximumHeight) * 0.5;
@@ -997,20 +997,19 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
createMeshSyncOptions.y = tile.y;
createMeshSyncOptions.level = tile.level;
createMeshSyncOptions.exaggeration = exaggeration;
- createMeshSyncOptions.exaggerationRelativeHeight =
- exaggerationRelativeHeight;
+ createMeshSyncOptions.exaggerationRelativeHeight = exaggerationRelativeHeight;
fill.mesh = terrainData._createMeshSync(createMeshSyncOptions);
} else {
const hasGeodeticSurfaceNormals = hasExaggeration;
const centerCartographic = Rectangle.center(
rectangle,
- centerCartographicScratch,
+ centerCartographicScratch
);
centerCartographic.height = middleHeight;
const center = ellipsoid.cartographicToCartesian(
centerCartographic,
- scratchCenter,
+ scratchCenter
);
const encoding = new TerrainEncoding(
center,
@@ -1022,7 +1021,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
true,
hasGeodeticSurfaceNormals,
exaggeration,
- exaggerationRelativeHeight,
+ exaggerationRelativeHeight
);
// At _most_, we have vertices for the 4 corners, plus 1 center, plus every adjacent edge vertex.
@@ -1072,7 +1071,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
nwCorner.height,
nwCorner.encodedNormal,
1.0,
- heightRange,
+ heightRange
);
nextIndex = addEdge(
fill,
@@ -1083,7 +1082,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
fill.westTiles,
fill.westMeshes,
TileEdge.EAST,
- heightRange,
+ heightRange
);
const southwestIndex = nextIndex;
nextIndex = addVertexWithComputedPosition(
@@ -1097,7 +1096,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
swCorner.height,
swCorner.encodedNormal,
0.0,
- heightRange,
+ heightRange
);
nextIndex = addEdge(
fill,
@@ -1108,7 +1107,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
fill.southTiles,
fill.southMeshes,
TileEdge.NORTH,
- heightRange,
+ heightRange
);
const southeastIndex = nextIndex;
nextIndex = addVertexWithComputedPosition(
@@ -1122,7 +1121,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
seCorner.height,
seCorner.encodedNormal,
0.0,
- heightRange,
+ heightRange
);
nextIndex = addEdge(
fill,
@@ -1133,7 +1132,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
fill.eastTiles,
fill.eastMeshes,
TileEdge.WEST,
- heightRange,
+ heightRange
);
const northeastIndex = nextIndex;
nextIndex = addVertexWithComputedPosition(
@@ -1147,7 +1146,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
neCorner.height,
neCorner.encodedNormal,
1.0,
- heightRange,
+ heightRange
);
nextIndex = addEdge(
fill,
@@ -1158,7 +1157,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
fill.northTiles,
fill.northMeshes,
TileEdge.SOUTH,
- heightRange,
+ heightRange
);
minimumHeight = heightRange.minimumHeight;
@@ -1168,30 +1167,31 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
rectangle,
minimumHeight,
maximumHeight,
- tile.tilingScheme.ellipsoid,
+ tile.tilingScheme.ellipsoid
);
// Add a single vertex at the center of the tile.
- const southMercatorY =
- WebMercatorProjection.geodeticLatitudeToMercatorAngle(rectangle.south);
+ const southMercatorY = WebMercatorProjection.geodeticLatitudeToMercatorAngle(
+ rectangle.south
+ );
const oneOverMercatorHeight =
1.0 /
(WebMercatorProjection.geodeticLatitudeToMercatorAngle(rectangle.north) -
southMercatorY);
const centerWebMercatorT =
(WebMercatorProjection.geodeticLatitudeToMercatorAngle(
- centerCartographic.latitude,
+ centerCartographic.latitude
) -
southMercatorY) *
oneOverMercatorHeight;
const geodeticSurfaceNormal = ellipsoid.geodeticSurfaceNormalCartographic(
cartographicScratch,
- normalScratch,
+ normalScratch
);
const centerEncodedNormal = AttributeCompression.octEncode(
geodeticSurfaceNormal,
- octEncodedNormalScratch,
+ octEncodedNormalScratch
);
const centerIndex = nextIndex;
@@ -1203,7 +1203,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
middleHeight,
centerEncodedNormal,
centerWebMercatorT,
- geodeticSurfaceNormal,
+ geodeticSurfaceNormal
);
++nextIndex;
@@ -1280,7 +1280,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
obb.center,
rectangle,
minimumHeight,
- maximumHeight,
+ maximumHeight
),
encoding.stride,
obb,
@@ -1288,7 +1288,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
westIndicesSouthToNorth,
southIndicesEastToWest,
eastIndicesNorthToSouth,
- northIndicesWestToEast,
+ northIndicesWestToEast
);
}
@@ -1298,13 +1298,13 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
fill.vertexArray = GlobeSurfaceTile._createVertexArrayForMesh(
context,
- fill.mesh,
+ fill.mesh
);
surfaceTile.processImagery(
tile,
tileProvider.terrainProvider,
frameState,
- true,
+ true
);
const oldTexture = fill.waterMaskTexture;
@@ -1321,7 +1321,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
surfaceTile._computeWaterMaskTranslationAndScale(
tile,
waterSourceTile,
- fill.waterMaskTranslationAndScale,
+ fill.waterMaskTranslationAndScale
);
}
}
@@ -1345,7 +1345,7 @@ function addVertexWithComputedPosition(
height,
encodedNormal,
webMercatorT,
- heightRange,
+ heightRange
) {
const cartographic = cartographicScratch;
cartographic.longitude = CesiumMath.lerp(rectangle.west, rectangle.east, u);
@@ -1353,14 +1353,14 @@ function addVertexWithComputedPosition(
cartographic.height = height;
const position = ellipsoid.cartographicToCartesian(
cartographic,
- cartesianScratch,
+ cartesianScratch
);
let geodeticSurfaceNormal;
if (encoding.hasGeodeticSurfaceNormals) {
geodeticSurfaceNormal = ellipsoid.geodeticSurfaceNormal(
position,
- normalScratch,
+ normalScratch
);
}
@@ -1376,7 +1376,7 @@ function addVertexWithComputedPosition(
height,
encodedNormal,
webMercatorT,
- geodeticSurfaceNormal,
+ geodeticSurfaceNormal
);
heightRange.minimumHeight = Math.min(heightRange.minimumHeight, height);
@@ -1391,7 +1391,7 @@ function transformTextureCoordinates(
sourceTile,
targetTile,
coordinates,
- result,
+ result
) {
let sourceRectangle = sourceTile.rectangle;
const targetRectangle = targetTile.rectangle;
@@ -1405,7 +1405,7 @@ function transformTextureCoordinates(
) {
sourceRectangle = Rectangle.clone(
sourceTile.rectangle,
- sourceRectangleScratch,
+ sourceRectangleScratch
);
sourceRectangle.west -= CesiumMath.TWO_PI;
sourceRectangle.east -= CesiumMath.TWO_PI;
@@ -1417,7 +1417,7 @@ function transformTextureCoordinates(
) {
sourceRectangle = Rectangle.clone(
sourceTile.rectangle,
- sourceRectangleScratch,
+ sourceRectangleScratch
);
sourceRectangle.west += CesiumMath.TWO_PI;
sourceRectangle.east += CesiumMath.TWO_PI;
@@ -1464,7 +1464,7 @@ function getVertexFromTileAtCorner(sourceMesh, sourceIndex, u, v, vertex) {
sourceEncoding.getOctEncodedNormal(
sourceVertices,
sourceIndex,
- vertex.encodedNormal,
+ vertex.encodedNormal
);
} else {
const normal = vertex.encodedNormal;
@@ -1486,7 +1486,7 @@ function getInterpolatedVertexAtCorner(
u,
v,
interpolateU,
- vertex,
+ vertex
) {
const sourceEncoding = sourceMesh.encoding;
const sourceVertices = sourceMesh.vertices;
@@ -1497,9 +1497,9 @@ function getInterpolatedVertexAtCorner(
sourceEncoding.decodeTextureCoordinates(
sourceVertices,
previousIndex,
- uvScratch,
+ uvScratch
),
- uvScratch,
+ uvScratch
);
const nextUv = transformTextureCoordinates(
sourceTile,
@@ -1507,9 +1507,9 @@ function getInterpolatedVertexAtCorner(
sourceEncoding.decodeTextureCoordinates(
sourceVertices,
nextIndex,
- uvScratch2,
+ uvScratch2
),
- uvScratch2,
+ uvScratch2
);
let ratio;
@@ -1526,17 +1526,17 @@ function getInterpolatedVertexAtCorner(
cartographicScratch.longitude = CesiumMath.lerp(
targetRectangle.west,
targetRectangle.east,
- u,
+ u
);
cartographicScratch.latitude = CesiumMath.lerp(
targetRectangle.south,
targetRectangle.north,
- v,
+ v
);
vertex.height = cartographicScratch.height = CesiumMath.lerp(
height1,
height2,
- ratio,
+ ratio
);
let normal;
@@ -1544,22 +1544,22 @@ function getInterpolatedVertexAtCorner(
const encodedNormal1 = sourceEncoding.getOctEncodedNormal(
sourceVertices,
previousIndex,
- encodedNormalScratch,
+ encodedNormalScratch
);
const encodedNormal2 = sourceEncoding.getOctEncodedNormal(
sourceVertices,
nextIndex,
- encodedNormalScratch2,
+ encodedNormalScratch2
);
const normal1 = AttributeCompression.octDecode(
encodedNormal1.x,
encodedNormal1.y,
- cartesianScratch,
+ cartesianScratch
);
const normal2 = AttributeCompression.octDecode(
encodedNormal2.x,
encodedNormal2.y,
- cartesianScratch2,
+ cartesianScratch2
);
normal = Cartesian3.lerp(normal1, normal2, ratio, cartesianScratch);
Cartesian3.normalize(normal, normal);
@@ -1567,7 +1567,7 @@ function getInterpolatedVertexAtCorner(
} else {
normal = ellipsoid.geodeticSurfaceNormalCartographic(
cartographicScratch,
- cartesianScratch,
+ cartesianScratch
);
AttributeCompression.octEncode(normal, vertex.encodedNormal);
}
@@ -1579,12 +1579,12 @@ function getVertexWithHeightAtCorner(
u,
v,
height,
- vertex,
+ vertex
) {
vertex.height = height;
const normal = ellipsoid.geodeticSurfaceNormalCartographic(
cartographicScratch,
- cartesianScratch,
+ cartesianScratch
);
AttributeCompression.octEncode(normal, vertex.encodedNormal);
}
@@ -1600,7 +1600,7 @@ function getCorner(
previousEdgeMeshes,
nextEdgeTiles,
nextEdgeMeshes,
- vertex,
+ vertex
) {
const gotCorner =
getCornerFromEdge(
@@ -1611,7 +1611,7 @@ function getCorner(
false,
u,
v,
- vertex,
+ vertex
) ||
getCornerFromEdge(
terrainFillMesh,
@@ -1621,7 +1621,7 @@ function getCorner(
true,
u,
v,
- vertex,
+ vertex
);
if (gotCorner) {
return vertex;
@@ -1667,7 +1667,7 @@ function getCorner(
terrainFillMesh.southTiles,
TileEdge.NORTH,
u,
- v,
+ v
);
} else {
// northwest
@@ -1679,7 +1679,7 @@ function getCorner(
terrainFillMesh.westTiles,
TileEdge.EAST,
u,
- v,
+ v
);
}
} else if (v === 0.0) {
@@ -1692,7 +1692,7 @@ function getCorner(
terrainFillMesh.eastTiles,
TileEdge.WEST,
u,
- v,
+ v
);
} else {
// northeast
@@ -1704,7 +1704,7 @@ function getCorner(
terrainFillMesh.northTiles,
TileEdge.SOUTH,
u,
- v,
+ v
);
}
@@ -1715,7 +1715,7 @@ function getCorner(
u,
v,
height,
- vertex,
+ vertex
);
return vertex;
}
@@ -1732,7 +1732,7 @@ function getClosestHeightToCorner(
nextTiles,
nextEdge,
u,
- v,
+ v
) {
const height1 = getNearestHeightOnEdge(
previousMeshes,
@@ -1740,7 +1740,7 @@ function getClosestHeightToCorner(
false,
previousEdge,
u,
- v,
+ v
);
const height2 = getNearestHeightOnEdge(
nextMeshes,
@@ -1748,7 +1748,7 @@ function getClosestHeightToCorner(
true,
nextEdge,
u,
- v,
+ v
);
if (defined(height1) && defined(height2)) {
// It would be slightly better to do a weighted average of the two heights
@@ -1769,7 +1769,7 @@ function addEdge(
edgeTiles,
edgeMeshes,
tileEdge,
- heightRange,
+ heightRange
) {
for (let i = 0; i < edgeTiles.length; ++i) {
nextIndex = addEdgeMesh(
@@ -1781,7 +1781,7 @@ function addEdge(
edgeTiles[i],
edgeMeshes[i],
tileEdge,
- heightRange,
+ heightRange
);
}
return nextIndex;
@@ -1796,21 +1796,21 @@ function addEdgeMesh(
edgeTile,
edgeMesh,
tileEdge,
- heightRange,
+ heightRange
) {
// Handle copying edges across the anti-meridian.
let sourceRectangle = edgeTile.rectangle;
if (tileEdge === TileEdge.EAST && terrainFillMesh.tile.x === 0) {
sourceRectangle = Rectangle.clone(
edgeTile.rectangle,
- sourceRectangleScratch,
+ sourceRectangleScratch
);
sourceRectangle.west -= CesiumMath.TWO_PI;
sourceRectangle.east -= CesiumMath.TWO_PI;
} else if (tileEdge === TileEdge.WEST && edgeTile.x === 0) {
sourceRectangle = Rectangle.clone(
edgeTile.rectangle,
- sourceRectangleScratch,
+ sourceRectangleScratch
);
sourceRectangle.west += CesiumMath.TWO_PI;
sourceRectangle.east += CesiumMath.TWO_PI;
@@ -1859,12 +1859,12 @@ function addEdgeMesh(
let oneOverMercatorHeight;
if (sourceEncoding.hasWebMercatorT) {
southMercatorY = WebMercatorProjection.geodeticLatitudeToMercatorAngle(
- targetRectangle.south,
+ targetRectangle.south
);
oneOverMercatorHeight =
1.0 /
(WebMercatorProjection.geodeticLatitudeToMercatorAngle(
- targetRectangle.north,
+ targetRectangle.north
) -
southMercatorY);
}
@@ -1875,7 +1875,7 @@ function addEdgeMesh(
const uv = sourceEncoding.decodeTextureCoordinates(
sourceVertices,
index,
- uvScratch,
+ uvScratch
);
transformTextureCoordinates(sourceTile, targetTile, uv, uv);
const u = uv.x;
@@ -1910,7 +1910,7 @@ function addEdgeMesh(
const position = sourceEncoding.decodePosition(
sourceVertices,
index,
- cartesianScratch,
+ cartesianScratch
);
const height = sourceEncoding.decodeHeight(sourceVertices, index);
@@ -1919,7 +1919,7 @@ function addEdgeMesh(
normal = sourceEncoding.getOctEncodedNormal(
sourceVertices,
index,
- octEncodedNormalScratch,
+ octEncodedNormalScratch
);
} else {
normal = octEncodedNormalScratch;
@@ -1932,7 +1932,7 @@ function addEdgeMesh(
const latitude = CesiumMath.lerp(
targetRectangle.south,
targetRectangle.north,
- v,
+ v
);
webMercatorT =
(WebMercatorProjection.geodeticLatitudeToMercatorAngle(latitude) -
@@ -1944,7 +1944,7 @@ function addEdgeMesh(
if (encoding.hasGeodeticSurfaceNormals) {
geodeticSurfaceNormal = ellipsoid.geodeticSurfaceNormal(
position,
- normalScratch,
+ normalScratch
);
}
@@ -1956,7 +1956,7 @@ function addEdgeMesh(
height,
normal,
webMercatorT,
- geodeticSurfaceNormal,
+ geodeticSurfaceNormal
);
heightRange.minimumHeight = Math.min(heightRange.minimumHeight, height);
@@ -2034,7 +2034,7 @@ function getCornerFromEdge(
isNext,
u,
v,
- vertex,
+ vertex
) {
let edgeVertices;
let compareU;
@@ -2085,13 +2085,13 @@ function getCornerFromEdge(
sourceMesh.encoding.decodeTextureCoordinates(
sourceMesh.vertices,
vertexIndex,
- uvScratch,
+ uvScratch
);
const targetUv = transformTextureCoordinates(
sourceTile,
terrainFillMesh.tile,
uvScratch,
- uvScratch,
+ uvScratch
);
if (targetUv.x === u && targetUv.y === v) {
// Vertex is good!
@@ -2100,32 +2100,31 @@ function getCornerFromEdge(
}
// The last vertex is not the one we need, try binary searching for the right one.
- vertexIndexIndex = binarySearch(
- edgeVertices,
- compareU ? u : v,
- function (vertexIndex, textureCoordinate) {
- sourceMesh.encoding.decodeTextureCoordinates(
- sourceMesh.vertices,
- vertexIndex,
- uvScratch,
- );
- const targetUv = transformTextureCoordinates(
- sourceTile,
- terrainFillMesh.tile,
- uvScratch,
- uvScratch,
- );
- if (increasing) {
- if (compareU) {
- return targetUv.x - u;
- }
- return targetUv.y - v;
- } else if (compareU) {
- return u - targetUv.x;
+ vertexIndexIndex = binarySearch(edgeVertices, compareU ? u : v, function (
+ vertexIndex,
+ textureCoordinate
+ ) {
+ sourceMesh.encoding.decodeTextureCoordinates(
+ sourceMesh.vertices,
+ vertexIndex,
+ uvScratch
+ );
+ const targetUv = transformTextureCoordinates(
+ sourceTile,
+ terrainFillMesh.tile,
+ uvScratch,
+ uvScratch
+ );
+ if (increasing) {
+ if (compareU) {
+ return targetUv.x - u;
}
- return v - targetUv.y;
- },
- );
+ return targetUv.y - v;
+ } else if (compareU) {
+ return u - targetUv.x;
+ }
+ return v - targetUv.y;
+ });
if (vertexIndexIndex < 0) {
vertexIndexIndex = ~vertexIndexIndex;
@@ -2142,7 +2141,7 @@ function getCornerFromEdge(
u,
v,
compareU,
- vertex,
+ vertex
);
return true;
}
@@ -2153,7 +2152,7 @@ function getCornerFromEdge(
edgeVertices[vertexIndexIndex],
u,
v,
- vertex,
+ vertex
);
return true;
}
@@ -2176,7 +2175,7 @@ function computeOccludeePoint(
rectangle,
minimumHeight,
maximumHeight,
- result,
+ result
) {
const ellipsoidalOccluder = tileProvider.quadtree._occluders.ellipsoid;
const ellipsoid = ellipsoidalOccluder.ellipsoid;
@@ -2187,35 +2186,35 @@ function computeOccludeePoint(
rectangle.south,
maximumHeight,
ellipsoid,
- cornerPositions[0],
+ cornerPositions[0]
);
Cartesian3.fromRadians(
rectangle.east,
rectangle.south,
maximumHeight,
ellipsoid,
- cornerPositions[1],
+ cornerPositions[1]
);
Cartesian3.fromRadians(
rectangle.west,
rectangle.north,
maximumHeight,
ellipsoid,
- cornerPositions[2],
+ cornerPositions[2]
);
Cartesian3.fromRadians(
rectangle.east,
rectangle.north,
maximumHeight,
ellipsoid,
- cornerPositions[3],
+ cornerPositions[3]
);
return ellipsoidalOccluder.computeHorizonCullingPointPossiblyUnderEllipsoid(
center,
cornerPositions,
minimumHeight,
- result,
+ result
);
}
export default TerrainFillMesh;
diff --git a/packages/engine/Source/Scene/TextureAtlas.js b/packages/engine/Source/Scene/TextureAtlas.js
index e094cd7f3de7..d53cf10b1ac9 100644
--- a/packages/engine/Source/Scene/TextureAtlas.js
+++ b/packages/engine/Source/Scene/TextureAtlas.js
@@ -17,7 +17,7 @@ function TextureAtlasNode(
topRight,
childNode1,
childNode2,
- imageIndex,
+ imageIndex
) {
this.bottomLeft = defaultValue(bottomLeft, Cartesian2.ZERO);
this.topRight = defaultValue(topRight, Cartesian2.ZERO);
@@ -60,7 +60,7 @@ function TextureAtlas(options) {
}
if (borderWidthInPixels < 0) {
throw new DeveloperError(
- "borderWidthInPixels must be greater than or equal to zero.",
+ "borderWidthInPixels must be greater than or equal to zero."
);
}
if (initialSize.x < 1 || initialSize.y < 1) {
@@ -172,23 +172,23 @@ function resizeAtlas(textureAtlas, image) {
// Create new node structure, putting the old root node in the bottom left.
const nodeBottomRight = new TextureAtlasNode(
new Cartesian2(oldAtlasWidth + borderWidthInPixels, borderWidthInPixels),
- new Cartesian2(atlasWidth, oldAtlasHeight),
+ new Cartesian2(atlasWidth, oldAtlasHeight)
);
const nodeBottomHalf = new TextureAtlasNode(
new Cartesian2(),
new Cartesian2(atlasWidth, oldAtlasHeight),
textureAtlas._root,
- nodeBottomRight,
+ nodeBottomRight
);
const nodeTopHalf = new TextureAtlasNode(
new Cartesian2(borderWidthInPixels, oldAtlasHeight + borderWidthInPixels),
- new Cartesian2(atlasWidth, atlasHeight),
+ new Cartesian2(atlasWidth, atlasHeight)
);
const nodeMain = new TextureAtlasNode(
new Cartesian2(),
new Cartesian2(atlasWidth, atlasHeight),
nodeBottomHalf,
- nodeTopHalf,
+ nodeTopHalf
);
// Resize texture coordinates.
@@ -245,7 +245,7 @@ function resizeAtlas(textureAtlas, image) {
});
textureAtlas._root = new TextureAtlasNode(
new Cartesian2(borderWidthInPixels, borderWidthInPixels),
- new Cartesian2(initialWidth, initialHeight),
+ new Cartesian2(initialWidth, initialHeight)
);
}
}
@@ -284,7 +284,7 @@ function findNode(textureAtlas, node, image) {
if (widthDifference > heightDifference) {
node.childNode1 = new TextureAtlasNode(
new Cartesian2(node.bottomLeft.x, node.bottomLeft.y),
- new Cartesian2(node.bottomLeft.x + image.width, node.topRight.y),
+ new Cartesian2(node.bottomLeft.x + image.width, node.topRight.y)
);
// Only make a second child if the border gives enough space.
const childNode2BottomLeftX =
@@ -292,7 +292,7 @@ function findNode(textureAtlas, node, image) {
if (childNode2BottomLeftX < node.topRight.x) {
node.childNode2 = new TextureAtlasNode(
new Cartesian2(childNode2BottomLeftX, node.bottomLeft.y),
- new Cartesian2(node.topRight.x, node.topRight.y),
+ new Cartesian2(node.topRight.x, node.topRight.y)
);
}
}
@@ -300,7 +300,7 @@ function findNode(textureAtlas, node, image) {
else {
node.childNode1 = new TextureAtlasNode(
new Cartesian2(node.bottomLeft.x, node.bottomLeft.y),
- new Cartesian2(node.topRight.x, node.bottomLeft.y + image.height),
+ new Cartesian2(node.topRight.x, node.bottomLeft.y + image.height)
);
// Only make a second child if the border gives enough space.
const childNode2BottomLeftY =
@@ -308,7 +308,7 @@ function findNode(textureAtlas, node, image) {
if (childNode2BottomLeftY < node.topRight.y) {
node.childNode2 = new TextureAtlasNode(
new Cartesian2(node.bottomLeft.x, childNode2BottomLeftY),
- new Cartesian2(node.topRight.x, node.topRight.y),
+ new Cartesian2(node.topRight.x, node.topRight.y)
);
}
}
diff --git a/packages/engine/Source/Scene/TileBoundingRegion.js b/packages/engine/Source/Scene/TileBoundingRegion.js
index 34fd5847aaa0..733907695de2 100644
--- a/packages/engine/Source/Scene/TileBoundingRegion.js
+++ b/packages/engine/Source/Scene/TileBoundingRegion.js
@@ -145,11 +145,11 @@ TileBoundingRegion.prototype.computeBoundingVolumes = function (ellipsoid) {
this.rectangle,
this.minimumHeight,
this.maximumHeight,
- ellipsoid,
+ ellipsoid
);
this._boundingSphere = BoundingSphere.fromOrientedBoundingBox(
- this._orientedBoundingBox,
+ this._orientedBoundingBox
);
};
@@ -167,11 +167,11 @@ const rayScratch = new Ray();
function computeBox(tileBB, rectangle, ellipsoid) {
ellipsoid.cartographicToCartesian(
Rectangle.southwest(rectangle),
- tileBB.southwestCornerCartesian,
+ tileBB.southwestCornerCartesian
);
ellipsoid.cartographicToCartesian(
Rectangle.northeast(rectangle),
- tileBB.northeastCornerCartesian,
+ tileBB.northeastCornerCartesian
);
// The middle latitude on the western edge.
@@ -180,14 +180,14 @@ function computeBox(tileBB, rectangle, ellipsoid) {
cartographicScratch.height = 0.0;
const westernMidpointCartesian = ellipsoid.cartographicToCartesian(
cartographicScratch,
- westernMidpointScratch,
+ westernMidpointScratch
);
// Compute the normal of the plane on the western edge of the tile.
const westNormal = Cartesian3.cross(
westernMidpointCartesian,
Cartesian3.UNIT_Z,
- westNormalScratch,
+ westNormalScratch
);
Cartesian3.normalize(westNormal, tileBB.westNormal);
@@ -195,21 +195,21 @@ function computeBox(tileBB, rectangle, ellipsoid) {
cartographicScratch.longitude = rectangle.east;
const easternMidpointCartesian = ellipsoid.cartographicToCartesian(
cartographicScratch,
- easternMidpointScratch,
+ easternMidpointScratch
);
// Compute the normal of the plane on the eastern edge of the tile.
const eastNormal = Cartesian3.cross(
Cartesian3.UNIT_Z,
easternMidpointCartesian,
- cartesian3Scratch,
+ cartesian3Scratch
);
Cartesian3.normalize(eastNormal, tileBB.eastNormal);
let westVector = Cartesian3.subtract(
westernMidpointCartesian,
easternMidpointCartesian,
- cartesian3Scratch,
+ cartesian3Scratch
);
if (Cartesian3.magnitude(westVector) === 0.0) {
@@ -218,7 +218,7 @@ function computeBox(tileBB, rectangle, ellipsoid) {
const eastWestNormal = Cartesian3.normalize(
westVector,
- eastWestNormalScratch,
+ eastWestNormalScratch
);
// Compute the normal of the plane bounding the southern edge of the tile.
@@ -231,34 +231,34 @@ function computeBox(tileBB, rectangle, ellipsoid) {
cartographicScratch.latitude = south;
const southCenterCartesian = ellipsoid.cartographicToCartesian(
cartographicScratch,
- rayScratch.origin,
+ rayScratch.origin
);
Cartesian3.clone(eastWestNormal, rayScratch.direction);
const westPlane = Plane.fromPointNormal(
tileBB.southwestCornerCartesian,
tileBB.westNormal,
- planeScratch,
+ planeScratch
);
// Find a point that is on the west and the south planes
IntersectionTests.rayPlane(
rayScratch,
westPlane,
- tileBB.southwestCornerCartesian,
+ tileBB.southwestCornerCartesian
);
southSurfaceNormal = ellipsoid.geodeticSurfaceNormal(
southCenterCartesian,
- cartesian3Scratch2,
+ cartesian3Scratch2
);
} else {
southSurfaceNormal = ellipsoid.geodeticSurfaceNormalCartographic(
Rectangle.southeast(rectangle),
- cartesian3Scratch2,
+ cartesian3Scratch2
);
}
const southNormal = Cartesian3.cross(
southSurfaceNormal,
westVector,
- cartesian3Scratch3,
+ cartesian3Scratch3
);
Cartesian3.normalize(southNormal, tileBB.southNormal);
@@ -272,34 +272,34 @@ function computeBox(tileBB, rectangle, ellipsoid) {
cartographicScratch.latitude = north;
const northCenterCartesian = ellipsoid.cartographicToCartesian(
cartographicScratch,
- rayScratch.origin,
+ rayScratch.origin
);
Cartesian3.negate(eastWestNormal, rayScratch.direction);
const eastPlane = Plane.fromPointNormal(
tileBB.northeastCornerCartesian,
tileBB.eastNormal,
- planeScratch,
+ planeScratch
);
// Find a point that is on the east and the north planes
IntersectionTests.rayPlane(
rayScratch,
eastPlane,
- tileBB.northeastCornerCartesian,
+ tileBB.northeastCornerCartesian
);
northSurfaceNormal = ellipsoid.geodeticSurfaceNormal(
northCenterCartesian,
- cartesian3Scratch2,
+ cartesian3Scratch2
);
} else {
northSurfaceNormal = ellipsoid.geodeticSurfaceNormalCartographic(
Rectangle.northwest(rectangle),
- cartesian3Scratch2,
+ cartesian3Scratch2
);
}
const northNormal = Cartesian3.cross(
westVector,
northSurfaceNormal,
- cartesian3Scratch3,
+ cartesian3Scratch3
);
Cartesian3.normalize(northNormal, tileBB.northNormal);
}
@@ -327,14 +327,14 @@ function distanceToCameraRegion(tileBB, frameState) {
if (frameState.mode !== SceneMode.SCENE3D) {
southwestCornerCartesian = frameState.mapProjection.project(
Rectangle.southwest(tileBB.rectangle),
- southwestCornerScratch,
+ southwestCornerScratch
);
southwestCornerCartesian.z = southwestCornerCartesian.y;
southwestCornerCartesian.y = southwestCornerCartesian.x;
southwestCornerCartesian.x = 0.0;
northeastCornerCartesian = frameState.mapProjection.project(
Rectangle.northeast(tileBB.rectangle),
- northeastCornerScratch,
+ northeastCornerScratch
);
northeastCornerCartesian.z = northeastCornerCartesian.y;
northeastCornerCartesian.y = northeastCornerCartesian.x;
@@ -348,29 +348,29 @@ function distanceToCameraRegion(tileBB, frameState) {
const vectorFromSouthwestCorner = Cartesian3.subtract(
cameraCartesianPosition,
southwestCornerCartesian,
- vectorScratch,
+ vectorScratch
);
const distanceToWestPlane = Cartesian3.dot(
vectorFromSouthwestCorner,
- westNormal,
+ westNormal
);
const distanceToSouthPlane = Cartesian3.dot(
vectorFromSouthwestCorner,
- southNormal,
+ southNormal
);
const vectorFromNortheastCorner = Cartesian3.subtract(
cameraCartesianPosition,
northeastCornerCartesian,
- vectorScratch,
+ vectorScratch
);
const distanceToEastPlane = Cartesian3.dot(
vectorFromNortheastCorner,
- eastNormal,
+ eastNormal
);
const distanceToNorthPlane = Cartesian3.dot(
vectorFromNortheastCorner,
- northNormal,
+ northNormal
);
if (distanceToWestPlane > 0.0) {
@@ -427,7 +427,7 @@ TileBoundingRegion.prototype.distanceToCamera = function (frameState) {
defined(this._orientedBoundingBox)
) {
const obbResult = Math.sqrt(
- this._orientedBoundingBox.distanceSquaredTo(frameState.camera.positionWC),
+ this._orientedBoundingBox.distanceSquaredTo(frameState.camera.positionWC)
);
return Math.max(regionResult, obbResult);
}
diff --git a/packages/engine/Source/Scene/TileBoundingS2Cell.js b/packages/engine/Source/Scene/TileBoundingS2Cell.js
index 2656f5817517..307fa36c8e39 100644
--- a/packages/engine/Source/Scene/TileBoundingS2Cell.js
+++ b/packages/engine/Source/Scene/TileBoundingS2Cell.js
@@ -53,7 +53,7 @@ function TileBoundingS2Cell(options) {
s2Cell,
minimumHeight,
maximumHeight,
- ellipsoid,
+ ellipsoid
);
this._boundingPlanes = boundingPlanes;
@@ -66,7 +66,7 @@ function TileBoundingS2Cell(options) {
this._edgeNormals[0] = computeEdgeNormals(
boundingPlanes[0],
- vertices.slice(0, 4),
+ vertices.slice(0, 4)
);
let i;
// Based on the way the edge normals are computed, the edge normals all point away from the "face"
@@ -75,13 +75,13 @@ function TileBoundingS2Cell(options) {
for (i = 0; i < 4; i++) {
this._edgeNormals[0][i] = Cartesian3.negate(
this._edgeNormals[0][i],
- this._edgeNormals[0][i],
+ this._edgeNormals[0][i]
);
}
this._edgeNormals[1] = computeEdgeNormals(
boundingPlanes[1],
- vertices.slice(4, 8),
+ vertices.slice(4, 8)
);
for (i = 0; i < 4; i++) {
// For each plane, iterate through the vertices in CCW order.
@@ -109,12 +109,12 @@ function TileBoundingS2Cell(options) {
const center = s2Cell.getCenter();
centerCartographicScratch = ellipsoid.cartesianToCartographic(
center,
- centerCartographicScratch,
+ centerCartographicScratch
);
centerCartographicScratch.height = (maximumHeight + minimumHeight) / 2;
this.center = ellipsoid.cartographicToCartesian(
centerCartographicScratch,
- center,
+ center
);
this._boundingSphere = BoundingSphere.fromPoints(vertices);
@@ -136,7 +136,7 @@ function computeBoundingPlanes(
s2Cell,
minimumHeight,
maximumHeight,
- ellipsoid,
+ ellipsoid
) {
const planes = new Array(6);
const centerPoint = s2Cell.getCenter();
@@ -147,11 +147,11 @@ function computeBoundingPlanes(
// - Create top plane from surface normal and top point.
const centerSurfaceNormal = ellipsoid.geodeticSurfaceNormal(
centerPoint,
- centerGeodeticNormalScratch,
+ centerGeodeticNormalScratch
);
const topCartographic = ellipsoid.cartesianToCartographic(
centerPoint,
- topCartographicScratch,
+ topCartographicScratch
);
topCartographic.height = maximumHeight;
const top = ellipsoid.cartographicToCartesian(topCartographic, topScratch);
@@ -172,12 +172,12 @@ function computeBoundingPlanes(
vertices[i] = vertex;
vertexCartographic = ellipsoid.cartesianToCartographic(
vertex,
- vertexCartographicScratch,
+ vertexCartographicScratch
);
vertexCartographic.height = minimumHeight;
const distance = Plane.getPointDistance(
topPlane,
- ellipsoid.cartographicToCartesian(vertexCartographic, vertexScratch),
+ ellipsoid.cartographicToCartesian(vertexCartographic, vertexScratch)
);
if (distance < maxDistance) {
maxDistance = distance;
@@ -187,7 +187,7 @@ function computeBoundingPlanes(
// Negate the normal of the bottom plane since we want all normals to point "outwards".
bottomPlane.normal = Cartesian3.negate(
bottomPlane.normal,
- bottomPlane.normal,
+ bottomPlane.normal
);
bottomPlane.distance = bottomPlane.distance * -1 + maxDistance;
planes[1] = bottomPlane;
@@ -203,7 +203,7 @@ function computeBoundingPlanes(
const adjacentVertex = vertices[(i + 1) % 4];
const geodeticNormal = ellipsoid.geodeticSurfaceNormal(
vertex,
- vertexGeodeticNormalScratch,
+ vertexGeodeticNormalScratch
);
const side = Cartesian3.subtract(adjacentVertex, vertex, sideScratch);
let sideNormal = Cartesian3.cross(side, geodeticNormal, sideNormalScratch);
@@ -244,17 +244,17 @@ function computeIntersection(p0, p1, p2) {
f0Scratch = Cartesian3.multiplyByScalar(
Cartesian3.cross(n1Scratch, n2Scratch, t0Scratch),
Cartesian3.dot(x0Scratch, n0Scratch),
- f0Scratch,
+ f0Scratch
);
f1Scratch = Cartesian3.multiplyByScalar(
Cartesian3.cross(n2Scratch, n0Scratch, t1Scratch),
Cartesian3.dot(x1Scratch, n1Scratch),
- f1Scratch,
+ f1Scratch
);
f2Scratch = Cartesian3.multiplyByScalar(
Cartesian3.cross(n0Scratch, n1Scratch, t2Scratch),
Cartesian3.dot(x2Scratch, n2Scratch),
- f2Scratch,
+ f2Scratch
);
matrixScratch[0] = n0Scratch.x;
@@ -272,7 +272,7 @@ function computeIntersection(p0, p1, p2) {
return new Cartesian3(
sScratch.x / determinant,
sScratch.y / determinant,
- sScratch.z / determinant,
+ sScratch.z / determinant
);
}
/**
@@ -286,13 +286,13 @@ function computeVertices(boundingPlanes) {
vertices[i] = computeIntersection(
boundingPlanes[0],
boundingPlanes[2 + ((i + 3) % 4)],
- boundingPlanes[2 + (i % 4)],
+ boundingPlanes[2 + (i % 4)]
);
// Vertices on the bottom plane.
vertices[i + 4] = computeIntersection(
boundingPlanes[1],
boundingPlanes[2 + ((i + 3) % 4)],
- boundingPlanes[2 + (i % 4)],
+ boundingPlanes[2 + (i % 4)]
);
}
return vertices;
@@ -310,16 +310,16 @@ function computeEdgeNormals(plane, vertices) {
edgeScratch = Cartesian3.subtract(
vertices[(i + 1) % 4],
vertices[i],
- edgeScratch,
+ edgeScratch
);
edgeNormalScratch = Cartesian3.cross(
plane.normal,
edgeScratch,
- edgeNormalScratch,
+ edgeNormalScratch
);
edgeNormalScratch = Cartesian3.normalize(
edgeNormalScratch,
- edgeNormalScratch,
+ edgeNormalScratch
);
edgeNormals[i] = Cartesian3.clone(edgeNormalScratch);
}
@@ -438,7 +438,7 @@ TileBoundingS2Cell.prototype.distanceToCamera = function (frameState) {
Plane.projectPointOntoPlane(selectedPlane, point, facePointScratch),
vertices[0],
selectedPlane,
- edgeNormals,
+ edgeNormals
);
return Cartesian3.distance(facePoint, point);
@@ -466,7 +466,7 @@ TileBoundingS2Cell.prototype.distanceToCamera = function (frameState) {
Plane.projectPointOntoPlane(selectedPlane, point, facePointScratch),
vertices[i],
selectedPlane,
- this._edgeNormals[selectedPlaneIndices[i]],
+ this._edgeNormals[selectedPlaneIndices[i]]
);
distance = Cartesian3.distanceSquared(facePoint, point);
@@ -481,11 +481,11 @@ TileBoundingS2Cell.prototype.distanceToCamera = function (frameState) {
Plane.projectPointOntoPlane(
this._boundingPlanes[1],
point,
- facePointScratch,
+ facePointScratch
),
this._planeVertices[1],
this._boundingPlanes[1],
- this._edgeNormals[1],
+ this._edgeNormals[1]
);
return Cartesian3.distance(facePoint, point);
}
@@ -498,14 +498,14 @@ TileBoundingS2Cell.prototype.distanceToCamera = function (frameState) {
if (selectedPlaneIndices[0] === 0) {
return Cartesian3.distance(
point,
- this._vertices[(selectedPlaneIndices[1] - 2 + skip) % 4],
+ this._vertices[(selectedPlaneIndices[1] - 2 + skip) % 4]
);
}
// Vertex is on bottom plane.
return Cartesian3.distance(
point,
- this._vertices[4 + ((selectedPlaneIndices[1] - 2 + skip) % 4)],
+ this._vertices[4 + ((selectedPlaneIndices[1] - 2 + skip) % 4)]
);
};
@@ -533,7 +533,7 @@ function closestPointLineSegment(p, l0, l1) {
return new Cartesian3(
(1 - t) * l0.x + t * l1.x,
(1 - t) * l0.y + t * l1.y,
- (1 - t) * l0.z + t * l1.z,
+ (1 - t) * l0.z + t * l1.z
);
}
@@ -553,7 +553,7 @@ function closestPointPolygon(p, vertices, plane, edgeNormals) {
const edgePlane = Plane.fromPointNormal(
vertices[i],
edgeNormals[i],
- edgePlaneScratch,
+ edgePlaneScratch
);
const edgePlaneDistance = Plane.getPointDistance(edgePlane, p);
@@ -566,7 +566,7 @@ function closestPointPolygon(p, vertices, plane, edgeNormals) {
closestPointOnEdge = closestPointLineSegment(
p,
vertices[i],
- vertices[(i + 1) % 4],
+ vertices[(i + 1) % 4]
);
distance = Cartesian3.distance(p, closestPointOnEdge);
@@ -634,8 +634,9 @@ TileBoundingS2Cell.prototype.createDebugVolume = function (color) {
positions: this._planeVertices[0],
},
});
- const topPlaneGeometry =
- CoplanarPolygonOutlineGeometry.createGeometry(topPlanePolygon);
+ const topPlaneGeometry = CoplanarPolygonOutlineGeometry.createGeometry(
+ topPlanePolygon
+ );
const topPlaneInstance = new GeometryInstance({
geometry: topPlaneGeometry,
id: "outline",
@@ -650,8 +651,9 @@ TileBoundingS2Cell.prototype.createDebugVolume = function (color) {
positions: this._planeVertices[1],
},
});
- const bottomPlaneGeometry =
- CoplanarPolygonOutlineGeometry.createGeometry(bottomPlanePolygon);
+ const bottomPlaneGeometry = CoplanarPolygonOutlineGeometry.createGeometry(
+ bottomPlanePolygon
+ );
const bottomPlaneInstance = new GeometryInstance({
geometry: bottomPlaneGeometry,
id: "outline",
@@ -668,8 +670,9 @@ TileBoundingS2Cell.prototype.createDebugVolume = function (color) {
positions: this._planeVertices[2 + i],
},
});
- const sidePlaneGeometry =
- CoplanarPolygonOutlineGeometry.createGeometry(sidePlanePolygon);
+ const sidePlaneGeometry = CoplanarPolygonOutlineGeometry.createGeometry(
+ sidePlanePolygon
+ );
sideInstances[i] = new GeometryInstance({
geometry: sidePlaneGeometry,
id: "outline",
diff --git a/packages/engine/Source/Scene/TileBoundingSphere.js b/packages/engine/Source/Scene/TileBoundingSphere.js
index 7d6136d28357..3e517c1a1fa1 100644
--- a/packages/engine/Source/Scene/TileBoundingSphere.js
+++ b/packages/engine/Source/Scene/TileBoundingSphere.js
@@ -98,7 +98,7 @@ TileBoundingSphere.prototype.distanceToCamera = function (frameState) {
return Math.max(
0.0,
Cartesian3.distance(boundingSphere.center, frameState.camera.positionWC) -
- boundingSphere.radius,
+ boundingSphere.radius
);
};
@@ -144,7 +144,7 @@ TileBoundingSphere.prototype.createDebugVolume = function (color) {
});
const modelMatrix = Matrix4.fromTranslation(
this.center,
- new Matrix4.clone(Matrix4.IDENTITY),
+ new Matrix4.clone(Matrix4.IDENTITY)
);
const instance = new GeometryInstance({
geometry: geometry,
diff --git a/packages/engine/Source/Scene/TileCoordinatesImageryProvider.js b/packages/engine/Source/Scene/TileCoordinatesImageryProvider.js
index 5983a38e3e89..dccdae0df9af 100644
--- a/packages/engine/Source/Scene/TileCoordinatesImageryProvider.js
+++ b/packages/engine/Source/Scene/TileCoordinatesImageryProvider.js
@@ -205,7 +205,7 @@ Object.defineProperties(TileCoordinatesImageryProvider.prototype, {
TileCoordinatesImageryProvider.prototype.getTileCredits = function (
x,
y,
- level,
+ level
) {
return undefined;
};
@@ -223,7 +223,7 @@ TileCoordinatesImageryProvider.prototype.requestImage = function (
x,
y,
level,
- request,
+ request
) {
const canvas = document.createElement("canvas");
canvas.width = 256;
@@ -262,7 +262,7 @@ TileCoordinatesImageryProvider.prototype.pickFeatures = function (
y,
level,
longitude,
- latitude,
+ latitude
) {
return undefined;
};
diff --git a/packages/engine/Source/Scene/TileImagery.js b/packages/engine/Source/Scene/TileImagery.js
index 08e79ac95d9e..5032408bdc38 100644
--- a/packages/engine/Source/Scene/TileImagery.js
+++ b/packages/engine/Source/Scene/TileImagery.js
@@ -46,7 +46,7 @@ TileImagery.prototype.freeResources = function () {
TileImagery.prototype.processStateMachine = function (
tile,
frameState,
- skipLoading,
+ skipLoading
) {
const loadingImagery = this.loadingImagery;
const imageryLayer = loadingImagery.imageryLayer;
@@ -54,7 +54,7 @@ TileImagery.prototype.processStateMachine = function (
loadingImagery.processStateMachine(
frameState,
!this.useWebMercatorT,
- skipLoading,
+ skipLoading
);
if (loadingImagery.state === ImageryState.READY) {
@@ -63,8 +63,10 @@ TileImagery.prototype.processStateMachine = function (
}
this.readyImagery = this.loadingImagery;
this.loadingImagery = undefined;
- this.textureTranslationAndScale =
- imageryLayer._calculateTextureTranslationAndScale(tile, this);
+ this.textureTranslationAndScale = imageryLayer._calculateTextureTranslationAndScale(
+ tile,
+ this
+ );
return true; // done loading
}
@@ -96,8 +98,10 @@ TileImagery.prototype.processStateMachine = function (
if (defined(ancestor)) {
ancestor.addReference();
- this.textureTranslationAndScale =
- imageryLayer._calculateTextureTranslationAndScale(tile, this);
+ this.textureTranslationAndScale = imageryLayer._calculateTextureTranslationAndScale(
+ tile,
+ this
+ );
}
}
@@ -113,7 +117,7 @@ TileImagery.prototype.processStateMachine = function (
closestAncestorThatNeedsLoading.processStateMachine(
frameState,
!this.useWebMercatorT,
- skipLoading,
+ skipLoading
);
return false; // not done loading
}
diff --git a/packages/engine/Source/Scene/TileMapServiceImageryProvider.js b/packages/engine/Source/Scene/TileMapServiceImageryProvider.js
index b195701fbe0f..1797c545e702 100644
--- a/packages/engine/Source/Scene/TileMapServiceImageryProvider.js
+++ b/packages/engine/Source/Scene/TileMapServiceImageryProvider.js
@@ -81,7 +81,7 @@ TileMapServiceImageryProvider._requestMetadata = async function (
options,
tmsResource,
xmlResource,
- provider,
+ provider
) {
// Try to load remaining parameters from XML
try {
@@ -91,13 +91,13 @@ TileMapServiceImageryProvider._requestMetadata = async function (
options,
tmsResource,
xmlResource,
- provider,
+ provider
);
} catch (e) {
if (e instanceof RequestErrorEvent) {
return TileMapServiceImageryProvider._metadataFailure(
options,
- tmsResource,
+ tmsResource
);
}
@@ -143,7 +143,7 @@ TileMapServiceImageryProvider.fromUrl = async function (url, options) {
const metadata = await TileMapServiceImageryProvider._requestMetadata(
options,
tmsResource,
- xmlResource,
+ xmlResource
);
return new TileMapServiceImageryProvider(metadata);
@@ -151,10 +151,9 @@ TileMapServiceImageryProvider.fromUrl = async function (url, options) {
if (defined(Object.create)) {
TileMapServiceImageryProvider.prototype = Object.create(
- UrlTemplateImageryProvider.prototype,
+ UrlTemplateImageryProvider.prototype
);
- TileMapServiceImageryProvider.prototype.constructor =
- TileMapServiceImageryProvider;
+ TileMapServiceImageryProvider.prototype.constructor = TileMapServiceImageryProvider;
}
/**
@@ -180,18 +179,18 @@ function confineRectangleToTilingScheme(rectangle, tilingScheme) {
function calculateSafeMinimumDetailLevel(
tilingScheme,
rectangle,
- minimumLevel,
+ minimumLevel
) {
// Check the number of tiles at the minimum level. If it's more than four,
// try requesting the lower levels anyway, because starting at the higher minimum
// level will cause too many tiles to be downloaded and rendered.
const swTile = tilingScheme.positionToTileXY(
Rectangle.southwest(rectangle),
- minimumLevel,
+ minimumLevel
);
const neTile = tilingScheme.positionToTileXY(
Rectangle.northeast(rectangle),
- minimumLevel,
+ minimumLevel
);
const tileCount =
(Math.abs(neTile.x - swTile.x) + 1) * (Math.abs(neTile.y - swTile.y) + 1);
@@ -216,7 +215,7 @@ TileMapServiceImageryProvider._metadataSuccess = function (
options,
tmsResource,
xmlResource,
- provider,
+ provider
) {
const tileFormatRegex = /tileformat/i;
const tileSetRegex = /tileset/i;
@@ -255,7 +254,7 @@ TileMapServiceImageryProvider._metadataSuccess = function (
undefined,
provider,
provider.errorEvent,
- message,
+ message
);
}
@@ -264,23 +263,23 @@ TileMapServiceImageryProvider._metadataSuccess = function (
const fileExtension = defaultValue(
options.fileExtension,
- format.getAttribute("extension"),
+ format.getAttribute("extension")
);
const tileWidth = defaultValue(
options.tileWidth,
- parseInt(format.getAttribute("width"), 10),
+ parseInt(format.getAttribute("width"), 10)
);
const tileHeight = defaultValue(
options.tileHeight,
- parseInt(format.getAttribute("height"), 10),
+ parseInt(format.getAttribute("height"), 10)
);
let minimumLevel = defaultValue(
options.minimumLevel,
- parseInt(tilesetsList[0].getAttribute("order"), 10),
+ parseInt(tilesetsList[0].getAttribute("order"), 10)
);
const maximumLevel = defaultValue(
options.maximumLevel,
- parseInt(tilesetsList[tilesetsList.length - 1].getAttribute("order"), 10),
+ parseInt(tilesetsList[tilesetsList.length - 1].getAttribute("order"), 10)
);
const tilingSchemeName = tilesets.getAttribute("profile");
let tilingScheme = options.tilingScheme;
@@ -307,7 +306,7 @@ TileMapServiceImageryProvider._metadataSuccess = function (
undefined,
provider,
provider.errorEvent,
- message,
+ message
);
}
@@ -330,20 +329,20 @@ TileMapServiceImageryProvider._metadataSuccess = function (
if (flipXY) {
swXY = new Cartesian2(
parseFloat(bbox.getAttribute("miny")),
- parseFloat(bbox.getAttribute("minx")),
+ parseFloat(bbox.getAttribute("minx"))
);
neXY = new Cartesian2(
parseFloat(bbox.getAttribute("maxy")),
- parseFloat(bbox.getAttribute("maxx")),
+ parseFloat(bbox.getAttribute("maxx"))
);
} else {
swXY = new Cartesian2(
parseFloat(bbox.getAttribute("minx")),
- parseFloat(bbox.getAttribute("miny")),
+ parseFloat(bbox.getAttribute("miny"))
);
neXY = new Cartesian2(
parseFloat(bbox.getAttribute("maxx")),
- parseFloat(bbox.getAttribute("maxy")),
+ parseFloat(bbox.getAttribute("maxy"))
);
}
@@ -369,7 +368,7 @@ TileMapServiceImageryProvider._metadataSuccess = function (
sw.longitude,
sw.latitude,
ne.longitude,
- ne.latitude,
+ ne.latitude
);
}
@@ -379,7 +378,7 @@ TileMapServiceImageryProvider._metadataSuccess = function (
minimumLevel = calculateSafeMinimumDetailLevel(
tilingScheme,
rectangle,
- minimumLevel,
+ minimumLevel
);
const templateResource = tmsResource.getDerivedResource({
@@ -409,7 +408,7 @@ TileMapServiceImageryProvider._metadataSuccess = function (
*/
TileMapServiceImageryProvider._metadataFailure = function (
options,
- tmsResource,
+ tmsResource
) {
// Can't load XML, still allow options and defaults
const fileExtension = defaultValue(options.fileExtension, "png");
@@ -428,7 +427,7 @@ TileMapServiceImageryProvider._metadataFailure = function (
const minimumLevel = calculateSafeMinimumDetailLevel(
tilingScheme,
rectangle,
- options.minimumLevel,
+ options.minimumLevel
);
const templateResource = tmsResource.getDerivedResource({
diff --git a/packages/engine/Source/Scene/TileMetadata.js b/packages/engine/Source/Scene/TileMetadata.js
index c93462c1a578..c2a62d9643d9 100644
--- a/packages/engine/Source/Scene/TileMetadata.js
+++ b/packages/engine/Source/Scene/TileMetadata.js
@@ -100,7 +100,7 @@ TileMetadata.prototype.hasPropertyBySemantic = function (semantic) {
return MetadataEntity.hasPropertyBySemantic(
semantic,
this._properties,
- this._class,
+ this._class
);
};
@@ -145,7 +145,7 @@ TileMetadata.prototype.setProperty = function (propertyId, value) {
propertyId,
value,
this._properties,
- this._class,
+ this._class
);
};
@@ -160,7 +160,7 @@ TileMetadata.prototype.getPropertyBySemantic = function (semantic) {
return MetadataEntity.getPropertyBySemantic(
semantic,
this._properties,
- this._class,
+ this._class
);
};
@@ -177,7 +177,7 @@ TileMetadata.prototype.setPropertyBySemantic = function (semantic, value) {
semantic,
value,
this._properties,
- this._class,
+ this._class
);
};
diff --git a/packages/engine/Source/Scene/TileOrientedBoundingBox.js b/packages/engine/Source/Scene/TileOrientedBoundingBox.js
index 2fe2b925ce45..40d60451f51f 100644
--- a/packages/engine/Source/Scene/TileOrientedBoundingBox.js
+++ b/packages/engine/Source/Scene/TileOrientedBoundingBox.js
@@ -22,7 +22,7 @@ function computeMissingVector(a, b, result) {
return Cartesian3.multiplyByScalar(
result,
CesiumMath.EPSILON7 / magnitude,
- result,
+ result
);
}
@@ -31,7 +31,7 @@ function findOrthogonalVector(a, result) {
const b = Cartesian3.equalsEpsilon(
temp,
Cartesian3.UNIT_X,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
)
? Cartesian3.UNIT_Y
: Cartesian3.UNIT_X;
@@ -96,7 +96,7 @@ function TileOrientedBoundingBox(center, halfAxes) {
halfAxes = checkHalfAxes(halfAxes);
this._orientedBoundingBox = new OrientedBoundingBox(center, halfAxes);
this._boundingSphere = BoundingSphere.fromOrientedBoundingBox(
- this._orientedBoundingBox,
+ this._orientedBoundingBox
);
}
@@ -140,7 +140,7 @@ TileOrientedBoundingBox.prototype.distanceToCamera = function (frameState) {
Check.defined("frameState", frameState);
//>>includeEnd('debug');
return Math.sqrt(
- this._orientedBoundingBox.distanceSquaredTo(frameState.camera.positionWC),
+ this._orientedBoundingBox.distanceSquaredTo(frameState.camera.positionWC)
);
};
@@ -174,7 +174,7 @@ TileOrientedBoundingBox.prototype.update = function (center, halfAxes) {
Matrix3.clone(halfAxes, this._orientedBoundingBox.halfAxes);
BoundingSphere.fromOrientedBoundingBox(
this._orientedBoundingBox,
- this._boundingSphere,
+ this._boundingSphere
);
};
@@ -196,7 +196,7 @@ TileOrientedBoundingBox.prototype.createDebugVolume = function (color) {
});
const modelMatrix = Matrix4.fromRotationTranslation(
this.boundingVolume.halfAxes,
- this.boundingVolume.center,
+ this.boundingVolume.center
);
const instance = new GeometryInstance({
geometry: geometry,
diff --git a/packages/engine/Source/Scene/Tileset3DTileContent.js b/packages/engine/Source/Scene/Tileset3DTileContent.js
index df9102f73cfb..41d1652453c1 100644
--- a/packages/engine/Source/Scene/Tileset3DTileContent.js
+++ b/packages/engine/Source/Scene/Tileset3DTileContent.js
@@ -161,7 +161,7 @@ Tileset3DTileContent.prototype.getFeature = function (batchId) {
Tileset3DTileContent.prototype.applyDebugSettings = function (
enabled,
- color,
+ color
) {};
Tileset3DTileContent.prototype.applyStyle = function (style) {};
diff --git a/packages/engine/Source/Scene/TilesetMetadata.js b/packages/engine/Source/Scene/TilesetMetadata.js
index f5f23d1d6315..ef79ef3ec369 100644
--- a/packages/engine/Source/Scene/TilesetMetadata.js
+++ b/packages/engine/Source/Scene/TilesetMetadata.js
@@ -102,7 +102,7 @@ TilesetMetadata.prototype.hasPropertyBySemantic = function (semantic) {
return MetadataEntity.hasPropertyBySemantic(
semantic,
this._properties,
- this._class,
+ this._class
);
};
@@ -147,7 +147,7 @@ TilesetMetadata.prototype.setProperty = function (propertyId, value) {
propertyId,
value,
this._properties,
- this._class,
+ this._class
);
};
@@ -162,7 +162,7 @@ TilesetMetadata.prototype.getPropertyBySemantic = function (semantic) {
return MetadataEntity.getPropertyBySemantic(
semantic,
this._properties,
- this._class,
+ this._class
);
};
@@ -179,7 +179,7 @@ TilesetMetadata.prototype.setPropertyBySemantic = function (semantic, value) {
semantic,
value,
this._properties,
- this._class,
+ this._class
);
};
diff --git a/packages/engine/Source/Scene/TimeDynamicImagery.js b/packages/engine/Source/Scene/TimeDynamicImagery.js
index 93c31eb5eede..8a12e8902b7c 100644
--- a/packages/engine/Source/Scene/TimeDynamicImagery.js
+++ b/packages/engine/Source/Scene/TimeDynamicImagery.js
@@ -26,7 +26,7 @@ function TimeDynamicImagery(options) {
Check.typeOf.object("options.times", options.times);
Check.typeOf.func(
"options.requestImageFunction",
- options.requestImageFunction,
+ options.requestImageFunction
);
Check.typeOf.func("options.reloadFunction", options.reloadFunction);
//>>includeEnd('debug');
@@ -144,7 +144,7 @@ TimeDynamicImagery.prototype.checkApproachingInterval = function (
x,
y,
level,
- request,
+ request
) {
const key = getKey(x, y, level);
const tilesRequestedForInterval = this._tilesRequestedForInterval;
@@ -292,7 +292,7 @@ function addToCache(that, tile, interval) {
keyElements.y,
keyElements.level,
request,
- interval,
+ interval
);
if (!defined(promise)) {
return false;
diff --git a/packages/engine/Source/Scene/TimeDynamicPointCloud.js b/packages/engine/Source/Scene/TimeDynamicPointCloud.js
index 2d52a8ef21cd..3bd7e3fbb94f 100644
--- a/packages/engine/Source/Scene/TimeDynamicPointCloud.js
+++ b/packages/engine/Source/Scene/TimeDynamicPointCloud.js
@@ -61,7 +61,7 @@ function TimeDynamicPointCloud(options) {
* @default Matrix4.IDENTITY
*/
this.modelMatrix = Matrix4.clone(
- defaultValue(options.modelMatrix, Matrix4.IDENTITY),
+ defaultValue(options.modelMatrix, Matrix4.IDENTITY)
);
/**
@@ -306,7 +306,7 @@ function getNextInterval(that, currentInterval) {
const time = JulianDate.addSeconds(
clock.currentTime,
averageLoadTime * multiplier,
- scratchDate,
+ scratchDate
);
let index = intervals.indexOf(time);
@@ -404,7 +404,7 @@ function updateAverageLoadTime(that, loadTime) {
that._runningSamples[that._runningIndex] = loadTime;
that._runningLength = Math.min(
that._runningLength + 1,
- that._runningSamples.length,
+ that._runningSamples.length
);
that._runningIndex = (that._runningIndex + 1) % that._runningSamples.length;
that._runningAverage = that._runningSum / that._runningLength;
@@ -449,7 +449,7 @@ function getGeometricError(that, pointCloud) {
return shading.baseResolution;
} else if (defined(pointCloud.boundingSphere)) {
return CesiumMath.cbrt(
- pointCloud.boundingSphere.volume() / pointCloud.pointsLength,
+ pointCloud.boundingSphere.volume() / pointCloud.pointsLength
);
}
return 0.0;
@@ -474,7 +474,7 @@ function renderFrame(that, frame, updateState, frameState) {
pointCloud.modelMatrix = Matrix4.multiplyTransformation(
that.modelMatrix,
transform,
- scratchModelMatrix,
+ scratchModelMatrix
);
pointCloud.style = that.style;
pointCloud.time = updateState.timeSinceLoad;
@@ -556,7 +556,7 @@ function getNearestReadyInterval(
previousInterval,
currentInterval,
updateState,
- frameState,
+ frameState
) {
let i;
let interval;
@@ -633,7 +633,7 @@ TimeDynamicPointCloud.prototype.update = function (frameState) {
// For styling
const timeSinceLoad = Math.max(
JulianDate.secondsDifference(frameState.time, this._loadTimestamp) * 1000,
- 0.0,
+ 0.0
);
// Update clipping planes
@@ -701,7 +701,7 @@ TimeDynamicPointCloud.prototype.update = function (frameState) {
previousInterval,
currentInterval,
updateState,
- frameState,
+ frameState
);
let frame = getFrame(this, previousInterval);
@@ -761,7 +761,7 @@ TimeDynamicPointCloud.prototype.update = function (frameState) {
frameState,
lengthBeforeUpdate,
shading,
- this.boundingSphere,
+ this.boundingSphere
);
}
};
diff --git a/packages/engine/Source/Scene/TranslucentTileClassification.js b/packages/engine/Source/Scene/TranslucentTileClassification.js
index c73d3ba732c9..e013aa226581 100644
--- a/packages/engine/Source/Scene/TranslucentTileClassification.js
+++ b/packages/engine/Source/Scene/TranslucentTileClassification.js
@@ -117,12 +117,12 @@ function updateTextures(transpClass, context, width, height) {
function updateFramebuffers(transpClass, context, width, height) {
destroyFramebuffers(transpClass);
transpClass._drawClassificationFBO.setDepthStencilTexture(
- transpClass._translucentDepthStencilTexture,
+ transpClass._translucentDepthStencilTexture
);
transpClass._drawClassificationFBO.update(context, width, height);
transpClass._accumulationFBO.setDepthStencilTexture(
- transpClass._translucentDepthStencilTexture,
+ transpClass._translucentDepthStencilTexture
);
transpClass._accumulationFBO.update(context, width, height);
@@ -133,7 +133,7 @@ function updateResources(
transpClass,
context,
passState,
- globeDepthStencilTexture,
+ globeDepthStencilTexture
) {
if (!transpClass.isSupported()) {
return;
@@ -206,7 +206,7 @@ function updateResources(
defines: ["PICK"],
}),
attributeLocations: compositeProgram._attributeLocations,
- },
+ }
);
const compositePickCommand = DrawCommand.shallowClone(compositeCommand);
compositePickCommand.shaderProgram = compositePickProgram;
@@ -252,7 +252,7 @@ function updateResources(
const useScissorTest = !BoundingRectangle.equals(
transpClass._viewport,
- passState.viewport,
+ passState.viewport
);
let updateScissor = useScissorTest !== transpClass._useScissorTest;
transpClass._useScissorTest = useScissorTest;
@@ -262,7 +262,7 @@ function updateResources(
) {
transpClass._scissorRectangle = BoundingRectangle.clone(
passState.viewport,
- transpClass._scissorRectangle,
+ transpClass._scissorRectangle
);
updateScissor = true;
}
@@ -271,7 +271,7 @@ function updateResources(
!defined(transpClass._rsDepth) ||
!BoundingRectangle.equals(
transpClass._viewport,
- transpClass._rsDepth.viewport,
+ transpClass._rsDepth.viewport
) ||
updateScissor
) {
@@ -292,7 +292,7 @@ function updateResources(
!defined(transpClass._rsAccumulate) ||
!BoundingRectangle.equals(
transpClass._viewport,
- transpClass._rsAccumulate.viewport,
+ transpClass._rsAccumulate.viewport
) ||
updateScissor
) {
@@ -318,7 +318,7 @@ function updateResources(
!defined(transpClass._rsComp) ||
!BoundingRectangle.equals(
transpClass._viewport,
- transpClass._rsComp.viewport,
+ transpClass._rsComp.viewport
) ||
updateScissor
) {
@@ -344,7 +344,7 @@ TranslucentTileClassification.prototype.executeTranslucentCommands = function (
executeCommand,
passState,
commands,
- globeDepthStencilTexture,
+ globeDepthStencilTexture
) {
// Check for translucent commands that should be classified
const useLogDepth = scene.frameState.useLogDepth;
@@ -397,46 +397,49 @@ TranslucentTileClassification.prototype.executeTranslucentCommands = function (
passState.framebuffer = framebuffer;
};
-TranslucentTileClassification.prototype.executeClassificationCommands =
- function (scene, executeCommand, passState, frustumCommands) {
- if (!this._hasTranslucentDepth) {
- return;
- }
+TranslucentTileClassification.prototype.executeClassificationCommands = function (
+ scene,
+ executeCommand,
+ passState,
+ frustumCommands
+) {
+ if (!this._hasTranslucentDepth) {
+ return;
+ }
- const context = scene.context;
- const uniformState = context.uniformState;
- const framebuffer = passState.framebuffer;
+ const context = scene.context;
+ const uniformState = context.uniformState;
+ const framebuffer = passState.framebuffer;
- passState.framebuffer = this._accumulationFBO.framebuffer;
- this._accumulateCommand.execute(context, passState);
+ passState.framebuffer = this._accumulationFBO.framebuffer;
+ this._accumulateCommand.execute(context, passState);
- passState.framebuffer = this._drawClassificationFBO.framebuffer;
- if (this._frustumsDrawn > 1) {
- this._clearColorCommand.execute(context, passState);
- }
+ passState.framebuffer = this._drawClassificationFBO.framebuffer;
+ if (this._frustumsDrawn > 1) {
+ this._clearColorCommand.execute(context, passState);
+ }
- uniformState.updatePass(Pass.CESIUM_3D_TILE_CLASSIFICATION);
- const swapGlobeDepth = uniformState.globeDepthTexture;
- uniformState.globeDepthTexture = this._packFBO.getColorTexture();
- const commands =
- frustumCommands.commands[Pass.CESIUM_3D_TILE_CLASSIFICATION];
- const length = frustumCommands.indices[Pass.CESIUM_3D_TILE_CLASSIFICATION];
- for (let i = 0; i < length; ++i) {
- executeCommand(commands[i], scene, passState);
- }
+ uniformState.updatePass(Pass.CESIUM_3D_TILE_CLASSIFICATION);
+ const swapGlobeDepth = uniformState.globeDepthTexture;
+ uniformState.globeDepthTexture = this._packFBO.getColorTexture();
+ const commands = frustumCommands.commands[Pass.CESIUM_3D_TILE_CLASSIFICATION];
+ const length = frustumCommands.indices[Pass.CESIUM_3D_TILE_CLASSIFICATION];
+ for (let i = 0; i < length; ++i) {
+ executeCommand(commands[i], scene, passState);
+ }
- uniformState.globeDepthTexture = swapGlobeDepth;
- passState.framebuffer = framebuffer;
+ uniformState.globeDepthTexture = swapGlobeDepth;
+ passState.framebuffer = framebuffer;
- if (this._frustumsDrawn === 1) {
- return;
- }
+ if (this._frustumsDrawn === 1) {
+ return;
+ }
- passState.framebuffer = this._accumulationFBO.framebuffer;
- this._accumulateCommand.execute(context, passState);
+ passState.framebuffer = this._accumulationFBO.framebuffer;
+ this._accumulateCommand.execute(context, passState);
- passState.framebuffer = framebuffer;
- };
+ passState.framebuffer = framebuffer;
+};
TranslucentTileClassification.prototype.execute = function (scene, passState) {
if (!this._hasTranslucentDepth) {
@@ -467,7 +470,7 @@ function clear(translucentTileClassification, scene, passState) {
translucentTileClassification._drawClassificationFBO.framebuffer;
translucentTileClassification._clearColorCommand.execute(
scene._context,
- passState,
+ passState
);
passState.framebuffer = framebuffer;
@@ -477,7 +480,7 @@ function clear(translucentTileClassification, scene, passState) {
translucentTileClassification._accumulationFBO.framebuffer;
translucentTileClassification._clearColorCommand.execute(
scene._context,
- passState,
+ passState
);
}
diff --git a/packages/engine/Source/Scene/TweenCollection.js b/packages/engine/Source/Scene/TweenCollection.js
index 8ace4f73ed8f..e49bad844f57 100644
--- a/packages/engine/Source/Scene/TweenCollection.js
+++ b/packages/engine/Source/Scene/TweenCollection.js
@@ -26,7 +26,7 @@ function Tween(
easingFunction,
update,
complete,
- cancel,
+ cancel
) {
this._tweens = tweens;
this._tweenjs = tweenjs;
@@ -217,13 +217,13 @@ TweenCollection.prototype.add = function (options) {
//>>includeStart('debug', pragmas.debug);
if (!defined(options.startObject) || !defined(options.stopObject)) {
throw new DeveloperError(
- "options.startObject and options.stopObject are required.",
+ "options.startObject and options.stopObject are required."
);
}
if (!defined(options.duration) || options.duration < 0.0) {
throw new DeveloperError(
- "options.duration is required and must be positive.",
+ "options.duration is required and must be positive."
);
}
//>>includeEnd('debug');
@@ -240,7 +240,7 @@ TweenCollection.prototype.add = function (options) {
const delay = delayInSeconds / TimeConstants.SECONDS_PER_MILLISECOND;
const easingFunction = defaultValue(
options.easingFunction,
- EasingFunction.LINEAR_NONE,
+ EasingFunction.LINEAR_NONE
);
const value = options.startObject;
@@ -266,7 +266,7 @@ TweenCollection.prototype.add = function (options) {
easingFunction,
options.update,
options.complete,
- options.cancel,
+ options.cancel
);
this._tweens.push(tween);
return tween;
@@ -303,17 +303,17 @@ TweenCollection.prototype.addProperty = function (options) {
//>>includeStart('debug', pragmas.debug);
if (!defined(object) || !defined(options.property)) {
throw new DeveloperError(
- "options.object and options.property are required.",
+ "options.object and options.property are required."
);
}
if (!defined(object[property])) {
throw new DeveloperError(
- "options.object must have the specified property.",
+ "options.object must have the specified property."
);
}
if (!defined(startValue) || !defined(stopValue)) {
throw new DeveloperError(
- "options.startValue and options.stopValue are required.",
+ "options.startValue and options.stopValue are required."
);
}
//>>includeEnd('debug');
@@ -384,7 +384,7 @@ TweenCollection.prototype.addAlpha = function (options) {
//>>includeStart('debug', pragmas.debug);
if (properties.length === 0) {
throw new DeveloperError(
- "material has no properties with alpha components.",
+ "material has no properties with alpha components."
);
}
//>>includeEnd('debug');
diff --git a/packages/engine/Source/Scene/UrlTemplateImageryProvider.js b/packages/engine/Source/Scene/UrlTemplateImageryProvider.js
index 48dcab645f46..9eee9536831b 100644
--- a/packages/engine/Source/Scene/UrlTemplateImageryProvider.js
+++ b/packages/engine/Source/Scene/UrlTemplateImageryProvider.js
@@ -219,16 +219,16 @@ function UrlTemplateImageryProvider(options) {
this._maximumLevel = options.maximumLevel;
this._tilingScheme = defaultValue(
options.tilingScheme,
- new WebMercatorTilingScheme({ ellipsoid: options.ellipsoid }),
+ new WebMercatorTilingScheme({ ellipsoid: options.ellipsoid })
);
this._rectangle = defaultValue(
options.rectangle,
- this._tilingScheme.rectangle,
+ this._tilingScheme.rectangle
);
this._rectangle = Rectangle.intersection(
this._rectangle,
- this._tilingScheme.rectangle,
+ this._tilingScheme.rectangle
);
this._tileDiscardPolicy = options.tileDiscardPolicy;
@@ -527,11 +527,11 @@ UrlTemplateImageryProvider.prototype.requestImage = function (
x,
y,
level,
- request,
+ request
) {
return ImageryProvider.loadImage(
this,
- buildImageResource(this, x, y, level, request),
+ buildImageResource(this, x, y, level, request)
);
};
@@ -554,7 +554,7 @@ UrlTemplateImageryProvider.prototype.pickFeatures = function (
y,
level,
longitude,
- latitude,
+ latitude
) {
if (
!this.enablePickFeatures ||
@@ -586,7 +586,7 @@ UrlTemplateImageryProvider.prototype.pickFeatures = function (
level,
longitude,
latitude,
- format.format,
+ format.format
);
++formatIndex;
@@ -650,7 +650,7 @@ function buildPickFeaturesResource(
level,
longitude,
latitude,
- format,
+ format
) {
degreesScratchComputed = false;
projectedScratchComputed = false;
@@ -673,7 +673,7 @@ function buildPickFeaturesResource(
level,
longitude,
latitude,
- format,
+ format
);
}
});
@@ -698,7 +698,7 @@ function padWithZerosIfNecessary(imageryProvider, key, value) {
value.length >= paddingTemplateWidth
? value
: new Array(
- paddingTemplateWidth - value.toString().length + 1,
+ paddingTemplateWidth - value.toString().length + 1
).join("0") + value;
}
}
@@ -787,7 +787,7 @@ function computeProjected(imageryProvider, x, y, level) {
x,
y,
level,
- projectedScratch,
+ projectedScratch
);
projectedScratchComputed = true;
@@ -838,7 +838,7 @@ function reverseITag(
level,
longitude,
latitude,
- format,
+ format
) {
computeIJ(imageryProvider, x, y, level, longitude, latitude);
return imageryProvider.tileWidth - ijScratch.x - 1;
@@ -851,7 +851,7 @@ function reverseJTag(
level,
longitude,
latitude,
- format,
+ format
) {
computeIJ(imageryProvider, x, y, level, longitude, latitude);
return imageryProvider.tileHeight - ijScratch.y - 1;
@@ -871,7 +871,7 @@ function computeIJ(imageryProvider, x, y, level, longitude, latitude, format) {
y,
level,
longitude,
- latitude,
+ latitude
);
const projected = longitudeLatitudeProjectedScratch;
@@ -879,7 +879,7 @@ function computeIJ(imageryProvider, x, y, level, longitude, latitude, format) {
x,
y,
level,
- rectangleScratch,
+ rectangleScratch
);
ijScratch.x =
((imageryProvider.tileWidth * (projected.x - rectangle.west)) /
@@ -899,7 +899,7 @@ function longitudeDegreesTag(
level,
longitude,
latitude,
- format,
+ format
) {
return CesiumMath.toDegrees(longitude);
}
@@ -911,7 +911,7 @@ function latitudeDegreesTag(
level,
longitude,
latitude,
- format,
+ format
) {
return CesiumMath.toDegrees(latitude);
}
@@ -923,7 +923,7 @@ function longitudeProjectedTag(
level,
longitude,
latitude,
- format,
+ format
) {
computeLongitudeLatitudeProjected(
imageryProvider,
@@ -931,7 +931,7 @@ function longitudeProjectedTag(
y,
level,
longitude,
- latitude,
+ latitude
);
return longitudeLatitudeProjectedScratch.x;
}
@@ -943,7 +943,7 @@ function latitudeProjectedTag(
level,
longitude,
latitude,
- format,
+ format
) {
computeLongitudeLatitudeProjected(
imageryProvider,
@@ -951,7 +951,7 @@ function latitudeProjectedTag(
y,
level,
longitude,
- latitude,
+ latitude
);
return longitudeLatitudeProjectedScratch.y;
}
@@ -965,7 +965,7 @@ function computeLongitudeLatitudeProjected(
level,
longitude,
latitude,
- format,
+ format
) {
if (longitudeLatitudeProjectedScratchComputed) {
return;
@@ -980,7 +980,7 @@ function computeLongitudeLatitudeProjected(
cartographic.latitude = latitude;
imageryProvider.tilingScheme.projection.project(
cartographic,
- longitudeLatitudeProjectedScratch,
+ longitudeLatitudeProjectedScratch
);
}
diff --git a/packages/engine/Source/Scene/Vector3DTileClampedPolylines.js b/packages/engine/Source/Scene/Vector3DTileClampedPolylines.js
index 30a07500ce07..657599492973 100644
--- a/packages/engine/Source/Scene/Vector3DTileClampedPolylines.js
+++ b/packages/engine/Source/Scene/Vector3DTileClampedPolylines.js
@@ -80,13 +80,13 @@ function Vector3DTileClampedPolylines(options) {
this._packedBuffer = undefined;
this._minimumMaximumVectorHeights = new Cartesian2(
ApproximateTerrainHeights._defaultMinTerrainHeight,
- ApproximateTerrainHeights._defaultMaxTerrainHeight,
+ ApproximateTerrainHeights._defaultMaxTerrainHeight
);
this._boundingVolume = OrientedBoundingBox.fromRectangle(
options.rectangle,
ApproximateTerrainHeights._defaultMinTerrainHeight,
ApproximateTerrainHeights._defaultMaxTerrainHeight,
- this._ellipsoid,
+ this._ellipsoid
);
this._classificationType = options.classificationType;
@@ -161,7 +161,7 @@ Object.defineProperties(Vector3DTileClampedPolylines.prototype, {
function updateMinimumMaximumHeights(polylines, rectangle, ellipsoid) {
const result = ApproximateTerrainHeights.getMinimumMaximumHeights(
rectangle,
- ellipsoid,
+ ellipsoid
);
const min = result.minimumTerrainHeight;
const max = result.maximumTerrainHeight;
@@ -204,7 +204,7 @@ function packBuffer(polylines) {
}
const createVerticesTaskProcessor = new TaskProcessor(
- "createVectorTileClampedPolylines",
+ "createVectorTileClampedPolylines"
);
const attributeLocations = {
startEllipsoidNormal: 0,
@@ -257,7 +257,7 @@ function createVertexArray(polylines, context) {
const verticesPromise = createVerticesTaskProcessor.scheduleTask(
parameters,
- transferrableObjects,
+ transferrableObjects
);
if (!defined(verticesPromise)) {
// Postponed
@@ -273,27 +273,27 @@ function createVertexArray(polylines, context) {
if (polylines._keepDecodedPositions) {
polylines._decodedPositions = new Float64Array(result.decodedPositions);
polylines._decodedPositionOffsets = new Uint32Array(
- result.decodedPositionOffsets,
+ result.decodedPositionOffsets
);
}
polylines._startEllipsoidNormals = new Float32Array(
- result.startEllipsoidNormals,
+ result.startEllipsoidNormals
);
polylines._endEllipsoidNormals = new Float32Array(
- result.endEllipsoidNormals,
+ result.endEllipsoidNormals
);
polylines._startPositionAndHeights = new Float32Array(
- result.startPositionAndHeights,
+ result.startPositionAndHeights
);
polylines._startFaceNormalAndVertexCornerIds = new Float32Array(
- result.startFaceNormalAndVertexCornerIds,
+ result.startFaceNormalAndVertexCornerIds
);
polylines._endPositionAndHeights = new Float32Array(
- result.endPositionAndHeights,
+ result.endPositionAndHeights
);
polylines._endFaceNormalAndHalfWidths = new Float32Array(
- result.endFaceNormalAndHalfWidths,
+ result.endFaceNormalAndHalfWidths
);
polylines._vertexBatchIds = new Uint16Array(result.vertexBatchIds);
@@ -477,12 +477,12 @@ function createUniformMap(primitive, context) {
Matrix4.multiplyByPoint(
modifiedModelViewScratch,
primitive._center,
- rtcScratch,
+ rtcScratch
);
Matrix4.setTranslation(
modifiedModelViewScratch,
rtcScratch,
- modifiedModelViewScratch,
+ modifiedModelViewScratch
);
return modifiedModelViewScratch;
},
@@ -549,12 +549,12 @@ function createShaders(primitive, context) {
const vsSource = batchTable.getVertexShaderCallback(
false,
"a_batchId",
- undefined,
+ undefined
)(Vector3DTileClampedPolylinesVS);
const fsSource = batchTable.getFragmentShaderCallback(
false,
undefined,
- true,
+ true
)(Vector3DTileClampedPolylinesFS);
const vs = new ShaderSource({
@@ -581,7 +581,7 @@ function queueCommands(primitive, frameState) {
let command = primitive._command;
if (!defined(primitive._command)) {
const uniformMap = primitive._batchTable.getUniformMapCallback()(
- primitive._uniformMap,
+ primitive._uniformMap
);
command = primitive._command = new DrawCommand({
owner: primitive,
@@ -596,7 +596,7 @@ function queueCommands(primitive, frameState) {
const derivedTilesetCommand = DrawCommand.shallowClone(
command,
- command.derivedCommands.tileset,
+ command.derivedCommands.tileset
);
derivedTilesetCommand.renderState = primitive._rs3DTiles;
derivedTilesetCommand.pass = Pass.CESIUM_3D_TILE_CLASSIFICATION;
@@ -635,7 +635,7 @@ Vector3DTileClampedPolylines.prototype.getPositions = function (batchId) {
*/
Vector3DTileClampedPolylines.prototype.createFeatures = function (
content,
- features,
+ features
) {
const batchIds = this._batchIds;
const length = batchIds.length;
@@ -653,7 +653,7 @@ Vector3DTileClampedPolylines.prototype.createFeatures = function (
*/
Vector3DTileClampedPolylines.prototype.applyDebugSettings = function (
enabled,
- color,
+ color
) {
this._highlightColor = enabled ? color : this._constantColor;
};
@@ -708,7 +708,7 @@ function initialize(polylines) {
updateMinimumMaximumHeights(
polylines,
polylines._rectangle,
- polylines._ellipsoid,
+ polylines._ellipsoid
);
})
.catch((error) => {
diff --git a/packages/engine/Source/Scene/Vector3DTileContent.js b/packages/engine/Source/Scene/Vector3DTileContent.js
index 1975f60b6055..120a22db5801 100644
--- a/packages/engine/Source/Scene/Vector3DTileContent.js
+++ b/packages/engine/Source/Scene/Vector3DTileContent.js
@@ -204,7 +204,7 @@ function getBatchIds(featureTableJson, featureTableBinary) {
polygonBatchIds = new Uint16Array(
featureTableBinary.buffer,
polygonBatchIdsByteOffset,
- numberOfPolygons,
+ numberOfPolygons
);
}
@@ -215,7 +215,7 @@ function getBatchIds(featureTableJson, featureTableBinary) {
polylineBatchIds = new Uint16Array(
featureTableBinary.buffer,
polylineBatchIdsByteOffset,
- numberOfPolylines,
+ numberOfPolylines
);
}
@@ -226,7 +226,7 @@ function getBatchIds(featureTableJson, featureTableBinary) {
pointBatchIds = new Uint16Array(
featureTableBinary.buffer,
pointBatchIdsByteOffset,
- numberOfPoints,
+ numberOfPoints
);
}
@@ -241,7 +241,7 @@ function getBatchIds(featureTableJson, featureTableBinary) {
if (atLeastOneDefined && atLeastOneUndefined) {
throw new RuntimeError(
- "If one group of batch ids is defined, then all batch ids must be defined",
+ "If one group of batch ids is defined, then all batch ids must be defined"
);
}
@@ -298,7 +298,7 @@ function initialize(content, arrayBuffer, byteOffset) {
const version = view.getUint32(byteOffset, true);
if (version !== 1) {
throw new RuntimeError(
- `Only Vector tile version 1 is supported. Version ${version} is not.`,
+ `Only Vector tile version 1 is supported. Version ${version} is not.`
);
}
byteOffset += sizeOfUint32;
@@ -316,7 +316,7 @@ function initialize(content, arrayBuffer, byteOffset) {
if (featureTableJSONByteLength === 0) {
throw new RuntimeError(
- "Feature table must have a byte length greater than zero",
+ "Feature table must have a byte length greater than zero"
);
}
@@ -338,14 +338,14 @@ function initialize(content, arrayBuffer, byteOffset) {
const featureTableJson = getJsonFromTypedArray(
uint8Array,
byteOffset,
- featureTableJSONByteLength,
+ featureTableJSONByteLength
);
byteOffset += featureTableJSONByteLength;
const featureTableBinary = new Uint8Array(
arrayBuffer,
byteOffset,
- featureTableBinaryByteLength,
+ featureTableBinaryByteLength
);
byteOffset += featureTableBinaryByteLength;
@@ -360,7 +360,7 @@ function initialize(content, arrayBuffer, byteOffset) {
batchTableJson = getJsonFromTypedArray(
uint8Array,
byteOffset,
- batchTableJSONByteLength,
+ batchTableJSONByteLength
);
byteOffset += batchTableJSONByteLength;
@@ -369,7 +369,7 @@ function initialize(content, arrayBuffer, byteOffset) {
batchTableBinary = new Uint8Array(
arrayBuffer,
byteOffset,
- batchTableBinaryByteLength,
+ batchTableBinaryByteLength
);
// Copy the batchTableBinary section and let the underlying ArrayBuffer be freed
batchTableBinary = new Uint8Array(batchTableBinary);
@@ -387,7 +387,7 @@ function initialize(content, arrayBuffer, byteOffset) {
totalPrimitives,
batchTableJson,
batchTableBinary,
- createColorChangedCallback(content),
+ createColorChangedCallback(content)
);
content._batchTable = batchTable;
@@ -397,12 +397,12 @@ function initialize(content, arrayBuffer, byteOffset) {
const featureTable = new Cesium3DTileFeatureTable(
featureTableJson,
- featureTableBinary,
+ featureTableBinary
);
const region = featureTable.getGlobalProperty("REGION");
if (!defined(region)) {
throw new RuntimeError(
- "Feature table global property: REGION must be defined",
+ "Feature table global property: REGION must be defined"
);
}
const rectangle = Rectangle.unpack(region);
@@ -414,7 +414,7 @@ function initialize(content, arrayBuffer, byteOffset) {
let center = featureTable.getGlobalProperty(
"RTC_CENTER",
ComponentDatatype.FLOAT,
- 3,
+ 3
);
if (defined(center)) {
center = Cartesian3.unpack(center);
@@ -435,18 +435,18 @@ function initialize(content, arrayBuffer, byteOffset) {
featureTable.getPropertyArray(
"POLYGON_COUNTS",
ComponentDatatype.UNSIGNED_INT,
- 1,
+ 1
),
featureTable.getPropertyArray(
"POLYGON_COUNT",
ComponentDatatype.UNSIGNED_INT,
- 1,
- ), // Workaround for old vector tilesets using the non-plural name
+ 1
+ ) // Workaround for old vector tilesets using the non-plural name
);
if (!defined(polygonCounts)) {
throw new RuntimeError(
- "Feature table property: POLYGON_COUNTS must be defined when POLYGONS_LENGTH is greater than 0",
+ "Feature table property: POLYGON_COUNTS must be defined when POLYGONS_LENGTH is greater than 0"
);
}
@@ -454,18 +454,18 @@ function initialize(content, arrayBuffer, byteOffset) {
featureTable.getPropertyArray(
"POLYGON_INDEX_COUNTS",
ComponentDatatype.UNSIGNED_INT,
- 1,
+ 1
),
featureTable.getPropertyArray(
"POLYGON_INDEX_COUNT",
ComponentDatatype.UNSIGNED_INT,
- 1,
- ), // Workaround for old vector tilesets using the non-plural name
+ 1
+ ) // Workaround for old vector tilesets using the non-plural name
);
if (!defined(polygonIndexCounts)) {
throw new RuntimeError(
- "Feature table property: POLYGON_INDEX_COUNTS must be defined when POLYGONS_LENGTH is greater than 0",
+ "Feature table property: POLYGON_INDEX_COUNTS must be defined when POLYGONS_LENGTH is greater than 0"
);
}
@@ -477,10 +477,11 @@ function initialize(content, arrayBuffer, byteOffset) {
const numPolygonIndices = polygonIndexCounts.reduce(function (
total,
- count,
+ count
) {
return total + count;
- }, 0);
+ },
+ 0);
const indices = new Uint32Array(arrayBuffer, byteOffset, numPolygonIndices);
byteOffset += indicesByteLength;
@@ -488,7 +489,7 @@ function initialize(content, arrayBuffer, byteOffset) {
const polygonPositions = new Uint16Array(
arrayBuffer,
byteOffset,
- numPolygonPositions,
+ numPolygonPositions
);
byteOffset += positionByteLength;
@@ -501,12 +502,12 @@ function initialize(content, arrayBuffer, byteOffset) {
polygonMinimumHeights = featureTable.getPropertyArray(
"POLYGON_MINIMUM_HEIGHTS",
ComponentDatatype.FLOAT,
- 1,
+ 1
);
polygonMaximumHeights = featureTable.getPropertyArray(
"POLYGON_MAXIMUM_HEIGHTS",
ComponentDatatype.FLOAT,
- 1,
+ 1
);
}
@@ -535,25 +536,25 @@ function initialize(content, arrayBuffer, byteOffset) {
featureTable.getPropertyArray(
"POLYLINE_COUNTS",
ComponentDatatype.UNSIGNED_INT,
- 1,
+ 1
),
featureTable.getPropertyArray(
"POLYLINE_COUNT",
ComponentDatatype.UNSIGNED_INT,
- 1,
- ), // Workaround for old vector tilesets using the non-plural name
+ 1
+ ) // Workaround for old vector tilesets using the non-plural name
);
if (!defined(polylineCounts)) {
throw new RuntimeError(
- "Feature table property: POLYLINE_COUNTS must be defined when POLYLINES_LENGTH is greater than 0",
+ "Feature table property: POLYLINE_COUNTS must be defined when POLYLINES_LENGTH is greater than 0"
);
}
let widths = featureTable.getPropertyArray(
"POLYLINE_WIDTHS",
ComponentDatatype.UNSIGNED_SHORT,
- 1,
+ 1
);
if (!defined(widths)) {
widths = new Uint16Array(numberOfPolylines);
@@ -570,7 +571,7 @@ function initialize(content, arrayBuffer, byteOffset) {
const polylinePositions = new Uint16Array(
arrayBuffer,
byteOffset,
- numPolylinePositions,
+ numPolylinePositions
);
byteOffset += polylinePositionByteLength;
@@ -582,7 +583,7 @@ function initialize(content, arrayBuffer, byteOffset) {
rectangle,
minHeight,
maxHeight,
- Ellipsoid.WGS84,
+ Ellipsoid.WGS84
);
examineVectorLines(
decodedPositions,
@@ -590,7 +591,7 @@ function initialize(content, arrayBuffer, byteOffset) {
batchIds.polylines,
batchTable,
content.url,
- examineVectorLinesFunction,
+ examineVectorLinesFunction
);
}
@@ -619,7 +620,7 @@ function initialize(content, arrayBuffer, byteOffset) {
const pointPositions = new Uint16Array(
arrayBuffer,
byteOffset,
- numberOfPoints * 3,
+ numberOfPoints * 3
);
byteOffset += pointsPositionByteLength;
content._points = new Vector3DTilePoints({
@@ -662,7 +663,7 @@ Vector3DTileContent.prototype.getFeature = function (batchId) {
throw new DeveloperError(
`batchId is required and between zero and featuresLength - 1 (${
featuresLength - 1
- }).`,
+ }).`
);
}
//>>includeEnd('debug');
@@ -757,7 +758,7 @@ function examineVectorLines(
batchIds,
batchTable,
url,
- callback,
+ callback
) {
const countsLength = counts.length;
let polylineStart = 0;
diff --git a/packages/engine/Source/Scene/Vector3DTileGeometry.js b/packages/engine/Source/Scene/Vector3DTileGeometry.js
index 682ca7dbb5e5..c6e4c7688079 100644
--- a/packages/engine/Source/Scene/Vector3DTileGeometry.js
+++ b/packages/engine/Source/Scene/Vector3DTileGeometry.js
@@ -160,7 +160,7 @@ Vector3DTileGeometry.packedSphereLength = Cartesian3.packedLength + 1;
function packBuffer(geometries) {
const packedBuffer = new Float64Array(
- Matrix4.packedLength + Cartesian3.packedLength,
+ Matrix4.packedLength + Cartesian3.packedLength
);
let offset = 0;
@@ -213,7 +213,7 @@ function unpackBuffer(geometries, packedBuffer) {
const createVerticesTaskProcessor = new TaskProcessor(
"createVectorTileGeometries",
- 5,
+ 5
);
const scratchColor = new Color();
@@ -245,14 +245,12 @@ function createPrimitive(geometries) {
}
if (defined(geometries._cylinders)) {
cylinders = geometries._cylinders = cylinders.slice();
- cylinderBatchIds = geometries._cylinderBatchIds =
- cylinderBatchIds.slice();
+ cylinderBatchIds = geometries._cylinderBatchIds = cylinderBatchIds.slice();
length += cylinderBatchIds.length;
}
if (defined(geometries._ellipsoids)) {
ellipsoids = geometries._ellipsoids = ellipsoids.slice();
- ellipsoidBatchIds = geometries._ellipsoidBatchIds =
- ellipsoidBatchIds.slice();
+ ellipsoidBatchIds = geometries._ellipsoidBatchIds = ellipsoidBatchIds.slice();
length += ellipsoidBatchIds.length;
}
if (defined(geometries._spheres)) {
@@ -304,11 +302,10 @@ function createPrimitive(geometries) {
packedBuffer: packedBuffer.buffer,
};
- const verticesPromise = (geometries._verticesPromise =
- createVerticesTaskProcessor.scheduleTask(
- parameters,
- transferrableObjects,
- ));
+ const verticesPromise = (geometries._verticesPromise = createVerticesTaskProcessor.scheduleTask(
+ parameters,
+ transferrableObjects
+ ));
if (!defined(verticesPromise)) {
// Postponed
return;
diff --git a/packages/engine/Source/Scene/Vector3DTilePoints.js b/packages/engine/Source/Scene/Vector3DTilePoints.js
index e985e226bf20..7bea9c2c9022 100644
--- a/packages/engine/Source/Scene/Vector3DTilePoints.js
+++ b/packages/engine/Source/Scene/Vector3DTilePoints.js
@@ -101,8 +101,8 @@ Object.defineProperties(Vector3DTilePoints.prototype, {
*/
texturesByteLength: {
get: function () {
- const billboardSize =
- this._billboardCollection.textureAtlas.texture.sizeInBytes;
+ const billboardSize = this._billboardCollection.textureAtlas.texture
+ .sizeInBytes;
const labelSize = this._labelCollection._textureAtlas.texture.sizeInBytes;
return billboardSize + labelSize;
},
@@ -131,7 +131,7 @@ function packBuffer(points, ellipsoid) {
const createVerticesTaskProcessor = new TaskProcessor(
"createVectorTilePoints",
- 5,
+ 5
);
const scratchPosition = new Cartesian3();
@@ -155,7 +155,7 @@ function createPoints(points, ellipsoid) {
const verticesPromise = createVerticesTaskProcessor.scheduleTask(
parameters,
- transferrableObjects,
+ transferrableObjects
);
if (!defined(verticesPromise)) {
// Postponed
@@ -233,7 +233,7 @@ Vector3DTilePoints.prototype.createFeatures = function (content, features) {
batchId,
billboard,
label,
- polyline,
+ polyline
);
}
};
@@ -337,7 +337,7 @@ Vector3DTilePoints.prototype.applyStyle = function (style, features) {
if (defined(style.pointOutlineColor)) {
feature.pointOutlineColor = style.pointOutlineColor.evaluateColor(
feature,
- scratchColor2,
+ scratchColor2
);
}
@@ -348,14 +348,14 @@ Vector3DTilePoints.prototype.applyStyle = function (style, features) {
if (defined(style.labelColor)) {
feature.labelColor = style.labelColor.evaluateColor(
feature,
- scratchColor3,
+ scratchColor3
);
}
if (defined(style.labelOutlineColor)) {
feature.labelOutlineColor = style.labelOutlineColor.evaluateColor(
feature,
- scratchColor4,
+ scratchColor4
);
}
@@ -380,7 +380,7 @@ Vector3DTilePoints.prototype.applyStyle = function (style, features) {
if (defined(style.backgroundColor)) {
feature.backgroundColor = style.backgroundColor.evaluateColor(
feature,
- scratchColor5,
+ scratchColor5
);
}
@@ -408,8 +408,9 @@ Vector3DTilePoints.prototype.applyStyle = function (style, features) {
}
if (defined(style.translucencyByDistance)) {
- const translucencyByDistanceCart4 =
- style.translucencyByDistance.evaluate(feature);
+ const translucencyByDistanceCart4 = style.translucencyByDistance.evaluate(
+ feature
+ );
if (defined(translucencyByDistanceCart4)) {
scratchTranslucencyByDistance.near = translucencyByDistanceCart4.x;
scratchTranslucencyByDistance.nearValue = translucencyByDistanceCart4.y;
@@ -424,8 +425,9 @@ Vector3DTilePoints.prototype.applyStyle = function (style, features) {
}
if (defined(style.distanceDisplayCondition)) {
- const distanceDisplayConditionCart2 =
- style.distanceDisplayCondition.evaluate(feature);
+ const distanceDisplayConditionCart2 = style.distanceDisplayCondition.evaluate(
+ feature
+ );
if (defined(distanceDisplayConditionCart2)) {
scratchDistanceDisplayCondition.near = distanceDisplayConditionCart2.x;
scratchDistanceDisplayCondition.far = distanceDisplayConditionCart2.y;
@@ -448,7 +450,7 @@ Vector3DTilePoints.prototype.applyStyle = function (style, features) {
if (defined(style.anchorLineColor)) {
feature.anchorLineColor = style.anchorLineColor.evaluateColor(
feature,
- scratchColor6,
+ scratchColor6
);
}
@@ -459,8 +461,9 @@ Vector3DTilePoints.prototype.applyStyle = function (style, features) {
}
if (defined(style.disableDepthTestDistance)) {
- feature.disableDepthTestDistance =
- style.disableDepthTestDistance.evaluate(feature);
+ feature.disableDepthTestDistance = style.disableDepthTestDistance.evaluate(
+ feature
+ );
}
if (defined(style.horizontalOrigin)) {
@@ -472,8 +475,9 @@ Vector3DTilePoints.prototype.applyStyle = function (style, features) {
}
if (defined(style.labelHorizontalOrigin)) {
- feature.labelHorizontalOrigin =
- style.labelHorizontalOrigin.evaluate(feature);
+ feature.labelHorizontalOrigin = style.labelHorizontalOrigin.evaluate(
+ feature
+ );
}
if (defined(style.labelVerticalOrigin)) {
diff --git a/packages/engine/Source/Scene/Vector3DTilePolygons.js b/packages/engine/Source/Scene/Vector3DTilePolygons.js
index d11e4424a339..06a6d3de907e 100644
--- a/packages/engine/Source/Scene/Vector3DTilePolygons.js
+++ b/packages/engine/Source/Scene/Vector3DTilePolygons.js
@@ -156,7 +156,7 @@ function packBuffer(polygons) {
3 +
Cartesian3.packedLength +
Ellipsoid.packedLength +
- Rectangle.packedLength,
+ Rectangle.packedLength
);
let offset = 0;
@@ -215,7 +215,7 @@ function unpackBuffer(polygons, packedBuffer) {
const createVerticesTaskProcessor = new TaskProcessor(
"createVectorTilePolygons",
- 5,
+ 5
);
const scratchColor = new Color();
@@ -242,14 +242,14 @@ function createPrimitive(polygons) {
indices = polygons._indices = polygons._indices.slice();
polygons._center = polygons._ellipsoid.cartographicToCartesian(
- Rectangle.center(polygons._rectangle),
+ Rectangle.center(polygons._rectangle)
);
batchIds = polygons._transferrableBatchIds = new Uint32Array(
- polygons._batchIds,
+ polygons._batchIds
);
batchTableColors = polygons._batchTableColors = new Uint32Array(
- batchIds.length,
+ batchIds.length
);
const batchTable = polygons._batchTable;
@@ -294,7 +294,7 @@ function createPrimitive(polygons) {
const verticesPromise = createVerticesTaskProcessor.scheduleTask(
parameters,
- transferrableObjects,
+ transferrableObjects
);
if (!defined(verticesPromise)) {
// Postponed
diff --git a/packages/engine/Source/Scene/Vector3DTilePolylines.js b/packages/engine/Source/Scene/Vector3DTilePolylines.js
index d495a024efcd..781f568b5118 100644
--- a/packages/engine/Source/Scene/Vector3DTilePolylines.js
+++ b/packages/engine/Source/Scene/Vector3DTilePolylines.js
@@ -167,7 +167,7 @@ function packBuffer(polylines) {
const createVerticesTaskProcessor = new TaskProcessor(
"createVectorTilePolylines",
- 5,
+ 5
);
const attributeLocations = {
previousPosition: 0,
@@ -218,7 +218,7 @@ function createVertexArray(polylines, context) {
const verticesPromise = createVerticesTaskProcessor.scheduleTask(
parameters,
- transferrableObjects,
+ transferrableObjects
);
if (!defined(verticesPromise)) {
// Postponed
@@ -234,7 +234,7 @@ function createVertexArray(polylines, context) {
if (polylines._keepDecodedPositions) {
polylines._decodedPositions = new Float64Array(result.decodedPositions);
polylines._decodedPositionOffsets = new Uint32Array(
- result.decodedPositionOffsets,
+ result.decodedPositionOffsets
);
}
@@ -395,12 +395,12 @@ function createUniformMap(primitive, context) {
Matrix4.multiplyByPoint(
modifiedModelViewScratch,
primitive._center,
- rtcScratch,
+ rtcScratch
);
Matrix4.setTranslation(
modifiedModelViewScratch,
rtcScratch,
- modifiedModelViewScratch,
+ modifiedModelViewScratch
);
return modifiedModelViewScratch;
},
@@ -448,12 +448,12 @@ function createShaders(primitive, context) {
const vsSource = batchTable.getVertexShaderCallback(
false,
"a_batchId",
- undefined,
+ undefined
)(Vector3DTilePolylinesVS);
const fsSource = batchTable.getFragmentShaderCallback(
false,
undefined,
- false,
+ false
)(PolylineFS);
const vs = new ShaderSource({
@@ -479,7 +479,7 @@ function createShaders(primitive, context) {
function queueCommands(primitive, frameState) {
if (!defined(primitive._command)) {
const uniformMap = primitive._batchTable.getUniformMapCallback()(
- primitive._uniformMap,
+ primitive._uniformMap
);
primitive._command = new DrawCommand({
owner: primitive,
diff --git a/packages/engine/Source/Scene/Vector3DTilePrimitive.js b/packages/engine/Source/Scene/Vector3DTilePrimitive.js
index bb5cb4825a57..0f16df4a98fb 100644
--- a/packages/engine/Source/Scene/Vector3DTilePrimitive.js
+++ b/packages/engine/Source/Scene/Vector3DTilePrimitive.js
@@ -129,7 +129,7 @@ function Vector3DTilePrimitive(options) {
*/
this.classificationType = defaultValue(
options.classificationType,
- ClassificationType.BOTH,
+ ClassificationType.BOTH
);
// Hidden options
@@ -221,7 +221,7 @@ function createVertexArray(primitive, context) {
index: 1,
vertexBuffer: idBuffer,
componentDatatype: ComponentDatatype.fromTypedArray(
- primitive._vertexBatchIds,
+ primitive._vertexBatchIds
),
componentsPerAttribute: 1,
},
@@ -259,7 +259,7 @@ function createShaders(primitive, context) {
const batchTable = primitive._batchTable;
const attributeLocations = defaultValue(
primitive._attributeLocations,
- defaultAttributeLocations,
+ defaultAttributeLocations
);
let pickId = primitive._pickId;
@@ -276,7 +276,7 @@ function createShaders(primitive, context) {
fragmentShaderSource = ShaderSource.replaceMain(
fragmentShaderSource,
- "czm_non_pick_main",
+ "czm_non_pick_main"
);
fragmentShaderSource =
`${fragmentShaderSource}void main() \n` +
@@ -296,12 +296,12 @@ function createShaders(primitive, context) {
const vsSource = batchTable.getVertexShaderCallback(
false,
"a_batchId",
- undefined,
+ undefined
)(VectorTileVS);
let fsSource = batchTable.getFragmentShaderCallback(
false,
undefined,
- true,
+ true
)(ShadowVolumeFS);
pickId = batchTable.getPickId();
@@ -454,10 +454,10 @@ function createRenderStates(primitive) {
}
primitive._rsStencilDepthPass = RenderState.fromCache(
- getStencilDepthRenderState(false),
+ getStencilDepthRenderState(false)
);
primitive._rsStencilDepthPass3DTiles = RenderState.fromCache(
- getStencilDepthRenderState(true),
+ getStencilDepthRenderState(true)
);
primitive._rsColorPass = RenderState.fromCache(colorRenderState);
primitive._rsPickPass = RenderState.fromCache(pickRenderState);
@@ -479,17 +479,17 @@ function createUniformMap(primitive, context) {
Matrix4.multiplyByPoint(
modifiedModelViewScratch,
primitive._center,
- rtcScratch,
+ rtcScratch
);
Matrix4.setTranslation(
modifiedModelViewScratch,
rtcScratch,
- modifiedModelViewScratch,
+ modifiedModelViewScratch
);
Matrix4.multiply(
projectionMatrix,
modifiedModelViewScratch,
- modifiedModelViewScratch,
+ modifiedModelViewScratch
);
return modifiedModelViewScratch;
},
@@ -498,8 +498,9 @@ function createUniformMap(primitive, context) {
},
};
- primitive._uniformMap =
- primitive._batchTable.getUniformMapCallback()(uniformMap);
+ primitive._uniformMap = primitive._batchTable.getUniformMapCallback()(
+ uniformMap
+ );
}
function copyIndicesCPU(
@@ -509,7 +510,7 @@ function copyIndicesCPU(
offsets,
counts,
batchIds,
- batchIdLookUp,
+ batchIdLookUp
) {
const sizeInBytes = indices.constructor.BYTES_PER_ELEMENT;
@@ -523,7 +524,7 @@ function copyIndicesCPU(
const subarray = new indices.constructor(
indices.buffer,
sizeInBytes * offset,
- count,
+ count
);
newIndices.set(subarray, currentOffset);
@@ -552,7 +553,7 @@ function rebatchCPU(primitive, batchedIndices) {
indexOffsets,
indexCounts,
current.batchIds,
- batchIdLookUp,
+ batchIdLookUp
);
current.offset = 0;
@@ -568,7 +569,7 @@ function rebatchCPU(primitive, batchedIndices) {
indexOffsets,
indexCounts,
next.batchIds,
- batchIdLookUp,
+ batchIdLookUp
);
current.batchIds = current.batchIds.concat(next.batchIds);
current.count = currentOffset - current.offset;
@@ -581,7 +582,7 @@ function rebatchCPU(primitive, batchedIndices) {
indexOffsets,
indexCounts,
next.batchIds,
- batchIdLookUp,
+ batchIdLookUp
);
next.offset = offset;
@@ -604,7 +605,7 @@ function copyIndicesGPU(
offsets,
counts,
batchIds,
- batchIdLookUp,
+ batchIdLookUp
) {
const sizeInBytes = readBuffer.bytesPerIndex;
@@ -619,7 +620,7 @@ function copyIndicesGPU(
readBuffer,
offset * sizeInBytes,
currentOffset * sizeInBytes,
- count * sizeInBytes,
+ count * sizeInBytes
);
offsets[index] = currentOffset;
@@ -647,7 +648,7 @@ function rebatchGPU(primitive, batchedIndices) {
indexOffsets,
indexCounts,
current.batchIds,
- batchIdLookUp,
+ batchIdLookUp
);
current.offset = 0;
@@ -663,7 +664,7 @@ function rebatchGPU(primitive, batchedIndices) {
indexOffsets,
indexCounts,
next.batchIds,
- batchIdLookUp,
+ batchIdLookUp
);
current.batchIds = current.batchIds.concat(next.batchIds);
current.count = currentOffset - current.offset;
@@ -676,7 +677,7 @@ function rebatchGPU(primitive, batchedIndices) {
indexOffsets,
indexCounts,
next.batchIds,
- batchIdLookUp,
+ batchIdLookUp
);
next.offset = offset;
next.count = currentOffset - offset;
@@ -797,7 +798,7 @@ function createColorCommands(primitive, context) {
const stencilDepthDerivedCommand = DrawCommand.shallowClone(
stencilDepthCommand,
- stencilDepthCommand.derivedCommands.tileset,
+ stencilDepthCommand.derivedCommands.tileset
);
stencilDepthDerivedCommand.renderState =
primitive._rsStencilDepthPass3DTiles;
@@ -824,7 +825,7 @@ function createColorCommands(primitive, context) {
const colorDerivedCommand = DrawCommand.shallowClone(
colorCommand,
- colorCommand.derivedCommands.tileset,
+ colorCommand.derivedCommands.tileset
);
colorDerivedCommand.pass = Pass.CESIUM_3D_TILE_CLASSIFICATION;
colorCommand.derivedCommands.tileset = colorDerivedCommand;
@@ -853,7 +854,7 @@ function createColorCommandsIgnoreShow(primitive, frameState) {
for (let j = 0; j < length; ++j) {
const commandIgnoreShow = (commandsIgnoreShow[j] = DrawCommand.shallowClone(
commands[commandIndex],
- commandsIgnoreShow[j],
+ commandsIgnoreShow[j]
));
commandIgnoreShow.shaderProgram = spStencil;
commandIgnoreShow.pass = Pass.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW;
@@ -906,7 +907,7 @@ function createPickCommands(primitive) {
const stencilDepthDerivedCommand = DrawCommand.shallowClone(
stencilDepthCommand,
- stencilDepthCommand.derivedCommands.tileset,
+ stencilDepthCommand.derivedCommands.tileset
);
stencilDepthDerivedCommand.renderState =
primitive._rsStencilDepthPass3DTiles;
@@ -933,7 +934,7 @@ function createPickCommands(primitive) {
const colorDerivedCommand = DrawCommand.shallowClone(
colorCommand,
- colorCommand.derivedCommands.tileset,
+ colorCommand.derivedCommands.tileset
);
colorDerivedCommand.pass = Pass.CESIUM_3D_TILE_CLASSIFICATION;
colorCommand.derivedCommands.tileset = colorDerivedCommand;
@@ -1090,7 +1091,7 @@ Vector3DTilePrimitive.prototype.updateCommands = function (batchId, color) {
offset: offset,
count: count,
batchIds: [batchId],
- }),
+ })
);
const startIds = [];
@@ -1121,7 +1122,7 @@ Vector3DTilePrimitive.prototype.updateCommands = function (batchId, color) {
count:
batchedIndices[i].offset + batchedIndices[i].count - (offset + count),
batchIds: endIds,
- }),
+ })
);
}
diff --git a/packages/engine/Source/Scene/VertexAttributeSemantic.js b/packages/engine/Source/Scene/VertexAttributeSemantic.js
index c168997fca27..0225bf5d3fba 100644
--- a/packages/engine/Source/Scene/VertexAttributeSemantic.js
+++ b/packages/engine/Source/Scene/VertexAttributeSemantic.js
@@ -73,6 +73,20 @@ const VertexAttributeSemantic = {
* @constant
*/
FEATURE_ID: "_FEATURE_ID",
+ /**
+ * Gaussian Splat Scale
+ *
+ * @type {string}
+ * @constant
+ */
+ SCALE: "_SCALE",
+ /**
+ * Gaussian Splat Rotation
+ *
+ * @type {string}
+ * @constant
+ */
+ ROTATION: "_ROTATION",
};
function semanticToVariableName(semantic) {
@@ -93,6 +107,10 @@ function semanticToVariableName(semantic) {
return "weights";
case VertexAttributeSemantic.FEATURE_ID:
return "featureId";
+ case VertexAttributeSemantic.SCALE:
+ return "scale";
+ case VertexAttributeSemantic.ROTATION:
+ return "rotation";
//>>includeStart('debug', pragmas.debug);
default:
throw new DeveloperError("semantic is not a valid value.");
@@ -124,6 +142,8 @@ VertexAttributeSemantic.hasSetIndex = function (semantic) {
case VertexAttributeSemantic.JOINTS:
case VertexAttributeSemantic.WEIGHTS:
case VertexAttributeSemantic.FEATURE_ID:
+ case VertexAttributeSemantic.SCALE:
+ case VertexAttributeSemantic.ROTATION:
return true;
//>>includeStart('debug', pragmas.debug);
default:
@@ -172,6 +192,10 @@ VertexAttributeSemantic.fromGltfSemantic = function (gltfSemantic) {
return VertexAttributeSemantic.WEIGHTS;
case "_FEATURE_ID":
return VertexAttributeSemantic.FEATURE_ID;
+ case "_SCALE":
+ return VertexAttributeSemantic.SCALE;
+ case "_ROTATION":
+ return VertexAttributeSemantic.ROTATION;
}
return undefined;
@@ -241,6 +265,10 @@ VertexAttributeSemantic.getGlslType = function (semantic) {
return "vec4";
case VertexAttributeSemantic.FEATURE_ID:
return "int";
+ case VertexAttributeSemantic.SCALE:
+ return "vec3";
+ case VertexAttributeSemantic.ROTATION:
+ return "vec4";
//>>includeStart('debug', pragmas.debug);
default:
throw new DeveloperError("semantic is not a valid value.");
diff --git a/packages/engine/Source/Scene/View.js b/packages/engine/Source/Scene/View.js
index ec8cb870f681..bb7bcfbcbf7f 100644
--- a/packages/engine/Source/Scene/View.js
+++ b/packages/engine/Source/Scene/View.js
@@ -67,7 +67,7 @@ function View(scene, camera, viewport) {
this.globeTranslucencyFramebuffer = new GlobeTranslucencyFramebuffer();
this.oit = oit;
this.translucentTileClassification = new TranslucentTileClassification(
- context,
+ context
);
/**
* @type {PickDepth[]}
@@ -96,11 +96,11 @@ const scratchPosition1 = new Cartesian3();
function cameraEqual(camera0, camera1, epsilon) {
const maximumPositionComponent = Math.max(
Cartesian3.maximumComponent(
- Cartesian3.abs(camera0.position, scratchPosition0),
+ Cartesian3.abs(camera0.position, scratchPosition0)
),
Cartesian3.maximumComponent(
- Cartesian3.abs(camera1.position, scratchPosition1),
- ),
+ Cartesian3.abs(camera1.position, scratchPosition1)
+ )
);
const scalar = 1 / Math.max(1, maximumPositionComponent);
Cartesian3.multiplyByScalar(camera0.position, scalar, scratchPosition0);
@@ -186,7 +186,7 @@ function updateFrustums(view, scene, near, far) {
far = Math.min(far, camera.position.z + scene.nearToFarDistance2D);
near = Math.min(near, far);
numFrustums = Math.ceil(
- Math.max(1.0, far - near) / scene.nearToFarDistance2D,
+ Math.max(1.0, far - near) / scene.nearToFarDistance2D
);
} else {
// The multifrustum for 3D/CV is non-uniformly distributed.
@@ -202,7 +202,7 @@ function updateFrustums(view, scene, near, far) {
if (is2D) {
curNear = Math.min(
far - nearToFarDistance2D,
- near + m * nearToFarDistance2D,
+ near + m * nearToFarDistance2D
);
curFar = Math.min(far, curNear + nearToFarDistance2D);
} else {
@@ -213,7 +213,7 @@ function updateFrustums(view, scene, near, far) {
if (!defined(frustumCommands)) {
frustumCommands = frustumCommandsList[m] = new FrustumCommands(
curNear,
- curFar,
+ curFar
);
} else {
frustumCommands.near = curNear;
@@ -349,7 +349,7 @@ View.prototype.createPotentiallyVisibleSet = function (scene) {
const nearFarInterval = boundingVolume.computePlaneDistances(
positionWC,
directionWC,
- scratchNearFarInterval,
+ scratchNearFarInterval
);
commandNear = nearFarInterval.start;
commandFar = nearFarInterval.stop;
diff --git a/packages/engine/Source/Scene/VoxelBoxShape.js b/packages/engine/Source/Scene/VoxelBoxShape.js
index fb17d83cc36d..6cbe40f7e026 100644
--- a/packages/engine/Source/Scene/VoxelBoxShape.js
+++ b/packages/engine/Source/Scene/VoxelBoxShape.js
@@ -59,7 +59,7 @@ function VoxelBoxShape() {
*/
this._minBounds = Cartesian3.clone(
VoxelBoxShape.DefaultMinBounds,
- new Cartesian3(),
+ new Cartesian3()
);
/**
@@ -68,7 +68,7 @@ function VoxelBoxShape() {
*/
this._maxBounds = Cartesian3.clone(
VoxelBoxShape.DefaultMaxBounds,
- new Cartesian3(),
+ new Cartesian3()
);
/**
@@ -110,7 +110,7 @@ const scratchRenderMaxBounds = new Cartesian3();
const transformLocalToUv = Matrix4.fromRotationTranslation(
Matrix3.fromUniformScale(0.5, new Matrix3()),
new Cartesian3(0.5, 0.5, 0.5),
- new Matrix4(),
+ new Matrix4()
);
/**
@@ -128,7 +128,7 @@ VoxelBoxShape.prototype.update = function (
minBounds,
maxBounds,
clipMinBounds,
- clipMaxBounds,
+ clipMaxBounds
) {
clipMinBounds = defaultValue(clipMinBounds, VoxelBoxShape.DefaultMinBounds);
clipMaxBounds = defaultValue(clipMaxBounds, VoxelBoxShape.DefaultMaxBounds);
@@ -145,42 +145,42 @@ VoxelBoxShape.prototype.update = function (
minBounds,
defaultMinBounds,
defaultMaxBounds,
- this._minBounds,
+ this._minBounds
);
maxBounds = this._maxBounds = Cartesian3.clamp(
maxBounds,
defaultMinBounds,
defaultMaxBounds,
- this._maxBounds,
+ this._maxBounds
);
clipMinBounds = Cartesian3.clamp(
clipMinBounds,
defaultMinBounds,
defaultMaxBounds,
- scratchClipMinBounds,
+ scratchClipMinBounds
);
clipMaxBounds = Cartesian3.clamp(
clipMaxBounds,
defaultMinBounds,
defaultMaxBounds,
- scratchClipMaxBounds,
+ scratchClipMaxBounds
);
const renderMinBounds = Cartesian3.clamp(
minBounds,
clipMinBounds,
clipMaxBounds,
- scratchRenderMinBounds,
+ scratchRenderMinBounds
);
const renderMaxBounds = Cartesian3.clamp(
maxBounds,
clipMinBounds,
clipMaxBounds,
- scratchRenderMaxBounds,
+ scratchRenderMaxBounds
);
const scale = Matrix4.getScale(modelMatrix, scratchScale);
@@ -214,7 +214,7 @@ VoxelBoxShape.prototype.update = function (
renderMinBounds,
renderMaxBounds,
this.shapeTransform,
- this.orientedBoundingBox,
+ this.orientedBoundingBox
);
// All of the box bounds go from -1 to +1, so the model matrix scale can be
@@ -222,12 +222,12 @@ VoxelBoxShape.prototype.update = function (
this.boundTransform = Matrix4.fromRotationTranslation(
this.orientedBoundingBox.halfAxes,
this.orientedBoundingBox.center,
- this.boundTransform,
+ this.boundTransform
);
this.boundingSphere = BoundingSphere.fromOrientedBoundingBox(
this.orientedBoundingBox,
- this.boundingSphere,
+ this.boundingSphere
);
const { shaderUniforms, shaderDefines } = this;
@@ -252,12 +252,12 @@ VoxelBoxShape.prototype.update = function (
shaderUniforms.renderMinBounds = Matrix4.multiplyByPoint(
transformLocalToUv,
renderMinBounds,
- shaderUniforms.renderMinBounds,
+ shaderUniforms.renderMinBounds
);
shaderUniforms.renderMaxBounds = Matrix4.multiplyByPoint(
transformLocalToUv,
renderMaxBounds,
- shaderUniforms.renderMaxBounds,
+ shaderUniforms.renderMaxBounds
);
if (hasShapeBounds) {
@@ -280,14 +280,14 @@ VoxelBoxShape.prototype.update = function (
2.0 / (min.x === max.x ? 1.0 : max.x - min.x),
2.0 / (min.y === max.y ? 1.0 : max.y - min.y),
2.0 / (min.z === max.z ? 1.0 : max.z - min.z),
- shaderUniforms.boxUvToShapeUvScale,
+ shaderUniforms.boxUvToShapeUvScale
);
shaderUniforms.boxUvToShapeUvTranslate = Cartesian3.fromElements(
-shaderUniforms.boxUvToShapeUvScale.x * (min.x * 0.5 + 0.5),
-shaderUniforms.boxUvToShapeUvScale.y * (min.y * 0.5 + 0.5),
-shaderUniforms.boxUvToShapeUvScale.z * (min.z * 0.5 + 0.5),
- shaderUniforms.boxUvToShapeUvTranslate,
+ shaderUniforms.boxUvToShapeUvTranslate
);
}
@@ -315,7 +315,7 @@ VoxelBoxShape.prototype.computeOrientedBoundingBoxForTile = function (
tileX,
tileY,
tileZ,
- result,
+ result
) {
//>>includeStart('debug', pragmas.debug);
Check.typeOf.number("tileLevel", tileLevel);
@@ -333,21 +333,21 @@ VoxelBoxShape.prototype.computeOrientedBoundingBoxForTile = function (
CesiumMath.lerp(minBounds.x, maxBounds.x, sizeAtLevel * tileX),
CesiumMath.lerp(minBounds.y, maxBounds.y, sizeAtLevel * tileY),
CesiumMath.lerp(minBounds.z, maxBounds.z, sizeAtLevel * tileZ),
- scratchTileMinBounds,
+ scratchTileMinBounds
);
const tileMaxBounds = Cartesian3.fromElements(
CesiumMath.lerp(minBounds.x, maxBounds.x, sizeAtLevel * (tileX + 1)),
CesiumMath.lerp(minBounds.y, maxBounds.y, sizeAtLevel * (tileY + 1)),
CesiumMath.lerp(minBounds.z, maxBounds.z, sizeAtLevel * (tileZ + 1)),
- scratchTileMaxBounds,
+ scratchTileMaxBounds
);
return getBoxChunkObb(
tileMinBounds,
tileMaxBounds,
this.shapeTransform,
- result,
+ result
);
};
@@ -367,7 +367,7 @@ VoxelBoxShape.prototype.computeOrientedBoundingBoxForSample = function (
spatialNode,
tileDimensions,
tileUv,
- result,
+ result
) {
//>>includeStart('debug', pragmas.debug);
Check.typeOf.object("spatialNode", spatialNode);
@@ -380,12 +380,12 @@ VoxelBoxShape.prototype.computeOrientedBoundingBoxForSample = function (
const sampleSize = Cartesian3.divideComponents(
Cartesian3.ONE,
tileDimensions,
- sampleSizeScratch,
+ sampleSizeScratch
);
const sampleSizeAtLevel = Cartesian3.multiplyByScalar(
sampleSize,
tileSizeAtLevel,
- sampleSizeScratch,
+ sampleSizeScratch
);
const minLerp = Cartesian3.multiplyByScalar(
@@ -393,15 +393,15 @@ VoxelBoxShape.prototype.computeOrientedBoundingBoxForSample = function (
spatialNode.x + tileUv.x,
spatialNode.y + tileUv.y,
spatialNode.z + tileUv.z,
- scratchTileMinBounds,
+ scratchTileMinBounds
),
tileSizeAtLevel,
- scratchTileMinBounds,
+ scratchTileMinBounds
);
const maxLerp = Cartesian3.add(
minLerp,
sampleSizeAtLevel,
- scratchTileMaxBounds,
+ scratchTileMaxBounds
);
const minBounds = this._minBounds;
@@ -410,20 +410,20 @@ VoxelBoxShape.prototype.computeOrientedBoundingBoxForSample = function (
CesiumMath.lerp(minBounds.x, maxBounds.x, minLerp.x),
CesiumMath.lerp(minBounds.y, maxBounds.y, minLerp.y),
CesiumMath.lerp(minBounds.z, maxBounds.z, minLerp.z),
- scratchTileMinBounds,
+ scratchTileMinBounds
);
const sampleMaxBounds = Cartesian3.fromElements(
CesiumMath.lerp(minBounds.x, maxBounds.x, maxLerp.x),
CesiumMath.lerp(minBounds.y, maxBounds.y, maxLerp.y),
CesiumMath.lerp(minBounds.z, maxBounds.z, maxLerp.z),
- scratchTileMaxBounds,
+ scratchTileMaxBounds
);
return getBoxChunkObb(
sampleMinBounds,
sampleMaxBounds,
this.shapeTransform,
- result,
+ result
);
};
@@ -435,7 +435,7 @@ VoxelBoxShape.prototype.computeOrientedBoundingBoxForSample = function (
* @readonly
*/
VoxelBoxShape.DefaultMinBounds = Object.freeze(
- new Cartesian3(-1.0, -1.0, -1.0),
+ new Cartesian3(-1.0, -1.0, -1.0)
);
/**
@@ -446,7 +446,7 @@ VoxelBoxShape.DefaultMinBounds = Object.freeze(
* @readonly
*/
VoxelBoxShape.DefaultMaxBounds = Object.freeze(
- new Cartesian3(+1.0, +1.0, +1.0),
+ new Cartesian3(+1.0, +1.0, +1.0)
);
/**
@@ -478,14 +478,14 @@ function getBoxChunkObb(minimumBounds, maximumBounds, matrix, result) {
const localCenter = Cartesian3.midpoint(
minimumBounds,
maximumBounds,
- scratchCenter,
+ scratchCenter
);
result.center = Matrix4.multiplyByPoint(matrix, localCenter, result.center);
scale = Cartesian3.fromElements(
scale.x * 0.5 * (maximumBounds.x - minimumBounds.x),
scale.y * 0.5 * (maximumBounds.y - minimumBounds.y),
scale.z * 0.5 * (maximumBounds.z - minimumBounds.z),
- scratchScale,
+ scratchScale
);
const rotation = Matrix4.getRotation(matrix, scratchRotation);
result.halfAxes = Matrix3.setScale(rotation, scale, result.halfAxes);
diff --git a/packages/engine/Source/Scene/VoxelCell.js b/packages/engine/Source/Scene/VoxelCell.js
index b87d0e235bde..5880f71c0ac6 100644
--- a/packages/engine/Source/Scene/VoxelCell.js
+++ b/packages/engine/Source/Scene/VoxelCell.js
@@ -61,7 +61,7 @@ VoxelCell.fromKeyframeNode = function (
primitive,
tileIndex,
sampleIndex,
- keyframeNode,
+ keyframeNode
) {
//>>includeStart('debug', pragmas.debug);
Check.typeOf.object("primitive", primitive);
@@ -77,7 +77,7 @@ VoxelCell.fromKeyframeNode = function (
primitive,
spatialNode,
sampleIndex,
- voxelCell._orientedBoundingBox,
+ voxelCell._orientedBoundingBox
);
return voxelCell;
};
@@ -100,7 +100,7 @@ function getMetadataForSample(primitive, metadata, sampleIndex) {
const componentCount = MetadataType.getComponentCount(types[i]);
const samples = metadata[i].slice(
sampleIndex * componentCount,
- (sampleIndex + 1) * componentCount,
+ (sampleIndex + 1) * componentCount
);
metadataMap[name] = samples;
}
@@ -130,7 +130,7 @@ function getOrientedBoundingBox(primitive, spatialNode, sampleIndex, result) {
xIndex,
yIndex,
zIndex,
- tileCoordinateScratch,
+ tileCoordinateScratch
);
// Remove padding, and convert to a fraction in [0, 1], where the limits are
@@ -139,10 +139,10 @@ function getOrientedBoundingBox(primitive, spatialNode, sampleIndex, result) {
Cartesian3.subtract(
tileCoordinate,
primitive._paddingBefore,
- tileCoordinateScratch,
+ tileCoordinateScratch
),
primitive.dimensions,
- tileUvScratch,
+ tileUvScratch
);
const shape = primitive._shape;
@@ -150,7 +150,7 @@ function getOrientedBoundingBox(primitive, spatialNode, sampleIndex, result) {
spatialNode,
primitive.dimensions,
tileUv,
- result,
+ result
);
}
diff --git a/packages/engine/Source/Scene/VoxelContent.js b/packages/engine/Source/Scene/VoxelContent.js
index 451be03d2493..4d566c89d0d0 100644
--- a/packages/engine/Source/Scene/VoxelContent.js
+++ b/packages/engine/Source/Scene/VoxelContent.js
@@ -54,7 +54,7 @@ VoxelContent.fromJson = async function (
resource,
json,
binary,
- metadataSchema,
+ metadataSchema
) {
//>>includeStart('debug', pragmas.debug);
Check.typeOf.object("resource", resource);
diff --git a/packages/engine/Source/Scene/VoxelCylinderShape.js b/packages/engine/Source/Scene/VoxelCylinderShape.js
index 7418193bdfc9..eb158d9ccc96 100644
--- a/packages/engine/Source/Scene/VoxelCylinderShape.js
+++ b/packages/engine/Source/Scene/VoxelCylinderShape.js
@@ -155,15 +155,15 @@ VoxelCylinderShape.prototype.update = function (
minBounds,
maxBounds,
clipMinBounds,
- clipMaxBounds,
+ clipMaxBounds
) {
clipMinBounds = defaultValue(
clipMinBounds,
- VoxelCylinderShape.DefaultMinBounds,
+ VoxelCylinderShape.DefaultMinBounds
);
clipMaxBounds = defaultValue(
clipMaxBounds,
- VoxelCylinderShape.DefaultMaxBounds,
+ VoxelCylinderShape.DefaultMaxBounds
);
//>>includeStart('debug', pragmas.debug);
Check.typeOf.object("modelMatrix", modelMatrix);
@@ -188,22 +188,22 @@ VoxelCylinderShape.prototype.update = function (
const shapeMinRadius = CesiumMath.clamp(
minBounds.x,
defaultMinRadius,
- defaultMaxRadius,
+ defaultMaxRadius
);
const shapeMaxRadius = CesiumMath.clamp(
maxBounds.x,
defaultMinRadius,
- defaultMaxRadius,
+ defaultMaxRadius
);
const clipMinRadius = CesiumMath.clamp(
clipMinBounds.x,
defaultMinRadius,
- defaultMaxRadius,
+ defaultMaxRadius
);
const clipMaxRadius = CesiumMath.clamp(
clipMaxBounds.x,
defaultMinRadius,
- defaultMaxRadius,
+ defaultMaxRadius
);
const renderMinRadius = Math.max(shapeMinRadius, clipMinRadius);
const renderMaxRadius = Math.min(shapeMaxRadius, clipMaxRadius);
@@ -212,22 +212,22 @@ VoxelCylinderShape.prototype.update = function (
const shapeMinHeight = CesiumMath.clamp(
minBounds.y,
defaultMinHeight,
- defaultMaxHeight,
+ defaultMaxHeight
);
const shapeMaxHeight = CesiumMath.clamp(
maxBounds.y,
defaultMinHeight,
- defaultMaxHeight,
+ defaultMaxHeight
);
const clipMinHeight = CesiumMath.clamp(
clipMinBounds.y,
defaultMinHeight,
- defaultMaxHeight,
+ defaultMaxHeight
);
const clipMaxHeight = CesiumMath.clamp(
clipMaxBounds.y,
defaultMinHeight,
- defaultMaxHeight,
+ defaultMaxHeight
);
const renderMinHeight = Math.max(shapeMinHeight, clipMinHeight);
const renderMaxHeight = Math.min(shapeMaxHeight, clipMaxHeight);
@@ -278,18 +278,18 @@ VoxelCylinderShape.prototype.update = function (
renderMinAngle,
renderMaxAngle,
this.shapeTransform,
- this.orientedBoundingBox,
+ this.orientedBoundingBox
);
this.boundTransform = Matrix4.fromRotationTranslation(
this.orientedBoundingBox.halfAxes,
this.orientedBoundingBox.center,
- this.boundTransform,
+ this.boundTransform
);
this.boundingSphere = BoundingSphere.fromOrientedBoundingBox(
this.orientedBoundingBox,
- this.boundingSphere,
+ this.boundingSphere
);
const shapeIsDefaultMaxRadius = shapeMaxRadius === defaultMaxRadius;
@@ -315,13 +315,13 @@ VoxelCylinderShape.prototype.update = function (
shapeMinAngle,
defaultMinAngle,
undefined,
- epsilonAngleDiscontinuity,
+ epsilonAngleDiscontinuity
);
const shapeIsMaxAngleDiscontinuity = CesiumMath.equalsEpsilon(
shapeMaxAngle,
defaultMaxAngle,
undefined,
- epsilonAngleDiscontinuity,
+ epsilonAngleDiscontinuity
);
const renderIsDefaultMinRadius = renderMinRadius === defaultMinRadius;
@@ -361,7 +361,7 @@ VoxelCylinderShape.prototype.update = function (
shaderUniforms.cylinderRenderRadiusMinMax = Cartesian2.fromElements(
renderMinRadius,
renderMaxRadius,
- shaderUniforms.cylinderRenderRadiusMinMax,
+ shaderUniforms.cylinderRenderRadiusMinMax
);
if (renderMinRadius === renderMaxRadius) {
@@ -386,7 +386,7 @@ VoxelCylinderShape.prototype.update = function (
shaderUniforms.cylinderUvToShapeUvRadius = Cartesian2.fromElements(
scale,
offset,
- shaderUniforms.cylinderUvToShapeUvRadius,
+ shaderUniforms.cylinderUvToShapeUvRadius
);
}
@@ -414,13 +414,13 @@ VoxelCylinderShape.prototype.update = function (
shaderUniforms.cylinderUvToShapeUvHeight = Cartesian2.fromElements(
scale,
offset,
- shaderUniforms.cylinderUvToShapeUvHeight,
+ shaderUniforms.cylinderUvToShapeUvHeight
);
}
shaderUniforms.cylinderRenderHeightMinMax = Cartesian2.fromElements(
renderMinHeight,
renderMaxHeight,
- shaderUniforms.cylinderRenderHeightMinMax,
+ shaderUniforms.cylinderRenderHeightMinMax
);
if (shapeIsAngleReversed) {
@@ -445,7 +445,7 @@ VoxelCylinderShape.prototype.update = function (
shaderUniforms.cylinderRenderAngleMinMax = Cartesian2.fromElements(
renderMinAngle,
renderMaxAngle,
- shaderUniforms.cylinderRenderAngleMinMax,
+ shaderUniforms.cylinderRenderAngleMinMax
);
}
@@ -465,7 +465,7 @@ VoxelCylinderShape.prototype.update = function (
shaderUniforms.cylinderShapeUvAngleMinMax = Cartesian2.fromElements(
uvMinAngle,
uvMaxAngle,
- shaderUniforms.cylinderShapeUvAngleMinMax,
+ shaderUniforms.cylinderShapeUvAngleMinMax
);
shaderUniforms.cylinderShapeUvAngleRangeZeroMid =
(uvMaxAngle + 0.5 * uvAngleRangeZero) % 1.0;
@@ -483,7 +483,7 @@ VoxelCylinderShape.prototype.update = function (
shaderUniforms.cylinderUvToShapeUvAngle = Cartesian2.fromElements(
0.0,
1.0,
- shaderUniforms.cylinderUvToShapeUvAngle,
+ shaderUniforms.cylinderUvToShapeUvAngle
);
} else {
const scale = defaultAngleRange / shapeAngleRange;
@@ -491,7 +491,7 @@ VoxelCylinderShape.prototype.update = function (
shaderUniforms.cylinderUvToShapeUvAngle = Cartesian2.fromElements(
scale,
offset,
- shaderUniforms.cylinderUvToShapeUvAngle,
+ shaderUniforms.cylinderUvToShapeUvAngle
);
}
}
@@ -517,7 +517,7 @@ VoxelCylinderShape.prototype.computeOrientedBoundingBoxForTile = function (
tileX,
tileY,
tileZ,
- result,
+ result
) {
//>>includeStart('debug', pragmas.debug);
Check.typeOf.number("tileLevel", tileLevel);
@@ -539,32 +539,32 @@ VoxelCylinderShape.prototype.computeOrientedBoundingBoxForTile = function (
const radiusStart = CesiumMath.lerp(
minimumRadius,
maximumRadius,
- tileX * sizeAtLevel,
+ tileX * sizeAtLevel
);
const radiusEnd = CesiumMath.lerp(
minimumRadius,
maximumRadius,
- (tileX + 1) * sizeAtLevel,
+ (tileX + 1) * sizeAtLevel
);
const heightStart = CesiumMath.lerp(
minimumHeight,
maximumHeight,
- tileY * sizeAtLevel,
+ tileY * sizeAtLevel
);
const heightEnd = CesiumMath.lerp(
minimumHeight,
maximumHeight,
- (tileY + 1) * sizeAtLevel,
+ (tileY + 1) * sizeAtLevel
);
const angleStart = CesiumMath.lerp(
minimumAngle,
maximumAngle,
- tileZ * sizeAtLevel,
+ tileZ * sizeAtLevel
);
const angleEnd = CesiumMath.lerp(
minimumAngle,
maximumAngle,
- (tileZ + 1) * sizeAtLevel,
+ (tileZ + 1) * sizeAtLevel
);
return getCylinderChunkObb(
@@ -575,7 +575,7 @@ VoxelCylinderShape.prototype.computeOrientedBoundingBoxForTile = function (
angleStart,
angleEnd,
this.shapeTransform,
- result,
+ result
);
};
@@ -597,7 +597,7 @@ VoxelCylinderShape.prototype.computeOrientedBoundingBoxForSample = function (
spatialNode,
tileDimensions,
tileUv,
- result,
+ result
) {
//>>includeStart('debug', pragmas.debug);
Check.typeOf.object("spatialNode", spatialNode);
@@ -610,12 +610,12 @@ VoxelCylinderShape.prototype.computeOrientedBoundingBoxForSample = function (
const sampleSize = Cartesian3.divideComponents(
Cartesian3.ONE,
tileDimensions,
- sampleSizeScratch,
+ sampleSizeScratch
);
const sampleSizeAtLevel = Cartesian3.multiplyByScalar(
sampleSize,
tileSizeAtLevel,
- sampleSizeScratch,
+ sampleSizeScratch
);
const minLerp = Cartesian3.multiplyByScalar(
@@ -623,15 +623,15 @@ VoxelCylinderShape.prototype.computeOrientedBoundingBoxForSample = function (
spatialNode.x + tileUv.x,
spatialNode.y + tileUv.y,
spatialNode.z + tileUv.z,
- scratchTileMinBounds,
+ scratchTileMinBounds
),
tileSizeAtLevel,
- scratchTileMinBounds,
+ scratchTileMinBounds
);
const maxLerp = Cartesian3.add(
minLerp,
sampleSizeAtLevel,
- scratchTileMaxBounds,
+ scratchTileMaxBounds
);
const minimumRadius = this._minimumRadius;
@@ -656,7 +656,7 @@ VoxelCylinderShape.prototype.computeOrientedBoundingBoxForSample = function (
angleStart,
angleEnd,
this.shapeTransform,
- result,
+ result
);
};
@@ -670,7 +670,7 @@ VoxelCylinderShape.prototype.computeOrientedBoundingBoxForSample = function (
* @private
*/
VoxelCylinderShape.DefaultMinBounds = Object.freeze(
- new Cartesian3(0.0, -1.0, -CesiumMath.PI),
+ new Cartesian3(0.0, -1.0, -CesiumMath.PI)
);
/**
@@ -683,7 +683,7 @@ VoxelCylinderShape.DefaultMinBounds = Object.freeze(
* @private
*/
VoxelCylinderShape.DefaultMaxBounds = Object.freeze(
- new Cartesian3(1.0, +1.0, +CesiumMath.PI),
+ new Cartesian3(1.0, +1.0, +CesiumMath.PI)
);
const maxTestAngles = 5;
@@ -762,7 +762,7 @@ function getCylinderChunkObb(
angleStart,
angleEnd,
matrix,
- result,
+ result
) {
const defaultMinBounds = VoxelCylinderShape.DefaultMinBounds;
const defaultMaxBounds = VoxelCylinderShape.DefaultMaxBounds;
@@ -845,7 +845,7 @@ function getCylinderChunkObb(
centerX,
centerY,
centerZ,
- scratchTranslation,
+ scratchTranslation
);
const rotation = Matrix3.fromRotationZ(angleMid, scratchRotation);
@@ -854,14 +854,14 @@ function getCylinderChunkObb(
extentX,
extentY,
extentZ,
- scratchScale,
+ scratchScale
);
const scaleMatrix = Matrix4.fromScale(scale, scratchScaleMatrix);
const rotationMatrix = Matrix4.fromRotation(rotation, scratchRotationMatrix);
const translationMatrix = Matrix4.fromTranslation(
translation,
- scratchTranslationMatrix,
+ scratchTranslationMatrix
);
// Shape space matrix = R * T * S
@@ -870,15 +870,15 @@ function getCylinderChunkObb(
Matrix4.multiplyTransformation(
translationMatrix,
scaleMatrix,
- scratchMatrix,
+ scratchMatrix
),
- scratchMatrix,
+ scratchMatrix
);
const globalMatrix = Matrix4.multiplyTransformation(
matrix,
localMatrix,
- scratchMatrix,
+ scratchMatrix
);
if (!isValidOrientedBoundingBoxTransformation(globalMatrix)) {
diff --git a/packages/engine/Source/Scene/VoxelEllipsoidShape.js b/packages/engine/Source/Scene/VoxelEllipsoidShape.js
index efa1fac04658..52cc0e1523b8 100644
--- a/packages/engine/Source/Scene/VoxelEllipsoidShape.js
+++ b/packages/engine/Source/Scene/VoxelEllipsoidShape.js
@@ -170,7 +170,7 @@ VoxelEllipsoidShape.prototype.update = function (
minBounds,
maxBounds,
clipMinBounds,
- clipMaxBounds,
+ clipMaxBounds
) {
const { DefaultMinBounds, DefaultMaxBounds } = VoxelEllipsoidShape;
clipMinBounds = defaultValue(clipMinBounds, DefaultMinBounds);
@@ -191,7 +191,7 @@ VoxelEllipsoidShape.prototype.update = function (
const radii = Matrix4.getScale(modelMatrix, scratchScale);
const actualMinBounds = Cartesian3.clone(
DefaultMinBounds,
- scratchActualMinBounds,
+ scratchActualMinBounds
);
actualMinBounds.z = -Cartesian3.minimumComponent(radii);
@@ -199,35 +199,35 @@ VoxelEllipsoidShape.prototype.update = function (
minBounds,
actualMinBounds,
DefaultMaxBounds,
- scratchShapeMinBounds,
+ scratchShapeMinBounds
);
const shapeMaxBounds = Cartesian3.clamp(
maxBounds,
actualMinBounds,
DefaultMaxBounds,
- scratchShapeMaxBounds,
+ scratchShapeMaxBounds
);
const clampedClipMinBounds = Cartesian3.clamp(
clipMinBounds,
actualMinBounds,
DefaultMaxBounds,
- scratchClipMinBounds,
+ scratchClipMinBounds
);
const clampedClipMaxBounds = Cartesian3.clamp(
clipMaxBounds,
actualMinBounds,
DefaultMaxBounds,
- scratchClipMaxBounds,
+ scratchClipMaxBounds
);
const renderMinBounds = Cartesian3.maximumByComponent(
shapeMinBounds,
clampedClipMinBounds,
- scratchRenderMinBounds,
+ scratchRenderMinBounds
);
const renderMaxBounds = Cartesian3.minimumByComponent(
shapeMaxBounds,
clampedClipMaxBounds,
- scratchRenderMaxBounds,
+ scratchRenderMaxBounds
);
// Compute the farthest a point can be from the center of the ellipsoid.
@@ -237,9 +237,9 @@ VoxelEllipsoidShape.prototype.update = function (
shapeMaxBounds.z,
shapeMaxBounds.z,
shapeMaxBounds.z,
- scratchShapeOuterExtent,
+ scratchShapeOuterExtent
),
- scratchShapeOuterExtent,
+ scratchShapeOuterExtent
);
const shapeMaxExtent = Cartesian3.maximumComponent(shapeOuterExtent);
@@ -249,9 +249,9 @@ VoxelEllipsoidShape.prototype.update = function (
renderMaxBounds.z,
renderMaxBounds.z,
renderMaxBounds.z,
- scratchRenderOuterExtent,
+ scratchRenderOuterExtent
),
- scratchRenderOuterExtent,
+ scratchRenderOuterExtent
);
// Exit early if the shape is not visible.
@@ -265,7 +265,7 @@ VoxelEllipsoidShape.prototype.update = function (
renderOuterExtent,
Cartesian3.ZERO,
undefined,
- epsilonZeroScale,
+ epsilonZeroScale
)
) {
return false;
@@ -275,7 +275,7 @@ VoxelEllipsoidShape.prototype.update = function (
shapeMinBounds.x,
shapeMinBounds.y,
shapeMaxBounds.x,
- shapeMaxBounds.y,
+ shapeMaxBounds.y
);
this._translation = Matrix4.getTranslation(modelMatrix, this._translation);
this._rotation = Matrix4.getRotation(modelMatrix, this._rotation);
@@ -288,7 +288,7 @@ VoxelEllipsoidShape.prototype.update = function (
renderMinBounds.y,
renderMaxBounds.x,
renderMaxBounds.y,
- scratchRenderRectangle,
+ scratchRenderRectangle
);
this.orientedBoundingBox = getEllipsoidChunkObb(
@@ -298,24 +298,24 @@ VoxelEllipsoidShape.prototype.update = function (
this._ellipsoid,
this._translation,
this._rotation,
- this.orientedBoundingBox,
+ this.orientedBoundingBox
);
this.shapeTransform = Matrix4.fromRotationTranslation(
Matrix3.setScale(this._rotation, shapeOuterExtent, scratchRotationScale),
this._translation,
- this.shapeTransform,
+ this.shapeTransform
);
this.boundTransform = Matrix4.fromRotationTranslation(
this.orientedBoundingBox.halfAxes,
this.orientedBoundingBox.center,
- this.boundTransform,
+ this.boundTransform
);
this.boundingSphere = BoundingSphere.fromOrientedBoundingBox(
this.orientedBoundingBox,
- this.boundingSphere,
+ this.boundingSphere
);
// Longitude
@@ -419,7 +419,7 @@ VoxelEllipsoidShape.prototype.update = function (
shaderUniforms.ellipsoidRadiiUv = Cartesian3.divideByScalar(
shapeOuterExtent,
shapeMaxExtent,
- shaderUniforms.ellipsoidRadiiUv,
+ shaderUniforms.ellipsoidRadiiUv
);
const { x: radiiUvX, z: radiiUvZ } = shaderUniforms.ellipsoidRadiiUv;
const axisRatio = radiiUvZ / radiiUvX;
@@ -427,7 +427,7 @@ VoxelEllipsoidShape.prototype.update = function (
shaderUniforms.evoluteScale = Cartesian2.fromElements(
(radiiUvX * radiiUvX - radiiUvZ * radiiUvZ) / radiiUvX,
(radiiUvZ * radiiUvZ - radiiUvX * radiiUvX) / radiiUvZ,
- shaderUniforms.evoluteScale,
+ shaderUniforms.evoluteScale
);
// Used to compute geodetic surface normal.
@@ -436,9 +436,9 @@ VoxelEllipsoidShape.prototype.update = function (
Cartesian3.multiplyComponents(
shaderUniforms.ellipsoidRadiiUv,
shaderUniforms.ellipsoidRadiiUv,
- shaderUniforms.ellipsoidInverseRadiiSquaredUv,
+ shaderUniforms.ellipsoidInverseRadiiSquaredUv
),
- shaderUniforms.ellipsoidInverseRadiiSquaredUv,
+ shaderUniforms.ellipsoidInverseRadiiSquaredUv
);
// Keep track of how many intersections there are going to be.
@@ -453,7 +453,7 @@ VoxelEllipsoidShape.prototype.update = function (
shaderUniforms.clipMinMaxHeight = Cartesian2.fromElements(
(renderMinBounds.z - shapeMaxBounds.z) / shapeMaxExtent,
(renderMaxBounds.z - shapeMaxBounds.z) / shapeMaxExtent,
- shaderUniforms.clipMinMaxHeight,
+ shaderUniforms.clipMinMaxHeight
);
// The percent of space that is between the inner and outer ellipsoid.
@@ -469,23 +469,26 @@ VoxelEllipsoidShape.prototype.update = function (
shaderDefines["ELLIPSOID_INTERSECTION_INDEX_LONGITUDE"] = intersectionCount;
if (renderIsLongitudeRangeUnderHalf) {
- shaderDefines["ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF"] =
- true;
+ shaderDefines[
+ "ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF"
+ ] = true;
intersectionCount += 1;
} else if (renderIsLongitudeRangeOverHalf) {
- shaderDefines["ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF"] =
- true;
+ shaderDefines[
+ "ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF"
+ ] = true;
intersectionCount += 2;
} else if (renderIsLongitudeRangeZero) {
- shaderDefines["ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO"] =
- true;
+ shaderDefines[
+ "ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO"
+ ] = true;
intersectionCount += 2;
}
shaderUniforms.ellipsoidRenderLongitudeMinMax = Cartesian2.fromElements(
renderMinBounds.x,
renderMaxBounds.x,
- shaderUniforms.ellipsoidRenderLongitudeMinMax,
+ shaderUniforms.ellipsoidRenderLongitudeMinMax
);
}
@@ -495,8 +498,9 @@ VoxelEllipsoidShape.prototype.update = function (
const shapeIsLongitudeReversed = shapeMaxBounds.x < shapeMinBounds.x;
if (shapeIsLongitudeReversed) {
- shaderDefines["ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED"] =
- true;
+ shaderDefines[
+ "ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED"
+ ] = true;
}
// delerp(longitudeUv, minLongitudeUv, maxLongitudeUv)
@@ -512,7 +516,7 @@ VoxelEllipsoidShape.prototype.update = function (
shaderUniforms.ellipsoidUvToShapeUvLongitude = Cartesian2.fromElements(
0.0,
1.0,
- shaderUniforms.ellipsoidUvToShapeUvLongitude,
+ shaderUniforms.ellipsoidUvToShapeUvLongitude
);
} else {
const scale = defaultLongitudeRange / shapeLongitudeRange;
@@ -521,7 +525,7 @@ VoxelEllipsoidShape.prototype.update = function (
shaderUniforms.ellipsoidUvToShapeUvLongitude = Cartesian2.fromElements(
scale,
offset,
- shaderUniforms.ellipsoidUvToShapeUvLongitude,
+ shaderUniforms.ellipsoidUvToShapeUvLongitude
);
}
}
@@ -531,22 +535,24 @@ VoxelEllipsoidShape.prototype.update = function (
renderMinBounds.x,
DefaultMinBounds.x,
undefined,
- epsilonLongitudeDiscontinuity,
+ epsilonLongitudeDiscontinuity
);
const renderIsMaxLongitudeDiscontinuity = CesiumMath.equalsEpsilon(
renderMaxBounds.x,
DefaultMaxBounds.x,
undefined,
- epsilonLongitudeDiscontinuity,
+ epsilonLongitudeDiscontinuity
);
if (renderIsMinLongitudeDiscontinuity) {
- shaderDefines["ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY"] =
- true;
+ shaderDefines[
+ "ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY"
+ ] = true;
}
if (renderIsMaxLongitudeDiscontinuity) {
- shaderDefines["ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY"] =
- true;
+ shaderDefines[
+ "ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY"
+ ] = true;
}
const uvShapeMinLongitude =
(shapeMinBounds.x - DefaultMinBounds.x) / defaultLongitudeRange;
@@ -564,7 +570,7 @@ VoxelEllipsoidShape.prototype.update = function (
uvShapeMinLongitude,
uvShapeMaxLongitude,
uvRenderLongitudeRangeZeroMid,
- shaderUniforms.ellipsoidShapeUvLongitudeMinMaxMid,
+ shaderUniforms.ellipsoidShapeUvLongitudeMinMaxMid
);
}
@@ -572,20 +578,24 @@ VoxelEllipsoidShape.prototype.update = function (
// Intersects a cone for min latitude
if (renderHasLatitudeMin) {
shaderDefines["ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN"] = true;
- shaderDefines["ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN"] =
- intersectionCount;
+ shaderDefines[
+ "ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN"
+ ] = intersectionCount;
if (renderIsLatitudeMinUnderHalf) {
- shaderDefines["ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF"] =
- true;
+ shaderDefines[
+ "ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF"
+ ] = true;
intersectionCount += 1;
} else if (renderIsLatitudeMinHalf) {
- shaderDefines["ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF"] =
- true;
+ shaderDefines[
+ "ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF"
+ ] = true;
intersectionCount += 1;
} else if (renderIsLatitudeMinOverHalf) {
- shaderDefines["ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF"] =
- true;
+ shaderDefines[
+ "ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF"
+ ] = true;
intersectionCount += 2;
}
}
@@ -593,20 +603,24 @@ VoxelEllipsoidShape.prototype.update = function (
// Intersects a cone for max latitude
if (renderHasLatitudeMax) {
shaderDefines["ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX"] = true;
- shaderDefines["ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX"] =
- intersectionCount;
+ shaderDefines[
+ "ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX"
+ ] = intersectionCount;
if (renderIsLatitudeMaxUnderHalf) {
- shaderDefines["ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF"] =
- true;
+ shaderDefines[
+ "ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF"
+ ] = true;
intersectionCount += 2;
} else if (renderIsLatitudeMaxHalf) {
- shaderDefines["ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF"] =
- true;
+ shaderDefines[
+ "ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF"
+ ] = true;
intersectionCount += 1;
} else if (renderIsLatitudeMaxOverHalf) {
- shaderDefines["ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF"] =
- true;
+ shaderDefines[
+ "ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF"
+ ] = true;
intersectionCount += 1;
}
}
@@ -614,7 +628,7 @@ VoxelEllipsoidShape.prototype.update = function (
shaderUniforms.ellipsoidRenderLatitudeSinMinMax = Cartesian2.fromElements(
Math.sin(renderMinBounds.y),
Math.sin(renderMaxBounds.y),
- shaderUniforms.ellipsoidRenderLatitudeSinMinMax,
+ shaderUniforms.ellipsoidRenderLatitudeSinMinMax
);
}
@@ -635,7 +649,7 @@ VoxelEllipsoidShape.prototype.update = function (
shaderUniforms.ellipsoidUvToShapeUvLatitude = Cartesian2.fromElements(
0.0,
1.0,
- shaderUniforms.ellipsoidUvToShapeUvLatitude,
+ shaderUniforms.ellipsoidUvToShapeUvLatitude
);
} else {
const defaultLatitudeRange = DefaultMaxBounds.y - DefaultMinBounds.y;
@@ -645,7 +659,7 @@ VoxelEllipsoidShape.prototype.update = function (
shaderUniforms.ellipsoidUvToShapeUvLatitude = Cartesian2.fromElements(
scale,
offset,
- shaderUniforms.ellipsoidUvToShapeUvLatitude,
+ shaderUniforms.ellipsoidUvToShapeUvLatitude
);
}
}
@@ -673,7 +687,7 @@ VoxelEllipsoidShape.prototype.computeOrientedBoundingBoxForTile = function (
tileX,
tileY,
tileZ,
- result,
+ result
) {
//>>includeStart('debug', pragmas.debug);
Check.typeOf.number("tileLevel", tileLevel);
@@ -697,19 +711,19 @@ VoxelEllipsoidShape.prototype.computeOrientedBoundingBoxForTile = function (
minLatitudeLerp,
maxLongitudeLerp,
maxLatitudeLerp,
- scratchRectangle,
+ scratchRectangle
);
const minHeight = CesiumMath.lerp(
this._minimumHeight,
this._maximumHeight,
- minHeightLerp,
+ minHeightLerp
);
const maxHeight = CesiumMath.lerp(
this._minimumHeight,
this._maximumHeight,
- maxHeightLerp,
+ maxHeightLerp
);
return getEllipsoidChunkObb(
@@ -719,7 +733,7 @@ VoxelEllipsoidShape.prototype.computeOrientedBoundingBoxForTile = function (
this._ellipsoid,
this._translation,
this._rotation,
- result,
+ result
);
};
@@ -741,7 +755,7 @@ VoxelEllipsoidShape.prototype.computeOrientedBoundingBoxForSample = function (
spatialNode,
tileDimensions,
tileUv,
- result,
+ result
) {
//>>includeStart('debug', pragmas.debug);
Check.typeOf.object("spatialNode", spatialNode);
@@ -754,12 +768,12 @@ VoxelEllipsoidShape.prototype.computeOrientedBoundingBoxForSample = function (
const sampleSize = Cartesian3.divideComponents(
Cartesian3.ONE,
tileDimensions,
- sampleSizeScratch,
+ sampleSizeScratch
);
const sampleSizeAtLevel = Cartesian3.multiplyByScalar(
sampleSize,
tileSizeAtLevel,
- sampleSizeScratch,
+ sampleSizeScratch
);
const minLerp = Cartesian3.multiplyByScalar(
@@ -767,15 +781,15 @@ VoxelEllipsoidShape.prototype.computeOrientedBoundingBoxForSample = function (
spatialNode.x + tileUv.x,
spatialNode.y + tileUv.y,
spatialNode.z + tileUv.z,
- scratchTileMinBounds,
+ scratchTileMinBounds
),
tileSizeAtLevel,
- scratchTileMinBounds,
+ scratchTileMinBounds
);
const maxLerp = Cartesian3.add(
minLerp,
sampleSizeAtLevel,
- scratchTileMaxBounds,
+ scratchTileMaxBounds
);
const rectangle = Rectangle.subsection(
@@ -784,17 +798,17 @@ VoxelEllipsoidShape.prototype.computeOrientedBoundingBoxForSample = function (
minLerp.y,
maxLerp.x,
maxLerp.y,
- scratchRectangle,
+ scratchRectangle
);
const minHeight = CesiumMath.lerp(
this._minimumHeight,
this._maximumHeight,
- minLerp.z,
+ minLerp.z
);
const maxHeight = CesiumMath.lerp(
this._minimumHeight,
this._maximumHeight,
- maxLerp.z,
+ maxLerp.z
);
return getEllipsoidChunkObb(
@@ -804,7 +818,7 @@ VoxelEllipsoidShape.prototype.computeOrientedBoundingBoxForSample = function (
this._ellipsoid,
this._translation,
this._rotation,
- result,
+ result
);
};
@@ -831,20 +845,20 @@ function getEllipsoidChunkObb(
ellipsoid,
translation,
rotation,
- result,
+ result
) {
result = OrientedBoundingBox.fromRectangle(
rectangle,
minHeight,
maxHeight,
ellipsoid,
- result,
+ result
);
result.center = Cartesian3.add(result.center, translation, result.center);
result.halfAxes = Matrix3.multiply(
result.halfAxes,
rotation,
- result.halfAxes,
+ result.halfAxes
);
return result;
}
@@ -860,8 +874,8 @@ VoxelEllipsoidShape.DefaultMinBounds = Object.freeze(
new Cartesian3(
-CesiumMath.PI,
-CesiumMath.PI_OVER_TWO,
- -Ellipsoid.WGS84.minimumRadius,
- ),
+ -Ellipsoid.WGS84.minimumRadius
+ )
);
/**
@@ -875,8 +889,8 @@ VoxelEllipsoidShape.DefaultMaxBounds = Object.freeze(
new Cartesian3(
CesiumMath.PI,
CesiumMath.PI_OVER_TWO,
- 10.0 * Ellipsoid.WGS84.maximumRadius,
- ),
+ 10.0 * Ellipsoid.WGS84.maximumRadius
+ )
);
export default VoxelEllipsoidShape;
diff --git a/packages/engine/Source/Scene/VoxelPrimitive.js b/packages/engine/Source/Scene/VoxelPrimitive.js
index 0942fbb817a4..8a83c3ea2512 100644
--- a/packages/engine/Source/Scene/VoxelPrimitive.js
+++ b/packages/engine/Source/Scene/VoxelPrimitive.js
@@ -59,7 +59,7 @@ function VoxelPrimitive(options) {
*/
this._provider = defaultValue(
options.provider,
- VoxelPrimitive.DefaultProvider,
+ VoxelPrimitive.DefaultProvider
);
/**
@@ -231,7 +231,7 @@ function VoxelPrimitive(options) {
* @private
*/
this._modelMatrix = Matrix4.clone(
- defaultValue(options.modelMatrix, Matrix4.IDENTITY),
+ defaultValue(options.modelMatrix, Matrix4.IDENTITY)
);
/**
@@ -266,7 +266,7 @@ function VoxelPrimitive(options) {
*/
this._customShader = defaultValue(
options.customShader,
- VoxelPrimitive.DefaultCustomShader,
+ VoxelPrimitive.DefaultCustomShader
);
/**
@@ -471,15 +471,15 @@ function initialize(primitive, provider) {
// Initialize the exaggerated versions of bounds and model matrix
primitive._exaggeratedMinBounds = Cartesian3.clone(
primitive._minBounds,
- primitive._exaggeratedMinBounds,
+ primitive._exaggeratedMinBounds
);
primitive._exaggeratedMaxBounds = Cartesian3.clone(
primitive._maxBounds,
- primitive._exaggeratedMaxBounds,
+ primitive._exaggeratedMaxBounds
);
primitive._exaggeratedModelMatrix = Matrix4.clone(
primitive._modelMatrix,
- primitive._exaggeratedModelMatrix,
+ primitive._exaggeratedModelMatrix
);
checkTransformAndBounds(primitive, provider);
@@ -490,7 +490,7 @@ function initialize(primitive, provider) {
primitive._shapeVisible = updateShapeAndTransforms(
primitive,
primitive._shape,
- provider,
+ provider
);
}
@@ -843,7 +843,7 @@ Object.defineProperties(VoxelPrimitive.prototype, {
this._minClippingBounds = Cartesian3.clone(
minClippingBounds,
- this._minClippingBounds,
+ this._minClippingBounds
);
},
},
@@ -866,7 +866,7 @@ Object.defineProperties(VoxelPrimitive.prototype, {
this._maxClippingBounds = Cartesian3.clone(
maxClippingBounds,
- this._maxClippingBounds,
+ this._maxClippingBounds
);
},
},
@@ -951,12 +951,12 @@ const scratchTransformPositionLocalToProjection = new Matrix4();
const transformPositionLocalToUv = Matrix4.fromRotationTranslation(
Matrix3.fromUniformScale(0.5, new Matrix3()),
new Cartesian3(0.5, 0.5, 0.5),
- new Matrix4(),
+ new Matrix4()
);
const transformPositionUvToLocal = Matrix4.fromRotationTranslation(
Matrix3.fromUniformScale(2.0, new Matrix3()),
new Cartesian3(-1.0, -1.0, -1.0),
- new Matrix4(),
+ new Matrix4()
);
/**
@@ -1006,7 +1006,7 @@ VoxelPrimitive.prototype.update = function (frameState) {
// Update the traversal and prepare for rendering.
const keyframeLocation = getKeyframeLocation(
provider.timeIntervalCollection,
- this._clock,
+ this._clock
);
const traversal = this._traversal;
@@ -1016,7 +1016,7 @@ VoxelPrimitive.prototype.update = function (frameState) {
frameState,
keyframeLocation,
shapeDirty, // recomputeBoundingVolumes
- this._disableUpdate, // pauseUpdate
+ this._disableUpdate // pauseUpdate
);
if (sampleCountOld !== traversal._sampleCount) {
@@ -1055,7 +1055,7 @@ VoxelPrimitive.prototype.update = function (frameState) {
uniforms.octreeLeafNodeTexture = traversal.leafNodeTexture;
uniforms.octreeLeafNodeTexelSizeUv = Cartesian2.clone(
traversal.leafNodeTexelSizeUv,
- uniforms.octreeLeafNodeTexelSizeUv,
+ uniforms.octreeLeafNodeTexelSizeUv
);
uniforms.octreeLeafNodeTilesPerRow = traversal.leafNodeTilesPerRow;
}
@@ -1073,7 +1073,7 @@ VoxelPrimitive.prototype.update = function (frameState) {
const ndcAabb = orientedBoundingBoxToNdcAabb(
orientedBoundingBox,
transformPositionWorldToProjection,
- scratchNdcAabb,
+ scratchNdcAabb
);
// If the object is offscreen, don't render it.
@@ -1090,36 +1090,36 @@ VoxelPrimitive.prototype.update = function (frameState) {
// Using a uniform instead of going through RenderState's scissor because the viewport is not accessible here, and the scissor command needs pixel coordinates.
uniforms.ndcSpaceAxisAlignedBoundingBox = Cartesian4.clone(
ndcAabb,
- uniforms.ndcSpaceAxisAlignedBoundingBox,
+ uniforms.ndcSpaceAxisAlignedBoundingBox
);
const transformPositionViewToWorld = context.uniformState.inverseView;
uniforms.transformPositionViewToUv = Matrix4.multiplyTransformation(
this._transformPositionWorldToUv,
transformPositionViewToWorld,
- uniforms.transformPositionViewToUv,
+ uniforms.transformPositionViewToUv
);
const transformPositionWorldToView = context.uniformState.view;
uniforms.transformPositionUvToView = Matrix4.multiplyTransformation(
transformPositionWorldToView,
this._transformPositionUvToWorld,
- uniforms.transformPositionUvToView,
+ uniforms.transformPositionUvToView
);
const transformDirectionViewToWorld =
context.uniformState.inverseViewRotation;
uniforms.transformDirectionViewToLocal = Matrix3.multiply(
this._transformDirectionWorldToLocal,
transformDirectionViewToWorld,
- uniforms.transformDirectionViewToLocal,
+ uniforms.transformDirectionViewToLocal
);
uniforms.transformNormalLocalToWorld = Matrix3.clone(
this._transformNormalLocalToWorld,
- uniforms.transformNormalLocalToWorld,
+ uniforms.transformNormalLocalToWorld
);
const cameraPositionWorld = frameState.camera.positionWC;
uniforms.cameraPositionUv = Matrix4.multiplyByPoint(
this._transformPositionWorldToUv,
cameraPositionWorld,
- uniforms.cameraPositionUv,
+ uniforms.cameraPositionUv
);
uniforms.stepSize = this._stepSizeMultiplier;
@@ -1127,8 +1127,8 @@ VoxelPrimitive.prototype.update = function (frameState) {
const command = frameState.passes.pick
? this._drawCommandPick
: frameState.passes.pickVoxel
- ? this._drawCommandPickVoxel
- : this._drawCommand;
+ ? this._drawCommandPickVoxel
+ : this._drawCommand;
command.boundingVolume = shape.boundingSphere;
frameState.commandList.push(command);
};
@@ -1148,11 +1148,11 @@ const scratchExaggerationTranslation = new Cartesian3();
function updateVerticalExaggeration(primitive, frameState) {
primitive._exaggeratedMinBounds = Cartesian3.clone(
primitive._minBounds,
- primitive._exaggeratedMinBounds,
+ primitive._exaggeratedMinBounds
);
primitive._exaggeratedMaxBounds = Cartesian3.clone(
primitive._maxBounds,
- primitive._exaggeratedMaxBounds,
+ primitive._exaggeratedMaxBounds
);
if (primitive.shape === VoxelShapeType.ELLIPSOID) {
@@ -1169,17 +1169,17 @@ function updateVerticalExaggeration(primitive, frameState) {
1.0,
1.0,
frameState.verticalExaggeration,
- scratchExaggerationScale,
+ scratchExaggerationScale
);
primitive._exaggeratedModelMatrix = Matrix4.multiplyByScale(
primitive._modelMatrix,
exaggerationScale,
- primitive._exaggeratedModelMatrix,
+ primitive._exaggeratedModelMatrix
);
primitive._exaggeratedModelMatrix = Matrix4.multiplyByTranslation(
primitive._exaggeratedModelMatrix,
computeBoxExaggerationTranslation(primitive, frameState),
- primitive._exaggeratedModelMatrix,
+ primitive._exaggeratedModelMatrix
);
}
}
@@ -1194,24 +1194,24 @@ function computeBoxExaggerationTranslation(primitive, frameState) {
// Find the Cartesian position of the center of the OBB
const initialCenter = Matrix4.getTranslation(
shapeTransform,
- scratchExaggerationCenter,
+ scratchExaggerationCenter
);
const intermediateCenter = Matrix4.multiplyByPoint(
primitive._modelMatrix,
initialCenter,
- scratchExaggerationCenter,
+ scratchExaggerationCenter
);
const transformedCenter = Matrix4.multiplyByPoint(
globalTransform,
intermediateCenter,
- scratchExaggerationCenter,
+ scratchExaggerationCenter
);
// Find the cartographic height
const ellipsoid = Ellipsoid.WGS84;
const centerCartographic = ellipsoid.cartesianToCartographic(
transformedCenter,
- scratchCartographicCenter,
+ scratchCartographicCenter
);
let centerHeight = 0.0;
@@ -1224,14 +1224,14 @@ function computeBoxExaggerationTranslation(primitive, frameState) {
const exaggeratedHeight = VerticalExaggeration.getHeight(
centerHeight,
frameState.verticalExaggeration,
- frameState.verticalExaggerationRelativeHeight,
+ frameState.verticalExaggerationRelativeHeight
);
return Cartesian3.fromElements(
0.0,
0.0,
(exaggeratedHeight - centerHeight) / frameState.verticalExaggeration,
- scratchExaggerationTranslation,
+ scratchExaggerationTranslation
);
}
@@ -1260,7 +1260,7 @@ function initFromProvider(primitive, provider, context) {
//>>includeStart('debug', pragmas.debug);
if (defined(uniformMap[name])) {
oneTimeWarning(
- `VoxelPrimitive: Uniform name "${name}" is already defined`,
+ `VoxelPrimitive: Uniform name "${name}" is already defined`
);
}
//>>includeEnd('debug');
@@ -1275,23 +1275,23 @@ function initFromProvider(primitive, provider, context) {
// Note that minBounds and maxBounds can be set dynamically, so their uniforms aren't set here.
uniforms.dimensions = Cartesian3.clone(
provider.dimensions,
- uniforms.dimensions,
+ uniforms.dimensions
);
primitive._paddingBefore = Cartesian3.clone(
defaultValue(provider.paddingBefore, Cartesian3.ZERO),
- primitive._paddingBefore,
+ primitive._paddingBefore
);
uniforms.paddingBefore = Cartesian3.clone(
primitive._paddingBefore,
- uniforms.paddingBefore,
+ uniforms.paddingBefore
);
primitive._paddingAfter = Cartesian3.clone(
defaultValue(provider.paddingAfter, Cartesian3.ZERO),
- primitive._paddingBefore,
+ primitive._paddingBefore
);
uniforms.paddingAfter = Cartesian3.clone(
primitive._paddingAfter,
- uniforms.paddingAfter,
+ uniforms.paddingAfter
);
// Create the VoxelTraversal, and set related uniforms
@@ -1309,23 +1309,23 @@ function initFromProvider(primitive, provider, context) {
function checkTransformAndBounds(primitive, provider) {
const shapeTransform = defaultValue(
provider.shapeTransform,
- Matrix4.IDENTITY,
+ Matrix4.IDENTITY
);
const globalTransform = defaultValue(
provider.globalTransform,
- Matrix4.IDENTITY,
+ Matrix4.IDENTITY
);
// Compound model matrix = global transform * model matrix * shape transform
Matrix4.multiplyTransformation(
globalTransform,
primitive._exaggeratedModelMatrix,
- primitive._compoundModelMatrix,
+ primitive._compoundModelMatrix
);
Matrix4.multiplyTransformation(
primitive._compoundModelMatrix,
shapeTransform,
- primitive._compoundModelMatrix,
+ primitive._compoundModelMatrix
);
const numChanges =
updateBound(primitive, "_compoundModelMatrix", "_compoundModelMatrixOld") +
@@ -1334,12 +1334,12 @@ function checkTransformAndBounds(primitive, provider) {
updateBound(
primitive,
"_exaggeratedMinBounds",
- "_exaggeratedMinBoundsOld",
+ "_exaggeratedMinBoundsOld"
) +
updateBound(
primitive,
"_exaggeratedMaxBounds",
- "_exaggeratedMaxBoundsOld",
+ "_exaggeratedMaxBoundsOld"
) +
updateBound(primitive, "_minClippingBounds", "_minClippingBoundsOld") +
updateBound(primitive, "_maxClippingBounds", "_maxClippingBoundsOld");
@@ -1380,7 +1380,7 @@ function updateShapeAndTransforms(primitive, shape, provider) {
primitive._exaggeratedMinBounds,
primitive._exaggeratedMaxBounds,
primitive.minClippingBounds,
- primitive.maxClippingBounds,
+ primitive.maxClippingBounds
);
if (!visible) {
return false;
@@ -1389,11 +1389,11 @@ function updateShapeAndTransforms(primitive, shape, provider) {
const transformPositionLocalToWorld = shape.shapeTransform;
const transformPositionWorldToLocal = Matrix4.inverse(
transformPositionLocalToWorld,
- scratchTransformPositionWorldToLocal,
+ scratchTransformPositionWorldToLocal
);
const rotation = Matrix4.getRotation(
transformPositionLocalToWorld,
- scratchRotation,
+ scratchRotation
);
// Note that inverse(rotation) is the same as transpose(rotation)
const scale = Matrix4.getScale(transformPositionLocalToWorld, scratchScale);
@@ -1401,32 +1401,32 @@ function updateShapeAndTransforms(primitive, shape, provider) {
const localScale = Cartesian3.divideByScalar(
scale,
maximumScaleComponent,
- scratchLocalScale,
+ scratchLocalScale
);
const rotationAndLocalScale = Matrix3.multiplyByScale(
rotation,
localScale,
- scratchRotationAndLocalScale,
+ scratchRotationAndLocalScale
);
// Set member variables when the shape is dirty
primitive._transformPositionWorldToUv = Matrix4.multiplyTransformation(
transformPositionLocalToUv,
transformPositionWorldToLocal,
- primitive._transformPositionWorldToUv,
+ primitive._transformPositionWorldToUv
);
primitive._transformPositionUvToWorld = Matrix4.multiplyTransformation(
transformPositionLocalToWorld,
transformPositionUvToLocal,
- primitive._transformPositionUvToWorld,
+ primitive._transformPositionUvToWorld
);
primitive._transformDirectionWorldToLocal = Matrix4.getMatrix3(
transformPositionWorldToLocal,
- primitive._transformDirectionWorldToLocal,
+ primitive._transformDirectionWorldToLocal
);
primitive._transformNormalLocalToWorld = Matrix3.inverseTranspose(
rotationAndLocalScale,
- primitive._transformNormalLocalToWorld,
+ primitive._transformNormalLocalToWorld
);
return true;
@@ -1453,7 +1453,7 @@ function setupTraversal(primitive, provider, context) {
maximumTileCount,
dimensions,
provider.types,
- provider.componentTypes,
+ provider.componentTypes
)
: undefined;
@@ -1466,7 +1466,7 @@ function setupTraversal(primitive, provider, context) {
provider.types,
provider.componentTypes,
keyframeCount,
- maximumTextureMemoryByteLength,
+ maximumTextureMemoryByteLength
);
}
@@ -1480,7 +1480,7 @@ function setTraversalUniforms(traversal, uniforms) {
uniforms.octreeInternalNodeTexture = traversal.internalNodeTexture;
uniforms.octreeInternalNodeTexelSizeUv = Cartesian2.clone(
traversal.internalNodeTexelSizeUv,
- uniforms.octreeInternalNodeTexelSizeUv,
+ uniforms.octreeInternalNodeTexelSizeUv
);
uniforms.octreeInternalNodeTilesPerRow = traversal.internalNodeTilesPerRow;
@@ -1494,23 +1494,23 @@ function setTraversalUniforms(traversal, uniforms) {
uniforms.megatextureSliceDimensions = Cartesian2.clone(
megatexture.sliceCountPerRegion,
- uniforms.megatextureSliceDimensions,
+ uniforms.megatextureSliceDimensions
);
uniforms.megatextureTileDimensions = Cartesian2.clone(
megatexture.regionCountPerMegatexture,
- uniforms.megatextureTileDimensions,
+ uniforms.megatextureTileDimensions
);
uniforms.megatextureVoxelSizeUv = Cartesian2.clone(
megatexture.voxelSizeUv,
- uniforms.megatextureVoxelSizeUv,
+ uniforms.megatextureVoxelSizeUv
);
uniforms.megatextureSliceSizeUv = Cartesian2.clone(
megatexture.sliceSizeUv,
- uniforms.megatextureSliceSizeUv,
+ uniforms.megatextureSliceSizeUv
);
uniforms.megatextureTileSizeUv = Cartesian2.clone(
megatexture.regionSizeUv,
- uniforms.megatextureTileSizeUv,
+ uniforms.megatextureTileSizeUv
);
}
@@ -1524,7 +1524,7 @@ function setTraversalUniforms(traversal, uniforms) {
function checkShapeDefines(primitive, shape) {
const shapeDefines = shape.shaderDefines;
const shapeDefinesChanged = Object.keys(shapeDefines).some(
- (key) => shapeDefines[key] !== primitive._shapeDefinesOld[key],
+ (key) => shapeDefines[key] !== primitive._shapeDefinesOld[key]
);
if (shapeDefinesChanged) {
primitive._shapeDefinesOld = clone(shapeDefines, true);
@@ -1566,11 +1566,11 @@ function getKeyframeLocation(timeIntervalCollection, clock) {
// De-lerp between the start and end of the interval
const totalSeconds = JulianDate.secondsDifference(
timeInterval.stop,
- timeInterval.start,
+ timeInterval.start
);
const secondsDifferenceStart = JulianDate.secondsDifference(
date,
- timeInterval.start,
+ timeInterval.start
);
const t = secondsDifferenceStart / totalSeconds;
@@ -1610,12 +1610,12 @@ function updateClippingPlanes(primitive, frameState) {
Matrix4.multiplyTransformation(
Matrix4.inverse(
clippingPlanes.modelMatrix,
- uniforms.clippingPlanesMatrix,
+ uniforms.clippingPlanesMatrix
),
primitive._transformPositionUvToWorld,
- uniforms.clippingPlanesMatrix,
+ uniforms.clippingPlanesMatrix
),
- uniforms.clippingPlanesMatrix,
+ uniforms.clippingPlanesMatrix
);
}
@@ -1687,7 +1687,7 @@ const corners = new Array(
new Cartesian4(-1.0, -1.0, +1.0, 1.0),
new Cartesian4(+1.0, -1.0, +1.0, 1.0),
new Cartesian4(-1.0, +1.0, +1.0, 1.0),
- new Cartesian4(+1.0, +1.0, +1.0, 1.0),
+ new Cartesian4(+1.0, +1.0, +1.0, 1.0)
);
const vertexNeighborIndices = new Array(
1,
@@ -1713,7 +1713,7 @@ const vertexNeighborIndices = new Array(
7,
3,
5,
- 6,
+ 6
);
const scratchCornersClipSpace = new Array(
@@ -1724,7 +1724,7 @@ const scratchCornersClipSpace = new Array(
new Cartesian4(),
new Cartesian4(),
new Cartesian4(),
- new Cartesian4(),
+ new Cartesian4()
);
/**
@@ -1746,17 +1746,17 @@ const scratchCornersClipSpace = new Array(
function orientedBoundingBoxToNdcAabb(
orientedBoundingBox,
worldToProjection,
- result,
+ result
) {
const transformPositionLocalToWorld = Matrix4.fromRotationTranslation(
orientedBoundingBox.halfAxes,
orientedBoundingBox.center,
- scratchTransformPositionLocalToWorld,
+ scratchTransformPositionLocalToWorld
);
const transformPositionLocalToProjection = Matrix4.multiply(
worldToProjection,
transformPositionLocalToWorld,
- scratchTransformPositionLocalToProjection,
+ scratchTransformPositionLocalToProjection
);
let ndcMinX = +Number.MAX_VALUE;
@@ -1772,7 +1772,7 @@ function orientedBoundingBoxToNdcAabb(
Matrix4.multiplyByVector(
transformPositionLocalToProjection,
corners[cornerIndex],
- cornersClipSpace[cornerIndex],
+ cornersClipSpace[cornerIndex]
);
}
@@ -1804,7 +1804,7 @@ function orientedBoundingBoxToNdcAabb(
position,
neighborPosition,
t,
- scratchIntersect,
+ scratchIntersect
);
const intersectNdcX = intersect.x / intersect.w;
const intersectNdcY = intersect.y / intersect.w;
@@ -1904,19 +1904,19 @@ function debugDraw(that, frameState) {
Cartesian3.ZERO,
polylineXAxis,
Color.RED,
- axisThickness,
+ axisThickness
);
makePolylineLineSegment(
Cartesian3.ZERO,
polylineYAxis,
Color.LIME,
- axisThickness,
+ axisThickness
);
makePolylineLineSegment(
Cartesian3.ZERO,
polylineZAxis,
Color.BLUE,
- axisThickness,
+ axisThickness
);
polylines.update(frameState);
diff --git a/packages/engine/Source/Scene/VoxelRenderResources.js b/packages/engine/Source/Scene/VoxelRenderResources.js
index 3e23d213f0c7..c6814a95acbe 100644
--- a/packages/engine/Source/Scene/VoxelRenderResources.js
+++ b/packages/engine/Source/Scene/VoxelRenderResources.js
@@ -54,7 +54,7 @@ function VoxelRenderResources(primitive) {
shaderBuilder.addUniform(
uniform.type,
uniformName,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
}
}
@@ -63,7 +63,7 @@ function VoxelRenderResources(primitive) {
shaderBuilder.addUniform(
"sampler2D",
"u_megatextureTextures[METADATA_COUNT]",
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
/**
@@ -99,18 +99,18 @@ function VoxelRenderResources(primitive) {
shaderBuilder.addDefine(
"CLIPPING_PLANES",
undefined,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addDefine(
"CLIPPING_PLANES_COUNT",
clippingPlanesLength,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
if (clippingPlanes.unionClippingRegions) {
shaderBuilder.addDefine(
"CLIPPING_PLANES_UNION",
undefined,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
}
shaderBuilder.addFragmentLines([IntersectClippingPlanes]);
@@ -119,7 +119,7 @@ function VoxelRenderResources(primitive) {
shaderBuilder.addDefine(
"DEPTH_TEST",
undefined,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addFragmentLines([IntersectDepth]);
}
@@ -142,7 +142,7 @@ function VoxelRenderResources(primitive) {
shaderBuilder.addDefine(
"SHAPE_ELLIPSOID",
undefined,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addFragmentLines([
convertUvToEllipsoid,
@@ -174,7 +174,7 @@ function VoxelRenderResources(primitive) {
shaderBuilder.addDefine(
"CLIPPING_PLANES_INTERSECTION_INDEX",
intersectionCount,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
if (clippingPlanesLength === 1) {
intersectionCount += 1;
@@ -188,14 +188,14 @@ function VoxelRenderResources(primitive) {
shaderBuilder.addDefine(
"DEPTH_INTERSECTION_INDEX",
intersectionCount,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
intersectionCount += 1;
}
shaderBuilder.addDefine(
"INTERSECTION_COUNT",
intersectionCount,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
// Additional fragment shader defines
@@ -212,21 +212,21 @@ function VoxelRenderResources(primitive) {
shaderBuilder.addDefine(
"LOG_DEPTH_READ_ONLY",
undefined,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
}
if (primitive._nearestSampling) {
shaderBuilder.addDefine(
"NEAREST_SAMPLING",
undefined,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
}
const traversal = primitive._traversal;
shaderBuilder.addDefine(
"SAMPLE_COUNT",
`${traversal._sampleCount}`,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
}
diff --git a/packages/engine/Source/Scene/VoxelTraversal.js b/packages/engine/Source/Scene/VoxelTraversal.js
index b7e02d06f1dd..0cc1db7b2d22 100644
--- a/packages/engine/Source/Scene/VoxelTraversal.js
+++ b/packages/engine/Source/Scene/VoxelTraversal.js
@@ -40,7 +40,7 @@ function VoxelTraversal(
types,
componentTypes,
keyframeCount,
- maximumTextureMemoryByteLength,
+ maximumTextureMemoryByteLength
) {
/**
* TODO: maybe this shouldn't be stored or passed into update function?
@@ -66,7 +66,7 @@ function VoxelTraversal(
dimensions,
componentCount,
componentType,
- maximumTextureMemoryByteLength,
+ maximumTextureMemoryByteLength
);
}
@@ -150,16 +150,16 @@ function VoxelTraversal(
binaryTreeKeyframeWeighting,
1,
keyframeCount - 2,
- 0,
+ 0
);
const internalNodeTexelCount = 9;
const internalNodeTextureDimensionX = 2048;
const internalNodeTilesPerRow = Math.floor(
- internalNodeTextureDimensionX / internalNodeTexelCount,
+ internalNodeTextureDimensionX / internalNodeTexelCount
);
const internalNodeTextureDimensionY = Math.ceil(
- maximumTileCount / internalNodeTilesPerRow,
+ maximumTileCount / internalNodeTilesPerRow
);
/**
@@ -191,7 +191,7 @@ function VoxelTraversal(
*/
this.internalNodeTexelSizeUv = new Cartesian2(
1.0 / internalNodeTextureDimensionX,
- 1.0 / internalNodeTextureDimensionY,
+ 1.0 / internalNodeTextureDimensionY
);
/**
@@ -250,7 +250,7 @@ VoxelTraversal.prototype.update = function (
frameState,
keyframeLocation,
recomputeBoundingVolumes,
- pauseUpdate,
+ pauseUpdate
) {
const primitive = this._primitive;
const context = frameState.context;
@@ -268,10 +268,10 @@ VoxelTraversal.prototype.update = function (
const leafNodeTexelCount = 2;
const leafNodeTextureDimensionX = 1024;
const leafNodeTilesPerRow = Math.floor(
- leafNodeTextureDimensionX / leafNodeTexelCount,
+ leafNodeTextureDimensionX / leafNodeTexelCount
);
const leafNodeTextureDimensionY = Math.ceil(
- maximumTileCount / leafNodeTilesPerRow,
+ maximumTileCount / leafNodeTilesPerRow
);
this.leafNodeTexture = new Texture({
@@ -289,7 +289,7 @@ VoxelTraversal.prototype.update = function (
this.leafNodeTexelSizeUv = Cartesian2.fromElements(
1.0 / leafNodeTextureDimensionX,
1.0 / leafNodeTextureDimensionY,
- this.leafNodeTexelSizeUv,
+ this.leafNodeTexelSizeUv
);
this.leafNodeTilesPerRow = leafNodeTilesPerRow;
} else if (!useLeafNodes && defined(this.leafNodeTexture)) {
@@ -299,7 +299,7 @@ VoxelTraversal.prototype.update = function (
this._keyframeLocation = CesiumMath.clamp(
keyframeLocation,
0.0,
- keyframeCount - 1,
+ keyframeCount - 1
);
if (recomputeBoundingVolumes) {
@@ -325,7 +325,7 @@ VoxelTraversal.prototype.update = function (
this,
loadAndUnloadTimeMs,
generateOctreeTimeMs,
- totalTimeMs,
+ totalTimeMs
);
}
};
@@ -505,7 +505,7 @@ function loadAndUnload(that, frameState) {
const previousKeyframe = CesiumMath.clamp(
Math.floor(that._keyframeLocation),
0,
- keyframeCount - 2,
+ keyframeCount - 2
);
const nextKeyframe = previousKeyframe + 1;
@@ -524,7 +524,7 @@ function loadAndUnload(that, frameState) {
visibilityPlaneMask = spatialNode.visibility(
frameState,
- visibilityPlaneMask,
+ visibilityPlaneMask
);
if (visibilityPlaneMask === CullingVolume.MASK_OUTSIDE) {
return;
@@ -553,7 +553,7 @@ function loadAndUnload(that, frameState) {
previousKeyframe,
keyframeNode.keyframe,
nextKeyframe,
- that,
+ that
);
if (
@@ -594,8 +594,9 @@ function loadAndUnload(that, frameState) {
while (priorityQueue.length > 0) {
highPriorityKeyframeNode = priorityQueue.removeMaximum();
highPriorityKeyframeNode.highPriorityFrameNumber = frameNumber;
- highPriorityKeyframeNodes[highPriorityKeyframeNodeCount] =
- highPriorityKeyframeNode;
+ highPriorityKeyframeNodes[
+ highPriorityKeyframeNodeCount
+ ] = highPriorityKeyframeNode;
highPriorityKeyframeNodeCount++;
}
@@ -647,7 +648,7 @@ function loadAndUnload(that, frameState) {
const discardNode = keyframeNodesInMegatexture[addNodeIndex];
discardNode.spatialNode.destroyKeyframeNode(
discardNode,
- that.megatextures,
+ that.megatextures
);
} else {
addNodeIndex = keyframeNodesInMegatextureCount + addedCount;
@@ -655,7 +656,7 @@ function loadAndUnload(that, frameState) {
}
highPriorityKeyframeNode.spatialNode.addKeyframeNodeToMegatextures(
highPriorityKeyframeNode,
- that.megatextures,
+ that.megatextures
);
keyframeNodesInMegatexture[addNodeIndex] = highPriorityKeyframeNode;
}
@@ -675,24 +676,24 @@ function loadAndUnload(that, frameState) {
function keyframePriority(previousKeyframe, keyframe, nextKeyframe, traversal) {
const keyframeDifference = Math.min(
Math.abs(keyframe - previousKeyframe),
- Math.abs(keyframe - nextKeyframe),
+ Math.abs(keyframe - nextKeyframe)
);
const maxKeyframeDifference = Math.max(
previousKeyframe,
traversal._keyframeCount - nextKeyframe - 1,
- 1,
+ 1
);
const keyframeFactor = Math.pow(
1.0 - keyframeDifference / maxKeyframeDifference,
- 4.0,
+ 4.0
);
const binaryTreeFactor = Math.exp(
- -traversal._binaryTreeKeyframeWeighting[keyframe],
+ -traversal._binaryTreeKeyframeWeighting[keyframe]
);
return CesiumMath.lerp(
binaryTreeFactor,
keyframeFactor,
- 0.15 + 0.85 * keyframeFactor,
+ 0.15 + 0.85 * keyframeFactor
);
}
@@ -707,7 +708,7 @@ function printDebugInformation(
that,
loadAndUnloadTimeMs,
generateOctreeTimeMs,
- totalTimeMs,
+ totalTimeMs
) {
const keyframeCount = that._keyframeCount;
const rootNode = that.rootNode;
@@ -782,7 +783,7 @@ function printDebugInformation(
`ALL: ${totalTimeMsRounded}`;
console.log(
- `${loadedKeyframeStatistics} || ${loadStateStatistics} || ${timerStatistics}`,
+ `${loadedKeyframeStatistics} || ${loadStateStatistics} || ${timerStatistics}`
);
}
@@ -854,7 +855,7 @@ function generateOctree(that, sampleCount, levelBlendFactor) {
childOctreeIndex,
childEntryIndex,
parentOctreeIndex,
- parentEntryIndex,
+ parentEntryIndex
) {
let hasRenderableChildren = false;
if (defined(node.children)) {
@@ -886,7 +887,7 @@ function generateOctree(that, sampleCount, levelBlendFactor) {
childOctreeIndex,
childEntryIndex,
parentOctreeIndex,
- parentEntryIndex + cc,
+ parentEntryIndex + cc
);
}
} else {
@@ -940,14 +941,14 @@ function generateOctree(that, sampleCount, levelBlendFactor) {
internalNodeOctreeData,
9,
that.internalNodeTilesPerRow,
- that.internalNodeTexture,
+ that.internalNodeTexture
);
if (useLeafNodes) {
copyToLeafNodeTexture(
leafNodeOctreeData,
2,
that.leafNodeTilesPerRow,
- that.leafNodeTexture,
+ that.leafNodeTexture
);
}
}
@@ -985,7 +986,7 @@ function copyToInternalNodeTexture(data, texelsPerTile, tilesPerRow, texture) {
const tileCount = Math.ceil(data.length / texelsPerTile);
const copyWidth = Math.max(
1,
- texelsPerTile * Math.min(tileCount, tilesPerRow),
+ texelsPerTile * Math.min(tileCount, tilesPerRow)
);
const copyHeight = Math.max(1, Math.ceil(tileCount / tilesPerRow));
@@ -1027,7 +1028,7 @@ function copyToLeafNodeTexture(data, texelsPerTile, tilesPerRow, texture) {
const tileCount = Math.ceil(data.length / datasPerTile);
const copyWidth = Math.max(
1,
- texelsPerTile * Math.min(tileCount, tilesPerRow),
+ texelsPerTile * Math.min(tileCount, tilesPerRow)
);
const copyHeight = Math.max(1, Math.ceil(tileCount / tilesPerRow));
@@ -1042,7 +1043,7 @@ function copyToLeafNodeTexture(data, texelsPerTile, tilesPerRow, texture) {
const timeLerpCompressed = CesiumMath.clamp(
Math.floor(65536 * timeLerp),
0,
- 65535,
+ 65535
);
textureData[tileIndex * 8 + 0] = (timeLerpCompressed >>> 0) & 0xff;
textureData[tileIndex * 8 + 1] = (timeLerpCompressed >>> 8) & 0xff;
@@ -1083,7 +1084,7 @@ VoxelTraversal.getApproximateTextureMemoryByteLength = function (
tileCount,
dimensions,
types,
- componentTypes,
+ componentTypes
) {
let textureMemoryByteLength = 0;
@@ -1093,13 +1094,12 @@ VoxelTraversal.getApproximateTextureMemoryByteLength = function (
const componentType = componentTypes[i];
const componentCount = MetadataType.getComponentCount(type);
- textureMemoryByteLength +=
- Megatexture.getApproximateTextureMemoryByteLength(
- tileCount,
- dimensions,
- componentCount,
- componentType,
- );
+ textureMemoryByteLength += Megatexture.getApproximateTextureMemoryByteLength(
+ tileCount,
+ dimensions,
+ componentCount,
+ componentType
+ );
}
return textureMemoryByteLength;
diff --git a/packages/engine/Source/Scene/WebMapServiceImageryProvider.js b/packages/engine/Source/Scene/WebMapServiceImageryProvider.js
index 09fe189a73d8..f5277f2eeec2 100644
--- a/packages/engine/Source/Scene/WebMapServiceImageryProvider.js
+++ b/packages/engine/Source/Scene/WebMapServiceImageryProvider.js
@@ -114,7 +114,7 @@ function WebMapServiceImageryProvider(options) {
if (defined(options.times) && !defined(options.clock)) {
throw new DeveloperError(
- "options.times was specified, so options.clock is required.",
+ "options.times was specified, so options.clock is required."
);
}
@@ -131,7 +131,7 @@ function WebMapServiceImageryProvider(options) {
this._getFeatureInfoUrl = defaultValue(
options.getFeatureInfoUrl,
- options.url,
+ options.url
);
const resource = Resource.createIfNeeded(options.url);
@@ -139,11 +139,11 @@ function WebMapServiceImageryProvider(options) {
resource.setQueryParameters(
WebMapServiceImageryProvider.DefaultParameters,
- true,
+ true
);
pickFeatureResource.setQueryParameters(
WebMapServiceImageryProvider.GetFeatureInfoDefaultParameters,
- true,
+ true
);
if (defined(options.parameters)) {
@@ -152,7 +152,7 @@ function WebMapServiceImageryProvider(options) {
if (defined(options.getFeatureInfoParameters)) {
pickFeatureResource.setQueryParameters(
- objectToLowercase(options.getFeatureInfoParameters),
+ objectToLowercase(options.getFeatureInfoParameters)
);
}
@@ -190,7 +190,7 @@ function WebMapServiceImageryProvider(options) {
options.tilingScheme &&
options.tilingScheme.projection instanceof WebMercatorProjection
? "EPSG:3857"
- : "CRS:84",
+ : "CRS:84"
);
// The axis order in previous versions of the WMS specifications was to always use easting (x or lon ) and northing (y or
@@ -218,7 +218,7 @@ function WebMapServiceImageryProvider(options) {
options.tilingScheme &&
options.tilingScheme.projection instanceof WebMercatorProjection
? "EPSG:3857"
- : "EPSG:4326",
+ : "EPSG:4326"
);
}
@@ -249,7 +249,7 @@ function WebMapServiceImageryProvider(options) {
pickFeaturesUrl: pickFeatureResource,
tilingScheme: defaultValue(
options.tilingScheme,
- new GeographicTilingScheme({ ellipsoid: options.ellipsoid }),
+ new GeographicTilingScheme({ ellipsoid: options.ellipsoid })
),
rectangle: options.rectangle,
tileWidth: options.tileWidth,
@@ -261,7 +261,7 @@ function WebMapServiceImageryProvider(options) {
credit: options.credit,
getFeatureInfoFormats: defaultValue(
options.getFeatureInfoFormats,
- WebMapServiceImageryProvider.DefaultGetFeatureInfoFormats,
+ WebMapServiceImageryProvider.DefaultGetFeatureInfoFormats
),
enablePickFeatures: options.enablePickFeatures,
});
@@ -285,7 +285,7 @@ function pickFeatures(
level,
longitude,
latitude,
- interval,
+ interval
) {
const dynamicIntervalData = defined(interval) ? interval.data : undefined;
const tileProvider = imageryProvider._tileProvider;
@@ -550,7 +550,7 @@ WebMapServiceImageryProvider.prototype.requestImage = function (
x,
y,
level,
- request,
+ request
) {
let result;
const timeDynamicImagery = this._timeDynamicImagery;
@@ -593,7 +593,7 @@ WebMapServiceImageryProvider.prototype.pickFeatures = function (
y,
level,
longitude,
- latitude,
+ latitude
) {
const timeDynamicImagery = this._timeDynamicImagery;
const currentInterval = defined(timeDynamicImagery)
diff --git a/packages/engine/Source/Scene/WebMapTileServiceImageryProvider.js b/packages/engine/Source/Scene/WebMapTileServiceImageryProvider.js
index 690a7ea59b13..1ee3c2002504 100644
--- a/packages/engine/Source/Scene/WebMapTileServiceImageryProvider.js
+++ b/packages/engine/Source/Scene/WebMapTileServiceImageryProvider.js
@@ -131,7 +131,7 @@ function WebMapTileServiceImageryProvider(options) {
}
if (defined(options.times) && !defined(options.clock)) {
throw new DeveloperError(
- "options.times was specified, so options.clock is required.",
+ "options.times was specified, so options.clock is required."
);
}
//>>includeEnd('debug');
@@ -190,7 +190,7 @@ function WebMapTileServiceImageryProvider(options) {
this._rectangle = defaultValue(
options.rectangle,
- this._tilingScheme.rectangle,
+ this._tilingScheme.rectangle
);
this._dimensions = options.dimensions;
@@ -216,18 +216,18 @@ function WebMapTileServiceImageryProvider(options) {
// level will cause too many tiles to be downloaded and rendered.
const swTile = this._tilingScheme.positionToTileXY(
Rectangle.southwest(this._rectangle),
- this._minimumLevel,
+ this._minimumLevel
);
const neTile = this._tilingScheme.positionToTileXY(
Rectangle.northeast(this._rectangle),
- this._minimumLevel,
+ this._minimumLevel
);
const tileCount =
(Math.abs(neTile.x - swTile.x) + 1) * (Math.abs(neTile.y - swTile.y) + 1);
//>>includeStart('debug', pragmas.debug);
if (tileCount > 4) {
throw new DeveloperError(
- `The imagery provider's rectangle and minimumLevel indicate that there are ${tileCount} tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.`,
+ `The imagery provider's rectangle and minimumLevel indicate that there are ${tileCount} tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.`
);
}
//>>includeEnd('debug');
@@ -533,7 +533,7 @@ Object.defineProperties(WebMapTileServiceImageryProvider.prototype, {
WebMapTileServiceImageryProvider.prototype.getTileCredits = function (
x,
y,
- level,
+ level
) {
return undefined;
};
@@ -552,7 +552,7 @@ WebMapTileServiceImageryProvider.prototype.requestImage = function (
x,
y,
level,
- request,
+ request
) {
let result;
const timeDynamicImagery = this._timeDynamicImagery;
@@ -593,7 +593,7 @@ WebMapTileServiceImageryProvider.prototype.pickFeatures = function (
y,
level,
longitude,
- latitude,
+ latitude
) {
return undefined;
};
diff --git a/packages/engine/Source/Scene/buildVoxelDrawCommands.js b/packages/engine/Source/Scene/buildVoxelDrawCommands.js
index 19f67111ccca..ba8aba81bb37 100644
--- a/packages/engine/Source/Scene/buildVoxelDrawCommands.js
+++ b/packages/engine/Source/Scene/buildVoxelDrawCommands.js
@@ -23,8 +23,11 @@ function buildVoxelDrawCommands(primitive, context) {
processVoxelProperties(renderResources, primitive);
- const { shaderBuilder, clippingPlanes, clippingPlanesLength } =
- renderResources;
+ const {
+ shaderBuilder,
+ clippingPlanes,
+ clippingPlanesLength,
+ } = renderResources;
if (clippingPlanesLength > 0) {
// Extract the getClippingPlane function from the getClippingFunction string.
@@ -38,16 +41,16 @@ function buildVoxelDrawCommands(primitive, context) {
const functionBodyEnd = entireFunction.indexOf("}", functionBodyBegin);
const functionSignature = entireFunction.slice(
functionSignatureBegin,
- functionSignatureEnd,
+ functionSignatureEnd
);
const functionBody = entireFunction.slice(
functionBodyBegin,
- functionBodyEnd,
+ functionBodyEnd
);
shaderBuilder.addFunction(
functionId,
functionSignature,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addFunctionLines(functionId, [functionBody]);
}
@@ -59,12 +62,13 @@ function buildVoxelDrawCommands(primitive, context) {
shaderBuilderPickVoxel.addDefine(
"PICKING_VOXEL",
undefined,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
const shaderProgram = shaderBuilder.buildShaderProgram(context);
const shaderProgramPick = shaderBuilderPick.buildShaderProgram(context);
- const shaderProgramPickVoxel =
- shaderBuilderPickVoxel.buildShaderProgram(context);
+ const shaderProgramPickVoxel = shaderBuilderPickVoxel.buildShaderProgram(
+ context
+ );
const renderState = RenderState.fromCache({
cull: {
enabled: true,
@@ -98,7 +102,7 @@ function buildVoxelDrawCommands(primitive, context) {
// Create the pick draw command
const drawCommandPick = DrawCommand.shallowClone(
drawCommand,
- new DrawCommand(),
+ new DrawCommand()
);
drawCommandPick.shaderProgram = shaderProgramPick;
drawCommandPick.pickOnly = true;
@@ -106,7 +110,7 @@ function buildVoxelDrawCommands(primitive, context) {
// Create the pick voxels draw command
const drawCommandPickVoxel = DrawCommand.shallowClone(
drawCommand,
- new DrawCommand(),
+ new DrawCommand()
);
drawCommandPickVoxel.shaderProgram = shaderProgramPickVoxel;
drawCommandPickVoxel.pickOnly = true;
diff --git a/packages/engine/Source/Scene/computeFlyToLocationForRectangle.js b/packages/engine/Source/Scene/computeFlyToLocationForRectangle.js
index d77d02a10400..0a984cb7cb35 100644
--- a/packages/engine/Source/Scene/computeFlyToLocationForRectangle.js
+++ b/packages/engine/Source/Scene/computeFlyToLocationForRectangle.js
@@ -45,11 +45,10 @@ async function computeFlyToLocationForRectangle(rectangle, scene) {
Rectangle.northwest(rectangle),
];
- const positionsOnTerrain =
- await computeFlyToLocationForRectangle._sampleTerrainMostDetailed(
- terrainProvider,
- cartographics,
- );
+ const positionsOnTerrain = await computeFlyToLocationForRectangle._sampleTerrainMostDetailed(
+ terrainProvider,
+ cartographics
+ );
let heightFound = false;
const maxHeight = positionsOnTerrain.reduce(function (currentMax, item) {
@@ -69,6 +68,5 @@ async function computeFlyToLocationForRectangle(rectangle, scene) {
}
//Exposed for testing.
-computeFlyToLocationForRectangle._sampleTerrainMostDetailed =
- sampleTerrainMostDetailed;
+computeFlyToLocationForRectangle._sampleTerrainMostDetailed = sampleTerrainMostDetailed;
export default computeFlyToLocationForRectangle;
diff --git a/packages/engine/Source/Scene/createBillboardPointCallback.js b/packages/engine/Source/Scene/createBillboardPointCallback.js
index 5c2bfa725486..a9340b81d3d5 100644
--- a/packages/engine/Source/Scene/createBillboardPointCallback.js
+++ b/packages/engine/Source/Scene/createBillboardPointCallback.js
@@ -15,7 +15,7 @@ function createBillboardPointCallback(
cssColor,
cssOutlineColor,
cssOutlineWidth,
- pixelSize,
+ pixelSize
) {
return function () {
const canvas = document.createElement("canvas");
@@ -43,7 +43,7 @@ function createBillboardPointCallback(
pixelSize / 2,
0,
2 * Math.PI,
- true,
+ true
);
context2D.closePath();
context2D.fillStyle = "black";
diff --git a/packages/engine/Source/Scene/createElevationBandMaterial.js b/packages/engine/Source/Scene/createElevationBandMaterial.js
index 94d0e8a39ee3..544a1d67f6c7 100644
--- a/packages/engine/Source/Scene/createElevationBandMaterial.js
+++ b/packages/engine/Source/Scene/createElevationBandMaterial.js
@@ -126,7 +126,7 @@ function preprocess(layers) {
const height = CesiumMath.clamp(
entryOrig.height,
createElevationBandMaterial._minimumHeight,
- createElevationBandMaterial._maximumHeight,
+ createElevationBandMaterial._maximumHeight
);
// premultiplied alpha
@@ -174,8 +174,8 @@ function preprocess(layers) {
0,
createNewEntry(
createElevationBandMaterial._minimumHeight,
- entries[0].color,
- ),
+ entries[0].color
+ )
);
}
if (extendUpwards) {
@@ -184,8 +184,8 @@ function preprocess(layers) {
0,
createNewEntry(
createElevationBandMaterial._maximumHeight,
- entries[entries.length - 1].color,
- ),
+ entries[entries.length - 1].color
+ )
);
}
@@ -325,7 +325,7 @@ function createLayeredEntries(layers) {
entry.height,
prevEntryAccum,
entryAccum,
- scratchColorBelow,
+ scratchColorBelow
);
if (!defined(prevEntry)) {
@@ -349,7 +349,7 @@ function createLayeredEntries(layers) {
entryAccum.height,
prevEntry,
entry,
- scratchColorAbove,
+ scratchColorAbove
);
if (!defined(prevEntryAccum)) {
@@ -384,7 +384,7 @@ function createLayeredEntries(layers) {
// Insert blank gap between last accum entry and first entry
addEntry(
prevEntryAccum.height,
- createElevationBandMaterial._emptyColor,
+ createElevationBandMaterial._emptyColor
);
addEntry(entry.height, createElevationBandMaterial._emptyColor);
addEntry(entry.height, entry.color);
diff --git a/packages/engine/Source/Scene/createGooglePhotorealistic3DTileset.js b/packages/engine/Source/Scene/createGooglePhotorealistic3DTileset.js
index f762d748dc36..eee6c6abb61d 100644
--- a/packages/engine/Source/Scene/createGooglePhotorealistic3DTileset.js
+++ b/packages/engine/Source/Scene/createGooglePhotorealistic3DTileset.js
@@ -44,7 +44,7 @@ async function createGooglePhotorealistic3DTileset(key, options) {
options.cacheBytes = defaultValue(options.cacheBytes, 1536 * 1024 * 1024);
options.maximumCacheOverflowBytes = defaultValue(
options.maximumCacheOverflowBytes,
- 1024 * 1024 * 1024,
+ 1024 * 1024 * 1024
);
options.enableCollision = defaultValue(options.enableCollision, true);
diff --git a/packages/engine/Source/Scene/createOsmBuildingsAsync.js b/packages/engine/Source/Scene/createOsmBuildingsAsync.js
index e3b2908277f3..08b4b019c7ad 100644
--- a/packages/engine/Source/Scene/createOsmBuildingsAsync.js
+++ b/packages/engine/Source/Scene/createOsmBuildingsAsync.js
@@ -67,7 +67,7 @@ async function createOsmBuildingsAsync(options) {
if (!defined(style)) {
const color = defaultValue(
options.defaultColor,
- Color.WHITE,
+ Color.WHITE
).toCssColorString();
style = new Cesium3DTileStyle({
color: `Boolean(\${feature['cesium#color']}) ? color(\${feature['cesium#color']}) : ${color}`,
diff --git a/packages/engine/Source/Scene/createTangentSpaceDebugPrimitive.js b/packages/engine/Source/Scene/createTangentSpaceDebugPrimitive.js
index c5d8175dd2a0..5c3086e11b33 100644
--- a/packages/engine/Source/Scene/createTangentSpaceDebugPrimitive.js
+++ b/packages/engine/Source/Scene/createTangentSpaceDebugPrimitive.js
@@ -48,7 +48,7 @@ function createTangentSpaceDebugPrimitive(options) {
const attributes = geometry.attributes;
const modelMatrix = Matrix4.clone(
- defaultValue(options.modelMatrix, Matrix4.IDENTITY),
+ defaultValue(options.modelMatrix, Matrix4.IDENTITY)
);
const length = defaultValue(options.length, 10000.0);
@@ -58,13 +58,13 @@ function createTangentSpaceDebugPrimitive(options) {
geometry: GeometryPipeline.createLineSegmentsForVectors(
geometry,
"normal",
- length,
+ length
),
attributes: {
color: new ColorGeometryInstanceAttribute(1.0, 0.0, 0.0, 1.0),
},
modelMatrix: modelMatrix,
- }),
+ })
);
}
@@ -74,13 +74,13 @@ function createTangentSpaceDebugPrimitive(options) {
geometry: GeometryPipeline.createLineSegmentsForVectors(
geometry,
"tangent",
- length,
+ length
),
attributes: {
color: new ColorGeometryInstanceAttribute(0.0, 1.0, 0.0, 1.0),
},
modelMatrix: modelMatrix,
- }),
+ })
);
}
@@ -90,13 +90,13 @@ function createTangentSpaceDebugPrimitive(options) {
geometry: GeometryPipeline.createLineSegmentsForVectors(
geometry,
"bitangent",
- length,
+ length
),
attributes: {
color: new ColorGeometryInstanceAttribute(0.0, 0.0, 1.0, 1.0),
},
modelMatrix: modelMatrix,
- }),
+ })
);
}
diff --git a/packages/engine/Source/Scene/findContentMetadata.js b/packages/engine/Source/Scene/findContentMetadata.js
index dd8e96327d2d..db20826686ba 100644
--- a/packages/engine/Source/Scene/findContentMetadata.js
+++ b/packages/engine/Source/Scene/findContentMetadata.js
@@ -29,14 +29,14 @@ function findContentMetadata(tileset, contentHeader) {
if (!defined(tileset.schema)) {
findContentMetadata._oneTimeWarning(
"findContentMetadata-missing-root-schema",
- "Could not find a metadata schema for content metadata. For tilesets that contain external tilesets, make sure the schema is added to the root tileset.json.",
+ "Could not find a metadata schema for content metadata. For tilesets that contain external tilesets, make sure the schema is added to the root tileset.json."
);
return undefined;
}
const classes = defaultValue(
tileset.schema.classes,
- defaultValue.EMPTY_OBJECT,
+ defaultValue.EMPTY_OBJECT
);
if (defined(metadataJson.class)) {
const contentClass = classes[metadataJson.class];
diff --git a/packages/engine/Source/Scene/findTileMetadata.js b/packages/engine/Source/Scene/findTileMetadata.js
index c91a3df7ae93..f455afdf9c94 100644
--- a/packages/engine/Source/Scene/findTileMetadata.js
+++ b/packages/engine/Source/Scene/findTileMetadata.js
@@ -31,14 +31,14 @@ function findTileMetadata(tileset, tileHeader) {
if (!defined(tileset.schema)) {
findTileMetadata._oneTimeWarning(
"findTileMetadata-missing-root-schema",
- "Could not find a metadata schema for tile metadata. For tilesets that contain external tilesets, make sure the schema is added to the root tileset.json.",
+ "Could not find a metadata schema for tile metadata. For tilesets that contain external tilesets, make sure the schema is added to the root tileset.json."
);
return undefined;
}
const classes = defaultValue(
tileset.schema.classes,
- defaultValue.EMPTY_OBJECT,
+ defaultValue.EMPTY_OBJECT
);
if (defined(metadataJson.class)) {
const tileClass = classes[metadataJson.class];
diff --git a/packages/engine/Source/Scene/getBinaryAccessor.js b/packages/engine/Source/Scene/getBinaryAccessor.js
index 36ab52e85b8f..aad46fc83bab 100644
--- a/packages/engine/Source/Scene/getBinaryAccessor.js
+++ b/packages/engine/Source/Scene/getBinaryAccessor.js
@@ -48,7 +48,7 @@ function getBinaryAccessor(accessor) {
componentDatatype,
buffer,
byteOffset,
- componentsPerAttribute * length,
+ componentsPerAttribute * length
);
},
};
diff --git a/packages/engine/Source/Scene/getClipAndStyleCode.js b/packages/engine/Source/Scene/getClipAndStyleCode.js
index 2dbc355196e6..5b3e71f61eab 100644
--- a/packages/engine/Source/Scene/getClipAndStyleCode.js
+++ b/packages/engine/Source/Scene/getClipAndStyleCode.js
@@ -12,7 +12,7 @@ import Check from "../Core/Check.js";
function getClipAndStyleCode(
samplerUniformName,
matrixUniformName,
- styleUniformName,
+ styleUniformName
) {
//>>includeStart('debug', pragmas.debug);
Check.typeOf.string("samplerUniformName", samplerUniformName);
diff --git a/packages/engine/Source/Scene/getClippingFunction.js b/packages/engine/Source/Scene/getClippingFunction.js
index 690d542cf4f5..d17d9819b598 100644
--- a/packages/engine/Source/Scene/getClippingFunction.js
+++ b/packages/engine/Source/Scene/getClippingFunction.js
@@ -22,7 +22,7 @@ function getClippingFunction(clippingPlaneCollection, context) {
const textureResolution = ClippingPlaneCollection.getTextureResolution(
clippingPlaneCollection,
context,
- textureResolutionScratch,
+ textureResolutionScratch
);
const width = textureResolution.x;
const height = textureResolution.y;
diff --git a/packages/engine/Source/Scene/parseBatchTable.js b/packages/engine/Source/Scene/parseBatchTable.js
index 6105f587abaf..26cb21abec7f 100644
--- a/packages/engine/Source/Scene/parseBatchTable.js
+++ b/packages/engine/Source/Scene/parseBatchTable.js
@@ -47,14 +47,14 @@ function parseBatchTable(options) {
const binaryBody = options.binaryBody;
const parseAsPropertyAttributes = defaultValue(
options.parseAsPropertyAttributes,
- false,
+ false
);
const customAttributeOutput = options.customAttributeOutput;
//>>includeStart('debug', pragmas.debug);
if (parseAsPropertyAttributes && !defined(customAttributeOutput)) {
throw new DeveloperError(
- "customAttributeOutput is required when parsing batch table as property attributes",
+ "customAttributeOutput is required when parsing batch table as property attributes"
);
}
//>>includeEnd('debug');
@@ -90,7 +90,7 @@ function parseBatchTable(options) {
className,
binaryProperties,
binaryBody,
- customAttributeOutput,
+ customAttributeOutput
);
transcodedSchema = attributeResults.transcodedSchema;
const propertyAttribute = new PropertyAttribute({
@@ -104,7 +104,7 @@ function parseBatchTable(options) {
featureCount,
className,
binaryProperties,
- binaryBody,
+ binaryBody
);
transcodedSchema = binaryResults.transcodedSchema;
const featureTableJson = binaryResults.featureTableJson;
@@ -163,7 +163,7 @@ function partitionProperties(batchTable) {
if (defined(legacyHierarchy)) {
parseBatchTable._deprecationWarning(
"batchTableHierarchyExtension",
- "The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead.",
+ "The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead."
);
hierarchyExtension = legacyHierarchy;
} else if (defined(extensions)) {
@@ -220,7 +220,7 @@ function transcodeBinaryProperties(
featureCount,
className,
binaryProperties,
- binaryBody,
+ binaryBody
) {
const classProperties = {};
const featureTableProperties = {};
@@ -233,7 +233,7 @@ function transcodeBinaryProperties(
if (!defined(binaryBody)) {
throw new RuntimeError(
- `Property ${propertyId} requires a batch table binary.`,
+ `Property ${propertyId} requires a batch table binary.`
);
}
@@ -246,12 +246,13 @@ function transcodeBinaryProperties(
classProperties[propertyId] = transcodePropertyType(property);
- bufferViewsTypedArrays[bufferViewCount] =
- binaryAccessor.createArrayBufferView(
- binaryBody.buffer,
- binaryBody.byteOffset + property.byteOffset,
- featureCount,
- );
+ bufferViewsTypedArrays[
+ bufferViewCount
+ ] = binaryAccessor.createArrayBufferView(
+ binaryBody.buffer,
+ binaryBody.byteOffset + property.byteOffset,
+ featureCount
+ );
bufferViewCount++;
}
@@ -284,7 +285,7 @@ function transcodeBinaryPropertiesAsPropertyAttributes(
className,
binaryProperties,
binaryBody,
- customAttributeOutput,
+ customAttributeOutput
) {
const classProperties = {};
const propertyAttributeProperties = {};
@@ -301,7 +302,7 @@ function transcodeBinaryPropertiesAsPropertyAttributes(
const property = binaryProperties[propertyId];
if (!defined(binaryBody) && !defined(property.typedArray)) {
throw new RuntimeError(
- `Property ${propertyId} requires a batch table binary.`,
+ `Property ${propertyId} requires a batch table binary.`
);
}
@@ -345,7 +346,7 @@ function transcodeBinaryPropertiesAsPropertyAttributes(
attributeTypedArray = binaryAccessor.createArrayBufferView(
binaryBody.buffer,
binaryBody.byteOffset + property.byteOffset,
- featureCount,
+ featureCount
);
}
@@ -353,8 +354,9 @@ function transcodeBinaryPropertiesAsPropertyAttributes(
attribute.name = customAttributeName;
attribute.count = featureCount;
attribute.type = property.type;
- const componentDatatype =
- ComponentDatatype.fromTypedArray(attributeTypedArray);
+ const componentDatatype = ComponentDatatype.fromTypedArray(
+ attributeTypedArray
+ );
if (
componentDatatype === ComponentDatatype.INT ||
componentDatatype === ComponentDatatype.UNSIGNED_INT ||
@@ -362,12 +364,13 @@ function transcodeBinaryPropertiesAsPropertyAttributes(
) {
parseBatchTable._oneTimeWarning(
"Cast pnts property to floats",
- `Point cloud property "${customAttributeName}" will be cast to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.`,
+ `Point cloud property "${customAttributeName}" will be cast to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.`
);
attributeTypedArray = new Float32Array(attributeTypedArray);
}
- attribute.componentDatatype =
- ComponentDatatype.fromTypedArray(attributeTypedArray);
+ attribute.componentDatatype = ComponentDatatype.fromTypedArray(
+ attributeTypedArray
+ );
attribute.typedArray = attributeTypedArray;
customAttributeOutput.push(attribute);
diff --git a/packages/engine/Source/Scene/parseFeatureMetadataLegacy.js b/packages/engine/Source/Scene/parseFeatureMetadataLegacy.js
index 9d20d691a5d9..481ed2b0606b 100644
--- a/packages/engine/Source/Scene/parseFeatureMetadataLegacy.js
+++ b/packages/engine/Source/Scene/parseFeatureMetadataLegacy.js
@@ -60,7 +60,7 @@ function parseFeatureMetadataLegacy(options) {
metadataTable: metadataTable,
extras: featureTable.extras,
extensions: featureTable.extensions,
- }),
+ })
);
}
}
@@ -80,7 +80,7 @@ function parseFeatureMetadataLegacy(options) {
propertyTexture: transcodeToPropertyTexture(featureTexture),
class: schema.classes[featureTexture.class],
textures: options.textures,
- }),
+ })
);
}
}
@@ -119,7 +119,7 @@ function transcodeToPropertyTexture(featureTexture) {
propertyTexture.properties[propertyId] = combine(
oldProperty.texture,
property,
- true,
+ true
);
}
}
diff --git a/packages/engine/Source/Scene/parseStructuralMetadata.js b/packages/engine/Source/Scene/parseStructuralMetadata.js
index 415de8929f3a..1e401fe7c277 100644
--- a/packages/engine/Source/Scene/parseStructuralMetadata.js
+++ b/packages/engine/Source/Scene/parseStructuralMetadata.js
@@ -52,7 +52,7 @@ function parseStructuralMetadata(options) {
metadataTable: metadataTable,
extras: propertyTable.extras,
extensions: propertyTable.extensions,
- }),
+ })
);
}
}
@@ -68,7 +68,7 @@ function parseStructuralMetadata(options) {
propertyTexture: propertyTexture,
class: schema.classes[propertyTexture.class],
textures: options.textures,
- }),
+ })
);
}
}
@@ -83,7 +83,7 @@ function parseStructuralMetadata(options) {
name: propertyAttribute.name,
class: schema.classes[propertyAttribute.class],
propertyAttribute: propertyAttribute,
- }),
+ })
);
}
}
diff --git a/packages/engine/Source/Scene/processVoxelProperties.js b/packages/engine/Source/Scene/processVoxelProperties.js
index cc90a6db5ead..4c91b7f120d2 100644
--- a/packages/engine/Source/Scene/processVoxelProperties.js
+++ b/packages/engine/Source/Scene/processVoxelProperties.js
@@ -15,8 +15,13 @@ import ShaderDestination from "../Renderer/ShaderDestination.js";
function processVoxelProperties(renderResources, primitive) {
const { shaderBuilder } = renderResources;
- const { names, types, componentTypes, minimumValues, maximumValues } =
- primitive._provider;
+ const {
+ names,
+ types,
+ componentTypes,
+ minimumValues,
+ maximumValues,
+ } = primitive._provider;
const attributeLength = types.length;
const hasStatistics = defined(minimumValues) && defined(maximumValues);
@@ -24,14 +29,14 @@ function processVoxelProperties(renderResources, primitive) {
shaderBuilder.addDefine(
"METADATA_COUNT",
attributeLength,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
if (hasStatistics) {
shaderBuilder.addDefine(
"STATISTICS",
undefined,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
}
@@ -44,7 +49,7 @@ function processVoxelProperties(renderResources, primitive) {
shaderBuilder.addStruct(
propertyStatisticsStructId,
propertyStatisticsStructName,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
const glslType = getGlslType(type);
shaderBuilder.addStructField(propertyStatisticsStructId, glslType, "min");
@@ -58,7 +63,7 @@ function processVoxelProperties(renderResources, primitive) {
shaderBuilder.addStruct(
statisticsStructId,
statisticsStructName,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
for (let i = 0; i < attributeLength; i++) {
const name = names[i];
@@ -67,7 +72,7 @@ function processVoxelProperties(renderResources, primitive) {
shaderBuilder.addStructField(
statisticsStructId,
propertyStructName,
- propertyFieldName,
+ propertyFieldName
);
}
@@ -78,12 +83,12 @@ function processVoxelProperties(renderResources, primitive) {
shaderBuilder.addStruct(
metadataStructId,
metadataStructName,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addStructField(
metadataStructId,
statisticsStructName,
- statisticsFieldName,
+ statisticsFieldName
);
for (let i = 0; i < attributeLength; i++) {
const name = names[i];
@@ -102,27 +107,27 @@ function processVoxelProperties(renderResources, primitive) {
shaderBuilder.addStruct(
voxelPropertyStructId,
voxelPropertyStructName,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addStructField(
voxelPropertyStructId,
glslType,
- "partialDerivativeLocal",
+ "partialDerivativeLocal"
);
shaderBuilder.addStructField(
voxelPropertyStructId,
glslType,
- "partialDerivativeWorld",
+ "partialDerivativeWorld"
);
shaderBuilder.addStructField(
voxelPropertyStructId,
glslType,
- "partialDerivativeView",
+ "partialDerivativeView"
);
shaderBuilder.addStructField(
voxelPropertyStructId,
glslType,
- "partialDerivativeValid",
+ "partialDerivativeValid"
);
}
@@ -133,7 +138,7 @@ function processVoxelProperties(renderResources, primitive) {
shaderBuilder.addStruct(
voxelStructId,
voxelStructName,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
for (let i = 0; i < attributeLength; i++) {
const name = names[i];
@@ -158,17 +163,17 @@ function processVoxelProperties(renderResources, primitive) {
shaderBuilder.addStruct(
fragmentInputStructId,
fragmentInputStructName,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addStructField(
fragmentInputStructId,
metadataStructName,
- metadataFieldName,
+ metadataFieldName
);
shaderBuilder.addStructField(
fragmentInputStructId,
voxelStructName,
- voxelFieldName,
+ voxelFieldName
);
// Properties struct
@@ -178,7 +183,7 @@ function processVoxelProperties(renderResources, primitive) {
shaderBuilder.addStruct(
propertiesStructId,
propertiesStructName,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
for (let i = 0; i < attributeLength; i++) {
const name = names[i];
@@ -195,7 +200,7 @@ function processVoxelProperties(renderResources, primitive) {
shaderBuilder.addFunction(
functionId,
`${propertiesStructName} clearProperties()`,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addFunctionLines(functionId, [
`${propertiesStructName} ${propertiesFieldName};`,
@@ -220,7 +225,7 @@ function processVoxelProperties(renderResources, primitive) {
shaderBuilder.addFunction(
functionId,
`${propertiesStructName} sumProperties(${propertiesStructName} propertiesA, ${propertiesStructName} propertiesB)`,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addFunctionLines(functionId, [
`${propertiesStructName} ${propertiesFieldName};`,
@@ -242,7 +247,7 @@ function processVoxelProperties(renderResources, primitive) {
shaderBuilder.addFunction(
functionId,
`${propertiesStructName} scaleProperties(${propertiesStructName} ${propertiesFieldName}, float scale)`,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addFunctionLines(functionId, [
`${propertiesStructName} scaledProperties = ${propertiesFieldName};`,
@@ -262,7 +267,7 @@ function processVoxelProperties(renderResources, primitive) {
shaderBuilder.addFunction(
functionId,
`${propertiesStructName} mixProperties(${propertiesStructName} propertiesA, ${propertiesStructName} propertiesB, float mixFactor)`,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addFunctionLines(functionId, [
`${propertiesStructName} ${propertiesFieldName};`,
@@ -284,7 +289,7 @@ function processVoxelProperties(renderResources, primitive) {
shaderBuilder.addFunction(
functionId,
`void copyPropertiesToMetadata(in ${propertiesStructName} ${propertiesFieldName}, inout ${metadataStructName} ${metadataFieldName})`,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
for (let i = 0; i < attributeLength; i++) {
const name = names[i];
@@ -300,7 +305,7 @@ function processVoxelProperties(renderResources, primitive) {
shaderBuilder.addFunction(
functionId,
`void setStatistics(inout ${statisticsStructName} ${statisticsFieldName})`,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
for (let i = 0; i < attributeLength; i++) {
const name = names[i];
@@ -312,10 +317,10 @@ function processVoxelProperties(renderResources, primitive) {
const maximumValue = maximumValues[i][j];
shaderBuilder.addFunctionLines(functionId, [
`${statisticsFieldName}.${name}.min${glslField} = ${getGlslNumberAsFloat(
- minimumValue,
+ minimumValue
)};`,
`${statisticsFieldName}.${name}.max${glslField} = ${getGlslNumberAsFloat(
- maximumValue,
+ maximumValue
)};`,
]);
}
@@ -328,7 +333,7 @@ function processVoxelProperties(renderResources, primitive) {
shaderBuilder.addFunction(
functionId,
`${propertiesStructName} getPropertiesFromMegatextureAtUv(vec2 texcoord)`,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addFunctionLines(functionId, [
`${propertiesStructName} ${propertiesFieldName};`,
diff --git a/packages/engine/Source/Shaders/Builtin/Constants/passGaussianSplats.glsl b/packages/engine/Source/Shaders/Builtin/Constants/passGaussianSplats.glsl
new file mode 100644
index 000000000000..e064b7c2a669
--- /dev/null
+++ b/packages/engine/Source/Shaders/Builtin/Constants/passGaussianSplats.glsl
@@ -0,0 +1,9 @@
+/**
+ * The automatic GLSL constant for {@link Pass#GAUSSIAN_SPLATS}
+ *
+ * @name czm_passGaussianSplats
+ * @glslConstant
+ *
+ * @see czm_pass
+ */
+const float czm_passGaussianSplats = 10.0;
diff --git a/packages/engine/Source/Shaders/Builtin/Constants/passOverlay.glsl b/packages/engine/Source/Shaders/Builtin/Constants/passOverlay.glsl
index 6aea11eb1ee0..b7c391e0165a 100644
--- a/packages/engine/Source/Shaders/Builtin/Constants/passOverlay.glsl
+++ b/packages/engine/Source/Shaders/Builtin/Constants/passOverlay.glsl
@@ -6,4 +6,4 @@
*
* @see czm_pass
*/
-const float czm_passOverlay = 10.0;
+const float czm_passOverlay = 11.0;
diff --git a/packages/engine/Source/Shaders/Model/GaussianSplatFS.glsl b/packages/engine/Source/Shaders/Model/GaussianSplatFS.glsl
new file mode 100644
index 000000000000..0af1ce0437ea
--- /dev/null
+++ b/packages/engine/Source/Shaders/Model/GaussianSplatFS.glsl
@@ -0,0 +1,8 @@
+void gaussianSplatStage(inout vec4 color, in ProcessedAttributes attributes) {
+ mediump float A = dot(v_vertPos, v_vertPos);
+ if(A > 1.0)
+ discard;
+ mediump float B = exp(-A * 4.0) * (v_splatColor.a);
+ color = vec4(v_splatColor.rgb * B, B);
+}
+
diff --git a/packages/engine/Source/Shaders/Model/GaussianSplatVS.glsl b/packages/engine/Source/Shaders/Model/GaussianSplatVS.glsl
new file mode 100644
index 000000000000..8c510a2b1c94
--- /dev/null
+++ b/packages/engine/Source/Shaders/Model/GaussianSplatVS.glsl
@@ -0,0 +1,202 @@
+#ifndef HAS_SPLAT_TEXTURE
+
+void calcCov3D(vec3 scale, vec4 rot, out float[6] cov3D)
+{
+ mat3 S = mat3(
+ u_splatScale * scale[0], 0, 0,
+ 0, u_splatScale * scale[1], 0,
+ 0, 0, u_splatScale * scale[2]
+ );
+
+ float r = rot.w;
+ float x = rot.x;
+ float y = rot.y;
+ float z = rot.z;
+
+ // Compute rotation matrix from quaternion
+ mat3 R = mat3(
+ 1. - 2. * (y * y + z * z),
+ 2. * (x * y - r * z),
+ 2. * (x * z + r * y),
+ 2. * (x * y + r * z),
+ 1. - 2. * (x * x + z * z),
+ 2. * (y * z - r * x),
+ 2. * (x * z - r * y),
+ 2. * (y * z + r * x),
+ 1. - 2. * (x * x + y * y)
+ );
+
+ mat3 M = S * R;
+ mat3 Sigma = transpose(M) * M;
+
+ //we only need part of it, symmetric
+ cov3D = float[6](
+ Sigma[0][0], Sigma[0][1], Sigma[0][2],
+ Sigma[1][1], Sigma[1][2], Sigma[2][2]
+ );
+
+}
+
+vec3 calcCov2D(vec3 worldPos, float focal_x, float focal_y, float tan_fovx, float tan_fovy, float[6] cov3D, mat4 viewmatrix) {
+ vec4 t = viewmatrix * vec4(worldPos, 1.0);
+
+ float limx = 1.3 * tan_fovx;
+ float limy = 1.3 * tan_fovy;
+ float txtz = t.x / t.z;
+ float tytz = t.y / t.z;
+ t.x = min(limx, max(-limx, txtz)) * t.z;
+ t.y = min(limy, max(-limy, tytz)) * t.z;
+
+ mat3 J = mat3(
+ focal_x / t.z, 0, -(focal_x * t.x) / (t.z * t.z),
+ 0, focal_y / t.z, -(focal_y * t.y) / (t.z * t.z),
+ 0, 0, 0
+ );
+
+ mat3 W = mat3(
+ viewmatrix[0][0], viewmatrix[1][0], viewmatrix[2][0],
+ viewmatrix[0][1], viewmatrix[1][1], viewmatrix[2][1],
+ viewmatrix[0][2], viewmatrix[1][2], viewmatrix[2][2]
+ );
+ mat3 T = W * J;
+ mat3 Vrk = mat3(
+ cov3D[0], cov3D[1], cov3D[2],
+ cov3D[1], cov3D[3], cov3D[4],
+ cov3D[2], cov3D[4], cov3D[5]
+ );
+
+ mat3 cov = transpose(T) * transpose(Vrk) * T;
+
+ cov[0][0] += .3;
+ cov[1][1] += .3;
+ return vec3(cov[0][0], cov[0][1], cov[1][1]);
+}
+
+vec3 dequantizePos(uvec3 qPos) {
+ vec3 normalizedPos = vec3(qPos) / 65535.0;
+
+ vec4 worldPos = u_scalingMatrix * vec4(normalizedPos, 1.0);
+
+ return vec3(worldPos);
+}
+
+
+void gaussianSplatStage(ProcessedAttributes attributes, inout vec4 positionClip) {
+ mat4 viewMatrix = czm_modelView;
+
+ vec3 deqPos = dequantizePos(a_splatPosition);
+ vec4 clipPosition = czm_modelViewProjection * vec4(deqPos ,1.0);
+ positionClip = clipPosition;
+
+ float[6] cov3D;
+ calcCov3D(attributes.scale, attributes.rotation, cov3D);
+ vec3 cov = calcCov2D(deqPos, u_focalX, u_focalY, u_tan_fovX, u_tan_fovY, cov3D, viewMatrix);
+
+ float mid = (cov.x + cov.z) / 2.0;
+ float radius = length(vec2((cov.x - cov.z) / 2.0, cov.y));
+ float lambda1 = mid + radius, lambda2 = mid - radius;
+
+ if(lambda2 < 0.0) return;
+ vec2 diagonalVector = normalize(vec2(cov.y, lambda1 - cov.x));
+ vec2 v1 = min(sqrt(2.0 * lambda1), 1024.0) * diagonalVector;
+ vec2 v2 = min(sqrt(2.0 * lambda2), 1024.0) * vec2(diagonalVector.y, -diagonalVector.x);
+
+ vec2 corner = vec2((gl_VertexID << 1) & 2, gl_VertexID & 2) - 1.;
+ positionClip += vec4((corner.x * v1 + corner.y * v2) * 4.0 / czm_viewport.zw * positionClip.w, 0, 0);
+ positionClip.z = clamp(positionClip.z, -abs(positionClip.w), abs(positionClip.w));
+ v_vertPos = corner ;
+ v_splatColor = a_splatColor;
+}
+
+#else
+
+vec4 calcCovVectors(vec3 worldPos, mat3 Vrk, mat3 viewmatrix) {
+ vec4 t = vec4(worldPos, 1.0);
+ float focal = czm_viewport.z * czm_projection[0][0];
+
+ float J1 = focal / t.z;
+ vec2 J2 = -J1 / t.z * t.xy;
+ mat3 J = mat3(
+ J1, 0.0, J2.x,
+ 0.0, J1, J2.y,
+ 0.0, 0.0, 0.0
+ );
+
+ mat3 T = viewmatrix * J;
+ mat3 cov = transpose(T) * Vrk * T;
+
+ float diagonal1 = cov[0][0] + .3;
+ float offDiagonal = cov[0][1];
+ float diagonal2 = cov[1][1] + .3;
+
+ float mid = 0.5 * (diagonal1 + diagonal2);
+ float radius = length(vec2((diagonal1 - diagonal2) * 0.5, offDiagonal));
+ float lambda1 = mid + radius;
+ float lambda2 = max(mid - radius, 0.1);
+
+ vec2 diagonalVector = normalize(vec2(offDiagonal, lambda1 - diagonal1));
+
+ return vec4(
+ min(sqrt(2.0 * lambda1), 1024.0) * diagonalVector,
+ min(sqrt(2.0 * lambda2), 1024.0) * vec2(diagonalVector.y, -diagonalVector.x)
+ );
+}
+
+highp vec4 discardVec = vec4(0.0, 0.0, 2.0, 1.0);
+
+vec4 dequantizePos(uvec4 qPos) {
+ vec3 normalizedPos = vec3(qPos) / 65535.0;
+
+ vec4 worldPos = u_scalingMatrix * vec4(normalizedPos, 1.0);
+
+ return worldPos;
+}
+
+void gaussianSplatStage(ProcessedAttributes attributes, inout vec4 positionClip) {
+ uint texIdx = uint(a_splatIndex);
+ ivec2 posCoord = ivec2((texIdx & 0x3ffu) << 1, texIdx >> 10);
+ vec4 splatPosition = vec4( uintBitsToFloat(uvec4(texelFetch(u_splatAttributeTexture, posCoord, 0))) );
+ //vec4 splatPosition = dequantizePos(uvec4(texelFetch(u_splatAttributeTexture, posCoord, 0)));
+
+ vec4 splatViewPos = czm_modelView * vec4(splatPosition.xyz, 1.0);
+ vec4 clipPosition = czm_projection * splatViewPos;
+
+ float clip = 1.2 * clipPosition.w;
+ if (clipPosition.z < -clip || clipPosition.x < -clip || clipPosition.x > clip ||
+ clipPosition.y < -clip || clipPosition.y > clip) {
+ positionClip = vec4(0.0, 0.0, 2.0, 1.0);
+ return;
+ }
+
+ ivec2 covCoord = ivec2(((texIdx & 0x3ffu) << 1) | 1u, texIdx >> 10);
+ uvec4 covariance = uvec4(texelFetch(u_splatAttributeTexture, covCoord, 0));
+
+ positionClip = clipPosition;
+
+ vec2 u1 = unpackHalf2x16(covariance.x) ;
+ vec2 u2 = unpackHalf2x16(covariance.y);
+ vec2 u3 = unpackHalf2x16(covariance.z);
+ mat3 Vrk = mat3(u1.x, u1.y, u2.x, u1.y, u2.y, u3.x, u2.x, u3.x, u3.y);
+
+ vec4 covVectors = calcCovVectors(
+ splatViewPos.xyz,
+ Vrk,
+ mat3(transpose(czm_modelView))
+ );
+
+ if (dot(covVectors.xy, covVectors.xy) < 4.0 && dot(covVectors.zw, covVectors.zw) < 4.0) {
+ gl_Position = discardVec;
+ return;
+ }
+
+ vec2 corner = vec2((gl_VertexID << 1) & 2, gl_VertexID & 2) - 1.;
+
+ positionClip += vec4((corner.x * covVectors.xy + corner.y * covVectors.zw) / czm_viewport.zw * positionClip.w, 0, 0);
+ positionClip.z = clamp(positionClip.z, -abs(positionClip.w), abs(positionClip.w));
+
+ v_vertPos = corner ;
+ v_splatColor = vec4(covariance.w & 0xffu, (covariance.w >> 8) & 0xffu, (covariance.w >> 16) & 0xffu, (covariance.w >> 24) & 0xffu) / 255.0;
+}
+
+
+#endif
diff --git a/packages/engine/Source/Shaders/Model/ModelFS.glsl b/packages/engine/Source/Shaders/Model/ModelFS.glsl
index 0500c0b9f1ff..fd73d6f97faf 100644
--- a/packages/engine/Source/Shaders/Model/ModelFS.glsl
+++ b/packages/engine/Source/Shaders/Model/ModelFS.glsl
@@ -1,5 +1,6 @@
precision highp float;
+
czm_modelMaterial defaultModelMaterial()
{
czm_modelMaterial material;
@@ -79,7 +80,7 @@ void main()
// When not picking metadata END
//========================================================================
- #else
+ #else
//========================================================================
// When picking metadata START
@@ -111,9 +112,14 @@ void main()
atmosphereStage(color, attributes);
#endif
+ #ifdef HAS_GAUSSIAN_SPLATS
+ gaussianSplatStage(color, attributes);
+ #endif
+
#endif
// When not picking metadata END
//========================================================================
out_FragColor = color;
}
+
diff --git a/packages/engine/Source/Shaders/Model/ModelVS.glsl b/packages/engine/Source/Shaders/Model/ModelVS.glsl
index b95b329f59ff..a055a69e830c 100644
--- a/packages/engine/Source/Shaders/Model/ModelVS.glsl
+++ b/packages/engine/Source/Shaders/Model/ModelVS.glsl
@@ -134,15 +134,19 @@ void main()
#endif
#ifdef PRIMITIVE_TYPE_POINTS
- #ifdef HAS_CUSTOM_VERTEX_SHADER
- gl_PointSize = vsOutput.pointSize;
- #elif defined(HAS_POINT_CLOUD_POINT_SIZE_STYLE) || defined(HAS_POINT_CLOUD_ATTENUATION)
- gl_PointSize = pointCloudPointSizeStylingStage(attributes, metadata);
- #else
- gl_PointSize = 1.0;
- #endif
- gl_PointSize *= show;
+ #ifdef HAS_CUSTOM_VERTEX_SHADER
+ gl_PointSize = vsOutput.pointSize;
+ #elif defined(HAS_POINT_CLOUD_POINT_SIZE_STYLE) || defined(HAS_POINT_CLOUD_ATTENUATION)
+ gl_PointSize = pointCloudPointSizeStylingStage(attributes, metadata);
+ #else
+ gl_PointSize = 1.0;
+ #endif
+ gl_PointSize *= show;
+ #endif
+
+ #ifdef HAS_GAUSSIAN_SPLATS
+ gaussianSplatStage(attributes, positionClip);
#endif
gl_Position = show * positionClip;
diff --git a/packages/engine/Source/Shaders/Model/PointCloudStylingStageVS.glsl b/packages/engine/Source/Shaders/Model/PointCloudStylingStageVS.glsl
index e3fd4cfc0f9f..0d46fb382963 100644
--- a/packages/engine/Source/Shaders/Model/PointCloudStylingStageVS.glsl
+++ b/packages/engine/Source/Shaders/Model/PointCloudStylingStageVS.glsl
@@ -42,4 +42,4 @@ float pointCloudBackFaceCullingStage() {
return 1.0;
#endif
}
-#endif
\ No newline at end of file
+#endif
diff --git a/packages/engine/Source/Widget/CesiumWidget.js b/packages/engine/Source/Widget/CesiumWidget.js
index 3d01ca4c3c4d..20b2e7172ec2 100644
--- a/packages/engine/Source/Widget/CesiumWidget.js
+++ b/packages/engine/Source/Widget/CesiumWidget.js
@@ -192,8 +192,7 @@ function CesiumWidget(container, options) {
container.appendChild(element);
const canvas = document.createElement("canvas");
- const supportsImageRenderingPixelated =
- FeatureDetection.supportsImageRenderingPixelated();
+ const supportsImageRenderingPixelated = FeatureDetection.supportsImageRenderingPixelated();
this._supportsImageRenderingPixelated = supportsImageRenderingPixelated;
if (supportsImageRenderingPixelated) {
canvas.style.imageRendering = FeatureDetection.imageRenderingValue();
@@ -222,7 +221,7 @@ function CesiumWidget(container, options) {
const blurActiveElementOnCanvasFocus = defaultValue(
options.blurActiveElementOnCanvasFocus,
- true,
+ true
);
if (blurActiveElementOnCanvasFocus) {
@@ -248,7 +247,7 @@ function CesiumWidget(container, options) {
const useBrowserRecommendedResolution = defaultValue(
options.useBrowserRecommendedResolution,
- true,
+ true
);
this._element = element;
@@ -304,7 +303,7 @@ function CesiumWidget(container, options) {
scene.globe = globe;
scene.globe.shadows = defaultValue(
options.terrainShadows,
- ShadowMode.RECEIVE_ONLY,
+ ShadowMode.RECEIVE_ONLY
);
}
@@ -349,7 +348,7 @@ function CesiumWidget(container, options) {
//>>includeStart('debug', pragmas.debug);
if (defined(options.terrainProvider)) {
throw new DeveloperError(
- "Specify either options.terrainProvider or options.terrain.",
+ "Specify either options.terrainProvider or options.terrain."
);
}
//>>includeEnd('debug')
@@ -371,7 +370,7 @@ function CesiumWidget(container, options) {
this._useDefaultRenderLoop = undefined;
this.useDefaultRenderLoop = defaultValue(
options.useDefaultRenderLoop,
- true,
+ true
);
this._targetFrameRate = undefined;
@@ -574,7 +573,7 @@ Object.defineProperties(CesiumWidget.prototype, {
//>>includeStart('debug', pragmas.debug);
if (value <= 0) {
throw new DeveloperError(
- "targetFrameRate must be greater than 0, or undefined.",
+ "targetFrameRate must be greater than 0, or undefined."
);
}
//>>includeEnd('debug');
@@ -694,7 +693,7 @@ CesiumWidget.prototype.showErrorPanel = function (title, message, error) {
function resizeCallback() {
errorPanelScroller.style.maxHeight = `${Math.max(
Math.round(element.clientHeight * 0.9 - 100),
- 30,
+ 30
)}px`;
}
resizeCallback();
diff --git a/packages/engine/Source/Workers/combineGeometry.js b/packages/engine/Source/Workers/combineGeometry.js
index b2f78de13636..6ce02cf5c665 100644
--- a/packages/engine/Source/Workers/combineGeometry.js
+++ b/packages/engine/Source/Workers/combineGeometry.js
@@ -2,12 +2,13 @@ import PrimitivePipeline from "../Scene/PrimitivePipeline.js";
import createTaskProcessorWorker from "./createTaskProcessorWorker.js";
function combineGeometry(packedParameters, transferableObjects) {
- const parameters =
- PrimitivePipeline.unpackCombineGeometryParameters(packedParameters);
+ const parameters = PrimitivePipeline.unpackCombineGeometryParameters(
+ packedParameters
+ );
const results = PrimitivePipeline.combineGeometry(parameters);
return PrimitivePipeline.packCombineGeometryResults(
results,
- transferableObjects,
+ transferableObjects
);
}
export default createTaskProcessorWorker(combineGeometry);
diff --git a/packages/engine/Source/Workers/createCircleGeometry.js b/packages/engine/Source/Workers/createCircleGeometry.js
index be9f4796a31e..63c6e18b8e4a 100644
--- a/packages/engine/Source/Workers/createCircleGeometry.js
+++ b/packages/engine/Source/Workers/createCircleGeometry.js
@@ -8,10 +8,10 @@ function createCircleGeometry(circleGeometry, offset) {
circleGeometry = CircleGeometry.unpack(circleGeometry, offset);
}
circleGeometry._ellipseGeometry._center = Cartesian3.clone(
- circleGeometry._ellipseGeometry._center,
+ circleGeometry._ellipseGeometry._center
);
circleGeometry._ellipseGeometry._ellipsoid = Ellipsoid.clone(
- circleGeometry._ellipseGeometry._ellipsoid,
+ circleGeometry._ellipseGeometry._ellipsoid
);
return CircleGeometry.createGeometry(circleGeometry);
}
diff --git a/packages/engine/Source/Workers/createCircleOutlineGeometry.js b/packages/engine/Source/Workers/createCircleOutlineGeometry.js
index e0522dd0c114..cb31541d49fd 100644
--- a/packages/engine/Source/Workers/createCircleOutlineGeometry.js
+++ b/packages/engine/Source/Workers/createCircleOutlineGeometry.js
@@ -8,10 +8,10 @@ function createCircleOutlineGeometry(circleGeometry, offset) {
circleGeometry = CircleOutlineGeometry.unpack(circleGeometry, offset);
}
circleGeometry._ellipseGeometry._center = Cartesian3.clone(
- circleGeometry._ellipseGeometry._center,
+ circleGeometry._ellipseGeometry._center
);
circleGeometry._ellipseGeometry._ellipsoid = Ellipsoid.clone(
- circleGeometry._ellipseGeometry._ellipsoid,
+ circleGeometry._ellipseGeometry._ellipsoid
);
return CircleOutlineGeometry.createGeometry(circleGeometry);
}
diff --git a/packages/engine/Source/Workers/createCoplanarPolygonOutlineGeometry.js b/packages/engine/Source/Workers/createCoplanarPolygonOutlineGeometry.js
index d60c1658397f..11c13093b367 100644
--- a/packages/engine/Source/Workers/createCoplanarPolygonOutlineGeometry.js
+++ b/packages/engine/Source/Workers/createCoplanarPolygonOutlineGeometry.js
@@ -6,7 +6,7 @@ function createCoplanarPolygonOutlineGeometry(polygonGeometry, offset) {
if (defined(offset)) {
polygonGeometry = CoplanarPolygonOutlineGeometry.unpack(
polygonGeometry,
- offset,
+ offset
);
}
polygonGeometry._ellipsoid = Ellipsoid.clone(polygonGeometry._ellipsoid);
diff --git a/packages/engine/Source/Workers/createCorridorOutlineGeometry.js b/packages/engine/Source/Workers/createCorridorOutlineGeometry.js
index 1967a82d1b7a..d5a13d71c009 100644
--- a/packages/engine/Source/Workers/createCorridorOutlineGeometry.js
+++ b/packages/engine/Source/Workers/createCorridorOutlineGeometry.js
@@ -6,11 +6,11 @@ function createCorridorOutlineGeometry(corridorOutlineGeometry, offset) {
if (defined(offset)) {
corridorOutlineGeometry = CorridorOutlineGeometry.unpack(
corridorOutlineGeometry,
- offset,
+ offset
);
}
corridorOutlineGeometry._ellipsoid = Ellipsoid.clone(
- corridorOutlineGeometry._ellipsoid,
+ corridorOutlineGeometry._ellipsoid
);
return CorridorOutlineGeometry.createGeometry(corridorOutlineGeometry);
}
diff --git a/packages/engine/Source/Workers/createEllipsoidOutlineGeometry.js b/packages/engine/Source/Workers/createEllipsoidOutlineGeometry.js
index d56e6c225087..f01eb9178541 100644
--- a/packages/engine/Source/Workers/createEllipsoidOutlineGeometry.js
+++ b/packages/engine/Source/Workers/createEllipsoidOutlineGeometry.js
@@ -5,7 +5,7 @@ function createEllipsoidOutlineGeometry(ellipsoidGeometry, offset) {
if (defined(ellipsoidGeometry.buffer, offset)) {
ellipsoidGeometry = EllipsoidOutlineGeometry.unpack(
ellipsoidGeometry,
- offset,
+ offset
);
}
return EllipsoidOutlineGeometry.createGeometry(ellipsoidGeometry);
diff --git a/packages/engine/Source/Workers/createGeometry.js b/packages/engine/Source/Workers/createGeometry.js
index e0a458a5a0cf..7e31d04505b2 100644
--- a/packages/engine/Source/Workers/createGeometry.js
+++ b/packages/engine/Source/Workers/createGeometry.js
@@ -60,9 +60,10 @@ async function createGeometry(parameters, transferableObjects) {
}
if (defined(moduleName) || defined(modulePath)) {
- resultsOrPromises[i] = getModule(moduleName, modulePath).then(
- (createFunction) => createFunction(geometry, task.offset),
- );
+ resultsOrPromises[i] = getModule(
+ moduleName,
+ modulePath
+ ).then((createFunction) => createFunction(geometry, task.offset));
} else {
// Already created geometry
resultsOrPromises[i] = geometry;
@@ -72,7 +73,7 @@ async function createGeometry(parameters, transferableObjects) {
return Promise.all(resultsOrPromises).then(function (results) {
return PrimitivePipeline.packCreateGeometryResults(
results,
- transferableObjects,
+ transferableObjects
);
});
}
diff --git a/packages/engine/Source/Workers/createGroundPolylineGeometry.js b/packages/engine/Source/Workers/createGroundPolylineGeometry.js
index 3884975ce10b..78705ce7c8ad 100644
--- a/packages/engine/Source/Workers/createGroundPolylineGeometry.js
+++ b/packages/engine/Source/Workers/createGroundPolylineGeometry.js
@@ -7,7 +7,7 @@ function createGroundPolylineGeometry(groundPolylineGeometry, offset) {
if (defined(offset)) {
groundPolylineGeometry = GroundPolylineGeometry.unpack(
groundPolylineGeometry,
- offset,
+ offset
);
}
return GroundPolylineGeometry.createGeometry(groundPolylineGeometry);
diff --git a/packages/engine/Source/Workers/createPolylineVolumeGeometry.js b/packages/engine/Source/Workers/createPolylineVolumeGeometry.js
index 804dde7d4c30..e537225ca3b1 100644
--- a/packages/engine/Source/Workers/createPolylineVolumeGeometry.js
+++ b/packages/engine/Source/Workers/createPolylineVolumeGeometry.js
@@ -6,11 +6,11 @@ function createPolylineVolumeGeometry(polylineVolumeGeometry, offset) {
if (defined(offset)) {
polylineVolumeGeometry = PolylineVolumeGeometry.unpack(
polylineVolumeGeometry,
- offset,
+ offset
);
}
polylineVolumeGeometry._ellipsoid = Ellipsoid.clone(
- polylineVolumeGeometry._ellipsoid,
+ polylineVolumeGeometry._ellipsoid
);
return PolylineVolumeGeometry.createGeometry(polylineVolumeGeometry);
}
diff --git a/packages/engine/Source/Workers/createPolylineVolumeOutlineGeometry.js b/packages/engine/Source/Workers/createPolylineVolumeOutlineGeometry.js
index f69ade704988..e701a1b397a3 100644
--- a/packages/engine/Source/Workers/createPolylineVolumeOutlineGeometry.js
+++ b/packages/engine/Source/Workers/createPolylineVolumeOutlineGeometry.js
@@ -4,19 +4,19 @@ import PolylineVolumeOutlineGeometry from "../Core/PolylineVolumeOutlineGeometry
function createPolylineVolumeOutlineGeometry(
polylineVolumeOutlineGeometry,
- offset,
+ offset
) {
if (defined(offset)) {
polylineVolumeOutlineGeometry = PolylineVolumeOutlineGeometry.unpack(
polylineVolumeOutlineGeometry,
- offset,
+ offset
);
}
polylineVolumeOutlineGeometry._ellipsoid = Ellipsoid.clone(
- polylineVolumeOutlineGeometry._ellipsoid,
+ polylineVolumeOutlineGeometry._ellipsoid
);
return PolylineVolumeOutlineGeometry.createGeometry(
- polylineVolumeOutlineGeometry,
+ polylineVolumeOutlineGeometry
);
}
export default createPolylineVolumeOutlineGeometry;
diff --git a/packages/engine/Source/Workers/createRectangleOutlineGeometry.js b/packages/engine/Source/Workers/createRectangleOutlineGeometry.js
index 269fae5dc3af..80a0ed6e6ef7 100644
--- a/packages/engine/Source/Workers/createRectangleOutlineGeometry.js
+++ b/packages/engine/Source/Workers/createRectangleOutlineGeometry.js
@@ -7,7 +7,7 @@ function createRectangleOutlineGeometry(rectangleGeometry, offset) {
if (defined(offset)) {
rectangleGeometry = RectangleOutlineGeometry.unpack(
rectangleGeometry,
- offset,
+ offset
);
}
rectangleGeometry._ellipsoid = Ellipsoid.clone(rectangleGeometry._ellipsoid);
diff --git a/packages/engine/Source/Workers/createSimplePolylineGeometry.js b/packages/engine/Source/Workers/createSimplePolylineGeometry.js
index bd77fa8fac90..dabd1f3f698f 100644
--- a/packages/engine/Source/Workers/createSimplePolylineGeometry.js
+++ b/packages/engine/Source/Workers/createSimplePolylineGeometry.js
@@ -6,11 +6,11 @@ function createSimplePolylineGeometry(simplePolylineGeometry, offset) {
if (defined(offset)) {
simplePolylineGeometry = SimplePolylineGeometry.unpack(
simplePolylineGeometry,
- offset,
+ offset
);
}
simplePolylineGeometry._ellipsoid = Ellipsoid.clone(
- simplePolylineGeometry._ellipsoid,
+ simplePolylineGeometry._ellipsoid
);
return SimplePolylineGeometry.createGeometry(simplePolylineGeometry);
}
diff --git a/packages/engine/Source/Workers/createTaskProcessorWorker.js b/packages/engine/Source/Workers/createTaskProcessorWorker.js
index 479538d69643..deffad5ab06e 100644
--- a/packages/engine/Source/Workers/createTaskProcessorWorker.js
+++ b/packages/engine/Source/Workers/createTaskProcessorWorker.js
@@ -62,7 +62,7 @@ function createTaskProcessorWorker(workerFunction) {
// error that we can be sure will be cloneable
responseMessage.result = undefined;
responseMessage.error = `postMessage failed with error: ${formatError(
- error,
+ error
)}\n with responseMessage: ${JSON.stringify(responseMessage)}`;
postMessage(responseMessage);
}
diff --git a/packages/engine/Source/Workers/createVectorTileClampedPolylines.js b/packages/engine/Source/Workers/createVectorTileClampedPolylines.js
index 2a00b1bb71cd..67887ed30989 100644
--- a/packages/engine/Source/Workers/createVectorTileClampedPolylines.js
+++ b/packages/engine/Source/Workers/createVectorTileClampedPolylines.js
@@ -21,7 +21,7 @@ function decodePositions(
rectangle,
minimumHeight,
maximumHeight,
- ellipsoid,
+ ellipsoid
) {
const positionsLength = uBuffer.length;
const decodedPositions = new Float64Array(positionsLength * 3);
@@ -34,7 +34,7 @@ function decodePositions(
const lat = CesiumMath.lerp(
rectangle.south,
rectangle.north,
- v / MAX_SHORT,
+ v / MAX_SHORT
);
const alt = CesiumMath.lerp(minimumHeight, maximumHeight, h / MAX_SHORT);
@@ -42,11 +42,11 @@ function decodePositions(
lon,
lat,
alt,
- scratchBVCartographic,
+ scratchBVCartographic
);
const decodedPosition = ellipsoid.cartographicToCartesian(
cartographic,
- scratchEncodedPosition,
+ scratchEncodedPosition
);
Cartesian3.pack(decodedPosition, decodedPositions, i * 3);
}
@@ -134,17 +134,17 @@ function computeMiteredNormal(
position,
nextPosition,
ellipsoidSurfaceNormal,
- result,
+ result
) {
const towardNext = Cartesian3.subtract(
nextPosition,
position,
- towardNextScratch,
+ towardNextScratch
);
let towardCurr = Cartesian3.subtract(
position,
previousPosition,
- towardCurrScratch,
+ towardCurrScratch
);
Cartesian3.normalize(towardNext, towardNext);
Cartesian3.normalize(towardCurr, towardCurr);
@@ -153,7 +153,7 @@ function computeMiteredNormal(
towardCurr = Cartesian3.multiplyByScalar(
towardCurr,
-1.0,
- towardCurrScratch,
+ towardCurrScratch
);
}
@@ -233,17 +233,17 @@ VertexAttributesAndIndices.prototype.addVolume = function (
halfWidth,
batchId,
center,
- ellipsoid,
+ ellipsoid
) {
let position = Cartesian3.add(startRTC, center, positionScratch);
const startEllipsoidNormal = ellipsoid.geodeticSurfaceNormal(
position,
- scratchStartEllipsoidNormal,
+ scratchStartEllipsoidNormal
);
position = Cartesian3.add(endRTC, center, positionScratch);
const endEllipsoidNormal = ellipsoid.geodeticSurfaceNormal(
position,
- scratchEndEllipsoidNormal,
+ scratchEndEllipsoidNormal
);
const startFaceNormal = computeMiteredNormal(
@@ -251,21 +251,21 @@ VertexAttributesAndIndices.prototype.addVolume = function (
startRTC,
endRTC,
startEllipsoidNormal,
- scratchStartFaceNormal,
+ scratchStartFaceNormal
);
const endFaceNormal = computeMiteredNormal(
postEndRTC,
endRTC,
startRTC,
endEllipsoidNormal,
- scratchEndFaceNormal,
+ scratchEndFaceNormal
);
const startEllipsoidNormals = this.startEllipsoidNormals;
const endEllipsoidNormals = this.endEllipsoidNormals;
const startPositionAndHeights = this.startPositionAndHeights;
- const startFaceNormalAndVertexCornerIds =
- this.startFaceNormalAndVertexCornerIds;
+ const startFaceNormalAndVertexCornerIds = this
+ .startFaceNormalAndVertexCornerIds;
const endPositionAndHeights = this.endPositionAndHeights;
const endFaceNormalAndHalfWidths = this.endFaceNormalAndHalfWidths;
const vertexBatchIds = this.vertexBatchIds;
@@ -288,7 +288,7 @@ VertexAttributesAndIndices.prototype.addVolume = function (
Cartesian3.pack(
startFaceNormal,
startFaceNormalAndVertexCornerIds,
- vec4Offset,
+ vec4Offset
);
startFaceNormalAndVertexCornerIds[vec4Offset + 3] = i;
@@ -355,11 +355,11 @@ function createVectorTileClampedPolylines(parameters, transferableObjects) {
const uBuffer = encodedPositions.subarray(0, positionsLength);
const vBuffer = encodedPositions.subarray(
positionsLength,
- 2 * positionsLength,
+ 2 * positionsLength
);
const heightBuffer = encodedPositions.subarray(
2 * positionsLength,
- 3 * positionsLength,
+ 3 * positionsLength
);
AttributeCompression.zigZagDeltaDecode(uBuffer, vBuffer, heightBuffer);
@@ -383,7 +383,7 @@ function createVectorTileClampedPolylines(parameters, transferableObjects) {
minimumHeight,
maximumHeight,
ellipsoid,
- center,
+ center
);
positionsLength = uBuffer.length;
@@ -405,12 +405,12 @@ function createVectorTileClampedPolylines(parameters, transferableObjects) {
const volumeStart = Cartesian3.unpack(
positionsRTC,
currentPositionIndex,
- scratchP0,
+ scratchP0
);
const volumeEnd = Cartesian3.unpack(
positionsRTC,
currentPositionIndex + 3,
- scratchP1,
+ scratchP1
);
let startHeight = heightBuffer[currentHeightIndex];
@@ -418,12 +418,12 @@ function createVectorTileClampedPolylines(parameters, transferableObjects) {
startHeight = CesiumMath.lerp(
minimumHeight,
maximumHeight,
- startHeight / MAX_SHORT,
+ startHeight / MAX_SHORT
);
endHeight = CesiumMath.lerp(
minimumHeight,
maximumHeight,
- endHeight / MAX_SHORT,
+ endHeight / MAX_SHORT
);
currentHeightIndex++;
@@ -437,7 +437,7 @@ function createVectorTileClampedPolylines(parameters, transferableObjects) {
const finalPosition = Cartesian3.unpack(
positionsRTC,
finalPositionIndex,
- scratchPrev,
+ scratchPrev
);
if (Cartesian3.equals(finalPosition, volumeStart)) {
Cartesian3.unpack(positionsRTC, finalPositionIndex - 3, preStart);
@@ -445,7 +445,7 @@ function createVectorTileClampedPolylines(parameters, transferableObjects) {
const offsetPastStart = Cartesian3.subtract(
volumeStart,
volumeEnd,
- scratchPrev,
+ scratchPrev
);
preStart = Cartesian3.add(offsetPastStart, volumeStart, scratchPrev);
}
@@ -458,19 +458,19 @@ function createVectorTileClampedPolylines(parameters, transferableObjects) {
const firstPosition = Cartesian3.unpack(
positionsRTC,
volumeFirstPositionIndex,
- scratchNext,
+ scratchNext
);
if (Cartesian3.equals(firstPosition, volumeEnd)) {
Cartesian3.unpack(
positionsRTC,
volumeFirstPositionIndex + 3,
- postEnd,
+ postEnd
);
} else {
const offsetPastEnd = Cartesian3.subtract(
volumeEnd,
volumeStart,
- scratchNext,
+ scratchNext
);
postEnd = Cartesian3.add(offsetPastEnd, volumeEnd, scratchNext);
}
@@ -488,7 +488,7 @@ function createVectorTileClampedPolylines(parameters, transferableObjects) {
halfWidth,
batchId,
center,
- ellipsoid,
+ ellipsoid
);
currentPositionIndex += 3;
@@ -503,7 +503,7 @@ function createVectorTileClampedPolylines(parameters, transferableObjects) {
transferableObjects.push(attribsAndIndices.endEllipsoidNormals.buffer);
transferableObjects.push(attribsAndIndices.startPositionAndHeights.buffer);
transferableObjects.push(
- attribsAndIndices.startFaceNormalAndVertexCornerIds.buffer,
+ attribsAndIndices.startFaceNormalAndVertexCornerIds.buffer
);
transferableObjects.push(attribsAndIndices.endPositionAndHeights.buffer);
transferableObjects.push(attribsAndIndices.endFaceNormalAndHalfWidths.buffer);
diff --git a/packages/engine/Source/Workers/createVectorTileGeometries.js b/packages/engine/Source/Workers/createVectorTileGeometries.js
index 417019747147..bdb4218c4d82 100644
--- a/packages/engine/Source/Workers/createVectorTileGeometries.js
+++ b/packages/engine/Source/Workers/createVectorTileGeometries.js
@@ -31,7 +31,7 @@ function boxModelMatrixAndBoundingVolume(boxes, index) {
const boxModelMatrix = Matrix4.unpack(
boxes,
boxIndex,
- scratchModelMatrixAndBV.modelMatrix,
+ scratchModelMatrixAndBV.modelMatrix
);
Matrix4.multiplyByScale(boxModelMatrix, dimensions, boxModelMatrix);
@@ -51,13 +51,13 @@ function cylinderModelMatrixAndBoundingVolume(cylinders, index) {
cylinderRadius,
cylinderRadius,
length,
- scratchCartesian,
+ scratchCartesian
);
const cylinderModelMatrix = Matrix4.unpack(
cylinders,
cylinderIndex,
- scratchModelMatrixAndBV.modelMatrix,
+ scratchModelMatrixAndBV.modelMatrix
);
Matrix4.multiplyByScale(cylinderModelMatrix, scale, cylinderModelMatrix);
@@ -77,7 +77,7 @@ function ellipsoidModelMatrixAndBoundingVolume(ellipsoids, index) {
const ellipsoidModelMatrix = Matrix4.unpack(
ellipsoids,
ellipsoidIndex,
- scratchModelMatrixAndBV.modelMatrix,
+ scratchModelMatrixAndBV.modelMatrix
);
Matrix4.multiplyByScale(ellipsoidModelMatrix, radii, ellipsoidModelMatrix);
@@ -96,16 +96,16 @@ function sphereModelMatrixAndBoundingVolume(spheres, index) {
const sphereTranslation = Cartesian3.unpack(
spheres,
sphereIndex,
- scratchCartesian,
+ scratchCartesian
);
const sphereModelMatrix = Matrix4.fromTranslation(
sphereTranslation,
- scratchModelMatrixAndBV.modelMatrix,
+ scratchModelMatrixAndBV.modelMatrix
);
Matrix4.multiplyByUniformScale(
sphereModelMatrix,
sphereRadius,
- sphereModelMatrix,
+ sphereModelMatrix
);
const boundingVolume = scratchModelMatrixAndBV.boundingVolume;
@@ -122,7 +122,7 @@ function createPrimitive(
primitive,
primitiveBatchIds,
geometry,
- getModelMatrixAndBoundingVolume,
+ getModelMatrixAndBoundingVolume
) {
if (!defined(primitive)) {
return;
@@ -154,7 +154,7 @@ function createPrimitive(
for (let i = 0; i < numberOfPrimitives; ++i) {
const primitiveModelMatrixAndBV = getModelMatrixAndBoundingVolume(
primitive,
- i,
+ i
);
const primitiveModelMatrix = primitiveModelMatrixAndBV.modelMatrix;
Matrix4.multiply(modelMatrix, primitiveModelMatrix, primitiveModelMatrix);
@@ -188,7 +188,7 @@ function createPrimitive(
indexCounts[offset] = indicesLength;
boundingVolumes[offset] = BoundingSphere.transform(
primitiveModelMatrixAndBV.boundingVolume,
- primitiveModelMatrix,
+ primitiveModelMatrix
);
positionOffset += positionsLength / 3;
@@ -324,7 +324,7 @@ function createVectorTileGeometries(parameters, transferableObjects) {
const vertexBatchIds = new Uint16Array(numberOfPositions / 3);
const indices = IndexDatatype.createTypedArray(
numberOfPositions / 3,
- numberOfIndices,
+ numberOfIndices
);
const numberOfGeometries =
@@ -360,44 +360,44 @@ function createVectorTileGeometries(parameters, transferableObjects) {
boxes,
boxBatchIds,
boxGeometry,
- boxModelMatrixAndBoundingVolume,
+ boxModelMatrixAndBoundingVolume
);
createPrimitive(
options,
cylinders,
cylinderBatchIds,
cylinderGeometry,
- cylinderModelMatrixAndBoundingVolume,
+ cylinderModelMatrixAndBoundingVolume
);
createPrimitive(
options,
ellipsoids,
ellipsoidBatchIds,
ellipsoidGeometry,
- ellipsoidModelMatrixAndBoundingVolume,
+ ellipsoidModelMatrixAndBoundingVolume
);
createPrimitive(
options,
spheres,
sphereBatchIds,
ellipsoidGeometry,
- sphereModelMatrixAndBoundingVolume,
+ sphereModelMatrixAndBoundingVolume
);
const packedBuffer = packBuffer(
indices.BYTES_PER_ELEMENT,
batchedIndices,
- boundingVolumes,
+ boundingVolumes
);
transferableObjects.push(
positions.buffer,
vertexBatchIds.buffer,
- indices.buffer,
+ indices.buffer
);
transferableObjects.push(
batchIds.buffer,
indexOffsets.buffer,
- indexCounts.buffer,
+ indexCounts.buffer
);
transferableObjects.push(packedBuffer.buffer);
diff --git a/packages/engine/Source/Workers/createVectorTilePoints.js b/packages/engine/Source/Workers/createVectorTilePoints.js
index 6b7289a8ee43..217d979408bc 100644
--- a/packages/engine/Source/Workers/createVectorTilePoints.js
+++ b/packages/engine/Source/Workers/createVectorTilePoints.js
@@ -45,7 +45,7 @@ function createVectorTilePoints(parameters, transferableObjects) {
const vBuffer = positions.subarray(positionsLength, 2 * positionsLength);
const heightBuffer = positions.subarray(
2 * positionsLength,
- 3 * positionsLength,
+ 3 * positionsLength
);
AttributeCompression.zigZagDeltaDecode(uBuffer, vBuffer, heightBuffer);
@@ -63,11 +63,11 @@ function createVectorTilePoints(parameters, transferableObjects) {
lon,
lat,
alt,
- scratchBVCartographic,
+ scratchBVCartographic
);
const decodedPosition = ellipsoid.cartographicToCartesian(
cartographic,
- scratchEncodedPosition,
+ scratchEncodedPosition
);
Cartesian3.pack(decodedPosition, decoded, i * 3);
}
diff --git a/packages/engine/Source/Workers/createVectorTilePolygons.js b/packages/engine/Source/Workers/createVectorTilePolygons.js
index 9c64ca79791b..3770581d3557 100644
--- a/packages/engine/Source/Workers/createVectorTilePolygons.js
+++ b/packages/engine/Source/Workers/createVectorTilePolygons.js
@@ -152,7 +152,7 @@ function createVectorTilePolygons(parameters, transferableObjects) {
const cart = Cartographic.fromRadians(x, y, 0.0, scratchBVCartographic);
const decodedPosition = ellipsoid.cartographicToCartesian(
cart,
- scratchEncodedPosition,
+ scratchEncodedPosition
);
Cartesian3.pack(decodedPosition, decodedPositions, i * 3);
}
@@ -257,13 +257,13 @@ function createVectorTilePolygons(parameters, transferableObjects) {
const position = Cartesian3.unpack(
decodedPositions,
polygonOffset * 3 + j * 3,
- scratchEncodedPosition,
+ scratchEncodedPosition
);
ellipsoid.scaleToGeodeticSurface(position, position);
const carto = ellipsoid.cartesianToCartographic(
position,
- scratchBVCartographic,
+ scratchBVCartographic
);
const lat = carto.latitude;
const lon = carto.longitude;
@@ -277,23 +277,23 @@ function createVectorTilePolygons(parameters, transferableObjects) {
let scaledNormal = Cartesian3.multiplyByScalar(
normal,
polygonMinimumHeight,
- scratchScaledNormal,
+ scratchScaledNormal
);
const minHeightPosition = Cartesian3.add(
position,
scaledNormal,
- scratchMinHeightPosition,
+ scratchMinHeightPosition
);
scaledNormal = Cartesian3.multiplyByScalar(
normal,
polygonMaximumHeight,
- scaledNormal,
+ scaledNormal
);
const maxHeightPosition = Cartesian3.add(
position,
scaledNormal,
- scratchMaxHeightPosition,
+ scratchMaxHeightPosition
);
Cartesian3.subtract(maxHeightPosition, center, maxHeightPosition);
@@ -319,7 +319,7 @@ function createVectorTilePolygons(parameters, transferableObjects) {
rectangle,
minHeight,
maxHeight,
- ellipsoid,
+ ellipsoid
);
let indicesIndex = buffer.indexOffset;
@@ -367,7 +367,7 @@ function createVectorTilePolygons(parameters, transferableObjects) {
batchedIndices = IndexDatatype.createTypedArray(
batchedPositions.length / 3,
- batchedIndices,
+ batchedIndices
);
const batchedIndicesLength = batchedDrawCalls.length;
@@ -388,7 +388,7 @@ function createVectorTilePolygons(parameters, transferableObjects) {
const packedBuffer = packBuffer(
indexDatatype,
boundingVolumes,
- batchedDrawCalls,
+ batchedDrawCalls
);
transferableObjects.push(
@@ -397,7 +397,7 @@ function createVectorTilePolygons(parameters, transferableObjects) {
batchedIndexOffsets.buffer,
batchedIndexCounts.buffer,
batchedIds.buffer,
- packedBuffer.buffer,
+ packedBuffer.buffer
);
return {
diff --git a/packages/engine/Source/Workers/createVectorTilePolylines.js b/packages/engine/Source/Workers/createVectorTilePolylines.js
index 967e431b9352..1002ce25a62f 100644
--- a/packages/engine/Source/Workers/createVectorTilePolylines.js
+++ b/packages/engine/Source/Workers/createVectorTilePolylines.js
@@ -66,7 +66,7 @@ function createVectorTilePolylines(parameters, transferableObjects) {
rectangle,
minimumHeight,
maximumHeight,
- ellipsoid,
+ ellipsoid
);
const positionsLength = positions.length / 3;
@@ -103,14 +103,14 @@ function createVectorTilePolylines(parameters, transferableObjects) {
previous = Cartesian3.unpack(
positions,
(offset + j - 1) * 3,
- scratchPrev,
+ scratchPrev
);
}
const current = Cartesian3.unpack(
positions,
(offset + j) * 3,
- scratchCur,
+ scratchCur
);
let next;
@@ -118,12 +118,12 @@ function createVectorTilePolylines(parameters, transferableObjects) {
const p2 = Cartesian3.unpack(
positions,
(offset + count - 1) * 3,
- scratchP0,
+ scratchP0
);
const p3 = Cartesian3.unpack(
positions,
(offset + count - 2) * 3,
- scratchP1,
+ scratchP1
);
next = Cartesian3.subtract(p2, p3, scratchNext);
@@ -175,12 +175,12 @@ function createVectorTilePolylines(parameters, transferableObjects) {
transferableObjects.push(
curPositions.buffer,
prevPositions.buffer,
- nextPositions.buffer,
+ nextPositions.buffer
);
transferableObjects.push(
expandAndWidth.buffer,
vertexBatchIds.buffer,
- indices.buffer,
+ indices.buffer
);
let results = {
diff --git a/packages/engine/Source/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js b/packages/engine/Source/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js
index fbffcb40ba47..7d41bcb9438c 100644
--- a/packages/engine/Source/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js
+++ b/packages/engine/Source/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js
@@ -37,7 +37,7 @@ function indexOfEpsilon(arr, elem, elemType) {
function createVerticesFromGoogleEarthEnterpriseBuffer(
parameters,
- transferableObjects,
+ transferableObjects
) {
parameters.ellipsoid = Ellipsoid.clone(parameters.ellipsoid);
parameters.rectangle = Rectangle.clone(parameters.rectangle);
@@ -53,7 +53,7 @@ function createVerticesFromGoogleEarthEnterpriseBuffer(
parameters.skirtHeight,
parameters.includeWebMercatorT,
parameters.negativeAltitudeExponentBias,
- parameters.negativeElevationThreshold,
+ parameters.negativeElevationThreshold
);
const vertices = statistics.vertices;
transferableObjects.push(vertices.buffer);
@@ -96,7 +96,7 @@ function processBuffer(
skirtHeight,
includeWebMercatorT,
negativeAltitudeExponentBias,
- negativeElevationThreshold,
+ negativeElevationThreshold
) {
let geographicWest;
let geographicSouth;
@@ -126,15 +126,16 @@ function processBuffer(
const fromENU = Transforms.eastNorthUpToFixedFrame(
relativeToCenter,
- ellipsoid,
+ ellipsoid
);
const toENU = Matrix4.inverseTransformation(fromENU, matrix4Scratch);
let southMercatorY;
let oneOverMercatorHeight;
if (includeWebMercatorT) {
- southMercatorY =
- WebMercatorProjection.geodeticLatitudeToMercatorAngle(geographicSouth);
+ southMercatorY = WebMercatorProjection.geodeticLatitudeToMercatorAngle(
+ geographicSouth
+ );
oneOverMercatorHeight =
1.0 /
(WebMercatorProjection.geodeticLatitudeToMercatorAngle(geographicNorth) -
@@ -278,7 +279,7 @@ function processBuffer(
const index = indexOfEpsilon(
quadBorderPoints,
scratchCartographic,
- Cartographic,
+ Cartographic
);
if (index === -1) {
quadBorderPoints.push(Cartographic.clone(scratchCartographic));
@@ -408,7 +409,7 @@ function processBuffer(
westBorder,
-percentage * rectangleWidth,
true,
- -percentage * rectangleHeight,
+ -percentage * rectangleHeight
);
addSkirt(
positions,
@@ -420,7 +421,7 @@ function processBuffer(
skirtOptions,
southBorder,
-percentage * rectangleHeight,
- false,
+ false
);
addSkirt(
positions,
@@ -433,7 +434,7 @@ function processBuffer(
eastBorder,
percentage * rectangleWidth,
true,
- percentage * rectangleHeight,
+ percentage * rectangleHeight
);
addSkirt(
positions,
@@ -445,7 +446,7 @@ function processBuffer(
skirtOptions,
northBorder,
percentage * rectangleHeight,
- false,
+ false
);
// Since the corner between the north and west sides is in the west array, generate the last
@@ -462,7 +463,7 @@ function processBuffer(
firstSkirtIndex,
firstSkirtIndex,
firstBorderIndex,
- lastBorderIndex,
+ lastBorderIndex
);
}
@@ -475,17 +476,16 @@ function processBuffer(
rectangle,
minHeight,
maxHeight,
- ellipsoid,
+ ellipsoid
);
}
const occluder = new EllipsoidalOccluder(ellipsoid);
- const occludeePointInScaledSpace =
- occluder.computeHorizonCullingPointPossiblyUnderEllipsoid(
- relativeToCenter,
- positions,
- minHeight,
- );
+ const occludeePointInScaledSpace = occluder.computeHorizonCullingPointPossiblyUnderEllipsoid(
+ relativeToCenter,
+ positions,
+ minHeight
+ );
const aaBox = new AxisAlignedBoundingBox(minimum, maximum, relativeToCenter);
const encoding = new TerrainEncoding(
@@ -498,7 +498,7 @@ function processBuffer(
includeWebMercatorT,
includeGeodeticSurfaceNormals,
exaggeration,
- exaggerationRelativeHeight,
+ exaggerationRelativeHeight
);
const vertices = new Float32Array(size * encoding.stride);
@@ -512,7 +512,7 @@ function processBuffer(
heights[k],
undefined,
webMercatorTs[k],
- geodeticSurfaceNormals[k],
+ geodeticSurfaceNormals[k]
);
}
@@ -538,12 +538,12 @@ function processBuffer(
.reverse();
southIndicesEastToWest.unshift(
- eastIndicesNorthToSouth[eastIndicesNorthToSouth.length - 1],
+ eastIndicesNorthToSouth[eastIndicesNorthToSouth.length - 1]
);
southIndicesEastToWest.push(westIndicesSouthToNorth[0]);
northIndicesWestToEast.unshift(
- westIndicesSouthToNorth[westIndicesSouthToNorth.length - 1],
+ westIndicesSouthToNorth[westIndicesSouthToNorth.length - 1]
);
northIndicesWestToEast.push(eastIndicesNorthToSouth[0]);
@@ -576,7 +576,7 @@ function addSkirt(
borderPoints,
fudgeFactor,
eastOrWest,
- cornerFudge,
+ cornerFudge
) {
const count = borderPoints.length;
for (let j = 0; j < count; ++j) {
@@ -590,7 +590,7 @@ function addSkirt(
latitude = CesiumMath.clamp(
latitude,
-CesiumMath.PI_OVER_TWO,
- CesiumMath.PI_OVER_TWO,
+ CesiumMath.PI_OVER_TWO
); // Don't go over the poles
const height = borderCartographic.height - skirtOptions.skirtHeight;
skirtOptions.hMin = Math.min(skirtOptions.hMin, height);
@@ -612,8 +612,9 @@ function addSkirt(
scratchCartographic.latitude -= cornerFudge;
}
- const pos =
- skirtOptions.ellipsoid.cartographicToCartesian(scratchCartographic);
+ const pos = skirtOptions.ellipsoid.cartographicToCartesian(
+ scratchCartographic
+ );
positions.push(pos);
heights.push(height);
uvs.push(Cartesian2.clone(uvs[borderIndex])); // Copy UVs from border point
@@ -640,7 +641,7 @@ function addSkirt(
currentIndex,
currentIndex,
borderIndex,
- lastBorderIndex,
+ lastBorderIndex
);
}
@@ -648,5 +649,5 @@ function addSkirt(
}
}
export default createTaskProcessorWorker(
- createVerticesFromGoogleEarthEnterpriseBuffer,
+ createVerticesFromGoogleEarthEnterpriseBuffer
);
diff --git a/packages/engine/Source/Workers/createVerticesFromQuantizedTerrainMesh.js b/packages/engine/Source/Workers/createVerticesFromQuantizedTerrainMesh.js
index feb5eed9b78a..743a62361ebd 100644
--- a/packages/engine/Source/Workers/createVerticesFromQuantizedTerrainMesh.js
+++ b/packages/engine/Source/Workers/createVerticesFromQuantizedTerrainMesh.js
@@ -25,7 +25,7 @@ const toPack = new Cartesian2();
function createVerticesFromQuantizedTerrainMesh(
parameters,
- transferableObjects,
+ transferableObjects
) {
const quantizedVertices = parameters.quantizedVertices;
const quantizedVertexCount = quantizedVertices.length / 3;
@@ -60,8 +60,9 @@ function createVerticesFromQuantizedTerrainMesh(
let southMercatorY;
let oneOverMercatorHeight;
if (includeWebMercatorT) {
- southMercatorY =
- WebMercatorProjection.geodeticLatitudeToMercatorAngle(south);
+ southMercatorY = WebMercatorProjection.geodeticLatitudeToMercatorAngle(
+ south
+ );
oneOverMercatorHeight =
1.0 /
(WebMercatorProjection.geodeticLatitudeToMercatorAngle(north) -
@@ -71,11 +72,11 @@ function createVerticesFromQuantizedTerrainMesh(
const uBuffer = quantizedVertices.subarray(0, quantizedVertexCount);
const vBuffer = quantizedVertices.subarray(
quantizedVertexCount,
- 2 * quantizedVertexCount,
+ 2 * quantizedVertexCount
);
const heightBuffer = quantizedVertices.subarray(
quantizedVertexCount * 2,
- 3 * quantizedVertexCount,
+ 3 * quantizedVertexCount
);
const hasVertexNormals = defined(octEncodedNormals);
@@ -113,7 +114,7 @@ function createVerticesFromQuantizedTerrainMesh(
const height = CesiumMath.lerp(
minimumHeight,
maximumHeight,
- heightBuffer[i] / maxShort,
+ heightBuffer[i] / maxShort
);
cartographicScratch.longitude = CesiumMath.lerp(west, east, u);
@@ -134,7 +135,7 @@ function createVerticesFromQuantizedTerrainMesh(
if (includeWebMercatorT) {
webMercatorTs[i] =
(WebMercatorProjection.geodeticLatitudeToMercatorAngle(
- cartographicScratch.latitude,
+ cartographicScratch.latitude
) -
southMercatorY) *
oneOverMercatorHeight;
@@ -150,41 +151,40 @@ function createVerticesFromQuantizedTerrainMesh(
Cartesian3.maximumByComponent(cartesian3Scratch, maximum, maximum);
}
- const westIndicesSouthToNorth = copyAndSort(
- parameters.westIndices,
- function (a, b) {
- return uvs[a].y - uvs[b].y;
- },
- );
- const eastIndicesNorthToSouth = copyAndSort(
- parameters.eastIndices,
- function (a, b) {
- return uvs[b].y - uvs[a].y;
- },
- );
- const southIndicesEastToWest = copyAndSort(
- parameters.southIndices,
- function (a, b) {
- return uvs[b].x - uvs[a].x;
- },
- );
- const northIndicesWestToEast = copyAndSort(
- parameters.northIndices,
- function (a, b) {
- return uvs[a].x - uvs[b].x;
- },
- );
+ const westIndicesSouthToNorth = copyAndSort(parameters.westIndices, function (
+ a,
+ b
+ ) {
+ return uvs[a].y - uvs[b].y;
+ });
+ const eastIndicesNorthToSouth = copyAndSort(parameters.eastIndices, function (
+ a,
+ b
+ ) {
+ return uvs[b].y - uvs[a].y;
+ });
+ const southIndicesEastToWest = copyAndSort(parameters.southIndices, function (
+ a,
+ b
+ ) {
+ return uvs[b].x - uvs[a].x;
+ });
+ const northIndicesWestToEast = copyAndSort(parameters.northIndices, function (
+ a,
+ b
+ ) {
+ return uvs[a].x - uvs[b].x;
+ });
let occludeePointInScaledSpace;
if (minimumHeight < 0.0) {
// Horizon culling point needs to be recomputed since the tile is at least partly under the ellipsoid.
const occluder = new EllipsoidalOccluder(ellipsoid);
- occludeePointInScaledSpace =
- occluder.computeHorizonCullingPointPossiblyUnderEllipsoid(
- center,
- positions,
- minimumHeight,
- );
+ occludeePointInScaledSpace = occluder.computeHorizonCullingPointPossiblyUnderEllipsoid(
+ center,
+ positions,
+ minimumHeight
+ );
}
let hMin = minimumHeight;
@@ -199,8 +199,8 @@ function createVerticesFromQuantizedTerrainMesh(
ellipsoid,
toENU,
minimum,
- maximum,
- ),
+ maximum
+ )
);
hMin = Math.min(
hMin,
@@ -213,8 +213,8 @@ function createVerticesFromQuantizedTerrainMesh(
ellipsoid,
toENU,
minimum,
- maximum,
- ),
+ maximum
+ )
);
hMin = Math.min(
hMin,
@@ -227,8 +227,8 @@ function createVerticesFromQuantizedTerrainMesh(
ellipsoid,
toENU,
minimum,
- maximum,
- ),
+ maximum
+ )
);
hMin = Math.min(
hMin,
@@ -241,8 +241,8 @@ function createVerticesFromQuantizedTerrainMesh(
ellipsoid,
toENU,
minimum,
- maximum,
- ),
+ maximum
+ )
);
const aaBox = new AxisAlignedBoundingBox(minimum, maximum, center);
@@ -256,7 +256,7 @@ function createVerticesFromQuantizedTerrainMesh(
includeWebMercatorT,
includeGeodeticSurfaceNormals,
exaggeration,
- exaggerationRelativeHeight,
+ exaggerationRelativeHeight
);
const vertexStride = encoding.stride;
const size =
@@ -279,7 +279,7 @@ function createVerticesFromQuantizedTerrainMesh(
heights[j],
toPack,
webMercatorTs[j],
- geodeticSurfaceNormals[j],
+ geodeticSurfaceNormals[j]
);
}
@@ -287,7 +287,7 @@ function createVerticesFromQuantizedTerrainMesh(
const indexBufferLength = parameters.indices.length + edgeTriangleCount * 3;
const indexBuffer = IndexDatatype.createTypedArray(
quantizedVertexCount + edgeVertexCount,
- indexBufferLength,
+ indexBufferLength
);
indexBuffer.set(parameters.indices, 0);
@@ -319,7 +319,7 @@ function createVerticesFromQuantizedTerrainMesh(
southMercatorY,
oneOverMercatorHeight,
westLongitudeOffset,
- westLatitudeOffset,
+ westLatitudeOffset
);
vertexBufferIndex += parameters.westIndices.length * vertexStride;
addSkirt(
@@ -336,7 +336,7 @@ function createVerticesFromQuantizedTerrainMesh(
southMercatorY,
oneOverMercatorHeight,
southLongitudeOffset,
- southLatitudeOffset,
+ southLatitudeOffset
);
vertexBufferIndex += parameters.southIndices.length * vertexStride;
addSkirt(
@@ -353,7 +353,7 @@ function createVerticesFromQuantizedTerrainMesh(
southMercatorY,
oneOverMercatorHeight,
eastLongitudeOffset,
- eastLatitudeOffset,
+ eastLatitudeOffset
);
vertexBufferIndex += parameters.eastIndices.length * vertexStride;
addSkirt(
@@ -370,7 +370,7 @@ function createVerticesFromQuantizedTerrainMesh(
southMercatorY,
oneOverMercatorHeight,
northLongitudeOffset,
- northLatitudeOffset,
+ northLatitudeOffset
);
TerrainProvider.addSkirtIndices(
@@ -380,7 +380,7 @@ function createVerticesFromQuantizedTerrainMesh(
northIndicesWestToEast,
quantizedVertexCount,
indexBuffer,
- parameters.indices.length,
+ parameters.indices.length
);
transferableObjects.push(vertexBuffer.buffer, indexBuffer.buffer);
@@ -411,7 +411,7 @@ function findMinMaxSkirts(
ellipsoid,
toENU,
minimum,
- maximum,
+ maximum
) {
let hMin = Number.POSITIVE_INFINITY;
@@ -436,7 +436,7 @@ function findMinMaxSkirts(
const position = ellipsoid.cartographicToCartesian(
cartographicScratch,
- cartesian3Scratch,
+ cartesian3Scratch
);
Matrix4.multiplyByPoint(toENU, position, position);
@@ -462,7 +462,7 @@ function addSkirt(
southMercatorY,
oneOverMercatorHeight,
longitudeOffset,
- latitudeOffset,
+ latitudeOffset
) {
const hasVertexNormals = defined(octEncodedNormals);
@@ -489,7 +489,7 @@ function addSkirt(
const position = ellipsoid.cartographicToCartesian(
cartographicScratch,
- cartesian3Scratch,
+ cartesian3Scratch
);
if (hasVertexNormals) {
@@ -502,7 +502,7 @@ function addSkirt(
if (encoding.hasWebMercatorT) {
webMercatorT =
(WebMercatorProjection.geodeticLatitudeToMercatorAngle(
- cartographicScratch.latitude,
+ cartographicScratch.latitude
) -
southMercatorY) *
oneOverMercatorHeight;
@@ -521,7 +521,7 @@ function addSkirt(
cartographicScratch.height,
toPack,
webMercatorT,
- geodeticSurfaceNormal,
+ geodeticSurfaceNormal
);
}
}
@@ -545,5 +545,5 @@ function copyAndSort(typedArray, comparator) {
return copy;
}
export default createTaskProcessorWorker(
- createVerticesFromQuantizedTerrainMesh,
+ createVerticesFromQuantizedTerrainMesh
);
diff --git a/packages/engine/Source/Workers/decodeDraco.js b/packages/engine/Source/Workers/decodeDraco.js
index 7b32c1187955..14d5d5b268c7 100644
--- a/packages/engine/Source/Workers/decodeDraco.js
+++ b/packages/engine/Source/Workers/decodeDraco.js
@@ -37,7 +37,7 @@ function decodeQuantizedDracoTypedArray(
dracoDecoder,
dracoAttribute,
quantization,
- vertexArrayLength,
+ vertexArrayLength
) {
let vertexArray;
let attributeData;
@@ -47,7 +47,7 @@ function decodeQuantizedDracoTypedArray(
dracoDecoder.GetAttributeUInt8ForAllPoints(
dracoGeometry,
dracoAttribute,
- attributeData,
+ attributeData
);
} else if (quantization.quantizationBits <= 16) {
attributeData = new draco.DracoUInt16Array();
@@ -55,7 +55,7 @@ function decodeQuantizedDracoTypedArray(
dracoDecoder.GetAttributeUInt16ForAllPoints(
dracoGeometry,
dracoAttribute,
- attributeData,
+ attributeData
);
} else {
attributeData = new draco.DracoFloat32Array();
@@ -63,7 +63,7 @@ function decodeQuantizedDracoTypedArray(
dracoDecoder.GetAttributeFloatForAllPoints(
dracoGeometry,
dracoAttribute,
- attributeData,
+ attributeData
);
}
@@ -79,7 +79,7 @@ function decodeDracoTypedArray(
dracoGeometry,
dracoDecoder,
dracoAttribute,
- vertexArrayLength,
+ vertexArrayLength
) {
let vertexArray;
let attributeData;
@@ -93,7 +93,7 @@ function decodeDracoTypedArray(
dracoDecoder.GetAttributeInt8ForAllPoints(
dracoGeometry,
dracoAttribute,
- attributeData,
+ attributeData
);
break;
case 2: // DT_UINT8
@@ -102,7 +102,7 @@ function decodeDracoTypedArray(
dracoDecoder.GetAttributeUInt8ForAllPoints(
dracoGeometry,
dracoAttribute,
- attributeData,
+ attributeData
);
break;
case 3: // DT_INT16
@@ -111,7 +111,7 @@ function decodeDracoTypedArray(
dracoDecoder.GetAttributeInt16ForAllPoints(
dracoGeometry,
dracoAttribute,
- attributeData,
+ attributeData
);
break;
case 4: // DT_UINT16
@@ -120,7 +120,7 @@ function decodeDracoTypedArray(
dracoDecoder.GetAttributeUInt16ForAllPoints(
dracoGeometry,
dracoAttribute,
- attributeData,
+ attributeData
);
break;
case 5:
@@ -130,7 +130,7 @@ function decodeDracoTypedArray(
dracoDecoder.GetAttributeInt32ForAllPoints(
dracoGeometry,
dracoAttribute,
- attributeData,
+ attributeData
);
break;
case 6:
@@ -140,7 +140,7 @@ function decodeDracoTypedArray(
dracoDecoder.GetAttributeUInt32ForAllPoints(
dracoGeometry,
dracoAttribute,
- attributeData,
+ attributeData
);
break;
case 9:
@@ -150,7 +150,7 @@ function decodeDracoTypedArray(
dracoDecoder.GetAttributeFloatForAllPoints(
dracoGeometry,
dracoAttribute,
- attributeData,
+ attributeData
);
break;
}
@@ -200,14 +200,14 @@ function decodeAttribute(dracoGeometry, dracoDecoder, dracoAttribute) {
dracoDecoder,
dracoAttribute,
quantization,
- vertexArrayLength,
+ vertexArrayLength
);
} else {
vertexArray = decodeDracoTypedArray(
dracoGeometry,
dracoDecoder,
dracoAttribute,
- vertexArrayLength,
+ vertexArrayLength
);
}
@@ -246,11 +246,11 @@ function decodePointCloud(parameters) {
const dracoPointCloud = new draco.PointCloud();
const decodingStatus = dracoDecoder.DecodeBufferToPointCloud(
buffer,
- dracoPointCloud,
+ dracoPointCloud
);
if (!decodingStatus.ok() || dracoPointCloud.ptr === 0) {
throw new RuntimeError(
- `Error decoding draco point cloud: ${decodingStatus.error_msg()}`,
+ `Error decoding draco point cloud: ${decodingStatus.error_msg()}`
);
}
@@ -265,23 +265,23 @@ function decodePointCloud(parameters) {
if (propertyName === "POSITION" || propertyName === "NORMAL") {
const dracoAttributeId = dracoDecoder.GetAttributeId(
dracoPointCloud,
- draco[propertyName],
+ draco[propertyName]
);
dracoAttribute = dracoDecoder.GetAttribute(
dracoPointCloud,
- dracoAttributeId,
+ dracoAttributeId
);
} else {
const attributeId = properties[propertyName];
dracoAttribute = dracoDecoder.GetAttributeByUniqueId(
dracoPointCloud,
- attributeId,
+ attributeId
);
}
result[propertyName] = decodeAttribute(
dracoPointCloud,
dracoDecoder,
- dracoAttribute,
+ dracoAttribute
);
}
}
@@ -316,7 +316,7 @@ function decodePrimitive(parameters) {
const decodingStatus = dracoDecoder.DecodeBufferToMesh(buffer, dracoGeometry);
if (!decodingStatus.ok() || dracoGeometry.ptr === 0) {
throw new RuntimeError(
- `Error decoding draco mesh geometry: ${decodingStatus.error_msg()}`,
+ `Error decoding draco mesh geometry: ${decodingStatus.error_msg()}`
);
}
@@ -330,12 +330,12 @@ function decodePrimitive(parameters) {
const compressedAttribute = compressedAttributes[attributeName];
const dracoAttribute = dracoDecoder.GetAttributeByUniqueId(
dracoGeometry,
- compressedAttribute,
+ compressedAttribute
);
attributeData[attributeName] = decodeAttribute(
dracoGeometry,
dracoDecoder,
- dracoAttribute,
+ dracoAttribute
);
}
}
diff --git a/packages/engine/Source/Workers/decodeGoogleEarthEnterprisePacket.js b/packages/engine/Source/Workers/decodeGoogleEarthEnterprisePacket.js
index dff801ef29d2..59ad933dbc6e 100644
--- a/packages/engine/Source/Workers/decodeGoogleEarthEnterprisePacket.js
+++ b/packages/engine/Source/Workers/decodeGoogleEarthEnterprisePacket.js
@@ -69,7 +69,7 @@ function processMetadata(buffer, totalSize, quadKey) {
offset += sizeOfUint32;
if (quadVersion !== 2) {
throw new RuntimeError(
- "Invalid QuadTreePacket version. Only version 2 is supported.",
+ "Invalid QuadTreePacket version. Only version 2 is supported."
);
}
@@ -143,8 +143,8 @@ function processMetadata(buffer, totalSize, quadKey) {
imageVersion,
terrainVersion,
imageProvider,
- terrainProvider,
- ),
+ terrainProvider
+ )
);
}
diff --git a/packages/engine/Source/Workers/decodeI3S.js b/packages/engine/Source/Workers/decodeI3S.js
index 89c1b130b94d..d81babacbfb4 100644
--- a/packages/engine/Source/Workers/decodeI3S.js
+++ b/packages/engine/Source/Workers/decodeI3S.js
@@ -62,7 +62,7 @@ function sampleGeoidFromList(lon, lat, geoidDataList) {
if (geoidDataList[i].projectionType === "WebMercator") {
const radii = geoidDataList[i].projection._ellipsoid._radii;
const webMercatorProj = new WebMercatorProjection(
- new Ellipsoid(radii.x, radii.y, radii.z),
+ new Ellipsoid(radii.x, radii.y, radii.z)
);
localPt = webMercatorProj.project(new Cartographic(lon, lat, 0));
} else {
@@ -90,7 +90,7 @@ function orthometricToEllipsoidal(
scale_y,
center,
geoidDataList,
- fast,
+ fast
) {
if (fast) {
// Geometry is already relative to the tile origin which has already been shifted to account for geoid height
@@ -102,14 +102,14 @@ function orthometricToEllipsoidal(
const centerHeight = sampleGeoidFromList(
center.longitude,
center.latitude,
- geoidDataList,
+ geoidDataList
);
for (let i = 0; i < vertexCount; ++i) {
const height = sampleGeoidFromList(
center.longitude + CesiumMath.toRadians(scale_x * position[i * 3]),
center.latitude + CesiumMath.toRadians(scale_y * position[i * 3 + 1]),
- geoidDataList,
+ geoidDataList
);
position[i * 3 + 2] += height - centerHeight;
}
@@ -124,7 +124,7 @@ function transformToLocal(
parentRotation,
ellipsoidRadiiSquare,
scale_x,
- scale_y,
+ scale_y
) {
if (vertexCount === 0 || !defined(positions) || positions.length === 0) {
return;
@@ -133,7 +133,7 @@ function transformToLocal(
const ellipsoid = new Ellipsoid(
Math.sqrt(ellipsoidRadiiSquare.x),
Math.sqrt(ellipsoidRadiiSquare.y),
- Math.sqrt(ellipsoidRadiiSquare.z),
+ Math.sqrt(ellipsoidRadiiSquare.z)
);
for (let i = 0; i < vertexCount; ++i) {
const indexOffset = i * 3;
@@ -168,7 +168,7 @@ function transformToLocal(
const normal = new Cartesian3(
normals[indexOffset],
normals[indexOffset1],
- normals[indexOffset2],
+ normals[indexOffset2]
);
const rotatedNormal = {};
@@ -203,7 +203,7 @@ function generateIndexArray(
vertexCount,
indices,
colors,
- splitGeometryByColorTransparency,
+ splitGeometryByColorTransparency
) {
// Allocate array
const indexArray = new Uint32Array(vertexCount);
@@ -276,7 +276,7 @@ function getFeatureHash(symbologyData, outlinesHash, featureIndex) {
});
const featureSymbology = defaultValue(
symbologyData[featureIndex],
- symbologyData.default,
+ symbologyData.default
);
newFeatureHash.hasOutline = defined(featureSymbology?.edges);
return newFeatureHash;
@@ -306,7 +306,7 @@ function addEdgeToHash(
vertexBIndex,
vertexAIndexUnique,
vertexBIndexUnique,
- normalIndex,
+ normalIndex
) {
let startVertexIndex;
let endVertexIndex;
@@ -342,7 +342,7 @@ function generateOutlinesHash(
symbologyData,
featureIndexArray,
indexArray,
- positions,
+ positions
) {
const outlinesHash = [];
for (let i = 0; i < indexArray.length; i += 3) {
@@ -352,7 +352,7 @@ function generateOutlinesHash(
const featureHash = getFeatureHash(
symbologyData,
outlinesHash,
- featureIndex,
+ featureIndex
);
if (!featureHash.hasOutline) {
continue;
@@ -377,7 +377,7 @@ function generateOutlinesHash(
nextVertexIndex,
uniqueVertexIndex,
uniqueNextVertexIndex,
- i,
+ i
);
}
}
@@ -398,24 +398,24 @@ function calculateFaceNormal(normals, vertexAIndex, indexArray, positions) {
Cartesian3.subtract(
calculateFaceNormalB,
calculateFaceNormalA,
- calculateFaceNormalB,
+ calculateFaceNormalB
);
Cartesian3.subtract(
calculateFaceNormalC,
calculateFaceNormalA,
- calculateFaceNormalC,
+ calculateFaceNormalC
);
Cartesian3.cross(
calculateFaceNormalB,
calculateFaceNormalC,
- calculateFaceNormalA,
+ calculateFaceNormalA
);
const magnitude = Cartesian3.magnitude(calculateFaceNormalA);
if (magnitude !== 0) {
Cartesian3.divideByScalar(
calculateFaceNormalA,
magnitude,
- calculateFaceNormalA,
+ calculateFaceNormalA
);
}
const normalAIndex = vertexAIndex * 3;
@@ -433,7 +433,7 @@ function isEdgeSmooth(normals, normalAIndex, normalBIndex) {
Cartesian3.fromArray(normals, normalBIndex, isEdgeSmoothB);
const cosine = Cartesian3.dot(isEdgeSmoothA, isEdgeSmoothB);
const sine = Cartesian3.magnitude(
- Cartesian3.cross(isEdgeSmoothA, isEdgeSmoothB, isEdgeSmoothA),
+ Cartesian3.cross(isEdgeSmoothA, isEdgeSmoothB, isEdgeSmoothA)
);
return Math.atan2(sine, cosine) < 0.25;
}
@@ -443,7 +443,7 @@ function addOutlinesForEdge(
edgeData,
indexArray,
positions,
- normals,
+ normals
) {
if (edgeData.normalsIndex.length > 1) {
const normalsByIndex = positions.length === normals.length;
@@ -477,7 +477,7 @@ function addOutlinesForFeature(
edgeHash,
indexArray,
positions,
- normals,
+ normals
) {
const edgeStartKeys = Object.keys(edgeHash);
for (let startIndex = 0; startIndex < edgeStartKeys.length; startIndex++) {
@@ -494,7 +494,7 @@ function generateOutlinesFromHash(
outlinesHash,
indexArray,
positions,
- normals,
+ normals
) {
const outlines = [];
const features = Object.keys(outlinesHash);
@@ -510,7 +510,7 @@ function generateOutlinesIndexArray(
featureIndexArray,
indexArray,
positions,
- normals,
+ normals
) {
if (!defined(symbologyData) || Object.keys(symbologyData).length === 0) {
return undefined;
@@ -519,7 +519,7 @@ function generateOutlinesIndexArray(
symbologyData,
featureIndexArray,
indexArray,
- positions,
+ positions
);
if (!defined(normals) || indexArray.length * 3 !== normals.length) {
// Need to calculate flat normals per faces
@@ -529,7 +529,7 @@ function generateOutlinesIndexArray(
outlinesHash,
indexArray,
positions,
- normals,
+ normals
);
const outlinesIndexArray =
outlines.length > 0 ? new Uint32Array(outlines) : undefined;
@@ -556,7 +556,7 @@ function generateNormals(
normals,
uv0s,
colors,
- featureIndex,
+ featureIndex
) {
const result = {
normals: undefined,
@@ -632,7 +632,7 @@ function generateGltfBuffer(
uv0s,
colors,
featureIndex,
- parameters,
+ parameters
) {
if (vertexCount === 0 || !defined(positions) || positions.length === 0) {
return {
@@ -665,7 +665,7 @@ function generateGltfBuffer(
vertexCount,
indices,
colors,
- parameters.splitGeometryByColorTransparency,
+ parameters.splitGeometryByColorTransparency
);
// Push to the buffers, bufferViews and accessors
@@ -699,7 +699,7 @@ function generateGltfBuffer(
featureIndex,
indexArray,
positions,
- normals,
+ normals
);
if (defined(outlinesIndexArray)) {
const outlinesIndicesBlob = new Blob([outlinesIndexArray], {
@@ -1126,7 +1126,7 @@ function decodeDracoEncodedGeometry(data) {
for (let attrIndex = 0; attrIndex < attributesCount; ++attrIndex) {
const dracoAttribute = dracoDecoder.GetAttribute(
dracoGeometry,
- attrIndex,
+ attrIndex
);
const attributeData = decodeDracoAttribute(
@@ -1134,7 +1134,7 @@ function decodeDracoEncodedGeometry(data) {
dracoDecoder,
dracoGeometry,
dracoAttribute,
- vertexCount,
+ vertexCount
);
// initial mapping
@@ -1154,7 +1154,7 @@ function decodeDracoEncodedGeometry(data) {
// get the metadata
const metadata = dracoDecoder.GetAttributeMetadata(
dracoGeometry,
- attrIndex,
+ attrIndex
);
if (metadata.ptr !== 0) {
@@ -1164,17 +1164,17 @@ function decodeDracoEncodedGeometry(data) {
if (entryName === "i3s-scale_x") {
decodedGeometry.scale_x = metadataQuerier.GetDoubleEntry(
metadata,
- "i3s-scale_x",
+ "i3s-scale_x"
);
} else if (entryName === "i3s-scale_y") {
decodedGeometry.scale_y = metadataQuerier.GetDoubleEntry(
metadata,
- "i3s-scale_y",
+ "i3s-scale_y"
);
} else if (entryName === "i3s-attribute-type") {
attributei3sName = metadataQuerier.GetStringEntry(
metadata,
- "i3s-attribute-type",
+ "i3s-attribute-type"
);
}
}
@@ -1205,7 +1205,7 @@ function decodeDracoAttribute(
dracoDecoder,
dracoGeometry,
dracoAttribute,
- vertexCount,
+ vertexCount
) {
const bufferSize = dracoAttribute.num_components() * vertexCount;
let dracoAttributeData;
@@ -1218,7 +1218,7 @@ function decodeDracoAttribute(
const success = dracoDecoder.GetAttributeInt8ForAllPoints(
dracoGeometry,
dracoAttribute,
- dracoAttributeData,
+ dracoAttributeData
);
if (!success) {
@@ -1236,7 +1236,7 @@ function decodeDracoAttribute(
const success = dracoDecoder.GetAttributeUInt8ForAllPoints(
dracoGeometry,
dracoAttribute,
- dracoAttributeData,
+ dracoAttributeData
);
if (!success) {
@@ -1254,7 +1254,7 @@ function decodeDracoAttribute(
const success = dracoDecoder.GetAttributeInt16ForAllPoints(
dracoGeometry,
dracoAttribute,
- dracoAttributeData,
+ dracoAttributeData
);
if (!success) {
@@ -1272,7 +1272,7 @@ function decodeDracoAttribute(
const success = dracoDecoder.GetAttributeUInt16ForAllPoints(
dracoGeometry,
dracoAttribute,
- dracoAttributeData,
+ dracoAttributeData
);
if (!success) {
@@ -1290,7 +1290,7 @@ function decodeDracoAttribute(
const success = dracoDecoder.GetAttributeInt32ForAllPoints(
dracoGeometry,
dracoAttribute,
- dracoAttributeData,
+ dracoAttributeData
);
if (!success) {
@@ -1308,7 +1308,7 @@ function decodeDracoAttribute(
const success = dracoDecoder.GetAttributeUInt32ForAllPoints(
dracoGeometry,
dracoAttribute,
- dracoAttributeData,
+ dracoAttributeData
);
if (!success) {
@@ -1332,7 +1332,7 @@ function decodeDracoAttribute(
const success = dracoDecoder.GetAttributeFloatForAllPoints(
dracoGeometry,
dracoAttribute,
- dracoAttributeData,
+ dracoAttributeData
);
if (!success) {
@@ -1353,7 +1353,7 @@ function decodeDracoAttribute(
const success = dracoDecoder.GetAttributeUInt8ForAllPoints(
dracoGeometry,
dracoAttribute,
- dracoAttributeData,
+ dracoAttributeData
);
if (!success) {
@@ -1462,12 +1462,12 @@ function decodeBinaryGeometry(data, schema, bufferInfo, featureData) {
offset = binaryAttributeDecoders[bufferInfo.attributes[attrIndex]](
decodedGeometry,
data,
- offset,
+ offset
);
} else {
console.error(
"Unknown decoder for",
- bufferInfo.attributes[attrIndex],
+ bufferInfo.attributes[attrIndex]
);
}
}
@@ -1482,10 +1482,10 @@ function decodeBinaryGeometry(data, schema, bufferInfo, featureData) {
defined(featureData.geometryData[0].params)
) {
ordering = Object.keys(
- featureData.geometryData[0].params.vertexAttributes,
+ featureData.geometryData[0].params.vertexAttributes
);
featureAttributeOrder = Object.keys(
- featureData.geometryData[0].params.featureAttributes,
+ featureData.geometryData[0].params.featureAttributes
);
}
@@ -1516,7 +1516,7 @@ function decodeAndCreateGltf(parameters) {
parameters.binaryData,
parameters.schema,
parameters.bufferInfo,
- parameters.featureData,
+ parameters.featureData
);
// Adjust height from orthometric to ellipsoidal
@@ -1531,7 +1531,7 @@ function decodeAndCreateGltf(parameters) {
geometryData.scale_y,
parameters.cartographicCenter,
parameters.geoidDataList,
- false,
+ false
);
}
@@ -1545,7 +1545,7 @@ function decodeAndCreateGltf(parameters) {
parameters.parentRotation,
parameters.ellipsoidRadiiSquare,
geometryData.scale_x,
- geometryData.scale_y,
+ geometryData.scale_y
);
// Adjust UVs if there is a UV region
@@ -1553,7 +1553,7 @@ function decodeAndCreateGltf(parameters) {
cropUVs(
geometryData.vertexCount,
geometryData.uv0s,
- geometryData["uv-region"],
+ geometryData["uv-region"]
);
}
@@ -1587,7 +1587,7 @@ function decodeAndCreateGltf(parameters) {
geometryData.normals,
geometryData.uv0s,
geometryData.colors,
- featureIndex,
+ featureIndex
);
if (defined(data.normals)) {
geometryData.normals = data.normals;
@@ -1611,7 +1611,7 @@ function decodeAndCreateGltf(parameters) {
geometryData.uv0s,
geometryData.colors,
featureIndex,
- parameters,
+ parameters
);
const customAttributes = {
diff --git a/packages/engine/Source/Workers/gaussianSplatSorter.js b/packages/engine/Source/Workers/gaussianSplatSorter.js
new file mode 100644
index 000000000000..8205fcdc5cd7
--- /dev/null
+++ b/packages/engine/Source/Workers/gaussianSplatSorter.js
@@ -0,0 +1,54 @@
+import createTaskProcessorWorker from "./createTaskProcessorWorker.js";
+//import defaultValue from "../Core/defaultValue.js";
+import defined from "../Core/defined.js";
+//import RuntimeError from "../Core/RuntimeError.js";
+
+import {
+ initSync,
+ radix_sort_gaussians_attrs,
+ radix_sort_gaussians_indexes,
+} from "cesiumjs-gsplat-utils";
+
+//load built wasm modules for sorting. Ensure we can load webassembly and we support SIMD.
+async function initWorker(parameters, transferableObjects) {
+ // Require and compile WebAssembly module, or use fallback if not supported
+ const wasmConfig = parameters.webAssemblyConfig;
+ if (defined(wasmConfig) && defined(wasmConfig.wasmBinary)) {
+ initSync(wasmConfig.wasmBinary);
+ return true;
+ }
+}
+
+function generateGaussianSortWorker(parameters, transferableObjects) {
+ // Handle initialization
+ const wasmConfig = parameters.webAssemblyConfig;
+ if (defined(wasmConfig)) {
+ return initWorker(parameters, transferableObjects);
+ }
+
+ const { primitive, sortType } = parameters;
+
+ if (sortType === "Attribute") {
+ return radix_sort_gaussians_attrs(
+ primitive.attributes,
+ primitive.modelView,
+ primitive.count,
+ );
+ } else if (sortType === "Index") {
+ return radix_sort_gaussians_indexes(
+ primitive.positions,
+ primitive.modelView,
+ 2048,
+ primitive.count,
+ );
+ } else if (sortType === "SIMD Index") {
+ return radix_sort_gaussians_indexes(
+ primitive.positions,
+ primitive.modelView,
+ 2048,
+ primitive.count,
+ );
+ }
+}
+
+export default createTaskProcessorWorker(generateGaussianSortWorker);
diff --git a/packages/engine/Source/Workers/gaussianSplatTextureGenerator.js b/packages/engine/Source/Workers/gaussianSplatTextureGenerator.js
new file mode 100644
index 000000000000..cf283730bddc
--- /dev/null
+++ b/packages/engine/Source/Workers/gaussianSplatTextureGenerator.js
@@ -0,0 +1,34 @@
+import createTaskProcessorWorker from "./createTaskProcessorWorker.js";
+//import defaultValue from "../Core/defaultValue.js";
+import defined from "../Core/defined.js";
+//import RuntimeError from "../Core/RuntimeError.js";
+
+import { initSync, generate_texture_from_attrs } from "cesiumjs-gsplat-utils";
+
+//load built wasm modules for sorting. Ensure we can load webassembly and we support SIMD.
+async function initWorker(parameters, transferableObjects) {
+ // Require and compile WebAssembly module, or use fallback if not supported
+ const wasmConfig = parameters.webAssemblyConfig;
+ if (defined(wasmConfig) && defined(wasmConfig.wasmBinary)) {
+ initSync(wasmConfig.wasmBinary);
+ return true;
+ }
+}
+
+async function generateSplatTextureWorker(parameters, transferableObjects) {
+ const wasmConfig = parameters.webAssemblyConfig;
+ if (defined(wasmConfig)) {
+ return initWorker(parameters, transferableObjects);
+ }
+
+ const { attributes, count } = parameters;
+ return generate_texture_from_attrs(
+ attributes.positions,
+ attributes.scales,
+ attributes.rotations,
+ attributes.colors,
+ count,
+ );
+}
+
+export default createTaskProcessorWorker(generateSplatTextureWorker);
diff --git a/packages/engine/Source/Workers/transcodeKTX2.js b/packages/engine/Source/Workers/transcodeKTX2.js
index b92a5a9c240d..9926d303b070 100644
--- a/packages/engine/Source/Workers/transcodeKTX2.js
+++ b/packages/engine/Source/Workers/transcodeKTX2.js
@@ -59,7 +59,7 @@ function transcode(parameters, transferableObjects) {
supportedTargetFormats,
transcoderModule,
transferableObjects,
- result,
+ result
);
} else {
transferableObjects.push(data.buffer);
@@ -107,19 +107,19 @@ function parseUncompressed(header, result) {
faceView = new Uint8Array(
levelBuffer.buffer,
faceByteOffset,
- faceLength,
+ faceLength
);
} else if (PixelDatatype.sizeInBytes(datatype) === 2) {
faceView = new Uint16Array(
levelBuffer.buffer,
faceByteOffset,
- faceLength,
+ faceLength
);
} else {
faceView = new Float32Array(
levelBuffer.buffer,
faceByteOffset,
- faceLength,
+ faceLength
);
}
@@ -140,7 +140,7 @@ function transcodeCompressed(
supportedTargetFormats,
transcoderModule,
transferableObjects,
- result,
+ result
) {
const ktx2File = new transcoderModule.KTX2File(data);
let width = ktx2File.getWidth();
@@ -190,7 +190,7 @@ function transcodeCompressed(
transcoderFormat = BasisFormat.cTFBC7_RGBA;
} else {
throw new RuntimeError(
- "No transcoding format target available for ETC1S compressed ktx2.",
+ "No transcoding format target available for ETC1S compressed ktx2."
);
}
} else if (dfd.colorModel === colorModelUASTC) {
@@ -224,7 +224,7 @@ function transcodeCompressed(
: BasisFormat.cTFPVRTC1_4_RGB;
} else {
throw new RuntimeError(
- "No transcoding format target available for UASTC compressed ktx2.",
+ "No transcoding format target available for UASTC compressed ktx2."
);
}
}
@@ -248,7 +248,7 @@ function transcodeCompressed(
i, // level index
0, // layer index
0, // face index
- transcoderFormat.value,
+ transcoderFormat.value
);
const dst = new Uint8Array(dstSize);
@@ -260,7 +260,7 @@ function transcodeCompressed(
transcoderFormat.value,
0, // get_alpha_for_opaque_formats
-1, // channel0
- -1, // channel1
+ -1 // channel1
);
if (!defined(transcoded)) {
diff --git a/packages/engine/Source/Workers/transferTypedArrayTest.js b/packages/engine/Source/Workers/transferTypedArrayTest.js
index aa4eb9b1eb89..3cebe76ca23f 100644
--- a/packages/engine/Source/Workers/transferTypedArrayTest.js
+++ b/packages/engine/Source/Workers/transferTypedArrayTest.js
@@ -8,7 +8,7 @@ self.onmessage = function (event) {
{
array: array,
},
- [array.buffer],
+ [array.buffer]
);
} catch (e) {
postMessage({});
diff --git a/packages/engine/Source/Workers/upsampleQuantizedTerrainMesh.js b/packages/engine/Source/Workers/upsampleQuantizedTerrainMesh.js
index fbe235b64a28..b38752da64cd 100644
--- a/packages/engine/Source/Workers/upsampleQuantizedTerrainMesh.js
+++ b/packages/engine/Source/Workers/upsampleQuantizedTerrainMesh.js
@@ -86,7 +86,7 @@ function upsampleQuantizedTerrainMesh(parameters, transferableObjects) {
const texCoords = encoding.decodeTextureCoordinates(
parentVertices,
i,
- decodeTexCoordsScratch,
+ decodeTexCoordsScratch
);
height = encoding.decodeHeight(parentVertices, i);
@@ -98,7 +98,7 @@ function upsampleQuantizedTerrainMesh(parameters, transferableObjects) {
maxShort) |
0,
0,
- maxShort,
+ maxShort
);
if (u < threshold) {
@@ -124,7 +124,7 @@ function upsampleQuantizedTerrainMesh(parameters, transferableObjects) {
const encodedNormal = encoding.getOctEncodedNormal(
parentVertices,
i,
- octEncodedNormalScratch,
+ octEncodedNormalScratch
);
parentNormalBuffer[n] = encodedNormal.x;
parentNormalBuffer[n + 1] = encodedNormal.y;
@@ -176,21 +176,21 @@ function upsampleQuantizedTerrainMesh(parameters, transferableObjects) {
parentVBuffer,
parentHeightBuffer,
parentNormalBuffer,
- i0,
+ i0
);
triangleVertices[1].initializeIndexed(
parentUBuffer,
parentVBuffer,
parentHeightBuffer,
parentNormalBuffer,
- i1,
+ i1
);
triangleVertices[2].initializeIndexed(
parentUBuffer,
parentVBuffer,
parentHeightBuffer,
parentNormalBuffer,
- i2,
+ i2
);
// Clip triangle on the east-west boundary.
@@ -200,7 +200,7 @@ function upsampleQuantizedTerrainMesh(parameters, transferableObjects) {
u0,
u1,
u2,
- clipScratch,
+ clipScratch
);
// Get the first clipped triangle, if any.
@@ -212,7 +212,7 @@ function upsampleQuantizedTerrainMesh(parameters, transferableObjects) {
clippedIndex = clippedTriangleVertices[0].initializeFromClipResult(
clipped,
clippedIndex,
- triangleVertices,
+ triangleVertices
);
if (clippedIndex >= clipped.length) {
@@ -221,7 +221,7 @@ function upsampleQuantizedTerrainMesh(parameters, transferableObjects) {
clippedIndex = clippedTriangleVertices[1].initializeFromClipResult(
clipped,
clippedIndex,
- triangleVertices,
+ triangleVertices
);
if (clippedIndex >= clipped.length) {
@@ -230,7 +230,7 @@ function upsampleQuantizedTerrainMesh(parameters, transferableObjects) {
clippedIndex = clippedTriangleVertices[2].initializeFromClipResult(
clipped,
clippedIndex,
- triangleVertices,
+ triangleVertices
);
// Clip the triangle against the North-south boundary.
@@ -240,7 +240,7 @@ function upsampleQuantizedTerrainMesh(parameters, transferableObjects) {
clippedTriangleVertices[0].getV(),
clippedTriangleVertices[1].getV(),
clippedTriangleVertices[2].getV(),
- clipScratch2,
+ clipScratch2
);
addClippedPolygon(
uBuffer,
@@ -251,7 +251,7 @@ function upsampleQuantizedTerrainMesh(parameters, transferableObjects) {
vertexMap,
clipped2,
clippedTriangleVertices,
- hasVertexNormals,
+ hasVertexNormals
);
// If there's another vertex in the original clipped result,
@@ -261,7 +261,7 @@ function upsampleQuantizedTerrainMesh(parameters, transferableObjects) {
clippedTriangleVertices[2].initializeFromClipResult(
clipped,
clippedIndex,
- triangleVertices,
+ triangleVertices
);
clipped2 = Intersections2D.clipTriangleAtAxisAlignedThreshold(
@@ -270,7 +270,7 @@ function upsampleQuantizedTerrainMesh(parameters, transferableObjects) {
clippedTriangleVertices[0].getV(),
clippedTriangleVertices[1].getV(),
clippedTriangleVertices[2].getV(),
- clipScratch2,
+ clipScratch2
);
addClippedPolygon(
uBuffer,
@@ -281,7 +281,7 @@ function upsampleQuantizedTerrainMesh(parameters, transferableObjects) {
vertexMap,
clipped2,
clippedTriangleVertices,
- hasVertexNormals,
+ hasVertexNormals
);
}
}
@@ -342,7 +342,7 @@ function upsampleQuantizedTerrainMesh(parameters, transferableObjects) {
height = CesiumMath.lerp(
parentMinimumHeight,
parentMaximumHeight,
- heightBuffer[i] / maxShort,
+ heightBuffer[i] / maxShort
);
if (height < minimumHeight) {
minimumHeight = height;
@@ -368,31 +368,30 @@ function upsampleQuantizedTerrainMesh(parameters, transferableObjects) {
cartesianVertices,
Cartesian3.ZERO,
3,
- boundingSphereScratch,
+ boundingSphereScratch
);
const orientedBoundingBox = OrientedBoundingBox.fromRectangle(
rectangle,
minimumHeight,
maximumHeight,
ellipsoid,
- orientedBoundingBoxScratch,
+ orientedBoundingBoxScratch
);
const occluder = new EllipsoidalOccluder(ellipsoid);
- const horizonOcclusionPoint =
- occluder.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(
- boundingSphere.center,
- cartesianVertices,
- 3,
- boundingSphere.center,
- minimumHeight,
- horizonOcclusionPointScratch,
- );
+ const horizonOcclusionPoint = occluder.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(
+ boundingSphere.center,
+ cartesianVertices,
+ 3,
+ boundingSphere.center,
+ minimumHeight,
+ horizonOcclusionPointScratch
+ );
const heightRange = maximumHeight - minimumHeight;
const vertices = new Uint16Array(
- uBuffer.length + vBuffer.length + heightBuffer.length,
+ uBuffer.length + vBuffer.length + heightBuffer.length
);
for (i = 0; i < uBuffer.length; ++i) {
@@ -414,7 +413,7 @@ function upsampleQuantizedTerrainMesh(parameters, transferableObjects) {
const indicesTypedArray = IndexDatatype.createTypedArray(
uBuffer.length,
- indices,
+ indices
);
let encodedNormals;
@@ -423,7 +422,7 @@ function upsampleQuantizedTerrainMesh(parameters, transferableObjects) {
transferableObjects.push(
vertices.buffer,
indicesTypedArray.buffer,
- normalArray.buffer,
+ normalArray.buffer
);
encodedNormals = normalArray.buffer;
} else {
@@ -476,7 +475,7 @@ Vertex.prototype.initializeIndexed = function (
vBuffer,
heightBuffer,
normalBuffer,
- index,
+ index
) {
this.uBuffer = uBuffer;
this.vBuffer = vBuffer;
@@ -491,7 +490,7 @@ Vertex.prototype.initializeIndexed = function (
Vertex.prototype.initializeFromClipResult = function (
clipResult,
index,
- vertices,
+ vertices
) {
let nextIndex = index + 1;
@@ -562,18 +561,18 @@ function lerpOctEncodedNormal(vertex, result) {
first = AttributeCompression.octDecode(
vertex.first.getNormalX(),
vertex.first.getNormalY(),
- first,
+ first
);
second = AttributeCompression.octDecode(
vertex.second.getNormalX(),
vertex.second.getNormalY(),
- second,
+ second
);
cartesian3Scratch = Cartesian3.lerp(
first,
second,
vertex.ratio,
- cartesian3Scratch,
+ cartesian3Scratch
);
Cartesian3.normalize(cartesian3Scratch, cartesian3Scratch);
@@ -617,7 +616,7 @@ function addClippedPolygon(
vertexMap,
clipped,
triangleVertices,
- hasVertexNormals,
+ hasVertexNormals
) {
if (clipped.length === 0) {
return;
@@ -629,7 +628,7 @@ function addClippedPolygon(
clippedIndex = polygonVertices[numVertices++].initializeFromClipResult(
clipped,
clippedIndex,
- triangleVertices,
+ triangleVertices
);
}
diff --git a/packages/engine/Specs/Core/ApproximateTerrainHeightsSpec.js b/packages/engine/Specs/Core/ApproximateTerrainHeightsSpec.js
index 14665fef2327..13328b93a4d8 100644
--- a/packages/engine/Specs/Core/ApproximateTerrainHeightsSpec.js
+++ b/packages/engine/Specs/Core/ApproximateTerrainHeightsSpec.js
@@ -23,15 +23,15 @@ describe("Core/ApproximateTerrainHeights", function () {
it("getMinimumMaximumHeights computes minimum and maximum terrain heights", function () {
const result = ApproximateTerrainHeights.getMinimumMaximumHeights(
- Rectangle.fromDegrees(-121.0, 10.0, -120.0, 11.0),
+ Rectangle.fromDegrees(-121.0, 10.0, -120.0, 11.0)
);
expect(result.minimumTerrainHeight).toEqualEpsilon(
-5269.86,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(result.maximumTerrainHeight).toEqualEpsilon(
-28.53,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
});
@@ -46,7 +46,7 @@ describe("Core/ApproximateTerrainHeights", function () {
ApproximateTerrainHeights._terrainHeights = undefined;
expect(function () {
return ApproximateTerrainHeights.getMinimumMaximumHeights(
- Rectangle.fromDegrees(-121.0, 10.0, -120.0, 11.0),
+ Rectangle.fromDegrees(-121.0, 10.0, -120.0, 11.0)
);
});
ApproximateTerrainHeights._terrainHeights = heights;
@@ -54,19 +54,19 @@ describe("Core/ApproximateTerrainHeights", function () {
it("getBoundingSphere computes a bounding sphere", function () {
const result = ApproximateTerrainHeights.getBoundingSphere(
- Rectangle.fromDegrees(-121.0, 10.0, -120.0, 11.0),
+ Rectangle.fromDegrees(-121.0, 10.0, -120.0, 11.0)
);
expect(result.center).toEqualEpsilon(
new Cartesian3(
-3183013.849117281,
-5403772.559109628,
- 1154581.5821590829,
+ 1154581.5821590829
),
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(result.radius).toEqualEpsilon(
77884.16321007285,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
});
@@ -81,7 +81,7 @@ describe("Core/ApproximateTerrainHeights", function () {
ApproximateTerrainHeights._terrainHeights = undefined;
expect(function () {
return ApproximateTerrainHeights.getBoundingSphere(
- Rectangle.fromDegrees(-121.0, 10.0, -120.0, 11.0),
+ Rectangle.fromDegrees(-121.0, 10.0, -120.0, 11.0)
);
});
ApproximateTerrainHeights._terrainHeights = heights;
diff --git a/packages/engine/Specs/Core/ArcGISTiledElevationTerrainProviderSpec.js b/packages/engine/Specs/Core/ArcGISTiledElevationTerrainProviderSpec.js
index c59001bc02a8..970fdfd9b766 100644
--- a/packages/engine/Specs/Core/ArcGISTiledElevationTerrainProviderSpec.js
+++ b/packages/engine/Specs/Core/ArcGISTiledElevationTerrainProviderSpec.js
@@ -150,7 +150,7 @@ describe("Core/ArcGISTiledElevationTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
// Tile request
if (url.indexOf("/tile/") !== -1) {
@@ -161,7 +161,7 @@ describe("Core/ArcGISTiledElevationTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
return;
}
@@ -196,21 +196,22 @@ describe("Core/ArcGISTiledElevationTerrainProvider", function () {
it("conforms to TerrainProvider interface", function () {
expect(ArcGISTiledElevationTerrainProvider).toConformToInterface(
- TerrainProvider,
+ TerrainProvider
);
});
it("fromUrl throws without url", async function () {
await expectAsync(
- ArcGISTiledElevationTerrainProvider.fromUrl(),
+ ArcGISTiledElevationTerrainProvider.fromUrl()
).toBeRejectedWithDeveloperError(
- "url is required, actual value was undefined",
+ "url is required, actual value was undefined"
);
});
it("fromUrl resolves to new ArcGISTiledElevationTerrainProvider", async function () {
- const provider =
- await ArcGISTiledElevationTerrainProvider.fromUrl("made/up/url");
+ const provider = await ArcGISTiledElevationTerrainProvider.fromUrl(
+ "made/up/url"
+ );
expect(provider).toBeInstanceOf(ArcGISTiledElevationTerrainProvider);
});
@@ -219,15 +220,16 @@ describe("Core/ArcGISTiledElevationTerrainProvider", function () {
const resource = new Resource({
url: "made/up/url",
});
- const provider =
- await ArcGISTiledElevationTerrainProvider.fromUrl(resource);
+ const provider = await ArcGISTiledElevationTerrainProvider.fromUrl(
+ resource
+ );
expect(provider).toBeInstanceOf(ArcGISTiledElevationTerrainProvider);
});
it("fromUrl resolves with url promise", async function () {
const provider = await ArcGISTiledElevationTerrainProvider.fromUrl(
- Promise.resolve("made/up/url"),
+ Promise.resolve("made/up/url")
);
expect(provider).toBeInstanceOf(ArcGISTiledElevationTerrainProvider);
});
@@ -235,36 +237,39 @@ describe("Core/ArcGISTiledElevationTerrainProvider", function () {
it("fromUrl rejects if url rejects", async function () {
await expectAsync(
ArcGISTiledElevationTerrainProvider.fromUrl(
- Promise.reject(new Error("my message")),
- ),
+ Promise.reject(new Error("my message"))
+ )
).toBeRejectedWithError("my message");
});
it("has error event", async function () {
- const provider =
- await ArcGISTiledElevationTerrainProvider.fromUrl("made/up/url");
+ const provider = await ArcGISTiledElevationTerrainProvider.fromUrl(
+ "made/up/url"
+ );
expect(provider.errorEvent).toBeDefined();
expect(provider.errorEvent).toBe(provider.errorEvent);
});
it("returns reasonable geometric error for various levels", async function () {
- const provider =
- await ArcGISTiledElevationTerrainProvider.fromUrl("made/up/url");
+ const provider = await ArcGISTiledElevationTerrainProvider.fromUrl(
+ "made/up/url"
+ );
expect(provider.getLevelMaximumGeometricError(0)).toBeGreaterThan(0.0);
expect(provider.getLevelMaximumGeometricError(0)).toEqualEpsilon(
provider.getLevelMaximumGeometricError(1) * 2.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(provider.getLevelMaximumGeometricError(1)).toEqualEpsilon(
provider.getLevelMaximumGeometricError(2) * 2.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
it("logo is undefined if credit is not provided", async function () {
delete metadata.copyrightText;
- const provider =
- await ArcGISTiledElevationTerrainProvider.fromUrl("made/up/url");
+ const provider = await ArcGISTiledElevationTerrainProvider.fromUrl(
+ "made/up/url"
+ );
expect(provider.credit).toBeUndefined();
});
@@ -273,25 +278,27 @@ describe("Core/ArcGISTiledElevationTerrainProvider", function () {
"made/up/url",
{
credit: "thanks to our awesome made up contributors!",
- },
+ }
);
expect(provider.credit).toBeDefined();
});
it("does not have a water mask", async function () {
- const provider =
- await ArcGISTiledElevationTerrainProvider.fromUrl("made/up/url");
+ const provider = await ArcGISTiledElevationTerrainProvider.fromUrl(
+ "made/up/url"
+ );
expect(provider.hasWaterMask).toBe(false);
});
it("detects WebMercator tiling scheme", async function () {
const baseUrl = "made/up/url";
- const terrainProvider =
- await ArcGISTiledElevationTerrainProvider.fromUrl(baseUrl);
+ const terrainProvider = await ArcGISTiledElevationTerrainProvider.fromUrl(
+ baseUrl
+ );
expect(terrainProvider.tilingScheme).toBeInstanceOf(
- WebMercatorTilingScheme,
+ WebMercatorTilingScheme
);
});
@@ -299,8 +306,9 @@ describe("Core/ArcGISTiledElevationTerrainProvider", function () {
const baseUrl = "made/up/url";
metadata.spatialReference.latestWkid = 4326;
- const terrainProvider =
- await ArcGISTiledElevationTerrainProvider.fromUrl(baseUrl);
+ const terrainProvider = await ArcGISTiledElevationTerrainProvider.fromUrl(
+ baseUrl
+ );
expect(terrainProvider.tilingScheme).toBeInstanceOf(GeographicTilingScheme);
});
@@ -310,7 +318,7 @@ describe("Core/ArcGISTiledElevationTerrainProvider", function () {
metadata.spatialReference.latestWkid = 1234;
await expectAsync(
- ArcGISTiledElevationTerrainProvider.fromUrl(baseUrl),
+ ArcGISTiledElevationTerrainProvider.fromUrl(baseUrl)
).toBeRejectedWithError(RuntimeError, "Invalid spatial reference");
});
@@ -319,15 +327,16 @@ describe("Core/ArcGISTiledElevationTerrainProvider", function () {
delete metadata.tileInfo;
await expectAsync(
- ArcGISTiledElevationTerrainProvider.fromUrl(baseUrl),
+ ArcGISTiledElevationTerrainProvider.fromUrl(baseUrl)
).toBeRejectedWithError(RuntimeError, "tileInfo is required");
});
it("checks availability if TileMap capability exists", async function () {
const baseUrl = "made/up/url";
- const terrainProvider =
- await ArcGISTiledElevationTerrainProvider.fromUrl(baseUrl);
+ const terrainProvider = await ArcGISTiledElevationTerrainProvider.fromUrl(
+ baseUrl
+ );
expect(terrainProvider._hasAvailability).toBe(true);
expect(terrainProvider._tilesAvailable).toBeDefined();
@@ -338,8 +347,9 @@ describe("Core/ArcGISTiledElevationTerrainProvider", function () {
const baseUrl = "made/up/url";
metadata.capabilities = "Image,Mensuration";
- const terrainProvider =
- await ArcGISTiledElevationTerrainProvider.fromUrl(baseUrl);
+ const terrainProvider = await ArcGISTiledElevationTerrainProvider.fromUrl(
+ baseUrl
+ );
expect(terrainProvider._hasAvailability).toBe(false);
expect(terrainProvider._tilesAvailable).toBeUndefined();
@@ -350,8 +360,9 @@ describe("Core/ArcGISTiledElevationTerrainProvider", function () {
it("provides HeightmapTerrainData", async function () {
const baseUrl = "made/up/url";
- const terrainProvider =
- await ArcGISTiledElevationTerrainProvider.fromUrl(baseUrl);
+ const terrainProvider = await ArcGISTiledElevationTerrainProvider.fromUrl(
+ baseUrl
+ );
const promise = terrainProvider.requestTileGeometry(0, 0, 0);
RequestScheduler.update();
@@ -366,14 +377,15 @@ describe("Core/ArcGISTiledElevationTerrainProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
// Do nothing, so requests never complete
deferreds.push(deferred);
};
- const terrainProvider =
- await ArcGISTiledElevationTerrainProvider.fromUrl(baseUrl);
+ const terrainProvider = await ArcGISTiledElevationTerrainProvider.fromUrl(
+ baseUrl
+ );
let promise;
let i;
@@ -398,7 +410,7 @@ describe("Core/ArcGISTiledElevationTerrainProvider", function () {
await Promise.all(
deferreds.map(function (deferred) {
return deferred.promise;
- }),
+ })
);
});
});
diff --git a/packages/engine/Specs/Core/AttributeCompressionSpec.js b/packages/engine/Specs/Core/AttributeCompressionSpec.js
index 1a9237e6f8b1..c288d01c4d1f 100644
--- a/packages/engine/Specs/Core/AttributeCompressionSpec.js
+++ b/packages/engine/Specs/Core/AttributeCompressionSpec.js
@@ -113,28 +113,28 @@ describe("Core/AttributeCompression", function () {
expect(function () {
AttributeCompression.octDecodeFromCartesian4(
new Cartesian4(256, 0, 0, 0),
- result,
+ result
);
}).toThrowDeveloperError();
expect(function () {
AttributeCompression.octDecodeFromCartesian4(
new Cartesian4(0, 256, 0, 0),
- result,
+ result
);
}).toThrowDeveloperError();
expect(function () {
AttributeCompression.octDecodeFromCartesian4(
new Cartesian4(0, 0, 256, 0),
- result,
+ result
);
}).toThrowDeveloperError();
expect(function () {
AttributeCompression.octDecodeFromCartesian4(
new Cartesian4(0, 0, 0, 256),
- result,
+ result
);
}).toThrowDeveloperError();
});
@@ -147,93 +147,93 @@ describe("Core/AttributeCompression", function () {
let normal = new Cartesian3(0.0, 0.0, 1.0);
AttributeCompression.octEncode(normal, encoded);
expect(
- AttributeCompression.octDecode(encoded.x, encoded.y, result),
+ AttributeCompression.octDecode(encoded.x, encoded.y, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(0.0, 0.0, -1.0);
AttributeCompression.octEncode(normal, encoded);
expect(
- AttributeCompression.octDecode(encoded.x, encoded.y, result),
+ AttributeCompression.octDecode(encoded.x, encoded.y, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(0.0, 1.0, 0.0);
AttributeCompression.octEncode(normal, encoded);
expect(
- AttributeCompression.octDecode(encoded.x, encoded.y, result),
+ AttributeCompression.octDecode(encoded.x, encoded.y, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(0.0, -1.0, 0.0);
AttributeCompression.octEncode(normal, encoded);
expect(
- AttributeCompression.octDecode(encoded.x, encoded.y, result),
+ AttributeCompression.octDecode(encoded.x, encoded.y, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(1.0, 0.0, 0.0);
AttributeCompression.octEncode(normal, encoded);
expect(
- AttributeCompression.octDecode(encoded.x, encoded.y, result),
+ AttributeCompression.octDecode(encoded.x, encoded.y, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(-1.0, 0.0, 0.0);
AttributeCompression.octEncode(normal, encoded);
expect(
- AttributeCompression.octDecode(encoded.x, encoded.y, result),
+ AttributeCompression.octDecode(encoded.x, encoded.y, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(1.0, 1.0, 1.0);
Cartesian3.normalize(normal, normal);
AttributeCompression.octEncode(normal, encoded);
expect(
- AttributeCompression.octDecode(encoded.x, encoded.y, result),
+ AttributeCompression.octDecode(encoded.x, encoded.y, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(1.0, -1.0, 1.0);
Cartesian3.normalize(normal, normal);
AttributeCompression.octEncode(normal, encoded);
expect(
- AttributeCompression.octDecode(encoded.x, encoded.y, result),
+ AttributeCompression.octDecode(encoded.x, encoded.y, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(-1.0, -1.0, 1.0);
Cartesian3.normalize(normal, normal);
AttributeCompression.octEncode(normal, encoded);
expect(
- AttributeCompression.octDecode(encoded.x, encoded.y, result),
+ AttributeCompression.octDecode(encoded.x, encoded.y, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(-1.0, 1.0, 1.0);
Cartesian3.normalize(normal, normal);
AttributeCompression.octEncode(normal, encoded);
expect(
- AttributeCompression.octDecode(encoded.x, encoded.y, result),
+ AttributeCompression.octDecode(encoded.x, encoded.y, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(1.0, 1.0, -1.0);
Cartesian3.normalize(normal, normal);
AttributeCompression.octEncode(normal, encoded);
expect(
- AttributeCompression.octDecode(encoded.x, encoded.y, result),
+ AttributeCompression.octDecode(encoded.x, encoded.y, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(1.0, -1.0, -1.0);
Cartesian3.normalize(normal, normal);
AttributeCompression.octEncode(normal, encoded);
expect(
- AttributeCompression.octDecode(encoded.x, encoded.y, result),
+ AttributeCompression.octDecode(encoded.x, encoded.y, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(-1.0, 1.0, -1.0);
Cartesian3.normalize(normal, normal);
AttributeCompression.octEncode(normal, encoded);
expect(
- AttributeCompression.octDecode(encoded.x, encoded.y, result),
+ AttributeCompression.octDecode(encoded.x, encoded.y, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(-1.0, -1.0, -1.0);
Cartesian3.normalize(normal, normal);
AttributeCompression.octEncode(normal, encoded);
expect(
- AttributeCompression.octDecode(encoded.x, encoded.y, result),
+ AttributeCompression.octDecode(encoded.x, encoded.y, result)
).toEqualEpsilon(normal, epsilon);
});
@@ -250,8 +250,8 @@ describe("Core/AttributeCompression", function () {
encoded.x,
encoded.y,
rangeMax,
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(0.0, 0.0, -1.0);
@@ -261,8 +261,8 @@ describe("Core/AttributeCompression", function () {
encoded.x,
encoded.y,
rangeMax,
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(0.0, 1.0, 0.0);
@@ -272,8 +272,8 @@ describe("Core/AttributeCompression", function () {
encoded.x,
encoded.y,
rangeMax,
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(0.0, -1.0, 0.0);
@@ -283,8 +283,8 @@ describe("Core/AttributeCompression", function () {
encoded.x,
encoded.y,
rangeMax,
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(1.0, 0.0, 0.0);
@@ -294,8 +294,8 @@ describe("Core/AttributeCompression", function () {
encoded.x,
encoded.y,
rangeMax,
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(-1.0, 0.0, 0.0);
@@ -305,8 +305,8 @@ describe("Core/AttributeCompression", function () {
encoded.x,
encoded.y,
rangeMax,
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(1.0, 1.0, 1.0);
@@ -317,8 +317,8 @@ describe("Core/AttributeCompression", function () {
encoded.x,
encoded.y,
rangeMax,
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(1.0, -1.0, 1.0);
@@ -329,8 +329,8 @@ describe("Core/AttributeCompression", function () {
encoded.x,
encoded.y,
rangeMax,
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(-1.0, -1.0, 1.0);
@@ -341,8 +341,8 @@ describe("Core/AttributeCompression", function () {
encoded.x,
encoded.y,
rangeMax,
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(-1.0, 1.0, 1.0);
@@ -353,8 +353,8 @@ describe("Core/AttributeCompression", function () {
encoded.x,
encoded.y,
rangeMax,
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(1.0, 1.0, -1.0);
@@ -365,8 +365,8 @@ describe("Core/AttributeCompression", function () {
encoded.x,
encoded.y,
rangeMax,
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(1.0, -1.0, -1.0);
@@ -377,8 +377,8 @@ describe("Core/AttributeCompression", function () {
encoded.x,
encoded.y,
rangeMax,
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(-1.0, 1.0, -1.0);
@@ -389,8 +389,8 @@ describe("Core/AttributeCompression", function () {
encoded.x,
encoded.y,
rangeMax,
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(-1.0, -1.0, -1.0);
@@ -401,8 +401,8 @@ describe("Core/AttributeCompression", function () {
encoded.x,
encoded.y,
rangeMax,
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
});
@@ -414,93 +414,93 @@ describe("Core/AttributeCompression", function () {
let normal = new Cartesian3(0.0, 0.0, 1.0);
AttributeCompression.octEncodeToCartesian4(normal, encoded);
expect(
- AttributeCompression.octDecodeFromCartesian4(encoded, result),
+ AttributeCompression.octDecodeFromCartesian4(encoded, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(0.0, 0.0, -1.0);
AttributeCompression.octEncodeToCartesian4(normal, encoded);
expect(
- AttributeCompression.octDecodeFromCartesian4(encoded, result),
+ AttributeCompression.octDecodeFromCartesian4(encoded, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(0.0, 1.0, 0.0);
AttributeCompression.octEncodeToCartesian4(normal, encoded);
expect(
- AttributeCompression.octDecodeFromCartesian4(encoded, result),
+ AttributeCompression.octDecodeFromCartesian4(encoded, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(0.0, -1.0, 0.0);
AttributeCompression.octEncodeToCartesian4(normal, encoded);
expect(
- AttributeCompression.octDecodeFromCartesian4(encoded, result),
+ AttributeCompression.octDecodeFromCartesian4(encoded, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(1.0, 0.0, 0.0);
AttributeCompression.octEncodeToCartesian4(normal, encoded);
expect(
- AttributeCompression.octDecodeFromCartesian4(encoded, result),
+ AttributeCompression.octDecodeFromCartesian4(encoded, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(-1.0, 0.0, 0.0);
AttributeCompression.octEncodeToCartesian4(normal, encoded);
expect(
- AttributeCompression.octDecodeFromCartesian4(encoded, result),
+ AttributeCompression.octDecodeFromCartesian4(encoded, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(1.0, 1.0, 1.0);
Cartesian3.normalize(normal, normal);
AttributeCompression.octEncodeToCartesian4(normal, encoded);
expect(
- AttributeCompression.octDecodeFromCartesian4(encoded, result),
+ AttributeCompression.octDecodeFromCartesian4(encoded, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(1.0, -1.0, 1.0);
Cartesian3.normalize(normal, normal);
AttributeCompression.octEncodeToCartesian4(normal, encoded);
expect(
- AttributeCompression.octDecodeFromCartesian4(encoded, result),
+ AttributeCompression.octDecodeFromCartesian4(encoded, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(-1.0, -1.0, 1.0);
Cartesian3.normalize(normal, normal);
AttributeCompression.octEncodeToCartesian4(normal, encoded);
expect(
- AttributeCompression.octDecodeFromCartesian4(encoded, result),
+ AttributeCompression.octDecodeFromCartesian4(encoded, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(-1.0, 1.0, 1.0);
Cartesian3.normalize(normal, normal);
AttributeCompression.octEncodeToCartesian4(normal, encoded);
expect(
- AttributeCompression.octDecodeFromCartesian4(encoded, result),
+ AttributeCompression.octDecodeFromCartesian4(encoded, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(1.0, 1.0, -1.0);
Cartesian3.normalize(normal, normal);
AttributeCompression.octEncodeToCartesian4(normal, encoded);
expect(
- AttributeCompression.octDecodeFromCartesian4(encoded, result),
+ AttributeCompression.octDecodeFromCartesian4(encoded, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(1.0, -1.0, -1.0);
Cartesian3.normalize(normal, normal);
AttributeCompression.octEncodeToCartesian4(normal, encoded);
expect(
- AttributeCompression.octDecodeFromCartesian4(encoded, result),
+ AttributeCompression.octDecodeFromCartesian4(encoded, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(-1.0, 1.0, -1.0);
Cartesian3.normalize(normal, normal);
AttributeCompression.octEncodeToCartesian4(normal, encoded);
expect(
- AttributeCompression.octDecodeFromCartesian4(encoded, result),
+ AttributeCompression.octDecodeFromCartesian4(encoded, result)
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(-1.0, -1.0, -1.0);
Cartesian3.normalize(normal, normal);
AttributeCompression.octEncodeToCartesian4(normal, encoded);
expect(
- AttributeCompression.octDecodeFromCartesian4(encoded, result),
+ AttributeCompression.octDecodeFromCartesian4(encoded, result)
).toEqualEpsilon(normal, epsilon);
});
@@ -512,48 +512,48 @@ describe("Core/AttributeCompression", function () {
expect(
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(0.0, 0.0, -1.0);
expect(
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(0.0, 1.0, 0.0);
expect(
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(0.0, -1.0, 0.0);
expect(
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(1.0, 0.0, 0.0);
expect(
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(-1.0, 0.0, 0.0);
expect(
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(1.0, 1.0, 1.0);
@@ -561,8 +561,8 @@ describe("Core/AttributeCompression", function () {
expect(
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(1.0, -1.0, 1.0);
@@ -570,8 +570,8 @@ describe("Core/AttributeCompression", function () {
expect(
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(-1.0, -1.0, 1.0);
@@ -579,8 +579,8 @@ describe("Core/AttributeCompression", function () {
expect(
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(-1.0, 1.0, 1.0);
@@ -588,8 +588,8 @@ describe("Core/AttributeCompression", function () {
expect(
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(1.0, 1.0, -1.0);
@@ -597,8 +597,8 @@ describe("Core/AttributeCompression", function () {
expect(
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(1.0, -1.0, -1.0);
@@ -606,8 +606,8 @@ describe("Core/AttributeCompression", function () {
expect(
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(-1.0, 1.0, -1.0);
@@ -615,8 +615,8 @@ describe("Core/AttributeCompression", function () {
expect(
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
normal = new Cartesian3(-1.0, -1.0, -1.0);
@@ -624,8 +624,8 @@ describe("Core/AttributeCompression", function () {
expect(
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result,
- ),
+ result
+ )
).toEqualEpsilon(normal, epsilon);
});
@@ -639,7 +639,7 @@ describe("Core/AttributeCompression", function () {
AttributeCompression.octDecode(encoded.x, encoded.y, result1);
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result2,
+ result2
);
expect(result1).toEqual(result2);
@@ -648,7 +648,7 @@ describe("Core/AttributeCompression", function () {
AttributeCompression.octDecode(encoded.x, encoded.y, result1);
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result2,
+ result2
);
expect(result1).toEqual(result2);
@@ -657,7 +657,7 @@ describe("Core/AttributeCompression", function () {
AttributeCompression.octDecode(encoded.x, encoded.y, result1);
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result2,
+ result2
);
expect(result1).toEqual(result2);
@@ -666,7 +666,7 @@ describe("Core/AttributeCompression", function () {
AttributeCompression.octDecode(encoded.x, encoded.y, result1);
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result2,
+ result2
);
expect(result1).toEqual(result2);
@@ -675,7 +675,7 @@ describe("Core/AttributeCompression", function () {
AttributeCompression.octDecode(encoded.x, encoded.y, result1);
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result2,
+ result2
);
expect(result1).toEqual(result2);
@@ -684,7 +684,7 @@ describe("Core/AttributeCompression", function () {
AttributeCompression.octDecode(encoded.x, encoded.y, result1);
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result2,
+ result2
);
expect(result1).toEqual(result2);
@@ -694,7 +694,7 @@ describe("Core/AttributeCompression", function () {
AttributeCompression.octDecode(encoded.x, encoded.y, result1);
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result2,
+ result2
);
expect(result1).toEqual(result2);
@@ -704,7 +704,7 @@ describe("Core/AttributeCompression", function () {
AttributeCompression.octDecode(encoded.x, encoded.y, result1);
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result2,
+ result2
);
expect(result1).toEqual(result2);
@@ -714,7 +714,7 @@ describe("Core/AttributeCompression", function () {
AttributeCompression.octDecode(encoded.x, encoded.y, result1);
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result2,
+ result2
);
expect(result1).toEqual(result2);
@@ -724,7 +724,7 @@ describe("Core/AttributeCompression", function () {
AttributeCompression.octDecode(encoded.x, encoded.y, result1);
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result2,
+ result2
);
expect(result1).toEqual(result2);
@@ -734,7 +734,7 @@ describe("Core/AttributeCompression", function () {
AttributeCompression.octDecode(encoded.x, encoded.y, result1);
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result2,
+ result2
);
expect(result1).toEqual(result2);
@@ -744,7 +744,7 @@ describe("Core/AttributeCompression", function () {
AttributeCompression.octDecode(encoded.x, encoded.y, result1);
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result2,
+ result2
);
expect(result1).toEqual(result2);
@@ -754,7 +754,7 @@ describe("Core/AttributeCompression", function () {
AttributeCompression.octDecode(encoded.x, encoded.y, result1);
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result2,
+ result2
);
expect(result1).toEqual(result2);
@@ -764,7 +764,7 @@ describe("Core/AttributeCompression", function () {
AttributeCompression.octDecode(encoded.x, encoded.y, result1);
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(normal),
- result2,
+ result2
);
expect(result1).toEqual(result2);
});
@@ -794,9 +794,9 @@ describe("Core/AttributeCompression", function () {
const encoded = AttributeCompression.octEncode(vector, new Cartesian2());
const encodedFloat = AttributeCompression.octPackFloat(encoded);
expect(
- AttributeCompression.octDecodeFloat(encodedFloat, new Cartesian3()),
+ AttributeCompression.octDecodeFloat(encodedFloat, new Cartesian3())
).toEqual(
- AttributeCompression.octDecode(encoded.x, encoded.y, new Cartesian3()),
+ AttributeCompression.octDecode(encoded.x, encoded.y, new Cartesian3())
);
});
@@ -820,20 +820,20 @@ describe("Core/AttributeCompression", function () {
expect(decodedX).toEqual(
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(x),
- new Cartesian3(),
- ),
+ new Cartesian3()
+ )
);
expect(decodedY).toEqual(
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(y),
- new Cartesian3(),
- ),
+ new Cartesian3()
+ )
);
expect(decodedZ).toEqual(
AttributeCompression.octDecodeFloat(
AttributeCompression.octEncodeFloat(z),
- new Cartesian3(),
- ),
+ new Cartesian3()
+ )
);
});
@@ -843,7 +843,7 @@ describe("Core/AttributeCompression", function () {
undefined,
new Cartesian3(),
new Cartesian3(),
- new Cartesian2(),
+ new Cartesian2()
);
}).toThrowDeveloperError();
});
@@ -854,7 +854,7 @@ describe("Core/AttributeCompression", function () {
new Cartesian3(),
undefined,
new Cartesian3(),
- new Cartesian2(),
+ new Cartesian2()
);
}).toThrowDeveloperError();
});
@@ -865,7 +865,7 @@ describe("Core/AttributeCompression", function () {
new Cartesian3(),
new Cartesian3(),
undefined,
- new Cartesian2(),
+ new Cartesian2()
);
}).toThrowDeveloperError();
});
@@ -876,7 +876,7 @@ describe("Core/AttributeCompression", function () {
new Cartesian3(),
new Cartesian3(),
new Cartesian3(),
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
@@ -887,7 +887,7 @@ describe("Core/AttributeCompression", function () {
undefined,
new Cartesian3(),
new Cartesian3(),
- new Cartesian3(),
+ new Cartesian3()
);
}).toThrowDeveloperError();
});
@@ -898,7 +898,7 @@ describe("Core/AttributeCompression", function () {
new Cartesian2(),
undefined,
new Cartesian3(),
- new Cartesian3(),
+ new Cartesian3()
);
}).toThrowDeveloperError();
});
@@ -909,7 +909,7 @@ describe("Core/AttributeCompression", function () {
new Cartesian2(),
new Cartesian3(),
undefined,
- new Cartesian3(),
+ new Cartesian3()
);
}).toThrowDeveloperError();
});
@@ -920,7 +920,7 @@ describe("Core/AttributeCompression", function () {
new Cartesian2(),
new Cartesian3(),
new Cartesian3(),
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
@@ -930,8 +930,8 @@ describe("Core/AttributeCompression", function () {
expect(
AttributeCompression.decompressTextureCoordinates(
AttributeCompression.compressTextureCoordinates(coords),
- new Cartesian2(),
- ),
+ new Cartesian2()
+ )
).toEqualEpsilon(coords, 1.0 / 4096.0);
});
@@ -945,7 +945,7 @@ describe("Core/AttributeCompression", function () {
expect(function () {
AttributeCompression.decompressTextureCoordinates(
undefined,
- new Cartesian2(),
+ new Cartesian2()
);
}).toThrowDeveloperError();
});
@@ -961,8 +961,8 @@ describe("Core/AttributeCompression", function () {
expect(
AttributeCompression.decompressTextureCoordinates(
AttributeCompression.compressTextureCoordinates(coords),
- new Cartesian2(),
- ),
+ new Cartesian2()
+ )
).toEqual(coords);
});
@@ -971,8 +971,8 @@ describe("Core/AttributeCompression", function () {
expect(
AttributeCompression.decompressTextureCoordinates(
AttributeCompression.compressTextureCoordinates(coords),
- new Cartesian2(),
- ),
+ new Cartesian2()
+ )
).toEqual(coords);
});
@@ -981,8 +981,8 @@ describe("Core/AttributeCompression", function () {
expect(
AttributeCompression.decompressTextureCoordinates(
AttributeCompression.compressTextureCoordinates(coords),
- new Cartesian2(),
- ),
+ new Cartesian2()
+ )
).toEqualEpsilon(coords, 1.0 / 4095.0);
});
@@ -991,8 +991,8 @@ describe("Core/AttributeCompression", function () {
expect(
AttributeCompression.decompressTextureCoordinates(
AttributeCompression.compressTextureCoordinates(coords),
- new Cartesian2(),
- ),
+ new Cartesian2()
+ )
).toEqualEpsilon(coords, 1.0 / 4095.0);
});
@@ -1001,8 +1001,8 @@ describe("Core/AttributeCompression", function () {
expect(
AttributeCompression.decompressTextureCoordinates(
AttributeCompression.compressTextureCoordinates(coords),
- new Cartesian2(),
- ),
+ new Cartesian2()
+ )
).toEqualEpsilon(coords, 1.0 / 4095.0);
});
@@ -1056,7 +1056,7 @@ describe("Core/AttributeCompression", function () {
const vBuffer = new Uint16Array(
encoded.buffer,
length * Uint16Array.BYTES_PER_ELEMENT,
- length,
+ length
);
AttributeCompression.zigZagDeltaDecode(uBuffer, vBuffer);
@@ -1079,18 +1079,18 @@ describe("Core/AttributeCompression", function () {
const encoded = deltaZigZagEncode(
decodedUBuffer,
decodedVBuffer,
- decodedHeightBuffer,
+ decodedHeightBuffer
);
const uBuffer = new Uint16Array(encoded.buffer, 0, length);
const vBuffer = new Uint16Array(
encoded.buffer,
length * Uint16Array.BYTES_PER_ELEMENT,
- length,
+ length
);
const heightBuffer = new Uint16Array(
encoded.buffer,
2 * length * Uint16Array.BYTES_PER_ELEMENT,
- length,
+ length
);
AttributeCompression.zigZagDeltaDecode(uBuffer, vBuffer, heightBuffer);
@@ -1116,7 +1116,7 @@ describe("Core/AttributeCompression", function () {
expect(function () {
AttributeCompression.zigZagDeltaDecode(
new Uint16Array(10),
- new Uint16Array(11),
+ new Uint16Array(11)
);
}).toThrowDeveloperError();
});
@@ -1126,7 +1126,7 @@ describe("Core/AttributeCompression", function () {
AttributeCompression.zigZagDeltaDecode(
new Uint16Array(10),
new Uint16Array(10),
- new Uint16Array(11),
+ new Uint16Array(11)
);
}).toThrowDeveloperError();
});
@@ -1137,7 +1137,7 @@ describe("Core/AttributeCompression", function () {
undefined,
ComponentDatatype.UNSIGNED_BYTE,
AttributeType.VEC3,
- 1,
+ 1
);
}).toThrowDeveloperError();
});
@@ -1148,7 +1148,7 @@ describe("Core/AttributeCompression", function () {
new Uint8Array([0, 0, 0, 0]),
undefined,
AttributeType.VEC3,
- 1,
+ 1
);
}).toThrowDeveloperError();
});
@@ -1159,7 +1159,7 @@ describe("Core/AttributeCompression", function () {
new Uint8Array([0, 0, 0, 0]),
ComponentDatatype.UNSIGNED_BYTE,
undefined,
- 1,
+ 1
);
}).toThrowDeveloperError();
});
@@ -1170,7 +1170,7 @@ describe("Core/AttributeCompression", function () {
new Uint8Array([0, 0, 0, 0]),
ComponentDatatype.UNSIGNED_BYTE,
AttributeType.VEC3,
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
@@ -1182,7 +1182,7 @@ describe("Core/AttributeCompression", function () {
new Int8Array(input),
ComponentDatatype.BYTE,
AttributeType.VEC3,
- 3,
+ 3
);
for (let i = 0; i < input.length; i++) {
expect(result[i]).toEqualEpsilon(expected[i], CesiumMath.EPSILON2);
@@ -1196,7 +1196,7 @@ describe("Core/AttributeCompression", function () {
new Uint8Array(input),
ComponentDatatype.UNSIGNED_BYTE,
AttributeType.VEC3,
- 3,
+ 3
);
for (let i = 0; i < input.length; i++) {
expect(result[i]).toEqualEpsilon(expected[i], CesiumMath.EPSILON2);
@@ -1210,7 +1210,7 @@ describe("Core/AttributeCompression", function () {
new Int16Array(input),
ComponentDatatype.SHORT,
AttributeType.VEC3,
- 3,
+ 3
);
for (let i = 0; i < input.length; i++) {
expect(result[i]).toEqualEpsilon(expected[i], CesiumMath.EPSILON5);
@@ -1224,7 +1224,7 @@ describe("Core/AttributeCompression", function () {
new Uint16Array(input),
ComponentDatatype.UNSIGNED_SHORT,
AttributeType.VEC3,
- 3,
+ 3
);
for (let i = 0; i < input.length; i++) {
expect(result[i]).toEqualEpsilon(expected[i], CesiumMath.EPSILON5);
@@ -1233,7 +1233,14 @@ describe("Core/AttributeCompression", function () {
it("dequantize works with INT", function () {
const input = [
- -2147483647, -2147483647, -2147483647, 0, 0, 0, 2147483647, 2147483647,
+ -2147483647,
+ -2147483647,
+ -2147483647,
+ 0,
+ 0,
+ 0,
+ 2147483647,
+ 2147483647,
2147483647,
];
const expected = [-1, -1, -1, 0, 0, 0, 1, 1, 1];
@@ -1241,7 +1248,7 @@ describe("Core/AttributeCompression", function () {
new Int32Array(input),
ComponentDatatype.INT,
AttributeType.VEC3,
- 3,
+ 3
);
for (let i = 0; i < input.length; i++) {
expect(result[i]).toEqual(expected[i]);
@@ -1250,7 +1257,14 @@ describe("Core/AttributeCompression", function () {
it("dequantize works with UNSIGNED_INT", function () {
const input = [
- 0, 0, 0, 2147483647, 2147483647, 2147483647, 4294967295, 4294967295,
+ 0,
+ 0,
+ 0,
+ 2147483647,
+ 2147483647,
+ 2147483647,
+ 4294967295,
+ 4294967295,
4294967295,
];
const expected = [0, 0, 0, 0.5, 0.5, 0.5, 1, 1, 1];
@@ -1258,7 +1272,7 @@ describe("Core/AttributeCompression", function () {
new Uint32Array(input),
ComponentDatatype.UNSIGNED_INT,
AttributeType.VEC3,
- 3,
+ 3
);
for (let i = 0; i < input.length; i++) {
expect(result[i]).toEqual(expected[i]);
@@ -1275,7 +1289,7 @@ describe("Core/AttributeCompression", function () {
expect(function () {
return AttributeCompression.decodeRGB565(
new Uint16Array([0]),
- new Float32Array(1),
+ new Float32Array(1)
);
}).toThrowDeveloperError();
});
diff --git a/packages/engine/Specs/Core/AxisAlignedBoundingBoxSpec.js b/packages/engine/Specs/Core/AxisAlignedBoundingBoxSpec.js
index d01e1155ec3d..0a7ced5342d9 100644
--- a/packages/engine/Specs/Core/AxisAlignedBoundingBoxSpec.js
+++ b/packages/engine/Specs/Core/AxisAlignedBoundingBoxSpec.js
@@ -109,7 +109,7 @@ describe("Core/AxisAlignedBoundingBox", function () {
it("clone without a result parameter", function () {
const box = new AxisAlignedBoundingBox(
Cartesian3.UNIT_Y,
- Cartesian3.UNIT_X,
+ Cartesian3.UNIT_X
);
const result = box.clone();
expect(box).not.toBe(result);
@@ -120,7 +120,7 @@ describe("Core/AxisAlignedBoundingBox", function () {
const box = new AxisAlignedBoundingBox(
Cartesian3.UNIT_Y,
Cartesian3.UNIT_X,
- Cartesian3.UNIT_Z,
+ Cartesian3.UNIT_Z
);
const result = box.clone();
expect(box).not.toBe(result);
@@ -130,11 +130,11 @@ describe("Core/AxisAlignedBoundingBox", function () {
it("clone with a result parameter", function () {
const box = new AxisAlignedBoundingBox(
Cartesian3.UNIT_Y,
- Cartesian3.UNIT_X,
+ Cartesian3.UNIT_X
);
const result = new AxisAlignedBoundingBox(
Cartesian3.ZERO,
- Cartesian3.UNIT_Z,
+ Cartesian3.UNIT_Z
);
const returnedResult = box.clone(result);
expect(result).toBe(returnedResult);
@@ -145,7 +145,7 @@ describe("Core/AxisAlignedBoundingBox", function () {
it('clone works with "this" result parameter', function () {
const box = new AxisAlignedBoundingBox(
Cartesian3.UNIT_Y,
- Cartesian3.UNIT_X,
+ Cartesian3.UNIT_X
);
const returnedResult = box.clone(box);
expect(box).toBe(returnedResult);
@@ -157,7 +157,7 @@ describe("Core/AxisAlignedBoundingBox", function () {
const box = new AxisAlignedBoundingBox(
Cartesian3.UNIT_X,
Cartesian3.UNIT_Y,
- Cartesian3.UNIT_Z,
+ Cartesian3.UNIT_Z
);
const bogie = new Cartesian3(2, 3, 4);
expect(
@@ -165,24 +165,24 @@ describe("Core/AxisAlignedBoundingBox", function () {
new AxisAlignedBoundingBox(
Cartesian3.UNIT_X,
Cartesian3.UNIT_Y,
- Cartesian3.UNIT_Z,
- ),
- ),
+ Cartesian3.UNIT_Z
+ )
+ )
).toEqual(true);
expect(
box.equals(
- new AxisAlignedBoundingBox(bogie, Cartesian3.UNIT_Y, Cartesian3.UNIT_Y),
- ),
+ new AxisAlignedBoundingBox(bogie, Cartesian3.UNIT_Y, Cartesian3.UNIT_Y)
+ )
).toEqual(false);
expect(
box.equals(
- new AxisAlignedBoundingBox(Cartesian3.UNIT_X, bogie, Cartesian3.UNIT_Z),
- ),
+ new AxisAlignedBoundingBox(Cartesian3.UNIT_X, bogie, Cartesian3.UNIT_Z)
+ )
).toEqual(false);
expect(
box.equals(
- new AxisAlignedBoundingBox(Cartesian3.UNIT_X, Cartesian3.UNIT_Y, bogie),
- ),
+ new AxisAlignedBoundingBox(Cartesian3.UNIT_X, Cartesian3.UNIT_Y, bogie)
+ )
).toEqual(false);
expect(box.equals(undefined)).toEqual(false);
});
@@ -197,7 +197,7 @@ describe("Core/AxisAlignedBoundingBox", function () {
it("intersectPlane works with box on the positive side of a plane", function () {
const box = new AxisAlignedBoundingBox(
Cartesian3.negate(Cartesian3.UNIT_X, new Cartesian3()),
- Cartesian3.ZERO,
+ Cartesian3.ZERO
);
const normal = Cartesian3.negate(Cartesian3.UNIT_X, new Cartesian3());
const position = Cartesian3.UNIT_X;
@@ -208,7 +208,7 @@ describe("Core/AxisAlignedBoundingBox", function () {
it("intersectPlane works with box on the negative side of a plane", function () {
const box = new AxisAlignedBoundingBox(
Cartesian3.negate(Cartesian3.UNIT_X, new Cartesian3()),
- Cartesian3.ZERO,
+ Cartesian3.ZERO
);
const normal = Cartesian3.UNIT_X;
const position = Cartesian3.UNIT_X;
@@ -219,7 +219,7 @@ describe("Core/AxisAlignedBoundingBox", function () {
it("intersectPlane works with box intersecting a plane", function () {
const box = new AxisAlignedBoundingBox(
Cartesian3.ZERO,
- Cartesian3.multiplyByScalar(Cartesian3.UNIT_X, 2.0, new Cartesian3()),
+ Cartesian3.multiplyByScalar(Cartesian3.UNIT_X, 2.0, new Cartesian3())
);
const normal = Cartesian3.UNIT_X;
const position = Cartesian3.UNIT_X;
diff --git a/packages/engine/Specs/Core/BingMapsGeocoderServiceSpec.js b/packages/engine/Specs/Core/BingMapsGeocoderServiceSpec.js
index cf707183a611..9d5dbccfda02 100644
--- a/packages/engine/Specs/Core/BingMapsGeocoderServiceSpec.js
+++ b/packages/engine/Specs/Core/BingMapsGeocoderServiceSpec.js
@@ -34,7 +34,7 @@ describe("Core/BingMapsGeocoderService", function () {
Resource._Implementations.loadAndExecuteScript = function (
url,
functionName,
- deferred,
+ deferred
) {
const parsedUrl = new URL(url);
expect(parsedUrl.searchParams.get("query")).toEqual(query);
@@ -67,7 +67,7 @@ describe("Core/BingMapsGeocoderService", function () {
Resource._Implementations.loadAndExecuteScript = function (
url,
functionName,
- deferred,
+ deferred
) {
const parsedUrl = new URL(url);
expect(parsedUrl.searchParams.get("query")).toEqual(query);
@@ -90,7 +90,7 @@ describe("Core/BingMapsGeocoderService", function () {
Resource._Implementations.loadAndExecuteScript = function (
url,
functionName,
- deferred,
+ deferred
) {
deferred.resolve(data);
};
@@ -111,7 +111,7 @@ describe("Core/BingMapsGeocoderService", function () {
Resource._Implementations.loadAndExecuteScript = function (
url,
functionName,
- deferred,
+ deferred
) {
deferred.resolve(data);
};
@@ -125,7 +125,7 @@ describe("Core/BingMapsGeocoderService", function () {
expect(service.credit).toBeInstanceOf(Credit);
expect(service.credit.html).toEqual(
- `
`,
+ `
`
);
expect(service.credit.showOnScreen).toBe(false);
});
diff --git a/packages/engine/Specs/Core/BoundingRectangleSpec.js b/packages/engine/Specs/Core/BoundingRectangleSpec.js
index f10b3410c341..9046e54b0523 100644
--- a/packages/engine/Specs/Core/BoundingRectangleSpec.js
+++ b/packages/engine/Specs/Core/BoundingRectangleSpec.js
@@ -55,19 +55,19 @@ describe("Core/BoundingRectangle", function () {
it("equals", function () {
const rectangle = new BoundingRectangle(1.0, 2.0, 3.0, 4.0);
expect(rectangle.equals(new BoundingRectangle(1.0, 2.0, 3.0, 4.0))).toEqual(
- true,
+ true
);
expect(rectangle.equals(new BoundingRectangle(5.0, 2.0, 3.0, 4.0))).toEqual(
- false,
+ false
);
expect(rectangle.equals(new BoundingRectangle(1.0, 6.0, 3.0, 4.0))).toEqual(
- false,
+ false
);
expect(rectangle.equals(new BoundingRectangle(1.0, 2.0, 7.0, 4.0))).toEqual(
- false,
+ false
);
expect(rectangle.equals(new BoundingRectangle(1.0, 2.0, 3.0, 8.0))).toEqual(
- false,
+ false
);
expect(rectangle.equals(undefined)).toEqual(false);
});
@@ -123,10 +123,10 @@ describe("Core/BoundingRectangle", function () {
rectangle.west,
rectangle.south,
rectangle.east - rectangle.west,
- rectangle.north - rectangle.south,
+ rectangle.north - rectangle.south
);
expect(BoundingRectangle.fromRectangle(rectangle, projection)).toEqual(
- expected,
+ expected
);
});
@@ -136,7 +136,7 @@ describe("Core/BoundingRectangle", function () {
rectangle.west,
rectangle.south,
rectangle.east - rectangle.west,
- rectangle.north - rectangle.south,
+ rectangle.north - rectangle.south
);
const projection = new GeographicProjection(Ellipsoid.UNIT_SPHERE);
@@ -144,7 +144,7 @@ describe("Core/BoundingRectangle", function () {
const returnedResult = BoundingRectangle.fromRectangle(
rectangle,
projection,
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(returnedResult).toEqual(expected);
@@ -157,19 +157,19 @@ describe("Core/BoundingRectangle", function () {
const rectangle5 = new BoundingRectangle(2, -6, 4, 4);
const rectangle6 = new BoundingRectangle(2, 8, 4, 4);
expect(BoundingRectangle.intersect(rectangle1, rectangle2)).toEqual(
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
expect(BoundingRectangle.intersect(rectangle1, rectangle3)).toEqual(
- Intersect.OUTSIDE,
+ Intersect.OUTSIDE
);
expect(BoundingRectangle.intersect(rectangle1, rectangle4)).toEqual(
- Intersect.OUTSIDE,
+ Intersect.OUTSIDE
);
expect(BoundingRectangle.intersect(rectangle1, rectangle5)).toEqual(
- Intersect.OUTSIDE,
+ Intersect.OUTSIDE
);
expect(BoundingRectangle.intersect(rectangle1, rectangle6)).toEqual(
- Intersect.OUTSIDE,
+ Intersect.OUTSIDE
);
});
@@ -189,7 +189,7 @@ describe("Core/BoundingRectangle", function () {
const returnedResult = BoundingRectangle.union(
rectangle1,
rectangle2,
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(returnedResult).toEqual(expected);
@@ -291,9 +291,10 @@ describe("Core/BoundingRectangle", function () {
}).toThrowDeveloperError();
});
- createPackableSpecs(
- BoundingRectangle,
- new BoundingRectangle(1, 2, 3, 4),
- [1, 2, 3, 4],
- );
+ createPackableSpecs(BoundingRectangle, new BoundingRectangle(1, 2, 3, 4), [
+ 1,
+ 2,
+ 3,
+ 4,
+ ]);
});
diff --git a/packages/engine/Specs/Core/BoundingSphereSpec.js b/packages/engine/Specs/Core/BoundingSphereSpec.js
index 82283f4a7d60..2ff3b3ade619 100644
--- a/packages/engine/Specs/Core/BoundingSphereSpec.js
+++ b/packages/engine/Specs/Core/BoundingSphereSpec.js
@@ -125,19 +125,19 @@ describe("Core/BoundingSphere", function () {
it("equals", function () {
const sphere = new BoundingSphere(new Cartesian3(1.0, 2.0, 3.0), 4.0);
expect(
- sphere.equals(new BoundingSphere(new Cartesian3(1.0, 2.0, 3.0), 4.0)),
+ sphere.equals(new BoundingSphere(new Cartesian3(1.0, 2.0, 3.0), 4.0))
).toEqual(true);
expect(
- sphere.equals(new BoundingSphere(new Cartesian3(5.0, 2.0, 3.0), 4.0)),
+ sphere.equals(new BoundingSphere(new Cartesian3(5.0, 2.0, 3.0), 4.0))
).toEqual(false);
expect(
- sphere.equals(new BoundingSphere(new Cartesian3(1.0, 6.0, 3.0), 4.0)),
+ sphere.equals(new BoundingSphere(new Cartesian3(1.0, 6.0, 3.0), 4.0))
).toEqual(false);
expect(
- sphere.equals(new BoundingSphere(new Cartesian3(1.0, 2.0, 7.0), 4.0)),
+ sphere.equals(new BoundingSphere(new Cartesian3(1.0, 2.0, 7.0), 4.0))
).toEqual(false);
expect(
- sphere.equals(new BoundingSphere(new Cartesian3(1.0, 2.0, 3.0), 8.0)),
+ sphere.equals(new BoundingSphere(new Cartesian3(1.0, 2.0, 3.0), 8.0))
).toEqual(false);
expect(sphere.equals(undefined)).toEqual(false);
});
@@ -185,7 +185,7 @@ describe("Core/BoundingSphere", function () {
positions.push(
new Cartesian3(1, 1, 1),
new Cartesian3(2, 2, 2),
- new Cartesian3(3, 3, 3),
+ new Cartesian3(3, 3, 3)
);
const sphere = BoundingSphere.fromPoints(positions);
const radius = sphere.radius;
@@ -261,10 +261,10 @@ describe("Core/BoundingSphere", function () {
for (let i = 0; i < numElements; i += 3) {
expect(positions[i] <= max.x && positions[i] >= min.x).toEqual(true);
expect(positions[i + 1] <= max.y && positions[i + 1] >= min.y).toEqual(
- true,
+ true
);
expect(positions[i + 2] <= max.z && positions[i + 2] >= min.z).toEqual(
- true,
+ true
);
}
});
@@ -273,7 +273,7 @@ describe("Core/BoundingSphere", function () {
const sphere = BoundingSphere.fromVertices(
getPositionsAsFlatArrayWithStride5(),
undefined,
- 5,
+ 5
);
expect(sphere.center).toEqual(positionsCenter);
expect(sphere.radius).toEqual(positionsRadius);
@@ -284,10 +284,10 @@ describe("Core/BoundingSphere", function () {
const sphere = BoundingSphere.fromVertices(
getPositionsAsFlatArrayWithStride5(),
center,
- 5,
+ 5
);
expect(sphere.center).toEqual(
- Cartesian3.add(positionsCenter, center, new Cartesian3()),
+ Cartesian3.add(positionsCenter, center, new Cartesian3())
);
expect(sphere.radius).toEqual(positionsRadius);
});
@@ -306,11 +306,11 @@ describe("Core/BoundingSphere", function () {
getPositionsAsFlatArrayWithStride5(),
center,
5,
- result,
+ result
);
expect(sphere).toEqual(result);
expect(result.center).toEqual(
- Cartesian3.add(positionsCenter, center, new Cartesian3()),
+ Cartesian3.add(positionsCenter, center, new Cartesian3())
);
expect(result.radius).toEqual(positionsRadius);
});
@@ -326,7 +326,7 @@ describe("Core/BoundingSphere", function () {
positions.low.length = positions.low.length - 1;
const sphere = BoundingSphere.fromEncodedCartesianVertices(
positions.high,
- positions.low,
+ positions.low
);
expect(sphere.center).toEqual(Cartesian3.ZERO);
expect(sphere.radius).toEqual(0.0);
@@ -336,7 +336,7 @@ describe("Core/BoundingSphere", function () {
const positions = getPositionsAsEncodedFlatArray();
const sphere = BoundingSphere.fromEncodedCartesianVertices(
positions.high,
- positions.low,
+ positions.low
);
expect(sphere.center).toEqual(positionsCenter);
expect(sphere.radius).toEqual(positionsRadius);
@@ -346,7 +346,7 @@ describe("Core/BoundingSphere", function () {
let positions = getPositionsAsEncodedFlatArray();
const sphere = BoundingSphere.fromEncodedCartesianVertices(
positions.high,
- positions.low,
+ positions.low
);
const radius = sphere.radius;
const center = sphere.center;
@@ -374,7 +374,7 @@ describe("Core/BoundingSphere", function () {
];
for (let j = 0; j < appendedPositions.length; ++j) {
const encoded = EncodedCartesian3.fromCartesian(
- Cartesian3.add(appendedPositions[j], center, new Cartesian3()),
+ Cartesian3.add(appendedPositions[j], center, new Cartesian3())
);
positions.high.push(encoded.high.x);
positions.high.push(encoded.high.y);
@@ -386,7 +386,7 @@ describe("Core/BoundingSphere", function () {
const sphere = BoundingSphere.fromEncodedCartesianVertices(
positions.high,
- positions.low,
+ positions.low
);
const radius = sphere.radius;
const sphereCenter = sphere.center;
@@ -399,10 +399,10 @@ describe("Core/BoundingSphere", function () {
for (let i = 0; i < numElements; i += 3) {
expect(positions[i] <= max.x && positions[i] >= min.x).toEqual(true);
expect(positions[i + 1] <= max.y && positions[i + 1] >= min.y).toEqual(
- true,
+ true
);
expect(positions[i + 2] <= max.z && positions[i + 2] >= min.z).toEqual(
- true,
+ true
);
}
});
@@ -413,7 +413,7 @@ describe("Core/BoundingSphere", function () {
const sphere = BoundingSphere.fromEncodedCartesianVertices(
positions.high,
positions.low,
- result,
+ result
);
expect(sphere).toEqual(result);
expect(result.center).toEqual(positionsCenter);
@@ -432,11 +432,11 @@ describe("Core/BoundingSphere", function () {
const expected = new BoundingSphere(
Cartesian3.ZERO,
Math.sqrt(
- rectangle.east * rectangle.east + rectangle.north * rectangle.north,
- ),
+ rectangle.east * rectangle.east + rectangle.north * rectangle.north
+ )
);
expect(BoundingSphere.fromRectangle2D(rectangle, projection)).toEqual(
- expected,
+ expected
);
});
@@ -451,10 +451,10 @@ describe("Core/BoundingSphere", function () {
const ellipsoid = Ellipsoid.WGS84;
const expected = new BoundingSphere(
Cartesian3.ZERO,
- ellipsoid.maximumRadius,
+ ellipsoid.maximumRadius
);
expect(BoundingSphere.fromRectangle3D(rectangle, ellipsoid)).toEqual(
- expected,
+ expected
);
});
@@ -465,14 +465,14 @@ describe("Core/BoundingSphere", function () {
const points = Rectangle.subsample(rectangle, ellipsoid, height);
const expected = BoundingSphere.fromPoints(points);
expect(
- BoundingSphere.fromRectangle3D(rectangle, ellipsoid, height),
+ BoundingSphere.fromRectangle3D(rectangle, ellipsoid, height)
).toEqual(expected);
});
it("fromCornerPoints", function () {
const sphere = BoundingSphere.fromCornerPoints(
new Cartesian3(-1.0, -0.0, 0.0),
- new Cartesian3(1.0, 0.0, 0.0),
+ new Cartesian3(1.0, 0.0, 0.0)
);
expect(sphere).toEqual(new BoundingSphere(Cartesian3.ZERO, 1.0));
});
@@ -482,7 +482,7 @@ describe("Core/BoundingSphere", function () {
const result = BoundingSphere.fromCornerPoints(
new Cartesian3(0.0, -1.0, 0.0),
new Cartesian3(0.0, 1.0, 0.0),
- sphere,
+ sphere
);
expect(result).toBe(sphere);
expect(result).toEqual(new BoundingSphere(Cartesian3.ZERO, 1.0));
@@ -513,7 +513,7 @@ describe("Core/BoundingSphere", function () {
const result = BoundingSphere.fromEllipsoid(ellipsoid, sphere);
expect(result).toBe(sphere);
expect(result).toEqual(
- new BoundingSphere(Cartesian3.ZERO, ellipsoid.maximumRadius),
+ new BoundingSphere(Cartesian3.ZERO, ellipsoid.maximumRadius)
);
});
@@ -548,7 +548,7 @@ describe("Core/BoundingSphere", function () {
const sphere = BoundingSphere.fromBoundingSpheres([one, two]);
expect(sphere).toEqual(
- BoundingSphere.union(one, two, new BoundingSphere()),
+ BoundingSphere.union(one, two, new BoundingSphere())
);
});
@@ -593,7 +593,7 @@ describe("Core/BoundingSphere", function () {
const transformation = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
const sphere = new BoundingSphere();
@@ -612,7 +612,7 @@ describe("Core/BoundingSphere", function () {
const transformation = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
const sphere = BoundingSphere.fromTransformation(transformation);
@@ -662,7 +662,7 @@ describe("Core/BoundingSphere", function () {
it("expands to contain another sphere", function () {
const bs1 = new BoundingSphere(
Cartesian3.negate(Cartesian3.UNIT_X, new Cartesian3()),
- 1.0,
+ 1.0
);
const bs2 = new BoundingSphere(Cartesian3.UNIT_X, 1.0);
const expected = new BoundingSphere(Cartesian3.ZERO, 2.0);
@@ -688,18 +688,18 @@ describe("Core/BoundingSphere", function () {
Cartesian3.multiplyByScalar(
Cartesian3.negate(Cartesian3.UNIT_X, new Cartesian3()),
3.0,
- new Cartesian3(),
+ new Cartesian3()
),
- 3.0,
+ 3.0
);
const bs2 = new BoundingSphere(Cartesian3.UNIT_X, 1.0);
const expected = new BoundingSphere(
Cartesian3.multiplyByScalar(
Cartesian3.negate(Cartesian3.UNIT_X, new Cartesian3()),
2.0,
- new Cartesian3(),
+ new Cartesian3()
),
- 4.0,
+ 4.0
);
BoundingSphere.union(bs1, bs2, bs1);
expect(bs1).toEqual(expected);
@@ -708,12 +708,12 @@ describe("Core/BoundingSphere", function () {
it("expands to contain another point", function () {
const bs = new BoundingSphere(
Cartesian3.negate(Cartesian3.UNIT_X, new Cartesian3()),
- 1.0,
+ 1.0
);
const point = Cartesian3.UNIT_X;
const expected = new BoundingSphere(
Cartesian3.negate(Cartesian3.UNIT_X, new Cartesian3()),
- 2.0,
+ 2.0
);
expect(BoundingSphere.expand(bs, point)).toEqual(expected);
});
@@ -737,7 +737,7 @@ describe("Core/BoundingSphere", function () {
const transform = Matrix4.fromTranslation(new Cartesian3(1.0, 2.0, 3.0));
const expected = new BoundingSphere(new Cartesian3(1.0, 2.0, 3.0), 1.0);
expect(BoundingSphere.transformWithoutScale(bs, transform)).toEqual(
- expected,
+ expected
);
});
@@ -746,7 +746,7 @@ describe("Core/BoundingSphere", function () {
const transform = Matrix4.fromScale(new Cartesian3(1.0, 2.0, 3.0));
const expected = new BoundingSphere(Cartesian3.ZERO, 1.0);
expect(BoundingSphere.transformWithoutScale(bs, transform)).toEqual(
- expected,
+ expected
);
});
@@ -756,7 +756,7 @@ describe("Core/BoundingSphere", function () {
const direction = Cartesian3.UNIT_X;
const expected = new Interval(1.0, 3.0);
expect(
- BoundingSphere.computePlaneDistances(bs, position, direction),
+ BoundingSphere.computePlaneDistances(bs, position, direction)
).toEqual(expected);
});
@@ -766,7 +766,7 @@ describe("Core/BoundingSphere", function () {
const expected = 1.52786405;
expect(BoundingSphere.distanceSquaredTo(bs, position)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
});
@@ -783,26 +783,27 @@ describe("Core/BoundingSphere", function () {
const positions2D = [];
for (let i = 0; i < positions.length; ++i) {
const position = positions[i];
- const cartographic =
- projection.ellipsoid.cartesianToCartographic(position);
+ const cartographic = projection.ellipsoid.cartesianToCartographic(
+ position
+ );
positions2D.push(projection.project(cartographic));
}
const boundingSphere3D = BoundingSphere.fromPoints(positions);
const boundingSphere2D = BoundingSphere.projectTo2D(
boundingSphere3D,
- projection,
+ projection
);
const actualSphere = BoundingSphere.fromPoints(positions2D);
actualSphere.center = new Cartesian3(
actualSphere.center.z,
actualSphere.center.x,
- actualSphere.center.y,
+ actualSphere.center.y
);
expect(boundingSphere2D.center).toEqualEpsilon(
actualSphere.center,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(boundingSphere2D.radius).toBeGreaterThan(actualSphere.radius);
});
@@ -815,8 +816,9 @@ describe("Core/BoundingSphere", function () {
const positions2D = [];
for (let i = 0; i < positions.length; ++i) {
const position = positions[i];
- const cartographic =
- projection.ellipsoid.cartesianToCartographic(position);
+ const cartographic = projection.ellipsoid.cartesianToCartographic(
+ position
+ );
positions2D.push(projection.project(cartographic));
}
@@ -824,19 +826,19 @@ describe("Core/BoundingSphere", function () {
const boundingSphere2D = BoundingSphere.projectTo2D(
boundingSphere3D,
projection,
- sphere,
+ sphere
);
const actualSphere = BoundingSphere.fromPoints(positions2D);
actualSphere.center = new Cartesian3(
actualSphere.center.z,
actualSphere.center.x,
- actualSphere.center.y,
+ actualSphere.center.y
);
expect(boundingSphere2D).toBe(sphere);
expect(boundingSphere2D.center).toEqualEpsilon(
actualSphere.center,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(boundingSphere2D.radius).toBeGreaterThan(actualSphere.radius);
});
@@ -993,7 +995,7 @@ describe("Core/BoundingSphere", function () {
expect(function () {
BoundingSphere.computePlaneDistances(
new BoundingSphere(),
- new Cartesian3(),
+ new Cartesian3()
);
}).toThrowDeveloperError();
});
@@ -1013,15 +1015,15 @@ describe("Core/BoundingSphere", function () {
function expectBoundingSphereToContainPoint(
boundingSphere,
point,
- projection,
+ projection
) {
const pointInCartesian = projection.project(point);
let distanceFromCenter = Cartesian3.magnitude(
Cartesian3.subtract(
pointInCartesian,
boundingSphere.center,
- new Cartesian3(),
- ),
+ new Cartesian3()
+ )
);
// The distanceFromCenter for corner points at the height extreme should equal the
@@ -1042,7 +1044,7 @@ describe("Core/BoundingSphere", function () {
rectangle,
projection,
minHeight,
- maxHeight,
+ maxHeight
);
// Test that the corners are inside the bounding sphere.
@@ -1091,56 +1093,56 @@ describe("Core/BoundingSphere", function () {
point = new Cartographic(
Rectangle.center(rectangle).longitude,
rectangle.south,
- minHeight,
+ minHeight
);
expectBoundingSphereToContainPoint(boundingSphere, point, projection);
point = new Cartographic(
Rectangle.center(rectangle).longitude,
rectangle.south,
- maxHeight,
+ maxHeight
);
expectBoundingSphereToContainPoint(boundingSphere, point, projection);
point = new Cartographic(
Rectangle.center(rectangle).longitude,
rectangle.north,
- minHeight,
+ minHeight
);
expectBoundingSphereToContainPoint(boundingSphere, point, projection);
point = new Cartographic(
Rectangle.center(rectangle).longitude,
rectangle.north,
- maxHeight,
+ maxHeight
);
expectBoundingSphereToContainPoint(boundingSphere, point, projection);
point = new Cartographic(
rectangle.west,
Rectangle.center(rectangle).latitude,
- minHeight,
+ minHeight
);
expectBoundingSphereToContainPoint(boundingSphere, point, projection);
point = new Cartographic(
rectangle.west,
Rectangle.center(rectangle).latitude,
- maxHeight,
+ maxHeight
);
expectBoundingSphereToContainPoint(boundingSphere, point, projection);
point = new Cartographic(
rectangle.east,
Rectangle.center(rectangle).latitude,
- minHeight,
+ minHeight
);
expectBoundingSphereToContainPoint(boundingSphere, point, projection);
point = new Cartographic(
rectangle.east,
Rectangle.center(rectangle).latitude,
- maxHeight,
+ maxHeight
);
expectBoundingSphereToContainPoint(boundingSphere, point, projection);
});
@@ -1155,6 +1157,6 @@ describe("Core/BoundingSphere", function () {
createPackableSpecs(
BoundingSphere,
new BoundingSphere(new Cartesian3(1.0, 2.0, 3.0), 4.0),
- [1.0, 2.0, 3.0, 4.0],
+ [1.0, 2.0, 3.0, 4.0]
);
});
diff --git a/packages/engine/Specs/Core/BoxGeometrySpec.js b/packages/engine/Specs/Core/BoxGeometrySpec.js
index 68d6d490b064..80ef2af551a1 100644
--- a/packages/engine/Specs/Core/BoxGeometrySpec.js
+++ b/packages/engine/Specs/Core/BoxGeometrySpec.js
@@ -31,7 +31,7 @@ describe("Core/BoxGeometry", function () {
minimum: new Cartesian3(-1, -2, -3),
maximum: new Cartesian3(1, 2, 3),
vertexFormat: VertexFormat.POSITION_ONLY,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(8 * 3); // 8 corners
@@ -46,7 +46,7 @@ describe("Core/BoxGeometry", function () {
minimum: minimumCorner,
maximum: maximumCorner,
vertexFormat: VertexFormat.ALL,
- }),
+ })
);
const numVertices = 24; //3 points x 8 corners
@@ -61,7 +61,7 @@ describe("Core/BoxGeometry", function () {
expect(m.boundingSphere.center).toEqual(Cartesian3.ZERO);
expect(m.boundingSphere.radius).toEqual(
- Cartesian3.magnitude(maximumCorner) * 0.5,
+ Cartesian3.magnitude(maximumCorner) * 0.5
);
});
@@ -72,7 +72,7 @@ describe("Core/BoxGeometry", function () {
maximum: new Cartesian3(1, 2, 3),
vertexFormat: VertexFormat.POSITION_ONLY,
offsetAttribute: GeometryOffsetAttribute.ALL,
- }),
+ })
);
const numVertices = 8;
@@ -103,7 +103,7 @@ describe("Core/BoxGeometry", function () {
BoxGeometry.fromDimensions({
dimensions: new Cartesian3(1, 2, 3),
vertexFormat: VertexFormat.POSITION_ONLY,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(8 * 3);
@@ -120,7 +120,7 @@ describe("Core/BoxGeometry", function () {
const min = new Cartesian3(-1, -2, -3);
const max = new Cartesian3(1, 2, 3);
const m = BoxGeometry.fromAxisAlignedBoundingBox(
- new AxisAlignedBoundingBox(min, max),
+ new AxisAlignedBoundingBox(min, max)
);
expect(m._minimum).toEqual(min);
expect(m._maximum).toEqual(max);
@@ -145,6 +145,6 @@ describe("Core/BoxGeometry", function () {
maximum: new Cartesian3(4.0, 5.0, 6.0),
vertexFormat: VertexFormat.POSITION_AND_NORMAL,
}),
- [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0],
+ [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0]
);
});
diff --git a/packages/engine/Specs/Core/BoxOutlineGeometrySpec.js b/packages/engine/Specs/Core/BoxOutlineGeometrySpec.js
index 080a2ff9a3cf..90a7c3a866c9 100644
--- a/packages/engine/Specs/Core/BoxOutlineGeometrySpec.js
+++ b/packages/engine/Specs/Core/BoxOutlineGeometrySpec.js
@@ -29,7 +29,7 @@ describe("Core/BoxOutlineGeometry", function () {
new BoxOutlineGeometry({
minimum: new Cartesian3(-1, -2, -3),
maximum: new Cartesian3(1, 2, 3),
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(8 * 3);
@@ -42,7 +42,7 @@ describe("Core/BoxOutlineGeometry", function () {
minimum: new Cartesian3(-1, -2, -3),
maximum: new Cartesian3(1, 2, 3),
offsetAttribute: GeometryOffsetAttribute.ALL,
- }),
+ })
);
const numVertices = 8;
@@ -72,7 +72,7 @@ describe("Core/BoxOutlineGeometry", function () {
const m = BoxOutlineGeometry.createGeometry(
BoxOutlineGeometry.fromDimensions({
dimensions: new Cartesian3(1, 2, 3),
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(8 * 3);
@@ -89,7 +89,7 @@ describe("Core/BoxOutlineGeometry", function () {
const min = new Cartesian3(-1, -2, -3);
const max = new Cartesian3(1, 2, 3);
const m = BoxOutlineGeometry.fromAxisAlignedBoundingBox(
- new AxisAlignedBoundingBox(min, max),
+ new AxisAlignedBoundingBox(min, max)
);
expect(m._min).toEqual(min);
expect(m._max).toEqual(max);
@@ -112,6 +112,6 @@ describe("Core/BoxOutlineGeometry", function () {
minimum: new Cartesian3(1.0, 2.0, 3.0),
maximum: new Cartesian3(4.0, 5.0, 6.0),
}),
- [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, -1.0],
+ [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, -1.0]
);
});
diff --git a/packages/engine/Specs/Core/Cartesian2Spec.js b/packages/engine/Specs/Core/Cartesian2Spec.js
index 98e27de8fc27..d95b5e0fd096 100644
--- a/packages/engine/Specs/Core/Cartesian2Spec.js
+++ b/packages/engine/Specs/Core/Cartesian2Spec.js
@@ -85,42 +85,42 @@ describe("Core/Cartesian2", function () {
second = new Cartesian2(1.0, 0.0);
expected = new Cartesian2(1.0, 0.0);
expect(Cartesian2.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian2(1.0, 0.0);
second = new Cartesian2(2.0, 0.0);
expected = new Cartesian2(1.0, 0.0);
expect(Cartesian2.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian2(2.0, -15.0);
second = new Cartesian2(1.0, -20.0);
expected = new Cartesian2(1.0, -20.0);
expect(Cartesian2.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian2(2.0, -20.0);
second = new Cartesian2(1.0, -15.0);
expected = new Cartesian2(1.0, -20.0);
expect(Cartesian2.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian2(2.0, -15.0);
second = new Cartesian2(1.0, -20.0);
expected = new Cartesian2(1.0, -20.0);
expect(Cartesian2.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian2(2.0, -15.0);
second = new Cartesian2(1.0, -20.0);
expected = new Cartesian2(1.0, -20.0);
expect(Cartesian2.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -139,13 +139,13 @@ describe("Core/Cartesian2", function () {
const second = new Cartesian2(1.0, 0.0);
const expected = new Cartesian2(1.0, 0.0);
expect(Cartesian2.minimumByComponent(first, second, first)).toEqual(
- expected,
+ expected
);
first.x = 1.0;
second.x = 2.0;
expect(Cartesian2.minimumByComponent(first, second, second)).toEqual(
- expected,
+ expected
);
});
@@ -166,13 +166,13 @@ describe("Core/Cartesian2", function () {
const second = new Cartesian2(1.0, 0.0);
const expected = new Cartesian2(1.0, 0.0);
expect(Cartesian2.minimumByComponent(first, second, expected)).toEqual(
- expected,
+ expected
);
second.x = 3.0;
expected.x = 2.0;
expect(Cartesian2.minimumByComponent(first, second, expected)).toEqual(
- expected,
+ expected
);
});
@@ -182,13 +182,13 @@ describe("Core/Cartesian2", function () {
const expected = new Cartesian2(0.0, 1.0);
const result = new Cartesian2();
expect(Cartesian2.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
second.y = 3.0;
expected.y = 2.0;
expect(Cartesian2.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -202,42 +202,42 @@ describe("Core/Cartesian2", function () {
second = new Cartesian2(1.0, 0.0);
expected = new Cartesian2(2.0, 0.0);
expect(Cartesian2.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian2(1.0, 0.0);
second = new Cartesian2(2.0, 0.0);
expected = new Cartesian2(2.0, 0.0);
expect(Cartesian2.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian2(2.0, -15.0);
second = new Cartesian2(1.0, -20.0);
expected = new Cartesian2(2.0, -15.0);
expect(Cartesian2.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian2(2.0, -20.0);
second = new Cartesian2(1.0, -15.0);
expected = new Cartesian2(2.0, -15.0);
expect(Cartesian2.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian2(2.0, -15.0);
second = new Cartesian2(1.0, -20.0);
expected = new Cartesian2(2.0, -15.0);
expect(Cartesian2.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian2(2.0, -15.0);
second = new Cartesian2(1.0, -20.0);
expected = new Cartesian2(2.0, -15.0);
expect(Cartesian2.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -256,13 +256,13 @@ describe("Core/Cartesian2", function () {
const second = new Cartesian2(1.0, 0.0);
const expected = new Cartesian2(2.0, 0.0);
expect(Cartesian2.maximumByComponent(first, second, first)).toEqual(
- expected,
+ expected
);
first.x = 1.0;
second.x = 2.0;
expect(Cartesian2.maximumByComponent(first, second, second)).toEqual(
- expected,
+ expected
);
});
@@ -284,13 +284,13 @@ describe("Core/Cartesian2", function () {
const expected = new Cartesian2(2.0, 0.0);
const result = new Cartesian2();
expect(Cartesian2.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
second.x = 3.0;
expected.x = 3.0;
expect(Cartesian2.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -300,13 +300,13 @@ describe("Core/Cartesian2", function () {
const expected = new Cartesian2(0.0, 2.0);
const result = new Cartesian2();
expect(Cartesian2.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
second.y = 3.0;
expected.y = 3.0;
expect(Cartesian2.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -422,7 +422,7 @@ describe("Core/Cartesian2", function () {
it("distance", function () {
const distance = Cartesian2.distance(
new Cartesian2(1.0, 0.0),
- new Cartesian2(2.0, 0.0),
+ new Cartesian2(2.0, 0.0)
);
expect(distance).toEqual(1.0);
});
@@ -442,7 +442,7 @@ describe("Core/Cartesian2", function () {
it("distanceSquared", function () {
const distanceSquared = Cartesian2.distanceSquared(
new Cartesian2(1.0, 0.0),
- new Cartesian2(3.0, 0.0),
+ new Cartesian2(3.0, 0.0)
);
expect(distanceSquared).toEqual(4.0);
});
@@ -582,7 +582,7 @@ describe("Core/Cartesian2", function () {
const returnedResult = Cartesian2.multiplyByScalar(
cartesian,
scalar,
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expectedResult);
@@ -595,7 +595,7 @@ describe("Core/Cartesian2", function () {
const returnedResult = Cartesian2.multiplyByScalar(
cartesian,
scalar,
- cartesian,
+ cartesian
);
expect(cartesian).toBe(returnedResult);
expect(cartesian).toEqual(expectedResult);
@@ -618,7 +618,7 @@ describe("Core/Cartesian2", function () {
const returnedResult = Cartesian2.divideByScalar(
cartesian,
scalar,
- cartesian,
+ cartesian
);
expect(cartesian).toBe(returnedResult);
expect(cartesian).toEqual(expectedResult);
@@ -709,11 +709,11 @@ describe("Core/Cartesian2", function () {
const y = new Cartesian2(1.0, 1.0);
expect(Cartesian2.angleBetween(x, y)).toEqualEpsilon(
CesiumMath.PI_OVER_FOUR,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(Cartesian2.angleBetween(y, x)).toEqualEpsilon(
CesiumMath.PI_OVER_FOUR,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -722,11 +722,11 @@ describe("Core/Cartesian2", function () {
const y = new Cartesian2(-1.0, -1.0);
expect(Cartesian2.angleBetween(x, y)).toEqualEpsilon(
(CesiumMath.PI * 3.0) / 4.0,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(Cartesian2.angleBetween(y, x)).toEqualEpsilon(
(CesiumMath.PI * 3.0) / 4.0,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -738,27 +738,27 @@ describe("Core/Cartesian2", function () {
it("most orthogonal angle is x", function () {
const v = new Cartesian2(0.0, 1.0);
expect(Cartesian2.mostOrthogonalAxis(v, new Cartesian2())).toEqual(
- Cartesian2.UNIT_X,
+ Cartesian2.UNIT_X
);
});
it("most orthogonal angle is y", function () {
const v = new Cartesian2(1.0, 0.0);
expect(Cartesian2.mostOrthogonalAxis(v, new Cartesian2())).toEqual(
- Cartesian2.UNIT_Y,
+ Cartesian2.UNIT_Y
);
});
it("equals", function () {
const cartesian = new Cartesian2(1.0, 2.0);
expect(Cartesian2.equals(cartesian, new Cartesian2(1.0, 2.0))).toEqual(
- true,
+ true
);
expect(Cartesian2.equals(cartesian, new Cartesian2(2.0, 2.0))).toEqual(
- false,
+ false
);
expect(Cartesian2.equals(cartesian, new Cartesian2(2.0, 1.0))).toEqual(
- false,
+ false
);
expect(Cartesian2.equals(cartesian, undefined)).toEqual(false);
});
@@ -766,49 +766,49 @@ describe("Core/Cartesian2", function () {
it("equalsEpsilon", function () {
let cartesian = new Cartesian2(1.0, 2.0);
expect(cartesian.equalsEpsilon(new Cartesian2(1.0, 2.0), 0.0)).toEqual(
- true,
+ true
);
expect(cartesian.equalsEpsilon(new Cartesian2(1.0, 2.0), 1.0)).toEqual(
- true,
+ true
);
expect(cartesian.equalsEpsilon(new Cartesian2(2.0, 2.0), 1.0)).toEqual(
- true,
+ true
);
expect(cartesian.equalsEpsilon(new Cartesian2(1.0, 3.0), 1.0)).toEqual(
- true,
+ true
);
expect(
- cartesian.equalsEpsilon(new Cartesian2(1.0, 3.0), CesiumMath.EPSILON6),
+ cartesian.equalsEpsilon(new Cartesian2(1.0, 3.0), CesiumMath.EPSILON6)
).toEqual(false);
expect(cartesian.equalsEpsilon(undefined, 1)).toEqual(false);
cartesian = new Cartesian2(3000000.0, 4000000.0);
expect(
- cartesian.equalsEpsilon(new Cartesian2(3000000.0, 4000000.0), 0.0),
+ cartesian.equalsEpsilon(new Cartesian2(3000000.0, 4000000.0), 0.0)
).toEqual(true);
expect(
cartesian.equalsEpsilon(
new Cartesian2(3000000.0, 4000000.2),
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toEqual(true);
expect(
cartesian.equalsEpsilon(
new Cartesian2(3000000.2, 4000000.0),
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toEqual(true);
expect(
cartesian.equalsEpsilon(
new Cartesian2(3000000.2, 4000000.2),
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toEqual(true);
expect(
cartesian.equalsEpsilon(
new Cartesian2(3000000.2, 4000000.2),
- CesiumMath.EPSILON9,
- ),
+ CesiumMath.EPSILON9
+ )
).toEqual(false);
expect(cartesian.equalsEpsilon(undefined, 1)).toEqual(false);
@@ -1100,6 +1100,6 @@ describe("Core/Cartesian2", function () {
Cartesian2,
[new Cartesian2(1, 2), new Cartesian2(3, 4)],
[1, 2, 3, 4],
- 2,
+ 2
);
});
diff --git a/packages/engine/Specs/Core/Cartesian3Spec.js b/packages/engine/Specs/Core/Cartesian3Spec.js
index d2cae1feef9d..09d9b13ff264 100644
--- a/packages/engine/Specs/Core/Cartesian3Spec.js
+++ b/packages/engine/Specs/Core/Cartesian3Spec.js
@@ -40,7 +40,7 @@ describe("Core/Cartesian3", function () {
const existing = new Cartesian3();
expect(cartesian).toEqualEpsilon(
Cartesian3.fromSpherical(spherical, existing),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(cartesian).toEqualEpsilon(existing, CesiumMath.EPSILON15);
});
@@ -118,42 +118,42 @@ describe("Core/Cartesian3", function () {
second = new Cartesian3(1.0, 0.0, 0.0);
expected = new Cartesian3(1.0, 0.0, 0.0);
expect(Cartesian3.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian3(1.0, 0.0, 0.0);
second = new Cartesian3(2.0, 0.0, 0.0);
expected = new Cartesian3(1.0, 0.0, 0.0);
expect(Cartesian3.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian3(2.0, -15.0, 0.0);
second = new Cartesian3(1.0, -20.0, 0.0);
expected = new Cartesian3(1.0, -20.0, 0.0);
expect(Cartesian3.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian3(2.0, -20.0, 0.0);
second = new Cartesian3(1.0, -15.0, 0.0);
expected = new Cartesian3(1.0, -20.0, 0.0);
expect(Cartesian3.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian3(2.0, -15.0, 26.4);
second = new Cartesian3(1.0, -20.0, 26.5);
expected = new Cartesian3(1.0, -20.0, 26.4);
expect(Cartesian3.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian3(2.0, -15.0, 26.5);
second = new Cartesian3(1.0, -20.0, 26.4);
expected = new Cartesian3(1.0, -20.0, 26.4);
expect(Cartesian3.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -172,13 +172,13 @@ describe("Core/Cartesian3", function () {
const second = new Cartesian3(1.0, 0.0, 0.0);
const expected = new Cartesian3(1.0, 0.0, 0.0);
expect(Cartesian3.minimumByComponent(first, second, first)).toEqual(
- expected,
+ expected
);
first.x = 1.0;
second.x = 2.0;
expect(Cartesian3.minimumByComponent(first, second, second)).toEqual(
- expected,
+ expected
);
});
@@ -200,13 +200,13 @@ describe("Core/Cartesian3", function () {
const expected = new Cartesian3(1.0, 0.0, 0.0);
const result = new Cartesian3();
expect(Cartesian3.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
second.x = 3.0;
expected.x = 2.0;
expect(Cartesian3.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -216,13 +216,13 @@ describe("Core/Cartesian3", function () {
const expected = new Cartesian3(0.0, 1.0, 0.0);
const result = new Cartesian3();
expect(Cartesian3.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
second.y = 3.0;
expected.y = 2.0;
expect(Cartesian3.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -232,13 +232,13 @@ describe("Core/Cartesian3", function () {
const expected = new Cartesian3(0.0, 0.0, 1.0);
const result = new Cartesian3();
expect(Cartesian3.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
second.z = 3.0;
expected.z = 2.0;
expect(Cartesian3.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -252,42 +252,42 @@ describe("Core/Cartesian3", function () {
second = new Cartesian3(1.0, 0.0, 0.0);
expected = new Cartesian3(2.0, 0.0, 0.0);
expect(Cartesian3.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian3(1.0, 0.0, 0.0);
second = new Cartesian3(2.0, 0.0, 0.0);
expected = new Cartesian3(2.0, 0.0, 0.0);
expect(Cartesian3.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian3(2.0, -15.0, 0.0);
second = new Cartesian3(1.0, -20.0, 0.0);
expected = new Cartesian3(2.0, -15.0, 0.0);
expect(Cartesian3.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian3(2.0, -20.0, 0.0);
second = new Cartesian3(1.0, -15.0, 0.0);
expected = new Cartesian3(2.0, -15.0, 0.0);
expect(Cartesian3.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian3(2.0, -15.0, 26.4);
second = new Cartesian3(1.0, -20.0, 26.5);
expected = new Cartesian3(2.0, -15.0, 26.5);
expect(Cartesian3.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian3(2.0, -15.0, 26.5);
second = new Cartesian3(1.0, -20.0, 26.4);
expected = new Cartesian3(2.0, -15.0, 26.5);
expect(Cartesian3.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -306,13 +306,13 @@ describe("Core/Cartesian3", function () {
const second = new Cartesian3(1.0, 0.0, 0.0);
const expected = new Cartesian3(2.0, 0.0, 0.0);
expect(Cartesian3.maximumByComponent(first, second, first)).toEqual(
- expected,
+ expected
);
first.x = 1.0;
second.x = 2.0;
expect(Cartesian3.maximumByComponent(first, second, second)).toEqual(
- expected,
+ expected
);
});
@@ -334,13 +334,13 @@ describe("Core/Cartesian3", function () {
const expected = new Cartesian3(2.0, 0.0, 0.0);
const result = new Cartesian3();
expect(Cartesian3.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
second.x = 3.0;
expected.x = 3.0;
expect(Cartesian3.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -350,13 +350,13 @@ describe("Core/Cartesian3", function () {
const expected = new Cartesian3(0.0, 2.0, 0.0);
const result = new Cartesian3();
expect(Cartesian3.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
second.y = 3.0;
expected.y = 3.0;
expect(Cartesian3.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -366,13 +366,13 @@ describe("Core/Cartesian3", function () {
const expected = new Cartesian3(0.0, 0.0, 2.0);
const result = new Cartesian3();
expect(Cartesian3.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
second.z = 3.0;
expected.z = 3.0;
expect(Cartesian3.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -488,7 +488,7 @@ describe("Core/Cartesian3", function () {
it("distance", function () {
const distance = Cartesian3.distance(
new Cartesian3(1.0, 0.0, 0.0),
- new Cartesian3(2.0, 0.0, 0.0),
+ new Cartesian3(2.0, 0.0, 0.0)
);
expect(distance).toEqual(1.0);
});
@@ -508,7 +508,7 @@ describe("Core/Cartesian3", function () {
it("distanceSquared", function () {
const distanceSquared = Cartesian3.distanceSquared(
new Cartesian3(1.0, 0.0, 0.0),
- new Cartesian3(3.0, 0.0, 0.0),
+ new Cartesian3(3.0, 0.0, 0.0)
);
expect(distanceSquared).toEqual(4.0);
});
@@ -640,7 +640,7 @@ describe("Core/Cartesian3", function () {
const returnedResult = Cartesian3.multiplyByScalar(
cartesian,
scalar,
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expectedResult);
@@ -653,7 +653,7 @@ describe("Core/Cartesian3", function () {
const returnedResult = Cartesian3.multiplyByScalar(
cartesian,
scalar,
- cartesian,
+ cartesian
);
expect(cartesian).toBe(returnedResult);
expect(cartesian).toEqual(expectedResult);
@@ -676,7 +676,7 @@ describe("Core/Cartesian3", function () {
const returnedResult = Cartesian3.divideByScalar(
cartesian,
scalar,
- cartesian,
+ cartesian
);
expect(cartesian).toBe(returnedResult);
expect(cartesian).toEqual(expectedResult);
@@ -781,11 +781,11 @@ describe("Core/Cartesian3", function () {
const y = new Cartesian3(1.0, 1.0, 0.0);
expect(Cartesian3.angleBetween(x, y)).toEqualEpsilon(
CesiumMath.PI_OVER_FOUR,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(Cartesian3.angleBetween(y, x)).toEqualEpsilon(
CesiumMath.PI_OVER_FOUR,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -794,11 +794,11 @@ describe("Core/Cartesian3", function () {
const y = new Cartesian3(0.0, -1.0, -1.0);
expect(Cartesian3.angleBetween(x, y)).toEqualEpsilon(
(CesiumMath.PI * 3.0) / 4.0,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(Cartesian3.angleBetween(y, x)).toEqualEpsilon(
(CesiumMath.PI * 3.0) / 4.0,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -810,42 +810,42 @@ describe("Core/Cartesian3", function () {
it("most orthogonal angle is x", function () {
const v = new Cartesian3(0.0, 1.0, 2.0);
expect(Cartesian3.mostOrthogonalAxis(v, new Cartesian3())).toEqual(
- Cartesian3.UNIT_X,
+ Cartesian3.UNIT_X
);
});
it("most orthogonal angle is y", function () {
const v = new Cartesian3(1.0, 0.0, 2.0);
expect(Cartesian3.mostOrthogonalAxis(v, new Cartesian3())).toEqual(
- Cartesian3.UNIT_Y,
+ Cartesian3.UNIT_Y
);
});
it("most orthogonal angle is z", function () {
let v = new Cartesian3(1.0, 3.0, 0.0);
expect(Cartesian3.mostOrthogonalAxis(v, new Cartesian3())).toEqual(
- Cartesian3.UNIT_Z,
+ Cartesian3.UNIT_Z
);
v = new Cartesian3(3.0, 1.0, 0.0);
expect(Cartesian3.mostOrthogonalAxis(v, new Cartesian3())).toEqual(
- Cartesian3.UNIT_Z,
+ Cartesian3.UNIT_Z
);
});
it("equals", function () {
const cartesian = new Cartesian3(1.0, 2.0, 3.0);
expect(Cartesian3.equals(cartesian, new Cartesian3(1.0, 2.0, 3.0))).toEqual(
- true,
+ true
);
expect(Cartesian3.equals(cartesian, new Cartesian3(2.0, 2.0, 3.0))).toEqual(
- false,
+ false
);
expect(Cartesian3.equals(cartesian, new Cartesian3(2.0, 1.0, 3.0))).toEqual(
- false,
+ false
);
expect(Cartesian3.equals(cartesian, new Cartesian3(1.0, 2.0, 4.0))).toEqual(
- false,
+ false
);
expect(Cartesian3.equals(cartesian, undefined)).toEqual(false);
});
@@ -853,37 +853,37 @@ describe("Core/Cartesian3", function () {
it("equalsEpsilon", function () {
let cartesian = new Cartesian3(1.0, 2.0, 3.0);
expect(cartesian.equalsEpsilon(new Cartesian3(1.0, 2.0, 3.0), 0.0)).toEqual(
- true,
+ true
);
expect(cartesian.equalsEpsilon(new Cartesian3(1.0, 2.0, 3.0), 1.0)).toEqual(
- true,
+ true
);
expect(cartesian.equalsEpsilon(new Cartesian3(2.0, 2.0, 3.0), 1.0)).toEqual(
- true,
+ true
);
expect(cartesian.equalsEpsilon(new Cartesian3(1.0, 3.0, 3.0), 1.0)).toEqual(
- true,
+ true
);
expect(cartesian.equalsEpsilon(new Cartesian3(1.0, 2.0, 4.0), 1.0)).toEqual(
- true,
+ true
);
expect(
cartesian.equalsEpsilon(
new Cartesian3(2.0, 2.0, 3.0),
- CesiumMath.EPSILON6,
- ),
+ CesiumMath.EPSILON6
+ )
).toEqual(false);
expect(
cartesian.equalsEpsilon(
new Cartesian3(1.0, 3.0, 3.0),
- CesiumMath.EPSILON6,
- ),
+ CesiumMath.EPSILON6
+ )
).toEqual(false);
expect(
cartesian.equalsEpsilon(
new Cartesian3(1.0, 2.0, 4.0),
- CesiumMath.EPSILON6,
- ),
+ CesiumMath.EPSILON6
+ )
).toEqual(false);
expect(cartesian.equalsEpsilon(undefined, 1)).toEqual(false);
@@ -891,38 +891,38 @@ describe("Core/Cartesian3", function () {
expect(
cartesian.equalsEpsilon(
new Cartesian3(3000000.0, 4000000.0, 5000000.0),
- 0.0,
- ),
+ 0.0
+ )
).toEqual(true);
expect(
cartesian.equalsEpsilon(
new Cartesian3(3000000.2, 4000000.0, 5000000.0),
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toEqual(true);
expect(
cartesian.equalsEpsilon(
new Cartesian3(3000000.0, 4000000.2, 5000000.0),
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toEqual(true);
expect(
cartesian.equalsEpsilon(
new Cartesian3(3000000.0, 4000000.0, 5000000.2),
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toEqual(true);
expect(
cartesian.equalsEpsilon(
new Cartesian3(3000000.2, 4000000.2, 5000000.2),
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toEqual(true);
expect(
cartesian.equalsEpsilon(
new Cartesian3(3000000.2, 4000000.2, 5000000.2),
- CesiumMath.EPSILON9,
- ),
+ CesiumMath.EPSILON9
+ )
).toEqual(false);
expect(cartesian.equalsEpsilon(undefined, 1)).toEqual(false);
@@ -1208,7 +1208,7 @@ describe("Core/Cartesian3", function () {
const ellipsoid = Ellipsoid.WGS84;
const actual = Cartesian3.fromDegrees(lon, lat);
const expected = ellipsoid.cartographicToCartesian(
- Cartographic.fromDegrees(lon, lat),
+ Cartographic.fromDegrees(lon, lat)
);
expect(actual).toEqual(expected);
});
@@ -1220,7 +1220,7 @@ describe("Core/Cartesian3", function () {
const ellipsoid = Ellipsoid.WGS84;
const actual = Cartesian3.fromDegrees(lon, lat, height);
const expected = ellipsoid.cartographicToCartesian(
- Cartographic.fromDegrees(lon, lat, height),
+ Cartographic.fromDegrees(lon, lat, height)
);
expect(actual).toEqual(expected);
});
@@ -1233,7 +1233,7 @@ describe("Core/Cartesian3", function () {
const result = new Cartesian3();
const actual = Cartesian3.fromDegrees(lon, lat, height, ellipsoid, result);
const expected = ellipsoid.cartographicToCartesian(
- Cartographic.fromDegrees(lon, lat, height),
+ Cartographic.fromDegrees(lon, lat, height)
);
expect(actual).toEqual(expected);
expect(actual).toBe(result);
@@ -1257,7 +1257,7 @@ describe("Core/Cartesian3", function () {
const expectedPosition = new Cartesian3(
1593514.338295244,
691991.9979835141,
- 20442.318221152018,
+ 20442.318221152018
);
const position = Cartesian3.fromDegrees(23.47315, 0.67416);
@@ -1270,7 +1270,7 @@ describe("Core/Cartesian3", function () {
const ellipsoid = Ellipsoid.WGS84;
const actual = Cartesian3.fromRadians(lon, lat);
const expected = ellipsoid.cartographicToCartesian(
- new Cartographic(lon, lat),
+ new Cartographic(lon, lat)
);
expect(actual).toEqual(expected);
});
@@ -1282,7 +1282,7 @@ describe("Core/Cartesian3", function () {
const ellipsoid = Ellipsoid.WGS84;
const actual = Cartesian3.fromRadians(lon, lat, height);
const expected = ellipsoid.cartographicToCartesian(
- new Cartographic(lon, lat, height),
+ new Cartographic(lon, lat, height)
);
expect(actual).toEqual(expected);
});
@@ -1295,7 +1295,7 @@ describe("Core/Cartesian3", function () {
const result = new Cartesian3();
const actual = Cartesian3.fromRadians(lon, lat, height, ellipsoid, result);
const expected = ellipsoid.cartographicToCartesian(
- new Cartographic(lon, lat, height),
+ new Cartographic(lon, lat, height)
);
expect(actual).toEqual(expected);
expect(actual).toBe(result);
@@ -1307,7 +1307,7 @@ describe("Core/Cartesian3", function () {
const expectedPosition = new Cartesian3(
1593514.3406204558,
691991.9927155221,
- 20442.315293410087,
+ 20442.315293410087
);
const position = Cartesian3.fromRadians(0.40968375, 0.01176631);
@@ -1349,13 +1349,18 @@ describe("Core/Cartesian3", function () {
new Cartesian3(
1653831.6133167143,
-520773.6558050613,
- -110428.9555038242,
+ -110428.9555038242
),
new Cartesian3(1556660.3478111108, 98714.16930719782, 765259.9782626687),
];
const positions = Cartesian3.fromDegreesArray([
- 23.47315, 0.67416, 342.52135, -3.64417, 3.6285, 26.13341,
+ 23.47315,
+ 0.67416,
+ 342.52135,
+ -3.64417,
+ 3.6285,
+ 26.13341,
]);
expect(positions).toEqualEpsilon(expectedPositions, CesiumMath.EPSILON8);
});
@@ -1404,7 +1409,7 @@ describe("Core/Cartesian3", function () {
const actual = Cartesian3.fromRadiansArray(
[lon1, lat1, lon2, lat2],
ellipsoid,
- result,
+ result
);
const expected = ellipsoid.cartographicArrayToCartesianArray([
new Cartographic(lon1, lat1),
@@ -1422,13 +1427,18 @@ describe("Core/Cartesian3", function () {
new Cartesian3(
1653831.6107836158,
-520773.6656886929,
- -110428.94683022468,
+ -110428.94683022468
),
new Cartesian3(1556660.3474447567, 98714.16630095398, 765259.9793956806),
];
const positions = Cartesian3.fromRadiansArray([
- 0.40968375, 0.01176631, 5.97812531, -0.06360276, 0.06332927, 0.45611405,
+ 0.40968375,
+ 0.01176631,
+ 5.97812531,
+ -0.06360276,
+ 0.06332927,
+ 0.45611405,
]);
expect(positions).toEqualEpsilon(expectedPositions, CesiumMath.EPSILON8);
});
@@ -1483,13 +1493,21 @@ describe("Core/Cartesian3", function () {
new Cartesian3(
1653926.8033485617,
-520803.63011470815,
- -110435.31149297487,
+ -110435.31149297487
),
new Cartesian3(1556749.9449302435, 98719.85102524245, 765304.0245374623),
];
const positions = Cartesian3.fromDegreesArrayHeights([
- 23.47315, 0.67416, 100, 342.52135, -3.64417, 100, 3.6285, 26.13341, 100,
+ 23.47315,
+ 0.67416,
+ 100,
+ 342.52135,
+ -3.64417,
+ 100,
+ 3.6285,
+ 26.13341,
+ 100,
]);
expect(positions).toEqualEpsilon(expectedPositions, CesiumMath.EPSILON8);
});
@@ -1549,7 +1567,7 @@ describe("Core/Cartesian3", function () {
const actual = Cartesian3.fromRadiansArrayHeights(
[lon1, lat1, alt1, lon2, lat2, alt2],
ellipsoid,
- result,
+ result
);
const expected = ellipsoid.cartographicArrayToCartesianArray([
new Cartographic(lon1, lat1, alt1),
@@ -1567,14 +1585,21 @@ describe("Core/Cartesian3", function () {
new Cartesian3(
1653926.8008153175,
-520803.6399989086,
- -110435.30281887612,
+ -110435.30281887612
),
new Cartesian3(1556749.9445638682, 98719.84801882556, 765304.0256705394),
];
const positions = Cartesian3.fromRadiansArrayHeights([
- 0.40968375, 0.01176631, 100, 5.97812531, -0.06360276, 100, 0.06332927,
- 0.45611405, 100,
+ 0.40968375,
+ 0.01176631,
+ 100,
+ 5.97812531,
+ -0.06360276,
+ 100,
+ 0.06332927,
+ 0.45611405,
+ 100,
]);
expect(positions).toEqualEpsilon(expectedPositions, CesiumMath.EPSILON8);
});
@@ -1704,21 +1729,21 @@ describe("Core/Cartesian3", function () {
return Cartesian3.projectVector(
undefined,
new Cartesian3(),
- new Cartesian3(),
+ new Cartesian3()
);
}).toThrowDeveloperError();
expect(function () {
return Cartesian3.projectVector(
new Cartesian3(),
undefined,
- new Cartesian3(),
+ new Cartesian3()
);
}).toThrowDeveloperError();
expect(function () {
return Cartesian3.projectVector(
new Cartesian3(),
new Cartesian3(),
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
@@ -1728,6 +1753,6 @@ describe("Core/Cartesian3", function () {
Cartesian3,
[new Cartesian3(1, 2, 3), new Cartesian3(4, 5, 6)],
[1, 2, 3, 4, 5, 6],
- 3,
+ 3
);
});
diff --git a/packages/engine/Specs/Core/Cartesian4Spec.js b/packages/engine/Specs/Core/Cartesian4Spec.js
index 41bea584dc9b..b9146991493a 100644
--- a/packages/engine/Specs/Core/Cartesian4Spec.js
+++ b/packages/engine/Specs/Core/Cartesian4Spec.js
@@ -65,7 +65,7 @@ describe("Core/Cartesian4", function () {
const cartesian4 = new Cartesian4();
const result = Cartesian4.fromColor(
new Color(1.0, 2.0, 3.0, 4.0),
- cartesian4,
+ cartesian4
);
expect(cartesian4).toBe(result);
expect(cartesian4).toEqual(new Cartesian4(1.0, 2.0, 3.0, 4.0));
@@ -149,56 +149,56 @@ describe("Core/Cartesian4", function () {
second = new Cartesian4(1.0, 0.0, 0.0, 0.0);
expected = new Cartesian4(1.0, 0.0, 0.0, 0.0);
expect(Cartesian4.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian4(1.0, 0.0, 0.0, 0.0);
second = new Cartesian4(2.0, 0.0, 0.0, 0.0);
expected = new Cartesian4(1.0, 0.0, 0.0, 0.0);
expect(Cartesian4.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian4(2.0, -15.0, 0.0, 0.0);
second = new Cartesian4(1.0, -20.0, 0.0, 0.0);
expected = new Cartesian4(1.0, -20.0, 0.0, 0.0);
expect(Cartesian4.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian4(2.0, -20.0, 0.0, 0.0);
second = new Cartesian4(1.0, -15.0, 0.0, 0.0);
expected = new Cartesian4(1.0, -20.0, 0.0, 0.0);
expect(Cartesian4.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian4(2.0, -15.0, 26.4, 0.0);
second = new Cartesian4(1.0, -20.0, 26.5, 0.0);
expected = new Cartesian4(1.0, -20.0, 26.4, 0.0);
expect(Cartesian4.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian4(2.0, -15.0, 26.5, 0.0);
second = new Cartesian4(1.0, -20.0, 26.4, 0.0);
expected = new Cartesian4(1.0, -20.0, 26.4, 0.0);
expect(Cartesian4.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian4(2.0, -15.0, 26.4, -450.0);
second = new Cartesian4(1.0, -20.0, 26.5, 450.0);
expected = new Cartesian4(1.0, -20.0, 26.4, -450.0);
expect(Cartesian4.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian4(2.0, -15.0, 26.5, 450.0);
second = new Cartesian4(1.0, -20.0, 26.4, -450.0);
expected = new Cartesian4(1.0, -20.0, 26.4, -450.0);
expect(Cartesian4.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -217,13 +217,13 @@ describe("Core/Cartesian4", function () {
const second = new Cartesian4(1.0, 0.0, 0.0, 0.0);
const expected = new Cartesian4(1.0, 0.0, 0.0, 0.0);
expect(Cartesian4.minimumByComponent(first, second, first)).toEqual(
- expected,
+ expected
);
first.x = 1.0;
second.x = 2.0;
expect(Cartesian4.minimumByComponent(first, second, second)).toEqual(
- expected,
+ expected
);
});
@@ -245,13 +245,13 @@ describe("Core/Cartesian4", function () {
const expected = new Cartesian4(1.0, 0.0, 0.0, 0.0);
const result = new Cartesian4();
expect(Cartesian4.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
second.x = 3.0;
expected.x = 2.0;
expect(Cartesian4.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -261,13 +261,13 @@ describe("Core/Cartesian4", function () {
const expected = new Cartesian4(0.0, 1.0, 0.0, 0.0);
const result = new Cartesian4();
expect(Cartesian4.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
second.y = 3.0;
expected.y = 2.0;
expect(Cartesian4.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -277,13 +277,13 @@ describe("Core/Cartesian4", function () {
const expected = new Cartesian4(0.0, 0.0, 1.0, 0.0);
const result = new Cartesian4();
expect(Cartesian4.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
second.z = 3.0;
expected.z = 2.0;
expect(Cartesian4.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -293,13 +293,13 @@ describe("Core/Cartesian4", function () {
const expected = new Cartesian4(0.0, 0.0, 0.0, 1.0);
const result = new Cartesian4();
expect(Cartesian4.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
second.w = 3.0;
expected.w = 2.0;
expect(Cartesian4.minimumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -313,56 +313,56 @@ describe("Core/Cartesian4", function () {
expected = new Cartesian4(2.0, 0.0, 0.0, 0.0);
const result = new Cartesian4();
expect(Cartesian4.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian4(1.0, 0.0, 0.0, 0.0);
second = new Cartesian4(2.0, 0.0, 0.0, 0.0);
expected = new Cartesian4(2.0, 0.0, 0.0, 0.0);
expect(Cartesian4.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian4(2.0, -15.0, 0.0, 0.0);
second = new Cartesian4(1.0, -20.0, 0.0, 0.0);
expected = new Cartesian4(2.0, -15.0, 0.0, 0.0);
expect(Cartesian4.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian4(2.0, -20.0, 0.0, 0.0);
second = new Cartesian4(1.0, -15.0, 0.0, 0.0);
expected = new Cartesian4(2.0, -15.0, 0.0, 0.0);
expect(Cartesian4.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian4(2.0, -15.0, 26.4, 0.0);
second = new Cartesian4(1.0, -20.0, 26.5, 0.0);
expected = new Cartesian4(2.0, -15.0, 26.5, 0.0);
expect(Cartesian4.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian4(2.0, -15.0, 26.5, 0.0);
second = new Cartesian4(1.0, -20.0, 26.4, 0.0);
expected = new Cartesian4(2.0, -15.0, 26.5, 0.0);
expect(Cartesian4.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian4(2.0, -15.0, 26.5, 450.0);
second = new Cartesian4(1.0, -20.0, 26.4, -450.0);
expected = new Cartesian4(2.0, -15.0, 26.5, 450.0);
expect(Cartesian4.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
first = new Cartesian4(2.0, -15.0, 26.5, -450.0);
second = new Cartesian4(1.0, -20.0, 26.4, 450.0);
expected = new Cartesian4(2.0, -15.0, 26.5, 450.0);
expect(Cartesian4.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -381,13 +381,13 @@ describe("Core/Cartesian4", function () {
const second = new Cartesian4(1.0, 0.0, 0.0, 0.0);
const expected = new Cartesian4(2.0, 0.0, 0.0, 0.0);
expect(Cartesian4.maximumByComponent(first, second, first)).toEqual(
- expected,
+ expected
);
first.x = 1.0;
second.x = 2.0;
expect(Cartesian4.maximumByComponent(first, second, second)).toEqual(
- expected,
+ expected
);
});
@@ -396,13 +396,13 @@ describe("Core/Cartesian4", function () {
const second = new Cartesian4(1.0, 0.0, 0.0, 0.0);
const expected = new Cartesian4(2.0, 0.0, 0.0, 0.0);
expect(Cartesian4.maximumByComponent(first, second, second)).toEqual(
- expected,
+ expected
);
first.x = 1.0;
second.x = 2.0;
expect(Cartesian4.maximumByComponent(first, second, second)).toEqual(
- expected,
+ expected
);
});
@@ -424,13 +424,13 @@ describe("Core/Cartesian4", function () {
const expected = new Cartesian4(2.0, 0.0, 0.0, 0.0);
const result = new Cartesian4();
expect(Cartesian4.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
second.x = 3.0;
expected.x = 3.0;
expect(Cartesian4.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -440,13 +440,13 @@ describe("Core/Cartesian4", function () {
const expected = new Cartesian4(0.0, 2.0, 0.0, 0.0);
const result = new Cartesian4();
expect(Cartesian4.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
second.y = 3.0;
expected.y = 3.0;
expect(Cartesian4.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -456,13 +456,13 @@ describe("Core/Cartesian4", function () {
const expected = new Cartesian4(0.0, 0.0, 2.0, 0.0);
const result = new Cartesian4();
expect(Cartesian4.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
second.z = 3.0;
expected.z = 3.0;
expect(Cartesian4.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -472,13 +472,13 @@ describe("Core/Cartesian4", function () {
const expected = new Cartesian4(0.0, 0.0, 0.0, 2.0);
const result = new Cartesian4();
expect(Cartesian4.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
second.w = 3.0;
expected.w = 3.0;
expect(Cartesian4.maximumByComponent(first, second, result)).toEqual(
- expected,
+ expected
);
});
@@ -594,7 +594,7 @@ describe("Core/Cartesian4", function () {
it("distance", function () {
const distance = Cartesian4.distance(
new Cartesian4(1.0, 0.0, 0.0, 0.0),
- new Cartesian4(2.0, 0.0, 0.0, 0.0),
+ new Cartesian4(2.0, 0.0, 0.0, 0.0)
);
expect(distance).toEqual(1.0);
});
@@ -614,7 +614,7 @@ describe("Core/Cartesian4", function () {
it("distanceSquared", function () {
const distanceSquared = Cartesian4.distanceSquared(
new Cartesian4(1.0, 0.0, 0.0, 0.0),
- new Cartesian4(3.0, 0.0, 0.0, 0.0),
+ new Cartesian4(3.0, 0.0, 0.0, 0.0)
);
expect(distanceSquared).toEqual(4.0);
});
@@ -746,7 +746,7 @@ describe("Core/Cartesian4", function () {
const returnedResult = Cartesian4.multiplyByScalar(
cartesian,
scalar,
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expectedResult);
@@ -759,7 +759,7 @@ describe("Core/Cartesian4", function () {
const returnedResult = Cartesian4.multiplyByScalar(
cartesian,
scalar,
- cartesian,
+ cartesian
);
expect(cartesian).toBe(returnedResult);
expect(cartesian).toEqual(expectedResult);
@@ -782,7 +782,7 @@ describe("Core/Cartesian4", function () {
const returnedResult = Cartesian4.divideByScalar(
cartesian,
scalar,
- cartesian,
+ cartesian
);
expect(cartesian).toBe(returnedResult);
expect(cartesian).toEqual(expectedResult);
@@ -855,67 +855,67 @@ describe("Core/Cartesian4", function () {
it("most orthogonal angle is x", function () {
const v = new Cartesian4(0.0, 1.0, 2.0, 3.0);
expect(Cartesian4.mostOrthogonalAxis(v, new Cartesian4())).toEqual(
- Cartesian4.UNIT_X,
+ Cartesian4.UNIT_X
);
});
it("most orthogonal angle is y", function () {
const v = new Cartesian4(1.0, 0.0, 2.0, 3.0);
expect(Cartesian4.mostOrthogonalAxis(v, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Y,
+ Cartesian4.UNIT_Y
);
});
it("most orthogonal angle is z", function () {
let v = new Cartesian4(2.0, 3.0, 0.0, 1.0);
expect(Cartesian4.mostOrthogonalAxis(v, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Z,
+ Cartesian4.UNIT_Z
);
v = new Cartesian4(3.0, 2.0, 0.0, 1.0);
expect(Cartesian4.mostOrthogonalAxis(v, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Z,
+ Cartesian4.UNIT_Z
);
});
it("most orthogonal angle is w", function () {
let v = new Cartesian4(1.0, 2.0, 3.0, 0.0);
expect(Cartesian4.mostOrthogonalAxis(v, new Cartesian4())).toEqual(
- Cartesian4.UNIT_W,
+ Cartesian4.UNIT_W
);
v = new Cartesian4(2.0, 3.0, 1.0, 0.0);
expect(Cartesian4.mostOrthogonalAxis(v, new Cartesian4())).toEqual(
- Cartesian4.UNIT_W,
+ Cartesian4.UNIT_W
);
v = new Cartesian4(3.0, 1.0, 2.0, 0.0);
expect(Cartesian4.mostOrthogonalAxis(v, new Cartesian4())).toEqual(
- Cartesian4.UNIT_W,
+ Cartesian4.UNIT_W
);
v = new Cartesian4(3.0, 2.0, 1.0, 0.0);
expect(Cartesian4.mostOrthogonalAxis(v, new Cartesian4())).toEqual(
- Cartesian4.UNIT_W,
+ Cartesian4.UNIT_W
);
});
it("equals", function () {
const cartesian = new Cartesian4(1.0, 2.0, 3.0, 4.0);
expect(
- Cartesian4.equals(cartesian, new Cartesian4(1.0, 2.0, 3.0, 4.0)),
+ Cartesian4.equals(cartesian, new Cartesian4(1.0, 2.0, 3.0, 4.0))
).toEqual(true);
expect(
- Cartesian4.equals(cartesian, new Cartesian4(2.0, 2.0, 3.0, 4.0)),
+ Cartesian4.equals(cartesian, new Cartesian4(2.0, 2.0, 3.0, 4.0))
).toEqual(false);
expect(
- Cartesian4.equals(cartesian, new Cartesian4(2.0, 1.0, 3.0, 4.0)),
+ Cartesian4.equals(cartesian, new Cartesian4(2.0, 1.0, 3.0, 4.0))
).toEqual(false);
expect(
- Cartesian4.equals(cartesian, new Cartesian4(1.0, 2.0, 4.0, 4.0)),
+ Cartesian4.equals(cartesian, new Cartesian4(1.0, 2.0, 4.0, 4.0))
).toEqual(false);
expect(
- Cartesian4.equals(cartesian, new Cartesian4(1.0, 2.0, 3.0, 5.0)),
+ Cartesian4.equals(cartesian, new Cartesian4(1.0, 2.0, 3.0, 5.0))
).toEqual(false);
expect(Cartesian4.equals(cartesian, undefined)).toEqual(false);
});
@@ -923,46 +923,46 @@ describe("Core/Cartesian4", function () {
it("equalsEpsilon", function () {
let cartesian = new Cartesian4(1.0, 2.0, 3.0, 4.0);
expect(
- cartesian.equalsEpsilon(new Cartesian4(1.0, 2.0, 3.0, 4.0), 0.0),
+ cartesian.equalsEpsilon(new Cartesian4(1.0, 2.0, 3.0, 4.0), 0.0)
).toEqual(true);
expect(
- cartesian.equalsEpsilon(new Cartesian4(1.0, 2.0, 3.0, 4.0), 1.0),
+ cartesian.equalsEpsilon(new Cartesian4(1.0, 2.0, 3.0, 4.0), 1.0)
).toEqual(true);
expect(
- cartesian.equalsEpsilon(new Cartesian4(2.0, 2.0, 3.0, 4.0), 1.0),
+ cartesian.equalsEpsilon(new Cartesian4(2.0, 2.0, 3.0, 4.0), 1.0)
).toEqual(true);
expect(
- cartesian.equalsEpsilon(new Cartesian4(1.0, 3.0, 3.0, 4.0), 1.0),
+ cartesian.equalsEpsilon(new Cartesian4(1.0, 3.0, 3.0, 4.0), 1.0)
).toEqual(true);
expect(
- cartesian.equalsEpsilon(new Cartesian4(1.0, 2.0, 4.0, 4.0), 1.0),
+ cartesian.equalsEpsilon(new Cartesian4(1.0, 2.0, 4.0, 4.0), 1.0)
).toEqual(true);
expect(
- cartesian.equalsEpsilon(new Cartesian4(1.0, 2.0, 3.0, 5.0), 1.0),
+ cartesian.equalsEpsilon(new Cartesian4(1.0, 2.0, 3.0, 5.0), 1.0)
).toEqual(true);
expect(
cartesian.equalsEpsilon(
new Cartesian4(2.0, 2.0, 3.0, 4.0),
- CesiumMath.EPSILON6,
- ),
+ CesiumMath.EPSILON6
+ )
).toEqual(false);
expect(
cartesian.equalsEpsilon(
new Cartesian4(1.0, 3.0, 3.0, 4.0),
- CesiumMath.EPSILON6,
- ),
+ CesiumMath.EPSILON6
+ )
).toEqual(false);
expect(
cartesian.equalsEpsilon(
new Cartesian4(1.0, 2.0, 4.0, 4.0),
- CesiumMath.EPSILON6,
- ),
+ CesiumMath.EPSILON6
+ )
).toEqual(false);
expect(
cartesian.equalsEpsilon(
new Cartesian4(1.0, 2.0, 3.0, 5.0),
- CesiumMath.EPSILON6,
- ),
+ CesiumMath.EPSILON6
+ )
).toEqual(false);
expect(cartesian.equalsEpsilon(undefined, 1)).toEqual(false);
@@ -970,44 +970,44 @@ describe("Core/Cartesian4", function () {
expect(
cartesian.equalsEpsilon(
new Cartesian4(3000000.0, 4000000.0, 5000000.0, 6000000.0),
- 0.0,
- ),
+ 0.0
+ )
).toEqual(true);
expect(
cartesian.equalsEpsilon(
new Cartesian4(3000000.2, 4000000.0, 5000000.0, 6000000.0),
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toEqual(true);
expect(
cartesian.equalsEpsilon(
new Cartesian4(3000000.0, 4000000.2, 5000000.0, 6000000.0),
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toEqual(true);
expect(
cartesian.equalsEpsilon(
new Cartesian4(3000000.0, 4000000.0, 5000000.2, 6000000.0),
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toEqual(true);
expect(
cartesian.equalsEpsilon(
new Cartesian4(3000000.0, 4000000.0, 5000000.0, 6000000.2),
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toEqual(true);
expect(
cartesian.equalsEpsilon(
new Cartesian4(3000000.2, 4000000.2, 5000000.2, 6000000.2),
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toEqual(true);
expect(
cartesian.equalsEpsilon(
new Cartesian4(3000000.2, 4000000.2, 5000000.2, 6000000.2),
- CesiumMath.EPSILON9,
- ),
+ CesiumMath.EPSILON9
+ )
).toEqual(false);
expect(cartesian.equalsEpsilon(undefined, 1)).toEqual(false);
@@ -1316,6 +1316,6 @@ describe("Core/Cartesian4", function () {
Cartesian4,
[new Cartesian4(1, 2, 3, 4), new Cartesian4(5, 6, 7, 8)],
[1, 2, 3, 4, 5, 6, 7, 8],
- 4,
+ 4
);
});
diff --git a/packages/engine/Specs/Core/CartographicGeocoderServiceSpec.js b/packages/engine/Specs/Core/CartographicGeocoderServiceSpec.js
index 1cc60b71a198..98fb8ae18020 100644
--- a/packages/engine/Specs/Core/CartographicGeocoderServiceSpec.js
+++ b/packages/engine/Specs/Core/CartographicGeocoderServiceSpec.js
@@ -16,7 +16,7 @@ describe("Core/CartographicGeocoderService", function () {
return service.geocode(query).then(function (results) {
expect(results.length).toEqual(1);
expect(results[0].destination).toEqual(
- Cartesian3.fromDegrees(-75.0, 35.0, 300.0),
+ Cartesian3.fromDegrees(-75.0, 35.0, 300.0)
);
});
});
@@ -26,7 +26,7 @@ describe("Core/CartographicGeocoderService", function () {
return service.geocode(query).then(function (results) {
expect(results.length).toEqual(1);
expect(results[0].destination).toEqual(
- Cartesian3.fromDegrees(-75.0, 35.0, 300.0),
+ Cartesian3.fromDegrees(-75.0, 35.0, 300.0)
);
});
});
@@ -36,7 +36,7 @@ describe("Core/CartographicGeocoderService", function () {
return service.geocode(query).then(function (results) {
expect(results.length).toEqual(1);
expect(results[0].destination).toEqual(
- Cartesian3.fromDegrees(1.0, 2.0, 3.0),
+ Cartesian3.fromDegrees(1.0, 2.0, 3.0)
);
});
});
@@ -47,7 +47,7 @@ describe("Core/CartographicGeocoderService", function () {
return service.geocode(query).then(function (results) {
expect(results.length).toEqual(1);
expect(results[0].destination).toEqual(
- Cartesian3.fromDegrees(1.0, 2.0, defaultHeight),
+ Cartesian3.fromDegrees(1.0, 2.0, defaultHeight)
);
});
});
diff --git a/packages/engine/Specs/Core/CartographicSpec.js b/packages/engine/Specs/Core/CartographicSpec.js
index 221282c89b43..cd281154bd8e 100644
--- a/packages/engine/Specs/Core/CartographicSpec.js
+++ b/packages/engine/Specs/Core/CartographicSpec.js
@@ -9,12 +9,12 @@ describe("Core/Cartographic", function () {
const surfaceCartesian = new Cartesian3(
4094327.7921465295,
1909216.4044747739,
- 4487348.4088659193,
+ 4487348.4088659193
);
const surfaceCartographic = new Cartographic(
CesiumMath.toRadians(25.0),
CesiumMath.toRadians(45.0),
- 0.0,
+ 0.0
);
afterEach(function () {
@@ -42,7 +42,7 @@ describe("Core/Cartographic", function () {
const ellipsoid = Ellipsoid.WGS84;
const actual = Cartographic.toCartesian(new Cartographic(lon, lat, height));
const expected = ellipsoid.cartographicToCartesian(
- new Cartographic(lon, lat, height),
+ new Cartographic(lon, lat, height)
);
expect(actual).toEqual(expected);
});
@@ -53,7 +53,7 @@ describe("Core/Cartographic", function () {
const expectedPosition = new Cartesian3(
1593514.338295244,
691991.9979835141,
- 20442.318221152018,
+ 20442.318221152018
);
const cartographic = Cartographic.fromDegrees(23.47315, 0.67416);
const position = Cartographic.toCartesian(cartographic);
@@ -144,14 +144,14 @@ describe("Core/Cartographic", function () {
const position = new Cartesian3(
1593514.338295244,
691991.9979835141,
- 20442.318221152018,
+ 20442.318221152018
);
const cartographic = new Cartographic.fromCartesian(position);
const expectedCartographic = Cartographic.fromDegrees(23.47315, 0.67416);
expect(cartographic).toEqualEpsilon(
expectedCartographic,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
});
@@ -166,7 +166,7 @@ describe("Core/Cartographic", function () {
const cartesian1 = Cartesian3.fromRadians(
cartographic1.longitude,
cartographic1.latitude,
- cartographic1.height,
+ cartographic1.height
);
const cartographic2 = Cartographic.fromCartesian(cartesian1);
@@ -178,7 +178,7 @@ describe("Core/Cartographic", function () {
const cartesian1 = Cartesian3.fromRadians(
cartographic1.longitude,
cartographic1.latitude,
- cartographic1.height,
+ cartographic1.height
);
const cartographic2 = Cartographic.fromCartesian(cartesian1);
@@ -219,28 +219,28 @@ describe("Core/Cartographic", function () {
it("equalsEpsilon", function () {
const cartographic = new Cartographic(1.0, 2.0, 3.0);
expect(
- cartographic.equalsEpsilon(new Cartographic(1.0, 2.0, 3.0), 0.0),
+ cartographic.equalsEpsilon(new Cartographic(1.0, 2.0, 3.0), 0.0)
).toEqual(true);
expect(
- cartographic.equalsEpsilon(new Cartographic(1.0, 2.0, 3.0), 1.0),
+ cartographic.equalsEpsilon(new Cartographic(1.0, 2.0, 3.0), 1.0)
).toEqual(true);
expect(
- cartographic.equalsEpsilon(new Cartographic(2.0, 2.0, 3.0), 1.0),
+ cartographic.equalsEpsilon(new Cartographic(2.0, 2.0, 3.0), 1.0)
).toEqual(true);
expect(
- cartographic.equalsEpsilon(new Cartographic(1.0, 3.0, 3.0), 1.0),
+ cartographic.equalsEpsilon(new Cartographic(1.0, 3.0, 3.0), 1.0)
).toEqual(true);
expect(
- cartographic.equalsEpsilon(new Cartographic(1.0, 2.0, 4.0), 1.0),
+ cartographic.equalsEpsilon(new Cartographic(1.0, 2.0, 4.0), 1.0)
).toEqual(true);
expect(
- cartographic.equalsEpsilon(new Cartographic(2.0, 2.0, 3.0), 0.99999),
+ cartographic.equalsEpsilon(new Cartographic(2.0, 2.0, 3.0), 0.99999)
).toEqual(false);
expect(
- cartographic.equalsEpsilon(new Cartographic(1.0, 3.0, 3.0), 0.99999),
+ cartographic.equalsEpsilon(new Cartographic(1.0, 3.0, 3.0), 0.99999)
).toEqual(false);
expect(
- cartographic.equalsEpsilon(new Cartographic(1.0, 2.0, 4.0), 0.99999),
+ cartographic.equalsEpsilon(new Cartographic(1.0, 2.0, 4.0), 0.99999)
).toEqual(false);
expect(cartographic.equalsEpsilon(undefined, 1)).toEqual(false);
});
diff --git a/packages/engine/Specs/Core/CatmullRomSplineSpec.js b/packages/engine/Specs/Core/CatmullRomSplineSpec.js
index 3384a766e325..4dd08e164df3 100644
--- a/packages/engine/Specs/Core/CatmullRomSplineSpec.js
+++ b/packages/engine/Specs/Core/CatmullRomSplineSpec.js
@@ -47,7 +47,7 @@ describe("Core/CatmullRomSpline", function () {
const end = Cartesian3.subtract(
points[points.length - 1],
points[points.length - 2],
- new Cartesian3(),
+ new Cartesian3()
);
const crs = new CatmullRomSpline({
points: points,
@@ -71,13 +71,13 @@ describe("Core/CatmullRomSpline", function () {
Cartesian3.subtract(
Cartesian3.multiplyByScalar(controlPoint1, 2.0, start),
controlPoint2,
- start,
+ start
),
controlPoint0,
- start,
+ start
),
0.5,
- start,
+ start
);
const controlPointn0 = Cartesian3.clone(points[points.length - 1]);
@@ -90,13 +90,13 @@ describe("Core/CatmullRomSpline", function () {
Cartesian3.subtract(
controlPointn0,
Cartesian3.multiplyByScalar(controlPointn1, 2.0, end),
- end,
+ end
),
controlPointn2,
- end,
+ end
),
0.5,
- end,
+ end
);
const crs = new CatmullRomSpline({
@@ -142,8 +142,8 @@ describe("Core/CatmullRomSpline", function () {
Cartesian3.multiplyByScalar(
Cartesian3.subtract(points[i + 1], points[i - 1], new Cartesian3()),
0.5,
- new Cartesian3(),
- ),
+ new Cartesian3()
+ )
);
}
tangents.push(crs.lastTangent);
@@ -158,7 +158,7 @@ describe("Core/CatmullRomSpline", function () {
for (let j = times[0]; j <= times[points.length - 1]; j = j + granularity) {
expect(hs.evaluate(j)).toEqualEpsilon(
crs.evaluate(j),
- CesiumMath.EPSILON4,
+ CesiumMath.EPSILON4
);
}
});
@@ -186,7 +186,7 @@ describe("Core/CatmullRomSpline", function () {
const t = (times[0] + times[1]) * 0.5;
expect(crs.evaluate(t)).toEqual(
- Cartesian3.lerp(points[0], points[1], t, new Cartesian3()),
+ Cartesian3.lerp(points[0], points[1], t, new Cartesian3())
);
});
@@ -204,7 +204,7 @@ describe("Core/CatmullRomSpline", function () {
const actual = crs.evaluate(t, result);
expect(actual).toBe(result);
expect(actual).toEqual(
- Cartesian3.lerp(points[0], points[1], t, new Cartesian3()),
+ Cartesian3.lerp(points[0], points[1], t, new Cartesian3())
);
});
});
diff --git a/packages/engine/Specs/Core/CesiumTerrainProviderSpec.js b/packages/engine/Specs/Core/CesiumTerrainProviderSpec.js
index 9422bc626d51..c89c43b83545 100644
--- a/packages/engine/Specs/Core/CesiumTerrainProviderSpec.js
+++ b/packages/engine/Specs/Core/CesiumTerrainProviderSpec.js
@@ -33,7 +33,7 @@ describe("Core/CesiumTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
if (url.indexOf("layer.json") >= 0) {
Resource._DefaultImplementations.loadWithXhr(
@@ -42,7 +42,7 @@ describe("Core/CesiumTerrainProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
} else {
return oldLoad(
@@ -52,7 +52,7 @@ describe("Core/CesiumTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
}
};
@@ -60,7 +60,7 @@ describe("Core/CesiumTerrainProvider", function () {
function returnHeightmapTileJson() {
return returnTileJson(
- "Data/CesiumTerrainTileJson/StandardHeightmap.tile.json",
+ "Data/CesiumTerrainTileJson/StandardHeightmap.tile.json"
);
}
@@ -74,7 +74,7 @@ describe("Core/CesiumTerrainProvider", function () {
function returnOctVertexNormalTileJson() {
return returnTileJson(
- "Data/CesiumTerrainTileJson/OctVertexNormals.tile.json",
+ "Data/CesiumTerrainTileJson/OctVertexNormals.tile.json"
);
}
@@ -84,7 +84,7 @@ describe("Core/CesiumTerrainProvider", function () {
function returnPartialAvailabilityTileJson() {
return returnTileJson(
- "Data/CesiumTerrainTileJson/PartialAvailability.tile.json",
+ "Data/CesiumTerrainTileJson/PartialAvailability.tile.json"
);
}
@@ -102,7 +102,7 @@ describe("Core/CesiumTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
if (url.indexOf("layer.json") >= 0) {
Resource._DefaultImplementations.loadWithXhr(
@@ -111,7 +111,7 @@ describe("Core/CesiumTerrainProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
} else {
return oldLoad(
@@ -121,7 +121,7 @@ describe("Core/CesiumTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
}
};
@@ -129,7 +129,7 @@ describe("Core/CesiumTerrainProvider", function () {
function returnMetadataAvailabilityTileJson() {
return returnTileJson(
- "Data/CesiumTerrainTileJson/MetadataAvailability.tile.json",
+ "Data/CesiumTerrainTileJson/MetadataAvailability.tile.json"
);
}
@@ -147,7 +147,7 @@ describe("Core/CesiumTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
if (url.indexOf("layer.json") >= 0) {
Resource._DefaultImplementations.loadWithXhr(
@@ -156,7 +156,7 @@ describe("Core/CesiumTerrainProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
} else {
return oldLoad(
@@ -166,7 +166,7 @@ describe("Core/CesiumTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
}
};
@@ -193,17 +193,17 @@ describe("Core/CesiumTerrainProvider", function () {
it("fromIonAssetId throws without assetId", async function () {
await expectAsync(
- CesiumTerrainProvider.fromIonAssetId(),
+ CesiumTerrainProvider.fromIonAssetId()
).toBeRejectedWithDeveloperError(
- "assetId is required, actual value was undefined",
+ "assetId is required, actual value was undefined"
);
});
it("fromUrl throws without url", async function () {
await expectAsync(
- CesiumTerrainProvider.fromUrl(),
+ CesiumTerrainProvider.fromUrl()
).toBeRejectedWithDeveloperError(
- "url is required, actual value was undefined",
+ "url is required, actual value was undefined"
);
});
@@ -214,7 +214,7 @@ describe("Core/CesiumTerrainProvider", function () {
it("fromUrl resolves with url promise", async function () {
const provider = await CesiumTerrainProvider.fromUrl(
- Promise.resolve("made/up/url"),
+ Promise.resolve("made/up/url")
);
expect(provider).toBeInstanceOf(CesiumTerrainProvider);
});
@@ -230,7 +230,7 @@ describe("Core/CesiumTerrainProvider", function () {
it("fromUrl rejects if url rejects", async function () {
await expectAsync(
- CesiumTerrainProvider.fromUrl(Promise.reject(new Error("my message"))),
+ CesiumTerrainProvider.fromUrl(Promise.reject(new Error("my message")))
).toBeRejectedWithError("my message");
});
@@ -267,11 +267,11 @@ describe("Core/CesiumTerrainProvider", function () {
expect(provider.getLevelMaximumGeometricError(0)).toBeGreaterThan(0.0);
expect(provider.getLevelMaximumGeometricError(0)).toEqualEpsilon(
provider.getLevelMaximumGeometricError(1) * 2.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(provider.getLevelMaximumGeometricError(1)).toEqualEpsilon(
provider.getLevelMaximumGeometricError(2) * 2.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -332,7 +332,7 @@ describe("Core/CesiumTerrainProvider", function () {
});
expect(provider._tileCredits[0].html).toBe(
- "This is a child tileset! This amazing data is courtesy The Amazing Data Source!",
+ "This is a child tileset! This amazing data is courtesy The Amazing Data Source!"
);
expect(provider.requestVertexNormals).toBe(true);
expect(provider.requestWaterMask).toBe(true);
@@ -360,10 +360,10 @@ describe("Core/CesiumTerrainProvider", function () {
returnTileJson("Data/CesiumTerrainTileJson/InvalidFormat.tile.json");
await expectAsync(
- CesiumTerrainProvider.fromUrl("made/up/url"),
+ CesiumTerrainProvider.fromUrl("made/up/url")
).toBeRejectedWithError(
RuntimeError,
- 'The tile format "awesometron-9000.0" is invalid or not supported.',
+ 'The tile format "awesometron-9000.0" is invalid or not supported.'
);
});
@@ -371,10 +371,10 @@ describe("Core/CesiumTerrainProvider", function () {
returnTileJson("Data/CesiumTerrainTileJson/QuantizedMesh2.0.tile.json");
await expectAsync(
- CesiumTerrainProvider.fromUrl("made/up/url"),
+ CesiumTerrainProvider.fromUrl("made/up/url")
).toBeRejectedWithError(
RuntimeError,
- 'The tile format "quantized-mesh-2.0" is invalid or not supported.',
+ 'The tile format "quantized-mesh-2.0" is invalid or not supported.'
);
});
@@ -382,7 +382,7 @@ describe("Core/CesiumTerrainProvider", function () {
returnTileJson("Data/CesiumTerrainTileJson/QuantizedMesh1.1.tile.json");
await expectAsync(
- CesiumTerrainProvider.fromUrl("made/up/url"),
+ CesiumTerrainProvider.fromUrl("made/up/url")
).toBeResolved();
});
@@ -390,10 +390,10 @@ describe("Core/CesiumTerrainProvider", function () {
returnTileJson("Data/CesiumTerrainTileJson/NoTiles.tile.json");
await expectAsync(
- CesiumTerrainProvider.fromUrl("made/up/url"),
+ CesiumTerrainProvider.fromUrl("made/up/url")
).toBeRejectedWithError(
RuntimeError,
- "The layer.json file does not specify any tile URL templates.",
+ "The layer.json file does not specify any tile URL templates."
);
});
@@ -401,10 +401,10 @@ describe("Core/CesiumTerrainProvider", function () {
returnTileJson("Data/CesiumTerrainTileJson/EmptyTilesArray.tile.json");
await expectAsync(
- CesiumTerrainProvider.fromUrl("made/up/url"),
+ CesiumTerrainProvider.fromUrl("made/up/url")
).toBeRejectedWithError(
RuntimeError,
- "The layer.json file does not specify any tile URL templates.",
+ "The layer.json file does not specify any tile URL templates."
);
});
@@ -414,7 +414,7 @@ describe("Core/CesiumTerrainProvider", function () {
const provider = await CesiumTerrainProvider.fromUrl("made/up/url");
expect(provider._tileCredits[0].html).toBe(
- "This amazing data is courtesy The Amazing Data Source!",
+ "This amazing data is courtesy The Amazing Data Source!"
);
});
@@ -432,10 +432,10 @@ describe("Core/CesiumTerrainProvider", function () {
};
expect(
- CesiumTerrainProvider._getAvailabilityTile(layer, 0, 0, 0),
+ CesiumTerrainProvider._getAvailabilityTile(layer, 0, 0, 0)
).toBeUndefined();
expect(
- CesiumTerrainProvider._getAvailabilityTile(layer, 1, 0, 0),
+ CesiumTerrainProvider._getAvailabilityTile(layer, 1, 0, 0)
).toBeUndefined();
});
@@ -456,7 +456,7 @@ describe("Core/CesiumTerrainProvider", function () {
});
expect(
- CesiumTerrainProvider._getAvailabilityTile(layer, 80, 50, 10),
+ CesiumTerrainProvider._getAvailabilityTile(layer, 80, 50, 10)
).toEqual({
level: 0,
x: 0,
@@ -487,10 +487,10 @@ describe("Core/CesiumTerrainProvider", function () {
}
expect(
- CesiumTerrainProvider._getAvailabilityTile(layer, xs[0], ys[0], 20),
+ CesiumTerrainProvider._getAvailabilityTile(layer, xs[0], ys[0], 20)
).toEqual(expected);
expect(
- CesiumTerrainProvider._getAvailabilityTile(layer, xs[1], ys[1], 20),
+ CesiumTerrainProvider._getAvailabilityTile(layer, xs[1], ys[1], 20)
).toEqual(expected);
});
@@ -504,7 +504,7 @@ describe("Core/CesiumTerrainProvider", function () {
await provider.requestTileGeometry(0, 0, 0);
} catch (e) {
expect(
- Resource._Implementations.loadWithXhr.calls.mostRecent().args[0],
+ Resource._Implementations.loadWithXhr.calls.mostRecent().args[0]
).toContain("foo0.com");
}
@@ -512,7 +512,7 @@ describe("Core/CesiumTerrainProvider", function () {
await provider.requestTileGeometry(1, 0, 0);
} catch (e) {
expect(
- Resource._Implementations.loadWithXhr.calls.mostRecent().args[0],
+ Resource._Implementations.loadWithXhr.calls.mostRecent().args[0]
).toContain("foo1.com");
}
@@ -520,7 +520,7 @@ describe("Core/CesiumTerrainProvider", function () {
await provider.requestTileGeometry(1, -1, 0);
} catch (e) {
expect(
- Resource._Implementations.loadWithXhr.calls.mostRecent().args[0],
+ Resource._Implementations.loadWithXhr.calls.mostRecent().args[0]
).toContain("foo2.com");
}
@@ -528,7 +528,7 @@ describe("Core/CesiumTerrainProvider", function () {
await provider.requestTileGeometry(1, 0, 1);
} catch (e) {
expect(
- Resource._Implementations.loadWithXhr.calls.mostRecent().args[0],
+ Resource._Implementations.loadWithXhr.calls.mostRecent().args[0]
).toContain("foo3.com");
}
});
@@ -544,14 +544,14 @@ describe("Core/CesiumTerrainProvider", function () {
await provider.requestTileGeometry(0, 0, 0);
} catch (e) {
expect(
- Resource._Implementations.loadWithXhr.calls.mostRecent().args[0],
+ Resource._Implementations.loadWithXhr.calls.mostRecent().args[0]
).toContain("foo0.com");
}
try {
await provider.requestTileGeometry(1, 0, 0);
} catch (e) {
expect(
- Resource._Implementations.loadWithXhr.calls.mostRecent().args[0],
+ Resource._Implementations.loadWithXhr.calls.mostRecent().args[0]
).toContain("foo1.com");
}
@@ -559,14 +559,14 @@ describe("Core/CesiumTerrainProvider", function () {
await provider.requestTileGeometry(1, -1, 0);
} catch (e) {
expect(
- Resource._Implementations.loadWithXhr.calls.mostRecent().args[0],
+ Resource._Implementations.loadWithXhr.calls.mostRecent().args[0]
).toContain("foo2.com");
}
try {
await provider.requestTileGeometry(1, 0, 1);
} catch (e) {
expect(
- Resource._Implementations.loadWithXhr.calls.mostRecent().args[0],
+ Resource._Implementations.loadWithXhr.calls.mostRecent().args[0]
).toContain("foo3.com");
}
});
@@ -579,7 +579,7 @@ describe("Core/CesiumTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
// Just return any old file, as long as its big enough
return Resource._DefaultImplementations.loadWithXhr(
@@ -588,7 +588,7 @@ describe("Core/CesiumTerrainProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -607,7 +607,7 @@ describe("Core/CesiumTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/CesiumTerrainTileJson/tile.terrain",
@@ -615,7 +615,7 @@ describe("Core/CesiumTerrainProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -634,7 +634,7 @@ describe("Core/CesiumTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/CesiumTerrainTileJson/tile.32bitIndices.terrain",
@@ -642,7 +642,7 @@ describe("Core/CesiumTerrainProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -662,7 +662,7 @@ describe("Core/CesiumTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/CesiumTerrainTileJson/tile.vertexnormals.terrain",
@@ -670,7 +670,7 @@ describe("Core/CesiumTerrainProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -690,7 +690,7 @@ describe("Core/CesiumTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/CesiumTerrainTileJson/tile.watermask.terrain",
@@ -698,7 +698,7 @@ describe("Core/CesiumTerrainProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -718,7 +718,7 @@ describe("Core/CesiumTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/CesiumTerrainTileJson/tile.octvertexnormals.watermask.terrain",
@@ -726,7 +726,7 @@ describe("Core/CesiumTerrainProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -747,7 +747,7 @@ describe("Core/CesiumTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/CesiumTerrainTileJson/tile.octvertexnormals.terrain",
@@ -755,7 +755,7 @@ describe("Core/CesiumTerrainProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -775,7 +775,7 @@ describe("Core/CesiumTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/CesiumTerrainTileJson/tile.vertexnormals.unknownext.terrain",
@@ -783,7 +783,7 @@ describe("Core/CesiumTerrainProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -803,7 +803,7 @@ describe("Core/CesiumTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/CesiumTerrainTileJson/tile.octvertexnormals.unknownext.terrain",
@@ -811,7 +811,7 @@ describe("Core/CesiumTerrainProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -831,7 +831,7 @@ describe("Core/CesiumTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/CesiumTerrainTileJson/tile.unknownext.terrain",
@@ -839,7 +839,7 @@ describe("Core/CesiumTerrainProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -858,7 +858,7 @@ describe("Core/CesiumTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/CesiumTerrainTileJson/tile.metadataavailability.terrain",
@@ -866,14 +866,15 @@ describe("Core/CesiumTerrainProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
returnMetadataAvailabilityTileJson();
- const terrainProvider =
- await CesiumTerrainProvider.fromUrl("made/up/url");
+ const terrainProvider = await CesiumTerrainProvider.fromUrl(
+ "made/up/url"
+ );
expect(terrainProvider.hasMetadata).toBe(true);
expect(terrainProvider._layers[0].availabilityLevels).toBe(10);
@@ -894,7 +895,7 @@ describe("Core/CesiumTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/CesiumTerrainTileJson/tile.metadataavailability.terrain",
@@ -902,14 +903,15 @@ describe("Core/CesiumTerrainProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
returnParentUrlTileJsonWithMetadataAvailability();
- const terrainProvider =
- await CesiumTerrainProvider.fromUrl("made/up/url");
+ const terrainProvider = await CesiumTerrainProvider.fromUrl(
+ "made/up/url"
+ );
expect(terrainProvider.hasMetadata).toBe(true);
const layers = terrainProvider._layers;
@@ -934,7 +936,7 @@ describe("Core/CesiumTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
// Do nothing, so requests never complete
deferreds.push(deferred);
@@ -978,7 +980,7 @@ describe("Core/CesiumTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/CesiumTerrainTileJson/tile.terrain",
@@ -986,7 +988,7 @@ describe("Core/CesiumTerrainProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -1017,7 +1019,7 @@ describe("Core/CesiumTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/CesiumTerrainTileJson/tile.metadataavailability.terrain",
@@ -1025,14 +1027,15 @@ describe("Core/CesiumTerrainProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
returnMetadataAvailabilityTileJson();
- const terrainProvider =
- await CesiumTerrainProvider.fromUrl("made/up/url");
+ const terrainProvider = await CesiumTerrainProvider.fromUrl(
+ "made/up/url"
+ );
expect(terrainProvider.getTileDataAvailable(0, 0, 0)).toBe(true);
expect(terrainProvider.getTileDataAvailable(0, 0, 1)).toBeUndefined();
@@ -1049,7 +1052,7 @@ describe("Core/CesiumTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
// Just return any old file, as long as its big enough
Resource._DefaultImplementations.loadWithXhr(
@@ -1058,7 +1061,7 @@ describe("Core/CesiumTerrainProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -1075,17 +1078,17 @@ describe("Core/CesiumTerrainProvider", function () {
{
requestVertexNormals: true,
requestWaterMask: true,
- },
+ }
);
const getDerivedResource = spyOn(
IonResource.prototype,
- "getDerivedResource",
+ "getDerivedResource"
).and.callThrough();
await terrainProvider.requestTileGeometry(0, 0, 0);
const options = getDerivedResource.calls.argsFor(0)[0];
expect(options.queryParameters.extensions).toEqual(
- "octvertexnormals-watermask-metadata",
+ "octvertexnormals-watermask-metadata"
);
});
});
diff --git a/packages/engine/Specs/Core/CircleGeometrySpec.js b/packages/engine/Specs/Core/CircleGeometrySpec.js
index d1a0c7c333ed..78cc3929c4df 100644
--- a/packages/engine/Specs/Core/CircleGeometrySpec.js
+++ b/packages/engine/Specs/Core/CircleGeometrySpec.js
@@ -43,7 +43,7 @@ describe("Core/CircleGeometry", function () {
center: Cartesian3.fromDegrees(0, 0),
granularity: 0.1,
radius: 1.0,
- }),
+ })
);
const numVertices = 16; //rows of 1 + 4 + 6 + 4 + 1
@@ -61,7 +61,7 @@ describe("Core/CircleGeometry", function () {
center: Cartesian3.fromDegrees(0, 0),
granularity: 0.1,
radius: 1.0,
- }),
+ })
);
const numVertices = 16;
@@ -83,7 +83,7 @@ describe("Core/CircleGeometry", function () {
granularity: 0.1,
radius: 1.0,
extrudedHeight: 10000,
- }),
+ })
);
const numVertices = 48; // 16 top circle + 16 bottom circle + 8 top edge + 8 bottom edge
@@ -101,7 +101,7 @@ describe("Core/CircleGeometry", function () {
granularity: 0.1,
radius: 1.0,
extrudedHeight: 10000,
- }),
+ })
);
const numVertices = 48;
@@ -123,7 +123,7 @@ describe("Core/CircleGeometry", function () {
granularity: 0.1,
radius: 1.0,
stRotation: CesiumMath.PI_OVER_TWO,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -183,27 +183,27 @@ describe("Core/CircleGeometry", function () {
expect(textureCoordinateRotationPoints.length).toEqual(6);
expect(textureCoordinateRotationPoints[0]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[1]).toEqualEpsilon(
1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[2]).toEqualEpsilon(
1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[3]).toEqualEpsilon(
1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[4]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[5]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
diff --git a/packages/engine/Specs/Core/CircleOutlineGeometrySpec.js b/packages/engine/Specs/Core/CircleOutlineGeometrySpec.js
index 5124c2e720b5..1f8a92ae0e1f 100644
--- a/packages/engine/Specs/Core/CircleOutlineGeometrySpec.js
+++ b/packages/engine/Specs/Core/CircleOutlineGeometrySpec.js
@@ -36,7 +36,7 @@ describe("Core/CircleOutlineGeometry", function () {
center: Cartesian3.fromDegrees(0, 0),
granularity: 0.1,
radius: 1.0,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(8 * 3);
@@ -52,7 +52,7 @@ describe("Core/CircleOutlineGeometry", function () {
granularity: 0.1,
radius: 1.0,
extrudedHeight: 5,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(16 * 3); //8 top circle + 8 bottom circle
@@ -68,7 +68,7 @@ describe("Core/CircleOutlineGeometry", function () {
radius: 1.0,
extrudedHeight: 10000,
numberOfVerticalLines: 0,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(16 * 3);
@@ -123,7 +123,7 @@ describe("Core/CircleOutlineGeometry", function () {
CircleOutlineGeometry,
packableInstance,
packedInstance,
- "extruded",
+ "extruded"
);
//Because extrudedHeight is optional and has to be taken into account when packing, we have a second test without it.
@@ -155,6 +155,6 @@ describe("Core/CircleOutlineGeometry", function () {
CircleOutlineGeometry,
packableInstance,
packedInstance,
- "at height",
+ "at height"
);
});
diff --git a/packages/engine/Specs/Core/ClockSpec.js b/packages/engine/Specs/Core/ClockSpec.js
index be69c6277a6f..48a3e97c1717 100644
--- a/packages/engine/Specs/Core/ClockSpec.js
+++ b/packages/engine/Specs/Core/ClockSpec.js
@@ -10,7 +10,7 @@ describe("Core/Clock", function () {
it("sets default parameters when constructed", function () {
const clock = new Clock();
expect(clock.stopTime).toEqual(
- JulianDate.addDays(clock.startTime, 1, new JulianDate()),
+ JulianDate.addDays(clock.startTime, 1, new JulianDate())
);
expect(clock.startTime).toEqual(clock.currentTime);
expect(clock.multiplier).toEqual(1.0);
@@ -225,7 +225,7 @@ describe("Core/Clock", function () {
currentTime = JulianDate.addSeconds(
currentTime,
multiplier,
- new JulianDate(),
+ new JulianDate()
);
expect(currentTime).toEqual(clock.tick());
expect(clock.currentTime).toEqual(currentTime);
@@ -233,7 +233,7 @@ describe("Core/Clock", function () {
currentTime = JulianDate.addSeconds(
currentTime,
multiplier,
- new JulianDate(),
+ new JulianDate()
);
expect(currentTime).toEqual(clock.tick());
expect(clock.currentTime).toEqual(currentTime);
@@ -258,7 +258,7 @@ describe("Core/Clock", function () {
currentTime = JulianDate.addSeconds(
currentTime,
multiplier,
- new JulianDate(),
+ new JulianDate()
);
expect(currentTime).toEqual(clock.tick());
expect(clock.currentTime).toEqual(currentTime);
@@ -266,7 +266,7 @@ describe("Core/Clock", function () {
currentTime = JulianDate.addSeconds(
currentTime,
multiplier,
- new JulianDate(),
+ new JulianDate()
);
expect(currentTime).toEqual(clock.tick());
expect(clock.currentTime).toEqual(currentTime);
@@ -291,7 +291,7 @@ describe("Core/Clock", function () {
currentTime = JulianDate.addSeconds(
currentTime,
multiplier,
- new JulianDate(),
+ new JulianDate()
);
expect(currentTime).toEqual(clock.tick());
expect(clock.currentTime).toEqual(currentTime);
@@ -299,7 +299,7 @@ describe("Core/Clock", function () {
currentTime = JulianDate.addSeconds(
currentTime,
multiplier,
- new JulianDate(),
+ new JulianDate()
);
expect(currentTime).toEqual(clock.tick());
expect(clock.currentTime).toEqual(currentTime);
@@ -324,7 +324,7 @@ describe("Core/Clock", function () {
currentTime = JulianDate.addSeconds(
currentTime,
multiplier,
- new JulianDate(),
+ new JulianDate()
);
expect(currentTime).toEqual(clock.tick());
expect(clock.currentTime).toEqual(currentTime);
@@ -332,7 +332,7 @@ describe("Core/Clock", function () {
currentTime = JulianDate.addSeconds(
currentTime,
multiplier,
- new JulianDate(),
+ new JulianDate()
);
expect(currentTime).toEqual(clock.tick());
expect(clock.currentTime).toEqual(currentTime);
@@ -361,7 +361,7 @@ describe("Core/Clock", function () {
currentTime = JulianDate.addSeconds(
currentTime,
multiplier,
- new JulianDate(),
+ new JulianDate()
);
expect(currentTime).toEqual(clock.tick());
expect(clock.currentTime).toEqual(currentTime);
@@ -504,8 +504,8 @@ describe("Core/Clock", function () {
JulianDate.addSeconds(
JulianDate.fromDate(baseDate),
1.0,
- new JulianDate(),
- ),
+ new JulianDate()
+ )
);
});
@@ -597,8 +597,8 @@ describe("Core/Clock", function () {
JulianDate.addSeconds(
JulianDate.fromDate(baseDate),
2.0,
- new JulianDate(),
- ),
+ new JulianDate()
+ )
);
});
@@ -629,8 +629,8 @@ describe("Core/Clock", function () {
JulianDate.addSeconds(
JulianDate.fromDate(baseDate),
1.0,
- new JulianDate(),
- ),
+ new JulianDate()
+ )
);
jasmine.clock().tick(1000);
@@ -641,8 +641,8 @@ describe("Core/Clock", function () {
JulianDate.addSeconds(
JulianDate.fromDate(baseDate),
2.0,
- new JulianDate(),
- ),
+ new JulianDate()
+ )
);
clock.currentTime = start;
@@ -661,8 +661,8 @@ describe("Core/Clock", function () {
JulianDate.addSeconds(
JulianDate.fromDate(baseDate),
1.0,
- new JulianDate(),
- ),
+ new JulianDate()
+ )
);
});
});
diff --git a/packages/engine/Specs/Core/ColorGeometryInstanceAttributeSpec.js b/packages/engine/Specs/Core/ColorGeometryInstanceAttributeSpec.js
index abf3282a25aa..e2557eb6bfa9 100644
--- a/packages/engine/Specs/Core/ColorGeometryInstanceAttributeSpec.js
+++ b/packages/engine/Specs/Core/ColorGeometryInstanceAttributeSpec.js
@@ -8,7 +8,7 @@ describe("Core/ColorGeometryInstanceAttribute", function () {
it("constructor", function () {
const attribute = new ColorGeometryInstanceAttribute(1.0, 1.0, 0.0, 0.5);
expect(attribute.componentDatatype).toEqual(
- ComponentDatatype.UNSIGNED_BYTE,
+ ComponentDatatype.UNSIGNED_BYTE
);
expect(attribute.componentsPerAttribute).toEqual(4);
expect(attribute.normalize).toEqual(true);
@@ -21,7 +21,7 @@ describe("Core/ColorGeometryInstanceAttribute", function () {
const color = Color.AQUA;
const attribute = ColorGeometryInstanceAttribute.fromColor(color);
expect(attribute.componentDatatype).toEqual(
- ComponentDatatype.UNSIGNED_BYTE,
+ ComponentDatatype.UNSIGNED_BYTE
);
expect(attribute.componentsPerAttribute).toEqual(4);
expect(attribute.normalize).toEqual(true);
@@ -40,7 +40,7 @@ describe("Core/ColorGeometryInstanceAttribute", function () {
const color = Color.AQUA;
const expectedResult = new Uint8Array(color.toBytes());
expect(ColorGeometryInstanceAttribute.toValue(color)).toEqual(
- expectedResult,
+ expectedResult
);
});
@@ -50,7 +50,7 @@ describe("Core/ColorGeometryInstanceAttribute", function () {
const result = new Uint8Array(4);
const returnedResult = ColorGeometryInstanceAttribute.toValue(
color,
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(returnedResult).toEqual(expectedResult);
@@ -68,38 +68,38 @@ describe("Core/ColorGeometryInstanceAttribute", function () {
expect(
ColorGeometryInstanceAttribute.equals(
color,
- new ColorGeometryInstanceAttribute(0.1, 0.2, 0.3, 0.4),
- ),
+ new ColorGeometryInstanceAttribute(0.1, 0.2, 0.3, 0.4)
+ )
).toEqual(true);
expect(
ColorGeometryInstanceAttribute.equals(
color,
- new ColorGeometryInstanceAttribute(0.5, 0.2, 0.3, 0.4),
- ),
+ new ColorGeometryInstanceAttribute(0.5, 0.2, 0.3, 0.4)
+ )
).toEqual(false);
expect(
ColorGeometryInstanceAttribute.equals(
color,
- new ColorGeometryInstanceAttribute(0.1, 0.5, 0.3, 0.4),
- ),
+ new ColorGeometryInstanceAttribute(0.1, 0.5, 0.3, 0.4)
+ )
).toEqual(false);
expect(
ColorGeometryInstanceAttribute.equals(
color,
- new ColorGeometryInstanceAttribute(0.1, 0.2, 0.5, 0.4),
- ),
+ new ColorGeometryInstanceAttribute(0.1, 0.2, 0.5, 0.4)
+ )
).toEqual(false);
expect(
ColorGeometryInstanceAttribute.equals(
color,
- new ColorGeometryInstanceAttribute(0.1, 0.2, 0.3, 0.5),
- ),
+ new ColorGeometryInstanceAttribute(0.1, 0.2, 0.3, 0.5)
+ )
).toEqual(false);
expect(ColorGeometryInstanceAttribute.equals(color, undefined)).toEqual(
- false,
+ false
);
expect(ColorGeometryInstanceAttribute.equals(undefined, color)).toEqual(
- false,
+ false
);
});
});
diff --git a/packages/engine/Specs/Core/ColorSpec.js b/packages/engine/Specs/Core/ColorSpec.js
index 157b2781e0d3..96ab7d124170 100644
--- a/packages/engine/Specs/Core/ColorSpec.js
+++ b/packages/engine/Specs/Core/ColorSpec.js
@@ -85,7 +85,7 @@ describe("Core/Color", function () {
const color = new Color();
const result = Color.fromCartesian4(
new Cartesian4(1.0, 2.0, 3.0, 4.0),
- color,
+ color
);
expect(color).toBe(result);
expect(color).toEqual(new Color(1.0, 2.0, 3.0, 4.0));
@@ -152,10 +152,10 @@ describe("Core/Color", function () {
expect(Color.BLUE.toCssColorString()).toEqual("rgb(0,0,255)");
expect(Color.LIME.toCssColorString()).toEqual("rgb(0,255,0)");
expect(new Color(0.0, 0.0, 0.0, 1.0).toCssColorString()).toEqual(
- "rgb(0,0,0)",
+ "rgb(0,0,0)"
);
expect(new Color(0.1, 0.2, 0.3, 0.4).toCssColorString()).toEqual(
- "rgba(25,51,76,0.4)",
+ "rgba(25,51,76,0.4)"
);
});
@@ -170,13 +170,13 @@ describe("Core/Color", function () {
it("fromCssColorString supports transparent", function () {
expect(Color.fromCssColorString("transparent")).toEqual(
- new Color(0.0, 0.0, 0.0, 0.0),
+ new Color(0.0, 0.0, 0.0, 0.0)
);
});
it("fromCssColorString supports the #rgb format", function () {
expect(Color.fromCssColorString("#369")).toEqual(
- new Color(0.2, 0.4, 0.6, 1.0),
+ new Color(0.2, 0.4, 0.6, 1.0)
);
});
@@ -194,19 +194,19 @@ describe("Core/Color", function () {
it("fromCssColorString supports the #rgba format", function () {
expect(Color.fromCssColorString("#369c")).toEqual(
- new Color(0.2, 0.4, 0.6, 0.8),
+ new Color(0.2, 0.4, 0.6, 0.8)
);
});
it("fromCssColorString supports the #rgba format with uppercase", function () {
expect(Color.fromCssColorString("#369C")).toEqual(
- new Color(0.2, 0.4, 0.6, 0.8),
+ new Color(0.2, 0.4, 0.6, 0.8)
);
});
it("fromCssColorString supports the #rrggbb format", function () {
expect(Color.fromCssColorString("#336699")).toEqual(
- new Color(0.2, 0.4, 0.6, 1.0),
+ new Color(0.2, 0.4, 0.6, 1.0)
);
});
@@ -224,13 +224,13 @@ describe("Core/Color", function () {
it("fromCssColorString supports the #rrggbbaa format", function () {
expect(Color.fromCssColorString("#336699cc")).toEqual(
- new Color(0.2, 0.4, 0.6, 0.8),
+ new Color(0.2, 0.4, 0.6, 0.8)
);
});
it("fromCssColorString supports the #rrggbbaa format with uppercase", function () {
expect(Color.fromCssColorString("#336699CC")).toEqual(
- new Color(0.2, 0.4, 0.6, 0.8),
+ new Color(0.2, 0.4, 0.6, 0.8)
);
});
@@ -239,7 +239,7 @@ describe("Core/Color", function () {
expect(Color.fromCssColorString("rgb(0, 255, 0)")).toEqual(Color.LIME);
expect(Color.fromCssColorString("rgb(0, 0, 255)")).toEqual(Color.BLUE);
expect(Color.fromCssColorString("rgb(51, 102, 204)")).toEqual(
- new Color(0.2, 0.4, 0.8, 1.0),
+ new Color(0.2, 0.4, 0.8, 1.0)
);
});
@@ -248,7 +248,7 @@ describe("Core/Color", function () {
expect(Color.fromCssColorString("rgb(0 255 0)")).toEqual(Color.LIME);
expect(Color.fromCssColorString("rgb(0 0 255)")).toEqual(Color.BLUE);
expect(Color.fromCssColorString("rgb(51 102 204)")).toEqual(
- new Color(0.2, 0.4, 0.8, 1.0),
+ new Color(0.2, 0.4, 0.8, 1.0)
);
});
@@ -257,7 +257,7 @@ describe("Core/Color", function () {
expect(Color.fromCssColorString("rgb(0, 100%, 0)")).toEqual(Color.LIME);
expect(Color.fromCssColorString("rgb(0, 0, 100%)")).toEqual(Color.BLUE);
expect(Color.fromCssColorString("rgb(20%, 40%, 80%)")).toEqual(
- new Color(0.2, 0.4, 0.8, 1.0),
+ new Color(0.2, 0.4, 0.8, 1.0)
);
});
@@ -266,20 +266,20 @@ describe("Core/Color", function () {
expect(Color.fromCssColorString("rgb(0 100% 0)")).toEqual(Color.LIME);
expect(Color.fromCssColorString("rgb(0 0 100%)")).toEqual(Color.BLUE);
expect(Color.fromCssColorString("rgb(20% 40% 80%)")).toEqual(
- new Color(0.2, 0.4, 0.8, 1.0),
+ new Color(0.2, 0.4, 0.8, 1.0)
);
});
it("fromCssColorString supports the rgba() format with absolute values", function () {
expect(Color.fromCssColorString("rgba(255, 0, 0, 1.0)")).toEqual(Color.RED);
expect(Color.fromCssColorString("rgba(0, 255, 0, 1.0)")).toEqual(
- Color.LIME,
+ Color.LIME
);
expect(Color.fromCssColorString("rgba(0, 0, 255, 1.0)")).toEqual(
- Color.BLUE,
+ Color.BLUE
);
expect(Color.fromCssColorString("rgba(51, 102, 204, 0.6)")).toEqual(
- new Color(0.2, 0.4, 0.8, 0.6),
+ new Color(0.2, 0.4, 0.8, 0.6)
);
});
@@ -288,35 +288,35 @@ describe("Core/Color", function () {
expect(Color.fromCssColorString("rgba(0 255 0 / 1.0)")).toEqual(Color.LIME);
expect(Color.fromCssColorString("rgba(0 0 255 / 1.0)")).toEqual(Color.BLUE);
expect(Color.fromCssColorString("rgba(51 102 204 / 0.6)")).toEqual(
- new Color(0.2, 0.4, 0.8, 0.6),
+ new Color(0.2, 0.4, 0.8, 0.6)
);
});
it("fromCssColorString supports the rgba() format with percentages", function () {
expect(Color.fromCssColorString("rgba(100%, 0, 0, 1.0)")).toEqual(
- Color.RED,
+ Color.RED
);
expect(Color.fromCssColorString("rgba(0, 100%, 0, 1.0)")).toEqual(
- Color.LIME,
+ Color.LIME
);
expect(Color.fromCssColorString("rgba(0, 0, 100%, 1.0)")).toEqual(
- Color.BLUE,
+ Color.BLUE
);
expect(Color.fromCssColorString("rgba(20%, 40%, 80%, 0.6)")).toEqual(
- new Color(0.2, 0.4, 0.8, 0.6),
+ new Color(0.2, 0.4, 0.8, 0.6)
);
});
it("fromCssColorString supports the rgba() format with percentages (space-separated)", function () {
expect(Color.fromCssColorString("rgba(100% 0 0 / 1.0)")).toEqual(Color.RED);
expect(Color.fromCssColorString("rgba(0 100% 0 / 1.0)")).toEqual(
- Color.LIME,
+ Color.LIME
);
expect(Color.fromCssColorString("rgba(0 0 100% / 1.0)")).toEqual(
- Color.BLUE,
+ Color.BLUE
);
expect(Color.fromCssColorString("rgba(20% 40% 80% / 0.6)")).toEqual(
- new Color(0.2, 0.4, 0.8, 0.6),
+ new Color(0.2, 0.4, 0.8, 0.6)
);
});
@@ -332,7 +332,7 @@ describe("Core/Color", function () {
expect(Color.fromCssColorString("hsl(240, 100%, 50%)")).toEqual(Color.BLUE);
expect(Color.fromCssColorString("hsl(220, 60%, 50%)")).toEqualEpsilon(
new Color(0.2, 0.4, 0.8),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -342,46 +342,46 @@ describe("Core/Color", function () {
expect(Color.fromCssColorString("hsl(240 100% 50%)")).toEqual(Color.BLUE);
expect(Color.fromCssColorString("hsl(220 60% 50%)")).toEqualEpsilon(
new Color(0.2, 0.4, 0.8),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
it("fromCssColorString supports the hsla() format", function () {
expect(Color.fromCssColorString("hsla(0, 100%, 50%, 1.0)")).toEqual(
- Color.RED,
+ Color.RED
);
expect(Color.fromCssColorString("hsla(120, 100%, 50%, 1.0)")).toEqual(
- Color.LIME,
+ Color.LIME
);
expect(Color.fromCssColorString("hsla(240, 100%, 50%, 1.0)")).toEqual(
- Color.BLUE,
+ Color.BLUE
);
expect(Color.fromCssColorString("hsla(220, 60%, 50%, 0.6)")).toEqualEpsilon(
new Color(0.2, 0.4, 0.8, 0.6),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
it("fromCssColorString supports the hsla() format (space-separated)", function () {
expect(Color.fromCssColorString("hsla(0 100% 50% / 1.0)")).toEqual(
- Color.RED,
+ Color.RED
);
expect(Color.fromCssColorString("hsla(120 100% 50% / 1.0)")).toEqual(
- Color.LIME,
+ Color.LIME
);
expect(Color.fromCssColorString("hsla(240 100% 50% / 1.0)")).toEqual(
- Color.BLUE,
+ Color.BLUE
);
expect(Color.fromCssColorString("hsla(220 60% 50% / 0.6)")).toEqualEpsilon(
new Color(0.2, 0.4, 0.8, 0.6),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
it("fromCssColorString wraps hue into valid range for hsl() format", function () {
expect(Color.fromCssColorString("hsl(720, 100%, 50%)")).toEqual(Color.RED);
expect(Color.fromCssColorString("hsla(720, 100%, 50%, 1.0)")).toEqual(
- Color.RED,
+ Color.RED
);
});
@@ -426,13 +426,13 @@ describe("Core/Color", function () {
it("fromCssColorString understands the color string even with any number of unnecessary leading, trailing or middle spaces", function () {
expect(Color.fromCssColorString(" rgb( 0, 0, 255)")).toEqual(Color.BLUE);
expect(Color.fromCssColorString("rgb( 255, 255, 255) ")).toEqual(
- Color.WHITE,
+ Color.WHITE
);
expect(Color.fromCssColorString("rgb (0 0 255) ")).toEqual(Color.BLUE);
expect(Color.fromCssColorString(" #FF0000")).toEqual(Color.RED);
expect(Color.fromCssColorString("#FF0 ")).toEqual(Color.YELLOW);
expect(Color.fromCssColorString(" hsla(720, 100%, 50%, 1.0) ")).toEqual(
- Color.RED,
+ Color.RED
);
expect(Color.fromCssColorString("hsl (720, 100%, 50%)")).toEqual(Color.RED);
});
@@ -443,7 +443,7 @@ describe("Core/Color", function () {
expect(Color.fromHsl(240.0 / 360.0, 1.0, 0.5, 1.0)).toEqual(Color.BLUE);
expect(Color.fromHsl(220.0 / 360.0, 0.6, 0.5, 0.7)).toEqualEpsilon(
new Color(0.2, 0.4, 0.8, 0.7),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -508,12 +508,12 @@ describe("Core/Color", function () {
expect(color.red).toBeBetween(options.minimumRed, options.maximumRed);
expect(color.green).toBeBetween(
options.minimumGreen,
- options.maximumGreen,
+ options.maximumGreen
);
expect(color.blue).toBeBetween(options.minimumBlue, options.maximumBlue);
expect(color.alpha).toBeBetween(
options.minimumAlpha,
- options.maximumAlpha,
+ options.maximumAlpha
);
}
});
@@ -597,7 +597,7 @@ describe("Core/Color", function () {
it("toString produces correct results", function () {
expect(new Color(0.1, 0.2, 0.3, 0.4).toString()).toEqual(
- "(0.1, 0.2, 0.3, 0.4)",
+ "(0.1, 0.2, 0.3, 0.4)"
);
});
@@ -939,9 +939,10 @@ describe("Core/Color", function () {
expect(result.alpha).toEqualEpsilon(0.5, CesiumMath.EPSILON15);
});
- createPackableSpecs(
- Color,
- new Color(0.1, 0.2, 0.3, 0.4),
- [0.1, 0.2, 0.3, 0.4],
- );
+ createPackableSpecs(Color, new Color(0.1, 0.2, 0.3, 0.4), [
+ 0.1,
+ 0.2,
+ 0.3,
+ 0.4,
+ ]);
});
diff --git a/packages/engine/Specs/Core/ComponentDatatypeSpec.js b/packages/engine/Specs/Core/ComponentDatatypeSpec.js
index b1047d3f1bb0..10957085f84b 100644
--- a/packages/engine/Specs/Core/ComponentDatatypeSpec.js
+++ b/packages/engine/Specs/Core/ComponentDatatypeSpec.js
@@ -3,28 +3,28 @@ import { ComponentDatatype } from "../../index.js";
describe("Core/ComponentDatatype", function () {
it("fromTypedArray works", function () {
expect(ComponentDatatype.fromTypedArray(new Int8Array())).toBe(
- ComponentDatatype.BYTE,
+ ComponentDatatype.BYTE
);
expect(ComponentDatatype.fromTypedArray(new Uint8Array())).toBe(
- ComponentDatatype.UNSIGNED_BYTE,
+ ComponentDatatype.UNSIGNED_BYTE
);
expect(ComponentDatatype.fromTypedArray(new Int16Array())).toBe(
- ComponentDatatype.SHORT,
+ ComponentDatatype.SHORT
);
expect(ComponentDatatype.fromTypedArray(new Uint16Array())).toBe(
- ComponentDatatype.UNSIGNED_SHORT,
+ ComponentDatatype.UNSIGNED_SHORT
);
expect(ComponentDatatype.fromTypedArray(new Int32Array())).toBe(
- ComponentDatatype.INT,
+ ComponentDatatype.INT
);
expect(ComponentDatatype.fromTypedArray(new Uint32Array())).toBe(
- ComponentDatatype.UNSIGNED_INT,
+ ComponentDatatype.UNSIGNED_INT
);
expect(ComponentDatatype.fromTypedArray(new Float32Array())).toBe(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(ComponentDatatype.fromTypedArray(new Float64Array())).toBe(
- ComponentDatatype.DOUBLE,
+ ComponentDatatype.DOUBLE
);
});
@@ -37,15 +37,15 @@ describe("Core/ComponentDatatype", function () {
it("validate works", function () {
expect(ComponentDatatype.validate(ComponentDatatype.BYTE)).toBe(true);
expect(ComponentDatatype.validate(ComponentDatatype.UNSIGNED_BYTE)).toBe(
- true,
+ true
);
expect(ComponentDatatype.validate(ComponentDatatype.SHORT)).toBe(true);
expect(ComponentDatatype.validate(ComponentDatatype.UNSIGNED_SHORT)).toBe(
- true,
+ true
);
expect(ComponentDatatype.validate(ComponentDatatype.INT)).toBe(true);
expect(ComponentDatatype.validate(ComponentDatatype.UNSIGNED_INT)).toBe(
- true,
+ true
);
expect(ComponentDatatype.validate(ComponentDatatype.FLOAT)).toBe(true);
expect(ComponentDatatype.validate(ComponentDatatype.DOUBLE)).toBe(true);
@@ -56,14 +56,14 @@ describe("Core/ComponentDatatype", function () {
it("createTypedArray works with size", function () {
let typedArray = ComponentDatatype.createTypedArray(
ComponentDatatype.BYTE,
- 0,
+ 0
);
expect(typedArray).toBeInstanceOf(Int8Array);
expect(typedArray.length).toBe(0);
typedArray = ComponentDatatype.createTypedArray(
ComponentDatatype.UNSIGNED_BYTE,
- 1,
+ 1
);
expect(typedArray).toBeInstanceOf(Uint8Array);
expect(typedArray.length).toBe(1);
@@ -74,7 +74,7 @@ describe("Core/ComponentDatatype", function () {
typedArray = ComponentDatatype.createTypedArray(
ComponentDatatype.UNSIGNED_SHORT,
- 3,
+ 3
);
expect(typedArray).toBeInstanceOf(Uint16Array);
expect(typedArray.length).toBe(3);
@@ -85,7 +85,7 @@ describe("Core/ComponentDatatype", function () {
typedArray = ComponentDatatype.createTypedArray(
ComponentDatatype.UNSIGNED_INT,
- 5,
+ 5
);
expect(typedArray).toBeInstanceOf(Uint32Array);
expect(typedArray.length).toBe(5);
@@ -96,7 +96,7 @@ describe("Core/ComponentDatatype", function () {
typedArray = ComponentDatatype.createTypedArray(
ComponentDatatype.DOUBLE,
- 7,
+ 7
);
expect(typedArray).toBeInstanceOf(Float64Array);
expect(typedArray.length).toBe(7);
@@ -106,7 +106,7 @@ describe("Core/ComponentDatatype", function () {
const values = [34, 12, 4, 1];
let typedArray = ComponentDatatype.createTypedArray(
ComponentDatatype.BYTE,
- values,
+ values
);
expect(typedArray).toBeInstanceOf(Int8Array);
expect(typedArray).toEqual(values);
@@ -114,7 +114,7 @@ describe("Core/ComponentDatatype", function () {
typedArray = ComponentDatatype.createTypedArray(
ComponentDatatype.UNSIGNED_BYTE,
- values,
+ values
);
expect(typedArray).toBeInstanceOf(Uint8Array);
expect(typedArray).toEqual(values);
@@ -122,7 +122,7 @@ describe("Core/ComponentDatatype", function () {
typedArray = ComponentDatatype.createTypedArray(
ComponentDatatype.SHORT,
- values,
+ values
);
expect(typedArray).toBeInstanceOf(Int16Array);
expect(typedArray).toEqual(values);
@@ -130,7 +130,7 @@ describe("Core/ComponentDatatype", function () {
typedArray = ComponentDatatype.createTypedArray(
ComponentDatatype.UNSIGNED_SHORT,
- values,
+ values
);
expect(typedArray).toBeInstanceOf(Uint16Array);
expect(typedArray).toEqual(values);
@@ -138,7 +138,7 @@ describe("Core/ComponentDatatype", function () {
typedArray = ComponentDatatype.createTypedArray(
ComponentDatatype.INT,
- values,
+ values
);
expect(typedArray).toBeInstanceOf(Int32Array);
expect(typedArray).toEqual(values);
@@ -146,7 +146,7 @@ describe("Core/ComponentDatatype", function () {
typedArray = ComponentDatatype.createTypedArray(
ComponentDatatype.UNSIGNED_INT,
- values,
+ values
);
expect(typedArray).toBeInstanceOf(Uint32Array);
expect(typedArray).toEqual(values);
@@ -154,7 +154,7 @@ describe("Core/ComponentDatatype", function () {
typedArray = ComponentDatatype.createTypedArray(
ComponentDatatype.FLOAT,
- values,
+ values
);
expect(typedArray).toBeInstanceOf(Float32Array);
expect(typedArray).toEqual(values);
@@ -162,7 +162,7 @@ describe("Core/ComponentDatatype", function () {
typedArray = ComponentDatatype.createTypedArray(
ComponentDatatype.DOUBLE,
- values,
+ values
);
expect(typedArray).toBeInstanceOf(Float64Array);
expect(typedArray).toEqual(values);
@@ -176,64 +176,64 @@ describe("Core/ComponentDatatype", function () {
ComponentDatatype.BYTE,
buffer,
0,
- 1,
- ),
+ 1
+ )
).toBeInstanceOf(Int8Array);
expect(
ComponentDatatype.createArrayBufferView(
ComponentDatatype.UNSIGNED_BYTE,
buffer,
0,
- 1,
- ),
+ 1
+ )
).toBeInstanceOf(Uint8Array);
expect(
ComponentDatatype.createArrayBufferView(
ComponentDatatype.SHORT,
buffer,
0,
- 1,
- ),
+ 1
+ )
).toBeInstanceOf(Int16Array);
expect(
ComponentDatatype.createArrayBufferView(
ComponentDatatype.UNSIGNED_SHORT,
buffer,
0,
- 1,
- ),
+ 1
+ )
).toBeInstanceOf(Uint16Array);
expect(
ComponentDatatype.createArrayBufferView(
ComponentDatatype.INT,
buffer,
0,
- 1,
- ),
+ 1
+ )
).toBeInstanceOf(Int32Array);
expect(
ComponentDatatype.createArrayBufferView(
ComponentDatatype.UNSIGNED_INT,
buffer,
0,
- 1,
- ),
+ 1
+ )
).toBeInstanceOf(Uint32Array);
expect(
ComponentDatatype.createArrayBufferView(
ComponentDatatype.FLOAT,
buffer,
0,
- 1,
- ),
+ 1
+ )
).toBeInstanceOf(Float32Array);
expect(
ComponentDatatype.createArrayBufferView(
ComponentDatatype.DOUBLE,
buffer,
0,
- 1,
- ),
+ 1
+ )
).toBeInstanceOf(Float64Array);
});
@@ -269,7 +269,7 @@ describe("Core/ComponentDatatype", function () {
ComponentDatatype.BYTE,
undefined,
0,
- 1,
+ 1
);
}).toThrowDeveloperError();
});
@@ -277,23 +277,23 @@ describe("Core/ComponentDatatype", function () {
it("fromName works", function () {
expect(ComponentDatatype.fromName("BYTE")).toEqual(ComponentDatatype.BYTE);
expect(ComponentDatatype.fromName("UNSIGNED_BYTE")).toEqual(
- ComponentDatatype.UNSIGNED_BYTE,
+ ComponentDatatype.UNSIGNED_BYTE
);
expect(ComponentDatatype.fromName("SHORT")).toEqual(
- ComponentDatatype.SHORT,
+ ComponentDatatype.SHORT
);
expect(ComponentDatatype.fromName("UNSIGNED_SHORT")).toEqual(
- ComponentDatatype.UNSIGNED_SHORT,
+ ComponentDatatype.UNSIGNED_SHORT
);
expect(ComponentDatatype.fromName("INT")).toEqual(ComponentDatatype.INT);
expect(ComponentDatatype.fromName("UNSIGNED_INT")).toEqual(
- ComponentDatatype.UNSIGNED_INT,
+ ComponentDatatype.UNSIGNED_INT
);
expect(ComponentDatatype.fromName("FLOAT")).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(ComponentDatatype.fromName("DOUBLE")).toEqual(
- ComponentDatatype.DOUBLE,
+ ComponentDatatype.DOUBLE
);
});
diff --git a/packages/engine/Specs/Core/CoplanarPolygonGeometrySpec.js b/packages/engine/Specs/Core/CoplanarPolygonGeometrySpec.js
index 3ccf284c23c2..11e767ab5081 100644
--- a/packages/engine/Specs/Core/CoplanarPolygonGeometrySpec.js
+++ b/packages/engine/Specs/Core/CoplanarPolygonGeometrySpec.js
@@ -26,10 +26,20 @@ describe("Core/CoplanarPolygonGeometry", function () {
const geometry = CoplanarPolygonGeometry.createGeometry(
CoplanarPolygonGeometry.fromPositions({
positions: Cartesian3.fromDegreesArrayHeights([
- 49.0, 18.0, 1000.0, 49.0, 18.0, 5000.0, 49.0, 18.0, 5000.0, 49.0,
- 18.0, 1000.0,
+ 49.0,
+ 18.0,
+ 1000.0,
+ 49.0,
+ 18.0,
+ 5000.0,
+ 49.0,
+ 18.0,
+ 5000.0,
+ 49.0,
+ 18.0,
+ 1000.0,
]),
- }),
+ })
);
expect(geometry).toBeUndefined();
});
@@ -38,9 +48,17 @@ describe("Core/CoplanarPolygonGeometry", function () {
const geometry = CoplanarPolygonGeometry.createGeometry(
CoplanarPolygonGeometry.fromPositions({
positions: Cartesian3.fromDegreesArrayHeights([
- 0.0, 0.0, 1.0, 0.0, 0.0, 2.0, 0.0, 0.0, 3.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 2.0,
+ 0.0,
+ 0.0,
+ 3.0,
]),
- }),
+ })
);
expect(geometry).toBeUndefined();
});
@@ -51,14 +69,19 @@ describe("Core/CoplanarPolygonGeometry", function () {
holes: [
{
positions: Cartesian3.fromDegreesArray([
- 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
]),
},
],
};
const geometry = CoplanarPolygonGeometry.createGeometry(
- new CoplanarPolygonGeometry({ polygonHierarchy: hierarchy }),
+ new CoplanarPolygonGeometry({ polygonHierarchy: hierarchy })
);
expect(geometry).toBeUndefined();
});
@@ -68,9 +91,20 @@ describe("Core/CoplanarPolygonGeometry", function () {
CoplanarPolygonGeometry.fromPositions({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArrayHeights([
- -1.0, -1.0, 0.0, -1.0, 0.0, 1.0, -1.0, 1.0, 1.0, -1.0, 2.0, 0.0,
+ -1.0,
+ -1.0,
+ 0.0,
+ -1.0,
+ 0.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 2.0,
+ 0.0,
]),
- }),
+ })
);
expect(p.attributes.position.values.length).toEqual(4 * 3);
@@ -82,9 +116,20 @@ describe("Core/CoplanarPolygonGeometry", function () {
CoplanarPolygonGeometry.fromPositions({
vertexFormat: VertexFormat.ALL,
positions: Cartesian3.fromDegreesArrayHeights([
- -1.0, -1.0, 0.0, -1.0, 0.0, 1.0, -1.0, 1.0, 1.0, -1.0, 2.0, 0.0,
+ -1.0,
+ -1.0,
+ 0.0,
+ -1.0,
+ 0.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 2.0,
+ 0.0,
]),
- }),
+ })
);
const numVertices = 4;
@@ -102,9 +147,20 @@ describe("Core/CoplanarPolygonGeometry", function () {
CoplanarPolygonGeometry.fromPositions({
vertexFormat: VertexFormat.ALL,
positions: Cartesian3.fromDegreesArrayHeights([
- 90.0, -1.0, 0.0, 90.0, 1.0, 0.0, 92.0, 1.0, 0.0, 92.0, -1.0, 0.0,
+ 90.0,
+ -1.0,
+ 0.0,
+ 90.0,
+ 1.0,
+ 0.0,
+ 92.0,
+ 1.0,
+ 0.0,
+ 92.0,
+ -1.0,
+ 0.0,
]),
- }),
+ })
);
const center = Cartesian3.fromDegrees(91.0, 0.0);
@@ -118,13 +174,28 @@ describe("Core/CoplanarPolygonGeometry", function () {
// pack without explicit texture coordinates
const positions = Cartesian3.fromDegreesArray([
- -12.4, 3.5, -12.0, 3.5, -12.0, 4.0,
+ -12.4,
+ 3.5,
+ -12.0,
+ 3.5,
+ -12.0,
+ 4.0,
]);
const holePositions0 = Cartesian3.fromDegreesArray([
- -12.2, 3.5, -12.2, 3.6, -12.3, 3.6,
+ -12.2,
+ 3.5,
+ -12.2,
+ 3.6,
+ -12.3,
+ 3.6,
]);
const holePositions1 = Cartesian3.fromDegreesArray([
- -12.2, 3.5, -12.25, 3.5, -12.25, 3.55,
+ -12.2,
+ 3.5,
+ -12.25,
+ 3.5,
+ -12.25,
+ 3.55,
]);
const hierarchy = {
positions: positions,
@@ -167,7 +238,7 @@ describe("Core/CoplanarPolygonGeometry", function () {
packedInstance.push(
Ellipsoid.WGS84.radii.x,
Ellipsoid.WGS84.radii.y,
- Ellipsoid.WGS84.radii.z,
+ Ellipsoid.WGS84.radii.z
);
packedInstance.push(1, 0, 0, 0, 0, 0, 0, -1, 45);
createPackableSpecs(CoplanarPolygonGeometry, polygon, packedInstance);
@@ -204,7 +275,7 @@ describe("Core/CoplanarPolygonGeometry", function () {
packedInstanceTextured.push(
Ellipsoid.WGS84.radii.x,
Ellipsoid.WGS84.radii.y,
- Ellipsoid.WGS84.radii.z,
+ Ellipsoid.WGS84.radii.z
);
packedInstanceTextured.push(1, 0, 0, 0, 0, 0, 0);
packedInstanceTextured.push(9.0, 0.0);
@@ -213,6 +284,6 @@ describe("Core/CoplanarPolygonGeometry", function () {
createPackableSpecs(
CoplanarPolygonGeometry,
polygonTextured,
- packedInstanceTextured,
+ packedInstanceTextured
);
});
diff --git a/packages/engine/Specs/Core/CoplanarPolygonOutlineGeometrySpec.js b/packages/engine/Specs/Core/CoplanarPolygonOutlineGeometrySpec.js
index ee579d803f93..90c922124f6b 100644
--- a/packages/engine/Specs/Core/CoplanarPolygonOutlineGeometrySpec.js
+++ b/packages/engine/Specs/Core/CoplanarPolygonOutlineGeometrySpec.js
@@ -19,10 +19,20 @@ describe("Core/CoplanarPolygonOutlineGeometry", function () {
const geometry = CoplanarPolygonOutlineGeometry.createGeometry(
CoplanarPolygonOutlineGeometry.fromPositions({
positions: Cartesian3.fromDegreesArrayHeights([
- 49.0, 18.0, 1000.0, 49.0, 18.0, 5000.0, 49.0, 18.0, 5000.0, 49.0,
- 18.0, 1000.0,
+ 49.0,
+ 18.0,
+ 1000.0,
+ 49.0,
+ 18.0,
+ 5000.0,
+ 49.0,
+ 18.0,
+ 5000.0,
+ 49.0,
+ 18.0,
+ 1000.0,
]),
- }),
+ })
);
expect(geometry).toBeUndefined();
});
@@ -31,9 +41,17 @@ describe("Core/CoplanarPolygonOutlineGeometry", function () {
const geometry = CoplanarPolygonOutlineGeometry.createGeometry(
CoplanarPolygonOutlineGeometry.fromPositions({
positions: Cartesian3.fromDegreesArrayHeights([
- 0.0, 0.0, 1.0, 0.0, 0.0, 2.0, 0.0, 0.0, 3.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 2.0,
+ 0.0,
+ 0.0,
+ 3.0,
]),
- }),
+ })
);
expect(geometry).toBeUndefined();
});
@@ -44,14 +62,19 @@ describe("Core/CoplanarPolygonOutlineGeometry", function () {
holes: [
{
positions: Cartesian3.fromDegreesArray([
- 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
]),
},
],
};
const geometry = CoplanarPolygonOutlineGeometry.createGeometry(
- new CoplanarPolygonOutlineGeometry({ polygonHierarchy: hierarchy }),
+ new CoplanarPolygonOutlineGeometry({ polygonHierarchy: hierarchy })
);
expect(geometry).toBeUndefined();
});
@@ -60,9 +83,20 @@ describe("Core/CoplanarPolygonOutlineGeometry", function () {
const geometry = CoplanarPolygonOutlineGeometry.createGeometry(
CoplanarPolygonOutlineGeometry.fromPositions({
positions: Cartesian3.fromDegreesArrayHeights([
- -1.0, -1.0, 0.0, -1.0, 0.0, 1.0, -1.0, 1.0, 1.0, -1.0, 2.0, 0.0,
+ -1.0,
+ -1.0,
+ 0.0,
+ -1.0,
+ 0.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 2.0,
+ 0.0,
]),
- }),
+ })
);
expect(geometry.attributes.position.values.length).toEqual(4 * 3);
@@ -70,13 +104,28 @@ describe("Core/CoplanarPolygonOutlineGeometry", function () {
});
const positions = Cartesian3.fromDegreesArray([
- -124.0, 35.0, -110.0, 35.0, -110.0, 40.0,
+ -124.0,
+ 35.0,
+ -110.0,
+ 35.0,
+ -110.0,
+ 40.0,
]);
const holePositions0 = Cartesian3.fromDegreesArray([
- -122.0, 36.0, -122.0, 39.0, -112.0, 39.0,
+ -122.0,
+ 36.0,
+ -122.0,
+ 39.0,
+ -112.0,
+ 39.0,
]);
const holePositions1 = Cartesian3.fromDegreesArray([
- -120.0, 36.5, -114.0, 36.5, -114.0, 38.5,
+ -120.0,
+ 36.5,
+ -114.0,
+ 36.5,
+ -114.0,
+ 38.5,
]);
const hierarchy = {
positions: positions,
diff --git a/packages/engine/Specs/Core/CorridorGeometrySpec.js b/packages/engine/Specs/Core/CorridorGeometrySpec.js
index 26c91005b708..c8d4c6efd2d9 100644
--- a/packages/engine/Specs/Core/CorridorGeometrySpec.js
+++ b/packages/engine/Specs/Core/CorridorGeometrySpec.js
@@ -31,7 +31,7 @@ describe("Core/CorridorGeometry", function () {
new CorridorGeometry({
positions: Cartesian3.fromDegreesArray([90.0, -30.0, 90.0, -30.0]),
width: 10000,
- }),
+ })
);
expect(geometry).toBeUndefined();
@@ -41,16 +41,16 @@ describe("Core/CorridorGeometry", function () {
new Cartesian3(
-1349511.388149118,
-5063973.22857992,
- 3623141.6372688496,
+ 3623141.6372688496
), //same lon/lat, different height
new Cartesian3(
-1349046.4811926484,
-5062228.688739784,
- 3621885.0521561056,
+ 3621885.0521561056
),
],
width: 10000,
- }),
+ })
);
expect(geometry).toBeUndefined();
});
@@ -62,7 +62,7 @@ describe("Core/CorridorGeometry", function () {
positions: Cartesian3.fromDegreesArray([90.0, -30.0, 90.0, -35.0]),
cornerType: CornerType.MITERED,
width: 30000,
- }),
+ })
);
const numVertices = 12; //6 left + 6 right
@@ -78,7 +78,7 @@ describe("Core/CorridorGeometry", function () {
positions: Cartesian3.fromDegreesArray([90.0, -30.0, 90.0, -35.0]),
cornerType: CornerType.MITERED,
width: 30000,
- }),
+ })
);
const numVertices = 12;
@@ -99,7 +99,7 @@ describe("Core/CorridorGeometry", function () {
cornerType: CornerType.MITERED,
width: 30000,
extrudedHeight: 30000,
- }),
+ })
);
const numVertices = 72; // 6 positions x 4 for a box at each position x 3 to duplicate for normals
@@ -116,7 +116,7 @@ describe("Core/CorridorGeometry", function () {
cornerType: CornerType.MITERED,
width: 30000,
extrudedHeight: 30000,
- }),
+ })
);
const numVertices = 72;
@@ -137,7 +137,7 @@ describe("Core/CorridorGeometry", function () {
cornerType: CornerType.MITERED,
width: 30000,
offsetAttribute: GeometryOffsetAttribute.TOP,
- }),
+ })
);
const numVertices = 12;
@@ -158,7 +158,7 @@ describe("Core/CorridorGeometry", function () {
width: 30000,
extrudedHeight: 30000,
offsetAttribute: GeometryOffsetAttribute.TOP,
- }),
+ })
);
const numVertices = 72;
@@ -182,7 +182,7 @@ describe("Core/CorridorGeometry", function () {
width: 30000,
extrudedHeight: 30000,
offsetAttribute: GeometryOffsetAttribute.ALL,
- }),
+ })
);
const numVertices = 72;
@@ -199,11 +199,16 @@ describe("Core/CorridorGeometry", function () {
new CorridorGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- 90.0, -30.0, 90.0, -31.0, 91.0, -31.0,
+ 90.0,
+ -30.0,
+ 90.0,
+ -31.0,
+ 91.0,
+ -31.0,
]),
cornerType: CornerType.MITERED,
width: 30000,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(8 * 3); // 4 left + 4 right
@@ -215,11 +220,16 @@ describe("Core/CorridorGeometry", function () {
new CorridorGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- 90.0, -30.0, 90.0, -31.0, 89.0, -31.0,
+ 90.0,
+ -30.0,
+ 90.0,
+ -31.0,
+ 89.0,
+ -31.0,
]),
cornerType: CornerType.MITERED,
width: 30000,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(8 * 3);
@@ -231,11 +241,18 @@ describe("Core/CorridorGeometry", function () {
new CorridorGeometry({
vertexFormat: VertexFormat.POSITION_AND_ST,
positions: Cartesian3.fromDegreesArray([
- 90.0, -30.0, 90.0, -31.0, 89.0, -31.0, 89.0, -32.0,
+ 90.0,
+ -30.0,
+ 90.0,
+ -31.0,
+ 89.0,
+ -31.0,
+ 89.0,
+ -32.0,
]),
cornerType: CornerType.ROUNDED,
width: 30000,
- }),
+ })
);
const endCaps = 72; // 36 points * 2 end caps
@@ -252,11 +269,18 @@ describe("Core/CorridorGeometry", function () {
new CorridorGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- 90.0, -30.0, 90.0, -31.0, 89.0, -31.0, 89.0, -32.0,
+ 90.0,
+ -30.0,
+ 90.0,
+ -31.0,
+ 89.0,
+ -31.0,
+ 89.0,
+ -32.0,
]),
cornerType: CornerType.BEVELED,
width: 30000,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(10 * 3);
@@ -268,14 +292,20 @@ describe("Core/CorridorGeometry", function () {
new CorridorGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- 2.00571672577652, 52.7781459942399, 1.99188457974115,
- 52.7764958852886, 2.01325961458495, 52.7674170680511,
- 1.98708058340534, 52.7733979856253, 2.00634853946644,
+ 2.00571672577652,
+ 52.7781459942399,
+ 1.99188457974115,
+ 52.7764958852886,
+ 2.01325961458495,
+ 52.7674170680511,
+ 1.98708058340534,
+ 52.7733979856253,
+ 2.00634853946644,
52.7650460748473,
]),
cornerType: CornerType.BEVELED,
width: 100,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(13 * 3); // 3 points * 3 corners + 2 points * 2 ends
@@ -287,12 +317,17 @@ describe("Core/CorridorGeometry", function () {
new CorridorGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -67.655, 0.0, -67.655, 15.0, -67.655, 20.0,
+ -67.655,
+ 0.0,
+ -67.655,
+ 15.0,
+ -67.655,
+ 20.0,
]),
cornerType: CornerType.BEVELED,
width: 400000,
granularity: Math.PI / 6.0,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(4 * 3);
@@ -311,14 +346,24 @@ describe("Core/CorridorGeometry", function () {
const corridor1 = new CorridorGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -67.655, 0.0, -67.655, 15.0, -67.655, 20.0,
+ -67.655,
+ 0.0,
+ -67.655,
+ 15.0,
+ -67.655,
+ 20.0,
]),
width: 0,
});
const corridor2 = new CorridorGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -67.655, 0.0, -67.655, 15.0, -67.655, 20.0,
+ -67.655,
+ 0.0,
+ -67.655,
+ 15.0,
+ -67.655,
+ 20.0,
]),
width: -100,
});
@@ -330,14 +375,19 @@ describe("Core/CorridorGeometry", function () {
expect(geometry0).toBeUndefined();
expect(geometry1).toBeUndefined();
expect(geometry2).toBeUndefined();
- },
+ }
);
it("computing rectangle property", function () {
const c = new CorridorGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -67.655, 0.0, -67.655, 15.0, -67.655, 20.0,
+ -67.655,
+ 0.0,
+ -67.655,
+ 15.0,
+ -67.655,
+ 20.0,
]),
cornerType: CornerType.MITERED,
width: 1,
@@ -347,11 +397,11 @@ describe("Core/CorridorGeometry", function () {
const r = c.rectangle;
expect(CesiumMath.toDegrees(r.north)).toEqualEpsilon(
20.0,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
expect(CesiumMath.toDegrees(r.south)).toEqualEpsilon(
0.0,
- CesiumMath.EPSILON20,
+ CesiumMath.EPSILON20
);
expect(CesiumMath.toDegrees(r.east)).toEqual(-67.65499522658291);
expect(CesiumMath.toDegrees(r.west)).toEqual(-67.6550047734171);
@@ -361,7 +411,12 @@ describe("Core/CorridorGeometry", function () {
const options = {
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -67.655, 0.0, -67.655, 15.0, -67.655, 20.0,
+ -67.655,
+ 0.0,
+ -67.655,
+ 15.0,
+ -67.655,
+ 20.0,
]),
cornerType: CornerType.MITERED,
width: 1,
@@ -377,7 +432,12 @@ describe("Core/CorridorGeometry", function () {
it("computeRectangle with result parameter", function () {
const options = {
positions: Cartesian3.fromDegreesArray([
- 72.0, 0.0, 85.0, 15.0, 83.0, 20.0,
+ 72.0,
+ 0.0,
+ 85.0,
+ 15.0,
+ 83.0,
+ 20.0,
]),
width: 5,
};
@@ -395,7 +455,12 @@ describe("Core/CorridorGeometry", function () {
const c = new CorridorGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -67.655, 0.0, -67.655, 15.0, -67.655, 20.0,
+ -67.655,
+ 0.0,
+ -67.655,
+ 15.0,
+ -67.655,
+ 20.0,
]),
cornerType: CornerType.MITERED,
width: 1,
@@ -407,27 +472,27 @@ describe("Core/CorridorGeometry", function () {
expect(textureCoordinateRotationPoints.length).toEqual(6);
expect(textureCoordinateRotationPoints[0]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[1]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[2]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[3]).toEqualEpsilon(
1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[4]).toEqualEpsilon(
1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[5]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -452,7 +517,7 @@ describe("Core/CorridorGeometry", function () {
packedInstance.push(
Ellipsoid.WGS84.radii.x,
Ellipsoid.WGS84.radii.y,
- Ellipsoid.WGS84.radii.z,
+ Ellipsoid.WGS84.radii.z
);
packedInstance.push(1.0, 0.0, 0.0, 0.0, 0.0, 0.0);
packedInstance.push(30000.0, 0.0, 0.0, 2.0, 0.1, 0.0, -1);
diff --git a/packages/engine/Specs/Core/CorridorOutlineGeometrySpec.js b/packages/engine/Specs/Core/CorridorOutlineGeometrySpec.js
index 5d8e84dee9ce..53ea95769ecf 100644
--- a/packages/engine/Specs/Core/CorridorOutlineGeometrySpec.js
+++ b/packages/engine/Specs/Core/CorridorOutlineGeometrySpec.js
@@ -28,7 +28,7 @@ describe("Core/CorridorOutlineGeometry", function () {
new CorridorOutlineGeometry({
positions: Cartesian3.fromDegreesArray([90.0, -30.0, 90.0, -30.0]),
width: 10000,
- }),
+ })
);
expect(geometry).toBeUndefined();
@@ -38,16 +38,16 @@ describe("Core/CorridorOutlineGeometry", function () {
new Cartesian3(
-1349511.388149118,
-5063973.22857992,
- 3623141.6372688496,
+ 3623141.6372688496
), //same lon/lat, different height
new Cartesian3(
-1349046.4811926484,
-5062228.688739784,
- 3621885.0521561056,
+ 3621885.0521561056
),
],
width: 10000,
- }),
+ })
);
expect(geometry).toBeUndefined();
});
@@ -58,7 +58,7 @@ describe("Core/CorridorOutlineGeometry", function () {
positions: Cartesian3.fromDegreesArray([90.0, -30.0, 90.0, -35.0]),
cornerType: CornerType.MITERED,
width: 30000,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(12 * 3); // 6 left + 6 right
@@ -72,7 +72,7 @@ describe("Core/CorridorOutlineGeometry", function () {
cornerType: CornerType.MITERED,
width: 30000,
extrudedHeight: 30000,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(24 * 3); // 6 positions * 4 for a box at each position
@@ -86,7 +86,7 @@ describe("Core/CorridorOutlineGeometry", function () {
cornerType: CornerType.MITERED,
width: 30000,
offsetAttribute: GeometryOffsetAttribute.TOP,
- }),
+ })
);
const numVertices = 12;
@@ -106,7 +106,7 @@ describe("Core/CorridorOutlineGeometry", function () {
width: 30000,
extrudedHeight: 30000,
offsetAttribute: GeometryOffsetAttribute.TOP,
- }),
+ })
);
const numVertices = 24;
@@ -126,7 +126,7 @@ describe("Core/CorridorOutlineGeometry", function () {
width: 30000,
extrudedHeight: 30000,
offsetAttribute: GeometryOffsetAttribute.ALL,
- }),
+ })
);
const numVertices = 24;
@@ -142,11 +142,16 @@ describe("Core/CorridorOutlineGeometry", function () {
const m = CorridorOutlineGeometry.createGeometry(
new CorridorOutlineGeometry({
positions: Cartesian3.fromDegreesArray([
- 90.0, -30.0, 90.0, -31.0, 91.0, -31.0,
+ 90.0,
+ -30.0,
+ 90.0,
+ -31.0,
+ 91.0,
+ -31.0,
]),
cornerType: CornerType.MITERED,
width: 30000,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(8 * 3);
@@ -157,11 +162,16 @@ describe("Core/CorridorOutlineGeometry", function () {
const m = CorridorOutlineGeometry.createGeometry(
new CorridorOutlineGeometry({
positions: Cartesian3.fromDegreesArray([
- 90.0, -30.0, 90.0, -31.0, 89.0, -31.0,
+ 90.0,
+ -30.0,
+ 90.0,
+ -31.0,
+ 89.0,
+ -31.0,
]),
cornerType: CornerType.MITERED,
width: 30000,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(8 * 3);
@@ -172,11 +182,18 @@ describe("Core/CorridorOutlineGeometry", function () {
const m = CorridorOutlineGeometry.createGeometry(
new CorridorOutlineGeometry({
positions: Cartesian3.fromDegreesArray([
- 90.0, -30.0, 90.0, -31.0, 89.0, -31.0, 89.0, -32.0,
+ 90.0,
+ -30.0,
+ 90.0,
+ -31.0,
+ 89.0,
+ -31.0,
+ 89.0,
+ -32.0,
]),
cornerType: CornerType.ROUNDED,
width: 30000,
- }),
+ })
);
const endCaps = 72; // 36 points * 2 end caps
@@ -191,11 +208,18 @@ describe("Core/CorridorOutlineGeometry", function () {
const m = CorridorOutlineGeometry.createGeometry(
new CorridorOutlineGeometry({
positions: Cartesian3.fromDegreesArray([
- 90.0, -30.0, 90.0, -31.0, 89.0, -31.0, 89.0, -32.0,
+ 90.0,
+ -30.0,
+ 90.0,
+ -31.0,
+ 89.0,
+ -31.0,
+ 89.0,
+ -32.0,
]),
cornerType: CornerType.BEVELED,
width: 30000,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(10 * 3);
@@ -212,28 +236,41 @@ describe("Core/CorridorOutlineGeometry", function () {
});
const corridorOutline1 = new CorridorOutlineGeometry({
positions: Cartesian3.fromDegreesArray([
- -67.655, 0.0, -67.655, 15.0, -67.655, 20.0,
+ -67.655,
+ 0.0,
+ -67.655,
+ 15.0,
+ -67.655,
+ 20.0,
]),
width: 0,
});
const corridorOutline2 = new CorridorOutlineGeometry({
positions: Cartesian3.fromDegreesArray([
- -67.655, 0.0, -67.655, 15.0, -67.655, 20.0,
+ -67.655,
+ 0.0,
+ -67.655,
+ 15.0,
+ -67.655,
+ 20.0,
]),
width: -100,
});
- const geometry0 =
- CorridorOutlineGeometry.createGeometry(corridorOutline0);
- const geometry1 =
- CorridorOutlineGeometry.createGeometry(corridorOutline1);
- const geometry2 =
- CorridorOutlineGeometry.createGeometry(corridorOutline2);
+ const geometry0 = CorridorOutlineGeometry.createGeometry(
+ corridorOutline0
+ );
+ const geometry1 = CorridorOutlineGeometry.createGeometry(
+ corridorOutline1
+ );
+ const geometry2 = CorridorOutlineGeometry.createGeometry(
+ corridorOutline2
+ );
expect(geometry0).toBeUndefined();
expect(geometry1).toBeUndefined();
expect(geometry2).toBeUndefined();
- },
+ }
);
const positions = Cartesian3.fromDegreesArray([90.0, -30.0, 90.0, -31.0]);
@@ -255,7 +292,7 @@ describe("Core/CorridorOutlineGeometry", function () {
packedInstance.push(
Ellipsoid.WGS84.radii.x,
Ellipsoid.WGS84.radii.y,
- Ellipsoid.WGS84.radii.z,
+ Ellipsoid.WGS84.radii.z
);
packedInstance.push(30000.0, 0.0, 0.0, 2.0, 0.1, -1);
createPackableSpecs(CorridorOutlineGeometry, corridor, packedInstance);
diff --git a/packages/engine/Specs/Core/CullingVolumeSpec.js b/packages/engine/Specs/Core/CullingVolumeSpec.js
index e904e4d276a7..d991b148028c 100644
--- a/packages/engine/Specs/Core/CullingVolumeSpec.js
+++ b/packages/engine/Specs/Core/CullingVolumeSpec.js
@@ -19,7 +19,7 @@ describe("Core/CullingVolume", function () {
cullingVolume = frustum.computeCullingVolume(
new Cartesian3(),
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- Cartesian3.UNIT_Y,
+ Cartesian3.UNIT_Y
);
});
@@ -33,7 +33,7 @@ describe("Core/CullingVolume", function () {
expect(function () {
return new CullingVolume().computeVisibilityWithPlaneMask(
undefined,
- CullingVolume.MASK_INDETERMINATE,
+ CullingVolume.MASK_INDETERMINATE
);
}).toThrowDeveloperError();
});
@@ -42,7 +42,7 @@ describe("Core/CullingVolume", function () {
expect(function () {
return new CullingVolume().computeVisibilityWithPlaneMask(
new BoundingSphere(),
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
@@ -52,7 +52,7 @@ describe("Core/CullingVolume", function () {
const mask = culling.computeVisibilityWithPlaneMask(
bound,
- CullingVolume.MASK_INDETERMINATE,
+ CullingVolume.MASK_INDETERMINATE
);
if (intersect === Intersect.INSIDE) {
expect(mask).toEqual(CullingVolume.MASK_INSIDE);
@@ -87,7 +87,7 @@ describe("Core/CullingVolume", function () {
testWithAndWithoutPlaneMask(
cullingVolume,
box2,
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
});
@@ -101,7 +101,7 @@ describe("Core/CullingVolume", function () {
testWithAndWithoutPlaneMask(
cullingVolume,
box3,
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
});
@@ -115,7 +115,7 @@ describe("Core/CullingVolume", function () {
testWithAndWithoutPlaneMask(
cullingVolume,
box4,
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
});
@@ -129,7 +129,7 @@ describe("Core/CullingVolume", function () {
testWithAndWithoutPlaneMask(
cullingVolume,
box5,
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
});
@@ -143,7 +143,7 @@ describe("Core/CullingVolume", function () {
testWithAndWithoutPlaneMask(
cullingVolume,
box6,
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
});
@@ -157,7 +157,7 @@ describe("Core/CullingVolume", function () {
testWithAndWithoutPlaneMask(
cullingVolume,
box7,
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
});
});
@@ -243,7 +243,7 @@ describe("Core/CullingVolume", function () {
testWithAndWithoutPlaneMask(
cullingVolume,
sphere2,
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
});
@@ -255,7 +255,7 @@ describe("Core/CullingVolume", function () {
testWithAndWithoutPlaneMask(
cullingVolume,
sphere3,
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
});
@@ -267,7 +267,7 @@ describe("Core/CullingVolume", function () {
testWithAndWithoutPlaneMask(
cullingVolume,
sphere4,
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
});
@@ -279,7 +279,7 @@ describe("Core/CullingVolume", function () {
testWithAndWithoutPlaneMask(
cullingVolume,
sphere5,
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
});
@@ -291,7 +291,7 @@ describe("Core/CullingVolume", function () {
testWithAndWithoutPlaneMask(
cullingVolume,
sphere6,
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
});
@@ -303,7 +303,7 @@ describe("Core/CullingVolume", function () {
testWithAndWithoutPlaneMask(
cullingVolume,
sphere7,
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
});
});
@@ -362,10 +362,10 @@ describe("Core/CullingVolume", function () {
describe("construct from bounding sphere", function () {
const boundingSphereCullingVolume = new BoundingSphere(
new Cartesian3(1000.0, 2000.0, 3000.0),
- 100.0,
+ 100.0
);
const cullingVolume = CullingVolume.fromBoundingSphere(
- boundingSphereCullingVolume,
+ boundingSphereCullingVolume
);
it("throws without a boundingSphere", function () {
@@ -385,12 +385,12 @@ describe("Core/CullingVolume", function () {
const offset = new Cartesian3(
0.0,
0.0,
- boundingSphereCullingVolume.radius * 1.5,
+ boundingSphereCullingVolume.radius * 1.5
);
const center = Cartesian3.add(
boundingSphereCullingVolume.center,
offset,
- new Cartesian3(),
+ new Cartesian3()
);
const radius = boundingSphereCullingVolume.radius * 0.5;
const sphere2 = new BoundingSphere(center, radius);
@@ -398,7 +398,7 @@ describe("Core/CullingVolume", function () {
testWithAndWithoutPlaneMask(
cullingVolume,
sphere2,
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
});
@@ -406,12 +406,12 @@ describe("Core/CullingVolume", function () {
const offset = new Cartesian3(
0.0,
0.0,
- -boundingSphereCullingVolume.radius * 1.5,
+ -boundingSphereCullingVolume.radius * 1.5
);
const center = Cartesian3.add(
boundingSphereCullingVolume.center,
offset,
- new Cartesian3(),
+ new Cartesian3()
);
const radius = boundingSphereCullingVolume.radius * 0.5;
const sphere3 = new BoundingSphere(center, radius);
@@ -419,7 +419,7 @@ describe("Core/CullingVolume", function () {
testWithAndWithoutPlaneMask(
cullingVolume,
sphere3,
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
});
@@ -427,12 +427,12 @@ describe("Core/CullingVolume", function () {
const offset = new Cartesian3(
-boundingSphereCullingVolume.radius * 1.5,
0.0,
- 0.0,
+ 0.0
);
const center = Cartesian3.add(
boundingSphereCullingVolume.center,
offset,
- new Cartesian3(),
+ new Cartesian3()
);
const radius = boundingSphereCullingVolume.radius * 0.5;
const sphere4 = new BoundingSphere(center, radius);
@@ -440,7 +440,7 @@ describe("Core/CullingVolume", function () {
testWithAndWithoutPlaneMask(
cullingVolume,
sphere4,
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
});
@@ -448,12 +448,12 @@ describe("Core/CullingVolume", function () {
const offset = new Cartesian3(
boundingSphereCullingVolume.radius * 1.5,
0.0,
- 0.0,
+ 0.0
);
const center = Cartesian3.add(
boundingSphereCullingVolume.center,
offset,
- new Cartesian3(),
+ new Cartesian3()
);
const radius = boundingSphereCullingVolume.radius * 0.5;
const sphere5 = new BoundingSphere(center, radius);
@@ -461,7 +461,7 @@ describe("Core/CullingVolume", function () {
testWithAndWithoutPlaneMask(
cullingVolume,
sphere5,
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
});
@@ -469,12 +469,12 @@ describe("Core/CullingVolume", function () {
const offset = new Cartesian3(
0.0,
boundingSphereCullingVolume.radius * 1.5,
- 0.0,
+ 0.0
);
const center = Cartesian3.add(
boundingSphereCullingVolume.center,
offset,
- new Cartesian3(),
+ new Cartesian3()
);
const radius = boundingSphereCullingVolume.radius * 0.5;
const sphere6 = new BoundingSphere(center, radius);
@@ -482,7 +482,7 @@ describe("Core/CullingVolume", function () {
testWithAndWithoutPlaneMask(
cullingVolume,
sphere6,
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
});
@@ -490,12 +490,12 @@ describe("Core/CullingVolume", function () {
const offset = new Cartesian3(
0.0,
-boundingSphereCullingVolume.radius * 1.5,
- 0.0,
+ 0.0
);
const center = Cartesian3.add(
boundingSphereCullingVolume.center,
offset,
- new Cartesian3(),
+ new Cartesian3()
);
const radius = boundingSphereCullingVolume.radius * 0.5;
const sphere7 = new BoundingSphere(center, radius);
@@ -503,7 +503,7 @@ describe("Core/CullingVolume", function () {
testWithAndWithoutPlaneMask(
cullingVolume,
sphere7,
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
});
});
@@ -513,12 +513,12 @@ describe("Core/CullingVolume", function () {
const offset = new Cartesian3(
0.0,
0.0,
- boundingSphereCullingVolume.radius * 2.0,
+ boundingSphereCullingVolume.radius * 2.0
);
const center = Cartesian3.add(
boundingSphereCullingVolume.center,
offset,
- new Cartesian3(),
+ new Cartesian3()
);
const radius = boundingSphereCullingVolume.radius * 0.5;
const sphere8 = new BoundingSphere(center, radius);
@@ -530,12 +530,12 @@ describe("Core/CullingVolume", function () {
const offset = new Cartesian3(
0.0,
0.0,
- -boundingSphereCullingVolume.radius * 2.0,
+ -boundingSphereCullingVolume.radius * 2.0
);
const center = Cartesian3.add(
boundingSphereCullingVolume.center,
offset,
- new Cartesian3(),
+ new Cartesian3()
);
const radius = boundingSphereCullingVolume.radius * 0.5;
const sphere9 = new BoundingSphere(center, radius);
@@ -547,12 +547,12 @@ describe("Core/CullingVolume", function () {
const offset = new Cartesian3(
-boundingSphereCullingVolume.radius * 2.0,
0.0,
- 0.0,
+ 0.0
);
const center = Cartesian3.add(
boundingSphereCullingVolume.center,
offset,
- new Cartesian3(),
+ new Cartesian3()
);
const radius = boundingSphereCullingVolume.radius * 0.5;
const sphere10 = new BoundingSphere(center, radius);
@@ -564,12 +564,12 @@ describe("Core/CullingVolume", function () {
const offset = new Cartesian3(
boundingSphereCullingVolume.radius * 2.0,
0.0,
- 0.0,
+ 0.0
);
const center = Cartesian3.add(
boundingSphereCullingVolume.center,
offset,
- new Cartesian3(),
+ new Cartesian3()
);
const radius = boundingSphereCullingVolume.radius * 0.5;
const sphere11 = new BoundingSphere(center, radius);
@@ -581,12 +581,12 @@ describe("Core/CullingVolume", function () {
const offset = new Cartesian3(
0.0,
boundingSphereCullingVolume.radius * 2.0,
- 0.0,
+ 0.0
);
const center = Cartesian3.add(
boundingSphereCullingVolume.center,
offset,
- new Cartesian3(),
+ new Cartesian3()
);
const radius = boundingSphereCullingVolume.radius * 0.5;
const sphere12 = new BoundingSphere(center, radius);
@@ -598,12 +598,12 @@ describe("Core/CullingVolume", function () {
const offset = new Cartesian3(
0.0,
-boundingSphereCullingVolume.radius * 2.0,
- 0.0,
+ 0.0
);
const center = Cartesian3.add(
boundingSphereCullingVolume.center,
offset,
- new Cartesian3(),
+ new Cartesian3()
);
const radius = boundingSphereCullingVolume.radius * 0.5;
const sphere13 = new BoundingSphere(center, radius);
diff --git a/packages/engine/Specs/Core/CustomHeightmapTerrainProviderSpec.js b/packages/engine/Specs/Core/CustomHeightmapTerrainProviderSpec.js
index 012574abf77c..226cad01729b 100644
--- a/packages/engine/Specs/Core/CustomHeightmapTerrainProviderSpec.js
+++ b/packages/engine/Specs/Core/CustomHeightmapTerrainProviderSpec.js
@@ -7,7 +7,7 @@ import {
describe("Core/CustomHeightmapTerrainProvider", function () {
it("conforms to TerrainProvider interface", function () {
expect(CustomHeightmapTerrainProvider).toConformToInterface(
- TerrainProvider,
+ TerrainProvider
);
});
@@ -117,12 +117,11 @@ describe("Core/CustomHeightmapTerrainProvider", function () {
height: height,
});
- const geometricError =
- TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap(
- provider.tilingScheme.ellipsoid,
- Math.max(provider.width, provider.height),
- provider.tilingScheme.getNumberOfXTilesAtLevel(0),
- );
+ const geometricError = TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap(
+ provider.tilingScheme.ellipsoid,
+ Math.max(provider.width, provider.height),
+ provider.tilingScheme.getNumberOfXTilesAtLevel(0)
+ );
expect(provider.getLevelMaximumGeometricError(0)).toBe(geometricError);
});
diff --git a/packages/engine/Specs/Core/CylinderGeometrySpec.js b/packages/engine/Specs/Core/CylinderGeometrySpec.js
index 137b7a43faa2..2b00afbfe928 100644
--- a/packages/engine/Specs/Core/CylinderGeometrySpec.js
+++ b/packages/engine/Specs/Core/CylinderGeometrySpec.js
@@ -49,7 +49,7 @@ describe("Core/CylinderGeometry", function () {
topRadius: 1,
bottomRadius: 1,
slices: 3,
- }),
+ })
);
const numVertices = 12; // (3 top + 3 bottom) * 2 to duplicate for sides
@@ -67,7 +67,7 @@ describe("Core/CylinderGeometry", function () {
bottomRadius: 1,
slices: 3,
offsetAttribute: GeometryOffsetAttribute.ALL,
- }),
+ })
);
const numVertices = 12;
@@ -87,7 +87,7 @@ describe("Core/CylinderGeometry", function () {
topRadius: 1,
bottomRadius: 1,
slices: 3,
- }),
+ })
);
const numVertices = 12;
@@ -108,7 +108,7 @@ describe("Core/CylinderGeometry", function () {
topRadius: 0,
bottomRadius: 1,
slices: 3,
- }),
+ })
);
const numVertices = 12; //(3 top 3 bottom) duplicated
@@ -125,7 +125,7 @@ describe("Core/CylinderGeometry", function () {
topRadius: 1,
bottomRadius: 0,
slices: 3,
- }),
+ })
);
const numVertices = 12; //(3 top 3 bottom) duplicated
@@ -175,7 +175,7 @@ describe("Core/CylinderGeometry", function () {
expect(geometry2).toBeUndefined();
expect(geometry3).toBeUndefined();
expect(geometry4).toBeUndefined();
- },
+ }
);
const cylinder = new CylinderGeometry({
@@ -186,7 +186,17 @@ describe("Core/CylinderGeometry", function () {
slices: 3,
});
const packedInstance = [
- 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 3.0, -1.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 0.0,
+ 3.0,
+ -1.0,
];
createPackableSpecs(CylinderGeometry, cylinder, packedInstance);
});
diff --git a/packages/engine/Specs/Core/CylinderOutlineGeometrySpec.js b/packages/engine/Specs/Core/CylinderOutlineGeometrySpec.js
index 55bb1c388bc3..1868d8cf7135 100644
--- a/packages/engine/Specs/Core/CylinderOutlineGeometrySpec.js
+++ b/packages/engine/Specs/Core/CylinderOutlineGeometrySpec.js
@@ -47,7 +47,7 @@ describe("Core/CylinderOutlineGeometry", function () {
topRadius: 1,
bottomRadius: 1,
slices: 3,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(6 * 3); // 3 top + 3 bottom
@@ -62,7 +62,7 @@ describe("Core/CylinderOutlineGeometry", function () {
bottomRadius: 1,
slices: 3,
offsetAttribute: GeometryOffsetAttribute.ALL,
- }),
+ })
);
const numVertices = 6;
@@ -82,7 +82,7 @@ describe("Core/CylinderOutlineGeometry", function () {
bottomRadius: 1,
slices: 3,
numberOfVerticalLines: 0,
- }),
+ })
);
const numVertices = 6; //3 top 3 bottom
@@ -121,23 +121,28 @@ describe("Core/CylinderOutlineGeometry", function () {
bottomRadius: -100,
});
- const geometry0 =
- CylinderOutlineGeometry.createGeometry(cylinderOutline0);
- const geometry1 =
- CylinderOutlineGeometry.createGeometry(cylinderOutline1);
- const geometry2 =
- CylinderOutlineGeometry.createGeometry(cylinderOutline2);
- const geometry3 =
- CylinderOutlineGeometry.createGeometry(cylinderOutline3);
- const geometry4 =
- CylinderOutlineGeometry.createGeometry(cylinderOutline4);
+ const geometry0 = CylinderOutlineGeometry.createGeometry(
+ cylinderOutline0
+ );
+ const geometry1 = CylinderOutlineGeometry.createGeometry(
+ cylinderOutline1
+ );
+ const geometry2 = CylinderOutlineGeometry.createGeometry(
+ cylinderOutline2
+ );
+ const geometry3 = CylinderOutlineGeometry.createGeometry(
+ cylinderOutline3
+ );
+ const geometry4 = CylinderOutlineGeometry.createGeometry(
+ cylinderOutline4
+ );
expect(geometry0).toBeUndefined();
expect(geometry1).toBeUndefined();
expect(geometry2).toBeUndefined();
expect(geometry3).toBeUndefined();
expect(geometry4).toBeUndefined();
- },
+ }
);
const cylinder = new CylinderOutlineGeometry({
diff --git a/packages/engine/Specs/Core/DistanceDisplayConditionGeometryInstanceAttributeSpec.js b/packages/engine/Specs/Core/DistanceDisplayConditionGeometryInstanceAttributeSpec.js
index fe9db086a205..2a815fde929a 100644
--- a/packages/engine/Specs/Core/DistanceDisplayConditionGeometryInstanceAttributeSpec.js
+++ b/packages/engine/Specs/Core/DistanceDisplayConditionGeometryInstanceAttributeSpec.js
@@ -8,7 +8,7 @@ describe("Core/DistanceDisplayConditionGeometryInstanceAttribute", function () {
it("constructor", function () {
const attribute = new DistanceDisplayConditionGeometryInstanceAttribute(
10.0,
- 100.0,
+ 100.0
);
expect(attribute.componentDatatype).toEqual(ComponentDatatype.FLOAT);
expect(attribute.componentsPerAttribute).toEqual(2);
@@ -26,10 +26,9 @@ describe("Core/DistanceDisplayConditionGeometryInstanceAttribute", function () {
it("fromDistanceDisplayCondition", function () {
const dc = new DistanceDisplayCondition(10.0, 100.0);
- const attribute =
- DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(
- dc,
- );
+ const attribute = DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(
+ dc
+ );
expect(attribute.componentDatatype).toEqual(ComponentDatatype.FLOAT);
expect(attribute.componentsPerAttribute).toEqual(2);
expect(attribute.normalize).toEqual(false);
@@ -47,7 +46,7 @@ describe("Core/DistanceDisplayConditionGeometryInstanceAttribute", function () {
it("fromDistanceDisplayCondition throws with far >= near", function () {
expect(function () {
DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(
- new DistanceDisplayCondition(100.0, 10.0),
+ new DistanceDisplayCondition(100.0, 10.0)
);
}).toThrowDeveloperError();
});
@@ -56,7 +55,7 @@ describe("Core/DistanceDisplayConditionGeometryInstanceAttribute", function () {
const dc = new DistanceDisplayCondition(10.0, 200.0);
const expectedResult = new Float32Array([dc.near, dc.far]);
expect(
- DistanceDisplayConditionGeometryInstanceAttribute.toValue(dc),
+ DistanceDisplayConditionGeometryInstanceAttribute.toValue(dc)
).toEqual(expectedResult);
});
@@ -64,8 +63,10 @@ describe("Core/DistanceDisplayConditionGeometryInstanceAttribute", function () {
const dc = new DistanceDisplayCondition(10.0, 200.0);
const expectedResult = new Float32Array([dc.near, dc.far]);
const result = new Float32Array(2);
- const returnedResult =
- DistanceDisplayConditionGeometryInstanceAttribute.toValue(dc, result);
+ const returnedResult = DistanceDisplayConditionGeometryInstanceAttribute.toValue(
+ dc,
+ result
+ );
expect(returnedResult).toBe(result);
expect(returnedResult).toEqual(expectedResult);
});
diff --git a/packages/engine/Specs/Core/DistanceDisplayConditionSpec.js b/packages/engine/Specs/Core/DistanceDisplayConditionSpec.js
index 2eebd13e1b21..c726947622c6 100644
--- a/packages/engine/Specs/Core/DistanceDisplayConditionSpec.js
+++ b/packages/engine/Specs/Core/DistanceDisplayConditionSpec.js
@@ -33,20 +33,20 @@ describe("Core/DistanceDisplayCondition", function () {
expect(
DistanceDisplayCondition.equals(
dc,
- new DistanceDisplayCondition(10.0, 100.0),
- ),
+ new DistanceDisplayCondition(10.0, 100.0)
+ )
).toEqual(true);
expect(
DistanceDisplayCondition.equals(
dc,
- new DistanceDisplayCondition(11.0, 100.0),
- ),
+ new DistanceDisplayCondition(11.0, 100.0)
+ )
).toEqual(false);
expect(
DistanceDisplayCondition.equals(
dc,
- new DistanceDisplayCondition(10.0, 101.0),
- ),
+ new DistanceDisplayCondition(10.0, 101.0)
+ )
).toEqual(false);
expect(DistanceDisplayCondition.equals(dc, undefined)).toEqual(false);
});
@@ -104,6 +104,6 @@ describe("Core/DistanceDisplayCondition", function () {
createPackableSpecs(
DistanceDisplayCondition,
new DistanceDisplayCondition(1, 2),
- [1, 2],
+ [1, 2]
);
});
diff --git a/packages/engine/Specs/Core/EarthOrientationParametersSpec.js b/packages/engine/Specs/Core/EarthOrientationParametersSpec.js
index c93568689067..23e41e19ee2e 100644
--- a/packages/engine/Specs/Core/EarthOrientationParametersSpec.js
+++ b/packages/engine/Specs/Core/EarthOrientationParametersSpec.js
@@ -88,7 +88,7 @@ describe("Core/EarthOrientationParameters", function () {
if (defined(previousDate)) {
expect(
- JulianDate.compare(previousDate, leapSecond.julianDate),
+ JulianDate.compare(previousDate, leapSecond.julianDate)
).toBeLessThan(0);
}
@@ -229,7 +229,7 @@ describe("Core/EarthOrientationParameters", function () {
const dt =
JulianDate.secondsDifference(
date,
- JulianDate.fromIso8601(eopDescription.data.samples[nColumns]),
+ JulianDate.fromIso8601(eopDescription.data.samples[nColumns])
) / 86400.0;
let expected = linearInterp(dt, x0, x1);
expect(result.xPoleWander).toEqualEpsilon(expected, 1e-22);
@@ -320,12 +320,12 @@ describe("Core/EarthOrientationParameters", function () {
const dateSlightlyBefore = JulianDate.addSeconds(
dateAtLeapSecond,
-1.0,
- new JulianDate(),
+ new JulianDate()
);
const dateSlightlyAfter = JulianDate.addSeconds(
dateAtLeapSecond,
1.0,
- new JulianDate(),
+ new JulianDate()
);
const nColumns = eopDescription.data.columnNames.length;
const x0 = eopDescription.data.samples[1 * nColumns + 6];
@@ -333,7 +333,7 @@ describe("Core/EarthOrientationParameters", function () {
const x2 = eopDescription.data.samples[3 * nColumns + 6];
const t0 = JulianDate.fromIso8601(eopDescription.data.samples[nColumns]);
const t1 = JulianDate.fromIso8601(
- eopDescription.data.samples[2 * nColumns],
+ eopDescription.data.samples[2 * nColumns]
);
let dt =
JulianDate.secondsDifference(dateSlightlyBefore, t0) / (86400.0 + 1);
@@ -350,14 +350,14 @@ describe("Core/EarthOrientationParameters", function () {
expect(resultAfter.ut1MinusUtc).toEqualEpsilon(expectedAfter, 1.0e-15);
// Check to make sure the values are (correctly) discontinuous
expect(
- Math.abs(resultBefore.ut1MinusUtc - resultAfter.ut1MinusUtc) > 0.5,
+ Math.abs(resultBefore.ut1MinusUtc - resultAfter.ut1MinusUtc) > 0.5
).toEqual(true);
});
});
it("fromUrl loads EOP data", async function () {
const eop = await EarthOrientationParameters.fromUrl(
- "Data/EarthOrientationParameters/EOP-2011-July.json",
+ "Data/EarthOrientationParameters/EOP-2011-July.json"
);
expect(eop).toBeInstanceOf(EarthOrientationParameters);
@@ -374,22 +374,22 @@ describe("Core/EarthOrientationParameters", function () {
it("fromUrl throws a RuntimeError when loading invalid EOP data", async function () {
await expectAsync(
EarthOrientationParameters.fromUrl(
- "Data/EarthOrientationParameters/EOP-Invalid.json",
- ),
+ "Data/EarthOrientationParameters/EOP-Invalid.json"
+ )
).toBeRejectedWithError(
RuntimeError,
- "Error in loaded EOP data: The columnNames property is required.",
+ "Error in loaded EOP data: The columnNames property is required."
);
});
it("fromUrl throws a RuntimeError when using a missing EOP data file", async function () {
await expectAsync(
EarthOrientationParameters.fromUrl(
- "Data/EarthOrientationParameters/EOP-DoesNotExist.json",
- ),
+ "Data/EarthOrientationParameters/EOP-DoesNotExist.json"
+ )
).toBeRejectedWithError(
RuntimeError,
- "An error occurred while retrieving the EOP data from the URL Data/EarthOrientationParameters/EOP-DoesNotExist.json.",
+ "An error occurred while retrieving the EOP data from the URL Data/EarthOrientationParameters/EOP-DoesNotExist.json."
);
});
});
diff --git a/packages/engine/Specs/Core/EllipseGeometrySpec.js b/packages/engine/Specs/Core/EllipseGeometrySpec.js
index 838f1aaa1fc1..06a1463fb84b 100644
--- a/packages/engine/Specs/Core/EllipseGeometrySpec.js
+++ b/packages/engine/Specs/Core/EllipseGeometrySpec.js
@@ -68,7 +68,7 @@ describe("Core/EllipseGeometry", function () {
granularity: 0.1,
semiMajorAxis: 1.0,
semiMinorAxis: 1.0,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(16 * 3); // rows of 1 + 4 + 6 + 4 + 1
@@ -85,7 +85,7 @@ describe("Core/EllipseGeometry", function () {
granularity: 0.1,
semiMajorAxis: 1.0,
semiMinorAxis: 1.0,
- }),
+ })
);
const numVertices = 16;
@@ -108,7 +108,7 @@ describe("Core/EllipseGeometry", function () {
semiMajorAxis: 1.0,
semiMinorAxis: 1.0,
stRotation: CesiumMath.PI_OVER_TWO,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -135,7 +135,7 @@ describe("Core/EllipseGeometry", function () {
semiMajorAxis: 1.0,
semiMinorAxis: 1.0,
extrudedHeight: 50000,
- }),
+ })
);
const numVertices = 48; // 16 top + 16 bottom + 8 top edge + 8 bottom edge
@@ -154,7 +154,7 @@ describe("Core/EllipseGeometry", function () {
semiMajorAxis: 1.0,
semiMinorAxis: 1.0,
offsetAttribute: GeometryOffsetAttribute.TOP,
- }),
+ })
);
const numVertices = 16;
@@ -177,7 +177,7 @@ describe("Core/EllipseGeometry", function () {
semiMinorAxis: 1.0,
extrudedHeight: 50000,
offsetAttribute: GeometryOffsetAttribute.TOP,
- }),
+ })
);
const numVertices = 48;
@@ -203,7 +203,7 @@ describe("Core/EllipseGeometry", function () {
semiMinorAxis: 1.0,
extrudedHeight: 50000,
offsetAttribute: GeometryOffsetAttribute.ALL,
- }),
+ })
);
const numVertices = 48;
@@ -225,7 +225,7 @@ describe("Core/EllipseGeometry", function () {
semiMajorAxis: 1.0,
semiMinorAxis: 1.0,
extrudedHeight: 50000,
- }),
+ })
);
const numVertices = 48;
@@ -296,7 +296,7 @@ describe("Core/EllipseGeometry", function () {
const sv = EllipseGeometry.createShadowVolume(
m,
minHeightFunc,
- maxHeightFunc,
+ maxHeightFunc
);
expect(sv._center.equals(m._center)).toBe(true);
@@ -310,7 +310,7 @@ describe("Core/EllipseGeometry", function () {
expect(sv._height).toBe(maxHeightFunc());
expect(sv._vertexFormat.bitangent).toBe(
- VertexFormat.POSITION_ONLY.bitangent,
+ VertexFormat.POSITION_ONLY.bitangent
);
expect(sv._vertexFormat.color).toBe(VertexFormat.POSITION_ONLY.color);
expect(sv._vertexFormat.normal).toBe(VertexFormat.POSITION_ONLY.normal);
@@ -344,7 +344,7 @@ describe("Core/EllipseGeometry", function () {
r = ellipse.rectangle;
expect(r.north).toEqualEpsilon(
CesiumMath.PI_OVER_TWO - CesiumMath.EPSILON7,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(r.south).toEqualEpsilon(1.570483806950967, CesiumMath.EPSILON7);
expect(r.east).toEqualEpsilon(CesiumMath.PI, CesiumMath.EPSILON7);
@@ -399,27 +399,27 @@ describe("Core/EllipseGeometry", function () {
expect(textureCoordinateRotationPoints.length).toEqual(6);
expect(textureCoordinateRotationPoints[0]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[1]).toEqualEpsilon(
1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[2]).toEqualEpsilon(
1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[3]).toEqualEpsilon(
1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[4]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[5]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
ellipse = new EllipseGeometry({
@@ -433,27 +433,27 @@ describe("Core/EllipseGeometry", function () {
expect(textureCoordinateRotationPoints.length).toEqual(6);
expect(textureCoordinateRotationPoints[0]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[1]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[2]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[3]).toEqualEpsilon(
1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[4]).toEqualEpsilon(
1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[5]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
diff --git a/packages/engine/Specs/Core/EllipseOutlineGeometrySpec.js b/packages/engine/Specs/Core/EllipseOutlineGeometrySpec.js
index c4be63eb0d56..8e4618e9fbee 100644
--- a/packages/engine/Specs/Core/EllipseOutlineGeometrySpec.js
+++ b/packages/engine/Specs/Core/EllipseOutlineGeometrySpec.js
@@ -64,7 +64,7 @@ describe("Core/EllipseOutlineGeometry", function () {
granularity: 0.1,
semiMajorAxis: 1.0,
semiMinorAxis: 1.0,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(8 * 3);
@@ -81,7 +81,7 @@ describe("Core/EllipseOutlineGeometry", function () {
semiMajorAxis: 1.0,
semiMinorAxis: 1.0,
extrudedHeight: 5.0,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(16 * 3); // 8 top + 8 bottom
@@ -97,7 +97,7 @@ describe("Core/EllipseOutlineGeometry", function () {
semiMajorAxis: 1.0,
semiMinorAxis: 1.0,
offsetAttribute: GeometryOffsetAttribute.TOP,
- }),
+ })
);
const numVertices = 8;
@@ -119,7 +119,7 @@ describe("Core/EllipseOutlineGeometry", function () {
semiMinorAxis: 1.0,
extrudedHeight: 5.0,
offsetAttribute: GeometryOffsetAttribute.TOP,
- }),
+ })
);
const numVertices = 16;
@@ -141,7 +141,7 @@ describe("Core/EllipseOutlineGeometry", function () {
semiMinorAxis: 1.0,
extrudedHeight: 5.0,
offsetAttribute: GeometryOffsetAttribute.ALL,
- }),
+ })
);
const numVertices = 16;
@@ -163,7 +163,7 @@ describe("Core/EllipseOutlineGeometry", function () {
semiMinorAxis: 1.0,
extrudedHeight: 5.0,
numberOfVerticalLines: 0,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(16 * 3);
@@ -236,7 +236,7 @@ describe("Core/EllipseOutlineGeometry", function () {
EllipseOutlineGeometry,
packableInstance,
packedInstance,
- "extruded",
+ "extruded"
);
//Because extrudedHeight is optional and has to be taken into account when packing, we have a second test without it.
@@ -270,6 +270,6 @@ describe("Core/EllipseOutlineGeometry", function () {
EllipseOutlineGeometry,
packableInstance,
packedInstance,
- "at height",
+ "at height"
);
});
diff --git a/packages/engine/Specs/Core/EllipsoidGeodesicSpec.js b/packages/engine/Specs/Core/EllipsoidGeodesicSpec.js
index 20b9b4572831..3b7c1edb274f 100644
--- a/packages/engine/Specs/Core/EllipsoidGeodesicSpec.js
+++ b/packages/engine/Specs/Core/EllipsoidGeodesicSpec.js
@@ -24,7 +24,7 @@ describe("Core/EllipsoidGeodesic", function () {
expect(function () {
const elGeo = new EllipsoidGeodesic(
new Cartographic(Math.PI, Math.PI),
- new Cartographic(0, Math.PI),
+ new Cartographic(0, Math.PI)
);
return elGeo.interpolateUsingSurfaceDistance(0);
}).toThrowDeveloperError();
@@ -82,7 +82,7 @@ describe("Core/EllipsoidGeodesic", function () {
const start = new Cartographic(CesiumMath.PI_OVER_TWO, 0);
const end = new Cartographic(
CesiumMath.PI_OVER_TWO,
- CesiumMath.PI_OVER_TWO,
+ CesiumMath.PI_OVER_TWO
);
const geodesic = new EllipsoidGeodesic();
geodesic.setEndPoints(start, end);
@@ -98,7 +98,7 @@ describe("Core/EllipsoidGeodesic", function () {
const geodesic = new EllipsoidGeodesic(start, end, ellipsoid);
expect(CesiumMath.PI_OVER_TWO).toEqualEpsilon(
geodesic.startHeading,
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
});
@@ -110,7 +110,7 @@ describe("Core/EllipsoidGeodesic", function () {
const geodesic = new EllipsoidGeodesic(start, end, ellipsoid);
expect(CesiumMath.PI_OVER_TWO).toEqualEpsilon(
geodesic.endHeading,
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
});
@@ -122,7 +122,7 @@ describe("Core/EllipsoidGeodesic", function () {
const geodesic = new EllipsoidGeodesic(start, end, ellipsoid);
expect(CesiumMath.PI_OVER_TWO * 6).toEqualEpsilon(
geodesic.surfaceDistance,
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
});
@@ -150,7 +150,7 @@ describe("Core/EllipsoidGeodesic", function () {
const thirtyDegrees = Math.PI / 6;
expect(thirtyDegrees * 6).toEqualEpsilon(
geodesic.surfaceDistance,
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
});
@@ -165,7 +165,7 @@ describe("Core/EllipsoidGeodesic", function () {
const sixtyDegrees = Math.PI / 3;
expect(sixtyDegrees * 6).toEqualEpsilon(
geodesic.surfaceDistance,
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
});
@@ -183,7 +183,7 @@ describe("Core/EllipsoidGeodesic", function () {
expect(start.longitude).toEqualEpsilon(
first.longitude,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
expect(start.latitude).toEqualEpsilon(first.latitude, CesiumMath.EPSILON13);
expect(end.longitude).toEqualEpsilon(last.longitude, CesiumMath.EPSILON13);
@@ -205,11 +205,11 @@ describe("Core/EllipsoidGeodesic", function () {
expect(expectedMid.longitude).toEqualEpsilon(
midpoint.longitude,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
expect(expectedMid.latitude).toEqualEpsilon(
midpoint.latitude,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
});
@@ -226,7 +226,7 @@ describe("Core/EllipsoidGeodesic", function () {
expect(start.longitude).toEqualEpsilon(
first.longitude,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
expect(start.latitude).toEqualEpsilon(first.latitude, CesiumMath.EPSILON13);
expect(end.longitude).toEqualEpsilon(last.longitude, CesiumMath.EPSILON13);
@@ -247,11 +247,11 @@ describe("Core/EllipsoidGeodesic", function () {
expect(expectedMid.longitude).toEqualEpsilon(
midpoint.longitude,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(expectedMid.latitude).toEqualEpsilon(
midpoint.latitude,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -270,11 +270,11 @@ describe("Core/EllipsoidGeodesic", function () {
expect(expectedMid.longitude).toEqualEpsilon(
result.longitude,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(expectedMid.latitude).toEqualEpsilon(
result.latitude,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -296,11 +296,11 @@ describe("Core/EllipsoidGeodesic", function () {
expect(expectedMid.longitude).toEqualEpsilon(
result.longitude,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
expect(expectedMid.latitude).toEqualEpsilon(
result.latitude,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
});
});
diff --git a/packages/engine/Specs/Core/EllipsoidGeometrySpec.js b/packages/engine/Specs/Core/EllipsoidGeometrySpec.js
index 8165e22fa2be..7800e7afbba2 100644
--- a/packages/engine/Specs/Core/EllipsoidGeometrySpec.js
+++ b/packages/engine/Specs/Core/EllipsoidGeometrySpec.js
@@ -47,7 +47,7 @@ describe("Core/EllipsoidGeometry", function () {
vertexFormat: VertexFormat.POSITION_ONLY,
slicePartitions: 3,
stackPartitions: 3,
- }),
+ })
);
// The vertices are 6x6 because an additional slice and stack are added
@@ -66,7 +66,7 @@ describe("Core/EllipsoidGeometry", function () {
slicePartitions: 3,
stackPartitions: 3,
offsetAttribute: GeometryOffsetAttribute.ALL,
- }),
+ })
);
const numVertices = 36;
@@ -84,7 +84,7 @@ describe("Core/EllipsoidGeometry", function () {
vertexFormat: VertexFormat.ALL,
slicePartitions: 3,
stackPartitions: 3,
- }),
+ })
);
const numVertices = 36;
@@ -103,7 +103,7 @@ describe("Core/EllipsoidGeometry", function () {
vertexFormat: VertexFormat.ALL,
slicePartitions: 3,
stackPartitions: 3,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -119,16 +119,16 @@ describe("Core/EllipsoidGeometry", function () {
expect(Cartesian3.magnitude(position)).toEqualEpsilon(
1.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(normal).toEqualEpsilon(
Cartesian3.normalize(position, new Cartesian3()),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(Cartesian3.dot(Cartesian3.UNIT_Z, tangent)).not.toBeLessThan(0.0);
expect(bitangent).toEqualEpsilon(
Cartesian3.cross(normal, tangent, new Cartesian3()),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
}
});
@@ -140,7 +140,7 @@ describe("Core/EllipsoidGeometry", function () {
slicePartitions: 3,
stackPartitions: 3,
innerRadii: new Cartesian3(0.5, 0.5, 0.5),
- }),
+ })
);
const numVertices = 72; // 6 rows * 6 positions * 2 surfaces
@@ -159,7 +159,7 @@ describe("Core/EllipsoidGeometry", function () {
innerRadii: new Cartesian3(0.5, 0.5, 0.5),
minimumClock: CesiumMath.toRadians(90.0),
maximumClock: CesiumMath.toRadians(270.0),
- }),
+ })
);
const numVertices = 70;
@@ -179,7 +179,7 @@ describe("Core/EllipsoidGeometry", function () {
minimumClock: CesiumMath.toRadians(90.0),
maximumClock: CesiumMath.toRadians(270.0),
minimumCone: CesiumMath.toRadians(30.0),
- }),
+ })
);
const numVertices = 60;
@@ -212,7 +212,7 @@ describe("Core/EllipsoidGeometry", function () {
innerRadii: new Cartesian3(0.5, 0.5, 0.5),
minimumCone: CesiumMath.toRadians(60.0),
maximumCone: CesiumMath.toRadians(140.0),
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -248,7 +248,7 @@ describe("Core/EllipsoidGeometry", function () {
maximumClock: CesiumMath.toRadians(270.0),
minimumCone: CesiumMath.toRadians(30.0),
maximumCone: CesiumMath.toRadians(120.0),
- }),
+ })
);
const numVertices = 50;
@@ -353,8 +353,25 @@ describe("Core/EllipsoidGeometry", function () {
stackPartitions: 3,
});
const packedInstance = [
- 1.0, 2.0, 3.0, 0.5, 0.6, 0.7, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.2, 0.3,
- 0.4, 3.0, 3.0, -1,
+ 1.0,
+ 2.0,
+ 3.0,
+ 0.5,
+ 0.6,
+ 0.7,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.1,
+ 0.2,
+ 0.3,
+ 0.4,
+ 3.0,
+ 3.0,
+ -1,
];
createPackableSpecs(EllipsoidGeometry, ellipsoidgeometry, packedInstance);
});
diff --git a/packages/engine/Specs/Core/EllipsoidOutlineGeometrySpec.js b/packages/engine/Specs/Core/EllipsoidOutlineGeometrySpec.js
index c71224601d3b..e24be1fefa9f 100644
--- a/packages/engine/Specs/Core/EllipsoidOutlineGeometrySpec.js
+++ b/packages/engine/Specs/Core/EllipsoidOutlineGeometrySpec.js
@@ -73,7 +73,7 @@ describe("Core/EllipsoidOutlineGeometry", function () {
stackPartitions: 3,
slicePartitions: 3,
subdivisions: 3,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(24 * 3);
@@ -92,7 +92,7 @@ describe("Core/EllipsoidOutlineGeometry", function () {
stackPartitions: 3,
slicePartitions: 3,
subdivisions: 3,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(24 * 3);
@@ -107,7 +107,7 @@ describe("Core/EllipsoidOutlineGeometry", function () {
slicePartitions: 3,
subdivisions: 3,
offsetAttribute: GeometryOffsetAttribute.ALL,
- }),
+ })
);
const numVertices = 24;
@@ -176,30 +176,42 @@ describe("Core/EllipsoidOutlineGeometry", function () {
innerRadii: new Cartesian3(100000.0, 100000.0, -10.0),
});
- const geometry0 =
- EllipsoidOutlineGeometry.createGeometry(ellipsoidOutline0);
- const geometry1 =
- EllipsoidOutlineGeometry.createGeometry(ellipsoidOutline1);
- const geometry2 =
- EllipsoidOutlineGeometry.createGeometry(ellipsoidOutline2);
- const geometry3 =
- EllipsoidOutlineGeometry.createGeometry(ellipsoidOutline3);
- const geometry4 =
- EllipsoidOutlineGeometry.createGeometry(ellipsoidOutline4);
- const geometry5 =
- EllipsoidOutlineGeometry.createGeometry(ellipsoidOutline5);
- const geometry6 =
- EllipsoidOutlineGeometry.createGeometry(ellipsoidOutline6);
- const geometry7 =
- EllipsoidOutlineGeometry.createGeometry(ellipsoidOutline7);
- const geometry8 =
- EllipsoidOutlineGeometry.createGeometry(ellipsoidOutline8);
- const geometry9 =
- EllipsoidOutlineGeometry.createGeometry(ellipsoidOutline9);
- const geometry10 =
- EllipsoidOutlineGeometry.createGeometry(ellipsoidOutline10);
- const geometry11 =
- EllipsoidOutlineGeometry.createGeometry(ellipsoidOutline11);
+ const geometry0 = EllipsoidOutlineGeometry.createGeometry(
+ ellipsoidOutline0
+ );
+ const geometry1 = EllipsoidOutlineGeometry.createGeometry(
+ ellipsoidOutline1
+ );
+ const geometry2 = EllipsoidOutlineGeometry.createGeometry(
+ ellipsoidOutline2
+ );
+ const geometry3 = EllipsoidOutlineGeometry.createGeometry(
+ ellipsoidOutline3
+ );
+ const geometry4 = EllipsoidOutlineGeometry.createGeometry(
+ ellipsoidOutline4
+ );
+ const geometry5 = EllipsoidOutlineGeometry.createGeometry(
+ ellipsoidOutline5
+ );
+ const geometry6 = EllipsoidOutlineGeometry.createGeometry(
+ ellipsoidOutline6
+ );
+ const geometry7 = EllipsoidOutlineGeometry.createGeometry(
+ ellipsoidOutline7
+ );
+ const geometry8 = EllipsoidOutlineGeometry.createGeometry(
+ ellipsoidOutline8
+ );
+ const geometry9 = EllipsoidOutlineGeometry.createGeometry(
+ ellipsoidOutline9
+ );
+ const geometry10 = EllipsoidOutlineGeometry.createGeometry(
+ ellipsoidOutline10
+ );
+ const geometry11 = EllipsoidOutlineGeometry.createGeometry(
+ ellipsoidOutline11
+ );
expect(geometry0).toBeUndefined();
expect(geometry1).toBeUndefined();
@@ -227,11 +239,24 @@ describe("Core/EllipsoidOutlineGeometry", function () {
subdivisions: 3,
});
const packedInstance = [
- 1.0, 2.0, 3.0, 0.5, 0.6, 0.7, 0.1, 0.2, 0.3, 0.4, 3.0, 3.0, 3.0, -1,
+ 1.0,
+ 2.0,
+ 3.0,
+ 0.5,
+ 0.6,
+ 0.7,
+ 0.1,
+ 0.2,
+ 0.3,
+ 0.4,
+ 3.0,
+ 3.0,
+ 3.0,
+ -1,
];
createPackableSpecs(
EllipsoidOutlineGeometry,
ellipsoidgeometry,
- packedInstance,
+ packedInstance
);
});
diff --git a/packages/engine/Specs/Core/EllipsoidRhumbLineSpec.js b/packages/engine/Specs/Core/EllipsoidRhumbLineSpec.js
index add1998ace05..afc652627b08 100644
--- a/packages/engine/Specs/Core/EllipsoidRhumbLineSpec.js
+++ b/packages/engine/Specs/Core/EllipsoidRhumbLineSpec.js
@@ -32,7 +32,7 @@ describe("Core/EllipsoidRhumbLine", function () {
expect(function () {
const rhumb = new EllipsoidRhumbLine(
new Cartographic(Math.PI, Math.PI),
- new Cartographic(0, Math.PI),
+ new Cartographic(0, Math.PI)
);
return rhumb.interpolateUsingSurfaceDistance(0);
}).toThrowDeveloperError();
@@ -64,7 +64,7 @@ describe("Core/EllipsoidRhumbLine", function () {
start,
heading,
distance,
- ellipsoid,
+ ellipsoid
);
expect(start).toEqual(rhumb.start);
expect(distance).toEqualEpsilon(rhumb.surfaceDistance, CesiumMath.EPSILON6);
@@ -84,7 +84,7 @@ describe("Core/EllipsoidRhumbLine", function () {
heading,
distance,
ellipsoid,
- scratch,
+ scratch
);
expect(rhumb).toBe(scratch);
expect(rhumb.ellipsoid).toBe(ellipsoid);
@@ -120,7 +120,7 @@ describe("Core/EllipsoidRhumbLine", function () {
const start = new Cartographic(CesiumMath.PI_OVER_TWO, 0);
const end = new Cartographic(
CesiumMath.PI_OVER_TWO,
- CesiumMath.PI_OVER_TWO,
+ CesiumMath.PI_OVER_TWO
);
const rhumb = new EllipsoidRhumbLine();
rhumb.setEndPoints(start, end);
@@ -136,7 +136,7 @@ describe("Core/EllipsoidRhumbLine", function () {
const rhumb = new EllipsoidRhumbLine(start, end, ellipsoid);
expect(CesiumMath.PI_OVER_TWO).toEqualEpsilon(
rhumb.heading,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -169,7 +169,7 @@ describe("Core/EllipsoidRhumbLine", function () {
expect(CesiumMath.PI_OVER_TWO).toEqualEpsilon(
rhumb.heading,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
start = new Cartographic(3 * CesiumMath.PI_OVER_TWO, 0.3);
@@ -177,7 +177,7 @@ describe("Core/EllipsoidRhumbLine", function () {
const rhumb2 = new EllipsoidRhumbLine(start, end, ellipsoid);
expect(-CesiumMath.PI_OVER_TWO).toEqualEpsilon(
rhumb2.heading,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -201,7 +201,7 @@ describe("Core/EllipsoidRhumbLine", function () {
const rhumb = new EllipsoidRhumbLine(start, end, ellipsoid);
expect(CesiumMath.PI_OVER_TWO * 6).toEqualEpsilon(
rhumb.surfaceDistance,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -213,7 +213,7 @@ describe("Core/EllipsoidRhumbLine", function () {
const rhumb = new EllipsoidRhumbLine(start, end, ellipsoid);
expect(thirtyDegrees * 6).toEqualEpsilon(
rhumb.surfaceDistance,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -227,47 +227,47 @@ describe("Core/EllipsoidRhumbLine", function () {
const westEastRhumb = new EllipsoidRhumbLine(
fortyFiveWest,
fortyFiveEast,
- ellipsoid,
+ ellipsoid
);
const southNorthRhumb = new EllipsoidRhumbLine(
fortyFiveSouth,
fortyFiveNorth,
- ellipsoid,
+ ellipsoid
);
const eastWestRhumb = new EllipsoidRhumbLine(
fortyFiveEast,
fortyFiveWest,
- ellipsoid,
+ ellipsoid
);
const northSouthRhumb = new EllipsoidRhumbLine(
fortyFiveNorth,
fortyFiveSouth,
- ellipsoid,
+ ellipsoid
);
expect(CesiumMath.PI_OVER_TWO * 6).toEqualEpsilon(
westEastRhumb.surfaceDistance,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(CesiumMath.PI_OVER_TWO * 6).toEqualEpsilon(
southNorthRhumb.surfaceDistance,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(westEastRhumb.surfaceDistance).toEqualEpsilon(
southNorthRhumb.surfaceDistance,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(CesiumMath.PI_OVER_TWO * 6).toEqualEpsilon(
eastWestRhumb.surfaceDistance,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(CesiumMath.PI_OVER_TWO * 6).toEqualEpsilon(
northSouthRhumb.surfaceDistance,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(eastWestRhumb.surfaceDistance).toEqualEpsilon(
northSouthRhumb.surfaceDistance,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -280,7 +280,7 @@ describe("Core/EllipsoidRhumbLine", function () {
const distance = Math.cos(fortyfiveDegrees) * CesiumMath.PI_OVER_TWO * 6;
expect(distance).toEqualEpsilon(
rhumb.surfaceDistance,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -294,7 +294,7 @@ describe("Core/EllipsoidRhumbLine", function () {
initial,
fifteenDegrees,
0.0,
- ellipsoid,
+ ellipsoid
);
return rhumb.interpolateUsingSurfaceDistance(0);
}).toThrowDeveloperError();
@@ -310,14 +310,14 @@ describe("Core/EllipsoidRhumbLine", function () {
initial,
fifteenDegrees,
distance,
- ellipsoid,
+ ellipsoid
);
const rhumb2 = new EllipsoidRhumbLine(initial, rhumb1.end, ellipsoid);
expect(fifteenDegrees).toEqualEpsilon(rhumb2.heading, CesiumMath.EPSILON12);
expect(distance).toEqualEpsilon(
rhumb2.surfaceDistance,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
});
@@ -330,14 +330,14 @@ describe("Core/EllipsoidRhumbLine", function () {
initial,
fifteenDegrees,
distance,
- ellipsoid,
+ ellipsoid
);
const rhumb2 = new EllipsoidRhumbLine(initial, rhumb1.end, ellipsoid);
expect(fifteenDegrees).toEqualEpsilon(rhumb2.heading, CesiumMath.EPSILON12);
expect(distance).toEqualEpsilon(
rhumb2.surfaceDistance,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
});
@@ -357,65 +357,65 @@ describe("Core/EllipsoidRhumbLine", function () {
initial,
eightyNineDegrees,
distance,
- ellipsoid,
+ ellipsoid
);
let rhumb2 = new EllipsoidRhumbLine(initial, rhumb1.end, ellipsoid);
expect(rhumb1.heading).toEqualEpsilon(rhumb2.heading, CesiumMath.EPSILON12);
expect(rhumb1.surfaceDistance).toEqualEpsilon(
rhumb2.surfaceDistance,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
rhumb1 = EllipsoidRhumbLine.fromStartHeadingDistance(
initial,
eightyNinePointNineDegrees,
distance,
- ellipsoid,
+ ellipsoid
);
rhumb2 = new EllipsoidRhumbLine(initial, rhumb1.end, ellipsoid);
expect(rhumb1.heading).toEqualEpsilon(rhumb2.heading, CesiumMath.EPSILON12);
expect(rhumb1.surfaceDistance).toEqualEpsilon(
rhumb2.surfaceDistance,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
rhumb1 = EllipsoidRhumbLine.fromStartHeadingDistance(
initial,
ninetyDegrees,
distance,
- ellipsoid,
+ ellipsoid
);
rhumb2 = new EllipsoidRhumbLine(initial, rhumb1.end, ellipsoid);
expect(rhumb1.heading).toEqualEpsilon(rhumb2.heading, CesiumMath.EPSILON12);
expect(rhumb1.surfaceDistance).toEqualEpsilon(
rhumb2.surfaceDistance,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
rhumb1 = EllipsoidRhumbLine.fromStartHeadingDistance(
initial,
ninetyPointOneDegrees,
distance,
- ellipsoid,
+ ellipsoid
);
rhumb2 = new EllipsoidRhumbLine(initial, rhumb1.end, ellipsoid);
expect(rhumb1.heading).toEqualEpsilon(rhumb2.heading, CesiumMath.EPSILON12);
expect(rhumb1.surfaceDistance).toEqualEpsilon(
rhumb2.surfaceDistance,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
rhumb1 = EllipsoidRhumbLine.fromStartHeadingDistance(
initial,
ninetyPointZeroTwoDegrees,
distance,
- ellipsoid,
+ ellipsoid
);
rhumb2 = new EllipsoidRhumbLine(initial, rhumb1.end, ellipsoid);
expect(rhumb1.heading).toEqualEpsilon(rhumb2.heading, CesiumMath.EPSILON12);
expect(rhumb1.surfaceDistance).toEqualEpsilon(
rhumb2.surfaceDistance,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
});
@@ -434,65 +434,65 @@ describe("Core/EllipsoidRhumbLine", function () {
initial,
eightyNineDegrees,
distance,
- ellipsoid,
+ ellipsoid
);
let rhumb2 = new EllipsoidRhumbLine(initial, rhumb1.end, ellipsoid);
expect(rhumb1.heading).toEqualEpsilon(rhumb2.heading, CesiumMath.EPSILON12);
expect(rhumb1.surfaceDistance).toEqualEpsilon(
rhumb2.surfaceDistance,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
rhumb1 = EllipsoidRhumbLine.fromStartHeadingDistance(
initial,
eightyNinePointNineDegrees,
distance,
- ellipsoid,
+ ellipsoid
);
rhumb2 = new EllipsoidRhumbLine(initial, rhumb1.end, ellipsoid);
expect(rhumb1.heading).toEqualEpsilon(rhumb2.heading, CesiumMath.EPSILON12);
expect(rhumb1.surfaceDistance).toEqualEpsilon(
rhumb2.surfaceDistance,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
rhumb1 = EllipsoidRhumbLine.fromStartHeadingDistance(
initial,
ninetyDegrees,
distance,
- ellipsoid,
+ ellipsoid
);
rhumb2 = new EllipsoidRhumbLine(initial, rhumb1.end, ellipsoid);
expect(rhumb1.heading).toEqualEpsilon(rhumb2.heading, CesiumMath.EPSILON12);
expect(rhumb1.surfaceDistance).toEqualEpsilon(
rhumb2.surfaceDistance,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
rhumb1 = EllipsoidRhumbLine.fromStartHeadingDistance(
initial,
ninetyPointOneDegrees,
distance,
- ellipsoid,
+ ellipsoid
);
rhumb2 = new EllipsoidRhumbLine(initial, rhumb1.end, ellipsoid);
expect(rhumb1.heading).toEqualEpsilon(rhumb2.heading, CesiumMath.EPSILON12);
expect(rhumb1.surfaceDistance).toEqualEpsilon(
rhumb2.surfaceDistance,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
rhumb1 = EllipsoidRhumbLine.fromStartHeadingDistance(
initial,
ninetyPointZeroTwoDegrees,
distance,
- ellipsoid,
+ ellipsoid
);
rhumb2 = new EllipsoidRhumbLine(initial, rhumb1.end, ellipsoid);
expect(rhumb1.heading).toEqualEpsilon(rhumb2.heading, CesiumMath.EPSILON12);
expect(rhumb1.surfaceDistance).toEqualEpsilon(
rhumb2.surfaceDistance,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
});
@@ -507,13 +507,13 @@ describe("Core/EllipsoidRhumbLine", function () {
initial,
CesiumMath.PI_OVER_TWO,
distance,
- ellipsoid,
+ ellipsoid
);
expect(rhumb1.heading).toEqualEpsilon(rhumb2.heading, CesiumMath.EPSILON12);
expect(rhumb1.surfaceDistance).toEqualEpsilon(
rhumb2.surfaceDistance,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
});
@@ -529,21 +529,21 @@ describe("Core/EllipsoidRhumbLine", function () {
initial,
3.0 * CesiumMath.PI_OVER_TWO,
distance,
- ellipsoid,
+ ellipsoid
);
expect(-CesiumMath.PI_OVER_TWO).toEqualEpsilon(
rhumb1.heading,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(distance).toEqualEpsilon(
rhumb1.surfaceDistance,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(rhumb1.heading).toEqualEpsilon(rhumb2.heading, CesiumMath.EPSILON12);
expect(rhumb1.surfaceDistance).toEqualEpsilon(
rhumb2.surfaceDistance,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
const rhumb3 = new EllipsoidRhumbLine(final, initial, ellipsoid);
@@ -551,20 +551,20 @@ describe("Core/EllipsoidRhumbLine", function () {
final,
CesiumMath.PI_OVER_TWO,
distance,
- ellipsoid,
+ ellipsoid
);
expect(CesiumMath.PI_OVER_TWO).toEqualEpsilon(
rhumb3.heading,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(distance).toEqualEpsilon(
rhumb3.surfaceDistance,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(rhumb3.heading).toEqualEpsilon(rhumb4.heading, CesiumMath.EPSILON12);
expect(rhumb3.surfaceDistance).toEqualEpsilon(
rhumb4.surfaceDistance,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
});
@@ -579,11 +579,11 @@ describe("Core/EllipsoidRhumbLine", function () {
expect(0.0).toEqualEpsilon(rhumb.heading, CesiumMath.EPSILON12);
expect(geodesic.startHeading).toEqualEpsilon(
rhumb.heading,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(geodesic.surfaceDistance).toEqualEpsilon(
rhumb.surfaceDistance,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
});
@@ -597,15 +597,15 @@ describe("Core/EllipsoidRhumbLine", function () {
const geodesic = new EllipsoidGeodesic(initial, final, ellipsoid);
expect(CesiumMath.PI_OVER_TWO).toEqualEpsilon(
rhumb.heading,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(geodesic.startHeading).toEqualEpsilon(
rhumb.heading,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(geodesic.surfaceDistance).toEqualEpsilon(
rhumb.surfaceDistance,
- CesiumMath.EPSILON4,
+ CesiumMath.EPSILON4
); // Due to computational difference, slightly larger tolerance
});
@@ -622,14 +622,14 @@ describe("Core/EllipsoidRhumbLine", function () {
initial,
eightyDegrees,
distance,
- ellipsoid,
+ ellipsoid
);
const rhumb2 = new EllipsoidRhumbLine(initial, rhumb1.end, ellipsoid);
expect(rhumb1.heading).toEqualEpsilon(rhumb2.heading, CesiumMath.EPSILON12);
expect(rhumb1.surfaceDistance).toEqualEpsilon(
rhumb2.surfaceDistance,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
});
@@ -644,11 +644,11 @@ describe("Core/EllipsoidRhumbLine", function () {
expect(halfway.longitude).toEqualEpsilon(
interpolatedPoint.longitude,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(halfway.latitude).toEqualEpsilon(
interpolatedPoint.latitude,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -665,11 +665,11 @@ describe("Core/EllipsoidRhumbLine", function () {
expect(halfway.longitude).toEqualEpsilon(
interpolatedPoint.longitude,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(halfway.latitude).toEqualEpsilon(
interpolatedPoint.latitude,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -685,7 +685,7 @@ describe("Core/EllipsoidRhumbLine", function () {
expect(start.longitude).toEqualEpsilon(
first.longitude,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(start.latitude).toEqualEpsilon(first.latitude, CesiumMath.EPSILON12);
expect(end.longitude).toEqualEpsilon(last.longitude, CesiumMath.EPSILON12);
@@ -704,11 +704,11 @@ describe("Core/EllipsoidRhumbLine", function () {
expect(expectedMid.longitude).toEqualEpsilon(
midpoint.longitude,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(expectedMid.latitude).toEqualEpsilon(
midpoint.latitude,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -723,7 +723,7 @@ describe("Core/EllipsoidRhumbLine", function () {
expect(start.longitude).toEqualEpsilon(
first.longitude,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(start.latitude).toEqualEpsilon(first.latitude, CesiumMath.EPSILON12);
expect(end.longitude).toEqualEpsilon(last.longitude, CesiumMath.EPSILON12);
@@ -741,11 +741,11 @@ describe("Core/EllipsoidRhumbLine", function () {
expect(expectedMid.longitude).toEqualEpsilon(
midpoint.longitude,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(expectedMid.latitude).toEqualEpsilon(
midpoint.latitude,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -761,11 +761,11 @@ describe("Core/EllipsoidRhumbLine", function () {
expect(expectedMid.longitude).toEqualEpsilon(
midpoint.longitude,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(expectedMid.latitude).toEqualEpsilon(
midpoint.latitude,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -781,11 +781,11 @@ describe("Core/EllipsoidRhumbLine", function () {
expect(expectedMid.longitude).toEqualEpsilon(
midpoint.longitude,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(expectedMid.latitude).toEqualEpsilon(
midpoint.latitude,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
});
@@ -801,11 +801,11 @@ describe("Core/EllipsoidRhumbLine", function () {
expect(expectedMid.longitude).toEqualEpsilon(
result.longitude,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(expectedMid.latitude).toEqualEpsilon(
result.latitude,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -824,11 +824,11 @@ describe("Core/EllipsoidRhumbLine", function () {
expect(expectedMid.longitude).toEqualEpsilon(
result.longitude,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(expectedMid.latitude).toEqualEpsilon(
result.latitude,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -840,50 +840,50 @@ describe("Core/EllipsoidRhumbLine", function () {
const midpointUsingInterpolation = rhumb.interpolateUsingFraction(0.5);
const midpointUsingIntersection = rhumb.findIntersectionWithLongitude(
- midpointUsingInterpolation.longitude,
+ midpointUsingInterpolation.longitude
);
expect(
Cartographic.equalsEpsilon(
midpointUsingInterpolation,
midpointUsingIntersection,
- CesiumMath.EPSILON12,
- ),
+ CesiumMath.EPSILON12
+ )
).toBe(true);
let pointUsingInterpolation = rhumb.interpolateUsingFraction(0.1);
let pointUsingIntersection = rhumb.findIntersectionWithLongitude(
- pointUsingInterpolation.longitude,
+ pointUsingInterpolation.longitude
);
expect(
Cartographic.equalsEpsilon(
pointUsingInterpolation,
pointUsingIntersection,
- CesiumMath.EPSILON12,
- ),
+ CesiumMath.EPSILON12
+ )
).toBe(true);
pointUsingInterpolation = rhumb.interpolateUsingFraction(0.75);
pointUsingIntersection = rhumb.findIntersectionWithLongitude(
- pointUsingInterpolation.longitude,
+ pointUsingInterpolation.longitude
);
expect(
Cartographic.equalsEpsilon(
pointUsingInterpolation,
pointUsingIntersection,
- CesiumMath.EPSILON12,
- ),
+ CesiumMath.EPSILON12
+ )
).toBe(true);
pointUsingInterpolation = rhumb.interpolateUsingFraction(1.1);
pointUsingIntersection = rhumb.findIntersectionWithLongitude(
- pointUsingInterpolation.longitude,
+ pointUsingInterpolation.longitude
);
expect(
Cartographic.equalsEpsilon(
pointUsingInterpolation,
pointUsingIntersection,
- CesiumMath.EPSILON12,
- ),
+ CesiumMath.EPSILON12
+ )
).toBe(true);
});
@@ -900,16 +900,16 @@ describe("Core/EllipsoidRhumbLine", function () {
Cartographic.equalsEpsilon(
idlIntersection1,
idlIntersection2,
- CesiumMath.EPSILON12,
- ),
+ CesiumMath.EPSILON12
+ )
).toBe(true);
expect(idlIntersection1.longitude).toEqualEpsilon(
Math.PI,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(idlIntersection2.longitude).toEqualEpsilon(
Math.PI,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
rhumb.setEndPoints(end, start);
@@ -921,16 +921,16 @@ describe("Core/EllipsoidRhumbLine", function () {
Cartographic.equalsEpsilon(
idlIntersection1,
idlIntersection2,
- CesiumMath.EPSILON12,
- ),
+ CesiumMath.EPSILON12
+ )
).toBe(true);
expect(idlIntersection1.longitude).toEqualEpsilon(
-Math.PI,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(idlIntersection2.longitude).toEqualEpsilon(
-Math.PI,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -942,14 +942,14 @@ describe("Core/EllipsoidRhumbLine", function () {
const midpointUsingInterpolation = rhumb.interpolateUsingFraction(0.5);
const midpointUsingIntersection = rhumb.findIntersectionWithLongitude(
- midpointUsingInterpolation.longitude,
+ midpointUsingInterpolation.longitude
);
expect(
Cartographic.equalsEpsilon(
midpointUsingInterpolation,
midpointUsingIntersection,
- CesiumMath.EPSILON12,
- ),
+ CesiumMath.EPSILON12
+ )
).toBe(true);
});
@@ -961,7 +961,7 @@ describe("Core/EllipsoidRhumbLine", function () {
const midpointUsingInterpolation = rhumb.interpolateUsingFraction(0.5);
const midpointUsingIntersection = rhumb.findIntersectionWithLongitude(
- midpointUsingInterpolation.longitude,
+ midpointUsingInterpolation.longitude
);
expect(midpointUsingIntersection).not.toBeDefined();
@@ -973,12 +973,13 @@ describe("Core/EllipsoidRhumbLine", function () {
const rhumb = new EllipsoidRhumbLine(start, end);
- const midpointUsingIntersection =
- rhumb.findIntersectionWithLongitude(thirtyDegrees);
+ const midpointUsingIntersection = rhumb.findIntersectionWithLongitude(
+ thirtyDegrees
+ );
expect(midpointUsingIntersection.latitude).toEqualEpsilon(
CesiumMath.PI_OVER_TWO,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -990,50 +991,50 @@ describe("Core/EllipsoidRhumbLine", function () {
const midpointUsingInterpolation = rhumb.interpolateUsingFraction(0.5);
const midpointUsingIntersection = rhumb.findIntersectionWithLatitude(
- midpointUsingInterpolation.latitude,
+ midpointUsingInterpolation.latitude
);
expect(
Cartographic.equalsEpsilon(
midpointUsingInterpolation,
midpointUsingIntersection,
- CesiumMath.EPSILON12,
- ),
+ CesiumMath.EPSILON12
+ )
).toBe(true);
let pointUsingInterpolation = rhumb.interpolateUsingFraction(0.1);
let pointUsingIntersection = rhumb.findIntersectionWithLatitude(
- pointUsingInterpolation.latitude,
+ pointUsingInterpolation.latitude
);
expect(
Cartographic.equalsEpsilon(
pointUsingInterpolation,
pointUsingIntersection,
- CesiumMath.EPSILON12,
- ),
+ CesiumMath.EPSILON12
+ )
).toBe(true);
pointUsingInterpolation = rhumb.interpolateUsingFraction(0.75);
pointUsingIntersection = rhumb.findIntersectionWithLatitude(
- pointUsingInterpolation.latitude,
+ pointUsingInterpolation.latitude
);
expect(
Cartographic.equalsEpsilon(
pointUsingInterpolation,
pointUsingIntersection,
- CesiumMath.EPSILON12,
- ),
+ CesiumMath.EPSILON12
+ )
).toBe(true);
pointUsingInterpolation = rhumb.interpolateUsingFraction(1.1);
pointUsingIntersection = rhumb.findIntersectionWithLatitude(
- pointUsingInterpolation.latitude,
+ pointUsingInterpolation.latitude
);
expect(
Cartographic.equalsEpsilon(
pointUsingInterpolation,
pointUsingIntersection,
- CesiumMath.EPSILON12,
- ),
+ CesiumMath.EPSILON12
+ )
).toBe(true);
});
@@ -1045,7 +1046,7 @@ describe("Core/EllipsoidRhumbLine", function () {
const midpointUsingInterpolation = rhumb.interpolateUsingFraction(0.5);
const midpointUsingIntersection = rhumb.findIntersectionWithLatitude(
- midpointUsingInterpolation.latitude,
+ midpointUsingInterpolation.latitude
);
expect(midpointUsingIntersection).not.toBeDefined();
@@ -1059,14 +1060,14 @@ describe("Core/EllipsoidRhumbLine", function () {
const midpointUsingInterpolation = rhumb.interpolateUsingFraction(0.5);
const midpointUsingIntersection = rhumb.findIntersectionWithLatitude(
- midpointUsingInterpolation.latitude,
+ midpointUsingInterpolation.latitude
);
expect(
Cartographic.equalsEpsilon(
midpointUsingInterpolation,
midpointUsingIntersection,
- CesiumMath.EPSILON12,
- ),
+ CesiumMath.EPSILON12
+ )
).toBe(true);
});
@@ -1074,12 +1075,12 @@ describe("Core/EllipsoidRhumbLine", function () {
const p0 = new Cartesian3(
899411.2767873341,
-5079219.747324299,
- 3738850.924729517,
+ 3738850.924729517
);
const p1 = new Cartesian3(
899411.0994891181,
-5079219.778719673,
- 3738850.9247295167,
+ 3738850.9247295167
);
const ellipsoid = Ellipsoid.WGS84;
diff --git a/packages/engine/Specs/Core/EllipsoidSpec.js b/packages/engine/Specs/Core/EllipsoidSpec.js
index 40f470cbfed9..416d589039ee 100644
--- a/packages/engine/Specs/Core/EllipsoidSpec.js
+++ b/packages/engine/Specs/Core/EllipsoidSpec.js
@@ -14,18 +14,18 @@ describe("Core/Ellipsoid", function () {
const radiiSquared = Cartesian3.multiplyComponents(
radii,
radii,
- new Cartesian3(),
+ new Cartesian3()
);
const radiiToTheFourth = Cartesian3.multiplyComponents(
radiiSquared,
radiiSquared,
- new Cartesian3(),
+ new Cartesian3()
);
const oneOverRadii = new Cartesian3(1 / radii.x, 1 / radii.y, 1 / radii.z);
const oneOverRadiiSquared = new Cartesian3(
1 / radiiSquared.x,
1 / radiiSquared.y,
- 1 / radiiSquared.z,
+ 1 / radiiSquared.z
);
const minimumRadius = 1.0;
const maximumRadius = 3.0;
@@ -34,34 +34,34 @@ describe("Core/Ellipsoid", function () {
const spaceCartesian = new Cartesian3(
4582719.8827300891,
-4582719.8827300882,
- 1725510.4250797231,
+ 1725510.4250797231
);
const spaceCartesianGeodeticSurfaceNormal = new Cartesian3(
0.6829975339864266,
-0.68299753398642649,
- 0.25889908678270795,
+ 0.25889908678270795
);
const spaceCartographic = new Cartographic(
CesiumMath.toRadians(-45.0),
CesiumMath.toRadians(15.0),
- 330000.0,
+ 330000.0
);
const spaceCartographicGeodeticSurfaceNormal = new Cartesian3(
0.68301270189221941,
-0.6830127018922193,
- 0.25881904510252074,
+ 0.25881904510252074
);
const surfaceCartesian = new Cartesian3(
4094327.7921465295,
1909216.4044747739,
- 4487348.4088659193,
+ 4487348.4088659193
);
const surfaceCartographic = new Cartographic(
CesiumMath.toRadians(25.0),
CesiumMath.toRadians(45.0),
- 0.0,
+ 0.0
);
it("default constructor creates zero Ellipsoid", function () {
@@ -110,11 +110,12 @@ describe("Core/Ellipsoid", function () {
it("geodeticSurfaceNormalCartographic works without a result parameter", function () {
const ellipsoid = Ellipsoid.WGS84;
- const returnedResult =
- ellipsoid.geodeticSurfaceNormalCartographic(spaceCartographic);
+ const returnedResult = ellipsoid.geodeticSurfaceNormalCartographic(
+ spaceCartographic
+ );
expect(returnedResult).toEqualEpsilon(
spaceCartographicGeodeticSurfaceNormal,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -123,12 +124,12 @@ describe("Core/Ellipsoid", function () {
const result = new Cartesian3();
const returnedResult = ellipsoid.geodeticSurfaceNormalCartographic(
spaceCartographic,
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(returnedResult).toEqualEpsilon(
spaceCartographicGeodeticSurfaceNormal,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -137,7 +138,7 @@ describe("Core/Ellipsoid", function () {
const returnedResult = ellipsoid.geodeticSurfaceNormal(spaceCartesian);
expect(returnedResult).toEqualEpsilon(
spaceCartesianGeodeticSurfaceNormal,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -152,12 +153,12 @@ describe("Core/Ellipsoid", function () {
const result = new Cartesian3();
const returnedResult = ellipsoid.geodeticSurfaceNormal(
spaceCartesian,
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(returnedResult).toEqualEpsilon(
spaceCartesianGeodeticSurfaceNormal,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -172,7 +173,7 @@ describe("Core/Ellipsoid", function () {
const result = new Cartesian3();
const returnedResult = ellipsoid.cartographicToCartesian(
spaceCartographic,
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(returnedResult).toEqualEpsilon(spaceCartesian, CesiumMath.EPSILON7);
@@ -187,11 +188,11 @@ describe("Core/Ellipsoid", function () {
expect(returnedResult.length).toEqual(2);
expect(returnedResult[0]).toEqualEpsilon(
spaceCartesian,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(returnedResult[1]).toEqualEpsilon(
surfaceCartesian,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -201,18 +202,18 @@ describe("Core/Ellipsoid", function () {
const result = [resultCartesian];
const returnedResult = ellipsoid.cartographicArrayToCartesianArray(
[spaceCartographic, surfaceCartographic],
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result[0]).toBe(resultCartesian);
expect(returnedResult.length).toEqual(2);
expect(returnedResult[0]).toEqualEpsilon(
spaceCartesian,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(returnedResult[1]).toEqualEpsilon(
surfaceCartesian,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -221,7 +222,7 @@ describe("Core/Ellipsoid", function () {
const returnedResult = ellipsoid.cartesianToCartographic(surfaceCartesian);
expect(returnedResult).toEqualEpsilon(
surfaceCartographic,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
});
@@ -230,12 +231,12 @@ describe("Core/Ellipsoid", function () {
const result = new Cartographic();
const returnedResult = ellipsoid.cartesianToCartographic(
surfaceCartesian,
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(returnedResult).toEqualEpsilon(
surfaceCartographic,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
});
@@ -243,10 +244,10 @@ describe("Core/Ellipsoid", function () {
const expected = new Cartographic(
9.999999999999999e-11,
1.0067394967422763e-20,
- -6378137.0,
+ -6378137.0
);
const returnedResult = Ellipsoid.WGS84.cartesianToCartographic(
- new Cartesian3(1e-50, 1e-60, 1e-70),
+ new Cartesian3(1e-50, 1e-60, 1e-70)
);
expect(returnedResult).toEqual(expected);
});
@@ -254,7 +255,7 @@ describe("Core/Ellipsoid", function () {
it("cartesianToCartographic return undefined very close to center", function () {
const ellipsoid = Ellipsoid.WGS84;
const returnedResult = ellipsoid.cartesianToCartographic(
- new Cartesian3(1e-150, 1e-150, 1e-150),
+ new Cartesian3(1e-150, 1e-150, 1e-150)
);
expect(returnedResult).toBeUndefined();
});
@@ -274,11 +275,11 @@ describe("Core/Ellipsoid", function () {
expect(returnedResult.length).toEqual(2);
expect(returnedResult[0]).toEqualEpsilon(
spaceCartographic,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(returnedResult[1]).toEqualEpsilon(
surfaceCartographic,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -288,7 +289,7 @@ describe("Core/Ellipsoid", function () {
const result = [resultCartographic];
const returnedResult = ellipsoid.cartesianArrayToCartographicArray(
[spaceCartesian, surfaceCartesian],
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result.length).toEqual(2);
@@ -326,7 +327,7 @@ describe("Core/Ellipsoid", function () {
const expected = new Cartesian3(
0.2680893773941855,
1.1160466902266495,
- 2.3559801120411263,
+ 2.3559801120411263
);
const cartesian = new Cartesian3(4.0, 5.0, 6.0);
const returnedResult = ellipsoid.scaleToGeodeticSurface(cartesian);
@@ -338,7 +339,7 @@ describe("Core/Ellipsoid", function () {
const expected = new Cartesian3(
0.2680893773941855,
1.1160466902266495,
- 2.3559801120411263,
+ 2.3559801120411263
);
const cartesian = new Cartesian3(4.0, 5.0, 6.0);
const result = new Cartesian3();
@@ -376,7 +377,7 @@ describe("Core/Ellipsoid", function () {
const expected = new Cartesian3(
0.7807200583588266,
0.9759000729485333,
- 1.1710800875382399,
+ 1.1710800875382399
);
const cartesian = new Cartesian3(4.0, 5.0, 6.0);
const returnedResult = ellipsoid.scaleToGeocentricSurface(cartesian);
@@ -388,13 +389,13 @@ describe("Core/Ellipsoid", function () {
const expected = new Cartesian3(
0.7807200583588266,
0.9759000729485333,
- 1.1710800875382399,
+ 1.1710800875382399
);
const cartesian = new Cartesian3(4.0, 5.0, 6.0);
const result = new Cartesian3();
const returnedResult = ellipsoid.scaleToGeocentricSurface(
cartesian,
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(result).toEqualEpsilon(expected, CesiumMath.EPSILON16);
@@ -422,7 +423,7 @@ describe("Core/Ellipsoid", function () {
const result = new Cartesian3();
const returnedResult = ellipsoid.transformPositionToScaledSpace(
cartesian,
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(result).toEqualEpsilon(expected, CesiumMath.EPSILON16);
@@ -432,8 +433,9 @@ describe("Core/Ellipsoid", function () {
const ellipsoid = new Ellipsoid(2.0, 3.0, 4.0);
const expected = new Cartesian3(4.0, 6.0, 8.0);
const cartesian = new Cartesian3(2.0, 2.0, 2.0);
- const returnedResult =
- ellipsoid.transformPositionFromScaledSpace(cartesian);
+ const returnedResult = ellipsoid.transformPositionFromScaledSpace(
+ cartesian
+ );
expect(returnedResult).toEqualEpsilon(expected, CesiumMath.EPSILON16);
});
@@ -444,7 +446,7 @@ describe("Core/Ellipsoid", function () {
const result = new Cartesian3();
const returnedResult = ellipsoid.transformPositionFromScaledSpace(
cartesian,
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(result).toEqualEpsilon(expected, CesiumMath.EPSILON16);
@@ -593,10 +595,11 @@ describe("Core/Ellipsoid", function () {
it("getSurfaceNormalIntersectionWithZAxis works without a result parameter", function () {
const ellipsoid = Ellipsoid.WGS84;
const cartographic = Cartographic.fromDegrees(35.23, 33.23);
- const cartesianOnTheSurface =
- ellipsoid.cartographicToCartesian(cartographic);
+ const cartesianOnTheSurface = ellipsoid.cartographicToCartesian(
+ cartographic
+ );
const returnedResult = ellipsoid.getSurfaceNormalIntersectionWithZAxis(
- cartesianOnTheSurface,
+ cartesianOnTheSurface
);
expect(returnedResult).toBeInstanceOf(Cartesian3);
});
@@ -604,12 +607,13 @@ describe("Core/Ellipsoid", function () {
it("getSurfaceNormalIntersectionWithZAxis works with a result parameter", function () {
const ellipsoid = Ellipsoid.WGS84;
const cartographic = Cartographic.fromDegrees(35.23, 33.23);
- const cartesianOnTheSurface =
- ellipsoid.cartographicToCartesian(cartographic);
+ const cartesianOnTheSurface = ellipsoid.cartographicToCartesian(
+ cartographic
+ );
const returnedResult = ellipsoid.getSurfaceNormalIntersectionWithZAxis(
cartesianOnTheSurface,
undefined,
- cartesianOnTheSurface,
+ cartesianOnTheSurface
);
expect(returnedResult).toBe(cartesianOnTheSurface);
});
@@ -617,11 +621,12 @@ describe("Core/Ellipsoid", function () {
it("getSurfaceNormalIntersectionWithZAxis returns undefined if the result is outside the ellipsoid with buffer parameter", function () {
const ellipsoid = Ellipsoid.WGS84;
const cartographic = Cartographic.fromDegrees(35.23, 33.23);
- const cartesianOnTheSurface =
- ellipsoid.cartographicToCartesian(cartographic);
+ const cartesianOnTheSurface = ellipsoid.cartographicToCartesian(
+ cartographic
+ );
const returnedResult = ellipsoid.getSurfaceNormalIntersectionWithZAxis(
cartesianOnTheSurface,
- ellipsoid.radii.z,
+ ellipsoid.radii.z
);
expect(returnedResult).toBe(undefined);
});
@@ -631,11 +636,12 @@ describe("Core/Ellipsoid", function () {
const minorAxis = 1;
const ellipsoid = new Ellipsoid(majorAxis, majorAxis, minorAxis);
const cartographic = Cartographic.fromDegrees(45.0, 90.0);
- const cartesianOnTheSurface =
- ellipsoid.cartographicToCartesian(cartographic);
+ const cartesianOnTheSurface = ellipsoid.cartographicToCartesian(
+ cartographic
+ );
const returnedResult = ellipsoid.getSurfaceNormalIntersectionWithZAxis(
cartesianOnTheSurface,
- undefined,
+ undefined
);
expect(returnedResult).toBe(undefined);
});
@@ -645,7 +651,7 @@ describe("Core/Ellipsoid", function () {
const cartographic = Cartographic.fromDegrees(35.23, 33.23);
let cartesianOnTheSurface = ellipsoid.cartographicToCartesian(cartographic);
const surfaceNormal = ellipsoid.geodeticSurfaceNormal(
- cartesianOnTheSurface,
+ cartesianOnTheSurface
);
const magnitude = cartesianOnTheSurface.x / surfaceNormal.x;
@@ -653,7 +659,7 @@ describe("Core/Ellipsoid", function () {
expected.z = cartesianOnTheSurface.z - surfaceNormal.z * magnitude;
let result = ellipsoid.getSurfaceNormalIntersectionWithZAxis(
cartesianOnTheSurface,
- undefined,
+ undefined
);
expect(result).toEqualEpsilon(expected, CesiumMath.EPSILON8);
@@ -661,7 +667,7 @@ describe("Core/Ellipsoid", function () {
cartesianOnTheSurface = new Cartesian3(ellipsoid.radii.x, 0, 0);
result = ellipsoid.getSurfaceNormalIntersectionWithZAxis(
cartesianOnTheSurface,
- undefined,
+ undefined
);
expect(result).toEqualEpsilon(Cartesian3.ZERO, CesiumMath.EPSILON8);
});
@@ -674,24 +680,24 @@ describe("Core/Ellipsoid", function () {
let result = ellipsoid.getSurfaceNormalIntersectionWithZAxis(
cartesianOnTheSurface,
- undefined,
+ undefined
);
let surfaceNormalWithLength = Cartesian3.multiplyByScalar(
surfaceNormal,
ellipsoid.maximumRadius,
- new Cartesian3(),
+ new Cartesian3()
);
let position = Cartesian3.add(
result,
surfaceNormalWithLength,
- new Cartesian3(),
+ new Cartesian3()
);
let resultCartographic = ellipsoid.cartesianToCartographic(position);
resultCartographic.height = 0.0;
expect(resultCartographic).toEqualEpsilon(
cartographic,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
// at the north pole
@@ -701,22 +707,22 @@ describe("Core/Ellipsoid", function () {
surfaceNormalWithLength = Cartesian3.multiplyByScalar(
surfaceNormal,
ellipsoid.maximumRadius,
- new Cartesian3(),
+ new Cartesian3()
);
result = ellipsoid.getSurfaceNormalIntersectionWithZAxis(
cartesianOnTheSurface,
- undefined,
+ undefined
);
position = Cartesian3.add(
result,
surfaceNormalWithLength,
- new Cartesian3(),
+ new Cartesian3()
);
resultCartographic = ellipsoid.cartesianToCartographic(position);
resultCartographic.height = 0.0;
expect(resultCartographic).toEqualEpsilon(
cartographic,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
});
@@ -729,13 +735,14 @@ describe("Core/Ellipsoid", function () {
it("getLocalCurvature returns expected values at the equator", function () {
const ellipsoid = Ellipsoid.WGS84;
const cartographic = Cartographic.fromDegrees(0.0, 0.0);
- const cartesianOnTheSurface =
- ellipsoid.cartographicToCartesian(cartographic);
+ const cartesianOnTheSurface = ellipsoid.cartographicToCartesian(
+ cartographic
+ );
const returnedResult = ellipsoid.getLocalCurvature(cartesianOnTheSurface);
const expectedResult = new Cartesian2(
1.0 / ellipsoid.maximumRadius,
ellipsoid.maximumRadius /
- (ellipsoid.minimumRadius * ellipsoid.minimumRadius),
+ (ellipsoid.minimumRadius * ellipsoid.minimumRadius)
);
expect(returnedResult).toEqualEpsilon(expectedResult, CesiumMath.EPSILON8);
});
@@ -743,15 +750,16 @@ describe("Core/Ellipsoid", function () {
it("getLocalCurvature returns expected values at the north pole", function () {
const ellipsoid = Ellipsoid.WGS84;
const cartographic = Cartographic.fromDegrees(0.0, 90.0);
- const cartesianOnTheSurface =
- ellipsoid.cartographicToCartesian(cartographic);
+ const cartesianOnTheSurface = ellipsoid.cartographicToCartesian(
+ cartographic
+ );
const returnedResult = ellipsoid.getLocalCurvature(cartesianOnTheSurface);
const semiLatusRectum =
(ellipsoid.maximumRadius * ellipsoid.maximumRadius) /
ellipsoid.minimumRadius;
const expectedResult = new Cartesian2(
1.0 / semiLatusRectum,
- 1.0 / semiLatusRectum,
+ 1.0 / semiLatusRectum
);
expect(returnedResult).toEqualEpsilon(expectedResult, CesiumMath.EPSILON8);
});
@@ -785,9 +793,9 @@ describe("Core/Ellipsoid", function () {
-CesiumMath.PI,
-CesiumMath.PI_OVER_TWO,
CesiumMath.PI,
- CesiumMath.PI_OVER_TWO,
- ),
- ),
+ CesiumMath.PI_OVER_TWO
+ )
+ )
).toEqualEpsilon(area, CesiumMath.EPSILON3);
// area of a prolate spheroid
@@ -805,9 +813,9 @@ describe("Core/Ellipsoid", function () {
-CesiumMath.PI,
-CesiumMath.PI_OVER_TWO,
CesiumMath.PI,
- CesiumMath.PI_OVER_TWO,
- ),
- ),
+ CesiumMath.PI_OVER_TWO
+ )
+ )
).toEqualEpsilon(area, CesiumMath.EPSILON3);
});
diff --git a/packages/engine/Specs/Core/EllipsoidTangentPlaneSpec.js b/packages/engine/Specs/Core/EllipsoidTangentPlaneSpec.js
index 1ad3cf40cdab..c421c4f0cb91 100644
--- a/packages/engine/Specs/Core/EllipsoidTangentPlaneSpec.js
+++ b/packages/engine/Specs/Core/EllipsoidTangentPlaneSpec.js
@@ -16,7 +16,7 @@ describe("Core/EllipsoidTangentPlane", function () {
it("constructor sets expected values", function () {
const tangentPlane = new EllipsoidTangentPlane(
Cartesian3.UNIT_X,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(tangentPlane.ellipsoid).toBe(Ellipsoid.UNIT_SPHERE);
expect(tangentPlane.origin).toEqual(Cartesian3.UNIT_X);
@@ -29,7 +29,7 @@ describe("Core/EllipsoidTangentPlane", function () {
];
const tangentPlane = EllipsoidTangentPlane.fromPoints(
points,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(tangentPlane.ellipsoid).toBe(Ellipsoid.UNIT_SPHERE);
expect(tangentPlane.origin).toEqual(Cartesian3.UNIT_X);
@@ -65,7 +65,7 @@ describe("Core/EllipsoidTangentPlane", function () {
const result = new Cartesian2();
const returnedResult = tangentPlane.projectPointOntoPlane(
positions,
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(returnedResult).toEqual(expectedResult);
@@ -110,7 +110,7 @@ describe("Core/EllipsoidTangentPlane", function () {
const result = [index0];
const returnedResults = tangentPlane.projectPointsOntoPlane(
positions,
- result,
+ result
);
expect(result).toBe(returnedResults);
expect(result[0]).toBe(index0);
@@ -159,7 +159,7 @@ describe("Core/EllipsoidTangentPlane", function () {
const result = new Cartesian3();
const returnedResult = tangentPlane.projectPointOntoEllipsoid(
position,
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(returnedResult).toEqual(expectedResult);
@@ -199,7 +199,7 @@ describe("Core/EllipsoidTangentPlane", function () {
const result = [index0];
const returnedResults = tangentPlane.projectPointsOntoEllipsoid(
positions,
- result,
+ result
);
expect(result).toBe(returnedResults);
expect(result[0]).toBe(index0);
@@ -223,16 +223,16 @@ describe("Core/EllipsoidTangentPlane", function () {
const tangentPlane = new EllipsoidTangentPlane(origin, ellipsoid);
expect(
- tangentPlane.projectPointToNearestOnPlane(new Cartesian3(2.0, 0.0, 0.0)),
+ tangentPlane.projectPointToNearestOnPlane(new Cartesian3(2.0, 0.0, 0.0))
).toEqual(new Cartesian2(0.0, 0.0));
expect(
- tangentPlane.projectPointToNearestOnPlane(new Cartesian3(1.0, 0.0, 0.0)),
+ tangentPlane.projectPointToNearestOnPlane(new Cartesian3(1.0, 0.0, 0.0))
).toEqual(new Cartesian2(0.0, 0.0));
expect(
- tangentPlane.projectPointToNearestOnPlane(new Cartesian3(0.0, 0.0, 0.0)),
+ tangentPlane.projectPointToNearestOnPlane(new Cartesian3(0.0, 0.0, 0.0))
).toEqual(new Cartesian2(0.0, 0.0));
expect(
- tangentPlane.projectPointToNearestOnPlane(new Cartesian3(-1.0, 0.0, 0.0)),
+ tangentPlane.projectPointToNearestOnPlane(new Cartesian3(-1.0, 0.0, 0.0))
).toEqual(new Cartesian2(0.0, 0.0));
});
@@ -246,7 +246,7 @@ describe("Core/EllipsoidTangentPlane", function () {
const result = new Cartesian2();
const returnedResult = tangentPlane.projectPointToNearestOnPlane(
positions,
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(returnedResult).toEqual(expectedResult);
@@ -267,8 +267,9 @@ describe("Core/EllipsoidTangentPlane", function () {
new Cartesian2(0.0, 0.0),
new Cartesian2(1.0, 0.0),
];
- const returnedResults =
- tangentPlane.projectPointsToNearestOnPlane(positions);
+ const returnedResults = tangentPlane.projectPointsToNearestOnPlane(
+ positions
+ );
expect(returnedResults).toEqual(expectedResults);
});
@@ -292,7 +293,7 @@ describe("Core/EllipsoidTangentPlane", function () {
const result = [index0];
const returnedResults = tangentPlane.projectPointsToNearestOnPlane(
positions,
- result,
+ result
);
expect(result).toBe(returnedResults);
expect(result[0]).toBe(index0);
@@ -320,7 +321,7 @@ describe("Core/EllipsoidTangentPlane", function () {
it("projectPointOntoPlane throws without cartesian", function () {
const tangentPlane = new EllipsoidTangentPlane(
Cartesian3.UNIT_X,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(function () {
return tangentPlane.projectPointOntoPlane(undefined);
@@ -330,7 +331,7 @@ describe("Core/EllipsoidTangentPlane", function () {
it("projectPointsOntoPlane throws without cartesians", function () {
const tangentPlane = new EllipsoidTangentPlane(
Cartesian3.UNIT_X,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(function () {
return tangentPlane.projectPointsOntoPlane(undefined);
@@ -340,7 +341,7 @@ describe("Core/EllipsoidTangentPlane", function () {
it("projectPointToNearestOnPlane throws without cartesian", function () {
const tangentPlane = new EllipsoidTangentPlane(
Cartesian3.UNIT_X,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(function () {
return tangentPlane.projectPointToNearestOnPlane(undefined);
@@ -350,7 +351,7 @@ describe("Core/EllipsoidTangentPlane", function () {
it("projectPointsToNearestOnPlane throws without cartesians", function () {
const tangentPlane = new EllipsoidTangentPlane(
Cartesian3.UNIT_X,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(function () {
return tangentPlane.projectPointsToNearestOnPlane(undefined);
@@ -360,7 +361,7 @@ describe("Core/EllipsoidTangentPlane", function () {
it("projectPointsOntoEllipsoid throws without cartesians", function () {
const tangentPlane = new EllipsoidTangentPlane(
Cartesian3.UNIT_X,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(function () {
return tangentPlane.projectPointsOntoEllipsoid(undefined);
@@ -369,12 +370,21 @@ describe("Core/EllipsoidTangentPlane", function () {
it("projectPointsOntoEllipsoid works with an arbitrary ellipsoid using fromPoints", function () {
const points = Cartesian3.fromDegreesArray([
- -72.0, 40.0, -68.0, 35.0, -75.0, 30.0, -70.0, 30.0, -68.0, 40.0,
+ -72.0,
+ 40.0,
+ -68.0,
+ 35.0,
+ -75.0,
+ 30.0,
+ -70.0,
+ 30.0,
+ -68.0,
+ 40.0,
]);
const tangentPlane = EllipsoidTangentPlane.fromPoints(
points,
- Ellipsoid.WGS84,
+ Ellipsoid.WGS84
);
const points2D = tangentPlane.projectPointsOntoPlane(points);
const positionsBack = tangentPlane.projectPointsOntoEllipsoid(points2D);
diff --git a/packages/engine/Specs/Core/EllipsoidTerrainProviderSpec.js b/packages/engine/Specs/Core/EllipsoidTerrainProviderSpec.js
index 04fb3e6a5005..f3ed58d94a70 100644
--- a/packages/engine/Specs/Core/EllipsoidTerrainProviderSpec.js
+++ b/packages/engine/Specs/Core/EllipsoidTerrainProviderSpec.js
@@ -36,5 +36,5 @@ describe(
expect(provider.getTileDataAvailable()).toBeUndefined();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Core/EllipsoidalOccluderSpec.js b/packages/engine/Specs/Core/EllipsoidalOccluderSpec.js
index 1753aca0e7bc..154d4c502b55 100644
--- a/packages/engine/Specs/Core/EllipsoidalOccluderSpec.js
+++ b/packages/engine/Specs/Core/EllipsoidalOccluderSpec.js
@@ -53,41 +53,39 @@ describe("Core/EllipsoidalOccluder", function () {
let direction = Cartesian3.normalize(
new Cartesian3(1.0, 1.0, 1.0),
- new Cartesian3(),
+ new Cartesian3()
);
let point = Cartesian3.multiplyByScalar(direction, 0.5, new Cartesian3());
let scaledSpacePoint = occluder.computeHorizonCullingPoint(point, [point]);
- let scaledSpacePointShrunk =
- occluder.computeHorizonCullingPointPossiblyUnderEllipsoid(
- point,
- [point],
- height,
- );
+ let scaledSpacePointShrunk = occluder.computeHorizonCullingPointPossiblyUnderEllipsoid(
+ point,
+ [point],
+ height
+ );
expect(occluder.isScaledSpacePointVisible(scaledSpacePoint)).toEqual(false);
expect(
occluder.isScaledSpacePointVisiblePossiblyUnderEllipsoid(
scaledSpacePointShrunk,
- height,
- ),
+ height
+ )
).toEqual(true);
direction = new Cartesian3(0.0, 1.0, 0.0);
point = Cartesian3.multiplyByScalar(direction, 0.5, new Cartesian3());
scaledSpacePoint = occluder.computeHorizonCullingPoint(point, [point]);
- scaledSpacePointShrunk =
- occluder.computeHorizonCullingPointPossiblyUnderEllipsoid(
- point,
- [point],
- height,
- );
+ scaledSpacePointShrunk = occluder.computeHorizonCullingPointPossiblyUnderEllipsoid(
+ point,
+ [point],
+ height
+ );
expect(occluder.isScaledSpacePointVisible(scaledSpacePoint)).toEqual(false);
expect(
occluder.isScaledSpacePointVisiblePossiblyUnderEllipsoid(
scaledSpacePointShrunk,
- height,
- ),
+ height
+ )
).toEqual(false);
});
@@ -106,7 +104,7 @@ describe("Core/EllipsoidalOccluder", function () {
occluder.cameraPosition = new Cartesian3(
ellipsoid.minimumRadius - 100,
0.0,
- 0.0,
+ 0.0
);
const point = new Cartesian3(-7000000, 0.0, 0.0);
@@ -154,7 +152,7 @@ describe("Core/EllipsoidalOccluder", function () {
expect(function () {
ellipsoidalOccluder.computeHorizonCullingPoint(
directionToPoint,
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
@@ -167,7 +165,7 @@ describe("Core/EllipsoidalOccluder", function () {
const result = ellipsoidalOccluder.computeHorizonCullingPoint(
directionToPoint,
- positions,
+ positions
);
expect(result.x).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
@@ -183,7 +181,7 @@ describe("Core/EllipsoidalOccluder", function () {
const result = ellipsoidalOccluder.computeHorizonCullingPoint(
directionToPoint,
- positions,
+ positions
);
expect(result).toBeUndefined();
});
@@ -196,7 +194,7 @@ describe("Core/EllipsoidalOccluder", function () {
const result = ellipsoidalOccluder.computeHorizonCullingPoint(
directionToPoint,
- positions,
+ positions
);
expect(result).toBeUndefined();
});
@@ -212,7 +210,7 @@ describe("Core/EllipsoidalOccluder", function () {
const result = ellipsoidalOccluder.computeHorizonCullingPoint(
directionToPoint,
- positions,
+ positions
);
expect(result).toBeUndefined();
});
@@ -225,7 +223,7 @@ describe("Core/EllipsoidalOccluder", function () {
const result = ellipsoidalOccluder.computeHorizonCullingPoint(
directionToPoint,
- positions,
+ positions
);
expect(result).toBeUndefined();
});
@@ -243,28 +241,28 @@ describe("Core/EllipsoidalOccluder", function () {
const firstPositionArray = [positions[0]];
const result = ellipsoidalOccluder.computeHorizonCullingPoint(
boundingSphere.center,
- firstPositionArray,
+ firstPositionArray
);
const unscaledResult = Cartesian3.multiplyComponents(
result,
ellipsoid.radii,
- new Cartesian3(),
+ new Cartesian3()
);
// The grazing altitude of the ray from the horizon culling point to the
// position used to compute it should be very nearly zero.
const direction = Cartesian3.normalize(
Cartesian3.subtract(positions[0], unscaledResult, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
const nearest = IntersectionTests.grazingAltitudeLocation(
new Ray(unscaledResult, direction),
- ellipsoid,
+ ellipsoid
);
const nearestCartographic = ellipsoid.cartesianToCartographic(nearest);
expect(nearestCartographic.height).toEqualEpsilon(
0.0,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
});
@@ -281,12 +279,12 @@ describe("Core/EllipsoidalOccluder", function () {
const result = ellipsoidalOccluder.computeHorizonCullingPoint(
boundingSphere.center,
- positions,
+ positions
);
const unscaledResult = Cartesian3.multiplyComponents(
result,
ellipsoid.radii,
- new Cartesian3(),
+ new Cartesian3()
);
// The grazing altitude of the ray from the horizon culling point to the
@@ -295,11 +293,11 @@ describe("Core/EllipsoidalOccluder", function () {
for (let i = 0; i < positions.length; ++i) {
const direction = Cartesian3.normalize(
Cartesian3.subtract(positions[i], unscaledResult, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
const nearest = IntersectionTests.grazingAltitudeLocation(
new Ray(unscaledResult, direction),
- ellipsoid,
+ ellipsoid
);
const nearestCartographic = ellipsoid.cartesianToCartographic(nearest);
if (Math.abs(nearestCartographic.height) < CesiumMath.EPSILON5) {
@@ -318,12 +316,11 @@ describe("Core/EllipsoidalOccluder", function () {
const positions = [new Cartesian3(12344.0, 0.0, 0.0)];
const directionToPoint = new Cartesian3(1.0, 0.0, 0.0);
- const result =
- ellipsoidalOccluder.computeHorizonCullingPointPossiblyUnderEllipsoid(
- directionToPoint,
- positions,
- -1.0,
- );
+ const result = ellipsoidalOccluder.computeHorizonCullingPointPossiblyUnderEllipsoid(
+ directionToPoint,
+ positions,
+ -1.0
+ );
expect(result.x).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
expect(result.y).toEqualEpsilon(0.0, CesiumMath.EPSILON14);
@@ -358,14 +355,14 @@ describe("Core/EllipsoidalOccluder", function () {
ellipsoidalOccluder.computeHorizonCullingPointFromVertices(
boundingSphere.center,
vertices,
- 7,
+ 7
);
expect(function () {
ellipsoidalOccluder.computeHorizonCullingPointFromVertices(
undefined,
vertices,
- 7,
+ 7
);
}).toThrowDeveloperError();
@@ -373,7 +370,7 @@ describe("Core/EllipsoidalOccluder", function () {
ellipsoidalOccluder.computeHorizonCullingPointFromVertices(
boundingSphere.center,
undefined,
- 7,
+ 7
);
}).toThrowDeveloperError();
@@ -381,7 +378,7 @@ describe("Core/EllipsoidalOccluder", function () {
ellipsoidalOccluder.computeHorizonCullingPointFromVertices(
boundingSphere.center,
vertices,
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
@@ -413,15 +410,14 @@ describe("Core/EllipsoidalOccluder", function () {
const result1 = ellipsoidalOccluder.computeHorizonCullingPoint(
boundingSphere.center,
- positions,
+ positions
+ );
+ const result2 = ellipsoidalOccluder.computeHorizonCullingPointFromVertices(
+ boundingSphere.center,
+ vertices,
+ 7,
+ center
);
- const result2 =
- ellipsoidalOccluder.computeHorizonCullingPointFromVertices(
- boundingSphere.center,
- vertices,
- 7,
- center,
- );
expect(result1.x).toEqualEpsilon(result2.x, CesiumMath.EPSILON14);
expect(result1.y).toEqualEpsilon(result2.y, CesiumMath.EPSILON14);
@@ -435,14 +431,13 @@ describe("Core/EllipsoidalOccluder", function () {
const directionToPoint = new Cartesian3(1.0, 0.0, 0.0);
const center = Cartesian3.ZERO;
- const result =
- ellipsoidalOccluder.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(
- directionToPoint,
- vertices,
- 3,
- center,
- -1.0,
- );
+ const result = ellipsoidalOccluder.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(
+ directionToPoint,
+ vertices,
+ 3,
+ center,
+ -1.0
+ );
expect(result.x).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
expect(result.y).toEqualEpsilon(0.0, CesiumMath.EPSILON14);
@@ -455,11 +450,10 @@ describe("Core/EllipsoidalOccluder", function () {
const ellipsoid = new Ellipsoid(12345.0, 12345.0, 12345.0);
const ellipsoidalOccluder = new EllipsoidalOccluder(ellipsoid);
const rectangle = Rectangle.MAX_VALUE;
- const result =
- ellipsoidalOccluder.computeHorizonCullingPointFromRectangle(
- rectangle,
- ellipsoid,
- );
+ const result = ellipsoidalOccluder.computeHorizonCullingPointFromRectangle(
+ rectangle,
+ ellipsoid
+ );
expect(result).toBeUndefined();
});
@@ -468,16 +462,15 @@ describe("Core/EllipsoidalOccluder", function () {
const ellipsoidalOccluder = new EllipsoidalOccluder(ellipsoid);
const rectangle = new Rectangle(0.1, 0.2, 0.3, 0.4);
- const result =
- ellipsoidalOccluder.computeHorizonCullingPointFromRectangle(
- rectangle,
- ellipsoid,
- );
+ const result = ellipsoidalOccluder.computeHorizonCullingPointFromRectangle(
+ rectangle,
+ ellipsoid
+ );
expect(result).toBeDefined();
const unscaledResult = Cartesian3.multiplyComponents(
result,
ellipsoid.radii,
- new Cartesian3(),
+ new Cartesian3()
);
// The grazing altitude of the ray from the horizon culling point to the
@@ -493,11 +486,11 @@ describe("Core/EllipsoidalOccluder", function () {
for (let i = 0; i < positions.length; ++i) {
const direction = Cartesian3.normalize(
Cartesian3.subtract(positions[i], unscaledResult, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
const nearest = IntersectionTests.grazingAltitudeLocation(
new Ray(unscaledResult, direction),
- ellipsoid,
+ ellipsoid
);
const nearestCartographic = ellipsoid.cartesianToCartographic(nearest);
if (Math.abs(nearestCartographic.height) < CesiumMath.EPSILON5) {
diff --git a/packages/engine/Specs/Core/EncodedCartesian3Spec.js b/packages/engine/Specs/Core/EncodedCartesian3Spec.js
index d78acddf983b..203e96725868 100644
--- a/packages/engine/Specs/Core/EncodedCartesian3Spec.js
+++ b/packages/engine/Specs/Core/EncodedCartesian3Spec.js
@@ -98,7 +98,7 @@ describe("Core/EncodedCartesian3", function () {
EncodedCartesian3.writeElements(
new Cartesian3(),
new Float32Array(6),
- -1,
+ -1
);
}).toThrowDeveloperError();
});
diff --git a/packages/engine/Specs/Core/FeatureDetectionSpec.js b/packages/engine/Specs/Core/FeatureDetectionSpec.js
index f6d8fffbd26e..a4a45dd49d03 100644
--- a/packages/engine/Specs/Core/FeatureDetectionSpec.js
+++ b/packages/engine/Specs/Core/FeatureDetectionSpec.js
@@ -81,7 +81,7 @@ describe("Core/FeatureDetection", function () {
console.log(
`detected Webkit ${webkitVersion.join(".")}${
webkitVersion.isNightly ? " (Nightly)" : ""
- }`,
+ }`
);
}
});
@@ -91,12 +91,11 @@ describe("Core/FeatureDetection", function () {
expect(typeof isInternetExplorer).toEqual("boolean");
if (isInternetExplorer) {
- const internetExplorerVersion =
- FeatureDetection.internetExplorerVersion();
+ const internetExplorerVersion = FeatureDetection.internetExplorerVersion();
checkVersionArray(internetExplorerVersion);
console.log(
- `detected Internet Explorer ${internetExplorerVersion.join(".")}`,
+ `detected Internet Explorer ${internetExplorerVersion.join(".")}`
);
}
});
@@ -132,8 +131,7 @@ describe("Core/FeatureDetection", function () {
});
it("detects imageRendering support", function () {
- const supportsImageRenderingPixelated =
- FeatureDetection.supportsImageRenderingPixelated();
+ const supportsImageRenderingPixelated = FeatureDetection.supportsImageRenderingPixelated();
expect(typeof supportsImageRenderingPixelated).toEqual("boolean");
if (supportsImageRenderingPixelated) {
expect(FeatureDetection.imageRenderingValue()).toBeDefined();
@@ -165,7 +163,7 @@ describe("Core/FeatureDetection", function () {
it("detects WebGL2 support", function () {
const scene = createScene();
expect(FeatureDetection.supportsWebgl2(scene)).toEqual(
- scene.context.webgl2,
+ scene.context.webgl2
);
scene.destroyForSpecs();
});
diff --git a/packages/engine/Specs/Core/FrustumGeometrySpec.js b/packages/engine/Specs/Core/FrustumGeometrySpec.js
index ca897c753485..24af379c2583 100644
--- a/packages/engine/Specs/Core/FrustumGeometrySpec.js
+++ b/packages/engine/Specs/Core/FrustumGeometrySpec.js
@@ -56,7 +56,7 @@ describe("Core/FrustumGeometry", function () {
origin: Cartesian3.ZERO,
orientation: Quaternion.IDENTITY,
vertexFormat: VertexFormat.ALL,
- }),
+ })
);
const numVertices = 24; //3 components x 8 corners
@@ -89,8 +89,27 @@ describe("Core/FrustumGeometry", function () {
vertexFormat: VertexFormat.POSITION_ONLY,
}),
[
- 0.0, 1.0, 2.0, 3.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0,
- 0.0, 0.0, 0.0, 0.0, 0.0, 1.0,
- ],
+ 0.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ ]
);
});
diff --git a/packages/engine/Specs/Core/FrustumOutlineGeometrySpec.js b/packages/engine/Specs/Core/FrustumOutlineGeometrySpec.js
index aaffd5196156..e5435ea98dd7 100644
--- a/packages/engine/Specs/Core/FrustumOutlineGeometrySpec.js
+++ b/packages/engine/Specs/Core/FrustumOutlineGeometrySpec.js
@@ -55,7 +55,7 @@ describe("Core/FrustumOutlineGeometry", function () {
frustum: frustum,
origin: Cartesian3.ZERO,
orientation: Quaternion.IDENTITY,
- }),
+ })
);
const numVertices = 8;
@@ -82,6 +82,6 @@ describe("Core/FrustumOutlineGeometry", function () {
orientation: Quaternion.IDENTITY,
vertexFormat: VertexFormat.POSITION_ONLY,
}),
- [0.0, 1.0, 2.0, 3.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0],
+ [0.0, 1.0, 2.0, 3.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0]
);
});
diff --git a/packages/engine/Specs/Core/FullscreenSpec.js b/packages/engine/Specs/Core/FullscreenSpec.js
index f3ddd8945bdf..4f6c48700ec5 100644
--- a/packages/engine/Specs/Core/FullscreenSpec.js
+++ b/packages/engine/Specs/Core/FullscreenSpec.js
@@ -38,7 +38,7 @@ describe("Core/Fullscreen", function () {
Fullscreen.requestFullscreen(document.body);
expect(
- document.body[Fullscreen._names.requestFullscreen],
+ document.body[Fullscreen._names.requestFullscreen]
).toHaveBeenCalled();
Fullscreen.exitFullscreen();
diff --git a/packages/engine/Specs/Core/GeographicProjectionSpec.js b/packages/engine/Specs/Core/GeographicProjectionSpec.js
index 33826e1fbd8e..19f890867cb4 100644
--- a/packages/engine/Specs/Core/GeographicProjectionSpec.js
+++ b/packages/engine/Specs/Core/GeographicProjectionSpec.js
@@ -23,7 +23,7 @@ describe("Core/GeographicProjection", function () {
const cartographic = new Cartographic(0.0, 0.0, height);
const projection = new GeographicProjection();
expect(projection.project(cartographic)).toEqual(
- new Cartesian3(0.0, 0.0, height),
+ new Cartesian3(0.0, 0.0, height)
);
});
@@ -33,7 +33,7 @@ describe("Core/GeographicProjection", function () {
const expected = new Cartesian3(
Math.PI * ellipsoid.radii.x,
CesiumMath.PI_OVER_TWO * ellipsoid.radii.x,
- 0.0,
+ 0.0
);
const projection = new GeographicProjection(ellipsoid);
expect(projection.project(cartographic)).toEqual(expected);
@@ -44,7 +44,7 @@ describe("Core/GeographicProjection", function () {
const cartographic = new Cartographic(
-Math.PI,
CesiumMath.PI_OVER_TWO,
- 0.0,
+ 0.0
);
const expected = new Cartesian3(-Math.PI, CesiumMath.PI_OVER_TWO, 0.0);
const projection = new GeographicProjection(ellipsoid);
@@ -57,7 +57,7 @@ describe("Core/GeographicProjection", function () {
const expected = new Cartesian3(
Math.PI * ellipsoid.radii.x,
CesiumMath.PI_OVER_TWO * ellipsoid.radii.x,
- 0.0,
+ 0.0
);
const projection = new GeographicProjection(ellipsoid);
const result = new Cartesian3(0.0, 0.0, 0.0);
@@ -70,7 +70,7 @@ describe("Core/GeographicProjection", function () {
const cartographic = new Cartographic(
CesiumMath.PI_OVER_TWO,
CesiumMath.PI_OVER_FOUR,
- 12.0,
+ 12.0
);
const projection = new GeographicProjection();
const projected = projection.project(cartographic);
@@ -81,7 +81,7 @@ describe("Core/GeographicProjection", function () {
const cartographic = new Cartographic(
CesiumMath.PI_OVER_TWO,
CesiumMath.PI_OVER_FOUR,
- 12.0,
+ 12.0
);
const projection = new GeographicProjection();
const projected = projection.project(cartographic);
diff --git a/packages/engine/Specs/Core/GeographicTilingSchemeSpec.js b/packages/engine/Specs/Core/GeographicTilingSchemeSpec.js
index 612605618646..e08cc000e89b 100644
--- a/packages/engine/Specs/Core/GeographicTilingSchemeSpec.js
+++ b/packages/engine/Specs/Core/GeographicTilingSchemeSpec.js
@@ -23,19 +23,19 @@ describe("Core/GeographicTilingScheme", function () {
const rectangle = tilingScheme.tileXYToRectangle(0, 0, 0);
expect(rectangle.west).toEqualEpsilon(
tilingSchemeRectangle.west,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(rectangle.south).toEqualEpsilon(
tilingSchemeRectangle.south,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(rectangle.east).toEqualEpsilon(
tilingSchemeRectangle.east,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(rectangle.north).toEqualEpsilon(
tilingSchemeRectangle.north,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -50,19 +50,19 @@ describe("Core/GeographicTilingScheme", function () {
expect(result).toEqual(rectangle);
expect(rectangle.west).toEqualEpsilon(
tilingSchemeRectangle.west,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(rectangle.south).toEqualEpsilon(
tilingSchemeRectangle.south,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(rectangle.east).toEqualEpsilon(
tilingSchemeRectangle.east,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(rectangle.north).toEqualEpsilon(
tilingSchemeRectangle.north,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -109,20 +109,20 @@ describe("Core/GeographicTilingScheme", function () {
expect(northeast.south).toEqualEpsilon(
southeast.north,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(northwest.south).toEqualEpsilon(
southwest.north,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(northeast.west).toEqualEpsilon(
northwest.east,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(southeast.west).toEqualEpsilon(
southwest.east,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
});
@@ -136,23 +136,24 @@ describe("Core/GeographicTilingScheme", function () {
it("converts radians to degrees", function () {
const tilingScheme = new GeographicTilingScheme();
const rectangleInRadians = new Rectangle(0.1, 0.2, 0.3, 0.4);
- const nativeRectangle =
- tilingScheme.rectangleToNativeRectangle(rectangleInRadians);
+ const nativeRectangle = tilingScheme.rectangleToNativeRectangle(
+ rectangleInRadians
+ );
expect(nativeRectangle.west).toEqualEpsilon(
(rectangleInRadians.west * 180) / Math.PI,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
expect(nativeRectangle.south).toEqualEpsilon(
(rectangleInRadians.south * 180) / Math.PI,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
expect(nativeRectangle.east).toEqualEpsilon(
(rectangleInRadians.east * 180) / Math.PI,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
expect(nativeRectangle.north).toEqualEpsilon(
(rectangleInRadians.north * 180) / Math.PI,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
});
@@ -162,24 +163,24 @@ describe("Core/GeographicTilingScheme", function () {
const resultRectangle = new Rectangle(0.0, 0.0, 0.0, 0.0);
const outputRectangle = tilingScheme.rectangleToNativeRectangle(
rectangleInRadians,
- resultRectangle,
+ resultRectangle
);
expect(outputRectangle).toEqual(resultRectangle);
expect(resultRectangle.west).toEqualEpsilon(
(rectangleInRadians.west * 180) / Math.PI,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
expect(resultRectangle.south).toEqualEpsilon(
(rectangleInRadians.south * 180) / Math.PI,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
expect(resultRectangle.east).toEqualEpsilon(
(rectangleInRadians.east * 180) / Math.PI,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
expect(resultRectangle.north).toEqualEpsilon(
(rectangleInRadians.north * 180) / Math.PI,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
});
});
@@ -205,18 +206,18 @@ describe("Core/GeographicTilingScheme", function () {
const centerOfWesternRootTile = new Cartographic(-Math.PI / 2.0, 0.0);
expect(tilingScheme.positionToTileXY(centerOfWesternRootTile, 0)).toEqual(
- new Cartesian2(0, 0),
+ new Cartesian2(0, 0)
);
const centerOfNortheastChildOfEasternRootTile = new Cartographic(
(3.0 * Math.PI) / 4.0,
- Math.PI / 2.0,
+ Math.PI / 2.0
);
expect(
tilingScheme.positionToTileXY(
centerOfNortheastChildOfEasternRootTile,
- 1,
- ),
+ 1
+ )
).toEqual(new Cartesian2(3, 0));
});
@@ -225,7 +226,7 @@ describe("Core/GeographicTilingScheme", function () {
const centerOfMap = new Cartographic(0.0, 0.0);
expect(tilingScheme.positionToTileXY(centerOfMap, 1)).toEqual(
- new Cartesian2(2, 1),
+ new Cartesian2(2, 1)
);
});
@@ -234,7 +235,7 @@ describe("Core/GeographicTilingScheme", function () {
const southeastCorner = new Cartographic(Math.PI, -Math.PI / 2.0);
expect(tilingScheme.positionToTileXY(southeastCorner, 0)).toEqual(
- new Cartesian2(1, 0),
+ new Cartesian2(1, 0)
);
});
@@ -243,13 +244,13 @@ describe("Core/GeographicTilingScheme", function () {
const centerOfNortheastChildOfEasternRootTile = new Cartographic(
(3.0 * Math.PI) / 4.0,
- Math.PI / 2.0,
+ Math.PI / 2.0
);
const resultParameter = new Cartesian2(0, 0);
const returnedResult = tilingScheme.positionToTileXY(
centerOfNortheastChildOfEasternRootTile,
1,
- resultParameter,
+ resultParameter
);
expect(resultParameter).toEqual(returnedResult);
expect(resultParameter).toEqual(new Cartesian2(3, 0));
diff --git a/packages/engine/Specs/Core/GeometryAttributeSpec.js b/packages/engine/Specs/Core/GeometryAttributeSpec.js
index d51bb6e4c848..b13cd183c74e 100644
--- a/packages/engine/Specs/Core/GeometryAttributeSpec.js
+++ b/packages/engine/Specs/Core/GeometryAttributeSpec.js
@@ -13,7 +13,18 @@ describe("Core/GeometryAttribute", function () {
expect(color.componentsPerAttribute).toEqual(4);
expect(color.normalize).toEqual(true);
expect(color.values).toEqual([
- 255, 0, 0, 255, 0, 255, 0, 255, 0, 0, 255, 255,
+ 255,
+ 0,
+ 0,
+ 255,
+ 0,
+ 255,
+ 0,
+ 255,
+ 0,
+ 0,
+ 255,
+ 255,
]);
});
@@ -22,7 +33,18 @@ describe("Core/GeometryAttribute", function () {
return new GeometryAttribute({
componentsPerAttribute: 4,
values: new Uint8Array([
- 255, 0, 0, 255, 0, 255, 0, 255, 0, 0, 255, 255,
+ 255,
+ 0,
+ 0,
+ 255,
+ 0,
+ 255,
+ 0,
+ 255,
+ 0,
+ 0,
+ 255,
+ 255,
]),
});
}).toThrowDeveloperError();
@@ -33,7 +55,18 @@ describe("Core/GeometryAttribute", function () {
return new GeometryAttribute({
componentDatatype: ComponentDatatype.UNSIGNED_BYTE,
values: new Uint8Array([
- 255, 0, 0, 255, 0, 255, 0, 255, 0, 0, 255, 255,
+ 255,
+ 0,
+ 0,
+ 255,
+ 0,
+ 255,
+ 0,
+ 255,
+ 0,
+ 0,
+ 255,
+ 255,
]),
});
}).toThrowDeveloperError();
@@ -45,7 +78,18 @@ describe("Core/GeometryAttribute", function () {
componentDatatype: ComponentDatatype.UNSIGNED_BYTE,
componentsPerAttribute: 7,
values: new Uint8Array([
- 255, 0, 0, 255, 0, 255, 0, 255, 0, 0, 255, 255,
+ 255,
+ 0,
+ 0,
+ 255,
+ 0,
+ 255,
+ 0,
+ 255,
+ 0,
+ 0,
+ 255,
+ 255,
]),
});
}).toThrowDeveloperError();
diff --git a/packages/engine/Specs/Core/GeometryInstanceSpec.js b/packages/engine/Specs/Core/GeometryInstanceSpec.js
index 7efb5bd1da72..a6ea60e5be1d 100644
--- a/packages/engine/Specs/Core/GeometryInstanceSpec.js
+++ b/packages/engine/Specs/Core/GeometryInstanceSpec.js
@@ -18,7 +18,15 @@ describe("Core/GeometryInstance", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
]),
}),
},
@@ -29,7 +37,7 @@ describe("Core/GeometryInstance", function () {
const modelMatrix = Matrix4.multiplyByTranslation(
Matrix4.IDENTITY,
new Cartesian3(0.0, 0.0, 9000000.0),
- new Matrix4(),
+ new Matrix4()
);
const attributes = {
color: new GeometryInstanceAttribute({
diff --git a/packages/engine/Specs/Core/GeometryPipelineSpec.js b/packages/engine/Specs/Core/GeometryPipelineSpec.js
index 3d1843964c56..4cba2dd3c472 100644
--- a/packages/engine/Specs/Core/GeometryPipelineSpec.js
+++ b/packages/engine/Specs/Core/GeometryPipelineSpec.js
@@ -29,7 +29,7 @@ describe("Core/GeometryPipeline", function () {
attributes: {},
indices: [0, 1, 2, 3, 4, 5],
primitiveType: PrimitiveType.TRIANGLES,
- }),
+ })
);
expect(geometry.primitiveType).toEqual(PrimitiveType.LINES);
@@ -58,7 +58,7 @@ describe("Core/GeometryPipeline", function () {
attributes: {},
indices: [0, 1, 2, 3],
primitiveType: PrimitiveType.TRIANGLE_FAN,
- }),
+ })
);
expect(geometry.primitiveType).toEqual(PrimitiveType.LINES);
@@ -87,7 +87,7 @@ describe("Core/GeometryPipeline", function () {
attributes: {},
indices: [0, 1, 2, 3],
primitiveType: PrimitiveType.TRIANGLE_STRIP,
- }),
+ })
);
expect(geometry.primitiveType).toEqual(PrimitiveType.LINES);
@@ -123,7 +123,7 @@ describe("Core/GeometryPipeline", function () {
attributes: {},
indices: [],
primitiveType: PrimitiveType.POINTS,
- }),
+ })
);
}).toThrowDeveloperError();
});
@@ -148,11 +148,27 @@ describe("Core/GeometryPipeline", function () {
const lines = GeometryPipeline.createLineSegmentsForVectors(
geometry,
"normal",
- 1.0,
+ 1.0
);
const linePositions = [
- 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0,
- 0.0, 1.0, 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 1.0,
];
expect(lines.attributes).toBeDefined();
@@ -161,7 +177,7 @@ describe("Core/GeometryPipeline", function () {
expect(lines.primitiveType).toEqual(PrimitiveType.LINES);
expect(lines.boundingSphere.center).toEqual(geometry.boundingSphere.center);
expect(lines.boundingSphere.radius).toEqual(
- geometry.boundingSphere.radius + 1.0,
+ geometry.boundingSphere.radius + 1.0
);
});
@@ -244,8 +260,24 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.FLOAT,
componentsPerAttribute: 3,
values: [
- 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0,
- 13.0, 14.0, 15.0, 16.0, 17.0,
+ 0.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0,
+ 10.0,
+ 11.0,
+ 12.0,
+ 13.0,
+ 14.0,
+ 15.0,
+ 16.0,
+ 17.0,
],
}),
},
@@ -307,8 +339,24 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.FLOAT,
componentsPerAttribute: 3,
values: [
- 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0,
- 13.0, 14.0, 15.0, 16.0, 17.0,
+ 0.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0,
+ 10.0,
+ 11.0,
+ 12.0,
+ 13.0,
+ 14.0,
+ 15.0,
+ 16.0,
+ 17.0,
],
}),
},
@@ -418,7 +466,7 @@ describe("Core/GeometryPipeline", function () {
expect(geometries.length).toEqual(1);
expect(geometries[0].attributes.time.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(geometries[0].attributes.time.componentsPerAttribute).toEqual(1);
expect(geometries[0].attributes.time.values).toEqual([0, sixtyFourK]);
@@ -458,7 +506,7 @@ describe("Core/GeometryPipeline", function () {
expect(geometries.length).toEqual(2);
expect(geometries[0].attributes.position.values.length).toEqual(
- positions.length - 6,
+ positions.length - 6
); // Two vertices are not copied (0, 1)
expect(geometries[0].indices.length).toEqual(indices.length - 3); // One triangle is not copied (0, 1, 2)
@@ -497,7 +545,7 @@ describe("Core/GeometryPipeline", function () {
expect(geometries.length).toEqual(2);
expect(geometries[0].attributes.position.values.length).toEqual(
- positions.length - 12,
+ positions.length - 12
); // Four vertices are not copied
expect(geometries[0].indices.length).toEqual(indices.length - 4); // Two lines are not copied
@@ -532,7 +580,7 @@ describe("Core/GeometryPipeline", function () {
expect(geometries.length).toEqual(2);
expect(geometries[0].attributes.position.values.length).toEqual(
- positions.length - 6,
+ positions.length - 6
); // Two vertices are not copied
expect(geometries[0].indices.length).toEqual(indices.length - 2); // Two points are not copied
@@ -603,16 +651,16 @@ describe("Core/GeometryPipeline", function () {
geometry,
"position",
"position3D",
- "position2D",
+ "position2D"
);
const ellipsoid = Ellipsoid.WGS84;
const projection = new GeographicProjection();
const projectedP1 = projection.project(
- ellipsoid.cartesianToCartographic(p1),
+ ellipsoid.cartesianToCartographic(p1)
);
const projectedP2 = projection.project(
- ellipsoid.cartesianToCartographic(p2),
+ ellipsoid.cartesianToCartographic(p2)
);
expect(geometry.attributes.position2D.values[0]).toEqual(projectedP1.x);
@@ -648,7 +696,7 @@ describe("Core/GeometryPipeline", function () {
}),
},
primitiveType: PrimitiveType.POINTS,
- }),
+ })
);
}).toThrowDeveloperError();
});
@@ -666,7 +714,7 @@ describe("Core/GeometryPipeline", function () {
},
primitiveType: PrimitiveType.POINTS,
}),
- "position",
+ "position"
);
}).toThrowDeveloperError();
});
@@ -685,7 +733,7 @@ describe("Core/GeometryPipeline", function () {
primitiveType: PrimitiveType.POINTS,
}),
"position",
- "position3D",
+ "position3D"
);
}).toThrowDeveloperError();
});
@@ -705,7 +753,7 @@ describe("Core/GeometryPipeline", function () {
}),
"position",
"position3D",
- "position2D",
+ "position2D"
);
}).toThrowDeveloperError();
});
@@ -725,7 +773,7 @@ describe("Core/GeometryPipeline", function () {
geometry,
"position",
"position3D",
- "position2D",
+ "position2D"
);
}).toThrowDeveloperError();
});
@@ -744,7 +792,7 @@ describe("Core/GeometryPipeline", function () {
geometry,
"position",
"position3D",
- "position2D",
+ "position2D"
);
}).toThrowDeveloperError();
});
@@ -767,7 +815,7 @@ describe("Core/GeometryPipeline", function () {
geometry,
"position",
"positionHigh",
- "positionLow",
+ "positionLow"
);
expect(geometry.attributes.positionHigh).toBeDefined();
@@ -799,7 +847,7 @@ describe("Core/GeometryPipeline", function () {
}),
},
primitiveType: PrimitiveType.POINTS,
- }),
+ })
);
}).toThrowDeveloperError();
});
@@ -817,7 +865,7 @@ describe("Core/GeometryPipeline", function () {
},
primitiveType: PrimitiveType.POINTS,
}),
- "position",
+ "position"
);
}).toThrowDeveloperError();
});
@@ -836,7 +884,7 @@ describe("Core/GeometryPipeline", function () {
primitiveType: PrimitiveType.POINTS,
}),
"position",
- "positionHigh",
+ "positionHigh"
);
}).toThrowDeveloperError();
});
@@ -856,7 +904,7 @@ describe("Core/GeometryPipeline", function () {
}),
"position",
"positionHigh",
- "positionLow",
+ "positionLow"
);
}).toThrowDeveloperError();
});
@@ -876,7 +924,7 @@ describe("Core/GeometryPipeline", function () {
geometry,
"position",
"positionHigh",
- "positionLow",
+ "positionLow"
);
}).toThrowDeveloperError();
});
@@ -916,7 +964,7 @@ describe("Core/GeometryPipeline", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
),
});
@@ -925,13 +973,13 @@ describe("Core/GeometryPipeline", function () {
const transformedNormals = [1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0];
expect(transformed.geometry.attributes.position.values).toEqual(
- transformedPositions,
+ transformedPositions
);
expect(transformed.geometry.attributes.normal.values).toEqual(
- transformedNormals,
+ transformedNormals
);
expect(transformed.geometry.boundingSphere).toEqual(
- new BoundingSphere(new Cartesian3(0.0, 0.5, 0.5), 1.0),
+ new BoundingSphere(new Cartesian3(0.0, 0.5, 0.5), 1.0)
);
expect(transformed.modelMatrix).toEqual(Matrix4.IDENTITY);
});
@@ -963,13 +1011,13 @@ describe("Core/GeometryPipeline", function () {
const transformedNormals = [0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0];
expect(transformed.geometry.attributes.position.values).toEqual(
- transformedPositions,
+ transformedPositions
);
expect(transformed.geometry.attributes.normal.values).toEqual(
- transformedNormals,
+ transformedNormals
);
expect(transformed.geometry.boundingSphere).toEqual(
- new BoundingSphere(new Cartesian3(0.5, 1.0, 0.0), 4.0),
+ new BoundingSphere(new Cartesian3(0.5, 1.0, 0.0), 4.0)
);
expect(transformed.modelMatrix).toEqual(Matrix4.IDENTITY);
});
@@ -1001,13 +1049,13 @@ describe("Core/GeometryPipeline", function () {
const transformedNormals = [0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0];
expect(transformed.geometry.attributes.position.values).toEqual(
- transformedPositions,
+ transformedPositions
);
expect(transformed.geometry.attributes.normal.values).toEqual(
- transformedNormals,
+ transformedNormals
);
expect(transformed.geometry.boundingSphere).toEqual(
- new BoundingSphere(new Cartesian3(0.5, 0.5, 0.0), 1.0),
+ new BoundingSphere(new Cartesian3(0.5, 0.5, 0.0), 1.0)
);
expect(transformed.modelMatrix).toEqual(Matrix4.IDENTITY);
});
@@ -1076,7 +1124,7 @@ describe("Core/GeometryPipeline", function () {
}),
},
primitiveType: PrimitiveType.POINTS,
- }),
+ })
);
});
@@ -1124,14 +1172,30 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.FLOAT,
componentsPerAttribute: 3,
values: new Float32Array([
- 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, 4.0,
- 4.0, 4.0, 5.0, 5.0, 5.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 2.0,
+ 2.0,
+ 2.0,
+ 3.0,
+ 3.0,
+ 3.0,
+ 4.0,
+ 4.0,
+ 4.0,
+ 5.0,
+ 5.0,
+ 5.0,
]),
}),
},
indices: new Uint16Array([0, 1, 2, 3, 4, 5]),
primitiveType: PrimitiveType.TRIANGLES,
- }),
+ })
);
});
@@ -1142,23 +1206,37 @@ describe("Core/GeometryPipeline", function () {
geometry: PolygonGeometry.createGeometry(
PolygonGeometry.fromPositions({
positions: Cartesian3.fromDegreesArray([
- 179.0, 1.0, 179.0, -1.0, -179.0, -1.0, -179.0, 1.0,
+ 179.0,
+ 1.0,
+ 179.0,
+ -1.0,
+ -179.0,
+ -1.0,
+ -179.0,
+ 1.0,
]),
vertexFormat: VertexFormat.POSITION_ONLY,
granularity: 2.0 * CesiumMath.RADIANS_PER_DEGREE,
- }),
+ })
),
- }),
+ })
),
new GeometryInstance({
geometry: PolygonGeometry.createGeometry(
PolygonGeometry.fromPositions({
positions: Cartesian3.fromDegreesArray([
- -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
]),
vertexFormat: VertexFormat.POSITION_ONLY,
granularity: 2.0 * CesiumMath.RADIANS_PER_DEGREE,
- }),
+ })
),
}),
];
@@ -1203,7 +1281,7 @@ describe("Core/GeometryPipeline", function () {
])[0];
const expected = BoundingSphere.union(
instance.geometry.boundingSphere,
- anotherInstance.geometry.boundingSphere,
+ anotherInstance.geometry.boundingSphere
);
expect(combined.boundingSphere).toEqual(expected);
});
@@ -1405,7 +1483,15 @@ describe("Core/GeometryPipeline", function () {
expect(geometry.attributes.normal.values.length).toEqual(3 * 3);
expect(geometry.attributes.normal.values).toEqual([
- 0, 0, 1, 0, 0, 1, 0, 0, 1,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 1,
]);
});
@@ -1431,21 +1517,21 @@ describe("Core/GeometryPipeline", function () {
expect(Cartesian3.fromArray(normals, 0)).toEqualEpsilon(
a,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(Cartesian3.fromArray(normals, 3)).toEqualEpsilon(
Cartesian3.UNIT_Z,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(Cartesian3.fromArray(normals, 6)).toEqualEpsilon(
Cartesian3.UNIT_Z,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
a = Cartesian3.normalize(new Cartesian3(1, 0, 1), new Cartesian3());
expect(Cartesian3.fromArray(normals, 9)).toEqualEpsilon(
a,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -1454,7 +1540,27 @@ describe("Core/GeometryPipeline", function () {
attributes: {
position: new GeometryAttribute({
values: [
- 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 1,
+ 0,
+ 1,
+ 0,
+ 0,
+ 1,
+ 0,
+ 1,
+ 1,
+ 0,
+ 1,
+ 0,
+ 1,
+ 1,
+ 0,
],
componentsPerAttribute: 3,
componentDatatype: ComponentDatatype.FLOAT,
@@ -1472,40 +1578,40 @@ describe("Core/GeometryPipeline", function () {
let a = Cartesian3.normalize(new Cartesian3(-1, -1, -1), new Cartesian3());
expect(Cartesian3.fromArray(normals, 0)).toEqualEpsilon(
a,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
a = Cartesian3.normalize(new Cartesian3(0, -1, -1), new Cartesian3());
expect(Cartesian3.fromArray(normals, 3)).toEqualEpsilon(
a,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(Cartesian3.fromArray(normals, 6)).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_Y, new Cartesian3()),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
a = Cartesian3.normalize(new Cartesian3(-1, -1, 0), new Cartesian3());
expect(Cartesian3.fromArray(normals, 9)).toEqualEpsilon(
a,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(Cartesian3.fromArray(normals, 12)).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_X, new Cartesian3()),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
a = Cartesian3.normalize(new Cartesian3(-1, 0, -1), new Cartesian3());
expect(Cartesian3.fromArray(normals, 15)).toEqualEpsilon(
a,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(Cartesian3.fromArray(normals, 18)).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -1550,15 +1656,15 @@ describe("Core/GeometryPipeline", function () {
expect(Cartesian3.fromArray(normals, 0)).toEqualEpsilon(
a,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(Cartesian3.fromArray(normals, 3)).toEqualEpsilon(
a,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(Cartesian3.fromArray(normals, 6)).toEqualEpsilon(
a,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -1742,10 +1848,26 @@ describe("Core/GeometryPipeline", function () {
geometry = GeometryPipeline.computeTangentAndBitangent(geometry);
expect(geometry.attributes.tangent.values).toEqual([
- 1, 0, 0, 1, 0, 0, 1, 0, 0,
+ 1,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
]);
expect(geometry.attributes.bitangent.values).toEqual([
- 0, 1, 0, 0, 1, 0, 0, 1, 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 1,
+ 0,
]);
});
@@ -1771,17 +1893,37 @@ describe("Core/GeometryPipeline", function () {
geometry = GeometryPipeline.computeTangentAndBitangent(geometry);
expect(geometry.attributes.tangent.values).toEqualEpsilon(
[
- 0.7071067811865475, 0, 0.7071067811865475, 0, 1, 0, 0, 1, 0,
- -0.5773502691896258, 0.5773502691896258, 0.5773502691896258,
+ 0.7071067811865475,
+ 0,
+ 0.7071067811865475,
+ 0,
+ 1,
+ 0,
+ 0,
+ 1,
+ 0,
+ -0.5773502691896258,
+ 0.5773502691896258,
+ 0.5773502691896258,
],
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(geometry.attributes.bitangent.values).toEqualEpsilon(
[
- 0, 1, 0, -1, 0, 0, -1, 0, 0, -0.4082482904638631, -0.8164965809277261,
+ 0,
+ 1,
+ 0,
+ -1,
+ 0,
+ 0,
+ -1,
+ 0,
+ 0,
+ -0.4082482904638631,
+ -0.8164965809277261,
0.4082482904638631,
],
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -1795,7 +1937,7 @@ describe("Core/GeometryPipeline", function () {
}),
maximum: new Cartesian3(250000.0, 250000.0, 250000.0),
minimum: new Cartesian3(-250000.0, -250000.0, -250000.0),
- }),
+ })
);
geometry = GeometryPipeline.computeTangentAndBitangent(geometry);
const actualTangents = geometry.attributes.tangent.values;
@@ -1806,7 +1948,7 @@ describe("Core/GeometryPipeline", function () {
vertexFormat: VertexFormat.ALL,
maximum: new Cartesian3(250000.0, 250000.0, 250000.0),
minimum: new Cartesian3(-250000.0, -250000.0, -250000.0),
- }),
+ })
);
const expectedTangents = expectedGeometry.attributes.tangent.values;
const expectedBitangents = expectedGeometry.attributes.bitangent.values;
@@ -1839,7 +1981,7 @@ describe("Core/GeometryPipeline", function () {
}),
maximum: new Cartesian3(250000.0, 250000.0, 250000.0),
minimum: new Cartesian3(-250000.0, -250000.0, -250000.0),
- }),
+ })
);
expect(geometry.attributes.normal).not.toBeDefined();
geometry = GeometryPipeline.compressVertices(geometry);
@@ -1855,7 +1997,7 @@ describe("Core/GeometryPipeline", function () {
}),
maximum: new Cartesian3(250000.0, 250000.0, 250000.0),
minimum: new Cartesian3(-250000.0, -250000.0, -250000.0),
- }),
+ })
);
expect(geometry.attributes.normal).toBeDefined();
const originalNormals = geometry.attributes.normal.values.slice();
@@ -1869,10 +2011,10 @@ describe("Core/GeometryPipeline", function () {
for (let i = 0; i < normals.length; ++i) {
expect(
- AttributeCompression.octDecodeFloat(normals[i], new Cartesian3()),
+ AttributeCompression.octDecodeFloat(normals[i], new Cartesian3())
).toEqualEpsilon(
Cartesian3.fromArray(originalNormals, i * 3),
- CesiumMath.EPSILON2,
+ CesiumMath.EPSILON2
);
}
});
@@ -1886,7 +2028,7 @@ describe("Core/GeometryPipeline", function () {
}),
maximum: new Cartesian3(250000.0, 250000.0, 250000.0),
minimum: new Cartesian3(-250000.0, -250000.0, -250000.0),
- }),
+ })
);
expect(geometry.attributes.st).toBeDefined();
const originalST = geometry.attributes.st.values.slice();
@@ -1906,7 +2048,7 @@ describe("Core/GeometryPipeline", function () {
const texCoord = new Cartesian2(stx, sty);
expect(texCoord).toEqualEpsilon(
Cartesian2.fromArray(originalST, i * 2, new Cartesian2()),
- CesiumMath.EPSILON2,
+ CesiumMath.EPSILON2
);
}
});
@@ -1921,7 +2063,7 @@ describe("Core/GeometryPipeline", function () {
}),
maximum: new Cartesian3(250000.0, 250000.0, 250000.0),
minimum: new Cartesian3(-250000.0, -250000.0, -250000.0),
- }),
+ })
);
expect(geometry.attributes.normal).toBeDefined();
expect(geometry.attributes.st).toBeDefined();
@@ -1941,17 +2083,17 @@ describe("Core/GeometryPipeline", function () {
expect(
AttributeCompression.decompressTextureCoordinates(
stNormal[i],
- new Cartesian2(),
- ),
+ new Cartesian2()
+ )
).toEqualEpsilon(
Cartesian2.fromArray(originalST, i, new Cartesian2()),
- CesiumMath.EPSILON2,
+ CesiumMath.EPSILON2
);
expect(
- AttributeCompression.octDecodeFloat(stNormal[i + 1], new Cartesian3()),
+ AttributeCompression.octDecodeFloat(stNormal[i + 1], new Cartesian3())
).toEqualEpsilon(
Cartesian3.fromArray(originalNormals, (i / 2) * 3),
- CesiumMath.EPSILON2,
+ CesiumMath.EPSILON2
);
}
});
@@ -1967,7 +2109,7 @@ describe("Core/GeometryPipeline", function () {
}),
maximum: new Cartesian3(250000.0, 250000.0, 250000.0),
minimum: new Cartesian3(-250000.0, -250000.0, -250000.0),
- }),
+ })
);
expect(geometry.attributes.normal).toBeDefined();
expect(geometry.attributes.tangent).toBeDefined();
@@ -1993,21 +2135,21 @@ describe("Core/GeometryPipeline", function () {
const compressed = Cartesian2.fromArray(
compressedNormals,
i,
- new Cartesian2(),
+ new Cartesian2()
);
AttributeCompression.octUnpack(compressed, normal, tangent, bitangent);
expect(normal).toEqualEpsilon(
Cartesian3.fromArray(originalNormals, (i / 2) * 3),
- CesiumMath.EPSILON2,
+ CesiumMath.EPSILON2
);
expect(tangent).toEqualEpsilon(
Cartesian3.fromArray(originalTangents, (i / 2) * 3),
- CesiumMath.EPSILON2,
+ CesiumMath.EPSILON2
);
expect(bitangent).toEqualEpsilon(
Cartesian3.fromArray(originalBitangents, (i / 2) * 3),
- CesiumMath.EPSILON2,
+ CesiumMath.EPSILON2
);
}
});
@@ -2017,11 +2159,18 @@ describe("Core/GeometryPipeline", function () {
geometry: PolygonGeometry.createGeometry(
PolygonGeometry.fromPositions({
positions: Cartesian3.fromDegreesArray([
- -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
]),
vertexFormat: VertexFormat.POSITION_ONLY,
granularity: 2.0 * CesiumMath.RADIANS_PER_DEGREE,
- }),
+ })
),
});
@@ -2111,14 +2260,14 @@ describe("Core/GeometryPipeline", function () {
index = i * 2;
expect(newVec2s[index]).toBe(0);
expect(newVec2s[index + 1] === 255 || newVec2s[index + 1] === 127).toBe(
- true,
+ true
);
index = i * 3;
expect(newVec3s[index]).toBe(0);
expect(newVec3s[index + 1]).toBe(0);
expect(newVec3s[index + 2] === 255 || newVec3s[index + 2] === 127).toBe(
- true,
+ true
);
index = i * 4;
@@ -2126,7 +2275,7 @@ describe("Core/GeometryPipeline", function () {
expect(newVec4s[index + 1]).toBe(0);
expect(newVec4s[index + 2]).toBe(0);
expect(newVec4s[index + 3] === 255 || newVec4s[index + 3] === 127).toBe(
- true,
+ true
);
}
@@ -2149,14 +2298,14 @@ describe("Core/GeometryPipeline", function () {
index = i * 2;
expect(newVec2s[index]).toBe(0);
expect(newVec2s[index + 1] === 0 || newVec2s[index + 1] === 127).toBe(
- true,
+ true
);
index = i * 3;
expect(newVec3s[index]).toBe(0);
expect(newVec3s[index + 1]).toBe(0);
expect(newVec3s[index + 2] === 0 || newVec3s[index + 2] === 127).toBe(
- true,
+ true
);
index = i * 4;
@@ -2164,7 +2313,7 @@ describe("Core/GeometryPipeline", function () {
expect(newVec4s[index + 1]).toBe(0);
expect(newVec4s[index + 2]).toBe(0);
expect(newVec4s[index + 3] === 0 || newVec4s[index + 3] === 127).toBe(
- true,
+ true
);
}
});
@@ -2177,8 +2326,24 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 8.0, 7.0, 6.0, 5.0,
- 4.0, 3.0, 2.0, 1.0, 0.0,
+ 0.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 8.0,
+ 7.0,
+ 6.0,
+ 5.0,
+ 4.0,
+ 3.0,
+ 2.0,
+ 1.0,
+ 0.0,
]),
}),
},
@@ -2198,8 +2363,24 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 8.0, 7.0, 6.0, 5.0,
- 4.0, 3.0, 2.0, 1.0, 0.0,
+ 0.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 8.0,
+ 7.0,
+ 6.0,
+ 5.0,
+ 4.0,
+ 3.0,
+ 2.0,
+ 1.0,
+ 0.0,
]),
}),
},
@@ -2239,8 +2420,23 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 8.0, 7.0, 6.0, 5.0,
- 4.0, 3.0, 2.0, 1.0,
+ 0.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 8.0,
+ 7.0,
+ 6.0,
+ 5.0,
+ 4.0,
+ 3.0,
+ 2.0,
+ 1.0,
]),
}),
},
@@ -2261,7 +2457,18 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 8.0, 7.0, 6.0,
+ 0.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 8.0,
+ 7.0,
+ 6.0,
]),
}),
},
@@ -2301,8 +2508,24 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 8.0, 7.0, 6.0, 5.0,
- 4.0, 3.0, 2.0, 1.0, 0.0,
+ 0.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 8.0,
+ 7.0,
+ 6.0,
+ 5.0,
+ 4.0,
+ 3.0,
+ 2.0,
+ 1.0,
+ 0.0,
]),
}),
},
@@ -2313,7 +2536,18 @@ describe("Core/GeometryPipeline", function () {
GeometryPipeline.splitLongitude(instance);
expect(instance.geometry.primitiveType).toEqual(PrimitiveType.TRIANGLES);
expect(instance.geometry.indices).toEqual([
- 0, 1, 2, 0, 2, 3, 3, 2, 4, 3, 4, 5,
+ 0,
+ 1,
+ 2,
+ 0,
+ 2,
+ 3,
+ 3,
+ 2,
+ 4,
+ 3,
+ 4,
+ 5,
]);
});
@@ -2344,7 +2578,18 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 8.0, 7.0, 6.0,
+ 0.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 8.0,
+ 7.0,
+ 6.0,
]),
}),
},
@@ -2364,7 +2609,18 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 8.0, 7.0, 6.0,
+ 0.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 8.0,
+ 7.0,
+ 6.0,
]),
}),
},
@@ -2404,7 +2660,15 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0,
+ 0.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
]),
}),
},
@@ -2425,7 +2689,18 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 8.0, 7.0, 6.0,
+ 0.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 8.0,
+ 7.0,
+ 6.0,
]),
}),
},
@@ -2465,7 +2740,18 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 8.0, 7.0, 6.0,
+ 0.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 8.0,
+ 7.0,
+ 6.0,
]),
}),
},
@@ -2505,7 +2791,15 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, -1.0, 0.0, -1.0, 1.0, 2.0, -1.0, 2.0, 2.0,
+ -1.0,
+ -1.0,
+ 0.0,
+ -1.0,
+ 1.0,
+ 2.0,
+ -1.0,
+ 2.0,
+ 2.0,
]),
}),
},
@@ -2521,7 +2815,7 @@ describe("Core/GeometryPipeline", function () {
expect(instance.westHemisphereGeometry.indices.length).toEqual(3);
expect(instance.westHemisphereGeometry.attributes.position).toBeDefined();
expect(
- instance.westHemisphereGeometry.attributes.position.values.length,
+ instance.westHemisphereGeometry.attributes.position.values.length
).toEqual(3 * 3);
expect(instance.eastHemisphereGeometry).toBeDefined();
@@ -2529,7 +2823,7 @@ describe("Core/GeometryPipeline", function () {
expect(instance.eastHemisphereGeometry.indices.length).toEqual(6);
expect(instance.eastHemisphereGeometry.attributes.position).toBeDefined();
expect(
- instance.eastHemisphereGeometry.attributes.position.values.length,
+ instance.eastHemisphereGeometry.attributes.position.values.length
).toEqual(5 * 3);
});
@@ -2541,7 +2835,15 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, 1.0, 2.0, -1.0, -1.0, 0.0, -1.0, 2.0, 2.0,
+ -1.0,
+ 1.0,
+ 2.0,
+ -1.0,
+ -1.0,
+ 0.0,
+ -1.0,
+ 2.0,
+ 2.0,
]),
}),
},
@@ -2557,7 +2859,7 @@ describe("Core/GeometryPipeline", function () {
expect(instance.westHemisphereGeometry.indices.length).toEqual(3);
expect(instance.westHemisphereGeometry.attributes.position).toBeDefined();
expect(
- instance.westHemisphereGeometry.attributes.position.values.length,
+ instance.westHemisphereGeometry.attributes.position.values.length
).toEqual(3 * 3);
expect(instance.eastHemisphereGeometry).toBeDefined();
@@ -2565,7 +2867,7 @@ describe("Core/GeometryPipeline", function () {
expect(instance.eastHemisphereGeometry.indices.length).toEqual(6);
expect(instance.eastHemisphereGeometry.attributes.position).toBeDefined();
expect(
- instance.eastHemisphereGeometry.attributes.position.values.length,
+ instance.eastHemisphereGeometry.attributes.position.values.length
).toEqual(5 * 3);
});
@@ -2577,7 +2879,15 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, 1.0, 2.0, -1.0, 2.0, 2.0, -1.0, -1.0, 0.0,
+ -1.0,
+ 1.0,
+ 2.0,
+ -1.0,
+ 2.0,
+ 2.0,
+ -1.0,
+ -1.0,
+ 0.0,
]),
}),
},
@@ -2593,7 +2903,7 @@ describe("Core/GeometryPipeline", function () {
expect(instance.westHemisphereGeometry.indices.length).toEqual(3);
expect(instance.westHemisphereGeometry.attributes.position).toBeDefined();
expect(
- instance.westHemisphereGeometry.attributes.position.values.length,
+ instance.westHemisphereGeometry.attributes.position.values.length
).toEqual(3 * 3);
expect(instance.eastHemisphereGeometry).toBeDefined();
@@ -2601,7 +2911,7 @@ describe("Core/GeometryPipeline", function () {
expect(instance.eastHemisphereGeometry.indices.length).toEqual(6);
expect(instance.eastHemisphereGeometry.attributes.position).toBeDefined();
expect(
- instance.eastHemisphereGeometry.attributes.position.values.length,
+ instance.eastHemisphereGeometry.attributes.position.values.length
).toEqual(5 * 3);
});
@@ -2613,7 +2923,15 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, 1.0, 0.0, -1.0, -1.0, 0.0, -2.0, -1.0, 0.0,
+ -1.0,
+ 1.0,
+ 0.0,
+ -1.0,
+ -1.0,
+ 0.0,
+ -2.0,
+ -1.0,
+ 0.0,
]),
}),
},
@@ -2629,7 +2947,7 @@ describe("Core/GeometryPipeline", function () {
expect(instance.westHemisphereGeometry.indices.length).toEqual(6);
expect(instance.westHemisphereGeometry.attributes.position).toBeDefined();
expect(
- instance.westHemisphereGeometry.attributes.position.values.length,
+ instance.westHemisphereGeometry.attributes.position.values.length
).toEqual(5 * 3);
expect(instance.eastHemisphereGeometry).toBeDefined();
@@ -2637,7 +2955,7 @@ describe("Core/GeometryPipeline", function () {
expect(instance.eastHemisphereGeometry.indices.length).toEqual(3);
expect(instance.eastHemisphereGeometry.attributes.position).toBeDefined();
expect(
- instance.eastHemisphereGeometry.attributes.position.values.length,
+ instance.eastHemisphereGeometry.attributes.position.values.length
).toEqual(3 * 3);
});
@@ -2649,7 +2967,15 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -2.0, -1.0, 0.0, -1.0, 1.0, 0.0, -1.0, -1.0, 0.0,
+ -2.0,
+ -1.0,
+ 0.0,
+ -1.0,
+ 1.0,
+ 0.0,
+ -1.0,
+ -1.0,
+ 0.0,
]),
}),
},
@@ -2665,7 +2991,7 @@ describe("Core/GeometryPipeline", function () {
expect(instance.westHemisphereGeometry.indices.length).toEqual(6);
expect(instance.westHemisphereGeometry.attributes.position).toBeDefined();
expect(
- instance.westHemisphereGeometry.attributes.position.values.length,
+ instance.westHemisphereGeometry.attributes.position.values.length
).toEqual(5 * 3);
expect(instance.eastHemisphereGeometry).toBeDefined();
@@ -2673,7 +2999,7 @@ describe("Core/GeometryPipeline", function () {
expect(instance.eastHemisphereGeometry.indices.length).toEqual(3);
expect(instance.eastHemisphereGeometry.attributes.position).toBeDefined();
expect(
- instance.eastHemisphereGeometry.attributes.position.values.length,
+ instance.eastHemisphereGeometry.attributes.position.values.length
).toEqual(3 * 3);
});
@@ -2685,7 +3011,15 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, -1.0, 0.0, -2.0, -1.0, 0.0, -1.0, 1.0, 0.0,
+ -1.0,
+ -1.0,
+ 0.0,
+ -2.0,
+ -1.0,
+ 0.0,
+ -1.0,
+ 1.0,
+ 0.0,
]),
}),
},
@@ -2701,7 +3035,7 @@ describe("Core/GeometryPipeline", function () {
expect(instance.westHemisphereGeometry.indices.length).toEqual(6);
expect(instance.westHemisphereGeometry.attributes.position).toBeDefined();
expect(
- instance.westHemisphereGeometry.attributes.position.values.length,
+ instance.westHemisphereGeometry.attributes.position.values.length
).toEqual(5 * 3);
expect(instance.eastHemisphereGeometry).toBeDefined();
@@ -2709,7 +3043,7 @@ describe("Core/GeometryPipeline", function () {
expect(instance.eastHemisphereGeometry.indices.length).toEqual(3);
expect(instance.eastHemisphereGeometry.attributes.position).toBeDefined();
expect(
- instance.eastHemisphereGeometry.attributes.position.values.length,
+ instance.eastHemisphereGeometry.attributes.position.values.length
).toEqual(3 * 3);
});
@@ -2765,7 +3099,15 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, -1.0, 1.0, -1.0, -2.0, 1.0, -1.0, -2.0, 2.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ -2.0,
+ 1.0,
+ -1.0,
+ -2.0,
+ 2.0,
]),
}),
},
@@ -2780,7 +3122,15 @@ describe("Core/GeometryPipeline", function () {
const positions = geometry.attributes.position.values;
expect(positions).toEqual([
- -1.0, -1.0, 1.0, -1.0, -2.0, 1.0, -1.0, -2.0, 2.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ -2.0,
+ 1.0,
+ -1.0,
+ -2.0,
+ 2.0,
]);
expect(positions.length).toEqual(3 * 3);
});
@@ -2793,7 +3143,15 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, 1.0, 1.0, -1.0, 2.0, 1.0, -1.0, 2.0, 2.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 2.0,
+ 1.0,
+ -1.0,
+ 2.0,
+ 2.0,
]),
}),
},
@@ -2819,7 +3177,15 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- 1.0, 1.0, 1.0, 1.0, 2.0, 1.0, 1.0, 2.0, 2.0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 2.0,
+ 1.0,
+ 1.0,
+ 2.0,
+ 2.0,
]),
}),
},
@@ -2845,28 +3211,60 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -2.0, -1.0, 0.0, -3.0, 1.0, 0.0, -1.0, 1.0, 0.0,
+ -2.0,
+ -1.0,
+ 0.0,
+ -3.0,
+ 1.0,
+ 0.0,
+ -1.0,
+ 1.0,
+ 0.0,
]),
}),
normal: new GeometryAttribute({
componentDatatype: ComponentDatatype.FLOAT,
componentsPerAttribute: 3,
values: new Float32Array([
- 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 1.0,
]),
}),
tangent: new GeometryAttribute({
componentDatatype: ComponentDatatype.FLOAT,
componentsPerAttribute: 3,
values: new Float32Array([
- -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0,
+ -1.0,
+ 0.0,
+ 0.0,
+ -1.0,
+ 0.0,
+ 0.0,
+ -1.0,
+ 0.0,
+ 0.0,
]),
}),
bitangent: new GeometryAttribute({
componentDatatype: ComponentDatatype.FLOAT,
componentsPerAttribute: 3,
values: new Float32Array([
- 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0,
+ 0.0,
+ -1.0,
+ 0.0,
+ 0.0,
+ -1.0,
+ 0.0,
+ 0.0,
+ -1.0,
+ 0.0,
]),
}),
st: new GeometryAttribute({
@@ -2887,23 +3285,23 @@ describe("Core/GeometryPipeline", function () {
expect(instance.westHemisphereGeometry.indices.length).toEqual(3);
expect(instance.westHemisphereGeometry.attributes.position).toBeDefined();
expect(
- instance.westHemisphereGeometry.attributes.position.values.length,
+ instance.westHemisphereGeometry.attributes.position.values.length
).toEqual(3 * 3);
expect(instance.westHemisphereGeometry.attributes.normal).toBeDefined();
expect(
- instance.westHemisphereGeometry.attributes.normal.values.length,
+ instance.westHemisphereGeometry.attributes.normal.values.length
).toEqual(3 * 3);
expect(instance.westHemisphereGeometry.attributes.bitangent).toBeDefined();
expect(
- instance.westHemisphereGeometry.attributes.bitangent.values.length,
+ instance.westHemisphereGeometry.attributes.bitangent.values.length
).toEqual(3 * 3);
expect(instance.westHemisphereGeometry.attributes.tangent).toBeDefined();
expect(
- instance.westHemisphereGeometry.attributes.tangent.values.length,
+ instance.westHemisphereGeometry.attributes.tangent.values.length
).toEqual(3 * 3);
expect(instance.westHemisphereGeometry.attributes.st).toBeDefined();
expect(instance.westHemisphereGeometry.attributes.st.values.length).toEqual(
- 3 * 2,
+ 3 * 2
);
expect(instance.eastHemisphereGeometry).toBeDefined();
@@ -2911,23 +3309,23 @@ describe("Core/GeometryPipeline", function () {
expect(instance.eastHemisphereGeometry.indices.length).toEqual(6);
expect(instance.eastHemisphereGeometry.attributes.position).toBeDefined();
expect(
- instance.eastHemisphereGeometry.attributes.position.values.length,
+ instance.eastHemisphereGeometry.attributes.position.values.length
).toEqual(5 * 3);
expect(instance.eastHemisphereGeometry.attributes.normal).toBeDefined();
expect(
- instance.eastHemisphereGeometry.attributes.normal.values.length,
+ instance.eastHemisphereGeometry.attributes.normal.values.length
).toEqual(5 * 3);
expect(instance.eastHemisphereGeometry.attributes.bitangent).toBeDefined();
expect(
- instance.eastHemisphereGeometry.attributes.bitangent.values.length,
+ instance.eastHemisphereGeometry.attributes.bitangent.values.length
).toEqual(5 * 3);
expect(instance.eastHemisphereGeometry.attributes.tangent).toBeDefined();
expect(
- instance.eastHemisphereGeometry.attributes.tangent.values.length,
+ instance.eastHemisphereGeometry.attributes.tangent.values.length
).toEqual(5 * 3);
expect(instance.eastHemisphereGeometry.attributes.st).toBeDefined();
expect(instance.eastHemisphereGeometry.attributes.st.values.length).toEqual(
- 5 * 2,
+ 5 * 2
);
});
@@ -2953,7 +3351,7 @@ describe("Core/GeometryPipeline", function () {
expect(instance.westHemisphereGeometry.indices.length).toEqual(2);
expect(instance.westHemisphereGeometry.attributes.position).toBeDefined();
expect(
- instance.westHemisphereGeometry.attributes.position.values.length,
+ instance.westHemisphereGeometry.attributes.position.values.length
).toEqual(2 * 3);
expect(instance.eastHemisphereGeometry).toBeDefined();
@@ -2961,7 +3359,7 @@ describe("Core/GeometryPipeline", function () {
expect(instance.eastHemisphereGeometry.indices.length).toEqual(2);
expect(instance.eastHemisphereGeometry.attributes.position).toBeDefined();
expect(
- instance.eastHemisphereGeometry.attributes.position.values.length,
+ instance.eastHemisphereGeometry.attributes.position.values.length
).toEqual(2 * 3);
});
@@ -3042,7 +3440,17 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, -1.0, 0.0, -1.0, -1.0, 0.0, -1.0, 1.0, 2.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 0.0,
+ -1.0,
+ -1.0,
+ 0.0,
+ -1.0,
+ 1.0,
+ 2.0,
+ -1.0,
+ 1.0,
2.0,
]),
}),
@@ -3050,14 +3458,35 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, 1.0, 2.0, -1.0, 1.0, 2.0, -1.0, 2.0, 3.0, -1.0, 2.0, 3.0,
+ -1.0,
+ 1.0,
+ 2.0,
+ -1.0,
+ 1.0,
+ 2.0,
+ -1.0,
+ 2.0,
+ 3.0,
+ -1.0,
+ 2.0,
+ 3.0,
]),
}),
prevPosition: new GeometryAttribute({
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, -2.0, -1.0, -1.0, -2.0, -1.0, -1.0, -1.0, 0.0, -1.0, -1.0,
+ -1.0,
+ -2.0,
+ -1.0,
+ -1.0,
+ -2.0,
+ -1.0,
+ -1.0,
+ -1.0,
+ 0.0,
+ -1.0,
+ -1.0,
0.0,
]),
}),
@@ -3065,7 +3494,14 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.FLOAT,
componentsPerAttribute: 2,
values: new Float32Array([
- -1.0, 5.0, 1.0, 5.0, -1.0, -5.0, 1.0, -5.0,
+ -1.0,
+ 5.0,
+ 1.0,
+ 5.0,
+ -1.0,
+ -5.0,
+ 1.0,
+ -5.0,
]),
}),
},
@@ -3082,25 +3518,25 @@ describe("Core/GeometryPipeline", function () {
expect(instance.westHemisphereGeometry.indices.length).toEqual(6);
expect(instance.westHemisphereGeometry.attributes.position).toBeDefined();
expect(
- instance.westHemisphereGeometry.attributes.position.values.length,
+ instance.westHemisphereGeometry.attributes.position.values.length
).toEqual(4 * 3);
expect(
- instance.westHemisphereGeometry.attributes.nextPosition,
+ instance.westHemisphereGeometry.attributes.nextPosition
).toBeDefined();
expect(
- instance.westHemisphereGeometry.attributes.nextPosition.values.length,
+ instance.westHemisphereGeometry.attributes.nextPosition.values.length
).toEqual(4 * 3);
expect(
- instance.westHemisphereGeometry.attributes.prevPosition,
+ instance.westHemisphereGeometry.attributes.prevPosition
).toBeDefined();
expect(
- instance.westHemisphereGeometry.attributes.prevPosition.values.length,
+ instance.westHemisphereGeometry.attributes.prevPosition.values.length
).toEqual(4 * 3);
expect(
- instance.westHemisphereGeometry.attributes.expandAndWidth,
+ instance.westHemisphereGeometry.attributes.expandAndWidth
).toBeDefined();
expect(
- instance.westHemisphereGeometry.attributes.expandAndWidth.values.length,
+ instance.westHemisphereGeometry.attributes.expandAndWidth.values.length
).toEqual(4 * 2);
expect(instance.eastHemisphereGeometry).toBeDefined();
@@ -3108,25 +3544,25 @@ describe("Core/GeometryPipeline", function () {
expect(instance.eastHemisphereGeometry.indices.length).toEqual(6);
expect(instance.eastHemisphereGeometry.attributes.position).toBeDefined();
expect(
- instance.eastHemisphereGeometry.attributes.position.values.length,
+ instance.eastHemisphereGeometry.attributes.position.values.length
).toEqual(4 * 3);
expect(
- instance.eastHemisphereGeometry.attributes.nextPosition,
+ instance.eastHemisphereGeometry.attributes.nextPosition
).toBeDefined();
expect(
- instance.eastHemisphereGeometry.attributes.nextPosition.values.length,
+ instance.eastHemisphereGeometry.attributes.nextPosition.values.length
).toEqual(4 * 3);
expect(
- instance.eastHemisphereGeometry.attributes.prevPosition,
+ instance.eastHemisphereGeometry.attributes.prevPosition
).toBeDefined();
expect(
- instance.eastHemisphereGeometry.attributes.prevPosition.values.length,
+ instance.eastHemisphereGeometry.attributes.prevPosition.values.length
).toEqual(4 * 3);
expect(
- instance.eastHemisphereGeometry.attributes.expandAndWidth,
+ instance.eastHemisphereGeometry.attributes.expandAndWidth
).toBeDefined();
expect(
- instance.eastHemisphereGeometry.attributes.expandAndWidth.values.length,
+ instance.eastHemisphereGeometry.attributes.expandAndWidth.values.length
).toEqual(4 * 2);
});
@@ -3138,21 +3574,53 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 1.0, 2.0, -1.0, 1.0, 2.0,
+ -1.0,
+ 0.0,
+ 0.0,
+ -1.0,
+ 0.0,
+ 0.0,
+ -1.0,
+ 1.0,
+ 2.0,
+ -1.0,
+ 1.0,
+ 2.0,
]),
}),
nextPosition: new GeometryAttribute({
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, 1.0, 2.0, -1.0, 1.0, 2.0, -1.0, 2.0, 3.0, -1.0, 2.0, 3.0,
+ -1.0,
+ 1.0,
+ 2.0,
+ -1.0,
+ 1.0,
+ 2.0,
+ -1.0,
+ 2.0,
+ 3.0,
+ -1.0,
+ 2.0,
+ 3.0,
]),
}),
prevPosition: new GeometryAttribute({
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, -2.0, -1.0, -1.0, -2.0, -1.0, -1.0, 0.0, 0.0, -1.0, 0.0,
+ -1.0,
+ -2.0,
+ -1.0,
+ -1.0,
+ -2.0,
+ -1.0,
+ -1.0,
+ 0.0,
+ 0.0,
+ -1.0,
+ 0.0,
0.0,
]),
}),
@@ -3160,7 +3628,14 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.FLOAT,
componentsPerAttribute: 2,
values: new Float32Array([
- -1.0, 5.0, 1.0, 5.0, -1.0, -5.0, 1.0, -5.0,
+ -1.0,
+ 5.0,
+ 1.0,
+ 5.0,
+ -1.0,
+ -5.0,
+ 1.0,
+ -5.0,
]),
}),
},
@@ -3207,7 +3682,18 @@ describe("Core/GeometryPipeline", function () {
0.0,
]);
expect(nextPositions).toEqual([
- -1.0, 1.0, 2.0, -1.0, 1.0, 2.0, -1.0, 2.0, 3.0, -1.0, 2.0, 3.0,
+ -1.0,
+ 1.0,
+ 2.0,
+ -1.0,
+ 1.0,
+ 2.0,
+ -1.0,
+ 2.0,
+ 3.0,
+ -1.0,
+ 2.0,
+ 3.0,
]);
});
@@ -3219,7 +3705,17 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, -1.0, 2.0, -1.0, -1.0,
+ -1.0,
+ 0.0,
+ 0.0,
+ -1.0,
+ 0.0,
+ 0.0,
+ -1.0,
+ -1.0,
+ 2.0,
+ -1.0,
+ -1.0,
2.0,
]),
}),
@@ -3227,7 +3723,17 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, -1.0, 2.0, -1.0, -1.0, 2.0, -1.0, -2.0, 0.0, -1.0, -2.0,
+ -1.0,
+ -1.0,
+ 2.0,
+ -1.0,
+ -1.0,
+ 2.0,
+ -1.0,
+ -2.0,
+ 0.0,
+ -1.0,
+ -2.0,
0.0,
]),
}),
@@ -3235,7 +3741,17 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 0.0, 0.0, -1.0, 0.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ -1.0,
+ 0.0,
+ 0.0,
+ -1.0,
+ 0.0,
0.0,
]),
}),
@@ -3243,7 +3759,14 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.FLOAT,
componentsPerAttribute: 2,
values: new Float32Array([
- -1.0, 5.0, 1.0, 5.0, -1.0, -5.0, 1.0, -5.0,
+ -1.0,
+ 5.0,
+ 1.0,
+ 5.0,
+ -1.0,
+ -5.0,
+ 1.0,
+ -5.0,
]),
}),
},
@@ -3290,7 +3813,18 @@ describe("Core/GeometryPipeline", function () {
0.0,
]);
expect(nextPositions).toEqual([
- -1.0, -1.0, 2.0, -1.0, -1.0, 2.0, -1.0, -2.0, 0.0, -1.0, -2.0, 0.0,
+ -1.0,
+ -1.0,
+ 2.0,
+ -1.0,
+ -1.0,
+ 2.0,
+ -1.0,
+ -2.0,
+ 0.0,
+ -1.0,
+ -2.0,
+ 0.0,
]);
});
@@ -3302,14 +3836,35 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, 1.0, 2.0, -1.0, 1.0, 2.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0,
+ -1.0,
+ 1.0,
+ 2.0,
+ -1.0,
+ 1.0,
+ 2.0,
+ -1.0,
+ 0.0,
+ 0.0,
+ -1.0,
+ 0.0,
+ 0.0,
]),
}),
nextPosition: new GeometryAttribute({
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, -1.0, 2.0, -1.0, -1.0,
+ -1.0,
+ 0.0,
+ 0.0,
+ -1.0,
+ 0.0,
+ 0.0,
+ -1.0,
+ -1.0,
+ 2.0,
+ -1.0,
+ -1.0,
2.0,
]),
}),
@@ -3317,14 +3872,32 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -2.0, 2.0, 2.0, -1.0, 2.0, 2.0, -1.0, 1.0, 2.0, -1.0, 1.0, 2.0,
+ -2.0,
+ 2.0,
+ 2.0,
+ -1.0,
+ 2.0,
+ 2.0,
+ -1.0,
+ 1.0,
+ 2.0,
+ -1.0,
+ 1.0,
+ 2.0,
]),
}),
expandAndWidth: new GeometryAttribute({
componentDatatype: ComponentDatatype.FLOAT,
componentsPerAttribute: 2,
values: new Float32Array([
- -1.0, 5.0, 1.0, 5.0, -1.0, -5.0, 1.0, -5.0,
+ -1.0,
+ 5.0,
+ 1.0,
+ 5.0,
+ -1.0,
+ -5.0,
+ 1.0,
+ -5.0,
]),
}),
},
@@ -3371,7 +3944,18 @@ describe("Core/GeometryPipeline", function () {
0.0,
]);
expect(prevPositions).toEqual([
- -2.0, 2.0, 2.0, -1.0, 2.0, 2.0, -1.0, 1.0, 2.0, -1.0, 1.0, 2.0,
+ -2.0,
+ 2.0,
+ 2.0,
+ -1.0,
+ 2.0,
+ 2.0,
+ -1.0,
+ 1.0,
+ 2.0,
+ -1.0,
+ 1.0,
+ 2.0,
]);
});
@@ -3383,7 +3967,17 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, -1.0, 2.0, -1.0, -1.0, 2.0, -1.0, 0.0, 0.0, -1.0, 0.0,
+ -1.0,
+ -1.0,
+ 2.0,
+ -1.0,
+ -1.0,
+ 2.0,
+ -1.0,
+ 0.0,
+ 0.0,
+ -1.0,
+ 0.0,
0.0,
]),
}),
@@ -3391,14 +3985,35 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 1.0, 2.0, -1.0, 1.0, 2.0,
+ -1.0,
+ 0.0,
+ 0.0,
+ -1.0,
+ 0.0,
+ 0.0,
+ -1.0,
+ 1.0,
+ 2.0,
+ -1.0,
+ 1.0,
+ 2.0,
]),
}),
prevPosition: new GeometryAttribute({
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -2.0, -2.0, 2.0, -1.0, -2.0, 2.0, -1.0, -1.0, 2.0, -1.0, -1.0,
+ -2.0,
+ -2.0,
+ 2.0,
+ -1.0,
+ -2.0,
+ 2.0,
+ -1.0,
+ -1.0,
+ 2.0,
+ -1.0,
+ -1.0,
2.0,
]),
}),
@@ -3406,7 +4021,14 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.FLOAT,
componentsPerAttribute: 2,
values: new Float32Array([
- -1.0, 5.0, 1.0, 5.0, -1.0, -5.0, 1.0, -5.0,
+ -1.0,
+ 5.0,
+ 1.0,
+ 5.0,
+ -1.0,
+ -5.0,
+ 1.0,
+ -5.0,
]),
}),
},
@@ -3453,7 +4075,18 @@ describe("Core/GeometryPipeline", function () {
0.0,
]);
expect(prevPositions).toEqual([
- -2.0, -2.0, 2.0, -1.0, -2.0, 2.0, -1.0, -1.0, 2.0, -1.0, -1.0, 2.0,
+ -2.0,
+ -2.0,
+ 2.0,
+ -1.0,
+ -2.0,
+ 2.0,
+ -1.0,
+ -1.0,
+ 2.0,
+ -1.0,
+ -1.0,
+ 2.0,
]);
});
@@ -3465,21 +4098,53 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, 1.0, 0.0, -1.0, 1.0, 0.0, -1.0, 1.0, 2.0, -1.0, 1.0, 2.0,
+ -1.0,
+ 1.0,
+ 0.0,
+ -1.0,
+ 1.0,
+ 0.0,
+ -1.0,
+ 1.0,
+ 2.0,
+ -1.0,
+ 1.0,
+ 2.0,
]),
}),
nextPosition: new GeometryAttribute({
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, 1.0, 2.0, -1.0, 1.0, 2.0, -1.0, 2.0, 3.0, -1.0, 2.0, 3.0,
+ -1.0,
+ 1.0,
+ 2.0,
+ -1.0,
+ 1.0,
+ 2.0,
+ -1.0,
+ 2.0,
+ 3.0,
+ -1.0,
+ 2.0,
+ 3.0,
]),
}),
prevPosition: new GeometryAttribute({
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- -1.0, -2.0, -1.0, -1.0, -2.0, -1.0, -1.0, 0.0, 0.0, -1.0, 0.0,
+ -1.0,
+ -2.0,
+ -1.0,
+ -1.0,
+ -2.0,
+ -1.0,
+ -1.0,
+ 0.0,
+ 0.0,
+ -1.0,
+ 0.0,
0.0,
]),
}),
@@ -3487,7 +4152,14 @@ describe("Core/GeometryPipeline", function () {
componentDatatype: ComponentDatatype.FLOAT,
componentsPerAttribute: 2,
values: new Float32Array([
- -1.0, 5.0, 1.0, 5.0, -1.0, -5.0, 1.0, -5.0,
+ -1.0,
+ 5.0,
+ 1.0,
+ 5.0,
+ -1.0,
+ -5.0,
+ 1.0,
+ -5.0,
]),
}),
},
@@ -3503,7 +4175,18 @@ describe("Core/GeometryPipeline", function () {
const positions = geometry.attributes.position.values;
expect(positions).toEqual([
- -1.0, 1.0, 0.0, -1.0, 1.0, 0.0, -1.0, 1.0, 2.0, -1.0, 1.0, 2.0,
+ -1.0,
+ 1.0,
+ 0.0,
+ -1.0,
+ 1.0,
+ 0.0,
+ -1.0,
+ 1.0,
+ 2.0,
+ -1.0,
+ 1.0,
+ 2.0,
]);
});
});
diff --git a/packages/engine/Specs/Core/GeometrySpec.js b/packages/engine/Specs/Core/GeometrySpec.js
index 2388cf5fb021..c07668cb52ea 100644
--- a/packages/engine/Specs/Core/GeometrySpec.js
+++ b/packages/engine/Specs/Core/GeometrySpec.js
@@ -23,7 +23,7 @@ describe("Core/Geometry", function () {
const indices = new Uint16Array([0, 1, 2]);
const boundingSphere = new BoundingSphere(
new Cartesian3(0.5, 0.5, 0.0),
- 1.0,
+ 1.0
);
const geometry = new Geometry({
@@ -65,7 +65,7 @@ describe("Core/Geometry", function () {
const indices = new Uint16Array([0, 1, 2]);
const boundingSphere = new BoundingSphere(
new Cartesian3(0.5, 0.5, 0.0),
- 1.0,
+ 1.0
);
const geometry = new Geometry({
@@ -94,7 +94,7 @@ describe("Core/Geometry", function () {
const indices = new Uint16Array([0, 1, 2]);
const boundingSphere = new BoundingSphere(
new Cartesian3(0.5, 0.5, 0.0),
- 1.0,
+ 1.0
);
const geometry = new Geometry({
@@ -117,40 +117,50 @@ describe("Core/Geometry", function () {
it("computes textureCoordinateRotationPoints for collections of points", function () {
const positions = Cartesian3.fromDegreesArrayHeights([
- -10.0, -10.0, 0, -10.0, 10.0, 0, 10.0, -10.0, 0, 10.0, 10.0, 0,
+ -10.0,
+ -10.0,
+ 0,
+ -10.0,
+ 10.0,
+ 0,
+ 10.0,
+ -10.0,
+ 0,
+ 10.0,
+ 10.0,
+ 0,
]);
const boundingRectangle = Rectangle.fromCartesianArray(positions);
- const textureCoordinateRotationPoints =
- Geometry._textureCoordinateRotationPoints(
- positions,
- 0.0,
- Ellipsoid.WGS84,
- boundingRectangle,
- );
+ const textureCoordinateRotationPoints = Geometry._textureCoordinateRotationPoints(
+ positions,
+ 0.0,
+ Ellipsoid.WGS84,
+ boundingRectangle
+ );
expect(textureCoordinateRotationPoints.length).toEqual(6);
expect(textureCoordinateRotationPoints[0]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[1]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[2]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[3]).toEqualEpsilon(
1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[4]).toEqualEpsilon(
1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[5]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
});
diff --git a/packages/engine/Specs/Core/GoogleEarthEnterpriseMetadataSpec.js b/packages/engine/Specs/Core/GoogleEarthEnterpriseMetadataSpec.js
index ba106dde17b9..c0b0996b981b 100644
--- a/packages/engine/Specs/Core/GoogleEarthEnterpriseMetadataSpec.js
+++ b/packages/engine/Specs/Core/GoogleEarthEnterpriseMetadataSpec.js
@@ -13,13 +13,13 @@ describe("Core/GoogleEarthEnterpriseMetadata", function () {
it("tileXYToQuadKey", function () {
expect(GoogleEarthEnterpriseMetadata.tileXYToQuadKey(1, 0, 0)).toEqual("2");
expect(GoogleEarthEnterpriseMetadata.tileXYToQuadKey(1, 2, 1)).toEqual(
- "02",
+ "02"
);
expect(GoogleEarthEnterpriseMetadata.tileXYToQuadKey(3, 5, 2)).toEqual(
- "021",
+ "021"
);
expect(GoogleEarthEnterpriseMetadata.tileXYToQuadKey(4, 7, 2)).toEqual(
- "100",
+ "100"
);
});
@@ -113,41 +113,42 @@ describe("Core/GoogleEarthEnterpriseMetadata", function () {
let index = 0;
spyOn(
GoogleEarthEnterpriseMetadata.prototype,
- "getQuadTreePacket",
+ "getQuadTreePacket"
).and.callFake(function (quadKey, version, request) {
quadKey = defaultValue(quadKey, "") + index.toString();
this._tileInfo[quadKey] = new GoogleEarthEnterpriseTileInformation(
0xff,
1,
1,
- 1,
+ 1
);
index = (index + 1) % 4;
return Promise.resolve();
});
- const metadata =
- await GoogleEarthEnterpriseMetadata.fromUrl("http://test.server");
+ const metadata = await GoogleEarthEnterpriseMetadata.fromUrl(
+ "http://test.server"
+ );
const request = new Request({
throttle: true,
});
const tileXY = GoogleEarthEnterpriseMetadata.quadKeyToTileXY(quad);
await metadata.populateSubtree(tileXY.x, tileXY.y, tileXY.level, request);
expect(
- GoogleEarthEnterpriseMetadata.prototype.getQuadTreePacket.calls.count(),
+ GoogleEarthEnterpriseMetadata.prototype.getQuadTreePacket.calls.count()
).toEqual(4);
expect(
- GoogleEarthEnterpriseMetadata.prototype.getQuadTreePacket,
+ GoogleEarthEnterpriseMetadata.prototype.getQuadTreePacket
).toHaveBeenCalledWith("", 1);
expect(
- GoogleEarthEnterpriseMetadata.prototype.getQuadTreePacket,
+ GoogleEarthEnterpriseMetadata.prototype.getQuadTreePacket
).toHaveBeenCalledWith("0", 1, request);
expect(
- GoogleEarthEnterpriseMetadata.prototype.getQuadTreePacket,
+ GoogleEarthEnterpriseMetadata.prototype.getQuadTreePacket
).toHaveBeenCalledWith("01", 1, request);
expect(
- GoogleEarthEnterpriseMetadata.prototype.getQuadTreePacket,
+ GoogleEarthEnterpriseMetadata.prototype.getQuadTreePacket
).toHaveBeenCalledWith("012", 1, request);
const tileInfo = metadata._tileInfo;
@@ -161,34 +162,32 @@ describe("Core/GoogleEarthEnterpriseMetadata", function () {
const baseurl = "http://fake.fake.invalid/";
let req = 0;
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- expect(responseType).toEqual("arraybuffer");
- if (req === 0) {
- expect(url).toEqual(`${baseurl}dbRoot.v5?output=proto`);
- deferred.reject(); // Reject dbRoot request and use defaults
- } else {
- expect(url).toEqual(`${baseurl}flatfile?q2-0-q.1`);
- Resource._DefaultImplementations.loadWithXhr(
- "Data/GoogleEarthEnterprise/gee.metadata",
- responseType,
- method,
- data,
- headers,
- deferred,
- );
- }
- ++req;
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ expect(responseType).toEqual("arraybuffer");
+ if (req === 0) {
+ expect(url).toEqual(`${baseurl}dbRoot.v5?output=proto`);
+ deferred.reject(); // Reject dbRoot request and use defaults
+ } else {
+ expect(url).toEqual(`${baseurl}flatfile?q2-0-q.1`);
+ Resource._DefaultImplementations.loadWithXhr(
+ "Data/GoogleEarthEnterprise/gee.metadata",
+ responseType,
+ method,
+ data,
+ headers,
+ deferred
+ );
+ }
+ ++req;
+ });
const provider = await GoogleEarthEnterpriseMetadata.fromUrl(baseurl);
@@ -216,34 +215,32 @@ describe("Core/GoogleEarthEnterpriseMetadata", function () {
});
let req = 0;
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- expect(responseType).toEqual("arraybuffer");
- if (req === 0) {
- expect(url).toEqual(`${baseurl}dbRoot.v5?output=proto`);
- deferred.reject(); // Reject dbRoot request and use defaults
- } else {
- expect(url).toEqual(`${baseurl}flatfile?q2-0-q.1`);
- Resource._DefaultImplementations.loadWithXhr(
- "Data/GoogleEarthEnterprise/gee.metadata",
- responseType,
- method,
- data,
- headers,
- deferred,
- );
- }
- ++req;
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ expect(responseType).toEqual("arraybuffer");
+ if (req === 0) {
+ expect(url).toEqual(`${baseurl}dbRoot.v5?output=proto`);
+ deferred.reject(); // Reject dbRoot request and use defaults
+ } else {
+ expect(url).toEqual(`${baseurl}flatfile?q2-0-q.1`);
+ Resource._DefaultImplementations.loadWithXhr(
+ "Data/GoogleEarthEnterprise/gee.metadata",
+ responseType,
+ method,
+ data,
+ headers,
+ deferred
+ );
+ }
+ ++req;
+ });
const metadata = await GoogleEarthEnterpriseMetadata.fromUrl(resource);
@@ -267,10 +264,10 @@ describe("Core/GoogleEarthEnterpriseMetadata", function () {
it("fromUrl rejects on error", async function () {
const url = "host.invalid/";
await expectAsync(
- GoogleEarthEnterpriseMetadata.fromUrl(url),
+ GoogleEarthEnterpriseMetadata.fromUrl(url)
).toBeRejectedWithError(
RuntimeError,
- new RegExp("Request has failed. Status Code: 404"),
+ new RegExp("Request has failed. Status Code: 404")
);
});
});
diff --git a/packages/engine/Specs/Core/GoogleEarthEnterpriseTerrainDataSpec.js b/packages/engine/Specs/Core/GoogleEarthEnterpriseTerrainDataSpec.js
index 6835b4ca3030..25bc601ff706 100644
--- a/packages/engine/Specs/Core/GoogleEarthEnterpriseTerrainDataSpec.js
+++ b/packages/engine/Specs/Core/GoogleEarthEnterpriseTerrainDataSpec.js
@@ -153,7 +153,7 @@ describe("Core/GoogleEarthEnterpriseTerrainData", function () {
x: 0,
y: 0,
level: 0,
- }),
+ })
)
.then(function () {
const swPromise = data.upsample(tilingScheme, 0, 0, 0, 0, 0, 1);
@@ -206,7 +206,7 @@ describe("Core/GoogleEarthEnterpriseTerrainData", function () {
CesiumMath.equalsEpsilon(
v,
rectangle.south,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
)
) {
++south;
@@ -214,7 +214,7 @@ describe("Core/GoogleEarthEnterpriseTerrainData", function () {
CesiumMath.equalsEpsilon(
v,
rectangle.north,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
)
) {
++north;
@@ -329,7 +329,7 @@ describe("Core/GoogleEarthEnterpriseTerrainData", function () {
encoding.decodePosition(mesh.vertices, i, cartesian);
wgs84.cartesianToCartographic(cartesian, cartographic);
cartographic.longitude = CesiumMath.convertLongitudeRange(
- cartographic.longitude,
+ cartographic.longitude
);
expect(Rectangle.contains(rectangle, cartographic)).toBe(true);
} else {
@@ -396,7 +396,7 @@ describe("Core/GoogleEarthEnterpriseTerrainData", function () {
it("clamps coordinates if given a position outside the mesh", function () {
expect(mesh.interpolateHeight(rectangle, 0.0, 0.0)).toBe(
- mesh.interpolateHeight(rectangle, rectangle.east, rectangle.south),
+ mesh.interpolateHeight(rectangle, rectangle.east, rectangle.south)
);
});
diff --git a/packages/engine/Specs/Core/GoogleEarthEnterpriseTerrainProviderSpec.js b/packages/engine/Specs/Core/GoogleEarthEnterpriseTerrainProviderSpec.js
index 57ccdbf5ae7a..8927fca15e42 100644
--- a/packages/engine/Specs/Core/GoogleEarthEnterpriseTerrainProviderSpec.js
+++ b/packages/engine/Specs/Core/GoogleEarthEnterpriseTerrainProviderSpec.js
@@ -20,7 +20,7 @@ describe("Core/GoogleEarthEnterpriseTerrainProvider", function () {
function installMockGetQuadTreePacket() {
spyOn(
GoogleEarthEnterpriseMetadata.prototype,
- "getQuadTreePacket",
+ "getQuadTreePacket"
).and.callFake(function (quadKey, version) {
quadKey = defaultValue(quadKey, "");
let t = new GoogleEarthEnterpriseTileInformation(0xff, 1, 1, 1);
@@ -47,8 +47,9 @@ describe("Core/GoogleEarthEnterpriseTerrainProvider", function () {
async function waitForTile(level, x, y, f) {
const metadata = await GoogleEarthEnterpriseMetadata.fromUrl("made/up/url");
- terrainProvider =
- GoogleEarthEnterpriseTerrainProvider.fromMetadata(metadata);
+ terrainProvider = GoogleEarthEnterpriseTerrainProvider.fromMetadata(
+ metadata
+ );
return pollToPromise(function () {
return terrainProvider.getTileDataAvailable(x, y, level);
}).then(function () {
@@ -77,14 +78,14 @@ describe("Core/GoogleEarthEnterpriseTerrainProvider", function () {
it("conforms to TerrainProvider interface", function () {
expect(GoogleEarthEnterpriseTerrainProvider).toConformToInterface(
- TerrainProvider,
+ TerrainProvider
);
});
it("fromMetadata throws without metadata", function () {
installMockGetQuadTreePacket();
expect(() =>
- GoogleEarthEnterpriseTerrainProvider.fromMetadata(),
+ GoogleEarthEnterpriseTerrainProvider.fromMetadata()
).toThrowDeveloperError("metadata is required, actual value was undefined");
});
@@ -95,10 +96,10 @@ describe("Core/GoogleEarthEnterpriseTerrainProvider", function () {
metadata.terrainPresent = false;
expect(() =>
- GoogleEarthEnterpriseTerrainProvider.fromMetadata(metadata),
+ GoogleEarthEnterpriseTerrainProvider.fromMetadata(metadata)
).toThrowError(
RuntimeError,
- "The server made/up/url/ doesn't have terrain",
+ "The server made/up/url/ doesn't have terrain"
);
});
@@ -106,8 +107,9 @@ describe("Core/GoogleEarthEnterpriseTerrainProvider", function () {
installMockGetQuadTreePacket();
const metadata = await GoogleEarthEnterpriseMetadata.fromUrl("made/up/url");
- terrainProvider =
- GoogleEarthEnterpriseTerrainProvider.fromMetadata(metadata);
+ terrainProvider = GoogleEarthEnterpriseTerrainProvider.fromMetadata(
+ metadata
+ );
expect(terrainProvider.tilingScheme).toBeInstanceOf(GeographicTilingScheme);
});
@@ -121,7 +123,7 @@ describe("Core/GoogleEarthEnterpriseTerrainProvider", function () {
metadata,
{
ellipsoid: ellipsoid,
- },
+ }
);
expect(terrainProvider.tilingScheme.ellipsoid).toEqual(ellipsoid);
@@ -131,8 +133,9 @@ describe("Core/GoogleEarthEnterpriseTerrainProvider", function () {
installMockGetQuadTreePacket();
const metadata = await GoogleEarthEnterpriseMetadata.fromUrl("made/up/url");
- terrainProvider =
- GoogleEarthEnterpriseTerrainProvider.fromMetadata(metadata);
+ terrainProvider = GoogleEarthEnterpriseTerrainProvider.fromMetadata(
+ metadata
+ );
expect(terrainProvider.errorEvent).toBeDefined();
expect(terrainProvider.errorEvent).toBe(terrainProvider.errorEvent);
});
@@ -141,19 +144,20 @@ describe("Core/GoogleEarthEnterpriseTerrainProvider", function () {
installMockGetQuadTreePacket();
const metadata = await GoogleEarthEnterpriseMetadata.fromUrl("made/up/url");
- terrainProvider =
- GoogleEarthEnterpriseTerrainProvider.fromMetadata(metadata);
+ terrainProvider = GoogleEarthEnterpriseTerrainProvider.fromMetadata(
+ metadata
+ );
expect(terrainProvider.getLevelMaximumGeometricError(0)).toBeGreaterThan(
- 0.0,
+ 0.0
);
expect(terrainProvider.getLevelMaximumGeometricError(0)).toEqualEpsilon(
terrainProvider.getLevelMaximumGeometricError(1) * 2.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(terrainProvider.getLevelMaximumGeometricError(1)).toEqualEpsilon(
terrainProvider.getLevelMaximumGeometricError(2) * 2.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -161,8 +165,9 @@ describe("Core/GoogleEarthEnterpriseTerrainProvider", function () {
installMockGetQuadTreePacket();
const metadata = await GoogleEarthEnterpriseMetadata.fromUrl("made/up/url");
- terrainProvider =
- GoogleEarthEnterpriseTerrainProvider.fromMetadata(metadata);
+ terrainProvider = GoogleEarthEnterpriseTerrainProvider.fromMetadata(
+ metadata
+ );
expect(terrainProvider.credit).toBeUndefined();
});
@@ -175,7 +180,7 @@ describe("Core/GoogleEarthEnterpriseTerrainProvider", function () {
metadata,
{
credit: "thanks to our awesome made up contributors!",
- },
+ }
);
expect(terrainProvider.credit).toBeDefined();
@@ -185,8 +190,9 @@ describe("Core/GoogleEarthEnterpriseTerrainProvider", function () {
installMockGetQuadTreePacket();
const metadata = await GoogleEarthEnterpriseMetadata.fromUrl("made/up/url");
- terrainProvider =
- GoogleEarthEnterpriseTerrainProvider.fromMetadata(metadata);
+ terrainProvider = GoogleEarthEnterpriseTerrainProvider.fromMetadata(
+ metadata
+ );
expect(terrainProvider.hasWaterMask).toBe(false);
});
@@ -195,8 +201,9 @@ describe("Core/GoogleEarthEnterpriseTerrainProvider", function () {
installMockGetQuadTreePacket();
const metadata = await GoogleEarthEnterpriseMetadata.fromUrl("made/up/url");
- terrainProvider =
- GoogleEarthEnterpriseTerrainProvider.fromMetadata(metadata);
+ terrainProvider = GoogleEarthEnterpriseTerrainProvider.fromMetadata(
+ metadata
+ );
expect(terrainProvider.hasVertexNormals).toBe(false);
});
@@ -211,7 +218,7 @@ describe("Core/GoogleEarthEnterpriseTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/GoogleEarthEnterprise/gee.terrain",
@@ -219,7 +226,7 @@ describe("Core/GoogleEarthEnterpriseTerrainProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -237,7 +244,7 @@ describe("Core/GoogleEarthEnterpriseTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/GoogleEarthEnterprise/gee.terrain",
@@ -245,14 +252,16 @@ describe("Core/GoogleEarthEnterpriseTerrainProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
- const metadata =
- await GoogleEarthEnterpriseMetadata.fromUrl("made/up/url");
- terrainProvider =
- GoogleEarthEnterpriseTerrainProvider.fromMetadata(metadata);
+ const metadata = await GoogleEarthEnterpriseMetadata.fromUrl(
+ "made/up/url"
+ );
+ terrainProvider = GoogleEarthEnterpriseTerrainProvider.fromMetadata(
+ metadata
+ );
await pollToPromise(function () {
return terrainProvider.getTileDataAvailable(0, 0, 0);
@@ -276,7 +285,7 @@ describe("Core/GoogleEarthEnterpriseTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
if (url.indexOf("dbRoot.v5") !== -1) {
return deferred.reject(); // Just reject dbRoot file and use defaults.
@@ -290,7 +299,7 @@ describe("Core/GoogleEarthEnterpriseTerrainProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
}
// Do nothing, so requests never complete
@@ -298,8 +307,9 @@ describe("Core/GoogleEarthEnterpriseTerrainProvider", function () {
};
const metadata = await GoogleEarthEnterpriseMetadata.fromUrl(baseUrl);
- terrainProvider =
- GoogleEarthEnterpriseTerrainProvider.fromMetadata(metadata);
+ terrainProvider = GoogleEarthEnterpriseTerrainProvider.fromMetadata(
+ metadata
+ );
const promises = [];
return pollToPromise(function () {
@@ -356,7 +366,7 @@ describe("Core/GoogleEarthEnterpriseTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/CesiumTerrainTileJson/tile.terrain",
@@ -364,13 +374,14 @@ describe("Core/GoogleEarthEnterpriseTerrainProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
const metadata = await GoogleEarthEnterpriseMetadata.fromUrl(baseUrl);
- terrainProvider =
- GoogleEarthEnterpriseTerrainProvider.fromMetadata(metadata);
+ terrainProvider = GoogleEarthEnterpriseTerrainProvider.fromMetadata(
+ metadata
+ );
const tileInfo = terrainProvider._metadata._tileInfo;
const info =
diff --git a/packages/engine/Specs/Core/GroundPolylineGeometrySpec.js b/packages/engine/Specs/Core/GroundPolylineGeometrySpec.js
index 6a6f842b7623..84af45fa9cb9 100644
--- a/packages/engine/Specs/Core/GroundPolylineGeometrySpec.js
+++ b/packages/engine/Specs/Core/GroundPolylineGeometrySpec.js
@@ -55,7 +55,7 @@ describe("Core/GroundPolylineGeometry", function () {
});
const geometry = GroundPolylineGeometry.createGeometry(
- groundPolylineGeometry,
+ groundPolylineGeometry
);
expect(geometry.indices.length).toEqual(36);
@@ -140,8 +140,8 @@ describe("Core/GroundPolylineGeometry", function () {
Cartographic.equalsEpsilon(
reconstructedCarto,
startCartographic,
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toBe(true);
const endPosition3D = new Cartesian3();
@@ -155,41 +155,41 @@ describe("Core/GroundPolylineGeometry", function () {
Cartographic.equalsEpsilon(
reconstructedCarto,
endCartographic,
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toBe(true);
const startNormal3D = Cartesian3.unpack(
- startNormalAndForwardOffsetZ.values,
+ startNormalAndForwardOffsetZ.values
);
expect(
Cartesian3.equalsEpsilon(
startNormal3D,
new Cartesian3(0.0, 1.0, 0.0),
- CesiumMath.EPSILON2,
- ),
+ CesiumMath.EPSILON2
+ )
).toBe(true);
const endNormal3D = Cartesian3.unpack(
- endNormalAndTextureCoordinateNormalizationX.values,
+ endNormalAndTextureCoordinateNormalizationX.values
);
expect(
Cartesian3.equalsEpsilon(
endNormal3D,
new Cartesian3(0.0, -1.0, 0.0),
- CesiumMath.EPSILON2,
- ),
+ CesiumMath.EPSILON2
+ )
).toBe(true);
const rightNormal3D = Cartesian3.unpack(
- rightNormalAndTextureCoordinateNormalizationY.values,
+ rightNormalAndTextureCoordinateNormalizationY.values
);
expect(
Cartesian3.equalsEpsilon(
rightNormal3D,
new Cartesian3(0.0, 0.0, -1.0),
- CesiumMath.EPSILON2,
- ),
+ CesiumMath.EPSILON2
+ )
).toBe(true);
let texcoordNormalizationX =
@@ -208,8 +208,8 @@ describe("Core/GroundPolylineGeometry", function () {
Cartographic.equalsEpsilon(
reconstructedCarto,
startCartographic,
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toBe(true);
const endPosition2D = new Cartesian3();
@@ -221,8 +221,8 @@ describe("Core/GroundPolylineGeometry", function () {
Cartographic.equalsEpsilon(
reconstructedCarto,
endCartographic,
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toBe(true);
const startNormal2D = new Cartesian3();
@@ -232,8 +232,8 @@ describe("Core/GroundPolylineGeometry", function () {
Cartesian3.equalsEpsilon(
startNormal2D,
new Cartesian3(1.0, 0.0, 0.0),
- CesiumMath.EPSILON2,
- ),
+ CesiumMath.EPSILON2
+ )
).toBe(true);
const endNormal2D = new Cartesian3();
@@ -243,8 +243,8 @@ describe("Core/GroundPolylineGeometry", function () {
Cartesian3.equalsEpsilon(
endNormal2D,
new Cartesian3(-1.0, 0.0, 0.0),
- CesiumMath.EPSILON2,
- ),
+ CesiumMath.EPSILON2
+ )
).toBe(true);
const rightNormal2D = new Cartesian3();
@@ -254,8 +254,8 @@ describe("Core/GroundPolylineGeometry", function () {
Cartesian3.equalsEpsilon(
rightNormal2D,
new Cartesian3(0.0, -1.0, 0.0),
- CesiumMath.EPSILON2,
- ),
+ CesiumMath.EPSILON2
+ )
).toBe(true);
texcoordNormalizationX = texcoordNormalization2D.values[0];
@@ -278,17 +278,17 @@ describe("Core/GroundPolylineGeometry", function () {
groundPolylineGeometry._scene3DOnly = true;
const geometry = GroundPolylineGeometry.createGeometry(
- groundPolylineGeometry,
+ groundPolylineGeometry
);
expect(geometry.attributes.startHiAndForwardOffsetX).toBeDefined();
expect(geometry.attributes.startLoAndForwardOffsetY).toBeDefined();
expect(geometry.attributes.startNormalAndForwardOffsetZ).toBeDefined();
expect(
- geometry.attributes.endNormalAndTextureCoordinateNormalizationX,
+ geometry.attributes.endNormalAndTextureCoordinateNormalizationX
).toBeDefined();
expect(
- geometry.attributes.rightNormalAndTextureCoordinateNormalizationY,
+ geometry.attributes.rightNormalAndTextureCoordinateNormalizationY
).toBeDefined();
expect(geometry.attributes.startHiLo2D).not.toBeDefined();
@@ -319,7 +319,7 @@ describe("Core/GroundPolylineGeometry", function () {
});
const geometry = GroundPolylineGeometry.createGeometry(
- groundPolylineGeometry,
+ groundPolylineGeometry
);
expect(geometry.indices.length).toEqual(36);
@@ -341,7 +341,7 @@ describe("Core/GroundPolylineGeometry", function () {
});
const geometry = GroundPolylineGeometry.createGeometry(
- groundPolylineGeometry,
+ groundPolylineGeometry
);
expect(geometry).toBeUndefined();
@@ -350,13 +350,18 @@ describe("Core/GroundPolylineGeometry", function () {
it("miters turns", function () {
const groundPolylineGeometry = new GroundPolylineGeometry({
positions: Cartesian3.fromDegreesArray([
- 0.01, 0.0, 0.02, 0.0, 0.02, 0.01,
+ 0.01,
+ 0.0,
+ 0.02,
+ 0.0,
+ 0.02,
+ 0.01,
]),
granularity: 0.0,
});
const geometry = GroundPolylineGeometry.createGeometry(
- groundPolylineGeometry,
+ groundPolylineGeometry
);
expect(geometry.indices.length).toEqual(72);
expect(geometry.attributes.position.values.length).toEqual(48);
@@ -368,37 +373,37 @@ describe("Core/GroundPolylineGeometry", function () {
const miteredStartNormal = Cartesian3.unpack(
startNormalAndForwardOffsetZvalues,
- 32,
+ 32
);
const miteredEndNormal = Cartesian3.unpack(
endNormalAndTextureCoordinateNormalizationXvalues,
- 0,
+ 0
);
const reverseMiteredEndNormal = Cartesian3.multiplyByScalar(
miteredEndNormal,
-1.0,
- new Cartesian3(),
+ new Cartesian3()
);
expect(
Cartesian3.equalsEpsilon(
miteredStartNormal,
reverseMiteredEndNormal,
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toBe(true);
const approximateExpectedMiterNormal = new Cartesian3(0.0, 1.0, 1.0);
Cartesian3.normalize(
approximateExpectedMiterNormal,
- approximateExpectedMiterNormal,
+ approximateExpectedMiterNormal
);
expect(
Cartesian3.equalsEpsilon(
approximateExpectedMiterNormal,
miteredStartNormal,
- CesiumMath.EPSILON2,
- ),
+ CesiumMath.EPSILON2
+ )
).toBe(true);
});
@@ -416,7 +421,7 @@ describe("Core/GroundPolylineGeometry", function () {
});
let geometry = GroundPolylineGeometry.createGeometry(
- groundPolylineGeometry,
+ groundPolylineGeometry
);
let startNormalAndForwardOffsetZvalues =
@@ -426,33 +431,33 @@ describe("Core/GroundPolylineGeometry", function () {
let miteredStartNormal = Cartesian3.unpack(
startNormalAndForwardOffsetZvalues,
- 32,
+ 32
);
let miteredEndNormal = Cartesian3.unpack(
endNormalAndTextureCoordinateNormalizationXvalues,
- 0,
+ 0
);
expect(
Cartesian3.equalsEpsilon(
miteredStartNormal,
miteredEndNormal,
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toBe(true);
let approximateExpectedMiterNormal = new Cartesian3(0.0, -1.0, 0.0);
Cartesian3.normalize(
approximateExpectedMiterNormal,
- approximateExpectedMiterNormal,
+ approximateExpectedMiterNormal
);
expect(
Cartesian3.equalsEpsilon(
approximateExpectedMiterNormal,
miteredStartNormal,
- CesiumMath.EPSILON2,
- ),
+ CesiumMath.EPSILON2
+ )
).toBe(true);
// Break miter on loop end
@@ -479,33 +484,33 @@ describe("Core/GroundPolylineGeometry", function () {
// Check normals at loop end
miteredStartNormal = Cartesian3.unpack(
startNormalAndForwardOffsetZvalues,
- 0,
+ 0
);
miteredEndNormal = Cartesian3.unpack(
endNormalAndTextureCoordinateNormalizationXvalues,
- 32 * 2,
+ 32 * 2
);
expect(
Cartesian3.equalsEpsilon(
miteredStartNormal,
miteredEndNormal,
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toBe(true);
approximateExpectedMiterNormal = new Cartesian3(0.0, 1.0, 0.0);
Cartesian3.normalize(
approximateExpectedMiterNormal,
- approximateExpectedMiterNormal,
+ approximateExpectedMiterNormal
);
expect(
Cartesian3.equalsEpsilon(
approximateExpectedMiterNormal,
miteredStartNormal,
- CesiumMath.EPSILON2,
- ),
+ CesiumMath.EPSILON2
+ )
).toBe(true);
});
@@ -516,7 +521,7 @@ describe("Core/GroundPolylineGeometry", function () {
});
let geometry = GroundPolylineGeometry.createGeometry(
- groundPolylineGeometry,
+ groundPolylineGeometry
);
expect(geometry.indices.length).toEqual(72);
@@ -525,7 +530,12 @@ describe("Core/GroundPolylineGeometry", function () {
// Interpolate one segment but not the other
groundPolylineGeometry = new GroundPolylineGeometry({
positions: Cartesian3.fromDegreesArray([
- 0.01, 0.0, 0.02, 0.0, 0.0201, 0.0,
+ 0.01,
+ 0.0,
+ 0.02,
+ 0.0,
+ 0.0201,
+ 0.0,
]),
granularity: 600.0,
});
@@ -552,10 +562,10 @@ describe("Core/GroundPolylineGeometry", function () {
});
let rhumbGeometry = GroundPolylineGeometry.createGeometry(
- rhumbGroundPolylineGeometry,
+ rhumbGroundPolylineGeometry
);
let geodesicGeometry = GroundPolylineGeometry.createGeometry(
- geodesicGroundPolylineGeometry,
+ geodesicGroundPolylineGeometry
);
expect(rhumbGeometry.indices.length).toEqual(3636);
@@ -577,16 +587,16 @@ describe("Core/GroundPolylineGeometry", function () {
});
rhumbGeometry = GroundPolylineGeometry.createGeometry(
- rhumbGroundPolylineGeometry,
+ rhumbGroundPolylineGeometry
);
geodesicGeometry = GroundPolylineGeometry.createGeometry(
- geodesicGroundPolylineGeometry,
+ geodesicGroundPolylineGeometry
);
expect(rhumbGeometry.indices.length).toEqual(3636 + 36);
expect(geodesicGeometry.indices.length).toEqual(3600 + 36);
expect(geodesicGeometry.attributes.position.values.length).toEqual(
- 2400 + 24,
+ 2400 + 24
);
expect(rhumbGeometry.attributes.position.values.length).toEqual(2424 + 24);
});
@@ -600,13 +610,18 @@ describe("Core/GroundPolylineGeometry", function () {
// Not enough positions to loop, should still be a single segment
let geometry = GroundPolylineGeometry.createGeometry(
- groundPolylineGeometry,
+ groundPolylineGeometry
);
expect(geometry.indices.length).toEqual(36);
groundPolylineGeometry = new GroundPolylineGeometry({
positions: Cartesian3.fromDegreesArray([
- 0.01, 0.0, 0.02, 0.0, 0.02, 0.02,
+ 0.01,
+ 0.0,
+ 0.02,
+ 0.0,
+ 0.02,
+ 0.02,
]),
granularity: 0.0,
loop: true,
@@ -625,7 +640,7 @@ describe("Core/GroundPolylineGeometry", function () {
});
let geometry = GroundPolylineGeometry.createGeometry(
- groundPolylineGeometry,
+ groundPolylineGeometry
);
expect(geometry.indices.length).toEqual(72);
@@ -645,7 +660,14 @@ describe("Core/GroundPolylineGeometry", function () {
// Cross IDL going opposite direction and loop
groundPolylineGeometry = new GroundPolylineGeometry({
positions: Cartesian3.fromDegreesArray([
- 179.0, 0.0, 179.0, 1.0, -179.0, 1.0, -179.0, 0.0,
+ 179.0,
+ 0.0,
+ 179.0,
+ 1.0,
+ -179.0,
+ 1.0,
+ -179.0,
+ 0.0,
]),
granularity: 0.0, // no interpolative subdivision
loop: true,
@@ -687,7 +709,7 @@ describe("Core/GroundPolylineGeometry", function () {
groundPolylineGeometry._scene3DOnly = true;
GroundPolylineGeometry.setProjectionAndEllipsoid(
groundPolylineGeometry,
- new WebMercatorProjection(Ellipsoid.UNIT_SPHERE),
+ new WebMercatorProjection(Ellipsoid.UNIT_SPHERE)
);
const packedArray = [0];
@@ -702,14 +724,14 @@ describe("Core/GroundPolylineGeometry", function () {
expect(
Cartesian3.equals(
scratchPositions[0],
- groundPolylineGeometry._positions[0],
- ),
+ groundPolylineGeometry._positions[0]
+ )
).toBe(true);
expect(
Cartesian3.equals(
scratchPositions[1],
- groundPolylineGeometry._positions[1],
- ),
+ groundPolylineGeometry._positions[1]
+ )
).toBe(true);
expect(scratch.loop).toBe(true);
expect(scratch.granularity).toEqual(10.0);
@@ -727,7 +749,7 @@ describe("Core/GroundPolylineGeometry", function () {
groundPolylineGeometry._scene3DOnly = true;
GroundPolylineGeometry.setProjectionAndEllipsoid(
groundPolylineGeometry,
- new WebMercatorProjection(Ellipsoid.UNIT_SPHERE),
+ new WebMercatorProjection(Ellipsoid.UNIT_SPHERE)
);
const packedArray = [0];
@@ -739,14 +761,14 @@ describe("Core/GroundPolylineGeometry", function () {
expect(
Cartesian3.equals(
scratchPositions[0],
- groundPolylineGeometry._positions[0],
- ),
+ groundPolylineGeometry._positions[0]
+ )
).toBe(true);
expect(
Cartesian3.equals(
scratchPositions[1],
- groundPolylineGeometry._positions[1],
- ),
+ groundPolylineGeometry._positions[1]
+ )
).toBe(true);
expect(result.loop).toBe(true);
expect(result.granularity).toEqual(10.0);
@@ -764,17 +786,22 @@ describe("Core/GroundPolylineGeometry", function () {
GroundPolylineGeometry.setProjectionAndEllipsoid(
groundPolylineGeometry,
- new WebMercatorProjection(Ellipsoid.UNIT_SPHERE),
+ new WebMercatorProjection(Ellipsoid.UNIT_SPHERE)
);
expect(groundPolylineGeometry._projectionIndex).toEqual(1);
expect(
- groundPolylineGeometry._ellipsoid.equals(Ellipsoid.UNIT_SPHERE),
+ groundPolylineGeometry._ellipsoid.equals(Ellipsoid.UNIT_SPHERE)
).toBe(true);
});
const positions = Cartesian3.fromDegreesArray([
- 0.01, 0.0, 0.02, 0.0, 0.02, 0.1,
+ 0.01,
+ 0.0,
+ 0.02,
+ 0.0,
+ 0.02,
+ 0.1,
]);
const polyline = new GroundPolylineGeometry({
positions: positions,
@@ -786,12 +813,12 @@ describe("Core/GroundPolylineGeometry", function () {
const projection = new GeographicProjection();
const cartographic = new Cartographic(
CesiumMath.PI - CesiumMath.EPSILON11,
- 0.0,
+ 0.0
);
const normal = new Cartesian3(0.0, -1.0, 0.0);
const projectedPosition = projection.project(
cartographic,
- new Cartesian3(),
+ new Cartesian3()
);
const result = new Cartesian3();
@@ -800,20 +827,22 @@ describe("Core/GroundPolylineGeometry", function () {
cartographic,
normal,
projectedPosition,
- result,
+ result
);
expect(
Cartesian3.equalsEpsilon(
result,
new Cartesian3(1.0, 0.0, 0.0),
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toBe(true);
});
it("creates bounding spheres that cover the entire polyline volume height", function () {
const positions = Cartesian3.fromDegreesArray([
- -122.17580380403314, 46.19984918190237, -122.17581380403314,
+ -122.17580380403314,
+ 46.19984918190237,
+ -122.17581380403314,
46.19984918190237,
]);
@@ -824,7 +853,7 @@ describe("Core/GroundPolylineGeometry", function () {
});
const geometry = GroundPolylineGeometry.createGeometry(
- groundPolylineGeometry,
+ groundPolylineGeometry
);
const boundingSphere = geometry.boundingSphere;
@@ -836,7 +865,10 @@ describe("Core/GroundPolylineGeometry", function () {
it("creates bounding spheres that cover the entire polyline volume height in negative elevation regions", function () {
const positions = Cartesian3.fromDegreesArray([
- 35.549174, 31.377954, 35.549174, 31.377953,
+ 35.549174,
+ 31.377954,
+ 35.549174,
+ 31.377953,
]);
// Dead Sea - provided coordinates from below sea level to above sea level
@@ -847,7 +879,7 @@ describe("Core/GroundPolylineGeometry", function () {
});
const geometry = GroundPolylineGeometry.createGeometry(
- groundPolylineGeometry,
+ groundPolylineGeometry
);
const boundingSphere = geometry.boundingSphere;
diff --git a/packages/engine/Specs/Core/HeadingPitchRollSpec.js b/packages/engine/Specs/Core/HeadingPitchRollSpec.js
index e753e75cc7b4..a65df32d5633 100644
--- a/packages/engine/Specs/Core/HeadingPitchRollSpec.js
+++ b/packages/engine/Specs/Core/HeadingPitchRollSpec.js
@@ -18,22 +18,22 @@ describe("Core/HeadingPitchRoll", function () {
const headingPitchRoll = new HeadingPitchRoll(
1.0 * deg2rad,
2.0 * deg2rad,
- 3.0 * deg2rad,
+ 3.0 * deg2rad
);
expect(headingPitchRoll.heading).toEqual(
1.0 * deg2rad,
2.0 * deg2rad,
- 3.0 * deg2rad,
+ 3.0 * deg2rad
);
expect(headingPitchRoll.pitch).toEqual(
2.0 * deg2rad,
2.0 * deg2rad,
- 3.0 * deg2rad,
+ 3.0 * deg2rad
);
expect(headingPitchRoll.roll).toEqual(
3.0 * deg2rad,
2.0 * deg2rad,
- 3.0 * deg2rad,
+ 3.0 * deg2rad
);
});
@@ -57,7 +57,7 @@ describe("Core/HeadingPitchRoll", function () {
hpr.roll = init[2];
const result = HeadingPitchRoll.fromQuaternion(
- Quaternion.fromHeadingPitchRoll(hpr),
+ Quaternion.fromHeadingPitchRoll(hpr)
);
expect(init[0]).toEqualEpsilon(result.heading, CesiumMath.EPSILON11);
expect(init[1]).toEqualEpsilon(result.pitch, CesiumMath.EPSILON11);
@@ -70,7 +70,7 @@ describe("Core/HeadingPitchRoll", function () {
8.801218199179452e-17,
-0.7071067801637715,
-8.801218315071006e-17,
- -0.7071067822093238,
+ -0.7071067822093238
);
const result = HeadingPitchRoll.fromQuaternion(q);
expect(result.pitch).toEqual(-(Math.PI / 2));
@@ -93,15 +93,15 @@ describe("Core/HeadingPitchRoll", function () {
const result = HeadingPitchRoll.fromDegrees(init[0], init[1], init[2]);
expect(init[0] * deg2rad).toEqualEpsilon(
result.heading,
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
expect(init[1] * deg2rad).toEqualEpsilon(
result.pitch,
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
expect(init[2] * deg2rad).toEqualEpsilon(
result.roll,
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
}
});
@@ -118,7 +118,7 @@ describe("Core/HeadingPitchRoll", function () {
headingDeg,
pitchDeg,
rollDeg,
- result,
+ result
);
const expected = new HeadingPitchRoll(headingRad, pitchRad, rollRad);
expect(actual).toEqual(expected);
@@ -129,7 +129,7 @@ describe("Core/HeadingPitchRoll", function () {
const headingPitchRoll = new HeadingPitchRoll(
1.0 * deg2rad,
2.0 * deg2rad,
- 3.0 * deg2rad,
+ 3.0 * deg2rad
);
const result = new HeadingPitchRoll();
const returnedResult = HeadingPitchRoll.clone(headingPitchRoll, result);
@@ -142,11 +142,11 @@ describe("Core/HeadingPitchRoll", function () {
const headingPitchRoll = new HeadingPitchRoll(
1.0 * deg2rad,
2.0 * deg2rad,
- 3.0 * deg2rad,
+ 3.0 * deg2rad
);
const returnedResult = HeadingPitchRoll.clone(
headingPitchRoll,
- headingPitchRoll,
+ headingPitchRoll
);
expect(headingPitchRoll).toBe(returnedResult);
});
@@ -156,26 +156,26 @@ describe("Core/HeadingPitchRoll", function () {
expect(
HeadingPitchRoll.equals(
headingPitchRoll,
- new HeadingPitchRoll(1.0, 2.0, 3.0),
- ),
+ new HeadingPitchRoll(1.0, 2.0, 3.0)
+ )
).toEqual(true);
expect(
HeadingPitchRoll.equals(
headingPitchRoll,
- new HeadingPitchRoll(2.0, 2.0, 3.0),
- ),
+ new HeadingPitchRoll(2.0, 2.0, 3.0)
+ )
).toEqual(false);
expect(
HeadingPitchRoll.equals(
headingPitchRoll,
- new HeadingPitchRoll(2.0, 1.0, 3.0),
- ),
+ new HeadingPitchRoll(2.0, 1.0, 3.0)
+ )
).toEqual(false);
expect(
HeadingPitchRoll.equals(
headingPitchRoll,
- new HeadingPitchRoll(1.0, 2.0, 4.0),
- ),
+ new HeadingPitchRoll(1.0, 2.0, 4.0)
+ )
).toEqual(false);
expect(HeadingPitchRoll.equals(headingPitchRoll, undefined)).toEqual(false);
});
@@ -183,37 +183,37 @@ describe("Core/HeadingPitchRoll", function () {
it("equalsEpsilon", function () {
let headingPitchRoll = new HeadingPitchRoll(1.0, 2.0, 3.0);
expect(
- headingPitchRoll.equalsEpsilon(new HeadingPitchRoll(1.0, 2.0, 3.0), 0.0),
+ headingPitchRoll.equalsEpsilon(new HeadingPitchRoll(1.0, 2.0, 3.0), 0.0)
).toEqual(true);
expect(
- headingPitchRoll.equalsEpsilon(new HeadingPitchRoll(1.0, 2.0, 3.0), 1.0),
+ headingPitchRoll.equalsEpsilon(new HeadingPitchRoll(1.0, 2.0, 3.0), 1.0)
).toEqual(true);
expect(
- headingPitchRoll.equalsEpsilon(new HeadingPitchRoll(2.0, 2.0, 3.0), 1.0),
+ headingPitchRoll.equalsEpsilon(new HeadingPitchRoll(2.0, 2.0, 3.0), 1.0)
).toEqual(true);
expect(
- headingPitchRoll.equalsEpsilon(new HeadingPitchRoll(1.0, 3.0, 3.0), 1.0),
+ headingPitchRoll.equalsEpsilon(new HeadingPitchRoll(1.0, 3.0, 3.0), 1.0)
).toEqual(true);
expect(
- headingPitchRoll.equalsEpsilon(new HeadingPitchRoll(1.0, 2.0, 4.0), 1.0),
+ headingPitchRoll.equalsEpsilon(new HeadingPitchRoll(1.0, 2.0, 4.0), 1.0)
).toEqual(true);
expect(
headingPitchRoll.equalsEpsilon(
new HeadingPitchRoll(2.0, 2.0, 3.0),
- CesiumMath.EPSILON6,
- ),
+ CesiumMath.EPSILON6
+ )
).toEqual(false);
expect(
headingPitchRoll.equalsEpsilon(
new HeadingPitchRoll(1.0, 3.0, 3.0),
- CesiumMath.EPSILON6,
- ),
+ CesiumMath.EPSILON6
+ )
).toEqual(false);
expect(
headingPitchRoll.equalsEpsilon(
new HeadingPitchRoll(1.0, 2.0, 4.0),
- CesiumMath.EPSILON6,
- ),
+ CesiumMath.EPSILON6
+ )
).toEqual(false);
expect(headingPitchRoll.equalsEpsilon(undefined, 1)).toEqual(false);
@@ -221,43 +221,43 @@ describe("Core/HeadingPitchRoll", function () {
expect(
headingPitchRoll.equalsEpsilon(
new HeadingPitchRoll(3000000.0, 4000000.0, 5000000.0),
- 0.0,
- ),
+ 0.0
+ )
).toEqual(true);
expect(
headingPitchRoll.equalsEpsilon(
new HeadingPitchRoll(3000000.2, 4000000.0, 5000000.0),
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toEqual(true);
expect(
headingPitchRoll.equalsEpsilon(
new HeadingPitchRoll(3000000.0, 4000000.2, 5000000.0),
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toEqual(true);
expect(
headingPitchRoll.equalsEpsilon(
new HeadingPitchRoll(3000000.0, 4000000.0, 5000000.2),
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toEqual(true);
expect(
headingPitchRoll.equalsEpsilon(
new HeadingPitchRoll(3000000.2, 4000000.2, 5000000.2),
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toEqual(true);
expect(
headingPitchRoll.equalsEpsilon(
new HeadingPitchRoll(3000000.2, 4000000.2, 5000000.2),
- CesiumMath.EPSILON9,
- ),
+ CesiumMath.EPSILON9
+ )
).toEqual(false);
expect(headingPitchRoll.equalsEpsilon(undefined, 1)).toEqual(false);
expect(
- HeadingPitchRoll.equalsEpsilon(undefined, headingPitchRoll, 1),
+ HeadingPitchRoll.equalsEpsilon(undefined, headingPitchRoll, 1)
).toEqual(false);
});
diff --git a/packages/engine/Specs/Core/HeapSpec.js b/packages/engine/Specs/Core/HeapSpec.js
index a2a480c9c745..0e5cf83af3c9 100644
--- a/packages/engine/Specs/Core/HeapSpec.js
+++ b/packages/engine/Specs/Core/HeapSpec.js
@@ -77,7 +77,7 @@ describe("Core/Heap", function () {
expect(heap.length).toBeLessThanOrEqual(heap.maximumLength);
// allowed one extra slot for swapping
expect(heap.internalArray.length).toBeLessThanOrEqual(
- heap.maximumLength + 1,
+ heap.maximumLength + 1
);
});
diff --git a/packages/engine/Specs/Core/HeightmapTerrainDataSpec.js b/packages/engine/Specs/Core/HeightmapTerrainDataSpec.js
index 57d0c557da02..ea0b8657bf03 100644
--- a/packages/engine/Specs/Core/HeightmapTerrainDataSpec.js
+++ b/packages/engine/Specs/Core/HeightmapTerrainDataSpec.js
@@ -230,8 +230,22 @@ describe("Core/HeightmapTerrainData", function () {
it("upsamples", function () {
data = new HeightmapTerrainData({
buffer: new Float32Array([
- 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0,
- 14.0, 15.0, 16.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0,
+ 10.0,
+ 11.0,
+ 12.0,
+ 13.0,
+ 14.0,
+ 15.0,
+ 16.0,
]),
width: 4,
height: 4,
@@ -247,8 +261,22 @@ describe("Core/HeightmapTerrainData", function () {
expect(upsampled._width).toBe(4);
expect(upsampled._height).toBe(4);
expect(upsampled._buffer).toEqual([
- 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0,
- 7.5, 8.0, 8.5,
+ 1.0,
+ 1.5,
+ 2.0,
+ 2.5,
+ 3.0,
+ 3.5,
+ 4.0,
+ 4.5,
+ 5.0,
+ 5.5,
+ 6.0,
+ 6.5,
+ 7.0,
+ 7.5,
+ 8.0,
+ 8.5,
]);
});
});
@@ -256,9 +284,54 @@ describe("Core/HeightmapTerrainData", function () {
it("upsample works with a stride", function () {
data = new HeightmapTerrainData({
buffer: new Uint8Array([
- 1, 1, 10, 2, 1, 10, 3, 1, 10, 4, 1, 10, 5, 1, 10, 6, 1, 10, 7, 1, 10,
- 8, 1, 10, 9, 1, 10, 10, 1, 10, 11, 1, 10, 12, 1, 10, 13, 1, 10, 14, 1,
- 10, 15, 1, 10, 16, 1, 10,
+ 1,
+ 1,
+ 10,
+ 2,
+ 1,
+ 10,
+ 3,
+ 1,
+ 10,
+ 4,
+ 1,
+ 10,
+ 5,
+ 1,
+ 10,
+ 6,
+ 1,
+ 10,
+ 7,
+ 1,
+ 10,
+ 8,
+ 1,
+ 10,
+ 9,
+ 1,
+ 10,
+ 10,
+ 1,
+ 10,
+ 11,
+ 1,
+ 10,
+ 12,
+ 1,
+ 10,
+ 13,
+ 1,
+ 10,
+ 14,
+ 1,
+ 10,
+ 15,
+ 1,
+ 10,
+ 16,
+ 1,
+ 10,
]),
width: 4,
height: 4,
@@ -278,9 +351,54 @@ describe("Core/HeightmapTerrainData", function () {
expect(upsampled._width).toBe(4);
expect(upsampled._height).toBe(4);
expect(upsampled._buffer).toEqual([
- 1, 1, 0, 1, 1, 0, 2, 1, 0, 2, 1, 0, 3, 1, 0, 3, 1, 0, 4, 1, 0, 4, 1,
- 0, 5, 1, 0, 5, 1, 0, 6, 1, 0, 6, 1, 0, 7, 1, 0, 7, 1, 0, 8, 1, 0, 8,
- 1, 0,
+ 1,
+ 1,
+ 0,
+ 1,
+ 1,
+ 0,
+ 2,
+ 1,
+ 0,
+ 2,
+ 1,
+ 0,
+ 3,
+ 1,
+ 0,
+ 3,
+ 1,
+ 0,
+ 4,
+ 1,
+ 0,
+ 4,
+ 1,
+ 0,
+ 5,
+ 1,
+ 0,
+ 5,
+ 1,
+ 0,
+ 6,
+ 1,
+ 0,
+ 6,
+ 1,
+ 0,
+ 7,
+ 1,
+ 0,
+ 7,
+ 1,
+ 0,
+ 8,
+ 1,
+ 0,
+ 8,
+ 1,
+ 0,
]);
});
});
@@ -288,9 +406,54 @@ describe("Core/HeightmapTerrainData", function () {
it("upsample works with a big endian stride", function () {
data = new HeightmapTerrainData({
buffer: new Uint8Array([
- 1, 1, 10, 1, 2, 10, 1, 3, 10, 1, 4, 10, 1, 5, 10, 1, 6, 10, 1, 7, 10,
- 1, 8, 10, 1, 9, 10, 1, 10, 10, 1, 11, 10, 1, 12, 10, 1, 13, 10, 1, 14,
- 10, 1, 15, 10, 1, 16, 10,
+ 1,
+ 1,
+ 10,
+ 1,
+ 2,
+ 10,
+ 1,
+ 3,
+ 10,
+ 1,
+ 4,
+ 10,
+ 1,
+ 5,
+ 10,
+ 1,
+ 6,
+ 10,
+ 1,
+ 7,
+ 10,
+ 1,
+ 8,
+ 10,
+ 1,
+ 9,
+ 10,
+ 1,
+ 10,
+ 10,
+ 1,
+ 11,
+ 10,
+ 1,
+ 12,
+ 10,
+ 1,
+ 13,
+ 10,
+ 1,
+ 14,
+ 10,
+ 1,
+ 15,
+ 10,
+ 1,
+ 16,
+ 10,
]),
width: 4,
height: 4,
@@ -311,9 +474,54 @@ describe("Core/HeightmapTerrainData", function () {
expect(upsampled._width).toBe(4);
expect(upsampled._height).toBe(4);
expect(upsampled._buffer).toEqual([
- 1, 1, 0, 1, 1, 0, 1, 2, 0, 1, 2, 0, 1, 3, 0, 1, 3, 0, 1, 4, 0, 1, 4,
- 0, 1, 5, 0, 1, 5, 0, 1, 6, 0, 1, 6, 0, 1, 7, 0, 1, 7, 0, 1, 8, 0, 1,
- 8, 0,
+ 1,
+ 1,
+ 0,
+ 1,
+ 1,
+ 0,
+ 1,
+ 2,
+ 0,
+ 1,
+ 2,
+ 0,
+ 1,
+ 3,
+ 0,
+ 1,
+ 3,
+ 0,
+ 1,
+ 4,
+ 0,
+ 1,
+ 4,
+ 0,
+ 1,
+ 5,
+ 0,
+ 1,
+ 5,
+ 0,
+ 1,
+ 6,
+ 0,
+ 1,
+ 6,
+ 0,
+ 1,
+ 7,
+ 0,
+ 1,
+ 7,
+ 0,
+ 1,
+ 8,
+ 0,
+ 1,
+ 8,
+ 0,
]);
});
});
@@ -321,8 +529,22 @@ describe("Core/HeightmapTerrainData", function () {
it("upsample works for an eastern child", function () {
data = new HeightmapTerrainData({
buffer: new Float32Array([
- 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0,
- 14.0, 15.0, 16.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0,
+ 10.0,
+ 11.0,
+ 12.0,
+ 13.0,
+ 14.0,
+ 15.0,
+ 16.0,
]),
width: 4,
height: 4,
@@ -338,8 +560,22 @@ describe("Core/HeightmapTerrainData", function () {
expect(upsampled._width).toBe(4);
expect(upsampled._height).toBe(4);
expect(upsampled._buffer).toEqual([
- 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0, 7.5, 8.0, 8.5,
- 9.0, 9.5, 10.0,
+ 2.5,
+ 3.0,
+ 3.5,
+ 4.0,
+ 4.5,
+ 5.0,
+ 5.5,
+ 6.0,
+ 6.5,
+ 7.0,
+ 7.5,
+ 8.0,
+ 8.5,
+ 9.0,
+ 9.5,
+ 10.0,
]);
});
});
@@ -347,9 +583,54 @@ describe("Core/HeightmapTerrainData", function () {
it("upsample works with a stride for an eastern child", function () {
data = new HeightmapTerrainData({
buffer: new Uint8Array([
- 1, 1, 10, 2, 1, 10, 3, 1, 10, 4, 1, 10, 5, 1, 10, 6, 1, 10, 7, 1, 10,
- 8, 1, 10, 9, 1, 10, 10, 1, 10, 11, 1, 10, 12, 1, 10, 13, 1, 10, 14, 1,
- 10, 15, 1, 10, 16, 1, 10,
+ 1,
+ 1,
+ 10,
+ 2,
+ 1,
+ 10,
+ 3,
+ 1,
+ 10,
+ 4,
+ 1,
+ 10,
+ 5,
+ 1,
+ 10,
+ 6,
+ 1,
+ 10,
+ 7,
+ 1,
+ 10,
+ 8,
+ 1,
+ 10,
+ 9,
+ 1,
+ 10,
+ 10,
+ 1,
+ 10,
+ 11,
+ 1,
+ 10,
+ 12,
+ 1,
+ 10,
+ 13,
+ 1,
+ 10,
+ 14,
+ 1,
+ 10,
+ 15,
+ 1,
+ 10,
+ 16,
+ 1,
+ 10,
]),
width: 4,
height: 4,
@@ -369,9 +650,54 @@ describe("Core/HeightmapTerrainData", function () {
expect(upsampled._width).toBe(4);
expect(upsampled._height).toBe(4);
expect(upsampled._buffer).toEqual([
- 2, 1, 0, 3, 1, 0, 3, 1, 0, 4, 1, 0, 4, 1, 0, 5, 1, 0, 5, 1, 0, 6, 1,
- 0, 6, 1, 0, 7, 1, 0, 7, 1, 0, 8, 1, 0, 8, 1, 0, 9, 1, 0, 9, 1, 0,
- 10, 1, 0,
+ 2,
+ 1,
+ 0,
+ 3,
+ 1,
+ 0,
+ 3,
+ 1,
+ 0,
+ 4,
+ 1,
+ 0,
+ 4,
+ 1,
+ 0,
+ 5,
+ 1,
+ 0,
+ 5,
+ 1,
+ 0,
+ 6,
+ 1,
+ 0,
+ 6,
+ 1,
+ 0,
+ 7,
+ 1,
+ 0,
+ 7,
+ 1,
+ 0,
+ 8,
+ 1,
+ 0,
+ 8,
+ 1,
+ 0,
+ 9,
+ 1,
+ 0,
+ 9,
+ 1,
+ 0,
+ 10,
+ 1,
+ 0,
]);
});
});
@@ -379,8 +705,22 @@ describe("Core/HeightmapTerrainData", function () {
it("upsample clamps out of range data", function () {
data = new HeightmapTerrainData({
buffer: new Float32Array([
- -1.0, -2.0, -3.0, -4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0,
- 13.0, 14.0, 15.0, 16.0,
+ -1.0,
+ -2.0,
+ -3.0,
+ -4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0,
+ 10.0,
+ 11.0,
+ 12.0,
+ 13.0,
+ 14.0,
+ 15.0,
+ 16.0,
]),
width: 4,
height: 4,
@@ -402,7 +742,22 @@ describe("Core/HeightmapTerrainData", function () {
expect(upsampled._width).toBe(4);
expect(upsampled._height).toBe(4);
expect(upsampled._buffer).toEqual([
- 1, 1, 1, 1, 2, 1.5, 2, 1.5, 5, 5.5, 6, 6.5, 7, 7, 7, 7,
+ 1,
+ 1,
+ 1,
+ 1,
+ 2,
+ 1.5,
+ 2,
+ 1.5,
+ 5,
+ 5.5,
+ 6,
+ 6.5,
+ 7,
+ 7,
+ 7,
+ 7,
]);
});
});
diff --git a/packages/engine/Specs/Core/HermitePolynomialApproximationSpec.js b/packages/engine/Specs/Core/HermitePolynomialApproximationSpec.js
index 240888f62a30..b8a908263921 100644
--- a/packages/engine/Specs/Core/HermitePolynomialApproximationSpec.js
+++ b/packages/engine/Specs/Core/HermitePolynomialApproximationSpec.js
@@ -6,14 +6,40 @@ describe("Core/HermitePolynomialApproximation", function () {
const xTable = [0, 60, 120, 180, 240, 300, 360, 420];
const yTable = [
- 13378137.0, 0, 13374128.3576279, 0, 13362104.8328212, 0, 13342073.6310691,
- 0, 13314046.7567223, 0, 13278041.005799, 0, 13234077.9559193, 0,
- 13182183.953374, 0,
+ 13378137.0,
+ 0,
+ 13374128.3576279,
+ 0,
+ 13362104.8328212,
+ 0,
+ 13342073.6310691,
+ 0,
+ 13314046.7567223,
+ 0,
+ 13278041.005799,
+ 0,
+ 13234077.9559193,
+ 0,
+ 13182183.953374,
+ 0,
];
const dyTable = [
- 0.0, 0, -133.614738921601, 0, -267.149404854867, 0, -400.523972797808, 0,
- -533.658513692378, 0, -666.473242324565, 0, -798.888565138278, 0,
- -930.82512793439, 0,
+ 0.0,
+ 0,
+ -133.614738921601,
+ 0,
+ -267.149404854867,
+ 0,
+ -400.523972797808,
+ 0,
+ -533.658513692378,
+ 0,
+ -666.473242324565,
+ 0,
+ -798.888565138278,
+ 0,
+ -930.82512793439,
+ 0,
];
const yTableCombined = new Array(yTable.length * 2);
@@ -33,7 +59,7 @@ describe("Core/HermitePolynomialApproximation", function () {
x,
xTable,
yTableCombined,
- 4,
+ 4
);
const expectedResult = 13367002.870928625;
//The accuracy is lower because we are no longer using derivative info
@@ -48,7 +74,7 @@ describe("Core/HermitePolynomialApproximation", function () {
xTable,
yTableCombined,
4,
- result,
+ result
);
const expectedResult = 13367002.870928625;
expect(result).toBe(returnedResult);
@@ -62,13 +88,13 @@ describe("Core/HermitePolynomialApproximation", function () {
expect(HermitePolynomialApproximation.getRequiredDataPoints(2)).toEqual(3);
expect(HermitePolynomialApproximation.getRequiredDataPoints(3)).toEqual(4);
expect(HermitePolynomialApproximation.getRequiredDataPoints(3, 1)).toEqual(
- 2,
+ 2
);
expect(HermitePolynomialApproximation.getRequiredDataPoints(5, 1)).toEqual(
- 3,
+ 3
);
expect(HermitePolynomialApproximation.getRequiredDataPoints(7, 1)).toEqual(
- 4,
+ 4
);
});
@@ -79,7 +105,7 @@ describe("Core/HermitePolynomialApproximation", function () {
yTableCombined,
2,
1,
- 1,
+ 1
);
const expectedResult = [13367002.870928625, 0.0, -222.65168787012135, 0.0];
expect(result).toEqualEpsilon(expectedResult, 1e-8);
diff --git a/packages/engine/Specs/Core/HermiteSplineSpec.js b/packages/engine/Specs/Core/HermiteSplineSpec.js
index d66356a7aa9e..3b04ea682381 100644
--- a/packages/engine/Specs/Core/HermiteSplineSpec.js
+++ b/packages/engine/Specs/Core/HermiteSplineSpec.js
@@ -81,7 +81,7 @@ describe("Core/HermiteSpline", function () {
return Cartesian3.add(
Cartesian3.add(Cartesian3.add(p0, p1, p0), p2, p0),
p3,
- p0,
+ p0
);
};
}
@@ -120,7 +120,7 @@ describe("Core/HermiteSpline", function () {
for (let i = 0.0; i < 1.0; i = i + granularity) {
expect(hs.evaluate(i)).toEqualEpsilon(
interpolate(i),
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
}
});
@@ -191,7 +191,7 @@ describe("Core/HermiteSpline", function () {
tangents[i] = Cartesian3.multiplyByScalar(
Cartesian3.subtract(points[i + 1], points[i - 1], new Cartesian3()),
0.5,
- new Cartesian3(),
+ new Cartesian3()
);
}
tangents[tangents.length - 1] = new Cartesian3(1165345, 112641, 47281);
@@ -200,7 +200,7 @@ describe("Core/HermiteSpline", function () {
points[0],
tangents[0],
points[1],
- tangents[1],
+ tangents[1]
);
const hs = HermiteSpline.createC1({
times: times,
@@ -212,7 +212,7 @@ describe("Core/HermiteSpline", function () {
for (let j = times[0]; j < times[1]; j = j + granularity) {
expect(hs.evaluate(j)).toEqualEpsilon(
interpolate(j),
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
}
});
@@ -263,7 +263,7 @@ describe("Core/HermiteSpline", function () {
points[0],
p0Tangent,
points[1],
- p1Tangent,
+ p1Tangent
);
const hs = HermiteSpline.createNaturalCubic({
points: points,
@@ -274,7 +274,7 @@ describe("Core/HermiteSpline", function () {
for (let i = times[0]; i < times[1]; i = i + granularity) {
expect(hs.evaluate(i)).toEqualEpsilon(
interpolate(i),
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
}
});
@@ -347,7 +347,7 @@ describe("Core/HermiteSpline", function () {
points[0],
p0Tangent,
points[1],
- p1Tangent,
+ p1Tangent
);
const hs = HermiteSpline.createClampedCubic({
points: points,
@@ -360,7 +360,7 @@ describe("Core/HermiteSpline", function () {
for (let i = points[0].time; i < points[1].time; i = i + granularity) {
expect(hs.evaluate(i)).toEqualEpsilon(
interpolate(i),
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
}
});
@@ -473,7 +473,7 @@ describe("Core/HermiteSpline", function () {
const expected = new Quaternion(0.0, 0.0, -0.54567, 0.81546);
point = hs.evaluate(0.75);
expect(Quaternion.equalsEpsilon(point, expected, CesiumMath.EPSILON4)).toBe(
- true,
+ true
);
});
@@ -502,7 +502,7 @@ describe("Core/HermiteSpline", function () {
const t = (times[0] + times[1]) * 0.5;
expect(hs.evaluate(t)).toEqual(
- Cartesian3.lerp(points[0], points[1], t, new Cartesian3()),
+ Cartesian3.lerp(points[0], points[1], t, new Cartesian3())
);
});
@@ -517,7 +517,7 @@ describe("Core/HermiteSpline", function () {
const t = (times[0] + times[1]) * 0.5;
expect(hs.evaluate(t)).toEqual(
- Cartesian3.lerp(points[0], points[1], t, new Cartesian3()),
+ Cartesian3.lerp(points[0], points[1], t, new Cartesian3())
);
});
});
diff --git a/packages/engine/Specs/Core/Iau2006XysDataSpec.js b/packages/engine/Specs/Core/Iau2006XysDataSpec.js
index 86e48b9a1d6b..059ac4aef448 100644
--- a/packages/engine/Specs/Core/Iau2006XysDataSpec.js
+++ b/packages/engine/Specs/Core/Iau2006XysDataSpec.js
@@ -38,8 +38,8 @@ describe("Core/Iau2006XysData", function () {
new Iau2006XysSample(
-0.0024019733101066816,
-0.000024843279494458311,
- -0.000000016941747917421229,
- ),
+ -0.000000016941747917421229
+ )
);
});
});
@@ -57,7 +57,7 @@ describe("Core/Iau2006XysData", function () {
// this should be the same location as the default, but specifying the value
// takes the code through a different code path.
xysFileUrlTemplate: buildModuleUrl(
- "Assets/IAU2006_XYS/IAU2006_XYS_{0}.json",
+ "Assets/IAU2006_XYS/IAU2006_XYS_{0}.json"
),
});
diff --git a/packages/engine/Specs/Core/IauOrientationAxesSpec.js b/packages/engine/Specs/Core/IauOrientationAxesSpec.js
index 77c553f27741..8d220d4f1a1c 100644
--- a/packages/engine/Specs/Core/IauOrientationAxesSpec.js
+++ b/packages/engine/Specs/Core/IauOrientationAxesSpec.js
@@ -27,7 +27,7 @@ describe("Core/IauOrientationAxes", function () {
0.31035675134719942,
-0.022608671404182448,
-0.41183090094261243,
- 0.91097977859342938,
+ 0.91097977859342938
);
const mtx = axes.evaluate(date);
diff --git a/packages/engine/Specs/Core/IndexDatatypeSpec.js b/packages/engine/Specs/Core/IndexDatatypeSpec.js
index 7091e8529e4a..a3a8132643bc 100644
--- a/packages/engine/Specs/Core/IndexDatatypeSpec.js
+++ b/packages/engine/Specs/Core/IndexDatatypeSpec.js
@@ -9,11 +9,11 @@ describe("Core/IndexDatatype", function () {
it("createTypedArray creates array", function () {
expect(IndexDatatype.createTypedArray(3, 3).BYTES_PER_ELEMENT).toEqual(
- Uint16Array.BYTES_PER_ELEMENT,
+ Uint16Array.BYTES_PER_ELEMENT
);
expect(
IndexDatatype.createTypedArray(CesiumMath.SIXTY_FOUR_KILOBYTES + 1, 3)
- .BYTES_PER_ELEMENT,
+ .BYTES_PER_ELEMENT
).toEqual(Uint32Array.BYTES_PER_ELEMENT);
});
@@ -30,10 +30,10 @@ describe("Core/IndexDatatype", function () {
3,
sourceArray.buffer,
0,
- 5,
+ 5
);
expect(indexBuffer.BYTES_PER_ELEMENT).toEqual(
- Uint16Array.BYTES_PER_ELEMENT,
+ Uint16Array.BYTES_PER_ELEMENT
);
expect(indexBuffer.length).toEqual(5);
expect(indexBuffer[0]).toEqual(0);
@@ -46,10 +46,10 @@ describe("Core/IndexDatatype", function () {
3,
sourceArray.buffer,
Uint16Array.BYTES_PER_ELEMENT * 5,
- 5,
+ 5
);
expect(indexBuffer.BYTES_PER_ELEMENT).toEqual(
- Uint16Array.BYTES_PER_ELEMENT,
+ Uint16Array.BYTES_PER_ELEMENT
);
expect(indexBuffer.length).toEqual(5);
expect(indexBuffer[0]).toEqual(5);
@@ -62,10 +62,10 @@ describe("Core/IndexDatatype", function () {
CesiumMath.SIXTY_FOUR_KILOBYTES + 1,
sourceArray.buffer,
0,
- 5,
+ 5
);
expect(indexBuffer.BYTES_PER_ELEMENT).toEqual(
- Uint32Array.BYTES_PER_ELEMENT,
+ Uint32Array.BYTES_PER_ELEMENT
);
expect(indexBuffer.length).toEqual(5);
expect(indexBuffer[0]).toEqual(0);
@@ -78,10 +78,10 @@ describe("Core/IndexDatatype", function () {
CesiumMath.SIXTY_FOUR_KILOBYTES + 1,
sourceArray.buffer,
Uint32Array.BYTES_PER_ELEMENT * 5,
- 5,
+ 5
);
expect(indexBuffer.BYTES_PER_ELEMENT).toEqual(
- Uint32Array.BYTES_PER_ELEMENT,
+ Uint32Array.BYTES_PER_ELEMENT
);
expect(indexBuffer.length).toEqual(5);
expect(indexBuffer[0]).toEqual(5);
@@ -105,20 +105,20 @@ describe("Core/IndexDatatype", function () {
IndexDatatype.createTypedArrayFromArrayBuffer(
3,
sourceArray.buffer,
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
it("getSizeInBytes returns size", function () {
expect(IndexDatatype.getSizeInBytes(IndexDatatype.UNSIGNED_BYTE)).toEqual(
- Uint8Array.BYTES_PER_ELEMENT,
+ Uint8Array.BYTES_PER_ELEMENT
);
expect(IndexDatatype.getSizeInBytes(IndexDatatype.UNSIGNED_SHORT)).toEqual(
- Uint16Array.BYTES_PER_ELEMENT,
+ Uint16Array.BYTES_PER_ELEMENT
);
expect(IndexDatatype.getSizeInBytes(IndexDatatype.UNSIGNED_INT)).toEqual(
- Uint32Array.BYTES_PER_ELEMENT,
+ Uint32Array.BYTES_PER_ELEMENT
);
});
@@ -130,13 +130,13 @@ describe("Core/IndexDatatype", function () {
it("fromTypedArray works", function () {
expect(IndexDatatype.fromTypedArray(new Uint8Array())).toBe(
- IndexDatatype.UNSIGNED_BYTE,
+ IndexDatatype.UNSIGNED_BYTE
);
expect(IndexDatatype.fromTypedArray(new Uint16Array())).toBe(
- IndexDatatype.UNSIGNED_SHORT,
+ IndexDatatype.UNSIGNED_SHORT
);
expect(IndexDatatype.fromTypedArray(new Uint32Array())).toBe(
- IndexDatatype.UNSIGNED_INT,
+ IndexDatatype.UNSIGNED_INT
);
});
diff --git a/packages/engine/Specs/Core/IntersectionTestsSpec.js b/packages/engine/Specs/Core/IntersectionTestsSpec.js
index 6e6d8ef2a0f9..8b1a1eb776f3 100644
--- a/packages/engine/Specs/Core/IntersectionTestsSpec.js
+++ b/packages/engine/Specs/Core/IntersectionTestsSpec.js
@@ -12,7 +12,7 @@ describe("Core/IntersectionTests", function () {
it("rayPlane intersects", function () {
const ray = new Ray(
new Cartesian3(2.0, 0.0, 0.0),
- new Cartesian3(-1.0, 0.0, 0.0),
+ new Cartesian3(-1.0, 0.0, 0.0)
);
const plane = new Plane(Cartesian3.UNIT_X, -1.0);
@@ -24,7 +24,7 @@ describe("Core/IntersectionTests", function () {
it("rayPlane misses", function () {
const ray = new Ray(
new Cartesian3(2.0, 0.0, 0.0),
- new Cartesian3(1.0, 0.0, 0.0),
+ new Cartesian3(1.0, 0.0, 0.0)
);
const plane = new Plane(Cartesian3.UNIT_X, -1.0);
@@ -36,7 +36,7 @@ describe("Core/IntersectionTests", function () {
it("rayPlane misses (parallel)", function () {
const ray = new Ray(
new Cartesian3(2.0, 0.0, 0.0),
- new Cartesian3(0.0, 1.0, 0.0),
+ new Cartesian3(0.0, 1.0, 0.0)
);
const plane = new Plane(Cartesian3.UNIT_X, -1.0);
@@ -80,7 +80,7 @@ describe("Core/IntersectionTests", function () {
IntersectionTests.rayTriangle(
new Ray(),
new Cartesian3(),
- new Cartesian3(),
+ new Cartesian3()
);
}).toThrowDeveloperError();
});
@@ -92,7 +92,7 @@ describe("Core/IntersectionTests", function () {
const ray = new Ray(
Cartesian3.UNIT_Z,
- Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
+ Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3())
);
const intersection = IntersectionTests.rayTriangle(ray, p0, p1, p2);
@@ -106,7 +106,7 @@ describe("Core/IntersectionTests", function () {
const ray = new Ray(
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- Cartesian3.UNIT_Z,
+ Cartesian3.UNIT_Z
);
const intersection = IntersectionTests.rayTriangle(ray, p0, p1, p2);
@@ -120,7 +120,7 @@ describe("Core/IntersectionTests", function () {
const ray = new Ray(
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- Cartesian3.UNIT_Z,
+ Cartesian3.UNIT_Z
);
const intersection = IntersectionTests.rayTriangle(ray, p0, p1, p2, true);
@@ -134,7 +134,7 @@ describe("Core/IntersectionTests", function () {
const ray = new Ray(
new Cartesian3(0.0, -1.0, 1.0),
- Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
+ Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3())
);
const intersection = IntersectionTests.rayTriangle(ray, p0, p1, p2);
@@ -148,7 +148,7 @@ describe("Core/IntersectionTests", function () {
const ray = new Ray(
new Cartesian3(1.0, 1.0, 1.0),
- Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
+ Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3())
);
const intersection = IntersectionTests.rayTriangle(ray, p0, p1, p2);
@@ -162,7 +162,7 @@ describe("Core/IntersectionTests", function () {
const ray = new Ray(
new Cartesian3(-1.0, 1.0, 1.0),
- Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
+ Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3())
);
const intersection = IntersectionTests.rayTriangle(ray, p0, p1, p2);
@@ -214,7 +214,7 @@ describe("Core/IntersectionTests", function () {
IntersectionTests.lineSegmentTriangle(
new Cartesian3(),
new Cartesian3(),
- new Cartesian3(),
+ new Cartesian3()
);
}).toThrowDeveloperError();
});
@@ -225,7 +225,7 @@ describe("Core/IntersectionTests", function () {
new Cartesian3(),
new Cartesian3(),
new Cartesian3(),
- new Cartesian3(),
+ new Cartesian3()
);
}).toThrowDeveloperError();
});
@@ -243,7 +243,7 @@ describe("Core/IntersectionTests", function () {
v1,
p0,
p1,
- p2,
+ p2
);
expect(intersection).toEqual(Cartesian3.ZERO);
});
@@ -261,7 +261,7 @@ describe("Core/IntersectionTests", function () {
v1,
p0,
p1,
- p2,
+ p2
);
expect(intersection).toEqual(Cartesian3.ZERO);
});
@@ -280,7 +280,7 @@ describe("Core/IntersectionTests", function () {
p0,
p1,
p2,
- true,
+ true
);
expect(intersection).not.toBeDefined();
});
@@ -294,7 +294,7 @@ describe("Core/IntersectionTests", function () {
const v1 = Cartesian3.add(
v0,
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
const intersection = IntersectionTests.lineSegmentTriangle(
@@ -302,7 +302,7 @@ describe("Core/IntersectionTests", function () {
v1,
p0,
p1,
- p2,
+ p2
);
expect(intersection).not.toBeDefined();
});
@@ -316,7 +316,7 @@ describe("Core/IntersectionTests", function () {
const v1 = Cartesian3.add(
v0,
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
const intersection = IntersectionTests.lineSegmentTriangle(
@@ -324,7 +324,7 @@ describe("Core/IntersectionTests", function () {
v1,
p0,
p1,
- p2,
+ p2
);
expect(intersection).not.toBeDefined();
});
@@ -338,7 +338,7 @@ describe("Core/IntersectionTests", function () {
const v1 = Cartesian3.add(
v0,
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
const intersection = IntersectionTests.lineSegmentTriangle(
@@ -346,7 +346,7 @@ describe("Core/IntersectionTests", function () {
v1,
p0,
p1,
- p2,
+ p2
);
expect(intersection).not.toBeDefined();
});
@@ -364,7 +364,7 @@ describe("Core/IntersectionTests", function () {
v1,
p0,
p1,
- p2,
+ p2
);
expect(intersection).not.toBeDefined();
});
@@ -378,7 +378,7 @@ describe("Core/IntersectionTests", function () {
const v1 = Cartesian3.multiplyByScalar(
Cartesian3.UNIT_Z,
2.0,
- new Cartesian3(),
+ new Cartesian3()
);
const intersection = IntersectionTests.lineSegmentTriangle(
@@ -386,7 +386,7 @@ describe("Core/IntersectionTests", function () {
v1,
p0,
p1,
- p2,
+ p2
);
expect(intersection).not.toBeDefined();
});
@@ -399,7 +399,7 @@ describe("Core/IntersectionTests", function () {
const v0 = Cartesian3.multiplyByScalar(
Cartesian3.UNIT_Z,
2.0,
- new Cartesian3(),
+ new Cartesian3()
);
const v1 = Cartesian3.UNIT_Z;
@@ -408,7 +408,7 @@ describe("Core/IntersectionTests", function () {
v1,
p0,
p1,
- p2,
+ p2
);
expect(intersection).not.toBeDefined();
});
@@ -430,7 +430,7 @@ describe("Core/IntersectionTests", function () {
let ray = new Ray(
new Cartesian3(2.0, 0.0, 0.0),
- new Cartesian3(-1.0, 0.0, 0.0),
+ new Cartesian3(-1.0, 0.0, 0.0)
);
let intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
@@ -438,7 +438,7 @@ describe("Core/IntersectionTests", function () {
ray = new Ray(
new Cartesian3(0.0, 2.0, 0.0),
- new Cartesian3(0.0, -1.0, 0.0),
+ new Cartesian3(0.0, -1.0, 0.0)
);
intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
@@ -446,7 +446,7 @@ describe("Core/IntersectionTests", function () {
ray = new Ray(
new Cartesian3(0.0, 0.0, 2.0),
- new Cartesian3(0.0, 0.0, -1.0),
+ new Cartesian3(0.0, 0.0, -1.0)
);
intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
@@ -454,14 +454,14 @@ describe("Core/IntersectionTests", function () {
ray = new Ray(
new Cartesian3(1.0, 1.0, 0.0),
- new Cartesian3(-1.0, 0.0, 0.0),
+ new Cartesian3(-1.0, 0.0, 0.0)
);
intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
ray = new Ray(
new Cartesian3(-2.0, 0.0, 0.0),
- new Cartesian3(1.0, 0.0, 0.0),
+ new Cartesian3(1.0, 0.0, 0.0)
);
intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
@@ -469,7 +469,7 @@ describe("Core/IntersectionTests", function () {
ray = new Ray(
new Cartesian3(0.0, -2.0, 0.0),
- new Cartesian3(0.0, 1.0, 0.0),
+ new Cartesian3(0.0, 1.0, 0.0)
);
intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
@@ -477,7 +477,7 @@ describe("Core/IntersectionTests", function () {
ray = new Ray(
new Cartesian3(0.0, 0.0, -2.0),
- new Cartesian3(0.0, 0.0, 1.0),
+ new Cartesian3(0.0, 0.0, 1.0)
);
intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
@@ -485,28 +485,28 @@ describe("Core/IntersectionTests", function () {
ray = new Ray(
new Cartesian3(-1.0, -1.0, 0.0),
- new Cartesian3(1.0, 0.0, 0.0),
+ new Cartesian3(1.0, 0.0, 0.0)
);
intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
ray = new Ray(
new Cartesian3(-2.0, 0.0, 0.0),
- new Cartesian3(-1.0, 0.0, 0.0),
+ new Cartesian3(-1.0, 0.0, 0.0)
);
intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections).toBeUndefined();
ray = new Ray(
new Cartesian3(0.0, -2.0, 0.0),
- new Cartesian3(0.0, -1.0, 0.0),
+ new Cartesian3(0.0, -1.0, 0.0)
);
intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections).toBeUndefined();
ray = new Ray(
new Cartesian3(0.0, 0.0, -2.0),
- new Cartesian3(0.0, 0.0, -1.0),
+ new Cartesian3(0.0, 0.0, -1.0)
);
intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections).toBeUndefined();
@@ -518,7 +518,7 @@ describe("Core/IntersectionTests", function () {
const origin = new Cartesian3(200.0, 0.0, 0.0);
const direction = Cartesian3.negate(
Cartesian3.normalize(origin, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
const ray = new Ray(origin, direction);
@@ -564,14 +564,14 @@ describe("Core/IntersectionTests", function () {
let ray = new Ray(
new Cartesian3(2.0, 0.0, 0.0),
- new Cartesian3(0.0, 0.0, 1.0),
+ new Cartesian3(0.0, 0.0, 1.0)
);
let intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections).not.toBeDefined();
ray = new Ray(
new Cartesian3(2.0, 0.0, 0.0),
- new Cartesian3(0.0, 0.0, -1.0),
+ new Cartesian3(0.0, 0.0, -1.0)
);
intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections).not.toBeDefined();
@@ -582,7 +582,7 @@ describe("Core/IntersectionTests", function () {
ray = new Ray(
new Cartesian3(2.0, 0.0, 0.0),
- new Cartesian3(0.0, -1.0, 0.0),
+ new Cartesian3(0.0, -1.0, 0.0)
);
intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections).not.toBeDefined();
@@ -593,7 +593,7 @@ describe("Core/IntersectionTests", function () {
let ray = new Ray(
new Cartesian3(202.0, 0.0, 0.0),
- new Cartesian3(-1.0, 0.0, 0.0),
+ new Cartesian3(-1.0, 0.0, 0.0)
);
let intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
@@ -601,7 +601,7 @@ describe("Core/IntersectionTests", function () {
ray = new Ray(
new Cartesian3(200.0, 2.0, 0.0),
- new Cartesian3(0.0, -1.0, 0.0),
+ new Cartesian3(0.0, -1.0, 0.0)
);
intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
@@ -609,7 +609,7 @@ describe("Core/IntersectionTests", function () {
ray = new Ray(
new Cartesian3(200.0, 0.0, 2.0),
- new Cartesian3(0.0, 0.0, -1.0),
+ new Cartesian3(0.0, 0.0, -1.0)
);
intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
@@ -617,14 +617,14 @@ describe("Core/IntersectionTests", function () {
ray = new Ray(
new Cartesian3(201.0, 1.0, 0.0),
- new Cartesian3(-1.0, 0.0, 0.0),
+ new Cartesian3(-1.0, 0.0, 0.0)
);
intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
ray = new Ray(
new Cartesian3(198.0, 0.0, 0.0),
- new Cartesian3(1.0, 0.0, 0.0),
+ new Cartesian3(1.0, 0.0, 0.0)
);
intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
@@ -632,7 +632,7 @@ describe("Core/IntersectionTests", function () {
ray = new Ray(
new Cartesian3(200.0, -2.0, 0.0),
- new Cartesian3(0.0, 1.0, 0.0),
+ new Cartesian3(0.0, 1.0, 0.0)
);
intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
@@ -640,7 +640,7 @@ describe("Core/IntersectionTests", function () {
ray = new Ray(
new Cartesian3(200.0, 0.0, -2.0),
- new Cartesian3(0.0, 0.0, 1.0),
+ new Cartesian3(0.0, 0.0, 1.0)
);
intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
@@ -648,28 +648,28 @@ describe("Core/IntersectionTests", function () {
ray = new Ray(
new Cartesian3(199.0, -1.0, 0.0),
- new Cartesian3(1.0, 0.0, 0.0),
+ new Cartesian3(1.0, 0.0, 0.0)
);
intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
ray = new Ray(
new Cartesian3(198.0, 0.0, 0.0),
- new Cartesian3(-1.0, 0.0, 0.0),
+ new Cartesian3(-1.0, 0.0, 0.0)
);
intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections).toBeUndefined();
ray = new Ray(
new Cartesian3(200.0, -2.0, 0.0),
- new Cartesian3(0.0, -1.0, 0.0),
+ new Cartesian3(0.0, -1.0, 0.0)
);
intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections).toBeUndefined();
ray = new Ray(
new Cartesian3(200.0, 0.0, -2.0),
- new Cartesian3(0.0, 0.0, -1.0),
+ new Cartesian3(0.0, 0.0, -1.0)
);
intersections = IntersectionTests.raySphere(ray, unitSphere);
expect(intersections).toBeUndefined();
@@ -684,7 +684,7 @@ describe("Core/IntersectionTests", function () {
it("rayEllipsoid throws without ellipsoid", function () {
expect(function () {
IntersectionTests.rayEllipsoid(
- new Ray(new Cartesian3(), new Cartesian3()),
+ new Ray(new Cartesian3(), new Cartesian3())
);
}).toThrowDeveloperError();
});
@@ -694,7 +694,7 @@ describe("Core/IntersectionTests", function () {
let ray = new Ray(
new Cartesian3(2.0, 0.0, 0.0),
- new Cartesian3(-1.0, 0.0, 0.0),
+ new Cartesian3(-1.0, 0.0, 0.0)
);
let intersections = IntersectionTests.rayEllipsoid(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
@@ -702,7 +702,7 @@ describe("Core/IntersectionTests", function () {
ray = new Ray(
new Cartesian3(0.0, 2.0, 0.0),
- new Cartesian3(0.0, -1.0, 0.0),
+ new Cartesian3(0.0, -1.0, 0.0)
);
intersections = IntersectionTests.rayEllipsoid(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
@@ -710,7 +710,7 @@ describe("Core/IntersectionTests", function () {
ray = new Ray(
new Cartesian3(0.0, 0.0, 2.0),
- new Cartesian3(0.0, 0.0, -1.0),
+ new Cartesian3(0.0, 0.0, -1.0)
);
intersections = IntersectionTests.rayEllipsoid(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
@@ -718,14 +718,14 @@ describe("Core/IntersectionTests", function () {
ray = new Ray(
new Cartesian3(1.0, 1.0, 0.0),
- new Cartesian3(-1.0, 0.0, 0.0),
+ new Cartesian3(-1.0, 0.0, 0.0)
);
intersections = IntersectionTests.rayEllipsoid(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
ray = new Ray(
new Cartesian3(-2.0, 0.0, 0.0),
- new Cartesian3(1.0, 0.0, 0.0),
+ new Cartesian3(1.0, 0.0, 0.0)
);
intersections = IntersectionTests.rayEllipsoid(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
@@ -733,7 +733,7 @@ describe("Core/IntersectionTests", function () {
ray = new Ray(
new Cartesian3(0.0, -2.0, 0.0),
- new Cartesian3(0.0, 1.0, 0.0),
+ new Cartesian3(0.0, 1.0, 0.0)
);
intersections = IntersectionTests.rayEllipsoid(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
@@ -741,7 +741,7 @@ describe("Core/IntersectionTests", function () {
ray = new Ray(
new Cartesian3(0.0, 0.0, -2.0),
- new Cartesian3(0.0, 0.0, 1.0),
+ new Cartesian3(0.0, 0.0, 1.0)
);
intersections = IntersectionTests.rayEllipsoid(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
@@ -749,28 +749,28 @@ describe("Core/IntersectionTests", function () {
ray = new Ray(
new Cartesian3(-1.0, -1.0, 0.0),
- new Cartesian3(1.0, 0.0, 0.0),
+ new Cartesian3(1.0, 0.0, 0.0)
);
intersections = IntersectionTests.rayEllipsoid(ray, unitSphere);
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
ray = new Ray(
new Cartesian3(-2.0, 0.0, 0.0),
- new Cartesian3(-1.0, 0.0, 0.0),
+ new Cartesian3(-1.0, 0.0, 0.0)
);
intersections = IntersectionTests.rayEllipsoid(ray, unitSphere);
expect(intersections).toBeUndefined();
ray = new Ray(
new Cartesian3(0.0, -2.0, 0.0),
- new Cartesian3(0.0, -1.0, 0.0),
+ new Cartesian3(0.0, -1.0, 0.0)
);
intersections = IntersectionTests.rayEllipsoid(ray, unitSphere);
expect(intersections).toBeUndefined();
ray = new Ray(
new Cartesian3(0.0, 0.0, -2.0),
- new Cartesian3(0.0, 0.0, -1.0),
+ new Cartesian3(0.0, 0.0, -1.0)
);
intersections = IntersectionTests.rayEllipsoid(ray, unitSphere);
expect(intersections).toBeUndefined();
@@ -782,7 +782,7 @@ describe("Core/IntersectionTests", function () {
const origin = new Cartesian3(20000.0, 0.0, 0.0);
const direction = Cartesian3.negate(
Cartesian3.normalize(origin, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
const ray = new Ray(origin, direction);
@@ -828,14 +828,14 @@ describe("Core/IntersectionTests", function () {
let ray = new Ray(
new Cartesian3(2.0, 0.0, 0.0),
- new Cartesian3(0.0, 0.0, 1.0),
+ new Cartesian3(0.0, 0.0, 1.0)
);
let intersections = IntersectionTests.rayEllipsoid(ray, unitSphere);
expect(intersections).not.toBeDefined();
ray = new Ray(
new Cartesian3(2.0, 0.0, 0.0),
- new Cartesian3(0.0, 0.0, -1.0),
+ new Cartesian3(0.0, 0.0, -1.0)
);
intersections = IntersectionTests.rayEllipsoid(ray, unitSphere);
expect(intersections).not.toBeDefined();
@@ -846,7 +846,7 @@ describe("Core/IntersectionTests", function () {
ray = new Ray(
new Cartesian3(2.0, 0.0, 0.0),
- new Cartesian3(0.0, -1.0, 0.0),
+ new Cartesian3(0.0, -1.0, 0.0)
);
intersections = IntersectionTests.rayEllipsoid(ray, unitSphere);
expect(intersections).not.toBeDefined();
@@ -868,7 +868,7 @@ describe("Core/IntersectionTests", function () {
const ellipsoid = Ellipsoid.UNIT_SPHERE;
const ray = new Ray(new Cartesian3(3.0, 0.0, 0.0), Cartesian3.UNIT_X);
expect(IntersectionTests.grazingAltitudeLocation(ray, ellipsoid)).toEqual(
- ray.origin,
+ ray.origin
);
});
@@ -881,7 +881,7 @@ describe("Core/IntersectionTests", function () {
ray = new Ray(
new Cartesian3(0.0, 2.0, 2.0),
- Cartesian3.negate(Cartesian3.UNIT_Y, new Cartesian3()),
+ Cartesian3.negate(Cartesian3.UNIT_Y, new Cartesian3())
);
expected = new Cartesian3(0.0, 0.0, 2.0);
actual = IntersectionTests.grazingAltitudeLocation(ray, ellipsoid);
@@ -893,18 +893,18 @@ describe("Core/IntersectionTests", function () {
const origin = new Cartesian3(
6502435.411150063,
-6350860.759819263,
- -7230794.954832983,
+ -7230794.954832983
);
const direction = new Cartesian3(
-0.6053473557455881,
0.002372596412575323,
- 0.7959578818493397,
+ 0.7959578818493397
);
const ray = new Ray(origin, direction);
const expected = new Cartesian3(
628106.8386515155,
-6327836.936616249,
- 493230.07552381355,
+ 493230.07552381355
);
const actual = IntersectionTests.grazingAltitudeLocation(ray, ellipsoid);
expect(actual).toEqualEpsilon(expected, CesiumMath.EPSILON8);
@@ -915,18 +915,18 @@ describe("Core/IntersectionTests", function () {
const origin = new Cartesian3(
-6546204.940468501,
-10625195.62660887,
- -6933745.82875373,
+ -6933745.82875373
);
const direction = new Cartesian3(
0.5130076305689283,
0.38589525779680295,
- 0.766751603185799,
+ 0.766751603185799
);
const ray = new Ray(origin, direction);
const expected = new Cartesian3(
-125.9063174739769,
-5701095.640722358,
- 2850156.57342018,
+ 2850156.57342018
);
const actual = IntersectionTests.grazingAltitudeLocation(ray, ellipsoid);
expect(actual).toEqualEpsilon(expected, CesiumMath.EPSILON10);
@@ -943,7 +943,7 @@ describe("Core/IntersectionTests", function () {
const ellipsoid = Ellipsoid.UNIT_SPHERE;
const ray = new Ray(Cartesian3.ZERO, Cartesian3.UNIT_Z);
expect(
- IntersectionTests.grazingAltitudeLocation(ray, ellipsoid),
+ IntersectionTests.grazingAltitudeLocation(ray, ellipsoid)
).not.toBeDefined();
});
@@ -958,7 +958,7 @@ describe("Core/IntersectionTests", function () {
const intersectionPoint = IntersectionTests.lineSegmentPlane(
endPoint0,
endPoint1,
- plane,
+ plane
);
expect(intersectionPoint).toEqual(new Cartesian3(1.0, 2.0, 0.0));
@@ -973,7 +973,7 @@ describe("Core/IntersectionTests", function () {
const intersectionPoint = IntersectionTests.lineSegmentPlane(
endPoint0,
endPoint1,
- plane,
+ plane
);
expect(intersectionPoint).not.toBeDefined();
@@ -988,7 +988,7 @@ describe("Core/IntersectionTests", function () {
const intersectionPoint = IntersectionTests.lineSegmentPlane(
endPoint0,
endPoint1,
- plane,
+ plane
);
expect(intersectionPoint).not.toBeDefined();
@@ -1003,7 +1003,7 @@ describe("Core/IntersectionTests", function () {
const intersectionPoint = IntersectionTests.lineSegmentPlane(
endPoint0,
endPoint1,
- plane,
+ plane
);
expect(intersectionPoint).not.toBeDefined();
@@ -1037,7 +1037,7 @@ describe("Core/IntersectionTests", function () {
p0,
p1,
p2,
- plane,
+ plane
);
expect(triangles).not.toBeDefined();
});
@@ -1045,7 +1045,7 @@ describe("Core/IntersectionTests", function () {
it("triangle is behind a plane", function () {
const plane = new Plane(
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- 0.0,
+ 0.0
);
const p0 = new Cartesian3(0.0, 0.0, 2.0);
const p1 = new Cartesian3(0.0, 1.0, 2.0);
@@ -1055,7 +1055,7 @@ describe("Core/IntersectionTests", function () {
p0,
p1,
p2,
- plane,
+ plane
);
expect(triangles).not.toBeDefined();
});
@@ -1070,12 +1070,12 @@ describe("Core/IntersectionTests", function () {
p0,
p1,
p2,
- plane,
+ plane
);
expect(triangles).toBeDefined();
expect(triangles.indices.length).toEqual(3 + 6);
expect(
- Cartesian3.equals(triangles.positions[triangles.indices[0]], p0),
+ Cartesian3.equals(triangles.positions[triangles.indices[0]], p0)
).toEqual(true);
});
@@ -1089,12 +1089,12 @@ describe("Core/IntersectionTests", function () {
p0,
p1,
p2,
- plane,
+ plane
);
expect(triangles).toBeDefined();
expect(triangles.indices.length).toEqual(3 + 6);
expect(
- Cartesian3.equals(triangles.positions[triangles.indices[0]], p1),
+ Cartesian3.equals(triangles.positions[triangles.indices[0]], p1)
).toEqual(true);
});
@@ -1108,12 +1108,12 @@ describe("Core/IntersectionTests", function () {
p0,
p1,
p2,
- plane,
+ plane
);
expect(triangles).toBeDefined();
expect(triangles.indices.length).toEqual(3 + 6);
expect(
- Cartesian3.equals(triangles.positions[triangles.indices[0]], p2),
+ Cartesian3.equals(triangles.positions[triangles.indices[0]], p2)
).toEqual(true);
});
@@ -1127,15 +1127,15 @@ describe("Core/IntersectionTests", function () {
p0,
p1,
p2,
- plane,
+ plane
);
expect(triangles).toBeDefined();
expect(triangles.indices.length).toEqual(6 + 3);
expect(
- Cartesian3.equals(triangles.positions[triangles.indices[0]], p1),
+ Cartesian3.equals(triangles.positions[triangles.indices[0]], p1)
).toEqual(true); // p0 is in front
expect(
- Cartesian3.equals(triangles.positions[triangles.indices[1]], p2),
+ Cartesian3.equals(triangles.positions[triangles.indices[1]], p2)
).toEqual(true);
});
@@ -1149,15 +1149,15 @@ describe("Core/IntersectionTests", function () {
p0,
p1,
p2,
- plane,
+ plane
);
expect(triangles).toBeDefined();
expect(triangles.indices.length).toEqual(6 + 3);
expect(
- Cartesian3.equals(triangles.positions[triangles.indices[0]], p2),
+ Cartesian3.equals(triangles.positions[triangles.indices[0]], p2)
).toEqual(true); // p1 is in front
expect(
- Cartesian3.equals(triangles.positions[triangles.indices[1]], p0),
+ Cartesian3.equals(triangles.positions[triangles.indices[1]], p0)
).toEqual(true);
});
@@ -1171,16 +1171,16 @@ describe("Core/IntersectionTests", function () {
p0,
p1,
p2,
- plane,
+ plane
);
expect(triangles).toBeDefined();
expect(triangles.indices.length).toEqual(6 + 3);
expect(
Cartesian3.equals(triangles.positions[triangles.indices[0]], p0),
- true,
+ true
); // p2 is in front
expect(
- Cartesian3.equals(triangles.positions[triangles.indices[1]], p1),
+ Cartesian3.equals(triangles.positions[triangles.indices[1]], p1)
).toEqual(true);
});
diff --git a/packages/engine/Specs/Core/Intersections2DSpec.js b/packages/engine/Specs/Core/Intersections2DSpec.js
index fd922961eac1..cfa2819c2534 100644
--- a/packages/engine/Specs/Core/Intersections2DSpec.js
+++ b/packages/engine/Specs/Core/Intersections2DSpec.js
@@ -8,7 +8,7 @@ describe("Core/Intersections2D", function () {
false,
0.2,
0.3,
- 0.4,
+ 0.4
);
expect(result.length).toBe(0);
});
@@ -19,7 +19,7 @@ describe("Core/Intersections2D", function () {
true,
0.2,
0.3,
- 0.4,
+ 0.4
);
expect(result.length).toBe(3);
expect(result[0]).toBe(0);
@@ -33,7 +33,7 @@ describe("Core/Intersections2D", function () {
false,
0.6,
0.4,
- 0.2,
+ 0.2
);
expect(result.length).toBe(10);
@@ -57,7 +57,7 @@ describe("Core/Intersections2D", function () {
true,
0.4,
0.6,
- 0.8,
+ 0.8
);
expect(result.length).toBe(10);
@@ -81,7 +81,7 @@ describe("Core/Intersections2D", function () {
false,
0.2,
0.6,
- 0.4,
+ 0.4
);
expect(result.length).toBe(10);
@@ -105,7 +105,7 @@ describe("Core/Intersections2D", function () {
true,
0.8,
0.4,
- 0.6,
+ 0.6
);
expect(result.length).toBe(10);
@@ -129,7 +129,7 @@ describe("Core/Intersections2D", function () {
false,
0.4,
0.2,
- 0.6,
+ 0.6
);
expect(result.length).toBe(10);
@@ -153,7 +153,7 @@ describe("Core/Intersections2D", function () {
true,
0.6,
0.8,
- 0.4,
+ 0.4
);
expect(result.length).toBe(10);
@@ -177,7 +177,7 @@ describe("Core/Intersections2D", function () {
false,
0.4,
0.6,
- 0.8,
+ 0.8
);
expect(result.length).toBe(9);
@@ -200,7 +200,7 @@ describe("Core/Intersections2D", function () {
true,
0.6,
0.4,
- 0.2,
+ 0.2
);
expect(result.length).toBe(9);
@@ -223,7 +223,7 @@ describe("Core/Intersections2D", function () {
false,
0.8,
0.4,
- 0.6,
+ 0.6
);
expect(result.length).toBe(9);
@@ -246,7 +246,7 @@ describe("Core/Intersections2D", function () {
true,
0.2,
0.6,
- 0.4,
+ 0.4
);
expect(result.length).toBe(9);
@@ -269,7 +269,7 @@ describe("Core/Intersections2D", function () {
false,
0.6,
0.8,
- 0.4,
+ 0.4
);
expect(result.length).toBe(9);
@@ -292,7 +292,7 @@ describe("Core/Intersections2D", function () {
true,
0.4,
0.2,
- 0.6,
+ 0.6
);
expect(result.length).toBe(9);
@@ -320,7 +320,7 @@ describe("Core/Intersections2D", function () {
1.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
expect(ll.x).toEqualEpsilon(1.0, 1e-15);
expect(ll.y).toEqualEpsilon(0.0, 1e-15);
@@ -334,7 +334,7 @@ describe("Core/Intersections2D", function () {
1.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
expect(lr.x).toEqualEpsilon(0.0, 1e-15);
expect(lr.y).toEqualEpsilon(1.0, 1e-15);
@@ -348,7 +348,7 @@ describe("Core/Intersections2D", function () {
1.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
expect(ul.x).toEqualEpsilon(0.0, 1e-15);
expect(ul.y).toEqualEpsilon(0.0, 1e-15);
@@ -364,7 +364,7 @@ describe("Core/Intersections2D", function () {
-1,
-0.5,
1,
- -0.5,
+ -0.5
);
expect(result.x).toEqualEpsilon(1.0 / 3.0, 1e-15);
expect(result.y).toEqualEpsilon(1.0 / 3.0, 1e-15);
@@ -380,7 +380,7 @@ describe("Core/Intersections2D", function () {
2.0,
1.0,
1.0,
- 2.0,
+ 2.0
);
expect(e12.x).toEqualEpsilon(0.5, 1e-15);
expect(e12.y).toEqualEpsilon(0.5, 1e-15);
@@ -394,7 +394,7 @@ describe("Core/Intersections2D", function () {
2.0,
1.0,
1.0,
- 2.0,
+ 2.0
);
expect(e23.x).toEqualEpsilon(0.0, 1e-15);
expect(e23.y).toEqualEpsilon(0.5, 1e-15);
@@ -408,7 +408,7 @@ describe("Core/Intersections2D", function () {
2.0,
1.0,
1.0,
- 2.0,
+ 2.0
);
expect(e31.x).toEqualEpsilon(0.5, 1e-15);
expect(e31.y).toEqualEpsilon(0.0, 1e-15);
@@ -424,7 +424,7 @@ describe("Core/Intersections2D", function () {
2.0,
1.0,
1.0,
- 2.0,
+ 2.0
);
expect(result1.x).toBeGreaterThan(0.0);
expect(result1.y).toBeLessThan(0.0);
@@ -438,7 +438,7 @@ describe("Core/Intersections2D", function () {
2.0,
1.0,
1.0,
- 2.0,
+ 2.0
);
expect(result2.x).toBeLessThan(0.0);
expect(result2.y).toBeGreaterThan(0.0);
@@ -452,7 +452,7 @@ describe("Core/Intersections2D", function () {
2.0,
1.0,
1.0,
- 2.0,
+ 2.0
);
expect(result3.x).toBeLessThan(0.0);
expect(result3.y).toBeLessThan(0.0);
@@ -462,174 +462,162 @@ describe("Core/Intersections2D", function () {
describe("computeLineSegmentLineSegmentIntersection", function () {
it("returns the correct result for intersection point", function () {
- const intersection0 =
- Intersections2D.computeLineSegmentLineSegmentIntersection(
- 0.0,
- 0.0,
- 0.0,
- 2.0,
- -1.0,
- 1.0,
- 1.0,
- 1.0,
- );
+ const intersection0 = Intersections2D.computeLineSegmentLineSegmentIntersection(
+ 0.0,
+ 0.0,
+ 0.0,
+ 2.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ );
expect(intersection0.x).toEqualEpsilon(0.0, 1e-15);
expect(intersection0.y).toEqualEpsilon(1.0, 1e-15);
- const intersection1 =
- Intersections2D.computeLineSegmentLineSegmentIntersection(
- 0.0,
- 0.0,
- 10.0,
- 5.0,
- 0.0,
- 5.0,
- 10.0,
- 0.0,
- );
+ const intersection1 = Intersections2D.computeLineSegmentLineSegmentIntersection(
+ 0.0,
+ 0.0,
+ 10.0,
+ 5.0,
+ 0.0,
+ 5.0,
+ 10.0,
+ 0.0
+ );
expect(intersection1.x).toEqualEpsilon(5.0, 1e-15);
expect(intersection1.y).toEqualEpsilon(2.5, 1e-15);
- const intersection2 =
- Intersections2D.computeLineSegmentLineSegmentIntersection(
- 0.0,
- -5.0,
- 4.0,
- 3.0,
- -2.0,
- 1.0,
- 4.0,
- -2.0,
- );
+ const intersection2 = Intersections2D.computeLineSegmentLineSegmentIntersection(
+ 0.0,
+ -5.0,
+ 4.0,
+ 3.0,
+ -2.0,
+ 1.0,
+ 4.0,
+ -2.0
+ );
expect(intersection2.x).toEqualEpsilon(2.0, 1e-15);
expect(intersection2.y).toEqualEpsilon(-1.0, 1e-15);
});
it("returns the correct result for intersection point on a vertex", function () {
- const intersection0 =
- Intersections2D.computeLineSegmentLineSegmentIntersection(
- 0.0,
- 0.0,
- 0.0,
- 2.0,
- -1.0,
- 0.0,
- 1.0,
- 0.0,
- );
+ const intersection0 = Intersections2D.computeLineSegmentLineSegmentIntersection(
+ 0.0,
+ 0.0,
+ 0.0,
+ 2.0,
+ -1.0,
+ 0.0,
+ 1.0,
+ 0.0
+ );
expect(intersection0.x).toEqualEpsilon(0.0, 1e-15);
expect(intersection0.y).toEqualEpsilon(0.0, 1e-15);
- const intersection1 =
- Intersections2D.computeLineSegmentLineSegmentIntersection(
- 0.0,
- 0.0,
- 1.0,
- 1.0,
- 1.0,
- 1.0,
- 2.0,
- 0.0,
- );
+ const intersection1 = Intersections2D.computeLineSegmentLineSegmentIntersection(
+ 0.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 2.0,
+ 0.0
+ );
expect(intersection1.x).toEqualEpsilon(1.0, 1e-15);
expect(intersection1.y).toEqualEpsilon(1.0, 1e-15);
- const intersection2 =
- Intersections2D.computeLineSegmentLineSegmentIntersection(
- 0.0,
- 0.0,
- 4.0,
- 3.0,
- 5.0,
- 0.0,
- 4.0,
- 3.0,
- );
+ const intersection2 = Intersections2D.computeLineSegmentLineSegmentIntersection(
+ 0.0,
+ 0.0,
+ 4.0,
+ 3.0,
+ 5.0,
+ 0.0,
+ 4.0,
+ 3.0
+ );
expect(intersection2.x).toEqualEpsilon(4.0, 1e-15);
expect(intersection2.y).toEqualEpsilon(3.0, 1e-15);
});
it("returns undefined for non-intersecting lines", function () {
- const intersection0 =
- Intersections2D.computeLineSegmentLineSegmentIntersection(
- 0.0,
- 0.0,
- 0.0,
- 5.0,
- 0.1,
- 4.8,
- 5.0,
- 0.0,
- );
+ const intersection0 = Intersections2D.computeLineSegmentLineSegmentIntersection(
+ 0.0,
+ 0.0,
+ 0.0,
+ 5.0,
+ 0.1,
+ 4.8,
+ 5.0,
+ 0.0
+ );
expect(intersection0).toBeUndefined();
- const intersection1 =
- Intersections2D.computeLineSegmentLineSegmentIntersection(
- 10.0,
- 0.0,
- 0.0,
- -10.0,
- 0.0,
- 0.0,
- -8.0,
- -8.0,
- );
+ const intersection1 = Intersections2D.computeLineSegmentLineSegmentIntersection(
+ 10.0,
+ 0.0,
+ 0.0,
+ -10.0,
+ 0.0,
+ 0.0,
+ -8.0,
+ -8.0
+ );
expect(intersection1).toBeUndefined();
});
it("returns undefined for parallel lines", function () {
- const intersection0 =
- Intersections2D.computeLineSegmentLineSegmentIntersection(
- 0.0,
- 0.0,
- 0.0,
- 2.0,
- 1.0,
- 1.0,
- 1.0,
- 4.0,
- );
+ const intersection0 = Intersections2D.computeLineSegmentLineSegmentIntersection(
+ 0.0,
+ 0.0,
+ 0.0,
+ 2.0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 4.0
+ );
expect(intersection0).toBeUndefined();
- const intersection1 =
- Intersections2D.computeLineSegmentLineSegmentIntersection(
- 1.0,
- 1.0,
- 4.0,
- 4.0,
- 0.0,
- 0.0,
- 3.0,
- 3.0,
- );
+ const intersection1 = Intersections2D.computeLineSegmentLineSegmentIntersection(
+ 1.0,
+ 1.0,
+ 4.0,
+ 4.0,
+ 0.0,
+ 0.0,
+ 3.0,
+ 3.0
+ );
expect(intersection1).toBeUndefined();
});
it("returns undefined for coincident lines", function () {
- const intersection0 =
- Intersections2D.computeLineSegmentLineSegmentIntersection(
- 0.0,
- 0.0,
- 0.0,
- 2.0,
- 0.0,
- 1.0,
- 0.0,
- 4.0,
- );
+ const intersection0 = Intersections2D.computeLineSegmentLineSegmentIntersection(
+ 0.0,
+ 0.0,
+ 0.0,
+ 2.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 4.0
+ );
expect(intersection0).toBeUndefined();
- const intersection1 =
- Intersections2D.computeLineSegmentLineSegmentIntersection(
- 0.0,
- 0.0,
- 0.0,
- 2.0,
- 0.0,
- 0.0,
- 0.0,
- 2.0,
- );
+ const intersection1 = Intersections2D.computeLineSegmentLineSegmentIntersection(
+ 0.0,
+ 0.0,
+ 0.0,
+ 2.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 2.0
+ );
expect(intersection1).toBeUndefined();
});
});
diff --git a/packages/engine/Specs/Core/IonGeocoderServiceSpec.js b/packages/engine/Specs/Core/IonGeocoderServiceSpec.js
index 17951c615c02..43b490eab0a1 100644
--- a/packages/engine/Specs/Core/IonGeocoderServiceSpec.js
+++ b/packages/engine/Specs/Core/IonGeocoderServiceSpec.js
@@ -47,7 +47,7 @@ describe("Core/IonGeocoderService", function () {
const expectedResult = ["results"];
spyOn(service._pelias, "geocode").and.returnValue(
- Promise.resolve(expectedResult),
+ Promise.resolve(expectedResult)
);
const query = "some query";
@@ -55,7 +55,7 @@ describe("Core/IonGeocoderService", function () {
expect(result).toEqual(expectedResult);
expect(service._pelias.geocode).toHaveBeenCalledWith(
query,
- GeocodeType.SEARCH,
+ GeocodeType.SEARCH
);
});
diff --git a/packages/engine/Specs/Core/IonResourceSpec.js b/packages/engine/Specs/Core/IonResourceSpec.js
index fe073840afc5..754bbbb030c9 100644
--- a/packages/engine/Specs/Core/IonResourceSpec.js
+++ b/packages/engine/Specs/Core/IonResourceSpec.js
@@ -64,35 +64,35 @@ describe("Core/IonResource", function () {
const options = {};
const resourceEndpoint = IonResource._createEndpointResource(
tilesAssetId,
- options,
+ options
);
spyOn(IonResource, "_createEndpointResource").and.returnValue(
- resourceEndpoint,
+ resourceEndpoint
);
spyOn(resourceEndpoint, "fetchJson").and.returnValue(
- Promise.resolve(tilesEndpoint),
+ Promise.resolve(tilesEndpoint)
);
- return IonResource.fromAssetId(tilesAssetId, options).then(
- function (resource) {
- expect(IonResource._createEndpointResource).toHaveBeenCalledWith(
- tilesAssetId,
- options,
- );
- expect(resourceEndpoint.fetchJson).toHaveBeenCalled();
- expect(resource._ionEndpointResource).toEqual(resourceEndpoint);
- expect(resource._ionEndpoint).toEqual(tilesEndpoint);
- },
- );
+ return IonResource.fromAssetId(tilesAssetId, options).then(function (
+ resource
+ ) {
+ expect(IonResource._createEndpointResource).toHaveBeenCalledWith(
+ tilesAssetId,
+ options
+ );
+ expect(resourceEndpoint.fetchJson).toHaveBeenCalled();
+ expect(resource._ionEndpointResource).toEqual(resourceEndpoint);
+ expect(resource._ionEndpoint).toEqual(tilesEndpoint);
+ });
});
function testNonImageryExternalResource(externalEndpoint) {
const resourceEndpoint = IonResource._createEndpointResource(123890213);
spyOn(IonResource, "_createEndpointResource").and.returnValue(
- resourceEndpoint,
+ resourceEndpoint
);
spyOn(resourceEndpoint, "fetchJson").and.returnValue(
- Promise.resolve(externalEndpoint),
+ Promise.resolve(externalEndpoint)
);
return IonResource.fromAssetId(123890213).then(function (resource) {
@@ -137,7 +137,7 @@ describe("Core/IonResource", function () {
const assetId = 2348234;
const resource = IonResource._createEndpointResource(assetId);
expect(resource.url).toBe(
- `${Ion.defaultServer.url}v1/assets/${assetId}/endpoint?access_token=${Ion.defaultAccessToken}`,
+ `${Ion.defaultServer.url}v1/assets/${assetId}/endpoint?access_token=${Ion.defaultAccessToken}`
);
});
@@ -151,7 +151,7 @@ describe("Core/IonResource", function () {
accessToken: accessToken,
});
expect(resource.url).toBe(
- `${serverUrl}v1/assets/${assetId}/endpoint?access_token=${accessToken}`,
+ `${serverUrl}v1/assets/${assetId}/endpoint?access_token=${accessToken}`
);
});
@@ -165,7 +165,7 @@ describe("Core/IonResource", function () {
const assetId = 2348234;
const resource = IonResource._createEndpointResource(assetId);
expect(resource.url).toBe(
- `${Ion.defaultServer.url}v1/assets/${assetId}/endpoint?access_token=${Ion.defaultAccessToken}`,
+ `${Ion.defaultServer.url}v1/assets/${assetId}/endpoint?access_token=${Ion.defaultAccessToken}`
);
Ion.defaultServer = defaultServer;
@@ -353,7 +353,7 @@ describe("Core/IonResource", function () {
return testCallback(derived, error).then(function () {
expect(derived._ionEndpoint).toBe(resource._ionEndpoint);
expect(derived.headers.Authorization).toEqual(
- resource.headers.Authorization,
+ resource.headers.Authorization
);
});
});
diff --git a/packages/engine/Specs/Core/JulianDateSpec.js b/packages/engine/Specs/Core/JulianDateSpec.js
index 9bc22b32d88e..4a034a293659 100644
--- a/packages/engine/Specs/Core/JulianDateSpec.js
+++ b/packages/engine/Specs/Core/JulianDateSpec.js
@@ -236,7 +236,7 @@ describe("Core/JulianDate", function () {
it("Construct from ISO8601 UTC calendar date and time, basic format", function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2009, 7, 1, 12, 30, 25)),
+ new Date(Date.UTC(2009, 7, 1, 12, 30, 25))
);
const computedDate = JulianDate.fromIso8601("20090801T123025Z");
expect(computedDate).toEqual(expectedDate);
@@ -244,7 +244,7 @@ describe("Core/JulianDate", function () {
it("Construct from ISO8601 UTC calendar date and time, extended format", function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2009, 7, 1, 12, 30, 25)),
+ new Date(Date.UTC(2009, 7, 1, 12, 30, 25))
);
const computedDate = JulianDate.fromIso8601("2009-08-01T12:30:25Z");
expect(computedDate).toEqual(expectedDate);
@@ -257,7 +257,7 @@ describe("Core/JulianDate", function () {
const expectedDate = new JulianDate(
2455045,
1825.5125423,
- TimeStandard.UTC,
+ TimeStandard.UTC
);
const computedDate = JulianDate.fromIso8601("20090801T123025.5125423Z");
expect(computedDate).toEqual(expectedDate);
@@ -269,7 +269,7 @@ describe("Core/JulianDate", function () {
const expectedDate = new JulianDate(
2455045,
1825.5125423,
- TimeStandard.UTC,
+ TimeStandard.UTC
);
const computedDate = JulianDate.fromIso8601("2009-08-01T12:30:25.5125423Z");
expect(computedDate).toEqual(expectedDate);
@@ -282,7 +282,7 @@ describe("Core/JulianDate", function () {
const expectedDate = new JulianDate(
2455045,
1825.5125423,
- TimeStandard.UTC,
+ TimeStandard.UTC
);
const computedDate = JulianDate.fromIso8601("20090801T123025,5125423Z");
expect(computedDate).toEqual(expectedDate);
@@ -294,7 +294,7 @@ describe("Core/JulianDate", function () {
const expectedDate = new JulianDate(
2455045,
1825.5125423,
- TimeStandard.UTC,
+ TimeStandard.UTC
);
const computedDate = JulianDate.fromIso8601("2009-08-01T12:30:25,5125423Z");
expect(computedDate).toEqual(expectedDate);
@@ -302,7 +302,7 @@ describe("Core/JulianDate", function () {
it("Construct from ISO8601 UTC calendar date and time no seconds, basic format", function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2009, 7, 1, 12, 30, 0)),
+ new Date(Date.UTC(2009, 7, 1, 12, 30, 0))
);
const computedDate = JulianDate.fromIso8601("20090801T1230Z");
expect(computedDate).toEqual(expectedDate);
@@ -310,7 +310,7 @@ describe("Core/JulianDate", function () {
it("Construct from ISO8601 UTC calendar date and time no seconds, extended format", function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2009, 7, 1, 12, 30, 0)),
+ new Date(Date.UTC(2009, 7, 1, 12, 30, 0))
);
const computedDate = JulianDate.fromIso8601("2009-08-01T12:30Z");
expect(computedDate).toEqual(expectedDate);
@@ -318,7 +318,7 @@ describe("Core/JulianDate", function () {
it("Construct from ISO8601 UTC calendar date and time fractional minutes, basic format", function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2009, 7, 1, 12, 30, 30)),
+ new Date(Date.UTC(2009, 7, 1, 12, 30, 30))
);
const computedDate = JulianDate.fromIso8601("20090801T1230.5Z");
expect(computedDate).toEqual(expectedDate);
@@ -326,7 +326,7 @@ describe("Core/JulianDate", function () {
it("Construct from ISO8601 UTC calendar date and time fractional minutes, extended format", function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2009, 7, 1, 12, 30, 30)),
+ new Date(Date.UTC(2009, 7, 1, 12, 30, 30))
);
const computedDate = JulianDate.fromIso8601("2009-08-01T12:30.5Z");
expect(computedDate).toEqual(expectedDate);
@@ -334,7 +334,7 @@ describe("Core/JulianDate", function () {
it('Construct from ISO8601 UTC calendar date and time fractional minutes, basic format, "," instead of "."', function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2009, 7, 1, 12, 30, 30)),
+ new Date(Date.UTC(2009, 7, 1, 12, 30, 30))
);
const computedDate = JulianDate.fromIso8601("20090801T1230,5Z");
expect(computedDate).toEqual(expectedDate);
@@ -342,7 +342,7 @@ describe("Core/JulianDate", function () {
it('Construct from ISO8601 UTC calendar date and time fractional minutes, extended format, "," instead of "."', function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2009, 7, 1, 12, 30, 30)),
+ new Date(Date.UTC(2009, 7, 1, 12, 30, 30))
);
const computedDate = JulianDate.fromIso8601("2009-08-01T12:30,5Z");
expect(computedDate).toEqual(expectedDate);
@@ -350,7 +350,7 @@ describe("Core/JulianDate", function () {
it("Construct from ISO8601 UTC calendar date and time no minutes/seconds, basic format", function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2009, 7, 1, 12, 0, 0)),
+ new Date(Date.UTC(2009, 7, 1, 12, 0, 0))
);
const computedDate = JulianDate.fromIso8601("20090801T12Z");
expect(computedDate).toEqual(expectedDate);
@@ -358,7 +358,7 @@ describe("Core/JulianDate", function () {
it("Construct from ISO8601 UTC calendar date and time no minutes/seconds, extended format", function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2009, 7, 1, 12, 0, 0)),
+ new Date(Date.UTC(2009, 7, 1, 12, 0, 0))
);
const computedDate = JulianDate.fromIso8601("2009-08-01T12Z");
expect(computedDate).toEqual(expectedDate);
@@ -366,7 +366,7 @@ describe("Core/JulianDate", function () {
it("Construct from ISO8601 UTC calendar date and time fractional hours, basic format", function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2009, 7, 1, 12, 30, 0)),
+ new Date(Date.UTC(2009, 7, 1, 12, 30, 0))
);
const computedDate = JulianDate.fromIso8601("20090801T12.5Z");
expect(computedDate).toEqual(expectedDate);
@@ -374,7 +374,7 @@ describe("Core/JulianDate", function () {
it("Construct from ISO8601 UTC calendar date and time fractional hours, extended format", function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2009, 7, 1, 12, 30, 0)),
+ new Date(Date.UTC(2009, 7, 1, 12, 30, 0))
);
const computedDate = JulianDate.fromIso8601("2009-08-01T12.5Z");
expect(computedDate).toEqual(expectedDate);
@@ -382,7 +382,7 @@ describe("Core/JulianDate", function () {
it('Construct from ISO8601 UTC calendar date and time fractional hours, basic format, "," instead of "."', function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2009, 7, 1, 12, 30, 0)),
+ new Date(Date.UTC(2009, 7, 1, 12, 30, 0))
);
const computedDate = JulianDate.fromIso8601("20090801T12,5Z");
expect(computedDate).toEqual(expectedDate);
@@ -390,7 +390,7 @@ describe("Core/JulianDate", function () {
it('Construct from ISO8601 UTC calendar date and time fractional hours, extended format, "," instead of "."', function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2009, 7, 1, 12, 30, 0)),
+ new Date(Date.UTC(2009, 7, 1, 12, 30, 0))
);
const computedDate = JulianDate.fromIso8601("2009-08-01T12,5Z");
expect(computedDate).toEqual(expectedDate);
@@ -404,12 +404,12 @@ describe("Core/JulianDate", function () {
it("Construct from an ISO8601 UTC calendar date and time within a leap second", function () {
const computedDate = JulianDate.fromIso8601(
- "2008-12-31T23:59:60.123456789Z",
+ "2008-12-31T23:59:60.123456789Z"
);
const expectedDate = new JulianDate(
2454832,
43233.123456789,
- TimeStandard.TAI,
+ TimeStandard.TAI
);
expect(computedDate).toEqual(expectedDate);
});
@@ -428,7 +428,7 @@ describe("Core/JulianDate", function () {
it("Construct from an ISO8601 calendar date and time using 24:00:00 midnight notation", function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2009, 7, 2, 0, 0, 0)),
+ new Date(Date.UTC(2009, 7, 2, 0, 0, 0))
);
const computedDate = JulianDate.fromIso8601("2009-08-01T24:00:00Z");
expect(computedDate).toEqual(expectedDate);
@@ -436,7 +436,7 @@ describe("Core/JulianDate", function () {
it("Construct from an ISO8601 local calendar date with UTC offset that crosses into previous month", function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(1985, 2, 31, 23, 59, 0)),
+ new Date(Date.UTC(1985, 2, 31, 23, 59, 0))
);
const computedDate = JulianDate.fromIso8601("1985-04-01T00:59:00+01");
expect(computedDate).toEqual(expectedDate);
@@ -444,7 +444,7 @@ describe("Core/JulianDate", function () {
it("Construct from an ISO8601 local calendar date with UTC offset that crosses into next month", function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(1985, 3, 1, 0, 59, 0)),
+ new Date(Date.UTC(1985, 3, 1, 0, 59, 0))
);
const computedDate = JulianDate.fromIso8601("1985-03-31T23:59:00-01");
expect(computedDate).toEqual(expectedDate);
@@ -452,7 +452,7 @@ describe("Core/JulianDate", function () {
it("Construct from an ISO8601 local calendar date with UTC offset that crosses into next year", function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2008, 11, 31, 23, 0, 0)),
+ new Date(Date.UTC(2008, 11, 31, 23, 0, 0))
);
const julianDate = JulianDate.fromIso8601("2009-01-01T01:00:00+02");
expect(julianDate).toEqual(expectedDate);
@@ -460,7 +460,7 @@ describe("Core/JulianDate", function () {
it("Construct from an ISO8601 local calendar date with UTC offset that crosses into previous year", function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2009, 0, 1, 1, 0, 0)),
+ new Date(Date.UTC(2009, 0, 1, 1, 0, 0))
);
const julianDate = JulianDate.fromIso8601("2008-12-31T23:00:00-02");
expect(julianDate).toEqual(expectedDate);
@@ -468,7 +468,7 @@ describe("Core/JulianDate", function () {
it("Construct from an ISO8601 local calendar date with UTC offset", function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2008, 10, 10, 12, 0, 0)),
+ new Date(Date.UTC(2008, 10, 10, 12, 0, 0))
);
const julianDate = JulianDate.fromIso8601("2008-11-10T14:00:00+02");
expect(julianDate).toEqual(expectedDate);
@@ -476,7 +476,7 @@ describe("Core/JulianDate", function () {
it("Construct from an ISO8601 local calendar date with UTC offset in extended format", function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2008, 10, 10, 11, 30, 0)),
+ new Date(Date.UTC(2008, 10, 10, 11, 30, 0))
);
const julianDate = JulianDate.fromIso8601("2008-11-10T14:00:00+02:30");
expect(julianDate).toEqual(expectedDate);
@@ -484,7 +484,7 @@ describe("Core/JulianDate", function () {
it("Construct from an ISO8601 local calendar date with zero UTC offset in extended format", function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2008, 10, 10, 14, 0, 0)),
+ new Date(Date.UTC(2008, 10, 10, 14, 0, 0))
);
const julianDate = JulianDate.fromIso8601("2008-11-10T14:00:00+00:00");
expect(julianDate).toEqual(expectedDate);
@@ -492,7 +492,7 @@ describe("Core/JulianDate", function () {
it("Construct from an ISO8601 local calendar date with zero UTC offset in extended format", function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2008, 10, 10, 14, 0, 0)),
+ new Date(Date.UTC(2008, 10, 10, 14, 0, 0))
);
const julianDate = JulianDate.fromIso8601("2008-11-10T14:00:00+00");
expect(julianDate).toEqual(expectedDate);
@@ -500,7 +500,7 @@ describe("Core/JulianDate", function () {
it("Construct from ISO8601 local calendar date and time with no seconds and UTC offset in basic format", function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2009, 7, 1, 12, 30, 0)),
+ new Date(Date.UTC(2009, 7, 1, 12, 30, 0))
);
const computedDate = JulianDate.fromIso8601("20090801T0730-0500");
expect(computedDate).toEqual(expectedDate);
@@ -508,7 +508,7 @@ describe("Core/JulianDate", function () {
it("Construct from ISO8601 local calendar date and time with no seconds and UTC offset in extended format", function () {
const expectedDate = JulianDate.fromDate(
- new Date(Date.UTC(2009, 7, 1, 12, 30, 0)),
+ new Date(Date.UTC(2009, 7, 1, 12, 30, 0))
);
const computedDate = JulianDate.fromIso8601("2009-08-01T07:30-05:00");
expect(computedDate).toEqual(expectedDate);
@@ -559,7 +559,7 @@ describe("Core/JulianDate", function () {
it("Fails to construct an ISO8601 date from a valid ISO8601 interval", function () {
expect(function () {
return JulianDate.fromIso8601(
- "2007-03-01T13:00:00Z/2008-05-11T15:30:00Z",
+ "2007-03-01T13:00:00Z/2008-05-11T15:30:00Z"
);
}).toThrowDeveloperError();
});
@@ -771,7 +771,7 @@ describe("Core/JulianDate", function () {
it("toDate works a second before a leap second", function () {
const expectedDate = new Date("6/30/1997 11:59:59 PM UTC");
const date = JulianDate.toDate(
- new JulianDate(2450630, 43229.0, TimeStandard.TAI),
+ new JulianDate(2450630, 43229.0, TimeStandard.TAI)
);
expect(date).toEqual(expectedDate);
});
@@ -779,7 +779,7 @@ describe("Core/JulianDate", function () {
it("toDate works on a leap second", function () {
const expectedDate = new Date("6/30/1997 11:59:59 PM UTC");
const date = JulianDate.toDate(
- new JulianDate(2450630, 43230.0, TimeStandard.TAI),
+ new JulianDate(2450630, 43230.0, TimeStandard.TAI)
);
expect(date).toEqual(expectedDate);
});
@@ -787,7 +787,7 @@ describe("Core/JulianDate", function () {
it("toDate works a second after a leap second", function () {
const expectedDate = new Date("7/1/1997 12:00:00 AM UTC");
const date = JulianDate.toDate(
- new JulianDate(2450630, 43231.0, TimeStandard.TAI),
+ new JulianDate(2450630, 43231.0, TimeStandard.TAI)
);
expect(date).toEqual(expectedDate);
});
@@ -795,7 +795,7 @@ describe("Core/JulianDate", function () {
it("toDate works on date before any leap seconds", function () {
const expectedDate = new Date("09/10/1968 12:00:00 AM UTC");
const date = JulianDate.toDate(
- new JulianDate(2440109, 43210.0, TimeStandard.TAI),
+ new JulianDate(2440109, 43210.0, TimeStandard.TAI)
);
expect(date).toEqual(expectedDate);
});
@@ -803,7 +803,7 @@ describe("Core/JulianDate", function () {
it("toDate works on date later than all leap seconds", function () {
const expectedDate = new Date("11/17/2039 12:00:00 AM UTC");
const date = JulianDate.toDate(
- new JulianDate(2466109, 43237.0, TimeStandard.TAI),
+ new JulianDate(2466109, 43237.0, TimeStandard.TAI)
);
expect(date).toEqual(expectedDate);
});
@@ -892,7 +892,7 @@ describe("Core/JulianDate", function () {
const end = JulianDate.fromDate(new Date("July 5, 2011 12:01:00 UTC"));
expect(JulianDate.secondsDifference(end, start)).toEqualEpsilon(
TimeConstants.SECONDS_PER_DAY + TimeConstants.SECONDS_PER_MINUTE,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
});
@@ -901,7 +901,7 @@ describe("Core/JulianDate", function () {
const end = JulianDate.fromDate(new Date("July 5, 2011 12:01:00 UTC"));
expect(JulianDate.secondsDifference(end, start)).toEqualEpsilon(
TimeConstants.SECONDS_PER_DAY + TimeConstants.SECONDS_PER_MINUTE,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
});
@@ -910,7 +910,7 @@ describe("Core/JulianDate", function () {
const end = JulianDate.fromDate(new Date("July 5, 2011 12:01:00 UTC"));
expect(JulianDate.secondsDifference(end, start)).toEqualEpsilon(
TimeConstants.SECONDS_PER_DAY + TimeConstants.SECONDS_PER_MINUTE,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
});
@@ -933,11 +933,11 @@ describe("Core/JulianDate", function () {
const end = JulianDate.addSeconds(start, 95, new JulianDate());
expect(JulianDate.toDate(end).getUTCSeconds()).toEqualEpsilon(
5,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
expect(JulianDate.toDate(end).getUTCMinutes()).toEqualEpsilon(
2,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
});
@@ -951,7 +951,7 @@ describe("Core/JulianDate", function () {
const start = JulianDate.fromDate(new Date("August 11 2011 6:00:00 UTC"));
const end = JulianDate.addSeconds(start, 0.5, new JulianDate());
expect(JulianDate.secondsDifference(end, start, new JulianDate())).toEqual(
- 0.5,
+ 0.5
);
});
@@ -959,7 +959,7 @@ describe("Core/JulianDate", function () {
const start = JulianDate.fromDate(new Date("August 11 2011 11:59:59 UTC"));
const end = JulianDate.addSeconds(start, 1.25, new JulianDate());
expect(JulianDate.secondsDifference(end, start, new JulianDate())).toEqual(
- 1.25,
+ 1.25
);
});
@@ -987,7 +987,7 @@ describe("Core/JulianDate", function () {
return JulianDate.addSeconds(
JulianDate.now(),
undefined,
- new JulianDate(),
+ new JulianDate()
);
}).toThrowDeveloperError();
});
@@ -996,11 +996,11 @@ describe("Core/JulianDate", function () {
const end = JulianDate.addMinutes(start, 65, new JulianDate());
expect(JulianDate.toDate(end).getUTCMinutes()).toEqualEpsilon(
5,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
expect(JulianDate.toDate(end).getUTCHours()).toEqualEpsilon(
13,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
});
@@ -1009,11 +1009,11 @@ describe("Core/JulianDate", function () {
const end = JulianDate.addMinutes(start, -35, new JulianDate());
expect(JulianDate.toDate(end).getUTCMinutes()).toEqualEpsilon(
25,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
expect(JulianDate.toDate(end).getUTCHours()).toEqualEpsilon(
11,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
});
@@ -1022,7 +1022,7 @@ describe("Core/JulianDate", function () {
return JulianDate.addMinutes(
JulianDate.now(),
undefined,
- new JulianDate(),
+ new JulianDate()
);
}).toThrowDeveloperError();
});
@@ -1032,7 +1032,7 @@ describe("Core/JulianDate", function () {
const end = JulianDate.addHours(start, 6, new JulianDate());
expect(JulianDate.toDate(end).getUTCHours()).toEqualEpsilon(
18,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
});
@@ -1041,7 +1041,7 @@ describe("Core/JulianDate", function () {
const end = JulianDate.addHours(start, -6, new JulianDate());
expect(JulianDate.toDate(end).getUTCHours()).toEqualEpsilon(
6,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
});
it("addHours fails with undefined input", function () {
@@ -1055,11 +1055,11 @@ describe("Core/JulianDate", function () {
const end = JulianDate.addDays(start, 32, new JulianDate());
expect(JulianDate.toDate(end).getUTCDate()).toEqualEpsilon(
5,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
expect(JulianDate.toDate(end).getUTCMonth()).toEqualEpsilon(
7,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
});
@@ -1068,11 +1068,11 @@ describe("Core/JulianDate", function () {
const end = JulianDate.addDays(start, -4, new JulianDate());
expect(JulianDate.toDate(end).getUTCDate()).toEqualEpsilon(
30,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
expect(JulianDate.toDate(end).getUTCMonth()).toEqualEpsilon(
5,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
});
@@ -1095,8 +1095,8 @@ describe("Core/JulianDate", function () {
expect(
JulianDate.lessThan(
start,
- JulianDate.addSeconds(end, 1, new JulianDate()),
- ),
+ JulianDate.addSeconds(end, 1, new JulianDate())
+ )
).toEqual(true);
});
@@ -1113,14 +1113,14 @@ describe("Core/JulianDate", function () {
expect(
JulianDate.lessThanOrEquals(
JulianDate.addSeconds(start, 1, new JulianDate()),
- end,
- ),
+ end
+ )
).toEqual(false);
expect(
JulianDate.lessThanOrEquals(
JulianDate.addSeconds(start, -1, new JulianDate()),
- end,
- ),
+ end
+ )
).toEqual(true);
});
@@ -1137,8 +1137,8 @@ describe("Core/JulianDate", function () {
expect(
JulianDate.greaterThan(
start,
- JulianDate.addSeconds(end, -1, new JulianDate()),
- ),
+ JulianDate.addSeconds(end, -1, new JulianDate())
+ )
).toEqual(true);
});
@@ -1155,20 +1155,20 @@ describe("Core/JulianDate", function () {
expect(
JulianDate.greaterThanOrEquals(
JulianDate.addSeconds(start, -1, new JulianDate()),
- end,
- ),
+ end
+ )
).toEqual(false);
expect(
JulianDate.greaterThanOrEquals(
JulianDate.addSeconds(start, 1, new JulianDate()),
- end,
- ),
+ end
+ )
).toEqual(true);
});
it("can be equal to within an epsilon of another JulianDate", function () {
const original = JulianDate.fromDate(
- new Date("September 7, 2011 12:55:00 UTC"),
+ new Date("September 7, 2011 12:55:00 UTC")
);
let clone = JulianDate.fromDate(new Date("September 7, 2011 12:55:00 UTC"));
clone = JulianDate.addSeconds(clone, 1, new JulianDate());
diff --git a/packages/engine/Specs/Core/LagrangePolynomialApproximationSpec.js b/packages/engine/Specs/Core/LagrangePolynomialApproximationSpec.js
index cfeda6cf173b..d7771e80cc5b 100644
--- a/packages/engine/Specs/Core/LagrangePolynomialApproximationSpec.js
+++ b/packages/engine/Specs/Core/LagrangePolynomialApproximationSpec.js
@@ -6,10 +6,30 @@ describe("Core/LagrangePolynomialApproximation", function () {
const xTable = [0, 60, 120, 180, 240, 300, 360, 420];
const yTable = [
- 13378137.0, 0.0, 0, 13374128.3576279, 327475.593690065, 0, 13362104.8328212,
- 654754.936954423, 0, 13342073.6310691, 981641.896976832, 0,
- 13314046.7567223, 1307940.57608951, 0, 13278041.005799, 1633455.42917117, 0,
- 13234077.9559193, 1957991.38083385, 0, 13182183.953374, 2281353.94232816, 0,
+ 13378137.0,
+ 0.0,
+ 0,
+ 13374128.3576279,
+ 327475.593690065,
+ 0,
+ 13362104.8328212,
+ 654754.936954423,
+ 0,
+ 13342073.6310691,
+ 981641.896976832,
+ 0,
+ 13314046.7567223,
+ 1307940.57608951,
+ 0,
+ 13278041.005799,
+ 1633455.42917117,
+ 0,
+ 13234077.9559193,
+ 1957991.38083385,
+ 0,
+ 13182183.953374,
+ 2281353.94232816,
+ 0,
];
const x = 100.0;
@@ -19,7 +39,7 @@ describe("Core/LagrangePolynomialApproximation", function () {
x,
xTable,
yTable,
- 3,
+ 3
);
const expectedResult = [13367002.870928623, 545695.7388100647, 0];
expect(result).toEqualEpsilon(expectedResult, 1e-15);
@@ -32,7 +52,7 @@ describe("Core/LagrangePolynomialApproximation", function () {
xTable,
yTable,
3,
- result,
+ result
);
const expectedResult = [13367002.870928623, 545695.7388100647, 0];
expect(result).toBe(returnedResult);
diff --git a/packages/engine/Specs/Core/LinearApproximationSpec.js b/packages/engine/Specs/Core/LinearApproximationSpec.js
index cc5be320b17e..d64c9de42620 100644
--- a/packages/engine/Specs/Core/LinearApproximationSpec.js
+++ b/packages/engine/Specs/Core/LinearApproximationSpec.js
@@ -9,7 +9,7 @@ describe("Core/LinearApproximation", function () {
3.0,
xTable,
yTable,
- 2,
+ 2
);
expect(results.length).toEqual(2);
@@ -27,7 +27,7 @@ describe("Core/LinearApproximation", function () {
xTable,
yTable,
2,
- result,
+ result
);
expect(result).toBe(results);
@@ -44,7 +44,7 @@ describe("Core/LinearApproximation", function () {
80.0,
xTable2,
yTable2,
- 3,
+ 3
);
expect(results.length).toEqual(3);
@@ -61,7 +61,7 @@ describe("Core/LinearApproximation", function () {
40,
xTable3,
yTable3,
- 1,
+ 1
);
expect(results.length).toEqual(1);
diff --git a/packages/engine/Specs/Core/LinearSplineSpec.js b/packages/engine/Specs/Core/LinearSplineSpec.js
index c81a4a5ed935..b6f66748ffa6 100644
--- a/packages/engine/Specs/Core/LinearSplineSpec.js
+++ b/packages/engine/Specs/Core/LinearSplineSpec.js
@@ -93,7 +93,7 @@ describe("Core/LinearSpline", function () {
cartesianPoints[0],
cartesianPoints[1],
t,
- scratchCartesian,
+ scratchCartesian
);
expect(ls.evaluate(time)).toEqual(expected);
});
@@ -112,7 +112,7 @@ describe("Core/LinearSpline", function () {
cartesianPoints[0],
cartesianPoints[1],
t,
- scratchCartesian,
+ scratchCartesian
);
expect(point).toBe(result);
expect(result).toEqual(expected);
diff --git a/packages/engine/Specs/Core/MathSpec.js b/packages/engine/Specs/Core/MathSpec.js
index 98af0d7c8ecf..5d4f5ac965bd 100644
--- a/packages/engine/Specs/Core/MathSpec.js
+++ b/packages/engine/Specs/Core/MathSpec.js
@@ -165,21 +165,21 @@ describe("Core/Math", function () {
it("convertLongitudeRange (1)", function () {
expect(
- CesiumMath.convertLongitudeRange(CesiumMath.THREE_PI_OVER_TWO),
+ CesiumMath.convertLongitudeRange(CesiumMath.THREE_PI_OVER_TWO)
).toEqualEpsilon(-CesiumMath.PI_OVER_TWO, CesiumMath.EPSILON16);
});
it("convertLongitudeRange (2)", function () {
expect(CesiumMath.convertLongitudeRange(-Math.PI)).toEqualEpsilon(
-Math.PI,
- CesiumMath.EPSILON16,
+ CesiumMath.EPSILON16
);
});
it("convertLongitudeRange (3)", function () {
expect(CesiumMath.convertLongitudeRange(Math.PI)).toEqualEpsilon(
-Math.PI,
- CesiumMath.EPSILON16,
+ CesiumMath.EPSILON16
);
});
@@ -191,13 +191,13 @@ describe("Core/Math", function () {
it("clampToLatitudeRange (1)", function () {
expect(CesiumMath.clampToLatitudeRange(Math.PI)).toEqual(
- CesiumMath.PI_OVER_TWO,
+ CesiumMath.PI_OVER_TWO
);
});
it("clampToLatitudeRange (2)", function () {
expect(CesiumMath.clampToLatitudeRange(-Math.PI)).toEqual(
- -CesiumMath.PI_OVER_TWO,
+ -CesiumMath.PI_OVER_TWO
);
});
@@ -217,11 +217,11 @@ describe("Core/Math", function () {
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,
+ CesiumMath.EPSILON15
);
expect(CesiumMath.negativePiToPi(-Math.PI - 0.1)).toEqualEpsilon(
+Math.PI - 0.1,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(CesiumMath.negativePiToPi(+2.0 * Math.PI)).toEqual(0.0);
@@ -249,17 +249,17 @@ describe("Core/Math", function () {
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,
+ CesiumMath.EPSILON15
);
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,
+ CesiumMath.EPSILON15
);
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,
+ CesiumMath.EPSILON15
);
expect(CesiumMath.zeroToTwoPi(+2.0 * Math.PI)).toEqual(2.0 * Math.PI);
@@ -299,7 +299,7 @@ describe("Core/Math", function () {
expect(CesiumMath.mod(1.0, -1.0)).toEqual(-0.0);
expect(CesiumMath.mod(1.1, -1.0)).toEqualEpsilon(
-0.9,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(CesiumMath.mod(-0.0, -1.0)).toEqual(-0.0);
@@ -308,7 +308,7 @@ describe("Core/Math", function () {
expect(CesiumMath.mod(-1.0, -1.0)).toEqual(-0.0);
expect(CesiumMath.mod(-1.1, -1.0)).toEqualEpsilon(
-0.1,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -325,26 +325,26 @@ describe("Core/Math", function () {
CesiumMath.equalsEpsilon(
1.0,
1.0 + CesiumMath.EPSILON7,
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toEqual(true);
expect(
CesiumMath.equalsEpsilon(
1.0,
1.0 + CesiumMath.EPSILON7,
- CesiumMath.EPSILON9,
- ),
+ CesiumMath.EPSILON9
+ )
).toEqual(false);
expect(CesiumMath.equalsEpsilon(3000000.0, 3000000.0, 0.0)).toEqual(true);
expect(
- CesiumMath.equalsEpsilon(3000000.0, 3000000.0, CesiumMath.EPSILON7),
+ CesiumMath.equalsEpsilon(3000000.0, 3000000.0, CesiumMath.EPSILON7)
).toEqual(true);
expect(
- CesiumMath.equalsEpsilon(3000000.0, 3000000.2, CesiumMath.EPSILON7),
+ CesiumMath.equalsEpsilon(3000000.0, 3000000.2, CesiumMath.EPSILON7)
).toEqual(true);
expect(
- CesiumMath.equalsEpsilon(3000000.0, 3000000.2, CesiumMath.EPSILON9),
+ CesiumMath.equalsEpsilon(3000000.0, 3000000.2, CesiumMath.EPSILON9)
).toEqual(false);
});
@@ -472,10 +472,29 @@ describe("Core/Math", function () {
it("factorial produces the correct results", function () {
const factorials = [
- 1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800,
- 479001600, 6227020800, 87178291200, 1307674368000, 20922789888000,
- 355687428096000, 6402373705728000, 121645100408832000,
- 2432902008176640000, 51090942171709440000, 1124000727777607680000,
+ 1,
+ 1,
+ 2,
+ 6,
+ 24,
+ 120,
+ 720,
+ 5040,
+ 40320,
+ 362880,
+ 3628800,
+ 39916800,
+ 479001600,
+ 6227020800,
+ 87178291200,
+ 1307674368000,
+ 20922789888000,
+ 355687428096000,
+ 6402373705728000,
+ 121645100408832000,
+ 2432902008176640000,
+ 51090942171709440000,
+ 1124000727777607680000,
// eslint-disable-next-line no-loss-of-precision
25852016738884976640000,
// eslint-disable-next-line no-loss-of-precision
@@ -704,20 +723,20 @@ describe("Core/Math", function () {
it("chordLength finds the chord length", function () {
expect(
- CesiumMath.chordLength(CesiumMath.PI_OVER_THREE, 1.0),
+ CesiumMath.chordLength(CesiumMath.PI_OVER_THREE, 1.0)
).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
expect(
- CesiumMath.chordLength(CesiumMath.PI_OVER_THREE, 5.0),
+ CesiumMath.chordLength(CesiumMath.PI_OVER_THREE, 5.0)
).toEqualEpsilon(5.0, CesiumMath.EPSILON14);
expect(
- CesiumMath.chordLength(2.0 * CesiumMath.PI_OVER_THREE, 1.0),
+ CesiumMath.chordLength(2.0 * CesiumMath.PI_OVER_THREE, 1.0)
).toEqualEpsilon(Math.sqrt(3.0), CesiumMath.EPSILON14);
expect(
- CesiumMath.chordLength(2.0 * CesiumMath.PI_OVER_THREE, 5.0),
+ CesiumMath.chordLength(2.0 * CesiumMath.PI_OVER_THREE, 5.0)
).toEqualEpsilon(5.0 * Math.sqrt(3.0), CesiumMath.EPSILON14);
expect(CesiumMath.chordLength(CesiumMath.PI, 10.0)).toEqualEpsilon(
2.0 * 10.0,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -760,30 +779,30 @@ describe("Core/Math", function () {
it("fastApproximateAtan", function () {
expect(CesiumMath.fastApproximateAtan(0.0)).toEqualEpsilon(
0.0,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
expect(CesiumMath.fastApproximateAtan(1.0)).toEqualEpsilon(
CesiumMath.PI_OVER_FOUR,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
expect(CesiumMath.fastApproximateAtan(-1.0)).toEqualEpsilon(
-CesiumMath.PI_OVER_FOUR,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
});
it("fastApproximateAtan2", function () {
expect(CesiumMath.fastApproximateAtan2(1.0, 0.0)).toEqualEpsilon(
0.0,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
expect(CesiumMath.fastApproximateAtan2(1.0, 1.0)).toEqualEpsilon(
CesiumMath.PI_OVER_FOUR,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
expect(CesiumMath.fastApproximateAtan2(-1.0, 1.0)).toEqualEpsilon(
CesiumMath.PI_OVER_FOUR + CesiumMath.PI_OVER_TWO,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
});
diff --git a/packages/engine/Specs/Core/Matrix2Spec.js b/packages/engine/Specs/Core/Matrix2Spec.js
index bfbab21851fb..540b550d0c20 100644
--- a/packages/engine/Specs/Core/Matrix2Spec.js
+++ b/packages/engine/Specs/Core/Matrix2Spec.js
@@ -40,7 +40,7 @@ describe("Core/Matrix2", function () {
const matrix = Matrix2.fromArray(
[0.0, 0.0, 0.0, 1.0, 3.0, 2.0, 4.0],
3,
- result,
+ result
);
expect(matrix).toBe(result);
expect(matrix).toEqual(expected);
@@ -136,7 +136,7 @@ describe("Core/Matrix2", function () {
it("toArray works without a result parameter", function () {
const expected = [1.0, 2.0, 3.0, 4.0];
const returnedResult = Matrix2.toArray(
- Matrix2.fromColumnMajorArray(expected),
+ Matrix2.fromColumnMajorArray(expected)
);
expect(returnedResult).not.toBe(expected);
expect(returnedResult).toEqual(expected);
@@ -147,7 +147,7 @@ describe("Core/Matrix2", function () {
const result = [];
const returnedResult = Matrix2.toArray(
Matrix2.fromColumnMajorArray(expected),
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(returnedResult).not.toBe(expected);
@@ -190,7 +190,7 @@ describe("Core/Matrix2", function () {
matrix,
0,
new Cartesian2(5.0, 6.0),
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expected);
@@ -200,7 +200,7 @@ describe("Core/Matrix2", function () {
matrix,
1,
new Cartesian2(7.0, 8.0),
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expected);
@@ -231,7 +231,7 @@ describe("Core/Matrix2", function () {
matrix,
0,
new Cartesian2(5.0, 6.0),
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expected);
@@ -241,7 +241,7 @@ describe("Core/Matrix2", function () {
matrix,
1,
new Cartesian2(7.0, 8.0),
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expected);
@@ -259,7 +259,7 @@ describe("Core/Matrix2", function () {
const returnedResult = Matrix2.setScale(matrix, newScale, result);
expect(Matrix2.getScale(returnedResult, new Cartesian2())).toEqual(
- newScale,
+ newScale
);
expect(result).toBe(returnedResult);
});
@@ -276,7 +276,7 @@ describe("Core/Matrix2", function () {
const returnedResult = Matrix2.setUniformScale(matrix, newScale, result);
expect(Matrix2.getScale(returnedResult, new Cartesian2())).toEqual(
- new Cartesian2(newScale, newScale),
+ new Cartesian2(newScale, newScale)
);
expect(result).toBe(returnedResult);
});
@@ -294,7 +294,7 @@ describe("Core/Matrix2", function () {
const m = Matrix2.fromScale(new Cartesian2(2.0, 3.0));
expect(Matrix2.getMaximumScale(m)).toEqualEpsilon(
3.0,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -401,7 +401,7 @@ describe("Core/Matrix2", function () {
const expected = Matrix2.multiply(
m,
Matrix2.fromScale(scale),
- new Matrix2(),
+ new Matrix2()
);
const result = new Matrix2();
const returnedResult = Matrix2.multiplyByScale(m, scale, result);
@@ -415,7 +415,7 @@ describe("Core/Matrix2", function () {
const expected = Matrix2.multiply(
m,
Matrix2.fromScale(scale),
- new Matrix2(),
+ new Matrix2()
);
const returnedResult = Matrix2.multiplyByScale(m, scale, m);
expect(returnedResult).toBe(m);
@@ -428,7 +428,7 @@ describe("Core/Matrix2", function () {
const expected = Matrix2.multiply(
m,
Matrix2.fromUniformScale(scale),
- new Matrix2(),
+ new Matrix2()
);
const result = new Matrix2();
const returnedResult = Matrix2.multiplyByUniformScale(m, scale, result);
@@ -442,7 +442,7 @@ describe("Core/Matrix2", function () {
const expected = Matrix2.multiply(
m,
Matrix2.fromUniformScale(scale),
- new Matrix2(),
+ new Matrix2()
);
const returnedResult = Matrix2.multiplyByUniformScale(m, scale, m);
expect(returnedResult).toBe(m);
@@ -984,6 +984,6 @@ describe("Core/Matrix2", function () {
new Matrix2(0, 1, -1, 0),
],
[1, 0, 0, 1, 1, 3, 2, 4, 0, -1, 1, 0],
- 4,
+ 4
);
});
diff --git a/packages/engine/Specs/Core/Matrix3Spec.js b/packages/engine/Specs/Core/Matrix3Spec.js
index 3d2f4641aeb7..e0ada12c1755 100644
--- a/packages/engine/Specs/Core/Matrix3Spec.js
+++ b/packages/engine/Specs/Core/Matrix3Spec.js
@@ -45,7 +45,7 @@ describe("Core/Matrix3", function () {
const tmp = Cartesian3.multiplyByScalar(
new Cartesian3(0.0, 0.0, 1.0),
sPiOver4,
- new Cartesian3(),
+ new Cartesian3()
);
const quaternion = new Quaternion(tmp.x, tmp.y, tmp.z, cPiOver4);
const expected = new Matrix3(
@@ -57,7 +57,7 @@ describe("Core/Matrix3", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const returnedResult = Matrix3.fromQuaternion(quaternion);
@@ -73,7 +73,7 @@ describe("Core/Matrix3", function () {
const tmp = Cartesian3.multiplyByScalar(
new Cartesian3(0.0, 0.0, 1.0),
sPiOver4,
- new Cartesian3(),
+ new Cartesian3()
);
const quaternion = new Quaternion(tmp.x, tmp.y, tmp.z, cPiOver4);
const expected = new Matrix3(
@@ -85,7 +85,7 @@ describe("Core/Matrix3", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const result = new Matrix3();
const returnedResult = Matrix3.fromQuaternion(quaternion, result);
@@ -102,7 +102,7 @@ describe("Core/Matrix3", function () {
const tmp = Cartesian3.multiplyByScalar(
new Cartesian3(0.0, 0.0, 1.0),
sPiOver4,
- new Cartesian3(),
+ new Cartesian3()
);
const quaternion = new Quaternion(tmp.x, tmp.y, tmp.z, cPiOver4);
const headingPitchRoll = HeadingPitchRoll.fromQuaternion(quaternion);
@@ -115,7 +115,7 @@ describe("Core/Matrix3", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const returnedResult = Matrix3.fromHeadingPitchRoll(headingPitchRoll);
@@ -131,7 +131,7 @@ describe("Core/Matrix3", function () {
const tmp = Cartesian3.multiplyByScalar(
new Cartesian3(0.0, 0.0, 1.0),
sPiOver4,
- new Cartesian3(),
+ new Cartesian3()
);
const quaternion = new Quaternion(tmp.x, tmp.y, tmp.z, cPiOver4);
const headingPitchRoll = HeadingPitchRoll.fromQuaternion(quaternion);
@@ -144,12 +144,12 @@ describe("Core/Matrix3", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const result = new Matrix3();
const returnedResult = Matrix3.fromHeadingPitchRoll(
headingPitchRoll,
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(returnedResult).toEqualEpsilon(expected, CesiumMath.EPSILON15);
@@ -166,18 +166,18 @@ describe("Core/Matrix3", function () {
-0.742685314912828,
-0.642787609686539,
0.627506871597133,
- 0.439385041770705,
+ 0.439385041770705
);
const headingPitchRoll = new HeadingPitchRoll(
-CesiumMath.toRadians(10),
-CesiumMath.toRadians(40),
- CesiumMath.toRadians(55),
+ CesiumMath.toRadians(55)
);
const result = new Matrix3();
const returnedResult = Matrix3.fromHeadingPitchRoll(
headingPitchRoll,
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(returnedResult).toEqualEpsilon(expected, CesiumMath.EPSILON15);
@@ -195,7 +195,7 @@ describe("Core/Matrix3", function () {
const result = new Matrix3();
const returnedResult = Matrix3.fromScale(
new Cartesian3(7.0, 8.0, 9.0),
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(returnedResult).not.toBe(expected);
@@ -227,7 +227,7 @@ describe("Core/Matrix3", function () {
-1.0,
2.0,
1.0,
- 0.0,
+ 0.0
);
const left = new Cartesian3(1.0, -2.0, 3.0);
const returnedResult = Matrix3.fromCrossProduct(left);
@@ -246,7 +246,7 @@ describe("Core/Matrix3", function () {
crossProductResult = Matrix3.multiply(
returnedResult,
right,
- crossProductResult,
+ crossProductResult
);
expect(crossProductResult).toEqual(crossProductExpected);
});
@@ -261,7 +261,7 @@ describe("Core/Matrix3", function () {
-1.0,
2.0,
1.0,
- 0.0,
+ 0.0
);
const left = new Cartesian3(1.0, -2.0, 3.0);
const result = new Matrix3();
@@ -281,7 +281,7 @@ describe("Core/Matrix3", function () {
crossProductResult = Matrix3.multiply(
returnedResult,
right,
- crossProductResult,
+ crossProductResult
);
expect(crossProductResult).toEqual(crossProductExpected);
});
@@ -289,7 +289,15 @@ describe("Core/Matrix3", function () {
it("fromArray works without a result parameter", function () {
const expected = new Matrix3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0);
const matrix = Matrix3.fromArray([
- 1.0, 4.0, 7.0, 2.0, 5.0, 8.0, 3.0, 6.0, 9.0,
+ 1.0,
+ 4.0,
+ 7.0,
+ 2.0,
+ 5.0,
+ 8.0,
+ 3.0,
+ 6.0,
+ 9.0,
]);
expect(matrix).toEqual(expected);
});
@@ -300,7 +308,7 @@ describe("Core/Matrix3", function () {
const matrix = Matrix3.fromArray(
[1.0, 4.0, 7.0, 2.0, 5.0, 8.0, 3.0, 6.0, 9.0],
0,
- result,
+ result
);
expect(matrix).toBe(result);
expect(matrix).toEqual(expected);
@@ -312,7 +320,7 @@ describe("Core/Matrix3", function () {
const matrix = Matrix3.fromArray(
[0.0, 0.0, 0.0, 1.0, 4.0, 7.0, 2.0, 5.0, 8.0, 3.0, 6.0, 9.0],
3,
- result,
+ result
);
expect(matrix).toBe(result);
expect(matrix).toEqual(expected);
@@ -321,7 +329,15 @@ describe("Core/Matrix3", function () {
it("fromRowMajorArray works without a result parameter", function () {
const expected = new Matrix3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0);
const matrix = Matrix3.fromRowMajorArray([
- 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0,
]);
expect(matrix).toEqual(expected);
});
@@ -331,7 +347,7 @@ describe("Core/Matrix3", function () {
const result = new Matrix3();
const matrix = Matrix3.fromRowMajorArray(
[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0],
- result,
+ result
);
expect(matrix).toBe(result);
expect(matrix).toEqual(expected);
@@ -340,7 +356,15 @@ describe("Core/Matrix3", function () {
it("fromColumnMajorArray works without a result parameter", function () {
const expected = new Matrix3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0);
const matrix = Matrix3.fromColumnMajorArray([
- 1.0, 4.0, 7.0, 2.0, 5.0, 8.0, 3.0, 6.0, 9.0,
+ 1.0,
+ 4.0,
+ 7.0,
+ 2.0,
+ 5.0,
+ 8.0,
+ 3.0,
+ 6.0,
+ 9.0,
]);
expect(matrix).toEqual(expected);
});
@@ -350,7 +374,7 @@ describe("Core/Matrix3", function () {
const result = new Matrix3();
const matrix = Matrix3.fromColumnMajorArray(
[1.0, 4.0, 7.0, 2.0, 5.0, 8.0, 3.0, 6.0, 9.0],
- result,
+ result
);
expect(matrix).toBe(result);
expect(matrix).toEqual(expected);
@@ -414,7 +438,7 @@ describe("Core/Matrix3", function () {
it("toArray works without a result parameter", function () {
const expected = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0];
const returnedResult = Matrix3.toArray(
- Matrix3.fromColumnMajorArray(expected),
+ Matrix3.fromColumnMajorArray(expected)
);
expect(returnedResult).not.toBe(expected);
expect(returnedResult).toEqual(expected);
@@ -425,7 +449,7 @@ describe("Core/Matrix3", function () {
const result = [];
const returnedResult = Matrix3.toArray(
Matrix3.fromColumnMajorArray(expected),
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(returnedResult).not.toBe(expected);
@@ -473,7 +497,7 @@ describe("Core/Matrix3", function () {
matrix,
0,
new Cartesian3(10.0, 11.0, 12.0),
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expected);
@@ -483,7 +507,7 @@ describe("Core/Matrix3", function () {
matrix,
1,
new Cartesian3(13.0, 14.0, 15.0),
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expected);
@@ -493,7 +517,7 @@ describe("Core/Matrix3", function () {
matrix,
2,
new Cartesian3(16.0, 17.0, 18.0),
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expected);
@@ -529,7 +553,7 @@ describe("Core/Matrix3", function () {
matrix,
0,
new Cartesian3(10.0, 11.0, 12.0),
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expected);
@@ -539,7 +563,7 @@ describe("Core/Matrix3", function () {
matrix,
1,
new Cartesian3(13.0, 14.0, 15.0),
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expected);
@@ -549,7 +573,7 @@ describe("Core/Matrix3", function () {
matrix,
2,
new Cartesian3(16.0, 17.0, 18.0),
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expected);
@@ -567,7 +591,7 @@ describe("Core/Matrix3", function () {
const returnedResult = Matrix3.setScale(matrix, newScale, result);
expect(Matrix3.getScale(returnedResult, new Cartesian3())).toEqual(
- newScale,
+ newScale
);
expect(result).toBe(returnedResult);
});
@@ -584,7 +608,7 @@ describe("Core/Matrix3", function () {
const returnedResult = Matrix3.setUniformScale(matrix, newScale, result);
expect(Matrix3.getScale(returnedResult, new Cartesian3())).toEqual(
- new Cartesian3(newScale, newScale, newScale),
+ new Cartesian3(newScale, newScale, newScale)
);
expect(result).toBe(returnedResult);
});
@@ -602,7 +626,7 @@ describe("Core/Matrix3", function () {
const m = Matrix3.fromScale(new Cartesian3(2.0, 3.0, 4.0));
expect(Matrix3.getMaximumScale(m)).toEqualEpsilon(
4.0,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -621,7 +645,15 @@ describe("Core/Matrix3", function () {
it("getRotation returns matrix without scale", function () {
const matrix = Matrix3.fromColumnMajorArray([
- 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0,
]);
const expectedRotation = Matrix3.fromArray([
1.0 / Math.sqrt(1.0 * 1.0 + 2.0 * 2.0 + 3.0 * 3.0),
@@ -640,7 +672,15 @@ describe("Core/Matrix3", function () {
it("getRotation does not modify rotation matrix", function () {
const matrix = Matrix3.fromColumnMajorArray([
- 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0,
]);
const duplicateMatrix = Matrix3.clone(matrix, new Matrix3());
const expectedRotation = Matrix3.fromArray([
@@ -723,7 +763,7 @@ describe("Core/Matrix3", function () {
const expected = Matrix3.multiply(
m,
Matrix3.fromScale(scale),
- new Matrix3(),
+ new Matrix3()
);
const result = new Matrix3();
const returnedResult = Matrix3.multiplyByScale(m, scale, result);
@@ -737,7 +777,7 @@ describe("Core/Matrix3", function () {
const expected = Matrix3.multiply(
m,
Matrix3.fromScale(scale),
- new Matrix3(),
+ new Matrix3()
);
const returnedResult = Matrix3.multiplyByScale(m, scale, m);
expect(returnedResult).toBe(m);
@@ -750,7 +790,7 @@ describe("Core/Matrix3", function () {
const expected = Matrix3.multiply(
m,
Matrix3.fromUniformScale(scale),
- new Matrix3(),
+ new Matrix3()
);
const result = new Matrix3();
const returnedResult = Matrix3.multiplyByUniformScale(m, scale, result);
@@ -764,7 +804,7 @@ describe("Core/Matrix3", function () {
const expected = Matrix3.multiply(
m,
Matrix3.fromUniformScale(scale),
- new Matrix3(),
+ new Matrix3()
);
const returnedResult = Matrix3.multiplyByUniformScale(m, scale, m);
expect(returnedResult).toBe(m);
@@ -802,7 +842,7 @@ describe("Core/Matrix3", function () {
-6.0,
-7.0,
-8.0,
- -9.0,
+ -9.0
);
const result = new Matrix3();
const returnedResult = Matrix3.negate(matrix, result);
@@ -821,7 +861,7 @@ describe("Core/Matrix3", function () {
-6.0,
-7.0,
-8.0,
- -9.0,
+ -9.0
);
const returnedResult = Matrix3.negate(matrix, matrix);
expect(matrix).toBe(returnedResult);
@@ -842,7 +882,7 @@ describe("Core/Matrix3", function () {
const expectedInverse = Matrix3.inverse(matrix, new Matrix3());
const expectedInverseTranspose = Matrix3.transpose(
expectedInverse,
- new Matrix3(),
+ new Matrix3()
);
const result = Matrix3.inverseTranspose(matrix, new Matrix3());
expect(result).toEqual(expectedInverseTranspose);
@@ -874,7 +914,7 @@ describe("Core/Matrix3", function () {
5.0,
3.0,
-3.0,
- 4.0,
+ 4.0
);
const result = new Matrix3();
const returnedResult = Matrix3.inverse(matrix, result);
@@ -893,7 +933,7 @@ describe("Core/Matrix3", function () {
5.0,
3.0,
-3.0,
- 4.0,
+ 4.0
);
const returnedResult = Matrix3.inverse(matrix, matrix);
expect(matrix).toBe(returnedResult);
@@ -912,44 +952,41 @@ describe("Core/Matrix3", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const decomposition = Matrix3.computeEigenDecomposition(a);
expect(decomposition.diagonal).toEqualEpsilon(
expectedDiagonal,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
let v = Matrix3.getColumn(decomposition.unitary, 0, new Cartesian3());
- let lambda = Matrix3.getColumn(
- decomposition.diagonal,
- 0,
- new Cartesian3(),
- ).x;
+ let lambda = Matrix3.getColumn(decomposition.diagonal, 0, new Cartesian3())
+ .x;
expect(
- Cartesian3.multiplyByScalar(v, lambda, new Cartesian3()),
+ Cartesian3.multiplyByScalar(v, lambda, new Cartesian3())
).toEqualEpsilon(
Matrix3.multiplyByVector(a, v, new Cartesian3()),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
v = Matrix3.getColumn(decomposition.unitary, 1, new Cartesian3());
lambda = Matrix3.getColumn(decomposition.diagonal, 1, new Cartesian3()).y;
expect(
- Cartesian3.multiplyByScalar(v, lambda, new Cartesian3()),
+ Cartesian3.multiplyByScalar(v, lambda, new Cartesian3())
).toEqualEpsilon(
Matrix3.multiplyByVector(a, v, new Cartesian3()),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
v = Matrix3.getColumn(decomposition.unitary, 2, new Cartesian3());
lambda = Matrix3.getColumn(decomposition.diagonal, 2, new Cartesian3()).z;
expect(
- Cartesian3.multiplyByScalar(v, lambda, new Cartesian3()),
+ Cartesian3.multiplyByScalar(v, lambda, new Cartesian3())
).toEqualEpsilon(
Matrix3.multiplyByVector(a, v, new Cartesian3()),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -965,7 +1002,7 @@ describe("Core/Matrix3", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const result = {
unitary: new Matrix3(),
@@ -976,38 +1013,35 @@ describe("Core/Matrix3", function () {
expect(decomposition).toBe(result);
expect(decomposition.diagonal).toEqualEpsilon(
expectedDiagonal,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
let v = Matrix3.getColumn(decomposition.unitary, 0, new Cartesian3());
- let lambda = Matrix3.getColumn(
- decomposition.diagonal,
- 0,
- new Cartesian3(),
- ).x;
+ let lambda = Matrix3.getColumn(decomposition.diagonal, 0, new Cartesian3())
+ .x;
expect(
- Cartesian3.multiplyByScalar(v, lambda, new Cartesian3()),
+ Cartesian3.multiplyByScalar(v, lambda, new Cartesian3())
).toEqualEpsilon(
Matrix3.multiplyByVector(a, v, new Cartesian3()),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
v = Matrix3.getColumn(decomposition.unitary, 1, new Cartesian3());
lambda = Matrix3.getColumn(decomposition.diagonal, 1, new Cartesian3()).y;
expect(
- Cartesian3.multiplyByScalar(v, lambda, new Cartesian3()),
+ Cartesian3.multiplyByScalar(v, lambda, new Cartesian3())
).toEqualEpsilon(
Matrix3.multiplyByVector(a, v, new Cartesian3()),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
v = Matrix3.getColumn(decomposition.unitary, 2, new Cartesian3());
lambda = Matrix3.getColumn(decomposition.diagonal, 2, new Cartesian3()).z;
expect(
- Cartesian3.multiplyByScalar(v, lambda, new Cartesian3()),
+ Cartesian3.multiplyByScalar(v, lambda, new Cartesian3())
).toEqualEpsilon(
Matrix3.multiplyByVector(a, v, new Cartesian3()),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -1021,7 +1055,7 @@ describe("Core/Matrix3", function () {
-6.0,
-7.0,
-8.0,
- -9.0,
+ -9.0
);
const expected = new Matrix3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0);
const result = new Matrix3();
@@ -1047,7 +1081,7 @@ describe("Core/Matrix3", function () {
-6.0,
-7.0,
-8.0,
- -9.0,
+ -9.0
);
const expected = new Matrix3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0);
const returnedResult = Matrix3.abs(matrix, matrix);
@@ -1451,7 +1485,7 @@ describe("Core/Matrix3", function () {
expect(function () {
Matrix3.inverse(
new Matrix3(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
- new Matrix3(),
+ new Matrix3()
);
}).toThrowDeveloperError();
});
diff --git a/packages/engine/Specs/Core/Matrix4Spec.js b/packages/engine/Specs/Core/Matrix4Spec.js
index 375416d0a849..ae2c6fa15a81 100644
--- a/packages/engine/Specs/Core/Matrix4Spec.js
+++ b/packages/engine/Specs/Core/Matrix4Spec.js
@@ -50,7 +50,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
expect(matrix[Matrix4.COLUMN0ROW0]).toEqual(1.0);
expect(matrix[Matrix4.COLUMN1ROW0]).toEqual(2.0);
@@ -87,11 +87,25 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
const matrix = Matrix4.fromArray([
- 1.0, 5.0, 9.0, 13.0, 2.0, 6.0, 10.0, 14.0, 3.0, 7.0, 11.0, 15.0, 4.0, 8.0,
- 12.0, 16.0,
+ 1.0,
+ 5.0,
+ 9.0,
+ 13.0,
+ 2.0,
+ 6.0,
+ 10.0,
+ 14.0,
+ 3.0,
+ 7.0,
+ 11.0,
+ 15.0,
+ 4.0,
+ 8.0,
+ 12.0,
+ 16.0,
]);
expect(matrix).toEqual(expected);
});
@@ -113,16 +127,30 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
const result = new Matrix4();
const matrix = Matrix4.fromArray(
[
- 1.0, 5.0, 9.0, 13.0, 2.0, 6.0, 10.0, 14.0, 3.0, 7.0, 11.0, 15.0, 4.0,
- 8.0, 12.0, 16.0,
+ 1.0,
+ 5.0,
+ 9.0,
+ 13.0,
+ 2.0,
+ 6.0,
+ 10.0,
+ 14.0,
+ 3.0,
+ 7.0,
+ 11.0,
+ 15.0,
+ 4.0,
+ 8.0,
+ 12.0,
+ 16.0,
],
0,
- result,
+ result
);
expect(matrix).toBe(result);
expect(matrix).toEqual(expected);
@@ -145,16 +173,33 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
const result = new Matrix4();
const matrix = Matrix4.fromArray(
[
- 0.0, 0.0, 0.0, 1.0, 5.0, 9.0, 13.0, 2.0, 6.0, 10.0, 14.0, 3.0, 7.0,
- 11.0, 15.0, 4.0, 8.0, 12.0, 16.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 5.0,
+ 9.0,
+ 13.0,
+ 2.0,
+ 6.0,
+ 10.0,
+ 14.0,
+ 3.0,
+ 7.0,
+ 11.0,
+ 15.0,
+ 4.0,
+ 8.0,
+ 12.0,
+ 16.0,
],
3,
- result,
+ result
);
expect(matrix).toBe(result);
expect(matrix).toEqual(expected);
@@ -177,11 +222,25 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
const matrix = Matrix4.fromRowMajorArray([
- 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0,
- 15.0, 16.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0,
+ 10.0,
+ 11.0,
+ 12.0,
+ 13.0,
+ 14.0,
+ 15.0,
+ 16.0,
]);
expect(matrix).toEqual(expected);
});
@@ -203,15 +262,29 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
const result = new Matrix4();
const matrix = Matrix4.fromRowMajorArray(
[
- 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0,
- 14.0, 15.0, 16.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0,
+ 10.0,
+ 11.0,
+ 12.0,
+ 13.0,
+ 14.0,
+ 15.0,
+ 16.0,
],
- result,
+ result
);
expect(matrix).toBe(result);
expect(matrix).toEqual(expected);
@@ -234,11 +307,25 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
const matrix = Matrix4.fromColumnMajorArray([
- 1.0, 5.0, 9.0, 13.0, 2.0, 6.0, 10.0, 14.0, 3.0, 7.0, 11.0, 15.0, 4.0, 8.0,
- 12.0, 16.0,
+ 1.0,
+ 5.0,
+ 9.0,
+ 13.0,
+ 2.0,
+ 6.0,
+ 10.0,
+ 14.0,
+ 3.0,
+ 7.0,
+ 11.0,
+ 15.0,
+ 4.0,
+ 8.0,
+ 12.0,
+ 16.0,
]);
expect(matrix).toEqual(expected);
});
@@ -260,15 +347,29 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
const result = new Matrix4();
const matrix = Matrix4.fromColumnMajorArray(
[
- 1.0, 5.0, 9.0, 13.0, 2.0, 6.0, 10.0, 14.0, 3.0, 7.0, 11.0, 15.0, 4.0,
- 8.0, 12.0, 16.0,
+ 1.0,
+ 5.0,
+ 9.0,
+ 13.0,
+ 2.0,
+ 6.0,
+ 10.0,
+ 14.0,
+ 3.0,
+ 7.0,
+ 11.0,
+ 15.0,
+ 4.0,
+ 8.0,
+ 12.0,
+ 16.0,
],
- result,
+ result
);
expect(matrix).toBe(result);
expect(matrix).toEqual(expected);
@@ -291,7 +392,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
const returnedResult = expected.clone();
expect(returnedResult).not.toBe(expected);
@@ -315,7 +416,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
const result = new Matrix4();
const returnedResult = expected.clone(result);
@@ -341,11 +442,11 @@ describe("Core/Matrix4", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const returnedResult = Matrix4.fromRotationTranslation(
new Matrix3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0),
- new Cartesian3(10.0, 11.0, 12.0),
+ new Cartesian3(10.0, 11.0, 12.0)
);
expect(returnedResult).not.toBe(expected);
expect(returnedResult).toEqual(expected);
@@ -368,13 +469,13 @@ describe("Core/Matrix4", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const result = new Matrix4();
const returnedResult = Matrix4.fromRotationTranslation(
new Matrix3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0),
new Cartesian3(10.0, 11.0, 12.0),
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(returnedResult).not.toBe(expected);
@@ -398,10 +499,10 @@ describe("Core/Matrix4", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const returnedResult = Matrix4.fromTranslation(
- new Cartesian3(10.0, 11.0, 12.0),
+ new Cartesian3(10.0, 11.0, 12.0)
);
expect(returnedResult).not.toBe(expected);
expect(returnedResult).toEqual(expected);
@@ -424,12 +525,12 @@ describe("Core/Matrix4", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const returnedResult = Matrix4.fromTranslationQuaternionRotationScale(
new Cartesian3(1.0, 2.0, 3.0), // translation
Quaternion.fromAxisAngle(Cartesian3.UNIT_X, CesiumMath.toRadians(-90.0)), // rotation
- new Cartesian3(7.0, 8.0, 9.0),
+ new Cartesian3(7.0, 8.0, 9.0)
); // scale
expect(returnedResult).not.toBe(expected);
expect(returnedResult).toEqualEpsilon(expected, CesiumMath.EPSILON14);
@@ -452,14 +553,14 @@ describe("Core/Matrix4", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const result = new Matrix4();
const returnedResult = Matrix4.fromTranslationQuaternionRotationScale(
new Cartesian3(1.0, 2.0, 3.0), // translation
Quaternion.fromAxisAngle(Cartesian3.UNIT_X, CesiumMath.toRadians(-90.0)), // rotation
new Cartesian3(7.0, 8.0, 9.0), // scale
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(returnedResult).not.toBe(expected);
@@ -483,13 +584,13 @@ describe("Core/Matrix4", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const trs = new TranslationRotationScale(
new Cartesian3(1.0, 2.0, 3.0),
Quaternion.fromAxisAngle(Cartesian3.UNIT_X, CesiumMath.toRadians(-90.0)),
- new Cartesian3(7.0, 8.0, 9.0),
+ new Cartesian3(7.0, 8.0, 9.0)
);
const returnedResult = Matrix4.fromTranslationRotationScale(trs);
@@ -514,13 +615,13 @@ describe("Core/Matrix4", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const trs = new TranslationRotationScale(
new Cartesian3(1.0, 2.0, 3.0),
Quaternion.fromAxisAngle(Cartesian3.UNIT_X, CesiumMath.toRadians(-90.0)),
- new Cartesian3(7.0, 8.0, 9.0),
+ new Cartesian3(7.0, 8.0, 9.0)
);
const result = new Matrix4();
@@ -547,12 +648,12 @@ describe("Core/Matrix4", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const result = new Matrix4();
const returnedResult = Matrix4.fromTranslation(
new Cartesian3(10.0, 11.0, 12.0),
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(returnedResult).not.toBe(expected);
@@ -576,7 +677,7 @@ describe("Core/Matrix4", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const returnedResult = Matrix4.fromScale(new Cartesian3(7.0, 8.0, 9.0));
expect(returnedResult).not.toBe(expected);
@@ -600,12 +701,12 @@ describe("Core/Matrix4", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const result = new Matrix4();
const returnedResult = Matrix4.fromScale(
new Cartesian3(7.0, 8.0, 9.0),
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(returnedResult).not.toBe(expected);
@@ -629,7 +730,7 @@ describe("Core/Matrix4", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const returnedResult = Matrix4.fromUniformScale(2.0);
expect(returnedResult).toEqual(expected);
@@ -652,7 +753,7 @@ describe("Core/Matrix4", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const result = new Matrix4();
const returnedResult = Matrix4.fromUniformScale(2.0, result);
@@ -662,29 +763,73 @@ describe("Core/Matrix4", function () {
it("fromRotation works without a result parameter", function () {
const expected = Matrix4.fromColumnMajorArray([
- 1.0, 2.0, 3.0, 0.0, 4.0, 5.0, 6.0, 0.0, 7.0, 8.0, 9.0, 0.0, 0.0, 0.0, 0.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 0.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 0.0,
+ 7.0,
+ 8.0,
+ 9.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
1.0,
]);
const returnedResult = Matrix4.fromRotation(
Matrix3.fromColumnMajorArray([
- 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0,
- ]),
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0,
+ ])
);
expect(returnedResult).toEqual(expected);
});
it("fromRotation works with a result parameter", function () {
const expected = Matrix4.fromColumnMajorArray([
- 1.0, 2.0, 3.0, 0.0, 4.0, 5.0, 6.0, 0.0, 7.0, 8.0, 9.0, 0.0, 0.0, 0.0, 0.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 0.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 0.0,
+ 7.0,
+ 8.0,
+ 9.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
1.0,
]);
const result = new Matrix4();
const returnedResult = Matrix4.fromRotation(
Matrix3.fromColumnMajorArray([
- 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0,
]),
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(returnedResult).toEqual(expected);
@@ -707,7 +852,7 @@ describe("Core/Matrix4", function () {
0,
0,
-1,
- 0,
+ 0
);
const result = new Matrix4();
const returnedResult = Matrix4.computePerspectiveFieldOfView(
@@ -715,7 +860,7 @@ describe("Core/Matrix4", function () {
1,
1,
10,
- result,
+ result
);
expect(returnedResult).toEqualEpsilon(expected, CesiumMath.EPSILON15);
});
@@ -739,7 +884,7 @@ describe("Core/Matrix4", function () {
direction: Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
up: Cartesian3.UNIT_Y,
},
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(returnedResult).toEqual(expected);
@@ -762,7 +907,7 @@ describe("Core/Matrix4", function () {
0,
0,
0,
- 1,
+ 1
);
const result = new Matrix4();
const returnedResult = Matrix4.computeOrthographicOffCenter(
@@ -772,7 +917,7 @@ describe("Core/Matrix4", function () {
3,
0,
1,
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(returnedResult).toEqual(expected);
@@ -795,7 +940,7 @@ describe("Core/Matrix4", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const returnedResult = Matrix4.computeViewportTransformation(
{
@@ -805,7 +950,7 @@ describe("Core/Matrix4", function () {
height: 6.0,
},
0.0,
- 2.0,
+ 2.0
);
expect(returnedResult).toEqual(expected);
});
@@ -827,7 +972,7 @@ describe("Core/Matrix4", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const result = new Matrix4();
const returnedResult = Matrix4.computeViewportTransformation(
@@ -839,7 +984,7 @@ describe("Core/Matrix4", function () {
},
0.0,
2.0,
- result,
+ result
);
expect(returnedResult).toEqual(expected);
expect(returnedResult).toBe(result);
@@ -862,7 +1007,7 @@ describe("Core/Matrix4", function () {
0,
0,
-1,
- 0,
+ 0
);
const result = new Matrix4();
const returnedResult = Matrix4.computePerspectiveOffCenter(
@@ -872,7 +1017,7 @@ describe("Core/Matrix4", function () {
3,
1,
2,
- result,
+ result
);
expect(returnedResult).toEqual(expected);
expect(returnedResult).toBe(result);
@@ -895,7 +1040,7 @@ describe("Core/Matrix4", function () {
0,
0,
-1,
- 0,
+ 0
);
const result = new Matrix4();
const returnedResult = Matrix4.computeInfinitePerspectiveOffCenter(
@@ -904,18 +1049,32 @@ describe("Core/Matrix4", function () {
2,
3,
1,
- result,
+ result
);
expect(returnedResult).toEqual(expected);
});
it("toArray works without a result parameter", function () {
const expected = [
- 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0,
- 15.0, 16.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0,
+ 10.0,
+ 11.0,
+ 12.0,
+ 13.0,
+ 14.0,
+ 15.0,
+ 16.0,
];
const returnedResult = Matrix4.toArray(
- Matrix4.fromColumnMajorArray(expected),
+ Matrix4.fromColumnMajorArray(expected)
);
expect(returnedResult).not.toBe(expected);
expect(returnedResult).toEqual(expected);
@@ -923,13 +1082,27 @@ describe("Core/Matrix4", function () {
it("toArray works with a result parameter", function () {
const expected = [
- 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0,
- 15.0, 16.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0,
+ 10.0,
+ 11.0,
+ 12.0,
+ 13.0,
+ 14.0,
+ 15.0,
+ 16.0,
];
const result = [];
const returnedResult = Matrix4.toArray(
Matrix4.fromColumnMajorArray(expected),
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(returnedResult).not.toBe(expected);
@@ -964,7 +1137,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
const expectedColumn0 = new Cartesian4(1.0, 5.0, 9.0, 13.0);
const expectedColumn1 = new Cartesian4(2.0, 6.0, 10.0, 14.0);
@@ -1007,7 +1180,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
const result = new Matrix4();
@@ -1028,13 +1201,13 @@ describe("Core/Matrix4", function () {
20.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
let returnedResult = Matrix4.setColumn(
matrix,
0,
new Cartesian4(17.0, 18.0, 19.0, 20.0),
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expected);
@@ -1055,13 +1228,13 @@ describe("Core/Matrix4", function () {
13.0,
20.0,
15.0,
- 16.0,
+ 16.0
);
returnedResult = Matrix4.setColumn(
matrix,
1,
new Cartesian4(17.0, 18.0, 19.0, 20.0),
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expected);
@@ -1082,13 +1255,13 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
20.0,
- 16.0,
+ 16.0
);
returnedResult = Matrix4.setColumn(
matrix,
2,
new Cartesian4(17.0, 18.0, 19.0, 20.0),
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expected);
@@ -1109,13 +1282,13 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 20.0,
+ 20.0
);
returnedResult = Matrix4.setColumn(
matrix,
3,
new Cartesian4(17.0, 18.0, 19.0, 20.0),
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expected);
@@ -1138,7 +1311,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
const translation = new Cartesian3(-1.0, -2.0, -3.0);
const result = new Matrix4();
@@ -1159,7 +1332,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
const returnedResult = Matrix4.setTranslation(matrix, translation, result);
expect(result).toBe(returnedResult);
@@ -1183,7 +1356,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
const expectedRow0 = new Cartesian4(1.0, 2.0, 3.0, 4.0);
const expectedRow1 = new Cartesian4(5.0, 6.0, 7.0, 8.0);
@@ -1226,7 +1399,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
const result = new Matrix4();
@@ -1246,13 +1419,13 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
let returnedResult = Matrix4.setRow(
matrix,
0,
new Cartesian4(91.0, 92.0, 93.0, 94.0),
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expected);
@@ -1273,13 +1446,13 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
returnedResult = Matrix4.setRow(
matrix,
1,
new Cartesian4(95.0, 96.0, 97.0, 98.0),
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expected);
@@ -1300,13 +1473,13 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
returnedResult = Matrix4.setRow(
matrix,
2,
new Cartesian4(99.0, 910.0, 911.0, 912.0),
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expected);
@@ -1327,13 +1500,13 @@ describe("Core/Matrix4", function () {
913.0,
914.0,
915.0,
- 916.0,
+ 916.0
);
returnedResult = Matrix4.setRow(
matrix,
3,
new Cartesian4(913.0, 914.0, 915.0, 916.0),
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expected);
@@ -1351,7 +1524,7 @@ describe("Core/Matrix4", function () {
const returnedResult = Matrix4.setScale(matrix, newScale, result);
expect(Matrix4.getScale(returnedResult, new Cartesian3())).toEqual(
- newScale,
+ newScale
);
expect(result).toBe(returnedResult);
});
@@ -1368,7 +1541,7 @@ describe("Core/Matrix4", function () {
const returnedResult = Matrix4.setUniformScale(matrix, newScale, result);
expect(Matrix4.getScale(returnedResult, new Cartesian3())).toEqual(
- new Cartesian3(newScale, newScale, newScale),
+ new Cartesian3(newScale, newScale, newScale)
);
expect(result).toBe(returnedResult);
});
@@ -1386,7 +1559,7 @@ describe("Core/Matrix4", function () {
const m = Matrix4.fromScale(new Cartesian3(2.0, 3.0, 4.0));
expect(Matrix4.getMaximumScale(m)).toEqualEpsilon(
4.0,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -1406,8 +1579,16 @@ describe("Core/Matrix4", function () {
it("getRotation returns matrix without scale", function () {
const matrix = Matrix4.fromRotation(
Matrix3.fromColumnMajorArray([
- 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0,
- ]),
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0,
+ ])
);
const expectedRotation = Matrix3.fromColumnMajorArray([
1.0 / Math.sqrt(1.0 * 1.0 + 2.0 * 2.0 + 3.0 * 3.0),
@@ -1427,8 +1608,16 @@ describe("Core/Matrix4", function () {
it("getRotation does not modify rotation matrix", function () {
const matrix = Matrix4.fromRotation(
Matrix3.fromColumnMajorArray([
- 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0,
- ]),
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0,
+ ])
);
const duplicateMatrix = Matrix4.clone(matrix, new Matrix4());
const expectedRotation = Matrix3.fromColumnMajorArray([
@@ -1465,7 +1654,7 @@ describe("Core/Matrix4", function () {
13,
14,
15,
- 16,
+ 16
);
const right = new Matrix4(
17,
@@ -1483,7 +1672,7 @@ describe("Core/Matrix4", function () {
29,
30,
31,
- 32,
+ 32
);
const expected = new Matrix4(
250,
@@ -1501,7 +1690,7 @@ describe("Core/Matrix4", function () {
1354,
1412,
1470,
- 1528,
+ 1528
);
const result = new Matrix4();
const returnedResult = Matrix4.multiply(left, right, result);
@@ -1526,7 +1715,7 @@ describe("Core/Matrix4", function () {
13,
14,
15,
- 16,
+ 16
);
const right = new Matrix4(
17,
@@ -1544,7 +1733,7 @@ describe("Core/Matrix4", function () {
29,
30,
31,
- 32,
+ 32
);
const expected = new Matrix4(
250,
@@ -1562,7 +1751,7 @@ describe("Core/Matrix4", function () {
1354,
1412,
1470,
- 1528,
+ 1528
);
const returnedResult = Matrix4.multiply(left, right, left);
expect(returnedResult).toBe(left);
@@ -1586,7 +1775,7 @@ describe("Core/Matrix4", function () {
13,
14,
15,
- 16,
+ 16
);
const right = new Matrix4(
17,
@@ -1604,7 +1793,7 @@ describe("Core/Matrix4", function () {
29,
30,
31,
- 32,
+ 32
);
const expected = new Matrix4(
18,
@@ -1622,7 +1811,7 @@ describe("Core/Matrix4", function () {
42,
44,
46,
- 48,
+ 48
);
const result = new Matrix4();
const returnedResult = Matrix4.add(left, right, result);
@@ -1647,7 +1836,7 @@ describe("Core/Matrix4", function () {
13,
14,
15,
- 16,
+ 16
);
const right = new Matrix4(
17,
@@ -1665,7 +1854,7 @@ describe("Core/Matrix4", function () {
29,
30,
31,
- 32,
+ 32
);
const expected = new Matrix4(
18,
@@ -1683,7 +1872,7 @@ describe("Core/Matrix4", function () {
42,
44,
46,
- 48,
+ 48
);
const returnedResult = Matrix4.add(left, right, left);
expect(returnedResult).toBe(left);
@@ -1707,7 +1896,7 @@ describe("Core/Matrix4", function () {
42,
44,
46,
- 48,
+ 48
);
const right = new Matrix4(
17,
@@ -1725,7 +1914,7 @@ describe("Core/Matrix4", function () {
29,
30,
31,
- 32,
+ 32
);
const expected = new Matrix4(
1,
@@ -1743,7 +1932,7 @@ describe("Core/Matrix4", function () {
13,
14,
15,
- 16,
+ 16
);
const result = new Matrix4();
const returnedResult = Matrix4.subtract(left, right, result);
@@ -1768,7 +1957,7 @@ describe("Core/Matrix4", function () {
42,
44,
46,
- 48,
+ 48
);
const right = new Matrix4(
17,
@@ -1786,7 +1975,7 @@ describe("Core/Matrix4", function () {
29,
30,
31,
- 32,
+ 32
);
const expected = new Matrix4(
1,
@@ -1804,7 +1993,7 @@ describe("Core/Matrix4", function () {
13,
14,
15,
- 16,
+ 16
);
const returnedResult = Matrix4.subtract(left, right, left);
expect(returnedResult).toBe(left);
@@ -1829,7 +2018,7 @@ describe("Core/Matrix4", function () {
0,
0,
0,
- 1,
+ 1
);
const expected = new Matrix4(
134,
@@ -1847,7 +2036,7 @@ describe("Core/Matrix4", function () {
0,
0,
0,
- 1,
+ 1
);
const result = new Matrix4();
const returnedResult = Matrix4.multiplyTransformation(left, right, result);
@@ -1873,7 +2062,7 @@ describe("Core/Matrix4", function () {
0,
0,
0,
- 1,
+ 1
);
const expected = new Matrix4(
134,
@@ -1891,7 +2080,7 @@ describe("Core/Matrix4", function () {
0,
0,
0,
- 1,
+ 1
);
const returnedResult = Matrix4.multiplyTransformation(left, right, left);
expect(returnedResult).toBe(left);
@@ -1901,20 +2090,20 @@ describe("Core/Matrix4", function () {
it("multiplyByMatrix3 works", function () {
const left = Matrix4.fromRotationTranslation(
Matrix3.fromRotationZ(CesiumMath.toRadians(45.0)),
- new Cartesian3(1.0, 2.0, 3.0),
+ new Cartesian3(1.0, 2.0, 3.0)
);
const rightRotation = Matrix3.fromRotationX(CesiumMath.toRadians(30.0));
const right = Matrix4.fromRotationTranslation(rightRotation);
const expected = new Matrix4.multiplyTransformation(
left,
right,
- new Matrix4(),
+ new Matrix4()
);
const result = new Matrix4();
const returnedResult = Matrix4.multiplyByMatrix3(
left,
rightRotation,
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(result).toEqual(expected);
@@ -1923,14 +2112,14 @@ describe("Core/Matrix4", function () {
it("multiplyByMatrix3 works with a result parameter that is an input result parameter", function () {
const left = Matrix4.fromRotationTranslation(
Matrix3.fromRotationZ(CesiumMath.toRadians(45.0)),
- new Cartesian3(1.0, 2.0, 3.0),
+ new Cartesian3(1.0, 2.0, 3.0)
);
const rightRotation = Matrix3.fromRotationX(CesiumMath.toRadians(30.0));
const right = Matrix4.fromRotationTranslation(rightRotation);
const expected = new Matrix4.multiplyTransformation(
left,
right,
- new Matrix4(),
+ new Matrix4()
);
const returnedResult = Matrix4.multiplyByMatrix3(left, rightRotation, left);
expect(returnedResult).toBe(left);
@@ -1943,13 +2132,13 @@ describe("Core/Matrix4", function () {
const expected = Matrix4.multiply(
m,
Matrix4.fromTranslation(translation),
- new Matrix4(),
+ new Matrix4()
);
const result = new Matrix4();
const returnedResult = Matrix4.multiplyByTranslation(
m,
translation,
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(result).toEqual(expected);
@@ -1961,7 +2150,7 @@ describe("Core/Matrix4", function () {
const expected = Matrix4.multiply(
m,
Matrix4.fromTranslation(translation),
- new Matrix4(),
+ new Matrix4()
);
const returnedResult = Matrix4.multiplyByTranslation(m, translation, m);
expect(returnedResult).toBe(m);
@@ -1970,7 +2159,22 @@ describe("Core/Matrix4", function () {
it("multiplyByUniformScale works", function () {
const m = Matrix4.fromColumnMajorArray([
- 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
]);
const scale = 2.0;
const expected = Matrix4.fromColumnMajorArray([
@@ -1999,7 +2203,22 @@ describe("Core/Matrix4", function () {
it("multiplyByUniformScale works with a result parameter that is an input result parameter", function () {
const m = Matrix4.fromColumnMajorArray([
- 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
]);
const scale = 2.0;
const expected = Matrix4.fromColumnMajorArray([
@@ -2049,7 +2268,7 @@ describe("Core/Matrix4", function () {
const expected = Matrix4.multiply(
m,
Matrix4.fromScale(scale),
- new Matrix4(),
+ new Matrix4()
);
const returnedResult = Matrix4.multiplyByScale(m, scale, m);
expect(returnedResult).toBe(m);
@@ -2058,7 +2277,22 @@ describe("Core/Matrix4", function () {
it("multiplyByUniformScale works", function () {
const m = Matrix4.fromColumnMajorArray([
- 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
]);
const scale = 2.0;
const expected = Matrix4.fromColumnMajorArray([
@@ -2088,7 +2322,22 @@ describe("Core/Matrix4", function () {
it('multiplyByUniformScale works with "this" result parameter', function () {
const m = Matrix4.fromColumnMajorArray([
- 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
]);
const scale = 2.0;
const expected = Matrix4.fromColumnMajorArray([
@@ -2132,7 +2381,7 @@ describe("Core/Matrix4", function () {
13,
14,
15,
- 16,
+ 16
);
const right = new Cartesian4(17, 18, 19, 20);
const expected = new Cartesian4(190, 486, 782, 1078);
@@ -2159,7 +2408,7 @@ describe("Core/Matrix4", function () {
13,
14,
15,
- 16,
+ 16
);
const right = new Cartesian3(17, 18, 19);
const expected = new Cartesian3(114, 334, 554);
@@ -2186,7 +2435,7 @@ describe("Core/Matrix4", function () {
13,
14,
15,
- 16,
+ 16
);
const right = new Cartesian3(17, 18, 19);
const expected = new Cartesian3(110, 326, 542);
@@ -2213,7 +2462,7 @@ describe("Core/Matrix4", function () {
13,
14,
15,
- 16,
+ 16
);
const right = 2;
const expected = new Matrix4(
@@ -2232,7 +2481,7 @@ describe("Core/Matrix4", function () {
26,
28,
30,
- 32,
+ 32
);
const result = new Matrix4();
const returnedResult = Matrix4.multiplyByScalar(left, right, result);
@@ -2257,7 +2506,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
const expected = new Matrix4(
-1.0,
@@ -2275,7 +2524,7 @@ describe("Core/Matrix4", function () {
-13.0,
-14.0,
-15.0,
- -16.0,
+ -16.0
);
const result = new Matrix4();
const returnedResult = Matrix4.negate(matrix, result);
@@ -2300,7 +2549,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
const expected = new Matrix4(
-1.0,
@@ -2318,7 +2567,7 @@ describe("Core/Matrix4", function () {
-13.0,
-14.0,
-15.0,
- -16.0,
+ -16.0
);
const returnedResult = Matrix4.negate(matrix, matrix);
expect(matrix).toBe(returnedResult);
@@ -2342,7 +2591,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
const expected = new Matrix4(
1.0,
@@ -2360,7 +2609,7 @@ describe("Core/Matrix4", function () {
4.0,
8.0,
12.0,
- 16.0,
+ 16.0
);
const result = new Matrix4();
const returnedResult = Matrix4.transpose(matrix, result);
@@ -2385,12 +2634,12 @@ describe("Core/Matrix4", function () {
13.0,
-27.0,
15.0,
- 16.0,
+ 16.0
);
const expectedInverse = Matrix4.inverse(matrix, new Matrix4());
const expectedInverseTranspose = Matrix4.transpose(
expectedInverse,
- new Matrix4(),
+ new Matrix4()
);
const result = Matrix4.inverseTranspose(matrix, new Matrix4());
expect(result).toEqual(expectedInverseTranspose);
@@ -2413,7 +2662,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
const expected = new Matrix4(
1.0,
@@ -2431,7 +2680,7 @@ describe("Core/Matrix4", function () {
4.0,
8.0,
12.0,
- 16.0,
+ 16.0
);
const returnedResult = Matrix4.transpose(matrix, matrix);
expect(matrix).toBe(returnedResult);
@@ -2455,7 +2704,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
let right = new Matrix4(
1.0,
@@ -2473,7 +2722,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
expect(Matrix4.equals(left, right)).toEqual(true);
@@ -2493,7 +2742,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(5.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0);
expect(Matrix4.equals(left, right)).toEqual(false);
@@ -2514,7 +2763,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(1.0, 6.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0);
expect(Matrix4.equals(left, right)).toEqual(false);
@@ -2535,7 +2784,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(1.0, 2.0, 7.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0);
expect(Matrix4.equals(left, right)).toEqual(false);
@@ -2556,7 +2805,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(1.0, 2.0, 3.0, 8.0, 5.0, 6.0, 7.0, 8.0, 9.0);
expect(Matrix4.equals(left, right)).toEqual(false);
@@ -2577,7 +2826,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(1.0, 2.0, 3.0, 4.0, 9.0, 6.0, 7.0, 8.0, 9.0);
expect(Matrix4.equals(left, right)).toEqual(false);
@@ -2598,7 +2847,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(1.0, 2.0, 3.0, 4.0, 5.0, 10.0, 7.0, 8.0, 9.0);
expect(Matrix4.equals(left, right)).toEqual(false);
@@ -2619,7 +2868,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 11.0, 8.0, 9.0);
expect(Matrix4.equals(left, right)).toEqual(false);
@@ -2640,7 +2889,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 12.0, 9.0);
expect(Matrix4.equals(left, right)).toEqual(false);
@@ -2661,7 +2910,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 13.0);
expect(Matrix4.equals(left, right)).toEqual(false);
@@ -2690,7 +2939,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
let right = new Matrix4(
1.0,
@@ -2708,7 +2957,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
expect(Matrix4.equalsEpsilon(left, right, 1.0)).toEqual(true);
@@ -2728,7 +2977,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(
5.0,
@@ -2746,7 +2995,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
expect(Matrix4.equalsEpsilon(left, right, 3.9)).toEqual(false);
expect(Matrix4.equalsEpsilon(left, right, 4.0)).toEqual(true);
@@ -2767,7 +3016,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(
1.0,
@@ -2785,7 +3034,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
expect(Matrix4.equalsEpsilon(left, right, 3.9)).toEqual(false);
expect(Matrix4.equalsEpsilon(left, right, 4.0)).toEqual(true);
@@ -2806,7 +3055,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(
1.0,
@@ -2824,7 +3073,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
expect(Matrix4.equalsEpsilon(left, right, 3.9)).toEqual(false);
expect(Matrix4.equalsEpsilon(left, right, 4.0)).toEqual(true);
@@ -2845,7 +3094,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(
1.0,
@@ -2863,7 +3112,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
expect(Matrix4.equalsEpsilon(left, right, 3.9)).toEqual(false);
expect(Matrix4.equalsEpsilon(left, right, 4.0)).toEqual(true);
@@ -2884,7 +3133,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(
1.0,
@@ -2902,7 +3151,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
expect(Matrix4.equalsEpsilon(left, right, 3.9)).toEqual(false);
expect(Matrix4.equalsEpsilon(left, right, 4.0)).toEqual(true);
@@ -2923,7 +3172,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(
1.0,
@@ -2941,7 +3190,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
expect(Matrix4.equalsEpsilon(left, right, 3.9)).toEqual(false);
expect(Matrix4.equalsEpsilon(left, right, 4.0)).toEqual(true);
@@ -2962,7 +3211,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(
1.0,
@@ -2980,7 +3229,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
expect(Matrix4.equalsEpsilon(left, right, 3.9)).toEqual(false);
expect(Matrix4.equalsEpsilon(left, right, 4.0)).toEqual(true);
@@ -3001,7 +3250,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(
1.0,
@@ -3019,7 +3268,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
expect(Matrix4.equalsEpsilon(left, right, 3.9)).toEqual(false);
expect(Matrix4.equalsEpsilon(left, right, 4.0)).toEqual(true);
@@ -3040,7 +3289,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(
1.0,
@@ -3058,7 +3307,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
expect(Matrix4.equalsEpsilon(left, right, 3.9)).toEqual(false);
expect(Matrix4.equalsEpsilon(left, right, 4.0)).toEqual(true);
@@ -3079,7 +3328,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(
1.0,
@@ -3097,7 +3346,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
expect(Matrix4.equalsEpsilon(left, right, 3.9)).toEqual(false);
expect(Matrix4.equalsEpsilon(left, right, 4.0)).toEqual(true);
@@ -3118,7 +3367,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(
1.0,
@@ -3136,7 +3385,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
expect(Matrix4.equalsEpsilon(left, right, 3.9)).toEqual(false);
expect(Matrix4.equalsEpsilon(left, right, 4.0)).toEqual(true);
@@ -3157,7 +3406,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(
1.0,
@@ -3175,7 +3424,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
expect(Matrix4.equalsEpsilon(left, right, 3.9)).toEqual(false);
expect(Matrix4.equalsEpsilon(left, right, 4.0)).toEqual(true);
@@ -3196,7 +3445,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(
1.0,
@@ -3214,7 +3463,7 @@ describe("Core/Matrix4", function () {
17.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
expect(Matrix4.equalsEpsilon(left, right, 3.9)).toEqual(false);
expect(Matrix4.equalsEpsilon(left, right, 4.0)).toEqual(true);
@@ -3235,7 +3484,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(
1.0,
@@ -3253,7 +3502,7 @@ describe("Core/Matrix4", function () {
13.0,
18.0,
15.0,
- 16.0,
+ 16.0
);
expect(Matrix4.equalsEpsilon(left, right, 3.9)).toEqual(false);
expect(Matrix4.equalsEpsilon(left, right, 4.0)).toEqual(true);
@@ -3274,7 +3523,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(
1.0,
@@ -3292,7 +3541,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
19.0,
- 16.0,
+ 16.0
);
expect(Matrix4.equalsEpsilon(left, right, 3.9)).toEqual(false);
expect(Matrix4.equalsEpsilon(left, right, 4.0)).toEqual(true);
@@ -3313,7 +3562,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
right = new Matrix4(
1.0,
@@ -3331,7 +3580,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 20.0,
+ 20.0
);
expect(Matrix4.equalsEpsilon(left, right, 3.9)).toEqual(false);
expect(Matrix4.equalsEpsilon(left, right, 4.0)).toEqual(true);
@@ -3360,10 +3609,10 @@ describe("Core/Matrix4", function () {
13,
14,
15,
- 16,
+ 16
);
expect(matrix.toString()).toEqual(
- "(1, 2, 3, 4)\n(5, 6, 7, 8)\n(9, 10, 11, 12)\n(13, 14, 15, 16)",
+ "(1, 2, 3, 4)\n(5, 6, 7, 8)\n(9, 10, 11, 12)\n(13, 14, 15, 16)"
);
});
@@ -3384,7 +3633,7 @@ describe("Core/Matrix4", function () {
13,
14,
15,
- 16,
+ 16
);
const expected = new Cartesian3(4, 8, 12);
const result = new Cartesian3();
@@ -3410,7 +3659,7 @@ describe("Core/Matrix4", function () {
13,
14,
15,
- 16,
+ 16
);
const expected = new Matrix3(1, 2, 3, 5, 6, 7, 9, 10, 11);
const result = new Matrix3();
@@ -3436,7 +3685,7 @@ describe("Core/Matrix4", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const expected = new Matrix4(
@@ -3455,7 +3704,7 @@ describe("Core/Matrix4", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const result = new Matrix4();
@@ -3463,7 +3712,7 @@ describe("Core/Matrix4", function () {
expect(returnedResult).toBe(result);
expect(expected).toEqualEpsilon(returnedResult, CesiumMath.EPSILON20);
expect(
- Matrix4.multiply(returnedResult, matrix, new Matrix4()),
+ Matrix4.multiply(returnedResult, matrix, new Matrix4())
).toEqualEpsilon(Matrix4.IDENTITY, CesiumMath.EPSILON15);
});
@@ -3481,7 +3730,7 @@ describe("Core/Matrix4", function () {
const trs = new TranslationRotationScale(
new Cartesian3(0.0, 0.0, 0.0),
Quaternion.fromAxisAngle(Cartesian3.UNIT_X, 0.0),
- new Cartesian3(1.0e-7, 1.0e-7, 1.1e-7),
+ new Cartesian3(1.0e-7, 1.0e-7, 1.1e-7)
);
const matrix = Matrix4.fromTranslationRotationScale(trs);
@@ -3502,7 +3751,7 @@ describe("Core/Matrix4", function () {
0,
0,
0,
- 1,
+ 1
);
const result = Matrix4.inverse(matrix, new Matrix4());
@@ -3513,7 +3762,7 @@ describe("Core/Matrix4", function () {
const trs = new TranslationRotationScale(
new Cartesian3(0.0, 0.0, 0.0),
Quaternion.fromAxisAngle(Cartesian3.UNIT_X, 0.0),
- new Cartesian3(1.8e-8, 1.2e-8, 1.2e-8),
+ new Cartesian3(1.8e-8, 1.2e-8, 1.2e-8)
);
const matrix = Matrix4.fromTranslationRotationScale(trs);
@@ -3534,7 +3783,7 @@ describe("Core/Matrix4", function () {
0,
0,
0,
- 1,
+ 1
);
const result = Matrix4.inverse(matrix, new Matrix4());
@@ -3558,7 +3807,7 @@ describe("Core/Matrix4", function () {
0,
0,
0,
- 1,
+ 1
);
const expected = new Matrix4(
@@ -3577,7 +3826,7 @@ describe("Core/Matrix4", function () {
0,
0,
0,
- 1,
+ 1
);
const result = new Matrix4();
@@ -3585,7 +3834,7 @@ describe("Core/Matrix4", function () {
expect(returnedResult).toBe(result);
expect(expected).toEqual(returnedResult);
expect(Matrix4.multiply(returnedResult, matrix, new Matrix4())).toEqual(
- Matrix4.IDENTITY,
+ Matrix4.IDENTITY
);
});
@@ -3612,7 +3861,7 @@ describe("Core/Matrix4", function () {
-13.0,
-14.0,
-15.0,
- -16.0,
+ -16.0
);
const expected = new Matrix4(
1.0,
@@ -3630,7 +3879,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
const result = new Matrix4();
let returnedResult = Matrix4.abs(matrix, result);
@@ -3652,7 +3901,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
returnedResult = Matrix4.abs(matrix, result);
expect(returnedResult).toEqual(expected);
@@ -3673,7 +3922,7 @@ describe("Core/Matrix4", function () {
13.0,
-14.0,
15.0,
- -16.0,
+ -16.0
);
returnedResult = Matrix4.abs(matrix, result);
expect(returnedResult).toEqual(expected);
@@ -3696,7 +3945,7 @@ describe("Core/Matrix4", function () {
-13.0,
-14.0,
-15.0,
- -16.0,
+ -16.0
);
const expected = new Matrix4(
1.0,
@@ -3714,7 +3963,7 @@ describe("Core/Matrix4", function () {
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
const returnedResult = Matrix4.abs(matrix, matrix);
expect(matrix).toBe(returnedResult);
@@ -3750,7 +3999,7 @@ describe("Core/Matrix4", function () {
Matrix4.fromTranslationQuaternionRotationScale(
undefined,
new Quaternion(),
- new Cartesian3(),
+ new Cartesian3()
);
}).toThrowDeveloperError();
});
@@ -3760,7 +4009,7 @@ describe("Core/Matrix4", function () {
Matrix4.fromTranslationQuaternionRotationScale(
new Matrix3(),
undefined,
- new Cartesian3(),
+ new Cartesian3()
);
}).toThrowDeveloperError();
});
@@ -3770,7 +4019,7 @@ describe("Core/Matrix4", function () {
Matrix4.fromTranslationQuaternionRotationScale(
new Matrix3(),
new Quaternion(),
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
@@ -3869,7 +4118,7 @@ describe("Core/Matrix4", function () {
bottom,
top,
near,
- far,
+ far
);
}).toThrowDeveloperError();
});
@@ -3887,7 +4136,7 @@ describe("Core/Matrix4", function () {
bottom,
top,
near,
- far,
+ far
);
}).toThrowDeveloperError();
});
@@ -3905,7 +4154,7 @@ describe("Core/Matrix4", function () {
undefined,
top,
near,
- far,
+ far
);
}).toThrowDeveloperError();
});
@@ -3923,7 +4172,7 @@ describe("Core/Matrix4", function () {
bottom,
undefined,
near,
- far,
+ far
);
}).toThrowDeveloperError();
});
@@ -3941,7 +4190,7 @@ describe("Core/Matrix4", function () {
bottom,
top,
undefined,
- far,
+ far
);
}).toThrowDeveloperError();
});
@@ -3959,7 +4208,7 @@ describe("Core/Matrix4", function () {
bottom,
top,
near,
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
@@ -3977,7 +4226,7 @@ describe("Core/Matrix4", function () {
bottom,
top,
near,
- far,
+ far
);
}).toThrowDeveloperError();
});
@@ -3995,7 +4244,7 @@ describe("Core/Matrix4", function () {
bottom,
top,
near,
- far,
+ far
);
}).toThrowDeveloperError();
});
@@ -4013,7 +4262,7 @@ describe("Core/Matrix4", function () {
undefined,
top,
near,
- far,
+ far
);
}).toThrowDeveloperError();
});
@@ -4031,7 +4280,7 @@ describe("Core/Matrix4", function () {
bottom,
undefined,
near,
- far,
+ far
);
}).toThrowDeveloperError();
});
@@ -4049,7 +4298,7 @@ describe("Core/Matrix4", function () {
bottom,
top,
undefined,
- far,
+ far
);
}).toThrowDeveloperError();
});
@@ -4067,7 +4316,7 @@ describe("Core/Matrix4", function () {
bottom,
top,
near,
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
@@ -4085,7 +4334,7 @@ describe("Core/Matrix4", function () {
bottom,
top,
near,
- far,
+ far
);
}).toThrowDeveloperError();
});
@@ -4103,7 +4352,7 @@ describe("Core/Matrix4", function () {
bottom,
top,
near,
- far,
+ far
);
}).toThrowDeveloperError();
});
@@ -4121,7 +4370,7 @@ describe("Core/Matrix4", function () {
undefined,
top,
near,
- far,
+ far
);
}).toThrowDeveloperError();
});
@@ -4139,7 +4388,7 @@ describe("Core/Matrix4", function () {
bottom,
undefined,
near,
- far,
+ far
);
}).toThrowDeveloperError();
});
@@ -4157,7 +4406,7 @@ describe("Core/Matrix4", function () {
bottom,
top,
undefined,
- far,
+ far
);
}).toThrowDeveloperError();
});
@@ -4507,7 +4756,7 @@ describe("Core/Matrix4", function () {
13,
14,
15,
- 16,
+ 16
);
expect(function () {
Matrix4.inverse(matrix, new Matrix4());
@@ -4754,7 +5003,7 @@ describe("Core/Matrix4", function () {
right,
bottom,
top,
- near,
+ near
);
}).toThrowDeveloperError();
});
@@ -4786,7 +5035,7 @@ describe("Core/Matrix4", function () {
4,
8,
12,
- 16,
+ 16
);
expect(matrix.length).toEqual(16);
const intArray = new Uint32Array(matrix.length);
diff --git a/packages/engine/Specs/Core/NearFarScalarSpec.js b/packages/engine/Specs/Core/NearFarScalarSpec.js
index 1e133af23edb..3350cddc431b 100644
--- a/packages/engine/Specs/Core/NearFarScalarSpec.js
+++ b/packages/engine/Specs/Core/NearFarScalarSpec.js
@@ -40,9 +40,10 @@ describe("Core/NearFarScalar", function () {
expect(scalar).toBe(returnedResult);
});
- createPackableSpecs(
- NearFarScalar,
- new NearFarScalar(1, 2, 3, 4),
- [1, 2, 3, 4],
- );
+ createPackableSpecs(NearFarScalar, new NearFarScalar(1, 2, 3, 4), [
+ 1,
+ 2,
+ 3,
+ 4,
+ ]);
});
diff --git a/packages/engine/Specs/Core/OccluderSpec.js b/packages/engine/Specs/Core/OccluderSpec.js
index ccb915e2470c..d4e18ff9b12e 100644
--- a/packages/engine/Specs/Core/OccluderSpec.js
+++ b/packages/engine/Specs/Core/OccluderSpec.js
@@ -129,7 +129,7 @@ describe("Core/Occluder", function () {
Occluder.computeOccludeePoint(
occluderBS,
new Cartesian3(0, 0, -3),
- positions,
+ positions
);
}).toThrowDeveloperError();
});
@@ -149,7 +149,7 @@ describe("Core/Occluder", function () {
Occluder.computeOccludeePoint(
occluderBS,
new Cartesian3(0, 0, -5),
- new Cartesian3(0, 0, -3),
+ new Cartesian3(0, 0, -3)
);
}).toThrowDeveloperError();
});
@@ -165,11 +165,11 @@ describe("Core/Occluder", function () {
const result = Occluder.computeOccludeePoint(
occluderBS,
occludeePosition,
- positions,
+ positions
);
expect(result).toEqualEpsilon(
new Cartesian3(0, 0, -5),
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
});
@@ -184,16 +184,16 @@ describe("Core/Occluder", function () {
const occludeePosition = occludee.position;
const occluderPlaneNormal = Cartesian3.normalize(
Cartesian3.subtract(occludeePosition, occluderPosition, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
const occluderPlaneD = -Cartesian3.dot(
occluderPlaneNormal,
- occluderPosition,
+ occluderPosition
);
const tempVec0 = Cartesian3.abs(
Cartesian3.clone(occluderPlaneNormal),
- new Cartesian3(),
+ new Cartesian3()
);
let majorAxis = tempVec0.x > tempVec0.y ? 0 : 1;
if (
@@ -206,7 +206,7 @@ describe("Core/Occluder", function () {
const aRotationVector = Occluder._anyRotationVector(
occluderPosition,
occluderPlaneNormal,
- occluderPlaneD,
+ occluderPlaneD
);
expect(aRotationVector).toBeTruthy();
});
@@ -222,16 +222,16 @@ describe("Core/Occluder", function () {
const occludeePosition = occludee.position;
const occluderPlaneNormal = Cartesian3.normalize(
Cartesian3.subtract(occludeePosition, occluderPosition, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
const occluderPlaneD = -Cartesian3.dot(
occluderPlaneNormal,
- occluderPosition,
+ occluderPosition
);
const tempVec0 = Cartesian3.abs(
Cartesian3.clone(occluderPlaneNormal),
- new Cartesian3(),
+ new Cartesian3()
);
let majorAxis = tempVec0.x > tempVec0.y ? 0 : 1;
if (
@@ -244,7 +244,7 @@ describe("Core/Occluder", function () {
const aRotationVector = Occluder._anyRotationVector(
occluderPosition,
occluderPlaneNormal,
- occluderPlaneD,
+ occluderPlaneD
);
expect(aRotationVector).toBeTruthy();
});
@@ -260,16 +260,16 @@ describe("Core/Occluder", function () {
const occludeePosition = occludee.position;
const occluderPlaneNormal = Cartesian3.normalize(
Cartesian3.subtract(occludeePosition, occluderPosition, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
const occluderPlaneD = -Cartesian3.dot(
occluderPlaneNormal,
- occluderPosition,
+ occluderPosition
);
const tempVec0 = Cartesian3.abs(
Cartesian3.clone(occluderPlaneNormal),
- new Cartesian3(),
+ new Cartesian3()
);
let majorAxis = tempVec0.x > tempVec0.y ? 0 : 1;
if (
@@ -282,7 +282,7 @@ describe("Core/Occluder", function () {
const aRotationVector = Occluder._anyRotationVector(
occluderPosition,
occluderPlaneNormal,
- occluderPlaneD,
+ occluderPlaneD
);
expect(aRotationVector).toBeTruthy();
});
@@ -300,7 +300,7 @@ describe("Core/Occluder", function () {
const result = Occluder.computeOccludeePoint(
occluderBS,
occludeePosition,
- positions,
+ positions
);
const bs = new BoundingSphere(result, 0.0);
@@ -322,10 +322,10 @@ describe("Core/Occluder", function () {
const result = Occluder.computeOccludeePoint(
occluderBS,
occludeePosition,
- positions,
+ positions
);
expect(
- occluder.isBoundingSphereVisible(new BoundingSphere(result, 0.0)),
+ occluder.isBoundingSphereVisible(new BoundingSphere(result, 0.0))
).toEqual(true);
});
@@ -338,7 +338,7 @@ describe("Core/Occluder", function () {
it("compute invalid occludee point from rectangle", function () {
const rectangle = Rectangle.MAX_VALUE;
expect(Occluder.computeOccludeePointFromRectangle(rectangle)).toEqual(
- undefined,
+ undefined
);
});
@@ -351,7 +351,7 @@ describe("Core/Occluder", function () {
const point = Occluder.computeOccludeePoint(
new BoundingSphere(Cartesian3.ZERO, ellipsoid.minimumRadius),
bs.center,
- positions,
+ positions
);
const actual = Occluder.computeOccludeePointFromRectangle(rectangle);
expect(actual).toEqual(point);
@@ -387,7 +387,7 @@ describe("Core/Occluder", function () {
const occluder1 = Occluder.fromBoundingSphere(
occluderBS,
cameraPosition,
- result,
+ result
);
expect(occluder1).toBe(result);
diff --git a/packages/engine/Specs/Core/OpenCageGeocoderServiceSpec.js b/packages/engine/Specs/Core/OpenCageGeocoderServiceSpec.js
index a3a06264cccf..50ab76102342 100644
--- a/packages/engine/Specs/Core/OpenCageGeocoderServiceSpec.js
+++ b/packages/engine/Specs/Core/OpenCageGeocoderServiceSpec.js
@@ -51,7 +51,7 @@ describe("Core/OpenCageGeocoderService", function () {
],
};
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(data),
+ Promise.resolve(data)
);
const results = await service.geocode(query);
@@ -66,7 +66,7 @@ describe("Core/OpenCageGeocoderService", function () {
const query = "";
const data = { results: [] };
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(data),
+ Promise.resolve(data)
);
const results = await service.geocode(query);
@@ -78,7 +78,7 @@ describe("Core/OpenCageGeocoderService", function () {
expect(service.credit).toBeInstanceOf(Credit);
expect(service.credit.html).toEqual(
- `Geodata copyright
OpenStreetMap contributors`,
+ `Geodata copyright
OpenStreetMap contributors`
);
expect(service.credit.showOnScreen).toBe(false);
});
diff --git a/packages/engine/Specs/Core/OrientedBoundingBoxSpec.js b/packages/engine/Specs/Core/OrientedBoundingBoxSpec.js
index 3bd41233c5fd..a424c6561c35 100644
--- a/packages/engine/Specs/Core/OrientedBoundingBoxSpec.js
+++ b/packages/engine/Specs/Core/OrientedBoundingBoxSpec.js
@@ -34,7 +34,7 @@ describe("Core/OrientedBoundingBox", function () {
for (let i = 0; i < positions.length; ++i) {
points.push(
- Matrix3.multiplyByVector(rotation, positions[i], new Cartesian3()),
+ Matrix3.multiplyByVector(rotation, positions[i], new Cartesian3())
);
}
@@ -74,7 +74,7 @@ describe("Core/OrientedBoundingBox", function () {
it("fromPoints correct scale", function () {
const box = OrientedBoundingBox.fromPoints(positions);
expect(box.halfAxes).toEqual(
- Matrix3.fromScale(new Cartesian3(2.0, 3.0, 4.0)),
+ Matrix3.fromScale(new Cartesian3(2.0, 3.0, 4.0))
);
expect(box.center).toEqual(Cartesian3.ZERO);
});
@@ -84,7 +84,7 @@ describe("Core/OrientedBoundingBox", function () {
const points = translatePositions(positions, translation);
const box = OrientedBoundingBox.fromPoints(points);
expect(box.halfAxes).toEqual(
- Matrix3.fromScale(new Cartesian3(2.0, 3.0, 4.0)),
+ Matrix3.fromScale(new Cartesian3(2.0, 3.0, 4.0))
);
expect(box.center).toEqual(translation);
});
@@ -93,7 +93,7 @@ describe("Core/OrientedBoundingBox", function () {
const result = rotatePositions(
positions,
Cartesian3.UNIT_Z,
- CesiumMath.PI_OVER_FOUR,
+ CesiumMath.PI_OVER_FOUR
);
const points = result.points;
const rotation = result.rotation;
@@ -105,9 +105,9 @@ describe("Core/OrientedBoundingBox", function () {
Matrix3.multiplyByScale(
rotation,
new Cartesian3(3.0, 2.0, 4.0),
- new Matrix3(),
+ new Matrix3()
),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.center).toEqualEpsilon(Cartesian3.ZERO, CesiumMath.EPSILON15);
});
@@ -116,7 +116,7 @@ describe("Core/OrientedBoundingBox", function () {
const result = rotatePositions(
positions,
Cartesian3.UNIT_Y,
- CesiumMath.PI_OVER_FOUR,
+ CesiumMath.PI_OVER_FOUR
);
const points = result.points;
const rotation = result.rotation;
@@ -128,9 +128,9 @@ describe("Core/OrientedBoundingBox", function () {
Matrix3.multiplyByScale(
rotation,
new Cartesian3(4.0, 3.0, 2.0),
- new Matrix3(),
+ new Matrix3()
),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.center).toEqualEpsilon(Cartesian3.ZERO, CesiumMath.EPSILON15);
});
@@ -139,7 +139,7 @@ describe("Core/OrientedBoundingBox", function () {
const result = rotatePositions(
positions,
Cartesian3.UNIT_X,
- CesiumMath.PI_OVER_FOUR,
+ CesiumMath.PI_OVER_FOUR
);
const points = result.points;
const rotation = result.rotation;
@@ -151,9 +151,9 @@ describe("Core/OrientedBoundingBox", function () {
Matrix3.multiplyByScale(
rotation,
new Cartesian3(2.0, 4.0, 3.0),
- new Matrix3(),
+ new Matrix3()
),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.center).toEqualEpsilon(Cartesian3.ZERO, CesiumMath.EPSILON15);
});
@@ -162,7 +162,7 @@ describe("Core/OrientedBoundingBox", function () {
const result = rotatePositions(
positions,
Cartesian3.UNIT_Z,
- CesiumMath.PI_OVER_FOUR,
+ CesiumMath.PI_OVER_FOUR
);
let points = result.points;
const rotation = result.rotation;
@@ -177,9 +177,9 @@ describe("Core/OrientedBoundingBox", function () {
Matrix3.multiplyByScale(
rotation,
new Cartesian3(3.0, 2.0, 4.0),
- new Matrix3(),
+ new Matrix3()
),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(box.center).toEqualEpsilon(translation, CesiumMath.EPSILON15);
});
@@ -191,7 +191,7 @@ describe("Core/OrientedBoundingBox", function () {
rectangle,
0.0,
0.0,
- Ellipsoid.WGS84,
+ Ellipsoid.WGS84
);
expect(box1.center).toEqualEpsilon(box2.center, CesiumMath.EPSILON15);
@@ -205,12 +205,12 @@ describe("Core/OrientedBoundingBox", function () {
rectangle,
undefined,
undefined,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(1.0, 0.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
const rotScale = Matrix3.ZERO;
@@ -231,7 +231,7 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(-1.0, 1.0, 1.0, -1.0),
0.0,
0.0,
- ellipsoid,
+ ellipsoid
);
}).toThrowDeveloperError();
expect(function () {
@@ -239,7 +239,7 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(-2.0, 2.0, -1.0, 1.0),
0.0,
0.0,
- ellipsoid,
+ ellipsoid
);
}).toThrowDeveloperError();
expect(function () {
@@ -247,7 +247,7 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(-4.0, -2.0, 4.0, 1.0),
0.0,
0.0,
- ellipsoid,
+ ellipsoid
);
}).toThrowDeveloperError();
expect(function () {
@@ -255,7 +255,7 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(-2.0, -2.0, 1.0, 2.0),
0.0,
0.0,
- ellipsoid,
+ ellipsoid
);
}).toThrowDeveloperError();
expect(function () {
@@ -263,7 +263,7 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(-1.0, -2.0, 2.0, 2.0),
0.0,
0.0,
- ellipsoid,
+ ellipsoid
);
}).toThrowDeveloperError();
expect(function () {
@@ -271,7 +271,7 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(-4.0, -1.0, 4.0, 2.0),
0.0,
0.0,
- ellipsoid,
+ ellipsoid
);
}).toThrowDeveloperError();
});
@@ -283,7 +283,7 @@ describe("Core/OrientedBoundingBox", function () {
rectangle,
0.0,
0.0,
- new Ellipsoid(1.01, 1.0, 1.01),
+ new Ellipsoid(1.01, 1.0, 1.01)
);
}).toThrowDeveloperError();
expect(function () {
@@ -291,7 +291,7 @@ describe("Core/OrientedBoundingBox", function () {
rectangle,
0.0,
0.0,
- new Ellipsoid(1.0, 1.01, 1.01),
+ new Ellipsoid(1.0, 1.01, 1.01)
);
}).toThrowDeveloperError();
});
@@ -303,12 +303,12 @@ describe("Core/OrientedBoundingBox", function () {
rectangle,
0.0,
0.0,
- ellipsoid,
+ ellipsoid
);
expect(box.center).toEqualEpsilon(
new Cartesian3(1.0, 0.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
const rotScale = Matrix3.ZERO;
@@ -324,13 +324,13 @@ describe("Core/OrientedBoundingBox", function () {
0.0,
0.0,
ellipsoid,
- result,
+ result
);
expect(box).toBe(result);
expect(box.center).toEqualEpsilon(
new Cartesian3(1.0, 0.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
const rotScale = Matrix3.ZERO;
@@ -346,11 +346,11 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(0.0, 0.0, 0.0, 0.0),
1.0,
1.0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(2.0, 0.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(Matrix3.ZERO, CesiumMath.EPSILON15);
@@ -358,11 +358,11 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(0.0, 0.0, 0.0, 0.0),
-1.0,
-1.0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(0.0, 0.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(Matrix3.ZERO, CesiumMath.EPSILON15);
@@ -370,41 +370,41 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(0.0, 0.0, 0.0, 0.0),
-1.0,
1.0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(1.0, 0.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(0, 0, 1, 0, 0, 0, 0, 0, 0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
box = OrientedBoundingBox.fromRectangle(
new Rectangle(-d90, -d90, d90, d90),
0.0,
1.0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(1.0, 0.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(0, 0, 1, 2, 0, 0, 0, 2, 0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
box = OrientedBoundingBox.fromRectangle(
new Rectangle(-d90, -d90, d90, d90),
-1.0,
-1.0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(0.0, 0.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(Matrix3.ZERO, CesiumMath.EPSILON15);
@@ -412,15 +412,15 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(-d90, -d90, d90, d90),
-1.0,
0.0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(0.5, 0.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(0, 0, 0.5, 1, 0, 0, 0, 1, 0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -440,15 +440,15 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(-d180, -d90, d180, d90),
0,
0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(0, 0, 0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(0, 0, 1, 1, 0, 0, 0, 1, 0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
// 3/4s of longitude, full latitude
@@ -456,15 +456,15 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(-d135, -d90, d135, d90),
0,
0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(oneMinusOnePlusSqrtHalfDivTwo, 0, 0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(0, 0, onePlusSqrtHalfDivTwo, 1, 0, 0, 0, 1, 0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
// 3/4s of longitude, 1/2 of latitude centered at equator
@@ -472,15 +472,15 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(-d135, -d45, d135, d45),
0,
0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(oneMinusOnePlusSqrtHalfDivTwo, 0, 0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(0, 0, onePlusSqrtHalfDivTwo, 1, 0, 0, 0, Math.SQRT1_2, 0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
// 3/4s of longitude centered at IDL, 1/2 of latitude centered at equator
@@ -488,11 +488,11 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(d180, -d45, d90, d45),
0,
0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(sqrtTwoMinusOneDivFour, -sqrtTwoMinusOneDivFour, 0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(
@@ -504,9 +504,9 @@ describe("Core/OrientedBoundingBox", function () {
-sqrtTwoPlusOneDivFour,
0,
Math.SQRT1_2,
- 0.0,
+ 0.0
),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
// Full longitude, 1/2 of latitude centered at equator
@@ -514,15 +514,15 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(-d180, -d45, d180, d45),
0,
0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(0, 0, 0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(0, 0, 1, 1, 0, 0, 0, Math.SQRT1_2, 0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
// Full longitude, 1/4 of latitude starting from north pole
@@ -530,11 +530,11 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(-d180, d45, d180, d90),
0,
0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(0, 0, onePlusSqrtHalfDivTwo),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(
@@ -546,9 +546,9 @@ describe("Core/OrientedBoundingBox", function () {
0,
0,
oneMinusOnePlusSqrtHalfDivTwo,
- 0,
+ 0
),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
// Full longitude, 1/4 of latitude starting from south pole
@@ -556,11 +556,11 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(-d180, -d90, d180, -d45),
0,
0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(0, 0, -onePlusSqrtHalfDivTwo),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(
@@ -572,9 +572,9 @@ describe("Core/OrientedBoundingBox", function () {
0,
0,
oneMinusOnePlusSqrtHalfDivTwo,
- 0,
+ 0
),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
// Cmpletely on north pole
@@ -582,15 +582,15 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(-d180, d90, d180, d90),
0,
0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(0, 0, 1),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(0, 0, 0, 0, 0, 0, 0, 0, 0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
// Completely on north pole 2
@@ -598,15 +598,15 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(-d135, d90, d135, d90),
0,
0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(0, 0, 1),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(0, 0, 0, 0, 0, 0, 0, 0, 0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
// Completely on south pole
@@ -614,15 +614,15 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(-d180, -d90, d180, -d90),
0,
0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(0, 0, -1),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(0, 0, 0, 0, 0, 0, 0, 0, 0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
// Completely on south pole 2
@@ -630,15 +630,15 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(-d135, -d90, d135, -d90),
0,
0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(0, 0, -1),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(0, 0, 0, 0, 0, 0, 0, 0, 0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -656,11 +656,11 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(0.0, 0.0, 0.0, 0.0),
0.0,
0.0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(1.0, 0.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(Matrix3.ZERO, CesiumMath.EPSILON15);
@@ -668,11 +668,11 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(d180, 0.0, -d180, 0.0),
0.0,
0.0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(-1.0, 0.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(Matrix3.ZERO, CesiumMath.EPSILON15);
@@ -680,11 +680,11 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(d180, 0.0, d180, 0.0),
0.0,
0.0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(-1.0, 0.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(Matrix3.ZERO, CesiumMath.EPSILON15);
@@ -692,11 +692,11 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(0.0, d90, 0.0, d90),
0.0,
0.0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(0.0, 0.0, 1.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(Matrix3.ZERO, CesiumMath.EPSILON15);
@@ -704,101 +704,101 @@ describe("Core/OrientedBoundingBox", function () {
new Rectangle(0.0, 0.0, d180, 0.0),
0.0,
0.0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(0.0, 0.5, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(-1.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
box = OrientedBoundingBox.fromRectangle(
new Rectangle(-d90, -d90, d90, d90),
0.0,
0.0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(0.5, 0.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(0.0, 0.0, 0.5, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
box = OrientedBoundingBox.fromRectangle(
new Rectangle(-d90, -d30, d90, d90),
0.0,
0.0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(0.1875 * sqrt3, 0.0, 0.1875),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(0, -sqrt3 / 4, (5 * sqrt3) / 16, 1, 0, 0, 0, 3 / 4, 5 / 16),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
box = OrientedBoundingBox.fromRectangle(
new Rectangle(-d90, -d90, d90, d30),
0.0,
0.0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(0.1875 * sqrt3, 0.0, -0.1875),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(0, sqrt3 / 4, (5 * sqrt3) / 16, 1, 0, 0, 0, 3 / 4, -5 / 16),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
box = OrientedBoundingBox.fromRectangle(
new Rectangle(0.0, -d30, d180, d90),
0.0,
0.0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(0.0, 0.1875 * sqrt3, 0.1875),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(-1, 0, 0, 0, -sqrt3 / 4, (5 * sqrt3) / 16, 0, 3 / 4, 5 / 16),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
box = OrientedBoundingBox.fromRectangle(
new Rectangle(0.0, -d90, d180, d30),
0.0,
0.0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(0.0, 0.1875 * sqrt3, -0.1875),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(-1, 0, 0, 0, sqrt3 / 4, (5 * sqrt3) / 16, 0, 3 / 4, -5 / 16),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
box = OrientedBoundingBox.fromRectangle(
new Rectangle(-d45, 0.0, d45, 0.0),
0.0,
0.0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3((1.0 + Math.SQRT1_2) / 2.0, 0.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(
@@ -810,20 +810,20 @@ describe("Core/OrientedBoundingBox", function () {
0.0,
0.0,
0.0,
- 0.0,
+ 0.0
),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
box = OrientedBoundingBox.fromRectangle(
new Rectangle(d135, 0.0, -d135, 0.0),
0.0,
0.0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(-(1.0 + Math.SQRT1_2) / 2.0, 0.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(
@@ -835,20 +835,20 @@ describe("Core/OrientedBoundingBox", function () {
0.0,
0.0,
0.0,
- 0.0,
+ 0.0
),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
box = OrientedBoundingBox.fromRectangle(
new Rectangle(0.0, -d45, 0.0, d45),
0.0,
0.0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3((1.0 + Math.SQRT1_2) / 2.0, 0.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(
@@ -860,39 +860,39 @@ describe("Core/OrientedBoundingBox", function () {
0.0,
0.0,
Math.SQRT1_2,
- 0.0,
+ 0.0
),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
box = OrientedBoundingBox.fromRectangle(
new Rectangle(-d90, 0.0, d90, 0.0),
0.0,
0.0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(0.5, 0.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(0.0, 0.0, 0.5, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
box = OrientedBoundingBox.fromRectangle(
new Rectangle(0.0, -d90, 0.0, d90),
0.0,
0.0,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(box.center).toEqualEpsilon(
new Cartesian3(0.5, 0.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(box.halfAxes).toEqualEpsilon(
new Matrix3(0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -903,7 +903,7 @@ describe("Core/OrientedBoundingBox", function () {
const transformation = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
const box = new OrientedBoundingBox();
@@ -914,9 +914,9 @@ describe("Core/OrientedBoundingBox", function () {
Matrix3.multiplyByUniformScale(
Matrix4.getMatrix3(transformation, new Matrix3()),
0.5,
- new Matrix3(),
+ new Matrix3()
),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -927,7 +927,7 @@ describe("Core/OrientedBoundingBox", function () {
const transformation = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
const box = OrientedBoundingBox.fromTransformation(transformation);
@@ -937,9 +937,9 @@ describe("Core/OrientedBoundingBox", function () {
Matrix3.multiplyByUniformScale(
Matrix4.getMatrix3(transformation, new Matrix3()),
0.5,
- new Matrix3(),
+ new Matrix3()
),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -964,7 +964,7 @@ describe("Core/OrientedBoundingBox", function () {
const box = new OrientedBoundingBox(
center,
- Matrix3.multiplyByScalar(axes, 0.5, new Matrix3()),
+ Matrix3.multiplyByScalar(axes, 0.5, new Matrix3())
);
const planeNormXform = function (nx, ny, nz, dist) {
@@ -1438,11 +1438,11 @@ describe("Core/OrientedBoundingBox", function () {
it("intersectPlane works with off-center box", function () {
intersectPlaneTestCornersEdgesFaces(
new Cartesian3(1.0, 0.0, 0.0),
- Matrix3.IDENTITY,
+ Matrix3.IDENTITY
);
intersectPlaneTestCornersEdgesFaces(
new Cartesian3(0.7, -1.8, 12.0),
- Matrix3.IDENTITY,
+ Matrix3.IDENTITY
);
});
@@ -1451,8 +1451,8 @@ describe("Core/OrientedBoundingBox", function () {
Cartesian3.ZERO,
Matrix3.fromQuaternion(
Quaternion.fromAxisAngle(new Cartesian3(0.5, 1.5, -1.2), 1.2),
- new Matrix3(),
- ),
+ new Matrix3()
+ )
);
});
@@ -1460,23 +1460,23 @@ describe("Core/OrientedBoundingBox", function () {
const m = new Matrix3();
intersectPlaneTestCornersEdgesFaces(
Cartesian3.ZERO,
- Matrix3.fromScale(new Cartesian3(1.5, 0.4, 20.6), m),
+ Matrix3.fromScale(new Cartesian3(1.5, 0.4, 20.6), m)
);
intersectPlaneTestCornersEdgesFaces(
Cartesian3.ZERO,
- Matrix3.fromScale(new Cartesian3(0.0, 0.4, 20.6), m),
+ Matrix3.fromScale(new Cartesian3(0.0, 0.4, 20.6), m)
);
intersectPlaneTestCornersEdgesFaces(
Cartesian3.ZERO,
- Matrix3.fromScale(new Cartesian3(1.5, 0.0, 20.6), m),
+ Matrix3.fromScale(new Cartesian3(1.5, 0.0, 20.6), m)
);
intersectPlaneTestCornersEdgesFaces(
Cartesian3.ZERO,
- Matrix3.fromScale(new Cartesian3(1.5, 0.4, 0.0), m),
+ Matrix3.fromScale(new Cartesian3(1.5, 0.4, 0.0), m)
);
intersectPlaneTestCornersEdgesFaces(
Cartesian3.ZERO,
- Matrix3.fromScale(new Cartesian3(0.0, 0.0, 0.0), m),
+ Matrix3.fromScale(new Cartesian3(0.0, 0.0, 0.0), m)
);
});
@@ -1484,7 +1484,7 @@ describe("Core/OrientedBoundingBox", function () {
const m = Matrix3.fromScale(new Cartesian3(1.5, 80.4, 2.6), new Matrix3());
const n = Matrix3.fromQuaternion(
Quaternion.fromAxisAngle(new Cartesian3(0.5, 1.5, -1.2), 1.2),
- new Matrix3(),
+ new Matrix3()
);
Matrix3.multiply(m, n, n);
intersectPlaneTestCornersEdgesFaces(new Cartesian3(-5.1, 0.0, 0.1), n);
@@ -1513,7 +1513,7 @@ describe("Core/OrientedBoundingBox", function () {
const rotationScale = Matrix3.multiplyByScale(
rotation,
scale,
- new Matrix3(),
+ new Matrix3()
);
const center = new Cartesian3(4.0, 3.0, 2.0);
@@ -1533,7 +1533,7 @@ describe("Core/OrientedBoundingBox", function () {
let expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative x direction
@@ -1544,7 +1544,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from positive y direction
@@ -1555,7 +1555,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative y direction
@@ -1566,7 +1566,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from positive z direction
@@ -1577,7 +1577,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative z direction
@@ -1588,7 +1588,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from corner point
@@ -1602,7 +1602,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// inside box
@@ -1611,7 +1611,7 @@ describe("Core/OrientedBoundingBox", function () {
Cartesian3.add(center, offset, cartesian);
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
0.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -1622,7 +1622,7 @@ describe("Core/OrientedBoundingBox", function () {
const rotationScale = Matrix3.multiplyByScale(
rotation,
scale,
- new Matrix3(),
+ new Matrix3()
);
const center = new Cartesian3(4.0, 3.0, 2.0);
@@ -1647,7 +1647,7 @@ describe("Core/OrientedBoundingBox", function () {
let expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative x direction
@@ -1658,7 +1658,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from positive y direction
@@ -1669,7 +1669,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative y direction
@@ -1680,7 +1680,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from positive z direction
@@ -1691,7 +1691,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative z direction
@@ -1702,7 +1702,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from corner point
@@ -1715,7 +1715,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// inside box
@@ -1724,7 +1724,7 @@ describe("Core/OrientedBoundingBox", function () {
Cartesian3.add(center, offset, cartesian);
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
0.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -1735,7 +1735,7 @@ describe("Core/OrientedBoundingBox", function () {
const rotationScale = Matrix3.multiplyByScale(
rotation,
scale,
- new Matrix3(),
+ new Matrix3()
);
const center = new Cartesian3(4.0, 3.0, 2.0);
@@ -1760,7 +1760,7 @@ describe("Core/OrientedBoundingBox", function () {
let expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative x direction
@@ -1771,7 +1771,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from positive y direction
@@ -1782,7 +1782,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative y direction
@@ -1793,7 +1793,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from positive z direction
@@ -1804,7 +1804,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative z direction
@@ -1815,7 +1815,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from corner point
@@ -1828,7 +1828,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// inside box
@@ -1837,7 +1837,7 @@ describe("Core/OrientedBoundingBox", function () {
Cartesian3.add(center, offset, cartesian);
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
0.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -1869,7 +1869,7 @@ describe("Core/OrientedBoundingBox", function () {
let expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative x direction
@@ -1880,7 +1880,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from positive y direction
@@ -1891,7 +1891,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative y direction
@@ -1902,7 +1902,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from positive z direction
@@ -1913,7 +1913,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative z direction
@@ -1924,7 +1924,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from corner point
@@ -1937,7 +1937,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// inside box
@@ -1945,7 +1945,7 @@ describe("Core/OrientedBoundingBox", function () {
Cartesian3.add(center, offset, cartesian);
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
0.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -1958,7 +1958,7 @@ describe("Core/OrientedBoundingBox", function () {
const rotationScale = Matrix3.multiplyByScale(
rotation,
scale,
- new Matrix3(),
+ new Matrix3()
);
const center = new Cartesian3(4.0, 3.0, 2.0);
@@ -1988,7 +1988,7 @@ describe("Core/OrientedBoundingBox", function () {
let expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative x direction
@@ -1999,7 +1999,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from positive y direction
@@ -2010,7 +2010,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative y direction
@@ -2021,7 +2021,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from positive z direction
@@ -2032,7 +2032,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative z direction
@@ -2043,7 +2043,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from endpoint in posiive direction
@@ -2055,7 +2055,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from endpoint in negative direction
@@ -2068,7 +2068,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// inside box
@@ -2077,7 +2077,7 @@ describe("Core/OrientedBoundingBox", function () {
Cartesian3.add(center, offset, cartesian);
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
0.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -2090,7 +2090,7 @@ describe("Core/OrientedBoundingBox", function () {
const rotationScale = Matrix3.multiplyByScale(
rotation,
scale,
- new Matrix3(),
+ new Matrix3()
);
const center = new Cartesian3(4.0, 3.0, 2.0);
@@ -2120,7 +2120,7 @@ describe("Core/OrientedBoundingBox", function () {
let expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative x direction
@@ -2131,7 +2131,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from positive y direction
@@ -2142,7 +2142,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative y direction
@@ -2153,7 +2153,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from positive z direction
@@ -2164,7 +2164,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative z direction
@@ -2175,7 +2175,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from endpoint in positive direction
@@ -2187,7 +2187,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from endpoint in negative direction
@@ -2200,7 +2200,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// inside box
@@ -2209,7 +2209,7 @@ describe("Core/OrientedBoundingBox", function () {
Cartesian3.add(center, offset, cartesian);
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
0.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -2222,7 +2222,7 @@ describe("Core/OrientedBoundingBox", function () {
const rotationScale = Matrix3.multiplyByScale(
rotation,
scale,
- new Matrix3(),
+ new Matrix3()
);
const center = new Cartesian3(4.0, 3.0, 2.0);
@@ -2252,7 +2252,7 @@ describe("Core/OrientedBoundingBox", function () {
let expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative x direction
@@ -2263,7 +2263,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from positive y direction
@@ -2274,7 +2274,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative y direction
@@ -2285,7 +2285,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from positive z direction
@@ -2296,7 +2296,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative z direction
@@ -2307,7 +2307,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from endpoint in positive direction
@@ -2319,7 +2319,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from endpoint in negative direction // from endpoint in negative direction
@@ -2332,7 +2332,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// inside box
@@ -2341,7 +2341,7 @@ describe("Core/OrientedBoundingBox", function () {
Cartesian3.add(center, offset, cartesian);
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
0.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -2372,7 +2372,7 @@ describe("Core/OrientedBoundingBox", function () {
let expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative x direction
@@ -2383,7 +2383,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from positive y direction
@@ -2394,7 +2394,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative y direction
@@ -2405,7 +2405,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from positive z direction
@@ -2416,7 +2416,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from negative z direction
@@ -2427,7 +2427,7 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// from arbitrary point
@@ -2438,14 +2438,14 @@ describe("Core/OrientedBoundingBox", function () {
expected = d * d;
expect(obb.distanceSquaredTo(cartesian)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
// inside box
cartesian = center;
expect(obb.distanceSquaredTo(center)).toEqualEpsilon(
0.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -2459,7 +2459,7 @@ describe("Core/OrientedBoundingBox", function () {
expect(function () {
OrientedBoundingBox.distanceSquaredTo(
new OrientedBoundingBox(),
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
@@ -2550,7 +2550,7 @@ describe("Core/OrientedBoundingBox", function () {
OrientedBoundingBox.computePlaneDistances(
undefined,
new Cartesian3(),
- new Cartesian3(),
+ new Cartesian3()
);
}).toThrowDeveloperError();
});
@@ -2560,7 +2560,7 @@ describe("Core/OrientedBoundingBox", function () {
OrientedBoundingBox.computePlaneDistances(
new OrientedBoundingBox(),
undefined,
- new Cartesian3(),
+ new Cartesian3()
);
}).toThrowDeveloperError();
});
@@ -2570,7 +2570,7 @@ describe("Core/OrientedBoundingBox", function () {
OrientedBoundingBox.computePlaneDistances(
new OrientedBoundingBox(),
new Cartesian3(),
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
@@ -2589,7 +2589,7 @@ describe("Core/OrientedBoundingBox", function () {
new Cartesian3(),
new Cartesian3(),
new Cartesian3(),
- new Cartesian3(),
+ new Cartesian3()
);
const result = box.computeCorners(corners);
@@ -2658,7 +2658,7 @@ describe("Core/OrientedBoundingBox", function () {
const extractedTranslation = Matrix4.getTranslation(
result,
- new Cartesian3(),
+ new Cartesian3()
);
const extractedScale = Matrix4.getScale(result, new Cartesian3());
@@ -2678,7 +2678,7 @@ describe("Core/OrientedBoundingBox", function () {
const extractedTranslation = Matrix4.getTranslation(
transformation,
- new Cartesian3(),
+ new Cartesian3()
);
const extractedScale = Matrix4.getScale(transformation, new Cartesian3());
@@ -2711,7 +2711,7 @@ describe("Core/OrientedBoundingBox", function () {
let halfAxes = Matrix3.multiplyByScale(
Matrix3.IDENTITY,
new Cartesian3(radius, radius, radius),
- new Matrix3(),
+ new Matrix3()
);
let obb = new OrientedBoundingBox(new Cartesian3(0, 0, -2.75), halfAxes);
expect(obb.isOccluded(occluder)).toEqual(true);
@@ -2723,7 +2723,7 @@ describe("Core/OrientedBoundingBox", function () {
halfAxes = Matrix3.multiplyByScale(
Matrix3.IDENTITY,
new Cartesian3(radius, radius, radius),
- new Matrix3(),
+ new Matrix3()
);
obb = new OrientedBoundingBox(new Cartesian3(0, 0, -1.5), halfAxes);
expect(obb.isOccluded(occluder)).toEqual(false);
@@ -2733,7 +2733,7 @@ describe("Core/OrientedBoundingBox", function () {
expect(function () {
OrientedBoundingBox.isOccluded(
undefined,
- new Occluder(new BoundingSphere(), new Cartesian3()),
+ new Occluder(new BoundingSphere(), new Cartesian3())
);
}).toThrowDeveloperError();
});
@@ -2794,6 +2794,6 @@ describe("Core/OrientedBoundingBox", function () {
createPackableSpecs(
OrientedBoundingBox,
new OrientedBoundingBox(new Cartesian3(1.0, 2.0, 3.0), Matrix3.IDENTITY),
- [1.0, 2.0, 3.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0],
+ [1.0, 2.0, 3.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
);
});
diff --git a/packages/engine/Specs/Core/OrthographicFrustumSpec.js b/packages/engine/Specs/Core/OrthographicFrustumSpec.js
index cb9deacbb96e..fa90747bbd10 100644
--- a/packages/engine/Specs/Core/OrthographicFrustumSpec.js
+++ b/packages/engine/Specs/Core/OrthographicFrustumSpec.js
@@ -21,7 +21,7 @@ describe("Core/OrthographicFrustum", function () {
planes = frustum.computeCullingVolume(
new Cartesian3(),
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- Cartesian3.UNIT_Y,
+ Cartesian3.UNIT_Y
).planes;
});
@@ -145,7 +145,7 @@ describe("Core/OrthographicFrustum", function () {
frustum.top,
frustum.near,
frustum.far,
- new Matrix4(),
+ new Matrix4()
);
const projectionMatrix = frustum.projectionMatrix;
expect(projectionMatrix).toEqualEpsilon(expected, CesiumMath.EPSILON6);
@@ -158,7 +158,7 @@ describe("Core/OrthographicFrustum", function () {
undefined,
0.0,
1.0,
- new Cartesian2(),
+ new Cartesian2()
);
}).toThrowDeveloperError();
});
@@ -170,7 +170,7 @@ describe("Core/OrthographicFrustum", function () {
1.0,
0.0,
1.0,
- new Cartesian2(),
+ new Cartesian2()
);
}).toThrowDeveloperError();
});
@@ -194,7 +194,7 @@ describe("Core/OrthographicFrustum", function () {
1.0,
0.0,
undefined,
- new Cartesian2(),
+ new Cartesian2()
);
}).toThrowDeveloperError();
});
@@ -214,14 +214,14 @@ describe("Core/OrthographicFrustum", function () {
dimensions.y,
distance,
pixelRatio,
- new Cartesian2(),
+ new Cartesian2()
);
const expected = frustum.offCenterFrustum.getPixelDimensions(
dimensions.x,
dimensions.y,
distance,
pixelRatio,
- new Cartesian2(),
+ new Cartesian2()
);
expect(pixelSize.x).toEqual(expected.x);
expect(pixelSize.y).toEqual(expected.y);
@@ -236,14 +236,14 @@ describe("Core/OrthographicFrustum", function () {
dimensions.y,
distance,
pixelRatio,
- new Cartesian2(),
+ new Cartesian2()
);
const expected = frustum.offCenterFrustum.getPixelDimensions(
dimensions.x,
dimensions.y,
distance,
pixelRatio,
- new Cartesian2(),
+ new Cartesian2()
);
expect(pixelSize.x).toEqual(expected.x);
expect(pixelSize.y).toEqual(expected.y);
@@ -312,6 +312,6 @@ describe("Core/OrthographicFrustum", function () {
near: 3.0,
far: 4.0,
}),
- [1.0, 2.0, 3.0, 4.0],
+ [1.0, 2.0, 3.0, 4.0]
);
});
diff --git a/packages/engine/Specs/Core/OrthographicOffCenterFrustumSpec.js b/packages/engine/Specs/Core/OrthographicOffCenterFrustumSpec.js
index 90c8153a5ab4..4040ffc5df38 100644
--- a/packages/engine/Specs/Core/OrthographicOffCenterFrustumSpec.js
+++ b/packages/engine/Specs/Core/OrthographicOffCenterFrustumSpec.js
@@ -21,7 +21,7 @@ describe("Core/OrthographicOffCenterFrustum", function () {
planes = frustum.computeCullingVolume(
new Cartesian3(),
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- Cartesian3.UNIT_Y,
+ Cartesian3.UNIT_Y
).planes;
});
@@ -147,7 +147,7 @@ describe("Core/OrthographicOffCenterFrustum", function () {
frustum.top,
frustum.near,
frustum.far,
- new Matrix4(),
+ new Matrix4()
);
expect(projectionMatrix).toEqualEpsilon(expected, CesiumMath.EPSILON6);
});
@@ -159,7 +159,7 @@ describe("Core/OrthographicOffCenterFrustum", function () {
undefined,
0.0,
1.0,
- new Cartesian2(),
+ new Cartesian2()
);
}).toThrowDeveloperError();
});
@@ -171,7 +171,7 @@ describe("Core/OrthographicOffCenterFrustum", function () {
1.0,
0.0,
1.0,
- new Cartesian2(),
+ new Cartesian2()
);
}).toThrowDeveloperError();
});
@@ -195,7 +195,7 @@ describe("Core/OrthographicOffCenterFrustum", function () {
1.0,
0.0,
undefined,
- new Cartesian2(),
+ new Cartesian2()
);
}).toThrowDeveloperError();
});
@@ -212,7 +212,7 @@ describe("Core/OrthographicOffCenterFrustum", function () {
1.0,
0.0,
1.0,
- new Cartesian2(),
+ new Cartesian2()
);
expect(pixelSize.x).toEqual(2.0);
expect(pixelSize.y).toEqual(2.0);
@@ -224,7 +224,7 @@ describe("Core/OrthographicOffCenterFrustum", function () {
1.0,
0.0,
2.0,
- new Cartesian2(),
+ new Cartesian2()
);
expect(pixelSize.x).toEqual(4.0);
expect(pixelSize.y).toEqual(4.0);
diff --git a/packages/engine/Specs/Core/PeliasGeocoderServiceSpec.js b/packages/engine/Specs/Core/PeliasGeocoderServiceSpec.js
index 1211b0b1353a..a12b2cc1899e 100644
--- a/packages/engine/Specs/Core/PeliasGeocoderServiceSpec.js
+++ b/packages/engine/Specs/Core/PeliasGeocoderServiceSpec.js
@@ -36,7 +36,7 @@ describe("Core/PeliasGeocoderService", function () {
],
};
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(data),
+ Promise.resolve(data)
);
const results = await service.geocode(query);
@@ -70,7 +70,7 @@ describe("Core/PeliasGeocoderService", function () {
],
};
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(data),
+ Promise.resolve(data)
);
const results = await service.geocode(query);
@@ -87,7 +87,7 @@ describe("Core/PeliasGeocoderService", function () {
const query = "some query";
const data = { features: [] };
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(data),
+ Promise.resolve(data)
);
const results = await service.geocode(query);
@@ -100,11 +100,11 @@ describe("Core/PeliasGeocoderService", function () {
const query = "some query";
const data = { features: [] };
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(data),
+ Promise.resolve(data)
);
const getDerivedResource = spyOn(
service._url,
- "getDerivedResource",
+ "getDerivedResource"
).and.callThrough();
await service.geocode(query, GeocodeType.SEARCH);
@@ -122,11 +122,11 @@ describe("Core/PeliasGeocoderService", function () {
const query = "some query";
const data = { features: [] };
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(data),
+ Promise.resolve(data)
);
const getDerivedResource = spyOn(
service._url,
- "getDerivedResource",
+ "getDerivedResource"
).and.callThrough();
await service.geocode(query, GeocodeType.AUTOCOMPLETE);
diff --git a/packages/engine/Specs/Core/PerspectiveFrustumSpec.js b/packages/engine/Specs/Core/PerspectiveFrustumSpec.js
index 7fd5d508e69f..3e3c16fdcf1a 100644
--- a/packages/engine/Specs/Core/PerspectiveFrustumSpec.js
+++ b/packages/engine/Specs/Core/PerspectiveFrustumSpec.js
@@ -21,7 +21,7 @@ describe("Core/PerspectiveFrustum", function () {
planes = frustum.computeCullingVolume(
new Cartesian3(),
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- Cartesian3.UNIT_Y,
+ Cartesian3.UNIT_Y
).planes;
});
@@ -116,7 +116,7 @@ describe("Core/PerspectiveFrustum", function () {
-Math.sqrt(3.0) / 2.0,
0.0,
-0.5,
- 0.0,
+ 0.0
);
expect(rightPlane).toEqualEpsilon(expectedResult, CesiumMath.EPSILON14);
});
@@ -133,7 +133,7 @@ describe("Core/PerspectiveFrustum", function () {
0.0,
-Math.sqrt(3.0) / 2.0,
-0.5,
- 0.0,
+ 0.0
);
expect(topPlane).toEqualEpsilon(expectedResult, CesiumMath.EPSILON14);
});
@@ -161,7 +161,7 @@ describe("Core/PerspectiveFrustum", function () {
frustum.aspectRatio,
frustum.near,
frustum.far,
- new Matrix4(),
+ new Matrix4()
);
expect(projectionMatrix).toEqualEpsilon(expected, CesiumMath.EPSILON6);
});
@@ -179,7 +179,7 @@ describe("Core/PerspectiveFrustum", function () {
bottom,
top,
near,
- new Matrix4(),
+ new Matrix4()
);
expect(frustum.infiniteProjectionMatrix).toEqual(expected);
});
@@ -191,7 +191,7 @@ describe("Core/PerspectiveFrustum", function () {
undefined,
1.0,
1.0,
- new Cartesian2(),
+ new Cartesian2()
);
}).toThrowDeveloperError();
});
@@ -203,7 +203,7 @@ describe("Core/PerspectiveFrustum", function () {
1.0,
1.0,
1.0,
- new Cartesian2(),
+ new Cartesian2()
);
}).toThrowDeveloperError();
});
@@ -227,7 +227,7 @@ describe("Core/PerspectiveFrustum", function () {
1.0,
1.0,
undefined,
- new Cartesian2(),
+ new Cartesian2()
);
}).toThrowDeveloperError();
});
@@ -247,14 +247,14 @@ describe("Core/PerspectiveFrustum", function () {
dimensions.y,
distance,
pixelRatio,
- new Cartesian2(),
+ new Cartesian2()
);
const expected = frustum.offCenterFrustum.getPixelDimensions(
dimensions.x,
dimensions.y,
distance,
pixelRatio,
- new Cartesian2(),
+ new Cartesian2()
);
expect(pixelSize.x).toEqual(expected.x);
expect(pixelSize.y).toEqual(expected.y);
@@ -269,14 +269,14 @@ describe("Core/PerspectiveFrustum", function () {
dimensions.y,
distance,
pixelRatio,
- new Cartesian2(),
+ new Cartesian2()
);
const expected = frustum.offCenterFrustum.getPixelDimensions(
dimensions.x,
dimensions.y,
distance,
pixelRatio,
- new Cartesian2(),
+ new Cartesian2()
);
expect(pixelSize.x).toEqual(expected.x);
expect(pixelSize.y).toEqual(expected.y);
@@ -347,6 +347,6 @@ describe("Core/PerspectiveFrustum", function () {
xOffset: 5.0,
yOffset: 6.0,
}),
- [1.0, 2.0, 3.0, 4.0, 5.0, 6.0],
+ [1.0, 2.0, 3.0, 4.0, 5.0, 6.0]
);
});
diff --git a/packages/engine/Specs/Core/PerspectiveOffCenterFrustumSpec.js b/packages/engine/Specs/Core/PerspectiveOffCenterFrustumSpec.js
index 4e443c690d0e..3d4201bff5ca 100644
--- a/packages/engine/Specs/Core/PerspectiveOffCenterFrustumSpec.js
+++ b/packages/engine/Specs/Core/PerspectiveOffCenterFrustumSpec.js
@@ -21,7 +21,7 @@ describe("Core/PerspectiveOffCenterFrustum", function () {
planes = frustum.computeCullingVolume(
new Cartesian3(),
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- Cartesian3.UNIT_Y,
+ Cartesian3.UNIT_Y
).planes;
});
@@ -139,7 +139,7 @@ describe("Core/PerspectiveOffCenterFrustum", function () {
top,
near,
far,
- new Matrix4(),
+ new Matrix4()
);
expect(projectionMatrix).toEqualEpsilon(expected, CesiumMath.EPSILON6);
@@ -158,7 +158,7 @@ describe("Core/PerspectiveOffCenterFrustum", function () {
bottom,
top,
near,
- new Matrix4(),
+ new Matrix4()
);
expect(expected).toEqual(frustum.infiniteProjectionMatrix);
});
@@ -170,7 +170,7 @@ describe("Core/PerspectiveOffCenterFrustum", function () {
undefined,
1.0,
1.0,
- new Cartesian2(),
+ new Cartesian2()
);
}).toThrowDeveloperError();
});
@@ -182,7 +182,7 @@ describe("Core/PerspectiveOffCenterFrustum", function () {
1.0,
1.0,
1.0,
- new Cartesian2(),
+ new Cartesian2()
);
}).toThrowDeveloperError();
});
@@ -206,7 +206,7 @@ describe("Core/PerspectiveOffCenterFrustum", function () {
1.0,
1.0,
undefined,
- new Cartesian2(),
+ new Cartesian2()
);
}).toThrowDeveloperError();
});
@@ -223,7 +223,7 @@ describe("Core/PerspectiveOffCenterFrustum", function () {
1.0,
1.0,
1.0,
- new Cartesian2(),
+ new Cartesian2()
);
expect(pixelSize.x).toEqual(2.0);
expect(pixelSize.y).toEqual(2.0);
@@ -235,7 +235,7 @@ describe("Core/PerspectiveOffCenterFrustum", function () {
1.0,
1.0,
2.0,
- new Cartesian2(),
+ new Cartesian2()
);
expect(pixelSize.x).toEqual(4.0);
expect(pixelSize.y).toEqual(4.0);
diff --git a/packages/engine/Specs/Core/PinBuilderSpec.js b/packages/engine/Specs/Core/PinBuilderSpec.js
index 8b8cd0342878..5e863733d0d8 100644
--- a/packages/engine/Specs/Core/PinBuilderSpec.js
+++ b/packages/engine/Specs/Core/PinBuilderSpec.js
@@ -35,8 +35,8 @@ describe("Core/PinBuilder", function () {
builder.fromUrl(
buildModuleUrl("Assets/Textures/maki/square.png"),
Color.RED,
- 128,
- ),
+ 128
+ )
).then(function (canvas) {
expect(getPinColor(canvas)).toEqual(Color.RED);
expect(getIconColor(canvas)).toEqual(Color.WHITE);
@@ -48,7 +48,7 @@ describe("Core/PinBuilder", function () {
//Solid square icon
return Promise.resolve(
- builder.fromMakiIconId("square", Color.YELLOW, 128),
+ builder.fromMakiIconId("square", Color.YELLOW, 128)
).then(function (canvas) {
expect(getPinColor(canvas)).toEqual(Color.YELLOW);
expect(getIconColor(canvas)).toEqual(Color.WHITE);
diff --git a/packages/engine/Specs/Core/PixelDatatypeSpec.js b/packages/engine/Specs/Core/PixelDatatypeSpec.js
index 76f67c0878a2..f943dbcbb04a 100644
--- a/packages/engine/Specs/Core/PixelDatatypeSpec.js
+++ b/packages/engine/Specs/Core/PixelDatatypeSpec.js
@@ -3,16 +3,16 @@ import { PixelDatatype } from "../../index.js";
describe("Core/PixelDatatype", function () {
it("getTypedArrayConstructor returns the expected constructor", function () {
expect(
- PixelDatatype.getTypedArrayConstructor(PixelDatatype.UNSIGNED_BYTE),
+ PixelDatatype.getTypedArrayConstructor(PixelDatatype.UNSIGNED_BYTE)
).toBe(Uint8Array);
expect(
- PixelDatatype.getTypedArrayConstructor(PixelDatatype.UNSIGNED_SHORT),
+ PixelDatatype.getTypedArrayConstructor(PixelDatatype.UNSIGNED_SHORT)
).toBe(Uint16Array);
expect(
- PixelDatatype.getTypedArrayConstructor(PixelDatatype.UNSIGNED_INT),
+ PixelDatatype.getTypedArrayConstructor(PixelDatatype.UNSIGNED_INT)
).toBe(Uint32Array);
expect(PixelDatatype.getTypedArrayConstructor(PixelDatatype.FLOAT)).toBe(
- Float32Array,
+ Float32Array
);
});
});
diff --git a/packages/engine/Specs/Core/PixelFormatSpec.js b/packages/engine/Specs/Core/PixelFormatSpec.js
index a8a3141035d9..386a4b31dd61 100644
--- a/packages/engine/Specs/Core/PixelFormatSpec.js
+++ b/packages/engine/Specs/Core/PixelFormatSpec.js
@@ -14,7 +14,7 @@ describe("Core/PixelFormat", function () {
PixelFormat.RGB,
PixelDatatype.UNSIGNED_BYTE,
width,
- height,
+ height
);
expect(flipped).toEqual(expectedDataBuffer);
});
@@ -30,7 +30,7 @@ describe("Core/PixelFormat", function () {
PixelFormat.RGB,
PixelDatatype.UNSIGNED_BYTE,
width,
- height,
+ height
);
expect(flipped).toBe(dataBuffer);
});
diff --git a/packages/engine/Specs/Core/PlaneGeometrySpec.js b/packages/engine/Specs/Core/PlaneGeometrySpec.js
index bc780ff32050..ba566d5f7f75 100644
--- a/packages/engine/Specs/Core/PlaneGeometrySpec.js
+++ b/packages/engine/Specs/Core/PlaneGeometrySpec.js
@@ -7,7 +7,7 @@ describe("Core/PlaneGeometry", function () {
const m = PlaneGeometry.createGeometry(
new PlaneGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(4 * 3); // 4 corners
@@ -18,7 +18,7 @@ describe("Core/PlaneGeometry", function () {
const m = PlaneGeometry.createGeometry(
new PlaneGeometry({
vertexFormat: VertexFormat.ALL,
- }),
+ })
);
const numVertices = 4;
@@ -40,6 +40,6 @@ describe("Core/PlaneGeometry", function () {
new PlaneGeometry({
vertexFormat: VertexFormat.POSITION_AND_NORMAL,
}),
- [1.0, 1.0, 0.0, 0.0, 0.0, 0.0],
+ [1.0, 1.0, 0.0, 0.0, 0.0, 0.0]
);
});
diff --git a/packages/engine/Specs/Core/PlaneSpec.js b/packages/engine/Specs/Core/PlaneSpec.js
index d91f7c2f9d93..cd41d22d07b0 100644
--- a/packages/engine/Specs/Core/PlaneSpec.js
+++ b/packages/engine/Specs/Core/PlaneSpec.js
@@ -107,7 +107,7 @@ describe("Core/Plane", function () {
const point = new Cartesian3(4.0, 5.0, 6.0);
expect(Plane.getPointDistance(plane, point)).toEqual(
- Cartesian3.dot(plane.normal, point) + plane.distance,
+ Cartesian3.dot(plane.normal, point) + plane.distance
);
});
@@ -149,7 +149,7 @@ describe("Core/Plane", function () {
expect(function () {
return Plane.projectPointOntoPlane(
new Plane(Cartesian3.UNIT_X, 0),
- undefined,
+ undefined
);
}).toThrowDeveloperError();
@@ -230,14 +230,14 @@ describe("Core/Plane", function () {
transform = Matrix4.multiplyByMatrix3(
transform,
Matrix3.fromRotationY(Math.PI),
- transform,
+ transform
);
const transformedPlane = Plane.transform(plane, transform);
expect(transformedPlane.distance).toEqual(plane.distance * 2.0);
expect(transformedPlane.normal.x).toEqualEpsilon(
-plane.normal.x,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(transformedPlane.normal.y).toEqual(plane.normal.y);
expect(transformedPlane.normal.z).toEqual(-plane.normal.z);
@@ -252,25 +252,25 @@ describe("Core/Plane", function () {
const planeDiff = Cartesian3.subtract(
planePosition,
planeOrigin,
- new Cartesian3(),
+ new Cartesian3()
);
expect(Cartesian3.dot(planeDiff, plane.normal)).toEqualEpsilon(
0.0,
- CesiumMath.EPSILON16,
+ CesiumMath.EPSILON16
);
const transform = Matrix4.fromScale(
new Cartesian3(4.0, 1.0, 10.0),
- new Matrix4(),
+ new Matrix4()
);
const transformPlane = Plane.transform(plane, transform);
const transformPlaneDiff = Matrix4.multiplyByPointAsVector(
transform,
planeDiff,
- new Cartesian3(),
+ new Cartesian3()
);
expect(
- Cartesian3.dot(transformPlaneDiff, transformPlane.normal),
+ Cartesian3.dot(transformPlaneDiff, transformPlane.normal)
).toEqualEpsilon(0.0, CesiumMath.EPSILON16);
});
diff --git a/packages/engine/Specs/Core/PolygonGeometryLibrarySpec.js b/packages/engine/Specs/Core/PolygonGeometryLibrarySpec.js
index 9abbd6d5d6f8..f82851fc9bcf 100644
--- a/packages/engine/Specs/Core/PolygonGeometryLibrarySpec.js
+++ b/packages/engine/Specs/Core/PolygonGeometryLibrarySpec.js
@@ -10,61 +10,78 @@ describe("Core/PolygonGeometryLibrary", function () {
describe("splitPolygonByPlane", function () {
it("splits a simple polygon at the equator", function () {
const positions = Cartesian3.unpackArray([
- 3813220.0, -5085291.0, 527179.0, 3701301.0, -5097773.0, -993503.0,
- 5037375.0, -3776794.0, -1017021.0, 5049166.0, -3865306.0, 494270.0,
+ 3813220.0,
+ -5085291.0,
+ 527179.0,
+ 3701301.0,
+ -5097773.0,
+ -993503.0,
+ 5037375.0,
+ -3776794.0,
+ -1017021.0,
+ 5049166.0,
+ -3865306.0,
+ 494270.0,
]);
const polygons = PolygonGeometryLibrary.splitPolygonsOnEquator(
[positions],
Ellipsoid.WGS84,
- ArcType.GEODESIC,
+ ArcType.GEODESIC
);
const expectedIntersection1 = new Cartesian3(
3799258.6687873346,
-5123110.886796548,
- 0.0,
+ 0.0
);
const expectedIntersection2 = new Cartesian3(
5077099.353935631,
-3860530.240917096,
- 0.0,
+ 0.0
);
expect(polygons.length).toBe(2);
expect(polygons[0].length).toBe(4);
expect(polygons[0][0]).toEqual(positions[0]);
expect(polygons[0][1]).toEqualEpsilon(
expectedIntersection1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[0][2]).toEqualEpsilon(
expectedIntersection2,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[0][3]).toEqual(positions[3]);
expect(polygons[1].length).toBe(4);
expect(polygons[1][0]).toEqualEpsilon(
expectedIntersection1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[1][1]).toEqual(positions[1]);
expect(polygons[1][2]).toEqual(positions[2]);
expect(polygons[1][3]).toEqualEpsilon(
expectedIntersection2,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("does not split a simple polygon with one position touching the equator", function () {
const positions = Cartesian3.unpackArray([
- 3813220.0, -5085291.0, 527179.0, 3701301.0, -5097773.0, 0.0, 5049166.0,
- -3865306.0, 494270.0,
+ 3813220.0,
+ -5085291.0,
+ 527179.0,
+ 3701301.0,
+ -5097773.0,
+ 0.0,
+ 5049166.0,
+ -3865306.0,
+ 494270.0,
]);
const polygons = PolygonGeometryLibrary.splitPolygonsOnEquator(
[positions],
Ellipsoid.WGS84,
- ArcType.GEODESIC,
+ ArcType.GEODESIC
);
expect(polygons.length).toBe(1);
@@ -76,14 +93,24 @@ describe("Core/PolygonGeometryLibrary", function () {
it("does not split a simple polygon with one edge on the equator, starting above the equator", function () {
const positions = Cartesian3.unpackArray([
- -3219367.0, -5491259.0, 401098.0, -3217795.0, -5506913.0, 0.0,
- -2713036.0, -5772334.0, 0.0, -2713766.0, -5757498.0, 406910.0,
+ -3219367.0,
+ -5491259.0,
+ 401098.0,
+ -3217795.0,
+ -5506913.0,
+ 0.0,
+ -2713036.0,
+ -5772334.0,
+ 0.0,
+ -2713766.0,
+ -5757498.0,
+ 406910.0,
]);
const polygons = PolygonGeometryLibrary.splitPolygonsOnEquator(
[positions],
Ellipsoid.WGS84,
- ArcType.GEODESIC,
+ ArcType.GEODESIC
);
expect(polygons.length).toBe(1);
expect(polygons[0].length).toBe(4);
@@ -95,14 +122,24 @@ describe("Core/PolygonGeometryLibrary", function () {
it("does not split a simple polygon with one edge on the equator, starting below the equator", function () {
const positions = Cartesian3.unpackArray([
- -3180138.0, -5441382.0, -974441.0, -3186540.0, -5525048.0, 0.0,
- -2198716.0, -5986569.0, 0.0, -2135113.0, -5925878.0, -996868.0,
+ -3180138.0,
+ -5441382.0,
+ -974441.0,
+ -3186540.0,
+ -5525048.0,
+ 0.0,
+ -2198716.0,
+ -5986569.0,
+ 0.0,
+ -2135113.0,
+ -5925878.0,
+ -996868.0,
]);
const polygons = PolygonGeometryLibrary.splitPolygonsOnEquator(
[positions],
Ellipsoid.WGS84,
- ArcType.GEODESIC,
+ ArcType.GEODESIC
);
expect(polygons.length).toBe(1);
expect(polygons[0].length).toBe(4);
@@ -114,208 +151,240 @@ describe("Core/PolygonGeometryLibrary", function () {
it("splits a positively concave polygon at the equator", function () {
const positions = Cartesian3.unpackArray([
- -3723536.687096985, -5140643.423654287, 622159.6094790212,
- -3706443.9124709764, -5089398.802336418, -1016836.564118223,
- -1818346.3577937474, -5988204.417556031, -1226992.0906221648,
- -1949728.2308330906, -6022778.780648997, 775419.1678640501,
- -2891108.934831509, -5659936.656854747, -534148.7427656263,
+ -3723536.687096985,
+ -5140643.423654287,
+ 622159.6094790212,
+ -3706443.9124709764,
+ -5089398.802336418,
+ -1016836.564118223,
+ -1818346.3577937474,
+ -5988204.417556031,
+ -1226992.0906221648,
+ -1949728.2308330906,
+ -6022778.780648997,
+ 775419.1678640501,
+ -2891108.934831509,
+ -5659936.656854747,
+ -534148.7427656263,
]);
const polygons = PolygonGeometryLibrary.splitPolygonsOnEquator(
[positions],
Ellipsoid.WGS84,
- ArcType.GEODESIC,
+ ArcType.GEODESIC
);
const expectedIntersection1 = new Cartesian3(
-3746523.7934060274,
-5161801.144582336,
- 0,
+ 0
);
const expectedIntersection2 = new Cartesian3(
-3298992.8935172106,
-5458688.2562839165,
- 0,
+ 0
);
const expectedIntersection3 = new Cartesian3(
-2527814.313071595,
-5855833.534980258,
- 0,
+ 0
);
const expectedIntersection4 = new Cartesian3(
-1921714.863778476,
-6081746.753450187,
- 0,
+ 0
);
expect(polygons.length).toBe(3);
expect(polygons[0].length).toBe(3);
expect(polygons[0][0]).toEqual(positions[0]);
expect(polygons[0][1]).toEqualEpsilon(
expectedIntersection1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[0][2]).toEqualEpsilon(
expectedIntersection2,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[1].length).toBe(7);
expect(polygons[1][0]).toEqualEpsilon(
expectedIntersection1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[1][1]).toEqual(positions[1]);
expect(polygons[1][2]).toEqual(positions[2]);
expect(polygons[1][3]).toEqualEpsilon(
expectedIntersection4,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[1][4]).toEqualEpsilon(
expectedIntersection3,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[1][5]).toEqual(positions[4]);
expect(polygons[1][6]).toEqualEpsilon(
expectedIntersection2,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[2].length).toBe(3);
expect(polygons[2][0]).toEqualEpsilon(
expectedIntersection4,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[2][1]).toEqual(positions[3]);
expect(polygons[2][2]).toEqualEpsilon(
expectedIntersection3,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("splits a negatively concave polygon at the equator", function () {
const positions = Cartesian3.unpackArray([
- -4164072.7435535816, -4791571.5503237555, 605958.8290040599,
- -4167507.7232260685, -4800497.02674794, -508272.2109012767,
- -3712172.6000501625, -5184159.589216706, 116723.13202563708,
- -3259646.0020361557, -5455158.378873343, -532227.4715966922,
- -3283717.3855494126, -5434359.545068984, 592819.1229613343,
+ -4164072.7435535816,
+ -4791571.5503237555,
+ 605958.8290040599,
+ -4167507.7232260685,
+ -4800497.02674794,
+ -508272.2109012767,
+ -3712172.6000501625,
+ -5184159.589216706,
+ 116723.13202563708,
+ -3259646.0020361557,
+ -5455158.378873343,
+ -532227.4715966922,
+ -3283717.3855494126,
+ -5434359.545068984,
+ 592819.1229613343,
]);
const polygons = PolygonGeometryLibrary.splitPolygonsOnEquator(
[positions],
Ellipsoid.WGS84,
- ArcType.GEODESIC,
+ ArcType.GEODESIC
);
const expectedIntersection1 = new Cartesian3(
-4182416.3757553473,
-4815394.568525253,
- 0,
+ 0
);
const expectedIntersection2 = new Cartesian3(
-3803015.1382151386,
-5120322.982906009,
- 0,
+ 0
);
const expectedIntersection3 = new Cartesian3(
-3635913.2183307745,
-5240302.153458,
- 0,
+ 0
);
const expectedIntersection4 = new Cartesian3(
-3284360.5276909056,
-5467504.688147503,
- 0,
+ 0
);
expect(polygons.length).toBe(3);
expect(polygons[0].length).toBe(7);
expect(polygons[0][0]).toEqual(positions[0]);
expect(polygons[0][1]).toEqualEpsilon(
expectedIntersection1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[0][2]).toEqualEpsilon(
expectedIntersection2,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[0][3]).toEqual(positions[2]);
expect(polygons[0][4]).toEqualEpsilon(
expectedIntersection3,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[0][5]).toEqualEpsilon(
expectedIntersection4,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[0][6]).toEqual(positions[4]);
expect(polygons[1].length).toBe(3);
expect(polygons[1][0]).toEqualEpsilon(
expectedIntersection1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[1][1]).toEqual(positions[1]);
expect(polygons[1][2]).toEqualEpsilon(
expectedIntersection2,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[2].length).toBe(3);
expect(polygons[2][0]).toEqualEpsilon(
expectedIntersection3,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[2][1]).toEqual(positions[3]);
expect(polygons[2][2]).toEqualEpsilon(
expectedIntersection4,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("splits a positively concave polygon with a point on the equator", function () {
const positions = Cartesian3.unpackArray([
- -3592289.0, -5251493.0, 433532.0, -3568746.0, -5245699.0, -646544.0,
- -2273628.0, -5915229.0, -715098.0, -2410175.0, -5885323.0, 475855.0,
- -3012338.0, -5621469.0, 0.0,
+ -3592289.0,
+ -5251493.0,
+ 433532.0,
+ -3568746.0,
+ -5245699.0,
+ -646544.0,
+ -2273628.0,
+ -5915229.0,
+ -715098.0,
+ -2410175.0,
+ -5885323.0,
+ 475855.0,
+ -3012338.0,
+ -5621469.0,
+ 0.0,
]);
const polygons = PolygonGeometryLibrary.splitPolygonsOnEquator(
[positions],
Ellipsoid.WGS84,
- ArcType.GEODESIC,
+ ArcType.GEODESIC
);
const expectedIntersection1 = new Cartesian3(
-3595684.3882232937,
-5267986.8423389485,
- 0,
+ 0
);
const expectedIntersection2 = new Cartesian3(
-2365929.6862513637,
-5923091.111107741,
- 0,
+ 0
);
expect(polygons.length).toBe(3);
expect(polygons[0].length).toBe(3);
expect(polygons[0][0]).toEqual(positions[0]);
expect(polygons[0][1]).toEqualEpsilon(
expectedIntersection1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[0][2]).toEqual(positions[4]);
expect(polygons[1].length).toBe(5);
expect(polygons[1][0]).toEqualEpsilon(
expectedIntersection1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[1][1]).toEqual(positions[1]);
expect(polygons[1][2]).toEqual(positions[2]);
expect(polygons[1][3]).toEqualEpsilon(
expectedIntersection2,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[1][4]).toEqual(positions[4]);
expect(polygons[2].length).toBe(3);
expect(polygons[2][0]).toEqualEpsilon(
expectedIntersection2,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[2][1]).toEqual(positions[3]);
expect(polygons[2][2]).toEqual(positions[4]);
@@ -323,44 +392,56 @@ describe("Core/PolygonGeometryLibrary", function () {
it("splits a negatively concave polygon with a point on the equator", function () {
const positions = Cartesian3.unpackArray([
- -3774632.0, -5136123.0, 222459.0, -3714187.0, -5173580.0, -341046.0,
- -3516544.0, -5320967.0, 0.0, -3304860.0, -5444086.0, -342567.0,
- -3277484.0, -5466977.0, 218213.0,
+ -3774632.0,
+ -5136123.0,
+ 222459.0,
+ -3714187.0,
+ -5173580.0,
+ -341046.0,
+ -3516544.0,
+ -5320967.0,
+ 0.0,
+ -3304860.0,
+ -5444086.0,
+ -342567.0,
+ -3277484.0,
+ -5466977.0,
+ 218213.0,
]);
const polygons = PolygonGeometryLibrary.splitPolygonsOnEquator(
[positions],
Ellipsoid.WGS84,
- ArcType.GEODESIC,
+ ArcType.GEODESIC
);
const expectedIntersection1 = new Cartesian3(
-3754485.468265927,
-5156013.039098039,
- 0,
+ 0
);
const expectedIntersection2 = new Cartesian3(
-3291304.258941832,
-5463327.545172482,
- 0,
+ 0
);
expect(polygons.length).toBe(3);
expect(polygons[0].length).toBe(5);
expect(polygons[0][0]).toEqual(positions[0]);
expect(polygons[0][1]).toEqualEpsilon(
expectedIntersection1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[0][2]).toEqual(positions[2]);
expect(polygons[0][3]).toEqualEpsilon(
expectedIntersection2,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[0][4]).toEqual(positions[4]);
expect(polygons[1].length).toBe(3);
expect(polygons[1][0]).toEqualEpsilon(
expectedIntersection1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[1][1]).toEqual(positions[1]);
expect(polygons[1][2]).toEqual(positions[2]);
@@ -369,41 +450,56 @@ describe("Core/PolygonGeometryLibrary", function () {
expect(polygons[2][1]).toEqual(positions[3]);
expect(polygons[2][2]).toEqualEpsilon(
expectedIntersection2,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("splits a polygon with an edge equator", function () {
const positions = Cartesian3.unpackArray([
- -3227931.0, -5469496.0, 584508.0, -3150093.0, -5488360.0, -792747.0,
- -1700622.0, -6089685.0, -835364.0, -1786389.0, -6122714.0, 0.0,
- -2593600.0, -5826977.0, 0.0, -2609132.0, -5790155.0, 584508.0,
+ -3227931.0,
+ -5469496.0,
+ 584508.0,
+ -3150093.0,
+ -5488360.0,
+ -792747.0,
+ -1700622.0,
+ -6089685.0,
+ -835364.0,
+ -1786389.0,
+ -6122714.0,
+ 0.0,
+ -2593600.0,
+ -5826977.0,
+ 0.0,
+ -2609132.0,
+ -5790155.0,
+ 584508.0,
]);
const polygons = PolygonGeometryLibrary.splitPolygonsOnEquator(
[positions],
Ellipsoid.WGS84,
- ArcType.GEODESIC,
+ ArcType.GEODESIC
);
const expectedIntersection = new Cartesian3(
-3213523.577073882,
-5509437.159126084,
- 0,
+ 0
);
expect(polygons.length).toBe(2);
expect(polygons[0].length).toBe(4);
expect(polygons[0][0]).toEqual(positions[0]);
expect(polygons[0][1]).toEqualEpsilon(
expectedIntersection,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[0][2]).toEqual(positions[4]);
expect(polygons[0][3]).toEqual(positions[5]);
expect(polygons[1].length).toBe(5);
expect(polygons[1][0]).toEqualEpsilon(
expectedIntersection,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[1][1]).toEqual(positions[1]);
expect(polygons[1][2]).toEqual(positions[2]);
@@ -413,21 +509,36 @@ describe("Core/PolygonGeometryLibrary", function () {
it("splits a polygon with a backtracking edge on the equator", function () {
const positions = Cartesian3.unpackArray([
- -3491307.0, -5296123.0, 650596.0, -3495031.0, -5334507.0, 0.0,
- -4333607.0, -4677312.0, 0.0, -4275491.0, -4629182.0, -968553.0,
- -2403691.0, -5827997.0, -943662.0, -2484409.0, -5837281.0, 631344.0,
+ -3491307.0,
+ -5296123.0,
+ 650596.0,
+ -3495031.0,
+ -5334507.0,
+ 0.0,
+ -4333607.0,
+ -4677312.0,
+ 0.0,
+ -4275491.0,
+ -4629182.0,
+ -968553.0,
+ -2403691.0,
+ -5827997.0,
+ -943662.0,
+ -2484409.0,
+ -5837281.0,
+ 631344.0,
]);
const polygons = PolygonGeometryLibrary.splitPolygonsOnEquator(
[positions],
Ellipsoid.WGS84,
- ArcType.GEODESIC,
+ ArcType.GEODESIC
);
const expectedIntersection = new Cartesian3(
-2471499.3842933537,
-5879823.32933623,
- 0,
+ 0
);
expect(polygons.length).toBe(2);
expect(polygons[0].length).toBe(4);
@@ -435,7 +546,7 @@ describe("Core/PolygonGeometryLibrary", function () {
expect(polygons[0][1]).toEqual(positions[1]);
expect(polygons[0][2]).toEqualEpsilon(
expectedIntersection,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[0][3]).toEqual(positions[5]);
expect(polygons[1].length).toBe(5);
@@ -445,113 +556,140 @@ describe("Core/PolygonGeometryLibrary", function () {
expect(polygons[1][3]).toEqual(positions[4]);
expect(polygons[1][4]).toEqualEpsilon(
expectedIntersection,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("splits a simple rhumb polygon at the equator", function () {
const positions = Cartesian3.unpackArray([
- 3813220.0, -5085291.0, 527179.0, 3701301.0, -5097773.0, -993503.0,
- 5037375.0, -3776794.0, -1017021.0, 5049166.0, -3865306.0, 494270.0,
+ 3813220.0,
+ -5085291.0,
+ 527179.0,
+ 3701301.0,
+ -5097773.0,
+ -993503.0,
+ 5037375.0,
+ -3776794.0,
+ -1017021.0,
+ 5049166.0,
+ -3865306.0,
+ 494270.0,
]);
const polygons = PolygonGeometryLibrary.splitPolygonsOnEquator(
[positions],
Ellipsoid.WGS84,
- ArcType.RHUMB,
+ ArcType.RHUMB
);
const expectedIntersection1 = new Cartesian3(
3799205.595277112,
-5123150.245267465,
- 0.0,
+ 0.0
);
const expectedIntersection2 = new Cartesian3(
5077127.456540122,
-3860493.2820580625,
- 0.0,
+ 0.0
);
expect(polygons.length).toBe(2);
expect(polygons[0].length).toBe(4);
expect(polygons[0][0]).toEqual(positions[0]);
expect(polygons[0][1]).toEqualEpsilon(
expectedIntersection1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[0][2]).toEqualEpsilon(
expectedIntersection2,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[0][3]).toEqual(positions[3]);
expect(polygons[1].length).toBe(4);
expect(polygons[1][0]).toEqualEpsilon(
expectedIntersection1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[1][1]).toEqual(positions[1]);
expect(polygons[1][2]).toEqual(positions[2]);
expect(polygons[1][3]).toEqualEpsilon(
expectedIntersection2,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("splits a simple rhumb polygon at the equator across the IDL", function () {
const positions = Cartesian3.fromDegreesArray([
- 30, -30, 20, 30, -20, 30, -30, -30,
+ 30,
+ -30,
+ 20,
+ 30,
+ -20,
+ 30,
+ -30,
+ -30,
]);
const polygons = PolygonGeometryLibrary.splitPolygonsOnEquator(
[positions],
Ellipsoid.WGS84,
- ArcType.RHUMB,
+ ArcType.RHUMB
);
const expectedIntersection1 = new Cartesian3(
5780555.229886577,
2695517.1720840395,
- 0.0,
+ 0.0
);
const expectedIntersection2 = new Cartesian3(
5780555.229886577,
-2695517.1720840395,
- 0.0,
+ 0.0
);
expect(polygons.length).toBe(2);
expect(polygons[0].length).toBe(4);
expect(polygons[0][0]).toEqual(positions[0]);
expect(polygons[0][1]).toEqualEpsilon(
expectedIntersection1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[0][2]).toEqualEpsilon(
expectedIntersection2,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[0][3]).toEqual(positions[3]);
expect(polygons[1].length).toBe(4);
expect(polygons[1][0]).toEqualEpsilon(
expectedIntersection1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polygons[1][1]).toEqual(positions[1]);
expect(polygons[1][2]).toEqual(positions[2]);
expect(polygons[1][3]).toEqualEpsilon(
expectedIntersection2,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("splits an array of polygons", function () {
const positions = Cartesian3.unpackArray([
- 3813220.0, -5085291.0, 527179.0, 3701301.0, -5097773.0, -993503.0,
- 5037375.0, -3776794.0, -1017021.0, 5049166.0, -3865306.0, 494270.0,
+ 3813220.0,
+ -5085291.0,
+ 527179.0,
+ 3701301.0,
+ -5097773.0,
+ -993503.0,
+ 5037375.0,
+ -3776794.0,
+ -1017021.0,
+ 5049166.0,
+ -3865306.0,
+ 494270.0,
]);
const polygons = PolygonGeometryLibrary.splitPolygonsOnEquator(
[positions, positions],
Ellipsoid.WGS84,
- ArcType.GEODESIC,
+ ArcType.GEODESIC
);
expect(polygons.length).toBe(4);
diff --git a/packages/engine/Specs/Core/PolygonGeometrySpec.js b/packages/engine/Specs/Core/PolygonGeometrySpec.js
index e47cbd9605a2..14d51ec71915 100644
--- a/packages/engine/Specs/Core/PolygonGeometrySpec.js
+++ b/packages/engine/Specs/Core/PolygonGeometrySpec.js
@@ -42,8 +42,8 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.createGeometry(
PolygonGeometry.fromPositions({
positions: [new Cartesian3()],
- }),
- ),
+ })
+ )
).toBeUndefined();
});
@@ -54,8 +54,8 @@ describe("Core/PolygonGeometry", function () {
polygonHierarchy: {
positions: [Cartesian3.fromDegrees(0, 0)],
},
- }),
- ),
+ })
+ )
).toBeUndefined();
});
@@ -76,7 +76,7 @@ describe("Core/PolygonGeometry", function () {
const geometry = PolygonGeometry.createGeometry(
PolygonGeometry.fromPositions({
positions: Cartesian3.fromDegreesArray([0.0, 0.0, 0.0, 0.0, 0.0, 0.0]),
- }),
+ })
);
expect(geometry).toBeUndefined();
});
@@ -86,7 +86,7 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.fromPositions({
positions: Cartesian3.fromDegreesArray([0.0, 0.0, 0.0, 0.0, 0.0, 0.0]),
extrudedHeight: 2,
- }),
+ })
);
expect(geometry).toBeUndefined();
});
@@ -97,14 +97,19 @@ describe("Core/PolygonGeometry", function () {
holes: [
{
positions: Cartesian3.fromDegreesArray([
- 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
]),
},
],
};
const geometry = PolygonGeometry.createGeometry(
- new PolygonGeometry({ polygonHierarchy: hierarchy }),
+ new PolygonGeometry({ polygonHierarchy: hierarchy })
);
expect(geometry).toBeUndefined();
});
@@ -112,19 +117,35 @@ describe("Core/PolygonGeometry", function () {
it("createGeometry returns undefined due to duplicate hierarchy positions with different heights", function () {
const hierarchy = {
positions: Cartesian3.fromDegreesArrayHeights([
- 1.0, 1.0, 10.0, 1.0, 1.0, 20.0, 1.0, 1.0, 30.0,
+ 1.0,
+ 1.0,
+ 10.0,
+ 1.0,
+ 1.0,
+ 20.0,
+ 1.0,
+ 1.0,
+ 30.0,
]),
holes: [
{
positions: Cartesian3.fromDegreesArrayHeights([
- 0.0, 0.0, 10.0, 0.0, 0.0, 20.0, 0.0, 0.0, 30.0,
+ 0.0,
+ 0.0,
+ 10.0,
+ 0.0,
+ 0.0,
+ 20.0,
+ 0.0,
+ 0.0,
+ 30.0,
]),
},
],
};
const geometry = PolygonGeometry.createGeometry(
- new PolygonGeometry({ polygonHierarchy: hierarchy }),
+ new PolygonGeometry({ polygonHierarchy: hierarchy })
);
expect(geometry).toBeUndefined();
});
@@ -132,12 +153,28 @@ describe("Core/PolygonGeometry", function () {
it("createGeometry returns geometry if duplicate hierarchy positions with different heights and perPositionHeight is true", function () {
const hierarchy = {
positions: Cartesian3.fromDegreesArrayHeights([
- 1.0, 1.0, 10.0, 1.0, 1.0, 20.0, 1.0, 1.0, 30.0,
+ 1.0,
+ 1.0,
+ 10.0,
+ 1.0,
+ 1.0,
+ 20.0,
+ 1.0,
+ 1.0,
+ 30.0,
]),
holes: [
{
positions: Cartesian3.fromDegreesArrayHeights([
- 0.0, 0.0, 10.0, 0.0, 0.0, 20.0, 0.0, 0.0, 30.0,
+ 0.0,
+ 0.0,
+ 10.0,
+ 0.0,
+ 0.0,
+ 20.0,
+ 0.0,
+ 0.0,
+ 30.0,
]),
},
],
@@ -147,7 +184,7 @@ describe("Core/PolygonGeometry", function () {
new PolygonGeometry({
polygonHierarchy: hierarchy,
perPositionHeight: true,
- }),
+ })
);
expect(geometry).toBeDefined();
});
@@ -157,10 +194,17 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.fromPositions({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
granularity: CesiumMath.RADIANS_PER_DEGREE,
- }),
+ })
);
expect(p.attributes.position.values.length).toEqual(13 * 3); // 8 around edge + 5 in the middle
@@ -188,18 +232,18 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.fromPositions({
positions: positions,
perPositionHeight: true,
- }),
+ })
);
expect(
ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(p.attributes.position.values, 0),
- ).height,
+ Cartesian3.fromArray(p.attributes.position.values, 0)
+ ).height
).toEqualEpsilon(height, CesiumMath.EPSILON6);
expect(
ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(p.attributes.position.values, 3),
- ).height,
+ Cartesian3.fromArray(p.attributes.position.values, 3)
+ ).height
).toEqualEpsilon(0, CesiumMath.EPSILON6);
});
@@ -208,11 +252,18 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.fromPositions({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
granularity: CesiumMath.RADIANS_PER_DEGREE,
arcType: ArcType.RHUMB,
- }),
+ })
);
expect(p.attributes.position.values.length).toEqual(15 * 3); // 8 around edge + 7 in the middle
@@ -225,18 +276,32 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.fromPositions({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
granularity: CesiumMath.RADIANS_PER_DEGREE,
arcType: ArcType.NONE,
- }),
+ })
);
}).toThrowDeveloperError();
});
it("create geometry creates with lines with different number of subdivisions for geodesic and rhumb", function () {
const positions = Cartesian3.fromDegreesArray([
- -30.0, -30.0, 30.0, -30.0, 30.0, 30.0, -30.0, 30.0,
+ -30.0,
+ -30.0,
+ 30.0,
+ -30.0,
+ 30.0,
+ 30.0,
+ -30.0,
+ 30.0,
]);
const geodesic = PolygonGeometry.createGeometry(
PolygonGeometry.fromPositions({
@@ -244,7 +309,7 @@ describe("Core/PolygonGeometry", function () {
positions: positions,
granularity: CesiumMath.RADIANS_PER_DEGREE,
arcType: ArcType.GEODESIC,
- }),
+ })
);
const rhumb = PolygonGeometry.createGeometry(
PolygonGeometry.fromPositions({
@@ -252,11 +317,11 @@ describe("Core/PolygonGeometry", function () {
positions: positions,
granularity: CesiumMath.RADIANS_PER_DEGREE,
arcType: ArcType.RHUMB,
- }),
+ })
);
expect(geodesic.attributes.position.values.length).not.toEqual(
- rhumb.attributes.position.values.length,
+ rhumb.attributes.position.values.length
);
expect(geodesic.indices.length).not.toEqual(rhumb.indices.length);
});
@@ -283,18 +348,18 @@ describe("Core/PolygonGeometry", function () {
positions: positions,
perPositionHeight: true,
arcType: ArcType.RHUMB,
- }),
+ })
);
expect(
ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(p.attributes.position.values, 0),
- ).height,
+ Cartesian3.fromArray(p.attributes.position.values, 0)
+ ).height
).toEqualEpsilon(height, CesiumMath.EPSILON6);
expect(
ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(p.attributes.position.values, 3),
- ).height,
+ Cartesian3.fromArray(p.attributes.position.values, 3)
+ ).height
).toEqualEpsilon(0, CesiumMath.EPSILON6);
});
@@ -303,9 +368,16 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.fromPositions({
vertexFormat: VertexFormat.ALL,
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
- }),
+ })
);
const numVertices = 13;
@@ -321,17 +393,38 @@ describe("Core/PolygonGeometry", function () {
it("creates a polygon from hierarchy", function () {
const hierarchy = {
positions: Cartesian3.fromDegreesArray([
- -124.0, 35.0, -110.0, 35.0, -110.0, 40.0, -124.0, 40.0,
+ -124.0,
+ 35.0,
+ -110.0,
+ 35.0,
+ -110.0,
+ 40.0,
+ -124.0,
+ 40.0,
]),
holes: [
{
positions: Cartesian3.fromDegreesArray([
- -122.0, 36.0, -122.0, 39.0, -112.0, 39.0, -112.0, 36.0,
+ -122.0,
+ 36.0,
+ -122.0,
+ 39.0,
+ -112.0,
+ 39.0,
+ -112.0,
+ 36.0,
]),
holes: [
{
positions: Cartesian3.fromDegreesArray([
- -120.0, 36.5, -114.0, 36.5, -114.0, 38.5, -120.0, 38.5,
+ -120.0,
+ 36.5,
+ -114.0,
+ 36.5,
+ -114.0,
+ 38.5,
+ -120.0,
+ 38.5,
]),
},
],
@@ -344,7 +437,7 @@ describe("Core/PolygonGeometry", function () {
vertexFormat: VertexFormat.POSITION_ONLY,
polygonHierarchy: hierarchy,
granularity: CesiumMath.PI_OVER_THREE,
- }),
+ })
);
expect(p.attributes.position.values.length).toEqual(12 * 3); // 4 points * 3 rectangles
@@ -354,17 +447,38 @@ describe("Core/PolygonGeometry", function () {
it("creates a polygon from hierarchy with rhumb lines", function () {
const hierarchy = {
positions: Cartesian3.fromDegreesArray([
- -124.0, 35.0, -110.0, 35.0, -110.0, 40.0, -124.0, 40.0,
+ -124.0,
+ 35.0,
+ -110.0,
+ 35.0,
+ -110.0,
+ 40.0,
+ -124.0,
+ 40.0,
]),
holes: [
{
positions: Cartesian3.fromDegreesArray([
- -122.0, 36.0, -122.0, 39.0, -112.0, 39.0, -112.0, 36.0,
+ -122.0,
+ 36.0,
+ -122.0,
+ 39.0,
+ -112.0,
+ 39.0,
+ -112.0,
+ 36.0,
]),
holes: [
{
positions: Cartesian3.fromDegreesArray([
- -120.0, 36.5, -114.0, 36.5, -114.0, 38.5, -120.0, 38.5,
+ -120.0,
+ 36.5,
+ -114.0,
+ 36.5,
+ -114.0,
+ 38.5,
+ -120.0,
+ 38.5,
]),
},
],
@@ -378,7 +492,7 @@ describe("Core/PolygonGeometry", function () {
polygonHierarchy: hierarchy,
granularity: CesiumMath.PI_OVER_THREE,
arcType: ArcType.RHUMB,
- }),
+ })
);
expect(p.attributes.position.values.length).toEqual(12 * 3); // 4 points * 3 rectangles
@@ -388,18 +502,43 @@ describe("Core/PolygonGeometry", function () {
it("removes duplicates in polygon hierarchy", function () {
const hierarchy = {
positions: Cartesian3.fromDegreesArray([
- -124.0, 35.0, -110.0, 35.0, -110.0, 35.0, -110.0, 40.0, -124.0, 40.0,
+ -124.0,
+ 35.0,
+ -110.0,
+ 35.0,
+ -110.0,
+ 35.0,
+ -110.0,
+ 40.0,
+ -124.0,
+ 40.0,
]),
holes: [
{
positions: Cartesian3.fromDegreesArray([
- -122.0, 36.0, -122.0, 39.0, -122.0, 39.0, -112.0, 39.0, -112.0,
+ -122.0,
+ 36.0,
+ -122.0,
+ 39.0,
+ -122.0,
+ 39.0,
+ -112.0,
+ 39.0,
+ -112.0,
36.0,
]),
holes: [
{
positions: Cartesian3.fromDegreesArray([
- -120.0, 36.5, -114.0, 36.5, -114.0, 36.5, -114.0, 38.5, -120.0,
+ -120.0,
+ 36.5,
+ -114.0,
+ 36.5,
+ -114.0,
+ 36.5,
+ -114.0,
+ 38.5,
+ -120.0,
38.5,
]),
},
@@ -413,7 +552,7 @@ describe("Core/PolygonGeometry", function () {
vertexFormat: VertexFormat.POSITION_ONLY,
polygonHierarchy: hierarchy,
granularity: CesiumMath.PI_OVER_THREE,
- }),
+ })
);
expect(p.attributes.position.values.length).toEqual(12 * 3);
@@ -423,17 +562,38 @@ describe("Core/PolygonGeometry", function () {
it("creates a polygon from clockwise hierarchy", function () {
const hierarchy = {
positions: Cartesian3.fromDegreesArray([
- -124.0, 35.0, -124.0, 40.0, -110.0, 40.0, -110.0, 35.0,
+ -124.0,
+ 35.0,
+ -124.0,
+ 40.0,
+ -110.0,
+ 40.0,
+ -110.0,
+ 35.0,
]),
holes: [
{
positions: Cartesian3.fromDegreesArray([
- -122.0, 36.0, -112.0, 36.0, -112.0, 39.0, -122.0, 39.0,
+ -122.0,
+ 36.0,
+ -112.0,
+ 36.0,
+ -112.0,
+ 39.0,
+ -122.0,
+ 39.0,
]),
holes: [
{
positions: Cartesian3.fromDegreesArray([
- -120.0, 36.5, -120.0, 38.5, -114.0, 38.5, -114.0, 36.5,
+ -120.0,
+ 36.5,
+ -120.0,
+ 38.5,
+ -114.0,
+ 38.5,
+ -114.0,
+ 36.5,
]),
},
],
@@ -446,7 +606,7 @@ describe("Core/PolygonGeometry", function () {
vertexFormat: VertexFormat.POSITION_ONLY,
polygonHierarchy: hierarchy,
granularity: CesiumMath.PI_OVER_THREE,
- }),
+ })
);
expect(p.attributes.position.values.length).toEqual(12 * 3);
@@ -455,13 +615,34 @@ describe("Core/PolygonGeometry", function () {
it("doesn't reverse clockwise input array", function () {
const p = Cartesian3.fromDegreesArray([
- -124.0, 35.0, -124.0, 40.0, -110.0, 40.0, -110.0, 35.0,
+ -124.0,
+ 35.0,
+ -124.0,
+ 40.0,
+ -110.0,
+ 40.0,
+ -110.0,
+ 35.0,
]);
const h1 = Cartesian3.fromDegreesArray([
- -122.0, 36.0, -112.0, 36.0, -112.0, 39.0, -122.0, 39.0,
+ -122.0,
+ 36.0,
+ -112.0,
+ 36.0,
+ -112.0,
+ 39.0,
+ -122.0,
+ 39.0,
]);
const h2 = Cartesian3.fromDegreesArray([
- -120.0, 36.5, -120.0, 38.5, -114.0, 38.5, -114.0, 36.5,
+ -120.0,
+ 36.5,
+ -120.0,
+ 38.5,
+ -114.0,
+ 38.5,
+ -114.0,
+ 36.5,
]);
const hierarchy = {
positions: p,
@@ -482,26 +663,47 @@ describe("Core/PolygonGeometry", function () {
vertexFormat: VertexFormat.POSITION_ONLY,
polygonHierarchy: hierarchy,
granularity: CesiumMath.PI_OVER_THREE,
- }),
+ })
);
let i;
const pExpected = Cartesian3.fromDegreesArray([
- -124.0, 35.0, -124.0, 40.0, -110.0, 40.0, -110.0, 35.0,
+ -124.0,
+ 35.0,
+ -124.0,
+ 40.0,
+ -110.0,
+ 40.0,
+ -110.0,
+ 35.0,
]);
for (i = 0; i < p.length; i++) {
expect(p[i]).toEqualEpsilon(pExpected[i], CesiumMath.EPSILON7);
}
const h1Expected = Cartesian3.fromDegreesArray([
- -122.0, 36.0, -112.0, 36.0, -112.0, 39.0, -122.0, 39.0,
+ -122.0,
+ 36.0,
+ -112.0,
+ 36.0,
+ -112.0,
+ 39.0,
+ -122.0,
+ 39.0,
]);
for (i = 0; i < h1.length; i++) {
expect(h1[i]).toEqualEpsilon(h1Expected[i], CesiumMath.EPSILON7);
}
const h2Expected = Cartesian3.fromDegreesArray([
- -120.0, 36.5, -120.0, 38.5, -114.0, 38.5, -114.0, 36.5,
+ -120.0,
+ 36.5,
+ -120.0,
+ 38.5,
+ -114.0,
+ 38.5,
+ -114.0,
+ 36.5,
]);
for (i = 0; i < h2.length; i++) {
expect(h2[i]).toEqualEpsilon(h2Expected[i], CesiumMath.EPSILON7);
@@ -513,27 +715,41 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.fromPositions({
vertexFormat: VertexFormat.ALL,
positions: Cartesian3.fromDegreesArray([
- -108.0, 1.0, -108.0, -1.0, -106.0, -1.0, -106.0, 1.0,
+ -108.0,
+ 1.0,
+ -108.0,
+ -1.0,
+ -106.0,
+ -1.0,
+ -106.0,
+ 1.0,
]),
granularity: CesiumMath.PI_OVER_THREE,
- }),
+ })
);
const bs = BoundingSphere.fromVertices(p.attributes.position.values);
expect(p.boundingSphere.center).toEqualEpsilon(
bs.center,
- CesiumMath.EPSILON9,
+ CesiumMath.EPSILON9
);
expect(p.boundingSphere.radius).toEqualEpsilon(
bs.radius,
- CesiumMath.EPSILON9,
+ CesiumMath.EPSILON9
);
});
it("computes correct bounding sphere at height >>> 0", function () {
const height = 40000000.0;
const positions = Cartesian3.fromDegreesArray([
- -108.0, 1.0, -108.0, -1.0, -106.0, -1.0, -106.0, 1.0,
+ -108.0,
+ 1.0,
+ -108.0,
+ -1.0,
+ -106.0,
+ -1.0,
+ -106.0,
+ 1.0,
]);
const p = PolygonGeometry.createGeometry(
@@ -541,7 +757,7 @@ describe("Core/PolygonGeometry", function () {
vertexFormat: VertexFormat.POSITIONS_ONLY,
positions: positions,
height: height,
- }),
+ })
);
const bs = BoundingSphere.fromPoints(
@@ -558,7 +774,7 @@ describe("Core/PolygonGeometry", function () {
-106.0,
1.0,
height,
- ]),
+ ])
);
expect(Math.abs(p.boundingSphere.radius - bs.radius)).toBeLessThan(100.0);
});
@@ -568,10 +784,17 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.fromPositions({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
extrudedHeight: 30000,
- }),
+ })
);
const numVertices = 50; // 13 top + 13 bottom + 8 top edge + 8 bottom edge + 4 top corner + 4 bottom corner
@@ -585,11 +808,18 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.fromPositions({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
extrudedHeight: 30000,
closeTop: false,
- }),
+ })
);
const numVertices = 37; // 13 bottom + 8 top edge + 8 bottom edge + 4 top corner + 4 bottom corner
@@ -603,11 +833,18 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.fromPositions({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
extrudedHeight: 30000,
closeBottom: false,
- }),
+ })
);
const numVertices = 37; // 13 top + 8 top edge + 8 bottom edge + 4 top corner + 4 bottom corner
@@ -621,12 +858,19 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.fromPositions({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
extrudedHeight: 30000,
closeTop: false,
closeBottom: false,
- }),
+ })
);
const numVertices = 24; // 8 top edge + 8 bottom edge + 4 top corner + 4 bottom corner
@@ -640,11 +884,18 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.fromPositions({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
granularity: CesiumMath.RADIANS_PER_DEGREE,
offsetAttribute: GeometryOffsetAttribute.TOP,
- }),
+ })
);
const numVertices = 13;
@@ -661,11 +912,18 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.fromPositions({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
extrudedHeight: 30000,
offsetAttribute: GeometryOffsetAttribute.TOP,
- }),
+ })
);
const numVertices = 50;
@@ -685,12 +943,19 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.fromPositions({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
extrudedHeight: 30000,
closeTop: false,
offsetAttribute: GeometryOffsetAttribute.TOP,
- }),
+ })
);
const numVertices = 37; // 13 bottom + 8 top edge + 8 bottom edge + 4 top corner + 4 bottom corner
@@ -707,12 +972,19 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.fromPositions({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
extrudedHeight: 30000,
closeBottom: false,
offsetAttribute: GeometryOffsetAttribute.TOP,
- }),
+ })
);
const numVertices = 37;
@@ -729,13 +1001,20 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.fromPositions({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
extrudedHeight: 30000,
closeTop: false,
closeBottom: false,
offsetAttribute: GeometryOffsetAttribute.TOP,
- }),
+ })
);
const numVertices = 24;
@@ -752,11 +1031,18 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.fromPositions({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
extrudedHeight: 30000,
offsetAttribute: GeometryOffsetAttribute.ALL,
- }),
+ })
);
const numVertices = 50;
@@ -773,12 +1059,19 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.fromPositions({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
extrudedHeight: 30000,
closeTop: false,
offsetAttribute: GeometryOffsetAttribute.ALL,
- }),
+ })
);
const numVertices = 37; // 13 bottom + 8 top edge + 8 bottom edge + 4 top corner + 4 bottom corner
@@ -795,12 +1088,19 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.fromPositions({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
extrudedHeight: 30000,
closeBottom: false,
offsetAttribute: GeometryOffsetAttribute.ALL,
- }),
+ })
);
const numVertices = 37;
@@ -817,13 +1117,20 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.fromPositions({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
extrudedHeight: 30000,
closeTop: false,
closeBottom: false,
offsetAttribute: GeometryOffsetAttribute.ALL,
- }),
+ })
);
const numVertices = 24;
@@ -840,10 +1147,19 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.fromPositions({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ -1.0,
]),
extrudedHeight: 30000,
- }),
+ })
);
expect(p.attributes.position.values.length).toEqual(50 * 3);
@@ -855,11 +1171,18 @@ describe("Core/PolygonGeometry", function () {
PolygonGeometry.fromPositions({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
height: 0,
extrudedHeight: CesiumMath.EPSILON7,
- }),
+ })
);
expect(p.attributes.position.values.length).toEqual(13 * 3);
@@ -872,11 +1195,18 @@ describe("Core/PolygonGeometry", function () {
vertexFormat: VertexFormat.ALL,
polygonHierarchy: {
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
},
extrudedHeight: 30000,
- }),
+ })
);
const numVertices = 50;
@@ -895,12 +1225,19 @@ describe("Core/PolygonGeometry", function () {
vertexFormat: VertexFormat.POSITION_AND_ST,
polygonHierarchy: {
positions: Cartesian3.fromDegreesArray([
- -100.5, 30.0, -100.0, 30.0, -100.0, 30.5, -100.5, 30.5,
+ -100.5,
+ 30.0,
+ -100.0,
+ 30.0,
+ -100.0,
+ 30.5,
+ -100.5,
+ 30.5,
]),
},
height: 150000,
granularity: CesiumMath.PI,
- }),
+ })
);
const st = p.attributes.st.values;
@@ -916,12 +1253,22 @@ describe("Core/PolygonGeometry", function () {
vertexFormat: VertexFormat.POSITION_AND_ST,
polygonHierarchy: {
positions: Cartesian3.fromDegreesArrayHeights([
- -100.5, 30.0, 92, -100.0, 30.0, 92, -100.0, 30.5, 92, -100.5, 30.5,
+ -100.5,
+ 30.0,
+ 92,
+ -100.0,
+ 30.0,
+ 92,
+ -100.0,
+ 30.5,
+ 92,
+ -100.5,
+ 30.5,
92,
]),
},
granularity: CesiumMath.PI,
- }),
+ })
);
const st = p.attributes.st.values;
@@ -945,13 +1292,20 @@ describe("Core/PolygonGeometry", function () {
vertexFormat: VertexFormat.POSITION_AND_ST,
polygonHierarchy: {
positions: Cartesian3.fromDegreesArray([
- -100.5, 30.0, -100.0, 30.0, -100.0, 30.5, -100.5, 30.5,
+ -100.5,
+ 30.0,
+ -100.0,
+ 30.0,
+ -100.0,
+ 30.5,
+ -100.5,
+ 30.5,
]),
},
textureCoordinates: textureCoordinates,
height: 150000,
granularity: CesiumMath.PI,
- }),
+ })
);
const st = p.attributes.st.values;
@@ -964,17 +1318,38 @@ describe("Core/PolygonGeometry", function () {
it("creates a polygon from hierarchy extruded", function () {
const hierarchy = {
positions: Cartesian3.fromDegreesArray([
- -124.0, 35.0, -110.0, 35.0, -110.0, 40.0, -124.0, 40.0,
+ -124.0,
+ 35.0,
+ -110.0,
+ 35.0,
+ -110.0,
+ 40.0,
+ -124.0,
+ 40.0,
]),
holes: [
{
positions: Cartesian3.fromDegreesArray([
- -122.0, 36.0, -122.0, 39.0, -112.0, 39.0, -112.0, 36.0,
+ -122.0,
+ 36.0,
+ -122.0,
+ 39.0,
+ -112.0,
+ 39.0,
+ -112.0,
+ 36.0,
]),
holes: [
{
positions: Cartesian3.fromDegreesArray([
- -120.0, 36.5, -114.0, 36.5, -114.0, 38.5, -120.0, 38.5,
+ -120.0,
+ 36.5,
+ -114.0,
+ 36.5,
+ -114.0,
+ 38.5,
+ -120.0,
+ 38.5,
]),
},
],
@@ -988,7 +1363,7 @@ describe("Core/PolygonGeometry", function () {
polygonHierarchy: hierarchy,
granularity: CesiumMath.PI_OVER_THREE,
extrudedHeight: 30000,
- }),
+ })
);
// (4 points * 3 rectangles * 3 to duplicate for normals) * 2 for top and bottom
@@ -1014,24 +1389,24 @@ describe("Core/PolygonGeometry", function () {
new Cartesian3(
1333485.211963876,
-4654510.505548239,
- 4138557.5850382405,
+ 4138557.5850382405
),
new Cartesian3(
1333441.3994441305,
-4654261.147368878,
- 4138322.784348336,
+ 4138322.784348336
),
new Cartesian3(
1333521.9333286814,
-4654490.298890729,
- 4138567.564118971,
+ 4138567.564118971
),
],
extrudedHeight: 56,
vertexFormat: VertexFormat.POSITION_AND_NORMAL,
perPositionHeight: true,
closeBottom: false,
- }),
+ })
);
const normals = geometry.attributes.normal.values;
@@ -1045,7 +1420,7 @@ describe("Core/PolygonGeometry", function () {
!CesiumMath.equalsEpsilon(
normals[i],
expectedNormals[i],
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
)
) {
notEqualCount++;
@@ -1059,7 +1434,18 @@ describe("Core/PolygonGeometry", function () {
it("computes geometry with position only vertex format with perPositionHeight and extrudedHeight", function () {
const positions = Cartesian3.fromDegreesArrayHeights([
- -1.0, -1.0, 100.0, 1.0, -1.0, 0.0, 1.0, 1.0, 100.0, -1.0, 1.0, 0.0,
+ -1.0,
+ -1.0,
+ 100.0,
+ 1.0,
+ -1.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 100.0,
+ -1.0,
+ 1.0,
+ 0.0,
]);
const geometry = PolygonGeometry.createGeometry(
PolygonGeometry.fromPositions({
@@ -1067,7 +1453,7 @@ describe("Core/PolygonGeometry", function () {
extrudedHeight: 0,
vertexFormat: VertexFormat.POSITION_ONLY,
perPositionHeight: true,
- }),
+ })
);
expect(geometry).toBeDefined();
expect(geometry.attributes.position).toBeDefined();
@@ -1076,9 +1462,15 @@ describe("Core/PolygonGeometry", function () {
it("does not include indices for extruded walls that are too small", function () {
const positions = Cartesian3.fromDegreesArray([
- 7.757161063097392, 48.568676799636634, 7.753968290229146,
- 48.571796467099077, 7.755340073906587, 48.571948854067948,
- 7.756263393414589, 48.571947951609708, 7.756894446412183,
+ 7.757161063097392,
+ 48.568676799636634,
+ 7.753968290229146,
+ 48.571796467099077,
+ 7.755340073906587,
+ 48.571948854067948,
+ 7.756263393414589,
+ 48.571947951609708,
+ 7.756894446412183,
48.569396703043992,
]);
@@ -1090,7 +1482,7 @@ describe("Core/PolygonGeometry", function () {
closeTop: false,
closeBottom: false,
arcType: ArcType.RHUMB,
- }),
+ })
);
let numVertices = 20;
@@ -1106,13 +1498,13 @@ describe("Core/PolygonGeometry", function () {
closeTop: false,
closeBottom: false,
arcType: ArcType.GEODESIC,
- }),
+ })
);
numVertices = 20;
numTriangles = 10;
expect(pGeodesic.attributes.position.values.length).toEqual(
- numVertices * 3,
+ numVertices * 3
);
expect(pGeodesic.indices.length).toEqual(numTriangles * 3);
});
@@ -1122,7 +1514,17 @@ describe("Core/PolygonGeometry", function () {
vertexFormat: VertexFormat.POSITION_AND_ST,
polygonHierarchy: {
positions: Cartesian3.fromDegreesArrayHeights([
- -100.5, 30.0, 92, -100.0, 30.0, 92, -100.0, 30.5, 92, -100.5, 30.5,
+ -100.5,
+ 30.0,
+ 92,
+ -100.0,
+ 30.0,
+ 92,
+ -100.0,
+ 30.5,
+ 92,
+ -100.5,
+ 30.5,
92,
]),
},
@@ -1134,15 +1536,15 @@ describe("Core/PolygonGeometry", function () {
expect(CesiumMath.toDegrees(r.north)).toBeLessThan(30.5999);
expect(CesiumMath.toDegrees(r.south)).toEqualEpsilon(
30.0,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
expect(CesiumMath.toDegrees(r.east)).toEqualEpsilon(
-100.0,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
expect(CesiumMath.toDegrees(r.west)).toEqualEpsilon(
-100.5,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
});
@@ -1151,7 +1553,18 @@ describe("Core/PolygonGeometry", function () {
vertexFormat: VertexFormat.POSITION_AND_ST,
polygonHierarchy: {
positions: Cartesian3.fromDegreesArrayHeights([
- -90.0, 30.0, 0, -80.0, 30.0, 0, -80.0, 40.0, 0, -90.0, 40.0, 0,
+ -90.0,
+ 30.0,
+ 0,
+ -80.0,
+ 30.0,
+ 0,
+ -80.0,
+ 40.0,
+ 0,
+ -90.0,
+ 40.0,
+ 0,
]),
},
granularity: CesiumMath.RADIANS_PER_DEGREE,
@@ -1162,22 +1575,33 @@ describe("Core/PolygonGeometry", function () {
expect(CesiumMath.toDegrees(boundingGeodesic.north)).toBeGreaterThan(40.0);
expect(CesiumMath.toDegrees(boundingGeodesic.south)).toEqualEpsilon(
30.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(CesiumMath.toDegrees(boundingGeodesic.east)).toEqualEpsilon(
-80.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(CesiumMath.toDegrees(boundingGeodesic.west)).toEqualEpsilon(
-90.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
const pRhumb = new PolygonGeometry({
vertexFormat: VertexFormat.POSITION_AND_ST,
polygonHierarchy: {
positions: Cartesian3.fromDegreesArrayHeights([
- -90.0, 30.0, 0, -80.0, 30.0, 0, -80.0, 40.0, 0, -90.0, 40.0, 0,
+ -90.0,
+ 30.0,
+ 0,
+ -80.0,
+ 30.0,
+ 0,
+ -80.0,
+ 40.0,
+ 0,
+ -90.0,
+ 40.0,
+ 0,
]),
},
granularity: CesiumMath.RADIANS_PER_DEGREE,
@@ -1187,19 +1611,19 @@ describe("Core/PolygonGeometry", function () {
const boundingRhumb = pRhumb.rectangle;
expect(CesiumMath.toDegrees(boundingRhumb.north)).toEqualEpsilon(
40.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(CesiumMath.toDegrees(boundingRhumb.south)).toEqualEpsilon(
30.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(CesiumMath.toDegrees(boundingRhumb.east)).toEqualEpsilon(
-80.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(CesiumMath.toDegrees(boundingRhumb.west)).toEqualEpsilon(
-90.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -1208,7 +1632,14 @@ describe("Core/PolygonGeometry", function () {
vertexFormat: VertexFormat.POSITION_AND_ST,
polygonHierarchy: {
positions: Cartesian3.fromDegreesArray([
- 175, 30, -170, 30, -170, 40, 175, 40,
+ 175,
+ 30,
+ -170,
+ 30,
+ -170,
+ 40,
+ 175,
+ 40,
]),
},
granularity: CesiumMath.RADIANS_PER_DEGREE,
@@ -1218,19 +1649,19 @@ describe("Core/PolygonGeometry", function () {
const boundingRhumb = pRhumb.rectangle;
expect(CesiumMath.toDegrees(boundingRhumb.north)).toEqualEpsilon(
40.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(CesiumMath.toDegrees(boundingRhumb.south)).toEqualEpsilon(
30.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(CesiumMath.toDegrees(boundingRhumb.east)).toEqualEpsilon(
-170.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(CesiumMath.toDegrees(boundingRhumb.west)).toEqualEpsilon(
175.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -1258,19 +1689,19 @@ describe("Core/PolygonGeometry", function () {
const boundingGeodesic = pGeodesic.rectangle;
expect(boundingGeodesic.east).toEqualEpsilon(
minLon.longitude,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(boundingGeodesic.south).toEqualEpsilon(
minLat.latitude,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(boundingGeodesic.west).toEqualEpsilon(
maxLon.longitude,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(boundingGeodesic.north).toEqualEpsilon(
maxLat.latitude,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -1283,7 +1714,7 @@ describe("Core/PolygonGeometry", function () {
positions,
Ellipsoid.WGS84,
ArcType.GEODESIC,
- result,
+ result
);
expect(returned).toBe(result);
@@ -1294,21 +1725,21 @@ describe("Core/PolygonGeometry", function () {
const result = PolygonGeometry.computeRectangleFromPositions(
positions,
- Ellipsoid.WGS84,
+ Ellipsoid.WGS84
);
expect(result).toBeInstanceOf(Rectangle);
expect(result.west).toEqualEpsilon(
CesiumMath.toRadians(30),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.south).toEqualEpsilon(
CesiumMath.toRadians(30),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.east).toEqualEpsilon(
CesiumMath.toRadians(60),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.north).toBeGreaterThan(CesiumMath.toRadians(60));
expect(result.north).toBeLessThan(CesiumMath.toRadians(70));
@@ -1320,340 +1751,411 @@ describe("Core/PolygonGeometry", function () {
const result = PolygonGeometry.computeRectangleFromPositions(
positions,
Ellipsoid.WGS84,
- ArcType.RHUMB,
+ ArcType.RHUMB
);
expect(result).toBeInstanceOf(Rectangle);
expect(result.west).toEqualEpsilon(
CesiumMath.toRadians(30),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.south).toEqualEpsilon(
CesiumMath.toRadians(30),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.east).toEqualEpsilon(
CesiumMath.toRadians(60),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.north).toEqualEpsilon(
CesiumMath.toRadians(60),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("computes a rectangle enclosing a simple geodesic polygon in the southern hemisphere", function () {
const positions = Cartesian3.fromDegreesArray([
- -30, -30, -60, -60, -30, -60,
+ -30,
+ -30,
+ -60,
+ -60,
+ -30,
+ -60,
]);
const result = PolygonGeometry.computeRectangleFromPositions(
positions,
- Ellipsoid.WGS84,
+ Ellipsoid.WGS84
);
expect(result).toBeInstanceOf(Rectangle);
expect(result.west).toEqualEpsilon(
CesiumMath.toRadians(-60),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.south).toBeLessThan(CesiumMath.toRadians(-60));
expect(result.south).toBeGreaterThan(CesiumMath.toRadians(-70));
expect(result.east).toEqualEpsilon(
CesiumMath.toRadians(-30),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.north).toEqualEpsilon(
CesiumMath.toRadians(-30),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("computes a rectangle enclosing a simple rhumb polygon in the southern hemisphere", function () {
const positions = Cartesian3.fromDegreesArray([
- -30, -30, -60, -60, -30, -60,
+ -30,
+ -30,
+ -60,
+ -60,
+ -30,
+ -60,
]);
const result = PolygonGeometry.computeRectangleFromPositions(
positions,
Ellipsoid.WGS84,
- ArcType.RHUMB,
+ ArcType.RHUMB
);
expect(result).toBeInstanceOf(Rectangle);
expect(result.west).toEqualEpsilon(
CesiumMath.toRadians(-60),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.south).toEqualEpsilon(
CesiumMath.toRadians(-60),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.east).toEqualEpsilon(
CesiumMath.toRadians(-30),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.north).toEqualEpsilon(
CesiumMath.toRadians(-30),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("computes a rectangle enclosing a simple polygon across the IDL", function () {
const positions = Cartesian3.fromDegreesArray([
- 170, 60, 170, 30, -170, 30,
+ 170,
+ 60,
+ 170,
+ 30,
+ -170,
+ 30,
]);
const result = PolygonGeometry.computeRectangleFromPositions(
positions,
- Ellipsoid.WGS84,
+ Ellipsoid.WGS84
);
expect(result).toBeInstanceOf(Rectangle);
expect(result.west).toEqualEpsilon(
CesiumMath.toRadians(170),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.south).toEqualEpsilon(
CesiumMath.toRadians(30),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.east).toEqualEpsilon(
CesiumMath.toRadians(-170),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.north).toEqualEpsilon(
CesiumMath.toRadians(60),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("computes a rectangle enclosing a simple polygon across the equator", function () {
const positions = Cartesian3.fromDegreesArray([
- 30, 30, -30, 30, -30, -30, 30, -30,
+ 30,
+ 30,
+ -30,
+ 30,
+ -30,
+ -30,
+ 30,
+ -30,
]);
const result = PolygonGeometry.computeRectangleFromPositions(
positions,
Ellipsoid.WGS84,
- ArcType.RHUMB,
+ ArcType.RHUMB
);
expect(result).toBeInstanceOf(Rectangle);
expect(result.west).toEqualEpsilon(
CesiumMath.toRadians(-30),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.south).toEqualEpsilon(
CesiumMath.toRadians(-30),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.east).toEqualEpsilon(
CesiumMath.toRadians(30),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.north).toEqualEpsilon(
CesiumMath.toRadians(30),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("computes a rectangle enclosing a simple convex polygon around the north pole", function () {
const positions = Cartesian3.fromDegreesArray([
- 45, 60, -45, 60, -135, 60, 140, 60,
+ 45,
+ 60,
+ -45,
+ 60,
+ -135,
+ 60,
+ 140,
+ 60,
]);
const result = PolygonGeometry.computeRectangleFromPositions(
positions,
- Ellipsoid.WGS84,
+ Ellipsoid.WGS84
);
expect(result).toBeInstanceOf(Rectangle);
expect(result.west).toEqualEpsilon(
CesiumMath.toRadians(-180),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.south).toEqualEpsilon(
CesiumMath.toRadians(60),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.east).toEqualEpsilon(
CesiumMath.toRadians(180),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.north).toEqualEpsilon(
CesiumMath.toRadians(90),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("computes a rectangle enclosing a simple concave polygon around the north pole", function () {
const positions = Cartesian3.fromDegreesArray([
- 45, 60, -45, 60, -135, 60, -45, 80,
+ 45,
+ 60,
+ -45,
+ 60,
+ -135,
+ 60,
+ -45,
+ 80,
]);
const result = PolygonGeometry.computeRectangleFromPositions(
positions,
- Ellipsoid.WGS84,
+ Ellipsoid.WGS84
);
expect(result).toBeInstanceOf(Rectangle);
expect(result.west).toEqualEpsilon(
CesiumMath.toRadians(-135),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.south).toEqualEpsilon(
CesiumMath.toRadians(60),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.east).toEqualEpsilon(
CesiumMath.toRadians(45),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.north).toEqualEpsilon(1.40485733, CesiumMath.EPSILON7);
});
it("computes a rectangle enclosing a simple clockwise convex polygon around the north pole", function () {
const positions = Cartesian3.fromDegreesArray([
- 140, 60, -135, 60, -45, 60, 45, 60,
+ 140,
+ 60,
+ -135,
+ 60,
+ -45,
+ 60,
+ 45,
+ 60,
]);
const result = PolygonGeometry.computeRectangleFromPositions(
positions,
- Ellipsoid.WGS84,
+ Ellipsoid.WGS84
);
expect(result).toBeInstanceOf(Rectangle);
expect(result.west).toEqualEpsilon(
CesiumMath.toRadians(-180),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.south).toEqualEpsilon(
CesiumMath.toRadians(60),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.east).toEqualEpsilon(
CesiumMath.toRadians(180),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.north).toEqualEpsilon(
CesiumMath.toRadians(90),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("computes a rectangle enclosing a simple convex polygon around the south pole", function () {
const positions = Cartesian3.fromDegreesArray([
- 140, -60, -135, -60, -45, -60, 45, -60,
+ 140,
+ -60,
+ -135,
+ -60,
+ -45,
+ -60,
+ 45,
+ -60,
]);
const result = PolygonGeometry.computeRectangleFromPositions(
positions,
- Ellipsoid.WGS84,
+ Ellipsoid.WGS84
);
expect(result).toBeInstanceOf(Rectangle);
expect(result.west).toEqualEpsilon(
CesiumMath.toRadians(-180),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.south).toEqualEpsilon(
CesiumMath.toRadians(-90),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.east).toEqualEpsilon(
CesiumMath.toRadians(180),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.north).toEqualEpsilon(
CesiumMath.toRadians(-60),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("computes a rectangle enclosing a simple concave rhumb polygon around the south pole", function () {
const positions = Cartesian3.fromDegreesArray([
- 45, -60, -45, -60, -135, -60, -45, -80,
+ 45,
+ -60,
+ -45,
+ -60,
+ -135,
+ -60,
+ -45,
+ -80,
]);
const result = PolygonGeometry.computeRectangleFromPositions(
positions,
Ellipsoid.WGS84,
- ArcType.RHUMB,
+ ArcType.RHUMB
);
expect(result).toBeInstanceOf(Rectangle);
expect(result.west).toEqualEpsilon(
CesiumMath.toRadians(-135),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.south).toEqualEpsilon(
CesiumMath.toRadians(-80),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.east).toEqualEpsilon(
CesiumMath.toRadians(45),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.north).toEqualEpsilon(
CesiumMath.toRadians(-60),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("computes a rectangle enclosing a simple concave geodesic polygon around the south pole", function () {
const positions = Cartesian3.fromDegreesArray([
- 45, -60, -45, -60, -135, -60, -45, -80,
+ 45,
+ -60,
+ -45,
+ -60,
+ -135,
+ -60,
+ -45,
+ -80,
]);
const result = PolygonGeometry.computeRectangleFromPositions(
positions,
- Ellipsoid.WGS84,
+ Ellipsoid.WGS84
);
expect(result).toBeInstanceOf(Rectangle);
expect(result.west).toEqualEpsilon(
CesiumMath.toRadians(-135),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.south).toBeLessThan(CesiumMath.toRadians(-80));
expect(result.south).toBeGreaterThan(CesiumMath.toRadians(-90));
expect(result.east).toEqualEpsilon(
CesiumMath.toRadians(45),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.north).toEqualEpsilon(
CesiumMath.toRadians(-60),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("computes a rectangle enclosing a simple clockwise convex polygon around the south pole", function () {
const positions = Cartesian3.fromDegreesArray([
- 45, -60, -45, -60, -135, -60, 140, -60,
+ 45,
+ -60,
+ -45,
+ -60,
+ -135,
+ -60,
+ 140,
+ -60,
]);
const result = PolygonGeometry.computeRectangleFromPositions(
positions,
- Ellipsoid.WGS84,
+ Ellipsoid.WGS84
);
expect(result).toBeInstanceOf(Rectangle);
expect(result.west).toEqualEpsilon(
CesiumMath.toRadians(-180),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.south).toEqualEpsilon(
CesiumMath.toRadians(-90),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.east).toEqualEpsilon(
CesiumMath.toRadians(180),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(result.north).toEqualEpsilon(
CesiumMath.toRadians(-60),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
});
@@ -1663,7 +2165,18 @@ describe("Core/PolygonGeometry", function () {
vertexFormat: VertexFormat.POSITION_AND_ST,
polygonHierarchy: {
positions: Cartesian3.fromDegreesArrayHeights([
- -10.0, -10.0, 0, -10.0, 10.0, 0, 10.0, -10.0, 0, 10.0, 10.0, 0,
+ -10.0,
+ -10.0,
+ 0,
+ -10.0,
+ 10.0,
+ 0,
+ 10.0,
+ -10.0,
+ 0,
+ 10.0,
+ 10.0,
+ 0,
]),
},
granularity: CesiumMath.PI,
@@ -1676,34 +2189,45 @@ describe("Core/PolygonGeometry", function () {
expect(textureCoordinateRotationPoints.length).toEqual(6);
expect(textureCoordinateRotationPoints[0]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[1]).toEqualEpsilon(
1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[2]).toEqualEpsilon(
1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[3]).toEqualEpsilon(
1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[4]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[5]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
p = new PolygonGeometry({
vertexFormat: VertexFormat.POSITION_AND_ST,
polygonHierarchy: {
positions: Cartesian3.fromDegreesArrayHeights([
- -10.0, -10.0, 0, -10.0, 10.0, 0, 10.0, -10.0, 0, 10.0, 10.0, 0,
+ -10.0,
+ -10.0,
+ 0,
+ -10.0,
+ 10.0,
+ 0,
+ 10.0,
+ -10.0,
+ 0,
+ 10.0,
+ 10.0,
+ 0,
]),
},
granularity: CesiumMath.PI,
@@ -1714,40 +2238,55 @@ describe("Core/PolygonGeometry", function () {
expect(textureCoordinateRotationPoints.length).toEqual(6);
expect(textureCoordinateRotationPoints[0]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[1]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[2]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[3]).toEqualEpsilon(
1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[4]).toEqualEpsilon(
1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[5]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
// pack without explicit texture coordinates
const positions = Cartesian3.fromDegreesArray([
- -12.4, 3.5, -12.0, 3.5, -12.0, 4.0,
+ -12.4,
+ 3.5,
+ -12.0,
+ 3.5,
+ -12.0,
+ 4.0,
]);
const holePositions0 = Cartesian3.fromDegreesArray([
- -12.2, 3.5, -12.2, 3.6, -12.3, 3.6,
+ -12.2,
+ 3.5,
+ -12.2,
+ 3.6,
+ -12.3,
+ 3.6,
]);
const holePositions1 = Cartesian3.fromDegreesArray([
- -12.2, 3.5, -12.25, 3.5, -12.25, 3.55,
+ -12.2,
+ 3.5,
+ -12.25,
+ 3.5,
+ -12.25,
+ 3.55,
]);
const hierarchy = {
positions: positions,
@@ -1794,7 +2333,7 @@ describe("Core/PolygonGeometry", function () {
packedInstance.push(
Ellipsoid.WGS84.radii.x,
Ellipsoid.WGS84.radii.y,
- Ellipsoid.WGS84.radii.z,
+ Ellipsoid.WGS84.radii.z
);
packedInstance.push(1.0, 0.0, 0.0, 0.0, 0.0, 0.0);
packedInstance.push(
@@ -1810,7 +2349,7 @@ describe("Core/PolygonGeometry", function () {
-1,
ArcType.GEODESIC,
-1,
- 55,
+ 55
);
createPackableSpecs(PolygonGeometry, polygon, packedInstance);
@@ -1850,7 +2389,7 @@ describe("Core/PolygonGeometry", function () {
packedInstanceTextured.push(
Ellipsoid.WGS84.radii.x,
Ellipsoid.WGS84.radii.y,
- Ellipsoid.WGS84.radii.z,
+ Ellipsoid.WGS84.radii.z
);
packedInstanceTextured.push(1.0, 0.0, 0.0, 0.0, 0.0, 0.0);
packedInstanceTextured.push(
@@ -1864,7 +2403,7 @@ describe("Core/PolygonGeometry", function () {
1,
0,
-1,
- ArcType.GEODESIC,
+ ArcType.GEODESIC
);
packedInstanceTextured.push(9.0, 0.0);
addPositions2D(packedInstanceTextured, textureCoordinates.positions);
diff --git a/packages/engine/Specs/Core/PolygonOutlineGeometrySpec.js b/packages/engine/Specs/Core/PolygonOutlineGeometrySpec.js
index a8e6ef401049..92838d833a14 100644
--- a/packages/engine/Specs/Core/PolygonOutlineGeometrySpec.js
+++ b/packages/engine/Specs/Core/PolygonOutlineGeometrySpec.js
@@ -37,8 +37,8 @@ describe("Core/PolygonOutlineGeometry", function () {
PolygonOutlineGeometry.createGeometry(
PolygonOutlineGeometry.fromPositions({
positions: [new Cartesian3()],
- }),
- ),
+ })
+ )
).toBeUndefined();
});
@@ -49,8 +49,8 @@ describe("Core/PolygonOutlineGeometry", function () {
polygonHierarchy: {
positions: [Cartesian3.fromDegrees(0, 0)],
},
- }),
- ),
+ })
+ )
).toBeUndefined();
});
@@ -71,7 +71,7 @@ describe("Core/PolygonOutlineGeometry", function () {
const geometry = PolygonOutlineGeometry.createGeometry(
PolygonOutlineGeometry.fromPositions({
positions: Cartesian3.fromDegreesArray([0.0, 0.0, 0.0, 0.0, 0.0, 0.0]),
- }),
+ })
);
expect(geometry).toBeUndefined();
});
@@ -81,7 +81,7 @@ describe("Core/PolygonOutlineGeometry", function () {
PolygonOutlineGeometry.fromPositions({
positions: Cartesian3.fromDegreesArray([0.0, 0.0, 0.0, 0.0, 0.0, 0.0]),
extrudedHeight: 2,
- }),
+ })
);
expect(geometry).toBeUndefined();
});
@@ -92,14 +92,19 @@ describe("Core/PolygonOutlineGeometry", function () {
holes: [
{
positions: Cartesian3.fromDegreesArray([
- 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
]),
},
],
};
const geometry = PolygonOutlineGeometry.createGeometry(
- new PolygonOutlineGeometry({ polygonHierarchy: hierarchy }),
+ new PolygonOutlineGeometry({ polygonHierarchy: hierarchy })
);
expect(geometry).toBeUndefined();
});
@@ -107,19 +112,35 @@ describe("Core/PolygonOutlineGeometry", function () {
it("createGeometry returns undefined due to duplicate hierarchy positions with different heights", function () {
const hierarchy = {
positions: Cartesian3.fromDegreesArrayHeights([
- 1.0, 1.0, 10.0, 1.0, 1.0, 20.0, 1.0, 1.0, 30.0,
+ 1.0,
+ 1.0,
+ 10.0,
+ 1.0,
+ 1.0,
+ 20.0,
+ 1.0,
+ 1.0,
+ 30.0,
]),
holes: [
{
positions: Cartesian3.fromDegreesArrayHeights([
- 0.0, 0.0, 10.0, 0.0, 0.0, 20.0, 0.0, 0.0, 30.0,
+ 0.0,
+ 0.0,
+ 10.0,
+ 0.0,
+ 0.0,
+ 20.0,
+ 0.0,
+ 0.0,
+ 30.0,
]),
},
],
};
const geometry = PolygonOutlineGeometry.createGeometry(
- new PolygonOutlineGeometry({ polygonHierarchy: hierarchy }),
+ new PolygonOutlineGeometry({ polygonHierarchy: hierarchy })
);
expect(geometry).toBeUndefined();
});
@@ -127,12 +148,28 @@ describe("Core/PolygonOutlineGeometry", function () {
it("createGeometry returns geometry if duplicate hierarchy positions with different heights and perPositionHeight is true", function () {
const hierarchy = {
positions: Cartesian3.fromDegreesArrayHeights([
- 1.0, 1.0, 10.0, 1.0, 1.0, 20.0, 1.0, 1.0, 30.0,
+ 1.0,
+ 1.0,
+ 10.0,
+ 1.0,
+ 1.0,
+ 20.0,
+ 1.0,
+ 1.0,
+ 30.0,
]),
holes: [
{
positions: Cartesian3.fromDegreesArrayHeights([
- 0.0, 0.0, 10.0, 0.0, 0.0, 20.0, 0.0, 0.0, 30.0,
+ 0.0,
+ 0.0,
+ 10.0,
+ 0.0,
+ 0.0,
+ 20.0,
+ 0.0,
+ 0.0,
+ 30.0,
]),
},
],
@@ -142,7 +179,7 @@ describe("Core/PolygonOutlineGeometry", function () {
new PolygonOutlineGeometry({
polygonHierarchy: hierarchy,
perPositionHeight: true,
- }),
+ })
);
expect(geometry).toBeDefined();
});
@@ -151,9 +188,16 @@ describe("Core/PolygonOutlineGeometry", function () {
const p = PolygonOutlineGeometry.createGeometry(
PolygonOutlineGeometry.fromPositions({
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
- }),
+ })
);
expect(p.attributes.position.values.length).toEqual(8 * 3);
@@ -181,18 +225,18 @@ describe("Core/PolygonOutlineGeometry", function () {
PolygonOutlineGeometry.fromPositions({
positions: positions,
perPositionHeight: true,
- }),
+ })
);
expect(
ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(p.attributes.position.values, 0),
- ).height,
+ Cartesian3.fromArray(p.attributes.position.values, 0)
+ ).height
).toEqualEpsilon(height, CesiumMath.EPSILON6);
expect(
ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(p.attributes.position.values, 3),
- ).height,
+ Cartesian3.fromArray(p.attributes.position.values, 3)
+ ).height
).toEqualEpsilon(0, CesiumMath.EPSILON6);
});
@@ -200,11 +244,18 @@ describe("Core/PolygonOutlineGeometry", function () {
const p = PolygonOutlineGeometry.createGeometry(
PolygonOutlineGeometry.fromPositions({
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
granularity: CesiumMath.RADIANS_PER_DEGREE,
arcType: ArcType.RHUMB,
- }),
+ })
);
expect(p.attributes.position.values.length).toEqual(8 * 3); // 8 around edge
@@ -216,36 +267,50 @@ describe("Core/PolygonOutlineGeometry", function () {
PolygonOutlineGeometry.createGeometry(
PolygonOutlineGeometry.fromPositions({
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
granularity: CesiumMath.RADIANS_PER_DEGREE,
arcType: ArcType.NONE,
- }),
+ })
);
}).toThrowDeveloperError();
});
it("create geometry creates with lines with different number of subdivisions for geodesic and rhumb", function () {
const positions = Cartesian3.fromDegreesArray([
- -80.0, 75.0, 80.0, 75.0, 80.0, 45.0, -80.0, 45.0,
+ -80.0,
+ 75.0,
+ 80.0,
+ 75.0,
+ 80.0,
+ 45.0,
+ -80.0,
+ 45.0,
]);
const geodesic = PolygonOutlineGeometry.createGeometry(
PolygonOutlineGeometry.fromPositions({
positions: positions,
granularity: CesiumMath.RADIANS_PER_DEGREE,
arcType: ArcType.GEODESIC,
- }),
+ })
);
const rhumb = PolygonOutlineGeometry.createGeometry(
PolygonOutlineGeometry.fromPositions({
positions: positions,
granularity: CesiumMath.RADIANS_PER_DEGREE,
arcType: ArcType.RHUMB,
- }),
+ })
);
expect(geodesic.attributes.position.values.length).not.toEqual(
- rhumb.attributes.position.values.length,
+ rhumb.attributes.position.values.length
);
expect(geodesic.indices.length).not.toEqual(rhumb.indices.length);
});
@@ -272,18 +337,18 @@ describe("Core/PolygonOutlineGeometry", function () {
positions: positions,
perPositionHeight: true,
arcType: ArcType.RHUMB,
- }),
+ })
);
expect(
ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(p.attributes.position.values, 0),
- ).height,
+ Cartesian3.fromArray(p.attributes.position.values, 0)
+ ).height
).toEqualEpsilon(height, CesiumMath.EPSILON6);
expect(
ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(p.attributes.position.values, 3),
- ).height,
+ Cartesian3.fromArray(p.attributes.position.values, 3)
+ ).height
).toEqualEpsilon(0, CesiumMath.EPSILON6);
});
@@ -311,40 +376,61 @@ describe("Core/PolygonOutlineGeometry", function () {
positions: positions,
perPositionHeight: true,
extrudedHeight: extrudedHeight,
- }),
+ })
);
expect(
ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(p.attributes.position.values, 0),
- ).height,
+ Cartesian3.fromArray(p.attributes.position.values, 0)
+ ).height
).toEqualEpsilon(maxHeight, CesiumMath.EPSILON6);
expect(
ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(p.attributes.position.values, 3),
- ).height,
+ Cartesian3.fromArray(p.attributes.position.values, 3)
+ ).height
).toEqualEpsilon(minHeight, CesiumMath.EPSILON6);
expect(
ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(p.attributes.position.values, 24),
- ).height,
+ Cartesian3.fromArray(p.attributes.position.values, 24)
+ ).height
).toEqualEpsilon(extrudedHeight, CesiumMath.EPSILON6);
});
it("creates a polygon from hierarchy", function () {
const hierarchy = {
positions: Cartesian3.fromDegreesArray([
- -124.0, 35.0, -110.0, 35.0, -110.0, 40.0, -124.0, 40.0,
+ -124.0,
+ 35.0,
+ -110.0,
+ 35.0,
+ -110.0,
+ 40.0,
+ -124.0,
+ 40.0,
]),
holes: [
{
positions: Cartesian3.fromDegreesArray([
- -122.0, 36.0, -122.0, 39.0, -112.0, 39.0, -112.0, 36.0,
+ -122.0,
+ 36.0,
+ -122.0,
+ 39.0,
+ -112.0,
+ 39.0,
+ -112.0,
+ 36.0,
]),
holes: [
{
positions: Cartesian3.fromDegreesArray([
- -120.0, 36.5, -114.0, 36.5, -114.0, 38.5, -120.0, 38.5,
+ -120.0,
+ 36.5,
+ -114.0,
+ 36.5,
+ -114.0,
+ 38.5,
+ -120.0,
+ 38.5,
]),
},
],
@@ -356,7 +442,7 @@ describe("Core/PolygonOutlineGeometry", function () {
new PolygonOutlineGeometry({
polygonHierarchy: hierarchy,
granularity: CesiumMath.PI_OVER_THREE,
- }),
+ })
);
expect(p.attributes.position.values.length).toEqual(12 * 3); // 4 corners * 3 rectangles
@@ -366,17 +452,38 @@ describe("Core/PolygonOutlineGeometry", function () {
it("creates a polygon from clockwise hierarchy", function () {
const hierarchy = {
positions: Cartesian3.fromDegreesArray([
- -124.0, 35.0, -124.0, 40.0, -110.0, 40.0, -110.0, 35.0,
+ -124.0,
+ 35.0,
+ -124.0,
+ 40.0,
+ -110.0,
+ 40.0,
+ -110.0,
+ 35.0,
]),
holes: [
{
positions: Cartesian3.fromDegreesArray([
- -122.0, 36.0, -112.0, 36.0, -112.0, 39.0, -122.0, 39.0,
+ -122.0,
+ 36.0,
+ -112.0,
+ 36.0,
+ -112.0,
+ 39.0,
+ -122.0,
+ 39.0,
]),
holes: [
{
positions: Cartesian3.fromDegreesArray([
- -120.0, 36.5, -120.0, 38.5, -114.0, 38.5, -114.0, 36.5,
+ -120.0,
+ 36.5,
+ -120.0,
+ 38.5,
+ -114.0,
+ 38.5,
+ -114.0,
+ 36.5,
]),
},
],
@@ -388,7 +495,7 @@ describe("Core/PolygonOutlineGeometry", function () {
new PolygonOutlineGeometry({
polygonHierarchy: hierarchy,
granularity: CesiumMath.PI_OVER_THREE,
- }),
+ })
);
expect(p.attributes.position.values.length).toEqual(12 * 3);
@@ -397,13 +504,34 @@ describe("Core/PolygonOutlineGeometry", function () {
it("doesn't reverse clockwise input array", function () {
const p = Cartesian3.fromDegreesArray([
- -124.0, 35.0, -124.0, 40.0, -110.0, 40.0, -110.0, 35.0,
+ -124.0,
+ 35.0,
+ -124.0,
+ 40.0,
+ -110.0,
+ 40.0,
+ -110.0,
+ 35.0,
]);
const h1 = Cartesian3.fromDegreesArray([
- -122.0, 36.0, -112.0, 36.0, -112.0, 39.0, -122.0, 39.0,
+ -122.0,
+ 36.0,
+ -112.0,
+ 36.0,
+ -112.0,
+ 39.0,
+ -122.0,
+ 39.0,
]);
const h2 = Cartesian3.fromDegreesArray([
- -120.0, 36.5, -120.0, 38.5, -114.0, 38.5, -114.0, 36.5,
+ -120.0,
+ 36.5,
+ -120.0,
+ 38.5,
+ -114.0,
+ 38.5,
+ -114.0,
+ 36.5,
]);
const hierarchy = {
positions: p,
@@ -423,26 +551,47 @@ describe("Core/PolygonOutlineGeometry", function () {
new PolygonOutlineGeometry({
polygonHierarchy: hierarchy,
granularity: CesiumMath.PI_OVER_THREE,
- }),
+ })
);
expect(p).toEqualEpsilon(
Cartesian3.fromDegreesArray([
- -124.0, 35.0, -124.0, 40.0, -110.0, 40.0, -110.0, 35.0,
+ -124.0,
+ 35.0,
+ -124.0,
+ 40.0,
+ -110.0,
+ 40.0,
+ -110.0,
+ 35.0,
]),
- CesiumMath.EPSILON9,
+ CesiumMath.EPSILON9
);
expect(h1).toEqualEpsilon(
Cartesian3.fromDegreesArray([
- -122.0, 36.0, -112.0, 36.0, -112.0, 39.0, -122.0, 39.0,
+ -122.0,
+ 36.0,
+ -112.0,
+ 36.0,
+ -112.0,
+ 39.0,
+ -122.0,
+ 39.0,
]),
- CesiumMath.EPSILON9,
+ CesiumMath.EPSILON9
);
expect(h2).toEqualEpsilon(
Cartesian3.fromDegreesArray([
- -120.0, 36.5, -120.0, 38.5, -114.0, 38.5, -114.0, 36.5,
+ -120.0,
+ 36.5,
+ -120.0,
+ 38.5,
+ -114.0,
+ 38.5,
+ -114.0,
+ 36.5,
]),
- CesiumMath.EPSILON9,
+ CesiumMath.EPSILON9
);
});
@@ -450,34 +599,48 @@ describe("Core/PolygonOutlineGeometry", function () {
const p = PolygonOutlineGeometry.createGeometry(
PolygonOutlineGeometry.fromPositions({
positions: Cartesian3.fromDegreesArray([
- -108.0, 1.0, -108.0, -1.0, -106.0, -1.0, -106.0, 1.0,
+ -108.0,
+ 1.0,
+ -108.0,
+ -1.0,
+ -106.0,
+ -1.0,
+ -106.0,
+ 1.0,
]),
granularity: CesiumMath.PI_OVER_THREE,
- }),
+ })
);
const bs = BoundingSphere.fromVertices(p.attributes.position.values);
expect(p.boundingSphere.center).toEqualEpsilon(
bs.center,
- CesiumMath.EPSILON9,
+ CesiumMath.EPSILON9
);
expect(p.boundingSphere.radius).toEqualEpsilon(
bs.radius,
- CesiumMath.EPSILON9,
+ CesiumMath.EPSILON9
);
});
it("computes correct bounding sphere at height >>> 0", function () {
const height = 40000000.0;
const positions = Cartesian3.fromDegreesArray([
- -108.0, 1.0, -108.0, -1.0, -106.0, -1.0, -106.0, 1.0,
+ -108.0,
+ 1.0,
+ -108.0,
+ -1.0,
+ -106.0,
+ -1.0,
+ -106.0,
+ 1.0,
]);
const p = PolygonOutlineGeometry.createGeometry(
PolygonOutlineGeometry.fromPositions({
positions: positions,
height: height,
- }),
+ })
);
const bs = BoundingSphere.fromPoints(
@@ -494,7 +657,7 @@ describe("Core/PolygonOutlineGeometry", function () {
-106.0,
1.0,
height,
- ]),
+ ])
);
expect(Math.abs(p.boundingSphere.radius - bs.radius)).toBeLessThan(100.0);
});
@@ -503,10 +666,17 @@ describe("Core/PolygonOutlineGeometry", function () {
const p = PolygonOutlineGeometry.createGeometry(
PolygonOutlineGeometry.fromPositions({
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
extrudedHeight: 30000,
- }),
+ })
);
expect(p.attributes.position.values.length).toEqual(16 * 3); // 8 top + 8 bottom
@@ -516,17 +686,38 @@ describe("Core/PolygonOutlineGeometry", function () {
it("creates a polygon from hierarchy extruded", function () {
const hierarchy = {
positions: Cartesian3.fromDegreesArray([
- -124.0, 35.0, -110.0, 35.0, -110.0, 40.0, -124.0, 40.0,
+ -124.0,
+ 35.0,
+ -110.0,
+ 35.0,
+ -110.0,
+ 40.0,
+ -124.0,
+ 40.0,
]),
holes: [
{
positions: Cartesian3.fromDegreesArray([
- -122.0, 36.0, -122.0, 39.0, -112.0, 39.0, -112.0, 36.0,
+ -122.0,
+ 36.0,
+ -122.0,
+ 39.0,
+ -112.0,
+ 39.0,
+ -112.0,
+ 36.0,
]),
holes: [
{
positions: Cartesian3.fromDegreesArray([
- -120.0, 36.5, -114.0, 36.5, -114.0, 38.5, -120.0, 38.5,
+ -120.0,
+ 36.5,
+ -114.0,
+ 36.5,
+ -114.0,
+ 38.5,
+ -120.0,
+ 38.5,
]),
},
],
@@ -539,7 +730,7 @@ describe("Core/PolygonOutlineGeometry", function () {
polygonHierarchy: hierarchy,
granularity: CesiumMath.PI_OVER_THREE,
extrudedHeight: 30000,
- }),
+ })
);
expect(p.attributes.position.values.length).toEqual(24 * 3); // 12 top + 12 bottom
@@ -550,10 +741,17 @@ describe("Core/PolygonOutlineGeometry", function () {
const p = PolygonOutlineGeometry.createGeometry(
PolygonOutlineGeometry.fromPositions({
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
offsetAttribute: GeometryOffsetAttribute.TOP,
- }),
+ })
);
const numVertices = 8;
@@ -568,11 +766,18 @@ describe("Core/PolygonOutlineGeometry", function () {
const p = PolygonOutlineGeometry.createGeometry(
PolygonOutlineGeometry.fromPositions({
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
extrudedHeight: 30000,
offsetAttribute: GeometryOffsetAttribute.TOP,
- }),
+ })
);
const numVertices = 16;
@@ -588,11 +793,18 @@ describe("Core/PolygonOutlineGeometry", function () {
const p = PolygonOutlineGeometry.createGeometry(
PolygonOutlineGeometry.fromPositions({
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
extrudedHeight: 30000,
offsetAttribute: GeometryOffsetAttribute.ALL,
- }),
+ })
);
const numVertices = 16;
@@ -615,13 +827,28 @@ describe("Core/PolygonOutlineGeometry", function () {
});
const positions = Cartesian3.fromDegreesArray([
- -124.0, 35.0, -110.0, 35.0, -110.0, 40.0,
+ -124.0,
+ 35.0,
+ -110.0,
+ 35.0,
+ -110.0,
+ 40.0,
]);
const holePositions0 = Cartesian3.fromDegreesArray([
- -122.0, 36.0, -122.0, 39.0, -112.0, 39.0,
+ -122.0,
+ 36.0,
+ -122.0,
+ 39.0,
+ -112.0,
+ 39.0,
]);
const holePositions1 = Cartesian3.fromDegreesArray([
- -120.0, 36.5, -114.0, 36.5, -114.0, 38.5,
+ -120.0,
+ 36.5,
+ -114.0,
+ 36.5,
+ -114.0,
+ 38.5,
]);
const hierarchy = {
positions: positions,
@@ -656,7 +883,7 @@ describe("Core/PolygonOutlineGeometry", function () {
packedInstance.push(
Ellipsoid.WGS84.radii.x,
Ellipsoid.WGS84.radii.y,
- Ellipsoid.WGS84.radii.z,
+ Ellipsoid.WGS84.radii.z
);
packedInstance.push(
0.0,
@@ -666,7 +893,7 @@ describe("Core/PolygonOutlineGeometry", function () {
1.0,
ArcType.GEODESIC,
-1,
- 44,
+ 44
);
createPackableSpecs(PolygonOutlineGeometry, polygon, packedInstance);
});
diff --git a/packages/engine/Specs/Core/PolygonPipelineSpec.js b/packages/engine/Specs/Core/PolygonPipelineSpec.js
index 9819f86e64c8..b39594523eca 100644
--- a/packages/engine/Specs/Core/PolygonPipelineSpec.js
+++ b/packages/engine/Specs/Core/PolygonPipelineSpec.js
@@ -131,7 +131,30 @@ describe("Core/PolygonPipeline", function () {
const indices = PolygonPipeline.triangulate(combinedPositions, [4]);
expect(indices).toEqual([
- 0, 4, 7, 5, 4, 0, 3, 0, 7, 5, 0, 1, 2, 3, 7, 6, 5, 1, 2, 7, 6, 6, 1, 2,
+ 0,
+ 4,
+ 7,
+ 5,
+ 4,
+ 0,
+ 3,
+ 0,
+ 7,
+ 5,
+ 0,
+ 1,
+ 2,
+ 3,
+ 7,
+ 6,
+ 5,
+ 1,
+ 2,
+ 7,
+ 6,
+ 6,
+ 1,
+ 2,
]);
});
@@ -159,8 +182,48 @@ describe("Core/PolygonPipeline", function () {
const indices = PolygonPipeline.triangulate(combinedPositions, [4, 8]);
expect(indices).toEqual([
- 0, 8, 11, 0, 4, 7, 5, 4, 0, 3, 0, 11, 8, 0, 7, 5, 0, 1, 2, 3, 11, 9, 8,
- 7, 6, 5, 1, 2, 11, 10, 9, 7, 6, 6, 1, 2, 2, 10, 9, 9, 6, 2,
+ 0,
+ 8,
+ 11,
+ 0,
+ 4,
+ 7,
+ 5,
+ 4,
+ 0,
+ 3,
+ 0,
+ 11,
+ 8,
+ 0,
+ 7,
+ 5,
+ 0,
+ 1,
+ 2,
+ 3,
+ 11,
+ 9,
+ 8,
+ 7,
+ 6,
+ 5,
+ 1,
+ 2,
+ 11,
+ 10,
+ 9,
+ 7,
+ 6,
+ 6,
+ 1,
+ 2,
+ 2,
+ 10,
+ 9,
+ 9,
+ 6,
+ 2,
]);
});
});
@@ -204,7 +267,7 @@ describe("Core/PolygonPipeline", function () {
[],
[1, 2, 3],
undefined,
- -1.0,
+ -1.0
);
}).toThrowDeveloperError();
});
@@ -221,7 +284,7 @@ describe("Core/PolygonPipeline", function () {
positions,
indices,
undefined,
- 60.0,
+ 60.0
);
expect(subdivision.attributes.position.values[0]).toEqual(0.0);
@@ -245,7 +308,7 @@ describe("Core/PolygonPipeline", function () {
new Cartesian3(
6377802.759444977,
-58441.30561735455,
- -29025.647900582237,
+ -29025.647900582237
),
new Cartesian3(6378137, 0, 0),
new Cartesian3(6377802.759444977, 58441.30561735455, -29025.647900582237),
@@ -255,54 +318,54 @@ describe("Core/PolygonPipeline", function () {
const subdivision = PolygonPipeline.computeSubdivision(
Ellipsoid.WGS84,
positions,
- indices,
+ indices
);
expect(subdivision.attributes.position.values[0]).toEqual(
- 6377802.759444977,
+ 6377802.759444977
);
expect(subdivision.attributes.position.values[1]).toEqual(
- -58441.30561735455,
+ -58441.30561735455
);
expect(subdivision.attributes.position.values[2]).toEqual(
- 29025.647900582237,
+ 29025.647900582237
);
expect(subdivision.attributes.position.values[3]).toEqual(
- 6377802.759444977,
+ 6377802.759444977
);
expect(subdivision.attributes.position.values[4]).toEqual(
- -58441.30561735455,
+ -58441.30561735455
);
expect(subdivision.attributes.position.values[5]).toEqual(
- -29025.647900582237,
+ -29025.647900582237
);
expect(subdivision.attributes.position.values[6]).toEqual(6378137);
expect(subdivision.attributes.position.values[7]).toEqual(0);
expect(subdivision.attributes.position.values[8]).toEqual(0);
expect(subdivision.attributes.position.values[9]).toEqual(
- 6377802.759444977,
+ 6377802.759444977
);
expect(subdivision.attributes.position.values[10]).toEqual(
- 58441.30561735455,
+ 58441.30561735455
);
expect(subdivision.attributes.position.values[11]).toEqual(
- -29025.647900582237,
+ -29025.647900582237
);
expect(subdivision.attributes.position.values[12]).toEqual(
- 6377802.759444977,
+ 6377802.759444977
);
expect(subdivision.attributes.position.values[13]).toEqual(
- 58441.30561735455,
+ 58441.30561735455
);
expect(subdivision.attributes.position.values[14]).toEqual(
- 29025.647900582237,
+ 29025.647900582237
);
expect(subdivision.attributes.position.values[15]).toEqual(
- 6377802.759444977,
+ 6377802.759444977
);
expect(subdivision.attributes.position.values[16]).toEqual(0);
expect(subdivision.attributes.position.values[17]).toEqual(
- 29025.647900582237,
+ 29025.647900582237
);
expect(subdivision.indices[0]).toEqual(5);
@@ -325,7 +388,7 @@ describe("Core/PolygonPipeline", function () {
new Cartesian3(
6377802.759444977,
-58441.30561735455,
- -29025.647900582237,
+ -29025.647900582237
),
new Cartesian3(6378137, 0, 0),
new Cartesian3(6377802.759444977, 58441.30561735455, -29025.647900582237),
@@ -343,54 +406,54 @@ describe("Core/PolygonPipeline", function () {
Ellipsoid.WGS84,
positions,
indices,
- texcoords,
+ texcoords
);
expect(subdivision.attributes.position.values[0]).toEqual(
- 6377802.759444977,
+ 6377802.759444977
);
expect(subdivision.attributes.position.values[1]).toEqual(
- -58441.30561735455,
+ -58441.30561735455
);
expect(subdivision.attributes.position.values[2]).toEqual(
- 29025.647900582237,
+ 29025.647900582237
);
expect(subdivision.attributes.position.values[3]).toEqual(
- 6377802.759444977,
+ 6377802.759444977
);
expect(subdivision.attributes.position.values[4]).toEqual(
- -58441.30561735455,
+ -58441.30561735455
);
expect(subdivision.attributes.position.values[5]).toEqual(
- -29025.647900582237,
+ -29025.647900582237
);
expect(subdivision.attributes.position.values[6]).toEqual(6378137);
expect(subdivision.attributes.position.values[7]).toEqual(0);
expect(subdivision.attributes.position.values[8]).toEqual(0);
expect(subdivision.attributes.position.values[9]).toEqual(
- 6377802.759444977,
+ 6377802.759444977
);
expect(subdivision.attributes.position.values[10]).toEqual(
- 58441.30561735455,
+ 58441.30561735455
);
expect(subdivision.attributes.position.values[11]).toEqual(
- -29025.647900582237,
+ -29025.647900582237
);
expect(subdivision.attributes.position.values[12]).toEqual(
- 6377802.759444977,
+ 6377802.759444977
);
expect(subdivision.attributes.position.values[13]).toEqual(
- 58441.30561735455,
+ 58441.30561735455
);
expect(subdivision.attributes.position.values[14]).toEqual(
- 29025.647900582237,
+ 29025.647900582237
);
expect(subdivision.attributes.position.values[15]).toEqual(
- 6377802.759444977,
+ 6377802.759444977
);
expect(subdivision.attributes.position.values[16]).toEqual(0);
expect(subdivision.attributes.position.values[17]).toEqual(
- 29025.647900582237,
+ 29025.647900582237
);
expect(subdivision.indices[0]).toEqual(5);
@@ -450,7 +513,7 @@ describe("Core/PolygonPipeline", function () {
PolygonPipeline.computeRhumbLineSubdivision(
Ellipsoid.WGS84,
[],
- [1, 2, 3, 4],
+ [1, 2, 3, 4]
);
}).toThrowDeveloperError();
});
@@ -462,7 +525,7 @@ describe("Core/PolygonPipeline", function () {
[],
[1, 2, 3],
undefined,
- -1.0,
+ -1.0
);
}).toThrowDeveloperError();
});
@@ -475,7 +538,7 @@ describe("Core/PolygonPipeline", function () {
positions,
indices,
undefined,
- 2 * CesiumMath.RADIANS_PER_DEGREE,
+ 2 * CesiumMath.RADIANS_PER_DEGREE
);
expect(subdivision.attributes.position.values[0]).toEqual(positions[0].x);
@@ -501,7 +564,7 @@ describe("Core/PolygonPipeline", function () {
positions,
indices,
undefined,
- 0.5 * CesiumMath.RADIANS_PER_DEGREE,
+ 0.5 * CesiumMath.RADIANS_PER_DEGREE
);
expect(subdivision.attributes.position.values.length).toEqual(36); // 12 vertices
@@ -516,7 +579,7 @@ describe("Core/PolygonPipeline", function () {
positions,
indices,
undefined,
- 0.5 * CesiumMath.RADIANS_PER_DEGREE,
+ 0.5 * CesiumMath.RADIANS_PER_DEGREE
);
expect(subdivision.attributes.position.values.length).toEqual(180); // 60 vertices
@@ -529,7 +592,7 @@ describe("Core/PolygonPipeline", function () {
new Cartesian3(
6377802.759444977,
-58441.30561735455,
- -29025.647900582237,
+ -29025.647900582237
),
new Cartesian3(6378137, 0, 0),
new Cartesian3(6377802.759444977, 58441.30561735455, -29025.647900582237),
@@ -547,56 +610,56 @@ describe("Core/PolygonPipeline", function () {
Ellipsoid.WGS84,
positions,
indices,
- texcoords,
+ texcoords
);
expect(subdivision.attributes.position.values[0]).toEqual(
- 6377802.759444977,
+ 6377802.759444977
);
expect(subdivision.attributes.position.values[1]).toEqual(
- -58441.30561735455,
+ -58441.30561735455
);
expect(subdivision.attributes.position.values[2]).toEqual(
- 29025.647900582237,
+ 29025.647900582237
);
expect(subdivision.attributes.position.values[3]).toEqual(
- 6377802.759444977,
+ 6377802.759444977
);
expect(subdivision.attributes.position.values[4]).toEqual(
- -58441.30561735455,
+ -58441.30561735455
);
expect(subdivision.attributes.position.values[5]).toEqual(
- -29025.647900582237,
+ -29025.647900582237
);
expect(subdivision.attributes.position.values[6]).toEqual(6378137);
expect(subdivision.attributes.position.values[7]).toEqual(0);
expect(subdivision.attributes.position.values[8]).toEqual(0);
expect(subdivision.attributes.position.values[9]).toEqual(
- 6377802.759444977,
+ 6377802.759444977
);
expect(subdivision.attributes.position.values[10]).toEqual(
- 58441.30561735455,
+ 58441.30561735455
);
expect(subdivision.attributes.position.values[11]).toEqual(
- -29025.647900582237,
+ -29025.647900582237
);
expect(subdivision.attributes.position.values[12]).toEqual(
- 6377802.759444977,
+ 6377802.759444977
);
expect(subdivision.attributes.position.values[13]).toEqual(
- 58441.30561735455,
+ 58441.30561735455
);
expect(subdivision.attributes.position.values[14]).toEqual(
- 29025.647900582237,
+ 29025.647900582237
);
expect(subdivision.attributes.position.values[15]).toEqual(
- 6378070.509533917,
+ 6378070.509533917
);
expect(subdivision.attributes.position.values[16]).toEqual(
- 1.1064188644323841e-11,
+ 1.1064188644323841e-11
);
expect(subdivision.attributes.position.values[17]).toEqual(
- 29025.64790058224,
+ 29025.64790058224
);
expect(subdivision.indices[0]).toEqual(5);
diff --git a/packages/engine/Specs/Core/PolylineGeometrySpec.js b/packages/engine/Specs/Core/PolylineGeometrySpec.js
index 4cbbaac0309f..46f0bf04b4d1 100644
--- a/packages/engine/Specs/Core/PolylineGeometrySpec.js
+++ b/packages/engine/Specs/Core/PolylineGeometrySpec.js
@@ -48,7 +48,7 @@ describe("Core/PolylineGeometry", function () {
vertexFormat: VertexFormat.ALL,
granularity: Math.PI,
ellipsoid: Ellipsoid.UNIT_SPHERE,
- }),
+ })
);
expect(line).toBeUndefined();
@@ -67,7 +67,7 @@ describe("Core/PolylineGeometry", function () {
vertexFormat: VertexFormat.ALL,
granularity: Math.PI,
ellipsoid: Ellipsoid.UNIT_SPHERE,
- }),
+ })
);
expect(line.attributes.position).toBeDefined();
@@ -81,7 +81,7 @@ describe("Core/PolylineGeometry", function () {
expect(line.attributes.prevPosition.values.length).toEqual(numVertices * 3);
expect(line.attributes.nextPosition.values.length).toEqual(numVertices * 3);
expect(line.attributes.expandAndWidth.values.length).toEqual(
- numVertices * 2,
+ numVertices * 2
);
expect(line.attributes.st.values.length).toEqual(numVertices * 2);
expect(line.indices.length).toEqual(positions.length * 6 - 6);
@@ -97,7 +97,7 @@ describe("Core/PolylineGeometry", function () {
granularity: Math.PI,
ellipsoid: Ellipsoid.UNIT_SPHERE,
arcType: ArcType.RHUMB,
- }),
+ })
);
expect(line.attributes.position).toBeDefined();
@@ -111,7 +111,7 @@ describe("Core/PolylineGeometry", function () {
expect(line.attributes.prevPosition.values.length).toEqual(numVertices * 3);
expect(line.attributes.nextPosition.values.length).toEqual(numVertices * 3);
expect(line.attributes.expandAndWidth.values.length).toEqual(
- numVertices * 2,
+ numVertices * 2
);
expect(line.attributes.st.values.length).toEqual(numVertices * 2);
expect(line.indices.length).toEqual(positions.length * 6 - 6);
@@ -136,7 +136,7 @@ describe("Core/PolylineGeometry", function () {
vertexFormat: VertexFormat.ALL,
granularity: Math.PI,
ellipsoid: Ellipsoid.UNIT_SPHERE,
- }),
+ })
);
expect(line.attributes.color).toBeDefined();
@@ -165,7 +165,7 @@ describe("Core/PolylineGeometry", function () {
vertexFormat: VertexFormat.ALL,
granularity: Math.PI,
ellipsoid: Ellipsoid.UNIT_SPHERE,
- }),
+ })
);
expect(line.attributes.color).toBeDefined();
@@ -184,14 +184,19 @@ describe("Core/PolylineGeometry", function () {
width: 10.0,
vertexFormat: VertexFormat.POSITION_ONLY,
arcType: ArcType.NONE,
- }),
+ })
);
expect(geometry).not.toBeDefined();
});
it("createGeometry returns positions if their endpoints'longtitude and latitude are the same for rhumb line", function () {
const positions = Cartesian3.fromDegreesArrayHeights([
- 30.0, 30.0, 10.0, 30.0, 30.0, 5.0,
+ 30.0,
+ 30.0,
+ 10.0,
+ 30.0,
+ 30.0,
+ 5.0,
]);
const geometry = PolylineGeometry.createGeometry(
new PolylineGeometry({
@@ -199,7 +204,7 @@ describe("Core/PolylineGeometry", function () {
width: 10.0,
vertexFormat: VertexFormat.POSITION_ONLY,
arcType: ArcType.RHUMB,
- }),
+ })
);
const attributePositions = geometry.attributes.position.values;
@@ -210,8 +215,8 @@ describe("Core/PolylineGeometry", function () {
Cartesian3.equalsEpsilon(
geometryPosition,
positions[0],
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toBe(true);
Cartesian3.fromArray(attributePositions, 3, geometryPosition);
@@ -219,8 +224,8 @@ describe("Core/PolylineGeometry", function () {
Cartesian3.equalsEpsilon(
geometryPosition,
positions[0],
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toBe(true);
Cartesian3.fromArray(attributePositions, 6, geometryPosition);
@@ -228,8 +233,8 @@ describe("Core/PolylineGeometry", function () {
Cartesian3.equalsEpsilon(
geometryPosition,
positions[1],
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toBe(true);
Cartesian3.fromArray(attributePositions, 9, geometryPosition);
@@ -237,8 +242,8 @@ describe("Core/PolylineGeometry", function () {
Cartesian3.equalsEpsilon(
geometryPosition,
positions[1],
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toBe(true);
});
@@ -268,7 +273,7 @@ describe("Core/PolylineGeometry", function () {
width: 10.0,
vertexFormat: VertexFormat.POSITION_ONLY,
arcType: ArcType.NONE,
- }),
+ })
);
const numVertices = expectedPositions.length * 4 - 4;
@@ -280,7 +285,7 @@ describe("Core/PolylineGeometry", function () {
function attributeArrayEqualsColorArray(
attributeArray,
colorArray,
- colorsPerVertex,
+ colorsPerVertex
) {
colorsPerVertex = defaultValue(colorsPerVertex, false);
let i;
@@ -361,7 +366,7 @@ describe("Core/PolylineGeometry", function () {
width: 10.0,
vertexFormat: VertexFormat.POSITION_ONLY,
arcType: ArcType.NONE,
- }),
+ })
);
const numVertices = expectedPositions.length * 4 - 4;
@@ -369,8 +374,8 @@ describe("Core/PolylineGeometry", function () {
expect(
attributeArrayEqualsColorArray(
line.attributes.color.values,
- expectedColors,
- ),
+ expectedColors
+ )
).toBe(true);
});
@@ -425,7 +430,7 @@ describe("Core/PolylineGeometry", function () {
width: 10.0,
vertexFormat: VertexFormat.DEFAULT,
arcType: ArcType.NONE,
- }),
+ })
);
const numVertices = expectedPositions.length * 4 - 4;
@@ -434,8 +439,8 @@ describe("Core/PolylineGeometry", function () {
attributeArrayEqualsColorArray(
line.attributes.color.values,
expectedColors,
- true,
- ),
+ true
+ )
).toBe(true);
});
@@ -474,7 +479,7 @@ describe("Core/PolylineGeometry", function () {
width: 10.0,
vertexFormat: VertexFormat.DEFAULT,
arcType: ArcType.NONE,
- }),
+ })
);
const numVertices = expectedPositions.length * 4 - 4;
@@ -483,8 +488,8 @@ describe("Core/PolylineGeometry", function () {
attributeArrayEqualsColorArray(
line.attributes.color.values,
expectedColors,
- true,
- ),
+ true
+ )
).toBe(true);
});
@@ -504,14 +509,48 @@ describe("Core/PolylineGeometry", function () {
ellipsoid: new Ellipsoid(12, 13, 14),
});
let packedInstance = [
- 3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 3, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 12, 13,
- 14, 1, 0, 0, 0, 0, 0, 10, 1, 0, 11,
+ 3,
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 3,
+ 1,
+ 0,
+ 0,
+ 1,
+ 0,
+ 1,
+ 0,
+ 1,
+ 0,
+ 0,
+ 1,
+ 1,
+ 12,
+ 13,
+ 14,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 10,
+ 1,
+ 0,
+ 11,
];
createPackableSpecs(
PolylineGeometry,
line,
packedInstance,
- "per vertex colors",
+ "per vertex colors"
);
line = new PolylineGeometry({
@@ -524,7 +563,30 @@ describe("Core/PolylineGeometry", function () {
ellipsoid: new Ellipsoid(12, 13, 14),
});
packedInstance = [
- 3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 12, 13, 14, 1, 0, 0, 0, 0, 0, 10, 0, 0, 11,
+ 3,
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 0,
+ 12,
+ 13,
+ 14,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 10,
+ 0,
+ 0,
+ 11,
];
createPackableSpecs(PolylineGeometry, line, packedInstance, "straight line");
@@ -538,7 +600,30 @@ describe("Core/PolylineGeometry", function () {
ellipsoid: new Ellipsoid(12, 13, 14),
});
packedInstance = [
- 3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 12, 13, 14, 1, 0, 0, 0, 0, 0, 10, 0, 1, 11,
+ 3,
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 0,
+ 12,
+ 13,
+ 14,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 10,
+ 0,
+ 1,
+ 11,
];
createPackableSpecs(PolylineGeometry, line, packedInstance, "geodesic line");
@@ -552,7 +637,30 @@ describe("Core/PolylineGeometry", function () {
ellipsoid: new Ellipsoid(12, 13, 14),
});
packedInstance = [
- 3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 12, 13, 14, 1, 0, 0, 0, 0, 0, 10, 0, 2, 11,
+ 3,
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 0,
+ 12,
+ 13,
+ 14,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 10,
+ 0,
+ 2,
+ 11,
];
createPackableSpecs(PolylineGeometry, line, packedInstance, "rhumb line");
});
diff --git a/packages/engine/Specs/Core/PolylinePipelineSpec.js b/packages/engine/Specs/Core/PolylinePipelineSpec.js
index 25f3790aeaef..2c8d62b014e1 100644
--- a/packages/engine/Specs/Core/PolylinePipelineSpec.js
+++ b/packages/engine/Specs/Core/PolylinePipelineSpec.js
@@ -9,7 +9,10 @@ import {
describe("Core/PolylinePipeline", function () {
it("wrapLongitude", function () {
const positions = Cartesian3.fromDegreesArray([
- -75.163789, 39.952335, -80.2264393, 25.7889689,
+ -75.163789,
+ 39.952335,
+ -80.2264393,
+ 25.7889689,
]);
const segments = PolylinePipeline.wrapLongitude(positions);
expect(segments.lengths.length).toEqual(1);
@@ -61,7 +64,7 @@ describe("Core/PolylinePipeline", function () {
expect(newPositions.length).toEqual(3);
expect(Cartesian3.fromArray(newPositions, 0)).toEqualEpsilon(
Cartesian3.fromDegrees(0, 0, 30),
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
});
@@ -82,13 +85,13 @@ describe("Core/PolylinePipeline", function () {
const p3n = Cartesian3.fromArray(newPositions, 3);
const p2n = Cartesian3.fromArray(newPositions, 6);
expect(Cartesian3.equalsEpsilon(p1, p1n, CesiumMath.EPSILON4)).toEqual(
- true,
+ true
);
expect(Cartesian3.equalsEpsilon(p2, p2n, CesiumMath.EPSILON4)).toEqual(
- true,
+ true
);
expect(Cartesian3.equalsEpsilon(p3, p3n, CesiumMath.EPSILON4)).toEqual(
- true,
+ true
);
});
@@ -128,7 +131,7 @@ describe("Core/PolylinePipeline", function () {
expect(newPositions.length).toEqual(3);
expect(Cartesian3.fromArray(newPositions, 0)).toEqualEpsilon(
Cartesian3.fromDegrees(0, 0, 30),
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
});
@@ -149,13 +152,13 @@ describe("Core/PolylinePipeline", function () {
const p3n = Cartesian3.fromArray(newPositions, 3);
const p2n = Cartesian3.fromArray(newPositions, 6);
expect(Cartesian3.equalsEpsilon(p1, p1n, CesiumMath.EPSILON4)).toEqual(
- true,
+ true
);
expect(Cartesian3.equalsEpsilon(p2, p2n, CesiumMath.EPSILON4)).toEqual(
- true,
+ true
);
expect(Cartesian3.equalsEpsilon(p3, p3n, CesiumMath.EPSILON4)).toEqual(
- true,
+ true
);
});
diff --git a/packages/engine/Specs/Core/PolylineVolumeGeometrySpec.js b/packages/engine/Specs/Core/PolylineVolumeGeometrySpec.js
index 4f3fdb5fd4e7..a78a3b3f02d3 100644
--- a/packages/engine/Specs/Core/PolylineVolumeGeometrySpec.js
+++ b/packages/engine/Specs/Core/PolylineVolumeGeometrySpec.js
@@ -40,7 +40,7 @@ describe("Core/PolylineVolumeGeometry", function () {
new PolylineVolumeGeometry({
polylinePositions: [new Cartesian3()],
shapePositions: shape,
- }),
+ })
);
expect(geometry).toBeUndefined();
});
@@ -54,7 +54,7 @@ describe("Core/PolylineVolumeGeometry", function () {
Cartesian2.UNIT_X,
Cartesian2.UNIT_X,
],
- }),
+ })
);
expect(geometry).toBeUndefined();
});
@@ -64,11 +64,14 @@ describe("Core/PolylineVolumeGeometry", function () {
new PolylineVolumeGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
polylinePositions: Cartesian3.fromDegreesArray([
- 90.0, -30.0, 90.0, -35.0,
+ 90.0,
+ -30.0,
+ 90.0,
+ -35.0,
]),
cornerType: CornerType.MITERED,
shapePositions: shape,
- }),
+ })
);
// 6 positions * 4 box positions * 2 to duplicate for normals + 4 positions * 2 ends
@@ -82,11 +85,14 @@ describe("Core/PolylineVolumeGeometry", function () {
new PolylineVolumeGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
polylinePositions: Cartesian3.fromDegreesArray([
- 90.0, -30.0, 90.0, -35.0,
+ 90.0,
+ -30.0,
+ 90.0,
+ -35.0,
]),
cornerType: CornerType.MITERED,
shapePositions: shape.reverse(),
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(56 * 3);
@@ -98,11 +104,14 @@ describe("Core/PolylineVolumeGeometry", function () {
new PolylineVolumeGeometry({
vertexFormat: VertexFormat.POSITION_NORMAL_AND_ST,
polylinePositions: Cartesian3.fromDegreesArray([
- 90.0, -30.0, 90.0, -35.0,
+ 90.0,
+ -30.0,
+ 90.0,
+ -35.0,
]),
cornerType: CornerType.MITERED,
shapePositions: shape,
- }),
+ })
);
const numVertices = 56;
@@ -119,11 +128,14 @@ describe("Core/PolylineVolumeGeometry", function () {
new PolylineVolumeGeometry({
vertexFormat: VertexFormat.ALL,
polylinePositions: Cartesian3.fromDegreesArray([
- 90.0, -30.0, 90.0, -35.0,
+ 90.0,
+ -30.0,
+ 90.0,
+ -35.0,
]),
cornerType: CornerType.MITERED,
shapePositions: shape,
- }),
+ })
);
const numVertices = 56;
@@ -141,11 +153,16 @@ describe("Core/PolylineVolumeGeometry", function () {
new PolylineVolumeGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
polylinePositions: Cartesian3.fromDegreesArray([
- 90.0, -30.0, 90.0, -31.0, 91.0, -31.0,
+ 90.0,
+ -30.0,
+ 90.0,
+ -31.0,
+ 91.0,
+ -31.0,
]),
cornerType: CornerType.MITERED,
shapePositions: shape,
- }),
+ })
);
// (3 duplicates * 2 ends + 2 duplicates * 2 middle points + 4 duplicates * 1 corner) * 4 box positions
@@ -159,11 +176,16 @@ describe("Core/PolylineVolumeGeometry", function () {
new PolylineVolumeGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
polylinePositions: Cartesian3.fromDegreesArray([
- 90.0, -30.0, 90.0, -31.0, 89.0, -31.0,
+ 90.0,
+ -30.0,
+ 90.0,
+ -31.0,
+ 89.0,
+ -31.0,
]),
cornerType: CornerType.MITERED,
shapePositions: shape,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(56 * 3);
@@ -175,11 +197,18 @@ describe("Core/PolylineVolumeGeometry", function () {
new PolylineVolumeGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
polylinePositions: Cartesian3.fromDegreesArray([
- 90.0, -30.0, 90.0, -31.0, 89.0, -31.0, 89.0, -32.0,
+ 90.0,
+ -30.0,
+ 90.0,
+ -31.0,
+ 89.0,
+ -31.0,
+ 89.0,
+ -32.0,
]),
cornerType: CornerType.ROUNDED,
shapePositions: shape,
- }),
+ })
);
const corners = 36 * 4 * 4; // positions * 4 for shape * 4 for normal duplication
@@ -194,11 +223,18 @@ describe("Core/PolylineVolumeGeometry", function () {
new PolylineVolumeGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
polylinePositions: Cartesian3.fromDegreesArray([
- 90.0, -30.0, 90.0, -31.0, 89.0, -31.0, 89.0, -32.0,
+ 90.0,
+ -30.0,
+ 90.0,
+ -31.0,
+ 89.0,
+ -31.0,
+ 89.0,
+ -32.0,
]),
cornerType: CornerType.BEVELED,
shapePositions: shape,
- }),
+ })
);
const corners = 4 * 4; // 4 for shape * 4 for normal duplication
@@ -213,14 +249,25 @@ describe("Core/PolylineVolumeGeometry", function () {
new PolylineVolumeGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
polylinePositions: Cartesian3.fromDegreesArrayHeights([
- 2.00571672577652, 52.7781459942399, 500, 1.99188457974115,
- 52.7764958852886, 500, 2.01325961458495, 52.7674170680511, 500,
- 1.98708058340534, 52.7733979856253, 500, 2.00634853946644,
- 52.7650460748473, 500,
+ 2.00571672577652,
+ 52.7781459942399,
+ 500,
+ 1.99188457974115,
+ 52.7764958852886,
+ 500,
+ 2.01325961458495,
+ 52.7674170680511,
+ 500,
+ 1.98708058340534,
+ 52.7733979856253,
+ 500,
+ 2.00634853946644,
+ 52.7650460748473,
+ 500,
]),
cornerType: CornerType.BEVELED,
shapePositions: shape,
- }),
+ })
);
// (8 positions * 3 duplications + 1 duplication * 6 corners) * 4 for shape
@@ -234,12 +281,17 @@ describe("Core/PolylineVolumeGeometry", function () {
new PolylineVolumeGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
polylinePositions: Cartesian3.fromDegreesArray([
- -67.655, 0.0, -67.655, 15.0, -67.655, 20.0,
+ -67.655,
+ 0.0,
+ -67.655,
+ 15.0,
+ -67.655,
+ 20.0,
]),
cornerType: CornerType.BEVELED,
shapePositions: shape,
granularity: Math.PI / 6.0,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(32 * 3); // 4 positions * 2 for duplication * 4 for shape
@@ -265,8 +317,34 @@ describe("Core/PolylineVolumeGeometry", function () {
granularity: 0.1,
});
const packedInstance = [
- 3.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 3.0, 0.0, 0.0, 1.0, 0.0,
- 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, 0.1,
+ 3.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 3.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 2.0,
+ 0.1,
];
createPackableSpecs(PolylineVolumeGeometry, volume, packedInstance);
});
diff --git a/packages/engine/Specs/Core/PolylineVolumeOutlineGeometrySpec.js b/packages/engine/Specs/Core/PolylineVolumeOutlineGeometrySpec.js
index e5b4fd46b27f..f887fc86a97f 100644
--- a/packages/engine/Specs/Core/PolylineVolumeOutlineGeometrySpec.js
+++ b/packages/engine/Specs/Core/PolylineVolumeOutlineGeometrySpec.js
@@ -39,7 +39,7 @@ describe("Core/PolylineVolumeOutlineGeometry", function () {
new PolylineVolumeOutlineGeometry({
polylinePositions: [new Cartesian3()],
shapePositions: shape,
- }),
+ })
);
expect(geometry).toBeUndefined();
});
@@ -53,7 +53,7 @@ describe("Core/PolylineVolumeOutlineGeometry", function () {
Cartesian2.UNIT_X,
Cartesian2.UNIT_X,
],
- }),
+ })
);
expect(geometry).toBeUndefined();
});
@@ -62,11 +62,14 @@ describe("Core/PolylineVolumeOutlineGeometry", function () {
const m = PolylineVolumeOutlineGeometry.createGeometry(
new PolylineVolumeOutlineGeometry({
polylinePositions: Cartesian3.fromDegreesArray([
- 90.0, -30.0, 90.0, -35.0,
+ 90.0,
+ -30.0,
+ 90.0,
+ -35.0,
]),
shapePositions: shape,
cornerType: CornerType.MITERED,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(24 * 3); // 6 polyline positions * 4 box positions
@@ -77,11 +80,14 @@ describe("Core/PolylineVolumeOutlineGeometry", function () {
const m = PolylineVolumeOutlineGeometry.createGeometry(
new PolylineVolumeOutlineGeometry({
polylinePositions: Cartesian3.fromDegreesArray([
- 90.0, -30.0, 90.0, -35.0,
+ 90.0,
+ -30.0,
+ 90.0,
+ -35.0,
]),
shapePositions: shape.reverse(),
cornerType: CornerType.MITERED,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(24 * 3);
@@ -92,11 +98,16 @@ describe("Core/PolylineVolumeOutlineGeometry", function () {
const m = PolylineVolumeOutlineGeometry.createGeometry(
new PolylineVolumeOutlineGeometry({
polylinePositions: Cartesian3.fromDegreesArray([
- 90.0, -30.0, 90.0, -31.0, 91.0, -31.0,
+ 90.0,
+ -30.0,
+ 90.0,
+ -31.0,
+ 91.0,
+ -31.0,
]),
cornerType: CornerType.MITERED,
shapePositions: shape,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(20 * 3); // (2 ends + 3 corner positions) * 4 box positions
@@ -107,11 +118,16 @@ describe("Core/PolylineVolumeOutlineGeometry", function () {
const m = PolylineVolumeOutlineGeometry.createGeometry(
new PolylineVolumeOutlineGeometry({
polylinePositions: Cartesian3.fromDegreesArray([
- 90.0, -30.0, 90.0, -31.0, 89.0, -31.0,
+ 90.0,
+ -30.0,
+ 90.0,
+ -31.0,
+ 89.0,
+ -31.0,
]),
cornerType: CornerType.MITERED,
shapePositions: shape,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(20 * 3);
@@ -122,11 +138,18 @@ describe("Core/PolylineVolumeOutlineGeometry", function () {
const m = PolylineVolumeOutlineGeometry.createGeometry(
new PolylineVolumeOutlineGeometry({
polylinePositions: Cartesian3.fromDegreesArray([
- 90.0, -30.0, 90.0, -31.0, 89.0, -31.0, 89.0, -32.0,
+ 90.0,
+ -30.0,
+ 90.0,
+ -31.0,
+ 89.0,
+ -31.0,
+ 89.0,
+ -32.0,
]),
cornerType: CornerType.ROUNDED,
shapePositions: shape,
- }),
+ })
);
const corners = 36 * 4;
@@ -140,11 +163,18 @@ describe("Core/PolylineVolumeOutlineGeometry", function () {
const m = PolylineVolumeOutlineGeometry.createGeometry(
new PolylineVolumeOutlineGeometry({
polylinePositions: Cartesian3.fromDegreesArray([
- 90.0, -30.0, 90.0, -31.0, 89.0, -31.0, 89.0, -32.0,
+ 90.0,
+ -30.0,
+ 90.0,
+ -31.0,
+ 89.0,
+ -31.0,
+ 89.0,
+ -32.0,
]),
cornerType: CornerType.BEVELED,
shapePositions: shape,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(40 * 3); // 10 positions * 4 for shape
@@ -169,8 +199,28 @@ describe("Core/PolylineVolumeOutlineGeometry", function () {
granularity: 0.1,
});
const packedInstance = [
- 3.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 3.0, 0.0, 0.0, 1.0, 0.0,
- 0.0, 1.0, 1.0, 1.0, 1.0, 2.0, 0.1,
+ 3.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 3.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 2.0,
+ 0.1,
];
createPackableSpecs(PolylineVolumeOutlineGeometry, volume, packedInstance);
});
diff --git a/packages/engine/Specs/Core/QuadraticRealPolynomialSpec.js b/packages/engine/Specs/Core/QuadraticRealPolynomialSpec.js
index bcddbf851244..283e769fab98 100644
--- a/packages/engine/Specs/Core/QuadraticRealPolynomialSpec.js
+++ b/packages/engine/Specs/Core/QuadraticRealPolynomialSpec.js
@@ -23,7 +23,7 @@ describe("Core/QuadraticRealPolynomial", function () {
const discriminant = QuadraticRealPolynomial.computeDiscriminant(
1.0,
2.0,
- 3.0,
+ 3.0
);
expect(discriminant).toEqual(-8.0);
});
@@ -64,7 +64,7 @@ describe("Core/QuadraticRealPolynomial", function () {
const roots = QuadraticRealPolynomial.computeRealRoots(
2.0,
-3.999999999999999,
- 2,
+ 2
);
expect(roots.length).toEqual(2);
expect(roots[0]).toEqualEpsilon(1.0, CesiumMath.EPSILON15);
diff --git a/packages/engine/Specs/Core/QuantizedMeshTerrainDataSpec.js b/packages/engine/Specs/Core/QuantizedMeshTerrainDataSpec.js
index 0706bc4688dd..11097df0680f 100644
--- a/packages/engine/Specs/Core/QuantizedMeshTerrainDataSpec.js
+++ b/packages/engine/Specs/Core/QuantizedMeshTerrainDataSpec.js
@@ -46,13 +46,13 @@ describe("Core/QuantizedMeshTerrainData", function () {
interceptCoordinate1,
interceptCoordinate2,
otherCoordinate1,
- otherCoordinate2,
+ otherCoordinate2
) {
return CesiumMath.lerp(
otherCoordinate1,
otherCoordinate2,
(0.5 - interceptCoordinate1) /
- (interceptCoordinate2 - interceptCoordinate1),
+ (interceptCoordinate2 - interceptCoordinate1)
);
}
@@ -103,7 +103,7 @@ describe("Core/QuantizedMeshTerrainData", function () {
const tilingScheme = new GeographicTilingScheme();
return Promise.resolve(
- data.createMesh({ tilingScheme: tilingScheme, x: 0, y: 0, level: 0 }),
+ data.createMesh({ tilingScheme: tilingScheme, x: 0, y: 0, level: 0 })
)
.then(function () {
const swPromise = data.upsample(tilingScheme, 0, 0, 0, 0, 0, 1);
@@ -199,7 +199,7 @@ describe("Core/QuantizedMeshTerrainData", function () {
const tilingScheme = new GeographicTilingScheme();
return Promise.resolve(
- data.createMesh({ tilingScheme: tilingScheme, x: 0, y: 0, level: 0 }),
+ data.createMesh({ tilingScheme: tilingScheme, x: 0, y: 0, level: 0 })
)
.then(function () {
const swPromise = data.upsample(tilingScheme, 0, 0, 0, 0, 0, 1);
@@ -268,7 +268,7 @@ describe("Core/QuantizedMeshTerrainData", function () {
const tilingScheme = new GeographicTilingScheme();
return Promise.resolve(
- data.createMesh({ tilingScheme: tilingScheme, x: 0, y: 0, level: 0 }),
+ data.createMesh({ tilingScheme: tilingScheme, x: 0, y: 0, level: 0 })
)
.then(function () {
return data.upsample(tilingScheme, 0, 0, 0, 0, 0, 1);
@@ -297,7 +297,7 @@ describe("Core/QuantizedMeshTerrainData", function () {
uBuffer,
vBuffer,
horizontalIntercept(0.0, 0.0, 0.125, 0.75) * 2.0,
- 0.0,
+ 0.0
);
expect(v40).not.toBe(-1);
const v42 = findVertexWithCoordinates(
@@ -307,23 +307,23 @@ describe("Core/QuantizedMeshTerrainData", function () {
0.5,
verticalIntercept(1.0, 0.0, 0.125, 0.75),
0.125,
- 0.75,
+ 0.75
) * 2.0,
- 0.0,
+ 0.0
);
expect(v42).not.toBe(-1);
const v402 = findVertexWithCoordinates(
uBuffer,
vBuffer,
horizontalIntercept(0.5, 0.0, 0.125, 0.75) * 2.0,
- 0.0,
+ 0.0
);
expect(v402).not.toBe(-1);
const v43 = findVertexWithCoordinates(
uBuffer,
vBuffer,
1.0,
- verticalIntercept(1.0, 1.0, 0.125, 0.75) * 2.0 - 1.0,
+ verticalIntercept(1.0, 1.0, 0.125, 0.75) * 2.0 - 1.0
);
expect(v43).not.toBe(-1);
@@ -379,7 +379,7 @@ describe("Core/QuantizedMeshTerrainData", function () {
const tilingScheme = new GeographicTilingScheme();
return Promise.resolve(
- data.createMesh({ tilingScheme: tilingScheme, x: 0, y: 0, level: 0 }),
+ data.createMesh({ tilingScheme: tilingScheme, x: 0, y: 0, level: 0 })
)
.then(function () {
const nwPromise = data.upsample(tilingScheme, 0, 0, 0, 0, 0, 1);
@@ -421,7 +421,7 @@ describe("Core/QuantizedMeshTerrainData", function () {
uBuffer,
vBuffer,
horizontalIntercept(0.0, 0.0, 0.5, 0.75) * 2.0,
- 0.0,
+ 0.0
);
expect(v40).not.toBe(-1);
expect(upsampleResults[0]._westIndices.length).toBe(2);
@@ -438,7 +438,7 @@ describe("Core/QuantizedMeshTerrainData", function () {
uBuffer,
vBuffer,
horizontalIntercept(1.0, 0.0, 0.5, 0.75) * 0.5,
- 0.0,
+ 0.0
);
expect(v42).not.toBe(-1);
expect(upsampleResults[1]._westIndices.length).toBe(3);
@@ -566,7 +566,7 @@ describe("Core/QuantizedMeshTerrainData", function () {
expect(mesh.minimumHeight).toBe(data._minimumHeight);
expect(mesh.maximumHeight).toBe(data._maximumHeight);
expect(mesh.boundingSphere3D.radius).toBe(
- data._boundingSphere.radius,
+ data._boundingSphere.radius
);
expect(mesh.encoding.exaggeration).toBe(2.0);
});
@@ -700,7 +700,7 @@ describe("Core/QuantizedMeshTerrainData", function () {
});
expect(mesh.interpolateHeight(rectangle, 0.0, 0.0)).toBe(
- mesh.interpolateHeight(rectangle, rectangle.east, rectangle.south),
+ mesh.interpolateHeight(rectangle, rectangle.east, rectangle.south)
);
});
@@ -713,11 +713,20 @@ describe("Core/QuantizedMeshTerrainData", function () {
quantizedVertices: new Uint16Array([
// order is sw nw se ne
// u
- 0, 0, 32767, 32767,
+ 0,
+ 0,
+ 32767,
+ 32767,
// v
- 0, 32767, 0, 32767,
+ 0,
+ 32767,
+ 0,
+ 32767,
// heights
- 16384, 0, 32767, 16384,
+ 16384,
+ 0,
+ 32767,
+ 16384,
]),
indices: new Uint16Array([0, 3, 1, 0, 2, 3]),
boundingSphere: new BoundingSphere(),
@@ -767,11 +776,20 @@ describe("Core/QuantizedMeshTerrainData", function () {
quantizedVertices: new Uint16Array([
// order is sw nw se ne
// u
- 0, 0, 32767, 32767,
+ 0,
+ 0,
+ 32767,
+ 32767,
// v
- 0, 32767, 0, 32767,
+ 0,
+ 32767,
+ 0,
+ 32767,
// heights
- 16384, 0, 32767, 16384,
+ 16384,
+ 0,
+ 32767,
+ 16384,
]),
indices: new Uint16Array([0, 3, 1, 0, 2, 3]),
boundingSphere: new BoundingSphere(),
@@ -819,11 +837,20 @@ describe("Core/QuantizedMeshTerrainData", function () {
quantizedVertices: new Uint16Array([
// order is sw nw se ne
// u
- 0, 0, 32767, 32767,
+ 0,
+ 0,
+ 32767,
+ 32767,
// v
- 0, 32767, 0, 32767,
+ 0,
+ 32767,
+ 0,
+ 32767,
// heights
- 16384, 0, 32767, 16384,
+ 16384,
+ 0,
+ 32767,
+ 16384,
]),
indices: new Uint16Array([0, 3, 1, 0, 2, 3]),
boundingSphere: new BoundingSphere(),
@@ -851,11 +878,20 @@ describe("Core/QuantizedMeshTerrainData", function () {
quantizedVertices: new Uint16Array([
// order is sw nw se ne
// u
- 0, 0, 32767, 32767,
+ 0,
+ 0,
+ 32767,
+ 32767,
// v
- 0, 32767, 0, 32767,
+ 0,
+ 32767,
+ 0,
+ 32767,
// heights
- 16384, 0, 32767, 16384,
+ 16384,
+ 0,
+ 32767,
+ 16384,
]),
indices: new Uint16Array([0, 3, 1, 0, 2, 3]),
boundingSphere: new BoundingSphere(),
@@ -884,11 +920,20 @@ describe("Core/QuantizedMeshTerrainData", function () {
quantizedVertices: new Uint16Array([
// order is sw nw se ne
// u
- 0, 0, 32767, 32767,
+ 0,
+ 0,
+ 32767,
+ 32767,
// v
- 0, 32767, 0, 32767,
+ 0,
+ 32767,
+ 0,
+ 32767,
// heights
- 16384, 0, 32767, 16384,
+ 16384,
+ 0,
+ 32767,
+ 16384,
]),
indices: new Uint16Array([0, 3, 1, 0, 2, 3]),
boundingSphere: new BoundingSphere(),
@@ -917,11 +962,20 @@ describe("Core/QuantizedMeshTerrainData", function () {
quantizedVertices: new Uint16Array([
// order is sw nw se ne
// u
- 0, 0, 32767, 32767,
+ 0,
+ 0,
+ 32767,
+ 32767,
// v
- 0, 32767, 0, 32767,
+ 0,
+ 32767,
+ 0,
+ 32767,
// heights
- 16384, 0, 32767, 16384,
+ 16384,
+ 0,
+ 32767,
+ 16384,
]),
indices: new Uint16Array([0, 3, 1, 0, 2, 3]),
boundingSphere: new BoundingSphere(),
@@ -950,11 +1004,20 @@ describe("Core/QuantizedMeshTerrainData", function () {
quantizedVertices: new Uint16Array([
// order is sw nw se ne
// u
- 0, 0, 32767, 32767,
+ 0,
+ 0,
+ 32767,
+ 32767,
// v
- 0, 32767, 0, 32767,
+ 0,
+ 32767,
+ 0,
+ 32767,
// heights
- 16384, 0, 32767, 16384,
+ 16384,
+ 0,
+ 32767,
+ 16384,
]),
indices: new Uint16Array([0, 3, 1, 0, 2, 3]),
boundingSphere: new BoundingSphere(),
diff --git a/packages/engine/Specs/Core/QuarticRealPolynomialSpec.js b/packages/engine/Specs/Core/QuarticRealPolynomialSpec.js
index 30c1594c6c2f..ff3259814cfd 100644
--- a/packages/engine/Specs/Core/QuarticRealPolynomialSpec.js
+++ b/packages/engine/Specs/Core/QuarticRealPolynomialSpec.js
@@ -108,7 +108,7 @@ describe("Core/QuarticRealPolynomial", function () {
-16.0,
48.0,
-64.0,
- 32.0,
+ 32.0
);
expect(roots.length).toEqual(4);
expect(roots[0]).toEqualEpsilon(2.0, CesiumMath.EPSILON15);
@@ -123,7 +123,7 @@ describe("Core/QuarticRealPolynomial", function () {
0.0,
-4.0,
0.0,
- 2.0,
+ 2.0
);
expect(roots.length).toEqual(4);
expect(roots[0]).toEqualEpsilon(-1.0, CesiumMath.EPSILON15);
@@ -138,7 +138,7 @@ describe("Core/QuarticRealPolynomial", function () {
-8.0,
16.0,
-16.0,
- 6.0,
+ 6.0
);
expect(roots.length).toEqual(2);
expect(roots[0]).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
@@ -151,7 +151,7 @@ describe("Core/QuarticRealPolynomial", function () {
8.0,
-6.0,
-20.0,
- 16.0,
+ 16.0
);
expect(roots.length).toEqual(4);
expect(roots[0]).toEqualEpsilon(-4.0, CesiumMath.EPSILON15);
@@ -166,7 +166,7 @@ describe("Core/QuarticRealPolynomial", function () {
4.0,
-26.0,
-28.0,
- 48.0,
+ 48.0
);
expect(roots.length).toEqual(4);
expect(roots[0]).toEqualEpsilon(-4.0, CesiumMath.EPSILON15);
@@ -181,7 +181,7 @@ describe("Core/QuarticRealPolynomial", function () {
-8.0,
14.0,
-8.0,
- 3.0,
+ 3.0
);
expect(roots.length).toEqual(0);
});
@@ -192,7 +192,7 @@ describe("Core/QuarticRealPolynomial", function () {
2.0,
6.0,
-26.0,
- -30.0,
+ -30.0
);
expect(roots.length).toEqual(3);
expect(roots[0]).toEqualEpsilon(-5.0, CesiumMath.EPSILON15);
diff --git a/packages/engine/Specs/Core/QuaternionSpec.js b/packages/engine/Specs/Core/QuaternionSpec.js
index a9b103647518..b5186d4e1eeb 100644
--- a/packages/engine/Specs/Core/QuaternionSpec.js
+++ b/packages/engine/Specs/Core/QuaternionSpec.js
@@ -52,36 +52,36 @@ describe("Core/Quaternion", function () {
it("fromRotationMatrix works when m22 is max", function () {
const q = Quaternion.fromAxisAngle(
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- Math.PI,
+ Math.PI
);
const rotation = new Matrix3(-1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 1.0);
expect(Quaternion.fromRotationMatrix(rotation)).toEqualEpsilon(
q,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
it("fromRotationMatrix works when m11 is max", function () {
const q = Quaternion.fromAxisAngle(
Cartesian3.negate(Cartesian3.UNIT_Y, new Cartesian3()),
- Math.PI,
+ Math.PI
);
const rotation = new Matrix3(-1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, -1.0);
expect(Quaternion.fromRotationMatrix(rotation)).toEqualEpsilon(
q,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
it("fromRotationMatrix works when m00 is max", function () {
const q = Quaternion.fromAxisAngle(
Cartesian3.negate(Cartesian3.UNIT_X, new Cartesian3()),
- Math.PI,
+ Math.PI
);
const rotation = new Matrix3(1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0);
expect(Quaternion.fromRotationMatrix(rotation)).toEqualEpsilon(
q,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -90,7 +90,7 @@ describe("Core/Quaternion", function () {
const q = new Quaternion(0.0, 0.0, 0.0, 1.0);
expect(Quaternion.fromRotationMatrix(rotation)).toEqualEpsilon(
q,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -107,17 +107,17 @@ describe("Core/Quaternion", function () {
const direction = new Cartesian3(
-0.2349326833984488,
0.8513513009480378,
- 0.46904967396353314,
+ 0.46904967396353314
);
const up = new Cartesian3(
0.12477198625717335,
-0.4521499177166376,
- 0.8831717858696695,
+ 0.8831717858696695
);
const right = new Cartesian3(
0.9639702203483635,
0.26601017702986895,
- 6.456422901079747e-10,
+ 6.456422901079747e-10
);
const matrix = new Matrix3(
right.x,
@@ -128,12 +128,12 @@ describe("Core/Quaternion", function () {
up.z,
-direction.x,
-direction.y,
- -direction.z,
+ -direction.z
);
const quaternion = Quaternion.fromRotationMatrix(matrix);
expect(Matrix3.fromQuaternion(quaternion)).toEqualEpsilon(
matrix,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -143,7 +143,7 @@ describe("Core/Quaternion", function () {
const quaternion = Quaternion.fromHeadingPitchRoll(hpr);
expect(Matrix3.fromQuaternion(quaternion)).toEqualEpsilon(
Matrix3.fromRotationZ(-angle),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
});
@@ -153,7 +153,7 @@ describe("Core/Quaternion", function () {
const quaternion = Quaternion.fromHeadingPitchRoll(hpr);
expect(Matrix3.fromQuaternion(quaternion)).toEqualEpsilon(
Matrix3.fromRotationY(-angle),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
});
@@ -163,7 +163,7 @@ describe("Core/Quaternion", function () {
const quaternion = Quaternion.fromHeadingPitchRoll(hpr);
expect(Matrix3.fromQuaternion(quaternion)).toEqualEpsilon(
Matrix3.fromRotationX(angle),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
});
@@ -176,7 +176,7 @@ describe("Core/Quaternion", function () {
Matrix3.multiply(Matrix3.fromRotationZ(-angle), expected, expected);
expect(Matrix3.fromQuaternion(quaternion)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
});
@@ -191,7 +191,7 @@ describe("Core/Quaternion", function () {
Matrix3.multiply(Matrix3.fromRotationZ(-heading), expected, expected);
expect(Matrix3.fromQuaternion(quaternion)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
});
@@ -201,7 +201,7 @@ describe("Core/Quaternion", function () {
const result = new Quaternion();
const quaternion = Quaternion.fromHeadingPitchRoll(hpr, result);
const expected = Quaternion.fromRotationMatrix(
- Matrix3.fromRotationX(angle),
+ Matrix3.fromRotationX(angle)
);
expect(quaternion).toBe(result);
expect(quaternion).toEqualEpsilon(expected, CesiumMath.EPSILON11);
@@ -284,7 +284,7 @@ describe("Core/Quaternion", function () {
-2.0 / magnitudeSquared,
-3.0 / magnitudeSquared,
-4.0 / magnitudeSquared,
- 5.0 / magnitudeSquared,
+ 5.0 / magnitudeSquared
);
const result = new Quaternion();
const returnedResult = Quaternion.inverse(quaternion, result);
@@ -299,7 +299,7 @@ describe("Core/Quaternion", function () {
-2.0 / magnitudeSquared,
-3.0 / magnitudeSquared,
-4.0 / magnitudeSquared,
- 5.0 / magnitudeSquared,
+ 5.0 / magnitudeSquared
);
const returnedResult = Quaternion.inverse(quaternion, quaternion);
expect(returnedResult).toEqual(expected);
@@ -381,7 +381,7 @@ describe("Core/Quaternion", function () {
const returnedResult = Quaternion.multiplyByScalar(
quaternion,
scalar,
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expectedResult);
@@ -394,7 +394,7 @@ describe("Core/Quaternion", function () {
const returnedResult = Quaternion.multiplyByScalar(
quaternion,
scalar,
- quaternion,
+ quaternion
);
expect(quaternion).toBe(returnedResult);
expect(quaternion).toEqual(expectedResult);
@@ -408,7 +408,7 @@ describe("Core/Quaternion", function () {
const returnedResult = Quaternion.divideByScalar(
quaternion,
scalar,
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(result).toEqual(expectedResult);
@@ -421,7 +421,7 @@ describe("Core/Quaternion", function () {
const returnedResult = Quaternion.divideByScalar(
quaternion,
scalar,
- quaternion,
+ quaternion
);
expect(quaternion).toBe(returnedResult);
expect(quaternion).toEqual(expectedResult);
@@ -434,13 +434,13 @@ describe("Core/Quaternion", function () {
const sin = Math.sin(angle / 2.0);
const expected = Cartesian3.normalize(
new Cartesian3(2.0, 3.0, 6.0),
- new Cartesian3(),
+ new Cartesian3()
);
const quaternion = new Quaternion(
sin * expected.x,
sin * expected.y,
sin * expected.z,
- cos,
+ cos
);
const result = new Cartesian3();
const returnedResult = Quaternion.computeAxis(quaternion, result);
@@ -473,13 +473,13 @@ describe("Core/Quaternion", function () {
const sin = Math.sin(angle / 2.0);
const axis = Cartesian3.normalize(
new Cartesian3(2.0, 3.0, 6.0),
- new Cartesian3(),
+ new Cartesian3()
);
const quaternion = new Quaternion(
sin * axis.x,
sin * axis.y,
sin * axis.z,
- cos,
+ cos
);
const result = Quaternion.computeAngle(quaternion);
expect(result).toEqualEpsilon(angle, CesiumMath.EPSILON15);
@@ -544,19 +544,19 @@ describe("Core/Quaternion", function () {
it("slerp works", function () {
const start = Quaternion.normalize(
new Quaternion(0.0, 0.0, 0.0, 1.0),
- new Quaternion(),
+ new Quaternion()
);
const end = new Quaternion(
0.0,
0.0,
Math.sin(CesiumMath.PI_OVER_FOUR),
- Math.cos(CesiumMath.PI_OVER_FOUR),
+ Math.cos(CesiumMath.PI_OVER_FOUR)
);
const expected = new Quaternion(
0.0,
0.0,
Math.sin(Math.PI / 8.0),
- Math.cos(Math.PI / 8.0),
+ Math.cos(Math.PI / 8.0)
);
const result = new Quaternion();
@@ -568,19 +568,19 @@ describe("Core/Quaternion", function () {
it("slerp works with a result parameter that is an input parameter", function () {
const start = Quaternion.normalize(
new Quaternion(0.0, 0.0, 0.0, 1.0),
- new Quaternion(),
+ new Quaternion()
);
const end = new Quaternion(
0.0,
0.0,
Math.sin(CesiumMath.PI_OVER_FOUR),
- Math.cos(CesiumMath.PI_OVER_FOUR),
+ Math.cos(CesiumMath.PI_OVER_FOUR)
);
const expected = new Quaternion(
0.0,
0.0,
Math.sin(Math.PI / 8.0),
- Math.cos(Math.PI / 8.0),
+ Math.cos(Math.PI / 8.0)
);
const returnedResult = Quaternion.slerp(start, end, 0.5, start);
@@ -591,23 +591,23 @@ describe("Core/Quaternion", function () {
it("slerp works with obtuse angles", function () {
const start = Quaternion.normalize(
new Quaternion(0.0, 0.0, 0.0, -1.0),
- new Quaternion(),
+ new Quaternion()
);
const end = new Quaternion(
0.0,
0.0,
Math.sin(CesiumMath.PI_OVER_FOUR),
- Math.cos(CesiumMath.PI_OVER_FOUR),
+ Math.cos(CesiumMath.PI_OVER_FOUR)
);
const expected = new Quaternion(
0.0,
0.0,
-Math.sin(Math.PI / 8.0),
- -Math.cos(Math.PI / 8.0),
+ -Math.cos(Math.PI / 8.0)
);
expect(Quaternion.slerp(start, end, 0.5, new Quaternion())).toEqualEpsilon(
expected,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -634,7 +634,7 @@ describe("Core/Quaternion", function () {
it("log works", function () {
const axis = Cartesian3.normalize(
new Cartesian3(1.0, -1.0, 1.0),
- new Cartesian3(),
+ new Cartesian3()
);
const angle = CesiumMath.PI_OVER_FOUR;
const quat = Quaternion.fromAxisAngle(axis, angle);
@@ -644,7 +644,7 @@ describe("Core/Quaternion", function () {
const expected = Cartesian3.multiplyByScalar(
axis,
angle * 0.5,
- new Cartesian3(),
+ new Cartesian3()
);
expect(log).toBe(result);
expect(log).toEqualEpsilon(expected, CesiumMath.EPSILON15);
@@ -653,13 +653,13 @@ describe("Core/Quaternion", function () {
it("exp works", function () {
const axis = Cartesian3.normalize(
new Cartesian3(1.0, -1.0, 1.0),
- new Cartesian3(),
+ new Cartesian3()
);
const angle = CesiumMath.PI_OVER_FOUR;
const cartesian = Cartesian3.multiplyByScalar(
axis,
angle * 0.5,
- new Cartesian3(),
+ new Cartesian3()
);
const result = new Quaternion();
@@ -673,15 +673,15 @@ describe("Core/Quaternion", function () {
const q0 = Quaternion.fromAxisAngle(Cartesian3.UNIT_X, 0.0);
const q1 = Quaternion.fromAxisAngle(
Cartesian3.UNIT_X,
- CesiumMath.PI_OVER_FOUR,
+ CesiumMath.PI_OVER_FOUR
);
const q2 = Quaternion.fromAxisAngle(
Cartesian3.UNIT_Z,
- CesiumMath.PI_OVER_FOUR,
+ CesiumMath.PI_OVER_FOUR
);
const q3 = Quaternion.fromAxisAngle(
Cartesian3.UNIT_X,
- -CesiumMath.PI_OVER_FOUR,
+ -CesiumMath.PI_OVER_FOUR
);
const s1Result = new Quaternion();
@@ -699,19 +699,19 @@ describe("Core/Quaternion", function () {
it("fastSlerp works", function () {
const start = Quaternion.normalize(
new Quaternion(0.0, 0.0, 0.0, 1.0),
- new Quaternion(),
+ new Quaternion()
);
const end = new Quaternion(
0.0,
0.0,
Math.sin(CesiumMath.PI_OVER_FOUR),
- Math.cos(CesiumMath.PI_OVER_FOUR),
+ Math.cos(CesiumMath.PI_OVER_FOUR)
);
const expected = new Quaternion(
0.0,
0.0,
Math.sin(Math.PI / 8.0),
- Math.cos(Math.PI / 8.0),
+ Math.cos(Math.PI / 8.0)
);
const result = new Quaternion();
@@ -723,19 +723,19 @@ describe("Core/Quaternion", function () {
it("fastSlerp works with a result parameter that is an input parameter", function () {
const start = Quaternion.normalize(
new Quaternion(0.0, 0.0, 0.0, 1.0),
- new Quaternion(),
+ new Quaternion()
);
const end = new Quaternion(
0.0,
0.0,
Math.sin(CesiumMath.PI_OVER_FOUR),
- Math.cos(CesiumMath.PI_OVER_FOUR),
+ Math.cos(CesiumMath.PI_OVER_FOUR)
);
const expected = new Quaternion(
0.0,
0.0,
Math.sin(Math.PI / 8.0),
- Math.cos(Math.PI / 8.0),
+ Math.cos(Math.PI / 8.0)
);
const returnedResult = Quaternion.fastSlerp(start, end, 0.5, start);
@@ -746,35 +746,35 @@ describe("Core/Quaternion", function () {
it("fastSlerp works with obtuse angles", function () {
const start = Quaternion.normalize(
new Quaternion(0.0, 0.0, 0.0, -1.0),
- new Quaternion(),
+ new Quaternion()
);
const end = new Quaternion(
0.0,
0.0,
Math.sin(CesiumMath.PI_OVER_FOUR),
- Math.cos(CesiumMath.PI_OVER_FOUR),
+ Math.cos(CesiumMath.PI_OVER_FOUR)
);
const expected = new Quaternion(
0.0,
0.0,
-Math.sin(Math.PI / 8.0),
- -Math.cos(Math.PI / 8.0),
+ -Math.cos(Math.PI / 8.0)
);
expect(
- Quaternion.fastSlerp(start, end, 0.5, new Quaternion()),
+ Quaternion.fastSlerp(start, end, 0.5, new Quaternion())
).toEqualEpsilon(expected, CesiumMath.EPSILON6);
});
it("fastSlerp vs slerp", function () {
const start = Quaternion.normalize(
new Quaternion(0.0, 0.0, 0.0, 1.0),
- new Quaternion(),
+ new Quaternion()
);
const end = new Quaternion(
0.0,
0.0,
Math.sin(CesiumMath.PI_OVER_FOUR),
- Math.cos(CesiumMath.PI_OVER_FOUR),
+ Math.cos(CesiumMath.PI_OVER_FOUR)
);
let expected = Quaternion.slerp(start, end, 0.25, new Quaternion());
@@ -794,15 +794,15 @@ describe("Core/Quaternion", function () {
const q0 = Quaternion.fromAxisAngle(Cartesian3.UNIT_X, 0.0);
const q1 = Quaternion.fromAxisAngle(
Cartesian3.UNIT_X,
- CesiumMath.PI_OVER_FOUR,
+ CesiumMath.PI_OVER_FOUR
);
const q2 = Quaternion.fromAxisAngle(
Cartesian3.UNIT_Z,
- CesiumMath.PI_OVER_FOUR,
+ CesiumMath.PI_OVER_FOUR
);
const q3 = Quaternion.fromAxisAngle(
Cartesian3.UNIT_X,
- -CesiumMath.PI_OVER_FOUR,
+ -CesiumMath.PI_OVER_FOUR
);
const s1 = Quaternion.computeInnerQuadrangle(q0, q1, q2, new Quaternion());
@@ -818,15 +818,15 @@ describe("Core/Quaternion", function () {
const q0 = Quaternion.fromAxisAngle(Cartesian3.UNIT_X, 0.0);
const q1 = Quaternion.fromAxisAngle(
Cartesian3.UNIT_X,
- CesiumMath.PI_OVER_FOUR,
+ CesiumMath.PI_OVER_FOUR
);
const q2 = Quaternion.fromAxisAngle(
Cartesian3.UNIT_Z,
- CesiumMath.PI_OVER_FOUR,
+ CesiumMath.PI_OVER_FOUR
);
const q3 = Quaternion.fromAxisAngle(
Cartesian3.UNIT_X,
- -CesiumMath.PI_OVER_FOUR,
+ -CesiumMath.PI_OVER_FOUR
);
const s1 = Quaternion.computeInnerQuadrangle(q0, q1, q2, new Quaternion());
@@ -848,19 +848,19 @@ describe("Core/Quaternion", function () {
it("equals", function () {
const quaternion = new Quaternion(1.0, 2.0, 3.0, 4.0);
expect(
- Quaternion.equals(quaternion, new Quaternion(1.0, 2.0, 3.0, 4.0)),
+ Quaternion.equals(quaternion, new Quaternion(1.0, 2.0, 3.0, 4.0))
).toEqual(true);
expect(
- Quaternion.equals(quaternion, new Quaternion(2.0, 2.0, 3.0, 4.0)),
+ Quaternion.equals(quaternion, new Quaternion(2.0, 2.0, 3.0, 4.0))
).toEqual(false);
expect(
- Quaternion.equals(quaternion, new Quaternion(2.0, 1.0, 3.0, 4.0)),
+ Quaternion.equals(quaternion, new Quaternion(2.0, 1.0, 3.0, 4.0))
).toEqual(false);
expect(
- Quaternion.equals(quaternion, new Quaternion(1.0, 2.0, 4.0, 4.0)),
+ Quaternion.equals(quaternion, new Quaternion(1.0, 2.0, 4.0, 4.0))
).toEqual(false);
expect(
- Quaternion.equals(quaternion, new Quaternion(1.0, 2.0, 3.0, 5.0)),
+ Quaternion.equals(quaternion, new Quaternion(1.0, 2.0, 3.0, 5.0))
).toEqual(false);
expect(Quaternion.equals(quaternion, undefined)).toEqual(false);
});
@@ -871,71 +871,71 @@ describe("Core/Quaternion", function () {
Quaternion.equalsEpsilon(
quaternion,
new Quaternion(1.0, 2.0, 3.0, 4.0),
- 0.0,
- ),
+ 0.0
+ )
).toEqual(true);
expect(
Quaternion.equalsEpsilon(
quaternion,
new Quaternion(1.0, 2.0, 3.0, 4.0),
- 1.0,
- ),
+ 1.0
+ )
).toEqual(true);
expect(
Quaternion.equalsEpsilon(
quaternion,
new Quaternion(2.0, 2.0, 3.0, 4.0),
- 1.0,
- ),
+ 1.0
+ )
).toEqual(true);
expect(
Quaternion.equalsEpsilon(
quaternion,
new Quaternion(1.0, 3.0, 3.0, 4.0),
- 1.0,
- ),
+ 1.0
+ )
).toEqual(true);
expect(
Quaternion.equalsEpsilon(
quaternion,
new Quaternion(1.0, 2.0, 4.0, 4.0),
- 1.0,
- ),
+ 1.0
+ )
).toEqual(true);
expect(
Quaternion.equalsEpsilon(
quaternion,
new Quaternion(1.0, 2.0, 3.0, 5.0),
- 1.0,
- ),
+ 1.0
+ )
).toEqual(true);
expect(
Quaternion.equalsEpsilon(
quaternion,
new Quaternion(2.0, 2.0, 3.0, 4.0),
- 0.99999,
- ),
+ 0.99999
+ )
).toEqual(false);
expect(
Quaternion.equalsEpsilon(
quaternion,
new Quaternion(1.0, 3.0, 3.0, 4.0),
- 0.99999,
- ),
+ 0.99999
+ )
).toEqual(false);
expect(
Quaternion.equalsEpsilon(
quaternion,
new Quaternion(1.0, 2.0, 4.0, 4.0),
- 0.99999,
- ),
+ 0.99999
+ )
).toEqual(false);
expect(
Quaternion.equalsEpsilon(
quaternion,
new Quaternion(1.0, 2.0, 3.0, 5.0),
- 0.99999,
- ),
+ 0.99999
+ )
).toEqual(false);
expect(Quaternion.equalsEpsilon(quaternion, undefined, 1)).toEqual(false);
});
@@ -1165,7 +1165,7 @@ describe("Core/Quaternion", function () {
new Quaternion(),
new Quaternion(),
new Quaternion(),
- new Quaternion(),
+ new Quaternion()
);
}).toThrowDeveloperError();
});
@@ -1247,7 +1247,7 @@ describe("Core/Quaternion", function () {
Quaternion.computeInnerQuadrangle(
new Quaternion(),
new Quaternion(),
- new Quaternion(),
+ new Quaternion()
);
}).toThrowDeveloperError();
});
@@ -1259,7 +1259,7 @@ describe("Core/Quaternion", function () {
new Quaternion(),
new Quaternion(),
new Quaternion(),
- 3,
+ 3
);
}).toThrowDeveloperError();
});
@@ -1311,7 +1311,7 @@ describe("Core/Quaternion", function () {
Quaternion.fastSquad(
new Quaternion(),
new Quaternion(),
- new Quaternion(),
+ new Quaternion()
);
}).toThrowDeveloperError();
});
@@ -1322,7 +1322,7 @@ describe("Core/Quaternion", function () {
new Quaternion(),
new Quaternion(),
new Quaternion(),
- new Quaternion(),
+ new Quaternion()
);
}).toThrowDeveloperError();
});
@@ -1334,7 +1334,7 @@ describe("Core/Quaternion", function () {
new Quaternion(),
new Quaternion(),
new Quaternion(),
- 3,
+ 3
);
}).toThrowDeveloperError();
});
diff --git a/packages/engine/Specs/Core/QuaternionSplineSpec.js b/packages/engine/Specs/Core/QuaternionSplineSpec.js
index 48bd44be8546..e8c953433e6e 100644
--- a/packages/engine/Specs/Core/QuaternionSplineSpec.js
+++ b/packages/engine/Specs/Core/QuaternionSplineSpec.js
@@ -80,7 +80,7 @@ describe("Core/QuaternionSpline", function () {
points[1],
points[2],
t,
- new Quaternion(),
+ new Quaternion()
);
expect(actual).toEqualEpsilon(expected, CesiumMath.EPSILON6);
});
@@ -112,7 +112,7 @@ describe("Core/QuaternionSpline", function () {
points[0],
points[1],
t,
- new Quaternion(),
+ new Quaternion()
);
expect(actual).toEqualEpsilon(expected, CesiumMath.EPSILON6);
});
@@ -133,7 +133,7 @@ describe("Core/QuaternionSpline", function () {
points[0],
points[1],
t,
- new Quaternion(),
+ new Quaternion()
);
expect(actual).toBe(result);
expect(actual).toEqualEpsilon(expected, CesiumMath.EPSILON6);
diff --git a/packages/engine/Specs/Core/RaySpec.js b/packages/engine/Specs/Core/RaySpec.js
index b27e910e5df6..1650c63c4ed3 100644
--- a/packages/engine/Specs/Core/RaySpec.js
+++ b/packages/engine/Specs/Core/RaySpec.js
@@ -20,7 +20,7 @@ describe("Core/Ray", function () {
const direction = Cartesian3.multiplyByScalar(
Cartesian3.UNIT_X,
18,
- new Cartesian3(),
+ new Cartesian3()
);
const ray = new Ray(origin, direction);
expect(ray.origin).toEqual(origin);
@@ -30,7 +30,7 @@ describe("Core/Ray", function () {
it("clone without a result parameter", function () {
const direction = Cartesian3.normalize(
new Cartesian3(1, 2, 3),
- new Cartesian3(),
+ new Cartesian3()
);
const ray = new Ray(Cartesian3.UNIT_X, direction);
const returnedResult = Ray.clone(ray);
@@ -43,7 +43,7 @@ describe("Core/Ray", function () {
it("clone with a result parameter", function () {
const direction = Cartesian3.normalize(
new Cartesian3(1, 2, 3),
- new Cartesian3(),
+ new Cartesian3()
);
const ray = new Ray(Cartesian3.UNIT_X, direction);
const result = new Ray();
@@ -58,7 +58,7 @@ describe("Core/Ray", function () {
it("clone works with a result parameter that is an input parameter", function () {
const direction = Cartesian3.normalize(
new Cartesian3(1, 2, 3),
- new Cartesian3(),
+ new Cartesian3()
);
const ray = new Ray(Cartesian3.UNIT_X, direction);
const returnedResult = Ray.clone(ray, ray);
@@ -72,14 +72,14 @@ describe("Core/Ray", function () {
it("getPoint along ray works without a result parameter", function () {
const direction = Cartesian3.normalize(
new Cartesian3(1, 2, 3),
- new Cartesian3(),
+ new Cartesian3()
);
const ray = new Ray(Cartesian3.UNIT_X, direction);
for (let i = -10; i < 11; i++) {
const expectedResult = Cartesian3.add(
Cartesian3.multiplyByScalar(direction, i, new Cartesian3()),
Cartesian3.UNIT_X,
- new Cartesian3(),
+ new Cartesian3()
);
const returnedResult = Ray.getPoint(ray, i);
expect(returnedResult).toEqual(expectedResult);
@@ -89,7 +89,7 @@ describe("Core/Ray", function () {
it("getPoint works with a result parameter", function () {
const direction = Cartesian3.normalize(
new Cartesian3(1, 2, 3),
- new Cartesian3(),
+ new Cartesian3()
);
const ray = new Ray(Cartesian3.UNIT_X, direction);
const result = new Cartesian3();
@@ -97,7 +97,7 @@ describe("Core/Ray", function () {
const expectedResult = Cartesian3.add(
Cartesian3.multiplyByScalar(direction, i, new Cartesian3()),
Cartesian3.UNIT_X,
- new Cartesian3(),
+ new Cartesian3()
);
const returnedResult = Ray.getPoint(ray, i, result);
expect(result).toBe(returnedResult);
@@ -108,7 +108,7 @@ describe("Core/Ray", function () {
it("getPoint throws without a point", function () {
const direction = Cartesian3.normalize(
new Cartesian3(1, 2, 3),
- new Cartesian3(),
+ new Cartesian3()
);
const ray = new Ray(Cartesian3.UNIT_X, direction);
expect(function () {
diff --git a/packages/engine/Specs/Core/RectangleGeometrySpec.js b/packages/engine/Specs/Core/RectangleGeometrySpec.js
index 7c7ce0e29061..2c2451a18350 100644
--- a/packages/engine/Specs/Core/RectangleGeometrySpec.js
+++ b/packages/engine/Specs/Core/RectangleGeometrySpec.js
@@ -21,7 +21,7 @@ describe("Core/RectangleGeometry", function () {
vertexFormat: VertexFormat.POSITION_ONLY,
rectangle: rectangle,
granularity: 1.0,
- }),
+ })
);
const positions = m.attributes.position.values;
const length = positions.length;
@@ -30,20 +30,20 @@ describe("Core/RectangleGeometry", function () {
expect(m.indices.length).toEqual(8 * 3);
const expectedNWCorner = Ellipsoid.WGS84.cartographicToCartesian(
- Rectangle.northwest(rectangle),
+ Rectangle.northwest(rectangle)
);
const expectedSECorner = Ellipsoid.WGS84.cartographicToCartesian(
- Rectangle.southeast(rectangle),
+ Rectangle.southeast(rectangle)
);
expect(
- new Cartesian3(positions[0], positions[1], positions[2]),
+ new Cartesian3(positions[0], positions[1], positions[2])
).toEqualEpsilon(expectedNWCorner, CesiumMath.EPSILON9);
expect(
new Cartesian3(
positions[length - 3],
positions[length - 2],
- positions[length - 1],
- ),
+ positions[length - 1]
+ )
).toEqualEpsilon(expectedSECorner, CesiumMath.EPSILON9);
});
@@ -53,7 +53,7 @@ describe("Core/RectangleGeometry", function () {
new RectangleGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
rectangle: rectangle,
- }),
+ })
);
const positions = m.attributes.position.values;
const length = positions.length;
@@ -62,20 +62,20 @@ describe("Core/RectangleGeometry", function () {
expect(m.indices.length).toEqual(8 * 3);
const expectedNWCorner = Ellipsoid.WGS84.cartographicToCartesian(
- Rectangle.northwest(rectangle),
+ Rectangle.northwest(rectangle)
);
const expectedSECorner = Ellipsoid.WGS84.cartographicToCartesian(
- Rectangle.southeast(rectangle),
+ Rectangle.southeast(rectangle)
);
expect(
- new Cartesian3(positions[0], positions[1], positions[2]),
+ new Cartesian3(positions[0], positions[1], positions[2])
).toEqualEpsilon(expectedNWCorner, CesiumMath.EPSILON8);
expect(
new Cartesian3(
positions[length - 3],
positions[length - 2],
- positions[length - 1],
- ),
+ positions[length - 1]
+ )
).toEqualEpsilon(expectedSECorner, CesiumMath.EPSILON8);
});
@@ -85,7 +85,7 @@ describe("Core/RectangleGeometry", function () {
new RectangleGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
rectangle: rectangle,
- }),
+ })
);
const positions = m.attributes.position.values;
expect(positions.length).toEqual(5 * 3);
@@ -98,7 +98,7 @@ describe("Core/RectangleGeometry", function () {
new RectangleGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
rectangle: rectangle,
- }),
+ })
);
const positions = m.attributes.position.values;
expect(positions.length).toEqual(5 * 3);
@@ -111,7 +111,7 @@ describe("Core/RectangleGeometry", function () {
vertexFormat: VertexFormat.ALL,
rectangle: new Rectangle(-2.0, -1.0, 0.0, 1.0),
granularity: 1.0,
- }),
+ })
);
const numVertices = 9; // 8 around edge + 1 in middle
const numTriangles = 8; // 4 squares * 2 triangles per square
@@ -132,7 +132,7 @@ describe("Core/RectangleGeometry", function () {
rectangle: rectangle,
rotation: angle,
granularity: 1.0,
- }),
+ })
);
const positions = m.attributes.position.values;
const length = positions.length;
@@ -145,15 +145,15 @@ describe("Core/RectangleGeometry", function () {
const projectedSECorner = projection.project(unrotatedSECorner);
const rotation = Matrix2.fromRotation(angle);
const rotatedSECornerCartographic = projection.unproject(
- Matrix2.multiplyByVector(rotation, projectedSECorner, new Cartesian2()),
+ Matrix2.multiplyByVector(rotation, projectedSECorner, new Cartesian2())
);
const rotatedSECorner = Ellipsoid.WGS84.cartographicToCartesian(
- rotatedSECornerCartographic,
+ rotatedSECornerCartographic
);
const actual = new Cartesian3(
positions[length - 3],
positions[length - 2],
- positions[length - 1],
+ positions[length - 1]
);
expect(actual).toEqualEpsilon(rotatedSECorner, CesiumMath.EPSILON6);
});
@@ -165,7 +165,7 @@ describe("Core/RectangleGeometry", function () {
rectangle: rectangle,
rotation: CesiumMath.PI,
granularity: 1.0,
- }),
+ })
);
const positions = m.attributes.position.values;
const length = positions.length;
@@ -174,10 +174,10 @@ describe("Core/RectangleGeometry", function () {
expect(m.indices.length).toEqual(8 * 3);
const unrotatedNWCorner = Ellipsoid.WGS84.cartographicToCartesian(
- Rectangle.northwest(rectangle),
+ Rectangle.northwest(rectangle)
);
const unrotatedSECorner = Ellipsoid.WGS84.cartographicToCartesian(
- Rectangle.southeast(rectangle),
+ Rectangle.southeast(rectangle)
);
let actual = new Cartesian3(positions[0], positions[1], positions[2]);
@@ -186,7 +186,7 @@ describe("Core/RectangleGeometry", function () {
actual = new Cartesian3(
positions[length - 3],
positions[length - 2],
- positions[length - 1],
+ positions[length - 1]
);
expect(actual).toEqualEpsilon(unrotatedNWCorner, CesiumMath.EPSILON8);
});
@@ -200,7 +200,7 @@ describe("Core/RectangleGeometry", function () {
rectangle: rectangle,
stRotation: angle,
granularity: 1.0,
- }),
+ })
);
const positions = m.attributes.position.values;
const st = m.attributes.st.values;
@@ -224,7 +224,7 @@ describe("Core/RectangleGeometry", function () {
rotation: angle,
stRotation: angle,
granularity: 1.0,
- }),
+ })
);
const st = m.attributes.st.values;
@@ -252,10 +252,10 @@ describe("Core/RectangleGeometry", function () {
-CesiumMath.PI_OVER_TWO,
1,
CesiumMath.PI_OVER_TWO,
- CesiumMath.PI_OVER_TWO,
+ CesiumMath.PI_OVER_TWO
),
rotation: CesiumMath.PI_OVER_TWO,
- }),
+ })
);
}).toThrowDeveloperError();
});
@@ -267,7 +267,7 @@ describe("Core/RectangleGeometry", function () {
-CesiumMath.PI_OVER_TWO,
CesiumMath.PI_OVER_TWO,
CesiumMath.PI_OVER_TWO,
- -CesiumMath.PI_OVER_TWO,
+ -CesiumMath.PI_OVER_TWO
),
});
}).toThrowDeveloperError();
@@ -281,7 +281,7 @@ describe("Core/RectangleGeometry", function () {
rectangle: rectangle,
granularity: 1.0,
extrudedHeight: 2,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -296,7 +296,7 @@ describe("Core/RectangleGeometry", function () {
vertexFormat: VertexFormat.POSITION_ONLY,
rectangle: rectangle,
extrudedHeight: 2,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -311,7 +311,7 @@ describe("Core/RectangleGeometry", function () {
vertexFormat: VertexFormat.POSITION_ONLY,
rectangle: rectangle,
extrudedHeight: 2,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -326,7 +326,7 @@ describe("Core/RectangleGeometry", function () {
rectangle: new Rectangle(-2.0, -1.0, 0.0, 1.0),
granularity: 1.0,
extrudedHeight: 2,
- }),
+ })
);
const numVertices = 42;
const numTriangles = 32;
@@ -348,7 +348,7 @@ describe("Core/RectangleGeometry", function () {
rotation: angle,
granularity: 1.0,
extrudedHeight: 2,
- }),
+ })
);
const positions = m.attributes.position.values;
const length = positions.length;
@@ -361,10 +361,10 @@ describe("Core/RectangleGeometry", function () {
const projectedSECorner = projection.project(unrotatedSECorner);
const rotation = Matrix2.fromRotation(angle);
const rotatedSECornerCartographic = projection.unproject(
- Matrix2.multiplyByVector(rotation, projectedSECorner, new Cartesian2()),
+ Matrix2.multiplyByVector(rotation, projectedSECorner, new Cartesian2())
);
const rotatedSECorner = Ellipsoid.WGS84.cartographicToCartesian(
- rotatedSECornerCartographic,
+ rotatedSECornerCartographic
);
const actual = new Cartesian3(positions[51], positions[52], positions[53]);
expect(actual).toEqualEpsilon(rotatedSECorner, CesiumMath.EPSILON6);
@@ -378,7 +378,7 @@ describe("Core/RectangleGeometry", function () {
rectangle: rectangle,
granularity: 1.0,
extrudedHeight: CesiumMath.EPSILON14,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -396,7 +396,7 @@ describe("Core/RectangleGeometry", function () {
rectangle: rectangle,
granularity: 1.0,
offsetAttribute: GeometryOffsetAttribute.TOP,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -418,7 +418,7 @@ describe("Core/RectangleGeometry", function () {
granularity: 1.0,
extrudedHeight: 2,
offsetAttribute: GeometryOffsetAttribute.TOP,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -443,7 +443,7 @@ describe("Core/RectangleGeometry", function () {
granularity: 1.0,
extrudedHeight: 2,
offsetAttribute: GeometryOffsetAttribute.ALL,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -506,19 +506,19 @@ describe("Core/RectangleGeometry", function () {
const r = geometry.rectangle;
expect(CesiumMath.toDegrees(r.north)).toEqualEpsilon(
1.414213562373095,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(CesiumMath.toDegrees(r.south)).toEqualEpsilon(
-1.414213562373095,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(CesiumMath.toDegrees(r.east)).toEqualEpsilon(
1.414213562373095,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(CesiumMath.toDegrees(r.west)).toEqualEpsilon(
-1.4142135623730951,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -537,27 +537,27 @@ describe("Core/RectangleGeometry", function () {
expect(textureCoordinateRotationPoints.length).toEqual(6);
expect(textureCoordinateRotationPoints[0]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[1]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[2]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[3]).toEqualEpsilon(
1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[4]).toEqualEpsilon(
1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[5]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
geometry = new RectangleGeometry({
@@ -571,27 +571,27 @@ describe("Core/RectangleGeometry", function () {
expect(textureCoordinateRotationPoints.length).toEqual(6);
expect(textureCoordinateRotationPoints[0]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[1]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[2]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[3]).toEqualEpsilon(
1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[4]).toEqualEpsilon(
1,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(textureCoordinateRotationPoints[5]).toEqualEpsilon(
0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -634,7 +634,7 @@ describe("Core/RectangleGeometry", function () {
rectangle: Rectangle.MAX_VALUE,
granularity: 1.0,
rotation: 0,
- }),
+ })
);
}).not.toThrowDeveloperError();
});
@@ -644,7 +644,7 @@ describe("Core/RectangleGeometry", function () {
Math.PI - 0.005,
CesiumMath.PI_OVER_SIX + 0.02,
0.01 - Math.PI,
- CesiumMath.PI_OVER_SIX + 0.04,
+ CesiumMath.PI_OVER_SIX + 0.04
);
const geometry = new RectangleGeometry({
@@ -664,8 +664,26 @@ describe("Core/RectangleGeometry", function () {
ellipsoid: Ellipsoid.UNIT_SPHERE,
});
const packedInstance = [
- -2.0, -1.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0,
- 0.0, 0.0, 0.0, 0.0, -1,
+ -2.0,
+ -1.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ -1,
];
createPackableSpecs(RectangleGeometry, rectangle, packedInstance);
});
diff --git a/packages/engine/Specs/Core/RectangleOutlineGeometrySpec.js b/packages/engine/Specs/Core/RectangleOutlineGeometrySpec.js
index 9b3cfc4cd14a..47def1381cc5 100644
--- a/packages/engine/Specs/Core/RectangleOutlineGeometrySpec.js
+++ b/packages/engine/Specs/Core/RectangleOutlineGeometrySpec.js
@@ -19,7 +19,7 @@ describe("Core/RectangleOutlineGeometry", function () {
new RectangleOutlineGeometry({
rectangle: rectangle,
granularity: 1.0,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -27,10 +27,10 @@ describe("Core/RectangleOutlineGeometry", function () {
expect(m.indices.length).toEqual(8 * 2);
const expectedNWCorner = Ellipsoid.WGS84.cartographicToCartesian(
- Rectangle.northwest(rectangle),
+ Rectangle.northwest(rectangle)
);
expect(
- new Cartesian3(positions[0], positions[1], positions[2]),
+ new Cartesian3(positions[0], positions[1], positions[2])
).toEqualEpsilon(expectedNWCorner, CesiumMath.EPSILON9);
});
@@ -39,7 +39,7 @@ describe("Core/RectangleOutlineGeometry", function () {
const m = RectangleOutlineGeometry.createGeometry(
new RectangleOutlineGeometry({
rectangle: rectangle,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -47,10 +47,10 @@ describe("Core/RectangleOutlineGeometry", function () {
expect(m.indices.length).toEqual(8 * 2);
const expectedNWCorner = Ellipsoid.WGS84.cartographicToCartesian(
- Rectangle.northwest(rectangle),
+ Rectangle.northwest(rectangle)
);
expect(
- new Cartesian3(positions[0], positions[1], positions[2]),
+ new Cartesian3(positions[0], positions[1], positions[2])
).toEqualEpsilon(expectedNWCorner, CesiumMath.EPSILON9);
});
@@ -59,7 +59,7 @@ describe("Core/RectangleOutlineGeometry", function () {
const m = RectangleOutlineGeometry.createGeometry(
new RectangleOutlineGeometry({
rectangle: rectangle,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -72,7 +72,7 @@ describe("Core/RectangleOutlineGeometry", function () {
const m = RectangleOutlineGeometry.createGeometry(
new RectangleOutlineGeometry({
rectangle: rectangle,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -88,7 +88,7 @@ describe("Core/RectangleOutlineGeometry", function () {
rectangle: rectangle,
rotation: angle,
granularity: 1.0,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -100,10 +100,10 @@ describe("Core/RectangleOutlineGeometry", function () {
const projectedNWCorner = projection.project(unrotatedNWCorner);
const rotation = Matrix2.fromRotation(angle);
const rotatedNWCornerCartographic = projection.unproject(
- Matrix2.multiplyByVector(rotation, projectedNWCorner, new Cartesian2()),
+ Matrix2.multiplyByVector(rotation, projectedNWCorner, new Cartesian2())
);
const rotatedNWCorner = Ellipsoid.WGS84.cartographicToCartesian(
- rotatedNWCornerCartographic,
+ rotatedNWCornerCartographic
);
const actual = new Cartesian3(positions[0], positions[1], positions[2]);
expect(actual).toEqualEpsilon(rotatedNWCorner, CesiumMath.EPSILON6);
@@ -123,10 +123,10 @@ describe("Core/RectangleOutlineGeometry", function () {
-CesiumMath.PI_OVER_TWO,
1,
CesiumMath.PI_OVER_TWO,
- CesiumMath.PI_OVER_TWO,
+ CesiumMath.PI_OVER_TWO
),
rotation: CesiumMath.PI_OVER_TWO,
- }),
+ })
);
}).toThrowDeveloperError();
});
@@ -138,7 +138,7 @@ describe("Core/RectangleOutlineGeometry", function () {
-CesiumMath.PI_OVER_TWO,
CesiumMath.PI_OVER_TWO,
CesiumMath.PI_OVER_TWO,
- -CesiumMath.PI_OVER_TWO,
+ -CesiumMath.PI_OVER_TWO
),
});
}).toThrowDeveloperError();
@@ -151,7 +151,7 @@ describe("Core/RectangleOutlineGeometry", function () {
rectangle: rectangle,
granularity: 1.0,
extrudedHeight: 2,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -165,7 +165,7 @@ describe("Core/RectangleOutlineGeometry", function () {
new RectangleOutlineGeometry({
rectangle: rectangle,
extrudedHeight: 2,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -179,7 +179,7 @@ describe("Core/RectangleOutlineGeometry", function () {
new RectangleOutlineGeometry({
rectangle: rectangle,
extrudedHeight: 2,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -196,7 +196,7 @@ describe("Core/RectangleOutlineGeometry", function () {
rotation: angle,
granularity: 1.0,
extrudedHeight: 2,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -208,11 +208,11 @@ describe("Core/RectangleOutlineGeometry", function () {
const projectedNWCorner = projection.project(unrotatedNWCorner);
const rotation = Matrix2.fromRotation(angle);
const rotatedNWCornerCartographic = projection.unproject(
- Matrix2.multiplyByVector(rotation, projectedNWCorner, new Cartesian2()),
+ Matrix2.multiplyByVector(rotation, projectedNWCorner, new Cartesian2())
);
rotatedNWCornerCartographic.height = 2;
const rotatedNWCorner = Ellipsoid.WGS84.cartographicToCartesian(
- rotatedNWCornerCartographic,
+ rotatedNWCornerCartographic
);
const actual = new Cartesian3(positions[0], positions[1], positions[2]);
expect(actual).toEqualEpsilon(rotatedNWCorner, CesiumMath.EPSILON6);
@@ -225,7 +225,7 @@ describe("Core/RectangleOutlineGeometry", function () {
rectangle: rectangle,
granularity: 1.0,
extrudedHeight: CesiumMath.EPSILON14,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -244,12 +244,15 @@ describe("Core/RectangleOutlineGeometry", function () {
rectangle: Rectangle.fromDegrees(-80.0, 39.0, -80.0, 39.0),
});
- const geometry0 =
- RectangleOutlineGeometry.createGeometry(rectangleOutline0);
- const geometry1 =
- RectangleOutlineGeometry.createGeometry(rectangleOutline1);
- const geometry2 =
- RectangleOutlineGeometry.createGeometry(rectangleOutline2);
+ const geometry0 = RectangleOutlineGeometry.createGeometry(
+ rectangleOutline0
+ );
+ const geometry1 = RectangleOutlineGeometry.createGeometry(
+ rectangleOutline1
+ );
+ const geometry2 = RectangleOutlineGeometry.createGeometry(
+ rectangleOutline2
+ );
expect(geometry0).toBeUndefined();
expect(geometry1).toBeUndefined();
@@ -263,7 +266,7 @@ describe("Core/RectangleOutlineGeometry", function () {
rectangle: rectangle,
granularity: 1.0,
offsetAttribute: GeometryOffsetAttribute.TOP,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -284,7 +287,7 @@ describe("Core/RectangleOutlineGeometry", function () {
granularity: 1.0,
extrudedHeight: 2,
offsetAttribute: GeometryOffsetAttribute.TOP,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -305,7 +308,7 @@ describe("Core/RectangleOutlineGeometry", function () {
granularity: 1.0,
extrudedHeight: 2,
offsetAttribute: GeometryOffsetAttribute.ALL,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -331,7 +334,7 @@ describe("Core/RectangleOutlineGeometry", function () {
RectangleOutlineGeometry,
rectangle,
packedInstance,
- "extruded",
+ "extruded"
);
rectangle = new RectangleOutlineGeometry({
@@ -346,6 +349,6 @@ describe("Core/RectangleOutlineGeometry", function () {
RectangleOutlineGeometry,
rectangle,
packedInstance,
- "at height",
+ "at height"
);
});
diff --git a/packages/engine/Specs/Core/RectangleSpec.js b/packages/engine/Specs/Core/RectangleSpec.js
index daf087ae2362..1e13298a2986 100644
--- a/packages/engine/Specs/Core/RectangleSpec.js
+++ b/packages/engine/Specs/Core/RectangleSpec.js
@@ -150,7 +150,7 @@ describe("Core/Rectangle", function () {
const result = new Rectangle();
const rectangle = Rectangle.fromCartographicArray(
[minLat, minLon, maxLat, maxLon],
- result,
+ result
);
expect(result).toBe(rectangle);
expect(rectangle.west).toEqual(minLon.longitude);
@@ -169,23 +169,23 @@ describe("Core/Rectangle", function () {
const rectangle = Rectangle.fromCartesianArray(
wgs84.cartographicArrayToCartesianArray([minLat, minLon, maxLat, maxLon]),
- wgs84,
+ wgs84
);
expect(rectangle.west).toEqualEpsilon(
minLon.longitude,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(rectangle.south).toEqualEpsilon(
minLat.latitude,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(rectangle.east).toEqualEpsilon(
maxLon.longitude,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(rectangle.north).toEqualEpsilon(
maxLat.latitude,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -199,7 +199,7 @@ describe("Core/Rectangle", function () {
const rectangle = Rectangle.fromCartesianArray(
wgs84.cartographicArrayToCartesianArray([minLat, minLon, maxLat, maxLon]),
- wgs84,
+ wgs84
);
expect(rectangle.east).toEqual(minLon.longitude);
expect(rectangle.south).toEqual(minLat.latitude);
@@ -219,24 +219,24 @@ describe("Core/Rectangle", function () {
const rectangle = Rectangle.fromCartesianArray(
wgs84.cartographicArrayToCartesianArray([minLat, minLon, maxLat, maxLon]),
wgs84,
- result,
+ result
);
expect(result).toBe(rectangle);
expect(rectangle.west).toEqualEpsilon(
minLon.longitude,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(rectangle.south).toEqualEpsilon(
minLat.latitude,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(rectangle.east).toEqualEpsilon(
maxLon.longitude,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(rectangle.north).toEqualEpsilon(
maxLat.latitude,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -280,19 +280,19 @@ describe("Core/Rectangle", function () {
it("Static equals works in all cases", function () {
const rectangle = new Rectangle(0.1, 0.2, 0.3, 0.4);
expect(
- Rectangle.equals(rectangle, new Rectangle(0.1, 0.2, 0.3, 0.4)),
+ Rectangle.equals(rectangle, new Rectangle(0.1, 0.2, 0.3, 0.4))
).toEqual(true);
expect(
- Rectangle.equals(rectangle, new Rectangle(0.5, 0.2, 0.3, 0.4)),
+ Rectangle.equals(rectangle, new Rectangle(0.5, 0.2, 0.3, 0.4))
).toEqual(false);
expect(
- Rectangle.equals(rectangle, new Rectangle(0.1, 0.5, 0.3, 0.4)),
+ Rectangle.equals(rectangle, new Rectangle(0.1, 0.5, 0.3, 0.4))
).toEqual(false);
expect(
- Rectangle.equals(rectangle, new Rectangle(0.1, 0.2, 0.5, 0.4)),
+ Rectangle.equals(rectangle, new Rectangle(0.1, 0.2, 0.5, 0.4))
).toEqual(false);
expect(
- Rectangle.equals(rectangle, new Rectangle(0.1, 0.2, 0.3, 0.5)),
+ Rectangle.equals(rectangle, new Rectangle(0.1, 0.2, 0.3, 0.5))
).toEqual(false);
expect(Rectangle.equals(rectangle, undefined)).toEqual(false);
});
@@ -303,64 +303,64 @@ describe("Core/Rectangle", function () {
Rectangle.equalsEpsilon(
rectangle1,
new Rectangle(0.1, 0.2, 0.3, 0.4),
- 0.0,
- ),
+ 0.0
+ )
).toEqual(true);
expect(
Rectangle.equalsEpsilon(
rectangle1,
new Rectangle(0.5, 0.2, 0.3, 0.4),
- 0.0,
- ),
+ 0.0
+ )
).toEqual(false);
expect(
Rectangle.equalsEpsilon(
rectangle1,
new Rectangle(0.1, 0.5, 0.3, 0.4),
- 0.0,
- ),
+ 0.0
+ )
).toEqual(false);
expect(
Rectangle.equalsEpsilon(
rectangle1,
new Rectangle(0.1, 0.2, 0.5, 0.4),
- 0.0,
- ),
+ 0.0
+ )
).toEqual(false);
expect(
Rectangle.equalsEpsilon(
rectangle1,
new Rectangle(0.1, 0.2, 0.3, 0.5),
- 0.0,
- ),
+ 0.0
+ )
).toEqual(false);
expect(
Rectangle.equalsEpsilon(
rectangle1,
new Rectangle(0.5, 0.2, 0.3, 0.4),
- 0.4,
- ),
+ 0.4
+ )
).toEqual(true);
expect(
Rectangle.equalsEpsilon(
rectangle1,
new Rectangle(0.1, 0.5, 0.3, 0.4),
- 0.3,
- ),
+ 0.3
+ )
).toEqual(true);
expect(
Rectangle.equalsEpsilon(
rectangle1,
new Rectangle(0.1, 0.2, 0.5, 0.4),
- 0.2,
- ),
+ 0.2
+ )
).toEqual(true);
expect(
Rectangle.equalsEpsilon(
rectangle1,
new Rectangle(0.1, 0.2, 0.3, 0.5),
- 0.1,
- ),
+ 0.1
+ )
).toEqual(true);
expect(Rectangle.equalsEpsilon(rectangle1, undefined, 0.0)).toEqual(false);
expect(Rectangle.equalsEpsilon(undefined, rectangle1, 0.0)).toEqual(false);
@@ -370,31 +370,31 @@ describe("Core/Rectangle", function () {
it("Equals epsilon works in all cases", function () {
const rectangle = new Rectangle(0.1, 0.2, 0.3, 0.4);
expect(
- rectangle.equalsEpsilon(new Rectangle(0.1, 0.2, 0.3, 0.4), 0.0),
+ rectangle.equalsEpsilon(new Rectangle(0.1, 0.2, 0.3, 0.4), 0.0)
).toEqual(true);
expect(
- rectangle.equalsEpsilon(new Rectangle(0.5, 0.2, 0.3, 0.4), 0.0),
+ rectangle.equalsEpsilon(new Rectangle(0.5, 0.2, 0.3, 0.4), 0.0)
).toEqual(false);
expect(
- rectangle.equalsEpsilon(new Rectangle(0.1, 0.5, 0.3, 0.4), 0.0),
+ rectangle.equalsEpsilon(new Rectangle(0.1, 0.5, 0.3, 0.4), 0.0)
).toEqual(false);
expect(
- rectangle.equalsEpsilon(new Rectangle(0.1, 0.2, 0.5, 0.4), 0.0),
+ rectangle.equalsEpsilon(new Rectangle(0.1, 0.2, 0.5, 0.4), 0.0)
).toEqual(false);
expect(
- rectangle.equalsEpsilon(new Rectangle(0.1, 0.2, 0.3, 0.5), 0.0),
+ rectangle.equalsEpsilon(new Rectangle(0.1, 0.2, 0.3, 0.5), 0.0)
).toEqual(false);
expect(
- rectangle.equalsEpsilon(new Rectangle(0.5, 0.2, 0.3, 0.4), 0.4),
+ rectangle.equalsEpsilon(new Rectangle(0.5, 0.2, 0.3, 0.4), 0.4)
).toEqual(true);
expect(
- rectangle.equalsEpsilon(new Rectangle(0.1, 0.5, 0.3, 0.4), 0.3),
+ rectangle.equalsEpsilon(new Rectangle(0.1, 0.5, 0.3, 0.4), 0.3)
).toEqual(true);
expect(
- rectangle.equalsEpsilon(new Rectangle(0.1, 0.2, 0.5, 0.4), 0.2),
+ rectangle.equalsEpsilon(new Rectangle(0.1, 0.2, 0.5, 0.4), 0.2)
).toEqual(true);
expect(
- rectangle.equalsEpsilon(new Rectangle(0.1, 0.2, 0.3, 0.5), 0.1),
+ rectangle.equalsEpsilon(new Rectangle(0.1, 0.2, 0.3, 0.5), 0.1)
).toEqual(true);
expect(rectangle.equalsEpsilon(undefined, 0.0)).toEqual(false);
});
@@ -588,28 +588,28 @@ describe("Core/Rectangle", function () {
let returnedResult = Rectangle.center(rectangle);
expect(returnedResult).toEqualEpsilon(
Cartographic.fromDegrees(180, 0),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
rectangle = Rectangle.fromDegrees(160, 0, -170, 0);
returnedResult = Rectangle.center(rectangle);
expect(returnedResult).toEqualEpsilon(
Cartographic.fromDegrees(175, 0),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
rectangle = Rectangle.fromDegrees(170, 0, -160, 0);
returnedResult = Rectangle.center(rectangle);
expect(returnedResult).toEqualEpsilon(
Cartographic.fromDegrees(-175, 0),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
rectangle = Rectangle.fromDegrees(160, 0, 140, 0);
returnedResult = Rectangle.center(rectangle);
expect(returnedResult).toEqualEpsilon(
Cartographic.fromDegrees(-30, 0),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
});
@@ -635,7 +635,7 @@ describe("Core/Rectangle", function () {
const returnedResult = Rectangle.intersection(
rectangle,
rectangle2,
- result,
+ result
);
expect(returnedResult).toEqual(expected);
expect(result).toBe(returnedResult);
@@ -785,19 +785,19 @@ describe("Core/Rectangle", function () {
-CesiumMath.PI,
-CesiumMath.PI_OVER_TWO,
+CesiumMath.PI,
- 0.0,
+ 0.0
);
const rectangle2 = new Rectangle(
-CesiumMath.PI,
0.0,
+CesiumMath.PI,
- +CesiumMath.PI_OVER_TWO,
+ +CesiumMath.PI_OVER_TWO
);
const expected = new Rectangle(
-CesiumMath.PI,
-CesiumMath.PI_OVER_TWO,
+CesiumMath.PI,
- +CesiumMath.PI_OVER_TWO,
+ +CesiumMath.PI_OVER_TWO
);
const returnedResult = Rectangle.union(rectangle1, rectangle2);
expect(returnedResult).toEqualEpsilon(expected, CesiumMath.EPSILON15);
@@ -856,31 +856,31 @@ describe("Core/Rectangle", function () {
it("contains works", function () {
const rectangle = new Rectangle(west, south, east, north);
expect(
- Rectangle.contains(rectangle, new Cartographic(west, south)),
+ Rectangle.contains(rectangle, new Cartographic(west, south))
).toEqual(true);
expect(
- Rectangle.contains(rectangle, new Cartographic(west, north)),
+ Rectangle.contains(rectangle, new Cartographic(west, north))
).toEqual(true);
expect(
- Rectangle.contains(rectangle, new Cartographic(east, south)),
+ Rectangle.contains(rectangle, new Cartographic(east, south))
).toEqual(true);
expect(
- Rectangle.contains(rectangle, new Cartographic(east, north)),
+ Rectangle.contains(rectangle, new Cartographic(east, north))
).toEqual(true);
expect(Rectangle.contains(rectangle, Rectangle.center(rectangle))).toEqual(
- true,
+ true
);
expect(
- Rectangle.contains(rectangle, new Cartographic(west - 0.1, south)),
+ Rectangle.contains(rectangle, new Cartographic(west - 0.1, south))
).toEqual(false);
expect(
- Rectangle.contains(rectangle, new Cartographic(west, north + 0.1)),
+ Rectangle.contains(rectangle, new Cartographic(west, north + 0.1))
).toEqual(false);
expect(
- Rectangle.contains(rectangle, new Cartographic(east, south - 0.1)),
+ Rectangle.contains(rectangle, new Cartographic(east, south - 0.1))
).toEqual(false);
expect(
- Rectangle.contains(rectangle, new Cartographic(east + 0.1, north)),
+ Rectangle.contains(rectangle, new Cartographic(east + 0.1, north))
).toEqual(false);
});
@@ -892,31 +892,31 @@ describe("Core/Rectangle", function () {
const rectangle = new Rectangle(west, south, east, north);
expect(
- Rectangle.contains(rectangle, new Cartographic(west, south)),
+ Rectangle.contains(rectangle, new Cartographic(west, south))
).toEqual(true);
expect(
- Rectangle.contains(rectangle, new Cartographic(west, north)),
+ Rectangle.contains(rectangle, new Cartographic(west, north))
).toEqual(true);
expect(
- Rectangle.contains(rectangle, new Cartographic(east, south)),
+ Rectangle.contains(rectangle, new Cartographic(east, south))
).toEqual(true);
expect(
- Rectangle.contains(rectangle, new Cartographic(east, north)),
+ Rectangle.contains(rectangle, new Cartographic(east, north))
).toEqual(true);
expect(Rectangle.contains(rectangle, Rectangle.center(rectangle))).toEqual(
- true,
+ true
);
expect(
- Rectangle.contains(rectangle, new Cartographic(west - 0.1, south)),
+ Rectangle.contains(rectangle, new Cartographic(west - 0.1, south))
).toEqual(false);
expect(
- Rectangle.contains(rectangle, new Cartographic(west, north + 0.1)),
+ Rectangle.contains(rectangle, new Cartographic(west, north + 0.1))
).toEqual(false);
expect(
- Rectangle.contains(rectangle, new Cartographic(east, south - 0.1)),
+ Rectangle.contains(rectangle, new Cartographic(east, south - 0.1))
).toEqual(false);
expect(
- Rectangle.contains(rectangle, new Cartographic(east + 0.1, north)),
+ Rectangle.contains(rectangle, new Cartographic(east + 0.1, north))
).toEqual(false);
});
@@ -947,7 +947,7 @@ describe("Core/Rectangle", function () {
rectangle,
Ellipsoid.WGS84,
0.0,
- results,
+ results
);
expect(results).toBe(returnedResult);
expect(results[0]).toBe(cartesian0);
@@ -983,26 +983,26 @@ describe("Core/Rectangle", function () {
const returnedResult = Rectangle.subsample(rectangle);
expect(returnedResult.length).toEqual(6);
expect(returnedResult[0]).toEqual(
- Ellipsoid.WGS84.cartographicToCartesian(Rectangle.northwest(rectangle)),
+ Ellipsoid.WGS84.cartographicToCartesian(Rectangle.northwest(rectangle))
);
expect(returnedResult[1]).toEqual(
- Ellipsoid.WGS84.cartographicToCartesian(Rectangle.northeast(rectangle)),
+ Ellipsoid.WGS84.cartographicToCartesian(Rectangle.northeast(rectangle))
);
expect(returnedResult[2]).toEqual(
- Ellipsoid.WGS84.cartographicToCartesian(Rectangle.southeast(rectangle)),
+ Ellipsoid.WGS84.cartographicToCartesian(Rectangle.southeast(rectangle))
);
expect(returnedResult[3]).toEqual(
- Ellipsoid.WGS84.cartographicToCartesian(Rectangle.southwest(rectangle)),
+ Ellipsoid.WGS84.cartographicToCartesian(Rectangle.southwest(rectangle))
);
const cartographic4 = Ellipsoid.WGS84.cartesianToCartographic(
- returnedResult[4],
+ returnedResult[4]
);
expect(cartographic4.latitude).toEqual(0.0);
expect(cartographic4.longitude).toEqualEpsilon(west, CesiumMath.EPSILON16);
const cartographic5 = Ellipsoid.WGS84.cartesianToCartographic(
- returnedResult[5],
+ returnedResult[5]
);
expect(cartographic5.latitude).toEqual(0.0);
expect(cartographic5.longitude).toEqualEpsilon(east, CesiumMath.EPSILON16);
@@ -1018,7 +1018,7 @@ describe("Core/Rectangle", function () {
const returnedResult = Rectangle.subsample(
rectangle,
Ellipsoid.WGS84,
- height,
+ height
);
const nw = Rectangle.northwest(rectangle);
@@ -1064,7 +1064,7 @@ describe("Core/Rectangle", function () {
expectedWest,
expectedSouth,
expectedEast,
- expectedNorth,
+ expectedNorth
);
const subsection = new Rectangle();
@@ -1074,7 +1074,7 @@ describe("Core/Rectangle", function () {
southLerp,
eastLerp,
northLerp,
- subsection,
+ subsection
);
expect(result).toEqual(expectedRectangle);
@@ -1101,7 +1101,7 @@ describe("Core/Rectangle", function () {
expectedWest,
expectedSouth,
expectedEast,
- expectedNorth,
+ expectedNorth
);
const subsection = Rectangle.subsection(
@@ -1109,7 +1109,7 @@ describe("Core/Rectangle", function () {
westLerp,
southLerp,
eastLerp,
- northLerp,
+ northLerp
);
expect(subsection).toEqual(expectedRectangle);
@@ -1135,7 +1135,7 @@ describe("Core/Rectangle", function () {
expectedWest,
expectedSouth,
expectedEast,
- expectedNorth,
+ expectedNorth
);
const subsection = Rectangle.subsection(
@@ -1143,7 +1143,7 @@ describe("Core/Rectangle", function () {
westLerp,
southLerp,
eastLerp,
- northLerp,
+ northLerp
);
expect(subsection).toEqual(expectedRectangle);
@@ -1169,7 +1169,7 @@ describe("Core/Rectangle", function () {
expectedWest,
expectedSouth,
expectedEast,
- expectedNorth,
+ expectedNorth
);
const subsection = Rectangle.subsection(
@@ -1177,7 +1177,7 @@ describe("Core/Rectangle", function () {
westLerp,
southLerp,
eastLerp,
- northLerp,
+ northLerp
);
expect(subsection).toEqual(expectedRectangle);
@@ -1205,7 +1205,7 @@ describe("Core/Rectangle", function () {
expectedWest,
expectedSouth,
expectedEast,
- expectedNorth,
+ expectedNorth
);
const subsection = Rectangle.subsection(
@@ -1213,7 +1213,7 @@ describe("Core/Rectangle", function () {
westLerp,
southLerp,
eastLerp,
- northLerp,
+ northLerp
);
expect(subsection).toEqual(expectedRectangle);
@@ -1239,7 +1239,7 @@ describe("Core/Rectangle", function () {
expectedWest,
expectedSouth,
expectedEast,
- expectedNorth,
+ expectedNorth
);
const subsection = Rectangle.subsection(
@@ -1247,7 +1247,7 @@ describe("Core/Rectangle", function () {
westLerp,
southLerp,
eastLerp,
- northLerp,
+ northLerp
);
expect(subsection).toEqualEpsilon(expectedRectangle, CesiumMath.EPSILON14);
@@ -1273,7 +1273,7 @@ describe("Core/Rectangle", function () {
expectedWest,
expectedSouth,
expectedEast,
- expectedNorth,
+ expectedNorth
);
const subsection = Rectangle.subsection(
@@ -1281,7 +1281,7 @@ describe("Core/Rectangle", function () {
westLerp,
southLerp,
eastLerp,
- northLerp,
+ northLerp
);
expect(subsection).toEqualEpsilon(expectedRectangle, CesiumMath.EPSILON14);
@@ -1307,7 +1307,7 @@ describe("Core/Rectangle", function () {
expectedWest,
expectedSouth,
expectedEast,
- expectedNorth,
+ expectedNorth
);
const subsection = Rectangle.subsection(
@@ -1315,7 +1315,7 @@ describe("Core/Rectangle", function () {
westLerp,
southLerp,
eastLerp,
- northLerp,
+ northLerp
);
expect(subsection).toEqualEpsilon(expectedRectangle, CesiumMath.EPSILON14);
@@ -1455,7 +1455,7 @@ describe("Core/Rectangle", function () {
it("fromBoundingSphere works with non-zero values", function () {
const boundingSphere = new BoundingSphere(
new Cartesian3(10000000.0, 0.0, 0.0),
- 1000.0,
+ 1000.0
);
const result = Rectangle.fromBoundingSphere(boundingSphere);
const expectedRectangle = new Rectangle();
@@ -1469,7 +1469,7 @@ describe("Core/Rectangle", function () {
it("fromBoundingSphere works with bounding sphere centered at the poles", function () {
const boundingSphere = new BoundingSphere(
new Cartesian3(0.0, 0.0, Ellipsoid.WGS84.radii.z),
- 1000.0,
+ 1000.0
);
const result = Rectangle.fromBoundingSphere(boundingSphere);
const expectedRectangle = new Rectangle();
@@ -1483,13 +1483,13 @@ describe("Core/Rectangle", function () {
it("fromBoundingSphere uses result parameter", function () {
const boundingSphere = new BoundingSphere(
new Cartesian3(10000000.0, 0.0, 0.0),
- 1000.0,
+ 1000.0
);
const result = new Rectangle();
const returned = Rectangle.fromBoundingSphere(
boundingSphere,
Ellipsoid.WGS84,
- result,
+ result
);
const expectedRectangle = new Rectangle();
diff --git a/packages/engine/Specs/Core/RequestErrorEventSpec.js b/packages/engine/Specs/Core/RequestErrorEventSpec.js
index 23bf29e65580..61ca4a8890cd 100644
--- a/packages/engine/Specs/Core/RequestErrorEventSpec.js
+++ b/packages/engine/Specs/Core/RequestErrorEventSpec.js
@@ -5,7 +5,7 @@ describe("Core/RequestErrorEvent", function () {
const event = new RequestErrorEvent(
404,
"foo",
- "This-is-a-test: first\r\nAnother: second value!",
+ "This-is-a-test: first\r\nAnother: second value!"
);
expect(event.responseHeaders).toEqual({
"This-is-a-test": "first",
diff --git a/packages/engine/Specs/Core/RequestSchedulerSpec.js b/packages/engine/Specs/Core/RequestSchedulerSpec.js
index 71ad16c07887..d1f8f9c0ea76 100644
--- a/packages/engine/Specs/Core/RequestSchedulerSpec.js
+++ b/packages/engine/Specs/Core/RequestSchedulerSpec.js
@@ -21,8 +21,7 @@ describe("Core/RequestScheduler", function () {
afterEach(function () {
RequestScheduler.maximumRequests = originalMaximumRequests;
- RequestScheduler.maximumRequestsPerServer =
- originalMaximumRequestsPerServer;
+ RequestScheduler.maximumRequestsPerServer = originalMaximumRequestsPerServer;
RequestScheduler.priorityHeapLength = originalPriorityHeapLength;
RequestScheduler.requestsByServer = originalRequestsByServer;
});
@@ -40,7 +39,7 @@ describe("Core/RequestScheduler", function () {
requestFunction: function (url) {
return undefined;
},
- }),
+ })
);
}).toThrowDeveloperError();
});
@@ -50,7 +49,7 @@ describe("Core/RequestScheduler", function () {
RequestScheduler.request(
new Request({
url: "file/path",
- }),
+ })
);
}).toThrowDeveloperError();
});
@@ -235,12 +234,12 @@ describe("Core/RequestScheduler", function () {
RequestScheduler.priorityHeapLength = 1;
const firstRequest = createRequest(0.0);
- const promise = RequestScheduler.request(firstRequest).catch(
- function (error) {
- // Request will be cancelled
- expect(error).toBeUndefined();
- },
- );
+ const promise = RequestScheduler.request(firstRequest).catch(function (
+ error
+ ) {
+ // Request will be cancelled
+ expect(error).toBeUndefined();
+ });
expect(promise).toBeDefined();
const promise2 = RequestScheduler.request(createRequest(1.0));
expect(promise2).toBeUndefined();
@@ -283,7 +282,7 @@ describe("Core/RequestScheduler", function () {
} else {
expect(statistics.numberOfActiveRequests).toBe(1);
expect(
- RequestScheduler.numberOfActiveRequestsByServer(request.serverKey),
+ RequestScheduler.numberOfActiveRequestsByServer(request.serverKey)
).toBe(1);
}
@@ -294,7 +293,7 @@ describe("Core/RequestScheduler", function () {
expect(statistics.numberOfActiveRequests).toBe(0);
if (!dataOrBlobUri) {
expect(
- RequestScheduler.numberOfActiveRequestsByServer(request.serverKey),
+ RequestScheduler.numberOfActiveRequestsByServer(request.serverKey)
).toBe(0);
}
});
@@ -407,7 +406,7 @@ describe("Core/RequestScheduler", function () {
expect(statistics.numberOfCancelledRequests).toBe(1);
expect(statistics.numberOfCancelledActiveRequests).toBe(1);
expect(
- RequestScheduler.numberOfActiveRequestsByServer(request.serverKey),
+ RequestScheduler.numberOfActiveRequestsByServer(request.serverKey)
).toBe(0);
expect(cancelFunction).toHaveBeenCalled();
@@ -768,18 +767,18 @@ describe("Core/RequestScheduler", function () {
return Promise.all(
requests.map(function (request) {
return request.deferred;
- }),
+ })
).finally(function () {
RequestScheduler.update();
expect(console.log).toHaveBeenCalledWith(
- "Number of attempted requests: 3",
+ "Number of attempted requests: 3"
);
expect(console.log).toHaveBeenCalledWith(
- "Number of cancelled requests: 3",
+ "Number of cancelled requests: 3"
);
expect(console.log).toHaveBeenCalledWith(
- "Number of cancelled active requests: 2",
+ "Number of cancelled active requests: 2"
);
expect(console.log).toHaveBeenCalledWith("Number of failed requests: 1");
@@ -812,10 +811,11 @@ describe("Core/RequestScheduler", function () {
expect(promise).toBeDefined();
let eventRaised = false;
- const removeListenerCallback =
- RequestScheduler.requestCompletedEvent.addEventListener(function () {
+ const removeListenerCallback = RequestScheduler.requestCompletedEvent.addEventListener(
+ function () {
eventRaised = true;
- });
+ }
+ );
deferred.resolve();
@@ -842,10 +842,11 @@ describe("Core/RequestScheduler", function () {
});
let eventRaised = false;
- const removeListenerCallback =
- RequestScheduler.requestCompletedEvent.addEventListener(function () {
+ const removeListenerCallback = RequestScheduler.requestCompletedEvent.addEventListener(
+ function () {
eventRaised = true;
- });
+ }
+ );
const promise = RequestScheduler.request(request);
expect(promise).toBeDefined();
@@ -883,10 +884,11 @@ describe("Core/RequestScheduler", function () {
});
let eventRaised = false;
- const removeListenerCallback =
- RequestScheduler.requestCompletedEvent.addEventListener(function () {
+ const removeListenerCallback = RequestScheduler.requestCompletedEvent.addEventListener(
+ function () {
eventRaised = true;
- });
+ }
+ );
const promise = RequestScheduler.request(request);
expect(promise).toBeDefined();
@@ -916,11 +918,12 @@ describe("Core/RequestScheduler", function () {
});
let eventRaised = false;
- const removeListenerCallback =
- RequestScheduler.requestCompletedEvent.addEventListener(function (error) {
+ const removeListenerCallback = RequestScheduler.requestCompletedEvent.addEventListener(
+ function (error) {
eventRaised = true;
expect(error).toBeDefined();
- });
+ }
+ );
const promise = RequestScheduler.request(request);
expect(promise).toBeDefined();
@@ -956,10 +959,11 @@ describe("Core/RequestScheduler", function () {
const promise = RequestScheduler.request(requestToCancel);
- const removeListenerCallback =
- RequestScheduler.requestCompletedEvent.addEventListener(function () {
+ const removeListenerCallback = RequestScheduler.requestCompletedEvent.addEventListener(
+ function () {
fail("should not be called");
- });
+ }
+ );
requestToCancel.cancel();
RequestScheduler.update();
@@ -990,7 +994,7 @@ describe("Core/RequestScheduler", function () {
requestFunction: function () {
return deferred.promise;
},
- }),
+ })
);
RequestScheduler.update();
expect(promise).toBeDefined();
@@ -1005,7 +1009,7 @@ describe("Core/RequestScheduler", function () {
requestFunction: function () {
return defer();
},
- }),
+ })
);
expect(promise).toBeUndefined();
@@ -1070,10 +1074,10 @@ describe("Core/RequestScheduler", function () {
promises.push(RequestScheduler.request(createRequest()));
promises.push(RequestScheduler.request(createRequest()));
expect(RequestScheduler.serverHasOpenSlots("test.invalid:80", 3)).toBe(
- true,
+ true
);
expect(RequestScheduler.serverHasOpenSlots("test.invalid:80", 4)).toBe(
- false,
+ false
);
const length = deferreds.length;
diff --git a/packages/engine/Specs/Core/ResourceSpec.js b/packages/engine/Specs/Core/ResourceSpec.js
index c4e50c3d2744..8ce027c2b09e 100644
--- a/packages/engine/Specs/Core/ResourceSpec.js
+++ b/packages/engine/Specs/Core/ResourceSpec.js
@@ -50,22 +50,22 @@ describe("Core/Resource", function () {
});
expect(resource.getUrlComponent(false, false)).toEqual(
- "http://test.com/tileset",
+ "http://test.com/tileset"
);
expect(resource.getUrlComponent(true, false)).toEqual(
- "http://test.com/tileset?key1=value1&key2=value2",
+ "http://test.com/tileset?key1=value1&key2=value2"
);
expect(resource.getUrlComponent(false, true)).toEqual(
- proxy.getURL("http://test.com/tileset"),
+ proxy.getURL("http://test.com/tileset")
);
expect(resource.getUrlComponent(true, true)).toEqual(
- proxy.getURL("http://test.com/tileset?key1=value1&key2=value2"),
+ proxy.getURL("http://test.com/tileset?key1=value1&key2=value2")
);
expect(resource.url).toEqual(
- proxy.getURL("http://test.com/tileset?key1=value1&key2=value2"),
+ proxy.getURL("http://test.com/tileset?key1=value1&key2=value2")
);
expect(String(resource)).toEqual(
- proxy.getURL("http://test.com/tileset?key1=value1&key2=value2"),
+ proxy.getURL("http://test.com/tileset?key1=value1&key2=value2")
);
expect(resource.queryParameters).toEqual({
key1: "value1",
@@ -131,7 +131,7 @@ describe("Core/Resource", function () {
});
expect(resource.getUrlComponent()).toEqual("http://test.com/tileset");
expect(resource.getUrlComponent(true)).toEqual(
- "http://test.com/tileset?foo=bar&baz=foo",
+ "http://test.com/tileset?foo=bar&baz=foo"
);
expect(resource.queryParameters).toEqual({
foo: "bar",
@@ -145,10 +145,10 @@ describe("Core/Resource", function () {
parseUrl: false,
});
expect(resource.getUrlComponent()).toEqual(
- "http://test.com/tileset?foo=bar&baz=foo",
+ "http://test.com/tileset?foo=bar&baz=foo"
);
expect(resource.getUrlComponent(true)).toEqual(
- "http://test.com/tileset?foo=bar&baz=foo",
+ "http://test.com/tileset?foo=bar&baz=foo"
);
expect(resource.queryParameters).toEqual({});
});
@@ -171,25 +171,25 @@ describe("Core/Resource", function () {
it("multiple values for query parameters are allowed", function () {
const resource = new Resource(
- "http://test.com/tileset/endpoint?a=1&a=2&b=3&a=4",
+ "http://test.com/tileset/endpoint?a=1&a=2&b=3&a=4"
);
expect(resource.queryParameters.a).toEqual(["1", "2", "4"]);
expect(resource.queryParameters.b).toEqual("3");
expect(resource.url).toEqual(
- "http://test.com/tileset/endpoint?a=1&a=2&a=4&b=3",
+ "http://test.com/tileset/endpoint?a=1&a=2&a=4&b=3"
);
});
it("multiple values for query parameters works with getDerivedResource without preserverQueryParameters", function () {
const resource = new Resource(
- "http://test.com/tileset/endpoint?a=1&a=2&b=3&a=4",
+ "http://test.com/tileset/endpoint?a=1&a=2&b=3&a=4"
);
expect(resource.queryParameters.a).toEqual(["1", "2", "4"]);
expect(resource.queryParameters.b).toEqual("3");
expect(resource.url).toEqual(
- "http://test.com/tileset/endpoint?a=1&a=2&a=4&b=3",
+ "http://test.com/tileset/endpoint?a=1&a=2&a=4&b=3"
);
const derived = resource.getDerivedResource({
@@ -200,19 +200,19 @@ describe("Core/Resource", function () {
expect(derived.queryParameters.b).toEqual("6");
expect(derived.url).toEqual(
- "http://test.com/tileset/other_endpoint?a=5&a=7&b=6",
+ "http://test.com/tileset/other_endpoint?a=5&a=7&b=6"
);
});
it("multiple values for query parameters works with getDerivedResource with preserveQueryParameters", function () {
const resource = new Resource(
- "http://test.com/tileset/endpoint?a=1&a=2&b=3&a=4",
+ "http://test.com/tileset/endpoint?a=1&a=2&b=3&a=4"
);
expect(resource.queryParameters.a).toEqual(["1", "2", "4"]);
expect(resource.queryParameters.b).toEqual("3");
expect(resource.url).toEqual(
- "http://test.com/tileset/endpoint?a=1&a=2&a=4&b=3",
+ "http://test.com/tileset/endpoint?a=1&a=2&a=4&b=3"
);
const derived = resource.getDerivedResource({
@@ -224,7 +224,7 @@ describe("Core/Resource", function () {
expect(derived.queryParameters.b).toEqual(["6", "3"]);
expect(derived.url).toEqual(
- "http://test.com/tileset/other_endpoint?a=5&a=7&a=1&a=2&a=4&b=6&b=3",
+ "http://test.com/tileset/other_endpoint?a=5&a=7&a=1&a=2&a=4&b=6&b=3"
);
});
@@ -309,23 +309,23 @@ describe("Core/Resource", function () {
});
expect(resource.getUrlComponent(false, false)).toEqual(
- "http://test.com/tileset/tileset.json",
+ "http://test.com/tileset/tileset.json"
);
expect(resource.getUrlComponent(true, false)).toEqual(
- "http://test.com/tileset/tileset.json?key1=value1&key2=value2&key=value&foo=bar",
+ "http://test.com/tileset/tileset.json?key1=value1&key2=value2&key=value&foo=bar"
);
expect(resource.getUrlComponent(false, true)).toEqual(
- proxy.getURL("http://test.com/tileset/tileset.json"),
+ proxy.getURL("http://test.com/tileset/tileset.json")
);
expect(resource.getUrlComponent(true, true)).toEqual(
proxy.getURL(
- "http://test.com/tileset/tileset.json?key1=value1&key2=value2&key=value&foo=bar",
- ),
+ "http://test.com/tileset/tileset.json?key1=value1&key2=value2&key=value&foo=bar"
+ )
);
expect(resource.url).toEqual(
proxy.getURL(
- "http://test.com/tileset/tileset.json?key1=value1&key2=value2&key=value&foo=bar",
- ),
+ "http://test.com/tileset/tileset.json?key1=value1&key2=value2&key=value&foo=bar"
+ )
);
expect(resource.queryParameters).toEqual({
foo: "bar",
@@ -433,7 +433,7 @@ describe("Core/Resource", function () {
y: 4,
z: 0,
},
- true,
+ true
);
expect(resource.queryParameters).toEqual({
@@ -463,7 +463,7 @@ describe("Core/Resource", function () {
y: 4,
z: 0,
},
- false,
+ false
);
expect(resource.queryParameters).toEqual({
@@ -552,7 +552,7 @@ describe("Core/Resource", function () {
z: 0,
style: "my style",
},
- true,
+ true
);
expect(resource.templateValues).toEqual({
@@ -587,7 +587,7 @@ describe("Core/Resource", function () {
z: 0,
style: "my style",
},
- false,
+ false
);
expect(resource.templateValues).toEqual({
@@ -698,26 +698,24 @@ describe("Core/Resource", function () {
headers: expectedHeaders,
});
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- expect(url).toEqual(expectedUrl);
- expect(responseType).toEqual(expectedResponseType);
- expect(method).toEqual("POST");
- expect(data).toEqual(expectedData);
- expect(headers["X-My-Header"]).toEqual("My-Value");
- expect(headers["X-My-Other-Header"]).toEqual("My-Other-Value");
- expect(overrideMimeType).toBe(expectedMimeType);
- deferred.resolve(expectedResult);
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ expect(url).toEqual(expectedUrl);
+ expect(responseType).toEqual(expectedResponseType);
+ expect(method).toEqual("POST");
+ expect(data).toEqual(expectedData);
+ expect(headers["X-My-Header"]).toEqual("My-Value");
+ expect(headers["X-My-Other-Header"]).toEqual("My-Other-Value");
+ expect(overrideMimeType).toBe(expectedMimeType);
+ deferred.resolve(expectedResult);
+ });
return resource
.post(expectedData, {
@@ -746,25 +744,23 @@ describe("Core/Resource", function () {
};
const expectedMimeType = "application/test-data";
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- expect(url).toEqual(expectedUrl);
- expect(responseType).toEqual(expectedResponseType);
- expect(method).toEqual("POST");
- expect(data).toEqual(expectedData);
- expect(headers).toEqual(expectedHeaders);
- expect(overrideMimeType).toBe(expectedMimeType);
- deferred.resolve(expectedResult);
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ expect(url).toEqual(expectedUrl);
+ expect(responseType).toEqual(expectedResponseType);
+ expect(method).toEqual("POST");
+ expect(data).toEqual(expectedData);
+ expect(headers).toEqual(expectedHeaders);
+ expect(overrideMimeType).toBe(expectedMimeType);
+ deferred.resolve(expectedResult);
+ });
return Resource.post({
url: expectedUrl,
@@ -795,26 +791,24 @@ describe("Core/Resource", function () {
headers: expectedHeaders,
});
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- expect(url).toEqual(expectedUrl);
- expect(responseType).toEqual(expectedResponseType);
- expect(method).toEqual("PUT");
- expect(data).toEqual(expectedData);
- expect(headers["X-My-Header"]).toEqual("My-Value");
- expect(headers["X-My-Other-Header"]).toEqual("My-Other-Value");
- expect(overrideMimeType).toBe(expectedMimeType);
- deferred.resolve(expectedResult);
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ expect(url).toEqual(expectedUrl);
+ expect(responseType).toEqual(expectedResponseType);
+ expect(method).toEqual("PUT");
+ expect(data).toEqual(expectedData);
+ expect(headers["X-My-Header"]).toEqual("My-Value");
+ expect(headers["X-My-Other-Header"]).toEqual("My-Other-Value");
+ expect(overrideMimeType).toBe(expectedMimeType);
+ deferred.resolve(expectedResult);
+ });
return resource
.put(expectedData, {
@@ -843,25 +837,23 @@ describe("Core/Resource", function () {
};
const expectedMimeType = "application/test-data";
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- expect(url).toEqual(expectedUrl);
- expect(responseType).toEqual(expectedResponseType);
- expect(method).toEqual("PUT");
- expect(data).toEqual(expectedData);
- expect(headers).toEqual(expectedHeaders);
- expect(overrideMimeType).toBe(expectedMimeType);
- deferred.resolve(expectedResult);
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ expect(url).toEqual(expectedUrl);
+ expect(responseType).toEqual(expectedResponseType);
+ expect(method).toEqual("PUT");
+ expect(data).toEqual(expectedData);
+ expect(headers).toEqual(expectedHeaders);
+ expect(overrideMimeType).toBe(expectedMimeType);
+ deferred.resolve(expectedResult);
+ });
return Resource.put({
url: expectedUrl,
@@ -892,26 +884,24 @@ describe("Core/Resource", function () {
headers: expectedHeaders,
});
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- expect(url).toEqual(expectedUrl);
- expect(responseType).toEqual(expectedResponseType);
- expect(method).toEqual("PATCH");
- expect(data).toEqual(expectedData);
- expect(headers["X-My-Header"]).toEqual("My-Value");
- expect(headers["X-My-Other-Header"]).toEqual("My-Other-Value");
- expect(overrideMimeType).toBe(expectedMimeType);
- deferred.resolve(expectedResult);
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ expect(url).toEqual(expectedUrl);
+ expect(responseType).toEqual(expectedResponseType);
+ expect(method).toEqual("PATCH");
+ expect(data).toEqual(expectedData);
+ expect(headers["X-My-Header"]).toEqual("My-Value");
+ expect(headers["X-My-Other-Header"]).toEqual("My-Other-Value");
+ expect(overrideMimeType).toBe(expectedMimeType);
+ deferred.resolve(expectedResult);
+ });
return resource
.patch(expectedData, {
@@ -940,25 +930,23 @@ describe("Core/Resource", function () {
};
const expectedMimeType = "application/test-data";
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- expect(url).toEqual(expectedUrl);
- expect(responseType).toEqual(expectedResponseType);
- expect(method).toEqual("PATCH");
- expect(data).toEqual(expectedData);
- expect(headers).toEqual(expectedHeaders);
- expect(overrideMimeType).toBe(expectedMimeType);
- deferred.resolve(expectedResult);
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ expect(url).toEqual(expectedUrl);
+ expect(responseType).toEqual(expectedResponseType);
+ expect(method).toEqual("PATCH");
+ expect(data).toEqual(expectedData);
+ expect(headers).toEqual(expectedHeaders);
+ expect(overrideMimeType).toBe(expectedMimeType);
+ deferred.resolve(expectedResult);
+ });
return Resource.patch({
url: expectedUrl,
@@ -975,7 +963,7 @@ describe("Core/Resource", function () {
const url = "http://test.com/data";
const expectedResult = Promise.resolve();
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- expectedResult,
+ expectedResult
);
const result = Resource.fetchArrayBuffer(url);
expect(result).toBe(expectedResult);
@@ -1071,7 +1059,7 @@ describe("Core/Resource", function () {
it("fetchJson calls fetch with expected parameters and parses result", function () {
const expectedResult = { x: 123 };
spyOn(Resource.prototype, "fetch").and.returnValue(
- Promise.resolve(JSON.stringify(expectedResult)),
+ Promise.resolve(JSON.stringify(expectedResult))
);
return Resource.fetchJson("url").then(function (result) {
expect(result).toEqual(expectedResult);
@@ -1128,21 +1116,19 @@ describe("Core/Resource", function () {
status: "success",
};
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- expect(url).toEqual(expectedUrl);
- expect(method).toEqual("GET");
- deferred.resolve(expectedResult);
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ expect(url).toEqual(expectedUrl);
+ expect(method).toEqual("GET");
+ deferred.resolve(expectedResult);
+ });
const resource = new Resource({ url: expectedUrl });
return resource.fetch().then(function (result) {
@@ -1164,21 +1150,19 @@ describe("Core/Resource", function () {
status: "success",
};
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- expect(url).toEqual(expectedUrl);
- expect(method).toEqual("DELETE");
- deferred.resolve(expectedResult);
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ expect(url).toEqual(expectedUrl);
+ expect(method).toEqual("DELETE");
+ deferred.resolve(expectedResult);
+ });
const resource = new Resource({ url: expectedUrl });
return resource.delete().then(function (result) {
@@ -1228,29 +1212,27 @@ describe("Core/Resource", function () {
};
spyOn(window, "XMLHttpRequest").and.returnValue(fakeXHR);
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ expect(url).toEqual(expectedUrl);
+ expect(method).toEqual("HEAD");
+ Resource._DefaultImplementations.loadWithXhr(
url,
responseType,
method,
data,
headers,
deferred,
- overrideMimeType,
- ) {
- expect(url).toEqual(expectedUrl);
- expect(method).toEqual("HEAD");
- Resource._DefaultImplementations.loadWithXhr(
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- );
- },
- );
+ overrideMimeType
+ );
+ });
const resource = new Resource({ url: expectedUrl });
return resource.head().then(function (result) {
@@ -1260,15 +1242,15 @@ describe("Core/Resource", function () {
expect(result.etag).toEqual(expectedResult.etag);
expect(result["content-type"]).toEqual(expectedResult["content-type"]);
expect(result["access-control-allow-origin"]).toEqual(
- expectedResult["access-control-allow-origin"],
+ expectedResult["access-control-allow-origin"]
);
expect(result["cache-control"]).toEqual(expectedResult["cache-control"]);
expect(result["accept-ranges"]).toEqual(expectedResult["accept-ranges"]);
expect(result["access-control-allow-headers"]).toEqual(
- expectedResult["access-control-allow-headers"],
+ expectedResult["access-control-allow-headers"]
);
expect(result["content-length"]).toEqual(
- expectedResult["content-length"],
+ expectedResult["content-length"]
);
});
});
@@ -1314,29 +1296,27 @@ describe("Core/Resource", function () {
};
spyOn(window, "XMLHttpRequest").and.returnValue(fakeXHR);
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ expect(url).toEqual(expectedUrl);
+ expect(method).toEqual("OPTIONS");
+ Resource._DefaultImplementations.loadWithXhr(
url,
responseType,
method,
data,
headers,
deferred,
- overrideMimeType,
- ) {
- expect(url).toEqual(expectedUrl);
- expect(method).toEqual("OPTIONS");
- Resource._DefaultImplementations.loadWithXhr(
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- );
- },
- );
+ overrideMimeType
+ );
+ });
const resource = new Resource({ url: expectedUrl });
return resource.options().then(function (result) {
@@ -1345,45 +1325,45 @@ describe("Core/Resource", function () {
expect(result.etag).toEqual(expectedResult.etag);
expect(result["content-type"]).toEqual(expectedResult["content-type"]);
expect(result["access-control-allow-origin"]).toEqual(
- expectedResult["access-control-allow-origin"],
+ expectedResult["access-control-allow-origin"]
);
expect(result["access-control-allow-methods"]).toEqual(
- expectedResult["access-control-allow-methods"],
+ expectedResult["access-control-allow-methods"]
);
expect(result["access-control-allow-headers"]).toEqual(
- expectedResult["access-control-allow-headers"],
+ expectedResult["access-control-allow-headers"]
);
expect(result["content-length"]).toEqual(
- expectedResult["content-length"],
+ expectedResult["content-length"]
);
});
});
it("can load an SVG", function () {
- return Resource.fetchImage("./Data/Images/Red16x16.svg").then(
- function (loadedImage) {
- expect(loadedImage.width).toEqual(16);
- expect(loadedImage.height).toEqual(16);
- },
- );
+ return Resource.fetchImage("./Data/Images/Red16x16.svg").then(function (
+ loadedImage
+ ) {
+ expect(loadedImage.width).toEqual(16);
+ expect(loadedImage.height).toEqual(16);
+ });
});
it("can load a dimensionless SVG", function () {
- return Resource.fetchImage("./Data/Images/Blue.svg").then(
- function (loadedImage) {
- expect(loadedImage.width).toBeGreaterThan(0);
- expect(loadedImage.height).toBeGreaterThan(0);
- },
- );
+ return Resource.fetchImage("./Data/Images/Blue.svg").then(function (
+ loadedImage
+ ) {
+ expect(loadedImage.width).toBeGreaterThan(0);
+ expect(loadedImage.height).toBeGreaterThan(0);
+ });
});
it("can load an image preferring blob", function () {
- return Resource.fetchImage("./Data/Images/Green.png", true).then(
- function (loadedImage) {
- expect(loadedImage.width).toEqual(1);
- expect(loadedImage.height).toEqual(1);
- },
- );
+ return Resource.fetchImage("./Data/Images/Green.png", true).then(function (
+ loadedImage
+ ) {
+ expect(loadedImage.width).toEqual(1);
+ expect(loadedImage.height).toEqual(1);
+ });
});
it("can load an image from a data URI", function () {
@@ -1534,7 +1514,7 @@ describe("Core/Resource", function () {
}
spyOn(Resource, "supportsImageBitmapOptions").and.returnValue(
- Promise.resolve(false),
+ Promise.resolve(false)
);
spyOn(window, "createImageBitmap").and.callThrough();
@@ -1570,7 +1550,7 @@ describe("Core/Resource", function () {
// Force the fetching of a bad blob that is not an image to trigger the error
spyOn(Resource.prototype, "fetch").and.returnValue(
- Promise.resolve(new Blob([new Uint8Array([])], { type: "text/plain" })),
+ Promise.resolve(new Blob([new Uint8Array([])], { type: "text/plain" }))
);
return Resource.fetchImage({
@@ -1593,17 +1573,17 @@ describe("Core/Resource", function () {
// specific functionality of this code path. For example, the crossOrigin
// restriction does not apply to images loaded with ImageBitmap.
spyOn(Resource, "supportsImageBitmapOptions").and.returnValue(
- Promise.resolve(false),
+ Promise.resolve(false)
);
});
it("can load an image", function () {
- return Resource.fetchImage("./Data/Images/Green.png").then(
- function (loadedImage) {
- expect(loadedImage.width).toEqual(1);
- expect(loadedImage.height).toEqual(1);
- },
- );
+ return Resource.fetchImage("./Data/Images/Green.png").then(function (
+ loadedImage
+ ) {
+ expect(loadedImage.width).toEqual(1);
+ expect(loadedImage.height).toEqual(1);
+ });
});
it("sets the crossOrigin property for cross-origin images", function () {
@@ -1613,7 +1593,7 @@ describe("Core/Resource", function () {
function () {
deferred.resolve();
return fakeImage;
- },
+ }
);
// mock image loading so that the promise resolves
@@ -1625,7 +1605,7 @@ describe("Core/Resource", function () {
function () {
expect(imageConstructorSpy).toHaveBeenCalled();
expect(fakeImage.crossOrigin).toEqual("");
- },
+ }
);
});
@@ -1636,7 +1616,7 @@ describe("Core/Resource", function () {
function () {
deferred.resolve();
return fakeImage;
- },
+ }
);
// mock image loading so that the promise resolves
@@ -1657,7 +1637,7 @@ describe("Core/Resource", function () {
function () {
deferred.resolve();
return fakeImage;
- },
+ }
);
// mock image loading so that the promise resolves
@@ -1747,25 +1727,23 @@ describe("Core/Resource", function () {
const expectedHeaders = {
"X-my-header": "my-value",
};
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- expect(url).toEqual(expectedUrl);
- expect(headers).toEqual(expectedHeaders);
- expect(responseType).toEqual("blob");
-
- const binary = dataUriToBuffer(dataUri);
-
- deferred.resolve(new Blob([binary], { type: "image/png" }));
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ expect(url).toEqual(expectedUrl);
+ expect(headers).toEqual(expectedHeaders);
+ expect(responseType).toEqual("blob");
+
+ const binary = dataUriToBuffer(dataUri);
+
+ deferred.resolve(new Blob([binary], { type: "image/png" }));
+ });
const testResource = new Resource({
url: expectedUrl,
@@ -1780,19 +1758,17 @@ describe("Core/Resource", function () {
});
it("Doesn't call loadWithXhr with blob response type if headers is set but is a data URI", function () {
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- deferred.reject("this shouldn't happen");
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ deferred.reject("this shouldn't happen");
+ });
spyOn(Resource._Implementations, "createImage")
.and.callFake(function (url, crossOrigin, deferred) {
@@ -2167,7 +2143,7 @@ describe("Core/Resource", function () {
responseType: "json",
}).then(function (result) {
expect(result).toEqual(
- jasmine.objectContaining({ hello: "world" }),
+ jasmine.objectContaining({ hello: "world" })
);
});
});
@@ -2211,7 +2187,7 @@ describe("Core/Resource", function () {
};
requestConstructorSpy = spyOn(window, "XMLHttpRequest").and.returnValue(
- fakeXHR,
+ fakeXHR
);
});
@@ -2513,7 +2489,7 @@ describe("Core/Resource", function () {
expect(receivedResource.url).toEqual(resource.url);
expect(receivedResource._retryCount).toEqual(1);
expect(cb.calls.argsFor(0)[1] instanceof RequestErrorEvent).toBe(
- true,
+ true
);
});
});
@@ -2543,7 +2519,7 @@ describe("Core/Resource", function () {
expect(receivedResource.url).toEqual(resource.url);
expect(receivedResource._retryCount).toEqual(1);
expect(cb.calls.argsFor(0)[1] instanceof RequestErrorEvent).toBe(
- true,
+ true
);
});
});
@@ -2577,7 +2553,7 @@ describe("Core/Resource", function () {
expect(receivedResource.url).toEqual(resource.url);
expect(receivedResource._retryCount).toEqual(1);
expect(cb.calls.argsFor(0)[1] instanceof RequestErrorEvent).toBe(
- true,
+ true
);
});
});
@@ -2594,7 +2570,7 @@ describe("Core/Resource", function () {
expect(name).toContain("loadJsonp");
expect(deferred).toBeDefined();
deferred.resolve();
- },
+ }
);
return Resource.fetchJsonp(testUrl);
});
@@ -2615,7 +2591,7 @@ describe("Core/Resource", function () {
function (url, functionName, deferred) {
expect(url).toContain("callback=loadJsonp");
deferred.resolve();
- },
+ }
);
return Resource.fetchJsonp(testUrl, options);
});
@@ -2628,7 +2604,7 @@ describe("Core/Resource", function () {
spyOn(Resource._Implementations, "loadAndExecuteScript").and.callFake(
function (url, functionName, deferred) {
lastDeferred = deferred;
- },
+ }
);
const resource = new Resource({
@@ -2670,7 +2646,7 @@ describe("Core/Resource", function () {
spyOn(Resource._Implementations, "loadAndExecuteScript").and.callFake(
function (url, functionName, deferred) {
lastDeferred = deferred;
- },
+ }
);
const resource = new Resource({
@@ -2707,7 +2683,7 @@ describe("Core/Resource", function () {
function (url, functionName, deferred) {
lastUrl = url;
lastDeferred = deferred;
- },
+ }
);
const resource = new Resource({
diff --git a/packages/engine/Specs/Core/S2CellSpec.js b/packages/engine/Specs/Core/S2CellSpec.js
index 6bb0947ac748..57a4f7ef2640 100644
--- a/packages/engine/Specs/Core/S2CellSpec.js
+++ b/packages/engine/Specs/Core/S2CellSpec.js
@@ -143,8 +143,8 @@ describe("Core/S2Cell", function () {
cellIdValidity = S2Cell.isValidId(
BigInt(
- "0b0010101000000000000000000000000000000000000000000000000000000000",
- ),
+ "0b0010101000000000000000000000000000000000000000000000000000000000"
+ )
);
expect(cellIdValidity).toBe(false);
});
@@ -162,7 +162,7 @@ describe("Core/S2Cell", function () {
expect(S2Cell.getIdFromToken("04")).toEqual(BigInt("288230376151711744"));
expect(S2Cell.getIdFromToken("3")).toEqual(BigInt("3458764513820540928"));
expect(S2Cell.getIdFromToken("2ef59bd352b93ac3")).toEqual(
- BigInt("3383782026967071427"),
+ BigInt("3383782026967071427")
);
});
@@ -170,7 +170,7 @@ describe("Core/S2Cell", function () {
expect(S2Cell.getTokenFromId(BigInt("288230376151711744"))).toEqual("04");
expect(S2Cell.getTokenFromId(BigInt("3458764513820540928"))).toEqual("3");
expect(S2Cell.getTokenFromId(BigInt("3383782026967071427"))).toEqual(
- "2ef59bd352b93ac3",
+ "2ef59bd352b93ac3"
);
});
@@ -269,35 +269,35 @@ describe("Core/S2Cell", function () {
it("gets correct center of cell", function () {
expect(S2Cell.fromToken("1").getCenter()).toEqualEpsilon(
Cartesian3.fromDegrees(0.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(S2Cell.fromToken("3").getCenter()).toEqualEpsilon(
Cartesian3.fromDegrees(90.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(S2Cell.fromToken("5").getCenter()).toEqualEpsilon(
Cartesian3.fromDegrees(-180.0, 90.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(S2Cell.fromToken("7").getCenter()).toEqualEpsilon(
Cartesian3.fromDegrees(-180.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(S2Cell.fromToken("9").getCenter()).toEqualEpsilon(
Cartesian3.fromDegrees(-90.0, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(S2Cell.fromToken("b").getCenter()).toEqualEpsilon(
Cartesian3.fromDegrees(0.0, -90.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(S2Cell.fromToken("2ef59bd352b93ac3").getCenter()).toEqualEpsilon(
Cartesian3.fromDegrees(105.64131803774308, -10.490091033598308),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(S2Cell.fromToken("1234567").getCenter()).toEqualEpsilon(
Cartesian3.fromDegrees(9.868307318504081, 27.468392925827605),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -316,19 +316,19 @@ describe("Core/S2Cell", function () {
const cell = S2Cell.fromToken("2ef59bd352b93ac3");
expect(cell.getVertex(0)).toEqualEpsilon(
Cartesian3.fromDegrees(105.64131799299665, -10.490091077431977),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(cell.getVertex(1)).toEqualEpsilon(
Cartesian3.fromDegrees(105.64131808248949, -10.490091072946313),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(cell.getVertex(2)).toEqualEpsilon(
Cartesian3.fromDegrees(105.64131808248948, -10.490090989764633),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(cell.getVertex(3)).toEqualEpsilon(
Cartesian3.fromDegrees(105.64131799299665, -10.4900909942503),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
});
diff --git a/packages/engine/Specs/Core/ScreenSpaceEventHandlerSpec.js b/packages/engine/Specs/Core/ScreenSpaceEventHandlerSpec.js
index 6aa4b9d1ad2a..58719b46a4b3 100644
--- a/packages/engine/Specs/Core/ScreenSpaceEventHandlerSpec.js
+++ b/packages/engine/Specs/Core/ScreenSpaceEventHandlerSpec.js
@@ -48,10 +48,9 @@ describe("Core/ScreenSpaceEventHandler", function () {
return cloningSpy;
}
- const eventsToStop =
- "pointerdown pointerup pointermove pointercancel mousedown mouseup mousemove touchstart touchend touchmove touchcancel dblclick wheel mousewheel DOMMouseScroll".split(
- " ",
- );
+ const eventsToStop = "pointerdown pointerup pointermove pointercancel mousedown mouseup mousemove touchstart touchend touchmove touchcancel dblclick wheel mousewheel DOMMouseScroll".split(
+ " "
+ );
function stop(event) {
event.stopPropagation();
@@ -141,7 +140,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
if (defined(modifier)) {
specName += ` with ${keyForValue(
KeyboardEventModifier,
- modifier,
+ modifier
)} modifier`;
}
it(specName, function () {
@@ -159,7 +158,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
specFunction,
possibleButtons,
possibleModifiers,
- possibleEventTypes,
+ possibleEventTypes
) {
for (let i = 0; i < possibleButtons.length; ++i) {
const eventType = possibleEventTypes[i];
@@ -177,7 +176,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
element,
combine(options, {
pointerType: "mouse",
- }),
+ })
);
} else {
DomEventSimulator.fireMouseDown(element, options);
@@ -190,7 +189,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
element,
combine(options, {
pointerType: "mouse",
- }),
+ })
);
} else {
DomEventSimulator.fireMouseUp(element, options);
@@ -203,7 +202,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
element,
combine(options, {
pointerType: "mouse",
- }),
+ })
);
} else {
DomEventSimulator.fireMouseMove(element, options);
@@ -225,8 +224,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
clientX: 1,
clientY: 2,
},
- eventOptions,
- ),
+ eventOptions
+ )
);
}
@@ -267,7 +266,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
testMouseDownEvent,
possibleButtons,
possibleModifiers,
- possibleEventTypes,
+ possibleEventTypes
);
});
@@ -287,8 +286,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
clientX: 1,
clientY: 2,
},
- eventOptions,
- ),
+ eventOptions
+ )
);
simulateMouseUp(
element,
@@ -297,8 +296,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
clientX: 1,
clientY: 2,
},
- eventOptions,
- ),
+ eventOptions
+ )
);
}
@@ -320,8 +319,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
clientX: 1,
clientY: 2,
},
- eventOptions,
- ),
+ eventOptions
+ )
);
simulateMouseMove(
element,
@@ -330,8 +329,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
clientX: 10,
clientY: 11,
},
- eventOptions,
- ),
+ eventOptions
+ )
);
simulateMouseUp(
element,
@@ -340,8 +339,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
clientX: 10,
clientY: 11,
},
- eventOptions,
- ),
+ eventOptions
+ )
);
}
@@ -383,7 +382,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
testMouseUpEvent,
possibleButtons,
possibleModifiers,
- possibleEventTypes,
+ possibleEventTypes
);
});
@@ -403,8 +402,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
clientX: 1,
clientY: 2,
},
- eventOptions,
- ),
+ eventOptions
+ )
);
simulateMouseUp(
element,
@@ -413,8 +412,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
clientX: 1,
clientY: 2,
},
- eventOptions,
- ),
+ eventOptions
+ )
);
}
@@ -434,8 +433,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
clientX: 1,
clientY: 2,
},
- eventOptions,
- ),
+ eventOptions
+ )
);
simulateMouseUp(
element,
@@ -444,8 +443,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
clientX: 10,
clientY: 11,
},
- eventOptions,
- ),
+ eventOptions
+ )
);
expect(action).not.toHaveBeenCalled();
@@ -480,7 +479,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
testMouseClickEvent,
possibleButtons,
possibleModifiers,
- possibleEventTypes,
+ possibleEventTypes
);
});
@@ -499,8 +498,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
clientX: 1,
clientY: 2,
},
- eventOptions,
- ),
+ eventOptions
+ )
);
}
@@ -533,7 +532,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
testMouseDoubleClickEvent,
possibleButtons,
possibleModifiers,
- possibleEventTypes,
+ possibleEventTypes
);
});
@@ -552,8 +551,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
clientX: 1,
clientY: 2,
},
- eventOptions,
- ),
+ eventOptions
+ )
);
simulateMouseMove(
element,
@@ -562,8 +561,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
clientX: 2,
clientY: 3,
},
- eventOptions,
- ),
+ eventOptions
+ )
);
}
@@ -597,7 +596,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
testMouseMoveEvent,
possibleButtons,
possibleModifiers,
- possibleEventTypes,
+ possibleEventTypes
);
});
@@ -617,8 +616,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
deltaY: 120,
},
- eventOptions,
- ),
+ eventOptions
+ )
);
}
@@ -651,7 +650,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
testWheelEvent,
possibleButtons,
possibleModifiers,
- possibleEventTypes,
+ possibleEventTypes
);
});
} else if (document.onmousewheel !== undefined) {
@@ -669,8 +668,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
wheelDelta: -120,
},
- eventOptions,
- ),
+ eventOptions
+ )
);
}
@@ -701,7 +700,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
testMouseWheelEvent,
possibleButtons,
possibleModifiers,
- possibleEventTypes,
+ possibleEventTypes
);
});
}
@@ -729,8 +728,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touchStartPosition,
- ),
+ touchStartPosition
+ )
);
} else {
DomEventSimulator.fireTouchStart(element, {
@@ -739,7 +738,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touchStartPosition,
+ touchStartPosition
),
],
});
@@ -790,8 +789,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touchStartPosition,
- ),
+ touchStartPosition
+ )
);
DomEventSimulator.firePointerMove(
element,
@@ -800,8 +799,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touchMovePosition,
- ),
+ touchMovePosition
+ )
);
} else {
DomEventSimulator.fireTouchStart(element, {
@@ -810,7 +809,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touchStartPosition,
+ touchStartPosition
),
],
});
@@ -820,7 +819,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touchMovePosition,
+ touchMovePosition
),
],
});
@@ -872,8 +871,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touchStartPosition,
- ),
+ touchStartPosition
+ )
);
DomEventSimulator.firePointerUp(
element,
@@ -882,8 +881,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touchEndPosition,
- ),
+ touchEndPosition
+ )
);
} else {
DomEventSimulator.fireTouchStart(element, {
@@ -892,7 +891,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touchStartPosition,
+ touchStartPosition
),
],
});
@@ -902,7 +901,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touchEndPosition,
+ touchEndPosition
),
],
});
@@ -941,8 +940,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touchStartPosition,
- ),
+ touchStartPosition
+ )
);
DomEventSimulator.firePointerMove(
element,
@@ -951,8 +950,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touchMovePosition,
- ),
+ touchMovePosition
+ )
);
DomEventSimulator.firePointerUp(
element,
@@ -961,8 +960,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touchEndPosition,
- ),
+ touchEndPosition
+ )
);
} else {
DomEventSimulator.fireTouchStart(element, {
@@ -971,7 +970,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touchStartPosition,
+ touchStartPosition
),
],
});
@@ -981,7 +980,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touchMovePosition,
+ touchMovePosition
),
],
});
@@ -991,7 +990,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touchEndPosition,
+ touchEndPosition
),
],
});
@@ -1043,8 +1042,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touchStartPosition,
- ),
+ touchStartPosition
+ )
);
DomEventSimulator.firePointerCancel(
element,
@@ -1053,8 +1052,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touchEndPosition,
- ),
+ touchEndPosition
+ )
);
} else {
DomEventSimulator.fireTouchStart(element, {
@@ -1063,7 +1062,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touchStartPosition,
+ touchStartPosition
),
],
});
@@ -1073,7 +1072,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touchEndPosition,
+ touchEndPosition
),
],
});
@@ -1112,8 +1111,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touchStartPosition,
- ),
+ touchStartPosition
+ )
);
DomEventSimulator.firePointerMove(
element,
@@ -1122,8 +1121,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touchMovePosition,
- ),
+ touchMovePosition
+ )
);
DomEventSimulator.firePointerCancel(
element,
@@ -1132,8 +1131,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touchEndPosition,
- ),
+ touchEndPosition
+ )
);
} else {
DomEventSimulator.fireTouchStart(element, {
@@ -1142,7 +1141,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touchStartPosition,
+ touchStartPosition
),
],
});
@@ -1152,7 +1151,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touchMovePosition,
+ touchMovePosition
),
],
});
@@ -1162,7 +1161,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touchEndPosition,
+ touchEndPosition
),
],
});
@@ -1214,8 +1213,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touch1StartPosition,
- ),
+ touch1StartPosition
+ )
);
DomEventSimulator.firePointerDown(
element,
@@ -1224,8 +1223,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 2,
},
- touch2StartPosition,
- ),
+ touch2StartPosition
+ )
);
} else {
DomEventSimulator.fireTouchStart(element, {
@@ -1234,7 +1233,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touch1StartPosition,
+ touch1StartPosition
),
],
});
@@ -1244,13 +1243,13 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touch1StartPosition,
+ touch1StartPosition
),
combine(
{
identifier: 1,
},
- touch2StartPosition,
+ touch2StartPosition
),
],
});
@@ -1310,8 +1309,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touch1StartPosition,
- ),
+ touch1StartPosition
+ )
);
DomEventSimulator.firePointerDown(
element,
@@ -1320,8 +1319,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 2,
},
- touch2StartPosition,
- ),
+ touch2StartPosition
+ )
);
DomEventSimulator.firePointerMove(
element,
@@ -1330,8 +1329,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touch1MovePosition,
- ),
+ touch1MovePosition
+ )
);
DomEventSimulator.firePointerMove(
element,
@@ -1340,8 +1339,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 2,
},
- touch2MovePosition,
- ),
+ touch2MovePosition
+ )
);
} else {
DomEventSimulator.fireTouchStart(element, {
@@ -1350,7 +1349,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touch1StartPosition,
+ touch1StartPosition
),
],
});
@@ -1360,13 +1359,13 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touch1StartPosition,
+ touch1StartPosition
),
combine(
{
identifier: 1,
},
- touch2StartPosition,
+ touch2StartPosition
),
],
});
@@ -1376,13 +1375,13 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touch1MovePosition,
+ touch1MovePosition
),
combine(
{
identifier: 1,
},
- touch2MovePosition,
+ touch2MovePosition
),
],
});
@@ -1476,8 +1475,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touch1Position,
- ),
+ touch1Position
+ )
);
DomEventSimulator.firePointerDown(
element,
@@ -1486,8 +1485,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 2,
},
- touch2Position,
- ),
+ touch2Position
+ )
);
// Releasing one of two fingers should not trigger
@@ -1500,8 +1499,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touch1Position,
- ),
+ touch1Position
+ )
);
expect(pinchEndAction).not.toHaveBeenCalled();
expect(leftDownAction).not.toHaveBeenCalled();
@@ -1517,8 +1516,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touch2Position,
- ),
+ touch2Position
+ )
);
expect(pinchStartAction).not.toHaveBeenCalled();
@@ -1530,8 +1529,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touch2Position,
- ),
+ touch2Position
+ )
);
DomEventSimulator.firePointerUp(
element,
@@ -1540,8 +1539,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 2,
},
- touch2Position,
- ),
+ touch2Position
+ )
);
expect(pinchEndAction).toHaveBeenCalled();
} else {
@@ -1598,8 +1597,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touchStartPosition,
- ),
+ touchStartPosition
+ )
);
DomEventSimulator.firePointerUp(
element,
@@ -1608,8 +1607,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touchEndPosition,
- ),
+ touchEndPosition
+ )
);
} else {
DomEventSimulator.fireTouchStart(element, {
@@ -1618,7 +1617,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touchStartPosition,
+ touchStartPosition
),
],
});
@@ -1628,7 +1627,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touchEndPosition,
+ touchEndPosition
),
],
});
@@ -1683,8 +1682,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touchStartPosition,
- ),
+ touchStartPosition
+ )
);
jasmine.clock().tick(timeout);
DomEventSimulator.firePointerUp(
@@ -1694,8 +1693,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touchEndPosition,
- ),
+ touchEndPosition
+ )
);
} else {
DomEventSimulator.fireTouchStart(element, {
@@ -1704,7 +1703,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touchStartPosition,
+ touchStartPosition
),
],
});
@@ -1715,7 +1714,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touchEndPosition,
+ touchEndPosition
),
],
});
@@ -1784,8 +1783,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touchStartPosition,
- ),
+ touchStartPosition
+ )
);
DomEventSimulator.firePointerCancel(
element,
@@ -1794,8 +1793,8 @@ describe("Core/ScreenSpaceEventHandler", function () {
pointerType: "touch",
pointerId: 1,
},
- touchEndPosition,
- ),
+ touchEndPosition
+ )
);
} else {
DomEventSimulator.fireTouchStart(element, {
@@ -1804,7 +1803,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touchStartPosition,
+ touchStartPosition
),
],
});
@@ -1814,7 +1813,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
{
identifier: 0,
},
- touchEndPosition,
+ touchEndPosition
),
],
});
@@ -1858,7 +1857,7 @@ describe("Core/ScreenSpaceEventHandler", function () {
handler.destroy();
expect(element.removeEventListener.calls.count()).toEqual(
- element.addEventListener.calls.count(),
+ element.addEventListener.calls.count()
);
});
});
diff --git a/packages/engine/Specs/Core/ShowGeometryInstanceAttributeSpec.js b/packages/engine/Specs/Core/ShowGeometryInstanceAttributeSpec.js
index ebfe89da903b..ccccf6ddd37c 100644
--- a/packages/engine/Specs/Core/ShowGeometryInstanceAttributeSpec.js
+++ b/packages/engine/Specs/Core/ShowGeometryInstanceAttributeSpec.js
@@ -7,7 +7,7 @@ describe("Core/ShowGeometryInstanceAttribute", function () {
it("constructor", function () {
const attribute = new ShowGeometryInstanceAttribute(false);
expect(attribute.componentDatatype).toEqual(
- ComponentDatatype.UNSIGNED_BYTE,
+ ComponentDatatype.UNSIGNED_BYTE
);
expect(attribute.componentsPerAttribute).toEqual(1);
expect(attribute.normalize).toEqual(false);
diff --git a/packages/engine/Specs/Core/Simon1994PlanetaryPositionsSpec.js b/packages/engine/Specs/Core/Simon1994PlanetaryPositionsSpec.js
index 51b47155d828..01d26b41a644 100644
--- a/packages/engine/Specs/Core/Simon1994PlanetaryPositionsSpec.js
+++ b/packages/engine/Specs/Core/Simon1994PlanetaryPositionsSpec.js
@@ -84,15 +84,14 @@ describe("Core/Simon1994PlanetaryPositions", function () {
for (i = 0; i < 24; i++) {
transformMatrix = Transforms.computeIcrfToCentralBodyFixedMatrix(
timesOfDay[i],
- transformMatrix,
+ transformMatrix
+ );
+ const position = PlanetaryPositions.computeSunPositionInEarthInertialFrame(
+ timesOfDay[i]
);
- const position =
- PlanetaryPositions.computeSunPositionInEarthInertialFrame(
- timesOfDay[i],
- );
Matrix3.multiplyByVector(transformMatrix, position, position);
angles.push(
- CesiumMath.convertLongitudeRange(Math.atan2(position.y, position.x)),
+ CesiumMath.convertLongitudeRange(Math.atan2(position.y, position.x))
);
}
//Expect a clockwise motion.
diff --git a/packages/engine/Specs/Core/SimplePolylineGeometrySpec.js b/packages/engine/Specs/Core/SimplePolylineGeometrySpec.js
index c4c8713f5c71..1375664dfda4 100644
--- a/packages/engine/Specs/Core/SimplePolylineGeometrySpec.js
+++ b/packages/engine/Specs/Core/SimplePolylineGeometrySpec.js
@@ -46,12 +46,12 @@ describe("Core/SimplePolylineGeometry", function () {
positions: positions,
granularity: Math.PI,
ellipsoid: Ellipsoid.UNIT_SPHERE,
- }),
+ })
);
expect(line.attributes.position.values).toEqualEpsilon(
[1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0],
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(line.indices).toEqual([0, 1, 1, 2]);
expect(line.primitiveType).toEqual(PrimitiveType.LINES);
@@ -66,7 +66,7 @@ describe("Core/SimplePolylineGeometry", function () {
granularity: Math.PI,
ellipsoid: Ellipsoid.UNIT_SPHERE,
arcType: ArcType.RHUMB,
- }),
+ })
);
const cartesian3Array = [];
@@ -74,7 +74,7 @@ describe("Core/SimplePolylineGeometry", function () {
expect(line.attributes.position.values).toEqualEpsilon(
cartesian3Array,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(line.indices).toEqual([0, 1, 1, 2]);
expect(line.primitiveType).toEqual(PrimitiveType.LINES);
@@ -98,7 +98,7 @@ describe("Core/SimplePolylineGeometry", function () {
colors: colors,
granularity: Math.PI,
ellipsoid: Ellipsoid.UNIT_SPHERE,
- }),
+ })
);
expect(line.attributes.color).toBeDefined();
@@ -125,7 +125,7 @@ describe("Core/SimplePolylineGeometry", function () {
colorsPerVertex: true,
granularity: Math.PI,
ellipsoid: Ellipsoid.UNIT_SPHERE,
- }),
+ })
);
expect(line.attributes.color).toBeDefined();
@@ -144,11 +144,19 @@ describe("Core/SimplePolylineGeometry", function () {
new SimplePolylineGeometry({
positions: positions,
arcType: ArcType.NONE,
- }),
+ })
);
expect(line.attributes.position.values).toEqual([
- 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 2.0, 0.0, 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 2.0,
+ 0.0,
+ 0.0,
]);
expect(line.indices).toEqual([0, 1, 1, 2]);
expect(line.primitiveType).toEqual(PrimitiveType.LINES);
@@ -171,7 +179,7 @@ describe("Core/SimplePolylineGeometry", function () {
positions: positions,
colors: colors,
arcType: ArcType.NONE,
- }),
+ })
);
expect(line.attributes.color).toBeDefined();
@@ -197,7 +205,7 @@ describe("Core/SimplePolylineGeometry", function () {
colors: colors,
colorsPerVertex: true,
arcType: ArcType.NONE,
- }),
+ })
);
expect(line.attributes.color).toBeDefined();
@@ -220,14 +228,41 @@ describe("Core/SimplePolylineGeometry", function () {
ellipsoid: new Ellipsoid(12, 13, 14),
});
let packedInstance = [
- 3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 3, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 12, 13,
- 14, 1, 0, 11,
+ 3,
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 3,
+ 1,
+ 0,
+ 0,
+ 1,
+ 0,
+ 1,
+ 0,
+ 1,
+ 0,
+ 0,
+ 1,
+ 1,
+ 12,
+ 13,
+ 14,
+ 1,
+ 0,
+ 11,
];
createPackableSpecs(
SimplePolylineGeometry,
line,
packedInstance,
- "per vertex colors",
+ "per vertex colors"
);
line = new SimplePolylineGeometry({
@@ -253,7 +288,7 @@ describe("Core/SimplePolylineGeometry", function () {
SimplePolylineGeometry,
line,
packedInstance,
- "geodesic line",
+ "geodesic line"
);
line = new SimplePolylineGeometry({
@@ -269,7 +304,7 @@ describe("Core/SimplePolylineGeometry", function () {
SimplePolylineGeometry,
line,
packedInstance,
- "rhumb line",
+ "rhumb line"
);
line = new SimplePolylineGeometry({
@@ -285,6 +320,6 @@ describe("Core/SimplePolylineGeometry", function () {
SimplePolylineGeometry,
line,
packedInstance,
- "straight line",
+ "straight line"
);
});
diff --git a/packages/engine/Specs/Core/SphereGeometrySpec.js b/packages/engine/Specs/Core/SphereGeometrySpec.js
index 6c05a8f85192..d4aa38e45c5e 100644
--- a/packages/engine/Specs/Core/SphereGeometrySpec.js
+++ b/packages/engine/Specs/Core/SphereGeometrySpec.js
@@ -31,7 +31,7 @@ describe("Core/SphereGeometry", function () {
radius: 1,
stackPartitions: 3,
slicePartitions: 3,
- }),
+ })
);
// The vertices are 6x6 because an additional slice and stack are added
@@ -50,7 +50,7 @@ describe("Core/SphereGeometry", function () {
radius: 1,
stackPartitions: 3,
slicePartitions: 3,
- }),
+ })
);
const numVertices = 36;
@@ -70,7 +70,7 @@ describe("Core/SphereGeometry", function () {
radius: 1,
stackPartitions: 3,
slicePartitions: 3,
- }),
+ })
);
const positions = m.attributes.position.values;
@@ -86,16 +86,16 @@ describe("Core/SphereGeometry", function () {
expect(Cartesian3.magnitude(position)).toEqualEpsilon(
1.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(normal).toEqualEpsilon(
Cartesian3.normalize(position, position),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(Cartesian3.dot(Cartesian3.UNIT_Z, tangent)).not.toBeLessThan(0.0);
expect(bitangent).toEqualEpsilon(
Cartesian3.cross(normal, tangent, normal),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
}
});
diff --git a/packages/engine/Specs/Core/SphereOutlineGeometrySpec.js b/packages/engine/Specs/Core/SphereOutlineGeometrySpec.js
index 973677b2890b..fe20690fb5bb 100644
--- a/packages/engine/Specs/Core/SphereOutlineGeometrySpec.js
+++ b/packages/engine/Specs/Core/SphereOutlineGeometrySpec.js
@@ -33,7 +33,7 @@ describe("Core/SphereOutlineGeometry", function () {
stackPartitions: 2,
slicePartitions: 2,
subdivisions: 2,
- }),
+ })
);
expect(m.attributes.position.values.length).toEqual(12 * 3);
diff --git a/packages/engine/Specs/Core/SphericalSpec.js b/packages/engine/Specs/Core/SphericalSpec.js
index 3e38416c67a4..c5515a14f861 100644
--- a/packages/engine/Specs/Core/SphericalSpec.js
+++ b/packages/engine/Specs/Core/SphericalSpec.js
@@ -36,13 +36,13 @@ describe("Core/Spherical", function () {
const spherical = new Spherical(
sixtyDegrees,
fortyFiveDegrees + Math.PI / 2.0,
- Math.sqrt(8.0),
+ Math.sqrt(8.0)
);
it("Can convert Cartesian3 to a new spherical instance", function () {
expect(spherical).toEqualEpsilon(
Spherical.fromCartesian3(cartesian),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -50,7 +50,7 @@ describe("Core/Spherical", function () {
const existing = new Spherical();
expect(spherical).toEqualEpsilon(
Spherical.fromCartesian3(cartesian, existing),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(spherical).toEqualEpsilon(existing, CesiumMath.EPSILON15);
});
@@ -110,7 +110,7 @@ describe("Core/Spherical", function () {
it("equalsEpsilon returns false for expected values.", function () {
expect(new Spherical(1, 2, 1)).not.toEqualEpsilon(
new NotSpherical(1, 2, 3),
- 1,
+ 1
);
});
diff --git a/packages/engine/Specs/Core/SplineSpec.js b/packages/engine/Specs/Core/SplineSpec.js
index 94570c49ce62..8a38ca5a2acb 100644
--- a/packages/engine/Specs/Core/SplineSpec.js
+++ b/packages/engine/Specs/Core/SplineSpec.js
@@ -93,7 +93,7 @@ describe("Core/Spline", function () {
// jump far forward
expect(spline.findTimeInterval(times[times.length - 2], 0)).toEqual(
- times.length - 2,
+ times.length - 2
);
// jump far back
diff --git a/packages/engine/Specs/Core/StereographicSpec.js b/packages/engine/Specs/Core/StereographicSpec.js
index 285e8b39bd36..60c742a4b3c7 100644
--- a/packages/engine/Specs/Core/StereographicSpec.js
+++ b/packages/engine/Specs/Core/StereographicSpec.js
@@ -11,208 +11,208 @@ describe("Core/Stereographic", function () {
expect(stereographic.x).toEqual(0.0);
expect(stereographic.y).toEqual(0.0);
expect(stereographic.tangentPlane).toEqual(
- Stereographic.NORTH_POLE_TANGENT_PLANE,
+ Stereographic.NORTH_POLE_TANGENT_PLANE
);
});
it("construct with values", function () {
const stereographic = new Stereographic(
new Cartesian2(1.0, 2.0),
- Stereographic.SOUTH_POLE_TANGENT_PLANE,
+ Stereographic.SOUTH_POLE_TANGENT_PLANE
);
expect(stereographic.x).toEqual(1.0);
expect(stereographic.y).toEqual(2.0);
expect(stereographic.tangentPlane).toEqual(
- Stereographic.SOUTH_POLE_TANGENT_PLANE,
+ Stereographic.SOUTH_POLE_TANGENT_PLANE
);
});
it("fromCartesian constructs a Stereographic in the northern hemisphere", function () {
const stereographic = new Stereographic.fromCartesian(
- Cartesian3.fromDegrees(30.0, 60.0),
+ Cartesian3.fromDegrees(30.0, 60.0)
);
expect(stereographic.x).toEqualEpsilon(0.1347555369, CesiumMath.EPSILON7);
expect(stereographic.y).toEqualEpsilon(-0.2334034365, CesiumMath.EPSILON7);
expect(stereographic.tangentPlane).toEqual(
- Stereographic.NORTH_POLE_TANGENT_PLANE,
+ Stereographic.NORTH_POLE_TANGENT_PLANE
);
});
it("fromCartesian constructs a Stereographic at 0,0", function () {
const stereographic = new Stereographic.fromCartesian(
- Cartesian3.fromDegrees(0.0, 0.0),
+ Cartesian3.fromDegrees(0.0, 0.0)
);
expect(stereographic.x).toEqualEpsilon(0.0, CesiumMath.EPSILON7);
expect(stereographic.y).toEqualEpsilon(-1.0, CesiumMath.EPSILON7);
expect(stereographic.tangentPlane).toEqual(
- Stereographic.NORTH_POLE_TANGENT_PLANE,
+ Stereographic.NORTH_POLE_TANGENT_PLANE
);
});
it("fromCartesian constructs a Stereographic in the southern hemisphere", function () {
const stereographic = new Stereographic.fromCartesian(
- Cartesian3.fromDegrees(30.0, -60.0),
+ Cartesian3.fromDegrees(30.0, -60.0)
);
expect(stereographic.x).toEqualEpsilon(0.1347555369, CesiumMath.EPSILON7);
expect(stereographic.y).toEqualEpsilon(-0.2334034365, CesiumMath.EPSILON7);
expect(stereographic.tangentPlane).toEqual(
- Stereographic.SOUTH_POLE_TANGENT_PLANE,
+ Stereographic.SOUTH_POLE_TANGENT_PLANE
);
});
it("can get longitude from a Stereographic in the northern hemisphere", function () {
let stereographic = new Stereographic.fromCartesian(
- Cartesian3.fromDegrees(30.0, 60.0),
+ Cartesian3.fromDegrees(30.0, 60.0)
);
expect(stereographic.longitude).toEqualEpsilon(
CesiumMath.toRadians(30.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
stereographic = new Stereographic.fromCartesian(
- Cartesian3.fromDegrees(60.0, 30.0),
+ Cartesian3.fromDegrees(60.0, 30.0)
);
expect(stereographic.longitude).toEqualEpsilon(
CesiumMath.toRadians(60.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
stereographic = new Stereographic.fromCartesian(
- Cartesian3.fromDegrees(-60.0, 30.0),
+ Cartesian3.fromDegrees(-60.0, 30.0)
);
expect(stereographic.longitude).toEqualEpsilon(
CesiumMath.toRadians(-60.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
stereographic = new Stereographic.fromCartesian(
- Cartesian3.fromDegrees(-135.0, 60.0),
+ Cartesian3.fromDegrees(-135.0, 60.0)
);
expect(stereographic.longitude).toEqualEpsilon(
CesiumMath.toRadians(-135.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
stereographic = new Stereographic.fromCartesian(
- Cartesian3.fromDegrees(135.0, 60.0),
+ Cartesian3.fromDegrees(135.0, 60.0)
);
expect(stereographic.longitude).toEqualEpsilon(
CesiumMath.toRadians(135.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("can get longitude from a Stereographic in the southern hemisphere", function () {
let stereographic = new Stereographic.fromCartesian(
- Cartesian3.fromDegrees(30.0, -60.0),
+ Cartesian3.fromDegrees(30.0, -60.0)
);
expect(stereographic.longitude).toEqualEpsilon(
CesiumMath.toRadians(30.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
stereographic = new Stereographic.fromCartesian(
- Cartesian3.fromDegrees(60.0, -30.0),
+ Cartesian3.fromDegrees(60.0, -30.0)
);
expect(stereographic.longitude).toEqualEpsilon(
CesiumMath.toRadians(60.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
stereographic = new Stereographic.fromCartesian(
- Cartesian3.fromDegrees(-60.0, -30.0),
+ Cartesian3.fromDegrees(-60.0, -30.0)
);
expect(stereographic.longitude).toEqualEpsilon(
CesiumMath.toRadians(-60.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
stereographic = new Stereographic.fromCartesian(
- Cartesian3.fromDegrees(-135.0, -60.0),
+ Cartesian3.fromDegrees(-135.0, -60.0)
);
expect(stereographic.longitude).toEqualEpsilon(
CesiumMath.toRadians(-135.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
stereographic = new Stereographic.fromCartesian(
- Cartesian3.fromDegrees(135.0, -60.0),
+ Cartesian3.fromDegrees(135.0, -60.0)
);
expect(stereographic.longitude).toEqualEpsilon(
CesiumMath.toRadians(135.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("can get conformal latitidude from a Stereographic in the northern hemisphere", function () {
let stereographic = new Stereographic.fromCartesian(
- Cartesian3.fromDegrees(30.0, 60.0),
+ Cartesian3.fromDegrees(30.0, 60.0)
);
expect(stereographic.conformalLatitude).toEqualEpsilon(
1.04428418,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
stereographic = new Stereographic.fromCartesian(
- Cartesian3.fromDegrees(60.0, 30.0),
+ Cartesian3.fromDegrees(60.0, 30.0)
);
expect(stereographic.conformalLatitude).toEqualEpsilon(
0.52069517,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("can get conformal latitidude from a Stereographic in the southern hemisphere", function () {
let stereographic = new Stereographic.fromCartesian(
- Cartesian3.fromDegrees(30.0, -60.0),
+ Cartesian3.fromDegrees(30.0, -60.0)
);
expect(stereographic.conformalLatitude).toEqualEpsilon(
-1.04428418,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
stereographic = new Stereographic.fromCartesian(
- Cartesian3.fromDegrees(60.0, -30.0),
+ Cartesian3.fromDegrees(60.0, -30.0)
);
expect(stereographic.conformalLatitude).toEqualEpsilon(
-0.52069517,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("can get latitidude from a Stereographic in the northern hemisphere", function () {
let stereographic = new Stereographic.fromCartesian(
- Cartesian3.fromDegrees(30.0, 60.0),
+ Cartesian3.fromDegrees(30.0, 60.0)
);
expect(stereographic.getLatitude()).toEqualEpsilon(
CesiumMath.toRadians(60.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
stereographic = new Stereographic.fromCartesian(
- Cartesian3.fromDegrees(60.0, 30.0),
+ Cartesian3.fromDegrees(60.0, 30.0)
);
expect(stereographic.getLatitude()).toEqualEpsilon(
CesiumMath.toRadians(30.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("can get latitidude from a Stereographic in the southern hemisphere", function () {
let stereographic = new Stereographic.fromCartesian(
- Cartesian3.fromDegrees(30.0, -60.0),
+ Cartesian3.fromDegrees(30.0, -60.0)
);
expect(stereographic.getLatitude()).toEqualEpsilon(
CesiumMath.toRadians(-60.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
stereographic = new Stereographic.fromCartesian(
- Cartesian3.fromDegrees(60.0, -30.0),
+ Cartesian3.fromDegrees(60.0, -30.0)
);
expect(stereographic.getLatitude()).toEqualEpsilon(
CesiumMath.toRadians(-30.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -225,33 +225,33 @@ describe("Core/Stereographic", function () {
expect(stereographics[0].x).toEqualEpsilon(
0.1347555369,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(stereographics[0].y).toEqualEpsilon(
-0.2334034365,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(stereographics[0].tangentPlane).toEqual(
- Stereographic.NORTH_POLE_TANGENT_PLANE,
+ Stereographic.NORTH_POLE_TANGENT_PLANE
);
expect(stereographics[1].x).toEqualEpsilon(
0.1347555369,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(stereographics[1].y).toEqualEpsilon(
-0.2334034365,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(stereographics[1].tangentPlane).toEqual(
- Stereographic.SOUTH_POLE_TANGENT_PLANE,
+ Stereographic.SOUTH_POLE_TANGENT_PLANE
);
});
it("clone works with a result parameter", function () {
const stereographic = new Stereographic(
new Cartesian2(1.0, 2.0),
- Stereographic.SOUTH_POLE_TANGENT_PLANE,
+ Stereographic.SOUTH_POLE_TANGENT_PLANE
);
const result = new Stereographic();
const returnedResult = Stereographic.clone(stereographic, result);
@@ -263,7 +263,7 @@ describe("Core/Stereographic", function () {
it("clone works without result parmater", function () {
const stereographic = new Stereographic(
new Cartesian2(1.0, 2.0),
- Stereographic.SOUTH_POLE_TANGENT_PLANE,
+ Stereographic.SOUTH_POLE_TANGENT_PLANE
);
const result = Stereographic.clone(stereographic);
expect(stereographic).not.toBe(result);
diff --git a/packages/engine/Specs/Core/TaskProcessorSpec.js b/packages/engine/Specs/Core/TaskProcessorSpec.js
index 9279ca0ba673..80c541b87769 100644
--- a/packages/engine/Specs/Core/TaskProcessorSpec.js
+++ b/packages/engine/Specs/Core/TaskProcessorSpec.js
@@ -22,7 +22,7 @@ describe("Core/TaskProcessor", function () {
it("throws runtime error if browser is not supported", async function () {
spyOn(FeatureDetection, "supportsEsmWebWorkers").and.returnValue(false);
taskProcessor = new TaskProcessor(
- absolutize("../Specs/Build/TestWorkers/returnParameters.js"),
+ absolutize("../Specs/Build/TestWorkers/returnParameters.js")
);
expect(() => taskProcessor.scheduleTask()).toThrowError(RuntimeError);
@@ -30,7 +30,7 @@ describe("Core/TaskProcessor", function () {
it("works with a simple worker", async function () {
taskProcessor = new TaskProcessor(
- absolutize("../Build/Specs/TestWorkers/returnParameters.js"),
+ absolutize("../Build/Specs/TestWorkers/returnParameters.js")
);
const parameters = {
@@ -41,7 +41,7 @@ describe("Core/TaskProcessor", function () {
};
await expectAsync(taskProcessor.scheduleTask(parameters)).toBeResolvedTo(
- parameters,
+ parameters
);
});
@@ -49,7 +49,7 @@ describe("Core/TaskProcessor", function () {
window.CESIUM_WORKERS = undefined;
TaskProcessor._workerModulePrefix = absolutize(
- "../Build/Specs/TestWorkers/",
+ "../Build/Specs/TestWorkers/"
);
taskProcessor = new TaskProcessor("returnParameters.js");
@@ -61,7 +61,7 @@ describe("Core/TaskProcessor", function () {
};
await expectAsync(taskProcessor.scheduleTask(parameters)).toBeResolvedTo(
- parameters,
+ parameters
);
});
@@ -82,7 +82,7 @@ describe("Core/TaskProcessor", function () {
expect(blobSpy).toHaveBeenCalledWith(
[`import "http://test.com/source/Workers/transferTypedArrayTest.js";`],
- { type: "application/javascript" },
+ { type: "application/javascript" }
);
// Reset old values for BASE_URL
@@ -101,13 +101,13 @@ describe("Core/TaskProcessor", function () {
expect(blobSpy).toHaveBeenCalledWith(
[`import "http://test.com/Workers/testing.js";`],
- { type: "application/javascript" },
+ { type: "application/javascript" }
);
});
it("can be destroyed", function () {
taskProcessor = new TaskProcessor(
- absolutize("../Specs/Build/TestWorkers/returnParameters.js"),
+ absolutize("../Specs/Build/TestWorkers/returnParameters.js")
);
expect(taskProcessor.isDestroyed()).toEqual(false);
@@ -119,7 +119,7 @@ describe("Core/TaskProcessor", function () {
it("can transfer array buffer", async function () {
taskProcessor = new TaskProcessor(
- absolutize("../Build/Specs/TestWorkers/returnByteLength.js"),
+ absolutize("../Build/Specs/TestWorkers/returnByteLength.js")
);
const byteLength = 100;
@@ -140,7 +140,7 @@ describe("Core/TaskProcessor", function () {
it("can transfer array buffer back from worker", async function () {
taskProcessor = new TaskProcessor(
- absolutize("../Build/Specs/TestWorkers/transferArrayBuffer.js"),
+ absolutize("../Build/Specs/TestWorkers/transferArrayBuffer.js")
);
const byteLength = 100;
@@ -155,7 +155,7 @@ describe("Core/TaskProcessor", function () {
it("rejects promise if worker throws", async function () {
taskProcessor = new TaskProcessor(
- absolutize("../Build/Specs/TestWorkers/throwError.js"),
+ absolutize("../Build/Specs/TestWorkers/throwError.js")
);
const message = "foo";
@@ -164,13 +164,13 @@ describe("Core/TaskProcessor", function () {
};
await expectAsync(
- taskProcessor.scheduleTask(parameters),
+ taskProcessor.scheduleTask(parameters)
).toBeRejectedWithError(Error, message);
});
it("rejects promise if worker returns a non-clonable result", async function () {
taskProcessor = new TaskProcessor(
- absolutize("../Build/Specs/TestWorkers/returnNonCloneable.js"),
+ absolutize("../Build/Specs/TestWorkers/returnNonCloneable.js")
);
const message = "foo";
@@ -179,13 +179,13 @@ describe("Core/TaskProcessor", function () {
};
await expectAsync(taskProcessor.scheduleTask(parameters)).toBeRejectedWith(
- jasmine.stringContaining("postMessage failed"),
+ jasmine.stringContaining("postMessage failed")
);
});
it("successful task raises the taskCompletedEvent", async function () {
taskProcessor = new TaskProcessor(
- absolutize("../Build/Specs/TestWorkers/returnParameters.js"),
+ absolutize("../Build/Specs/TestWorkers/returnParameters.js")
);
const parameters = {
@@ -195,10 +195,11 @@ describe("Core/TaskProcessor", function () {
},
};
let eventRaised = false;
- const removeListenerCallback =
- TaskProcessor.taskCompletedEvent.addEventListener(function () {
+ const removeListenerCallback = TaskProcessor.taskCompletedEvent.addEventListener(
+ function () {
eventRaised = true;
- });
+ }
+ );
await expectAsync(taskProcessor.scheduleTask(parameters)).toBeResolved();
expect(eventRaised).toBe(true);
@@ -207,7 +208,7 @@ describe("Core/TaskProcessor", function () {
it("unsuccessful task raises the taskCompletedEvent with error", async function () {
taskProcessor = new TaskProcessor(
- absolutize("../Build/Specs/TestWorkers/returnNonCloneable.js"),
+ absolutize("../Build/Specs/TestWorkers/returnNonCloneable.js")
);
const message = "foo";
@@ -216,11 +217,12 @@ describe("Core/TaskProcessor", function () {
};
let eventRaised = false;
- const removeListenerCallback =
- TaskProcessor.taskCompletedEvent.addEventListener(function (error) {
+ const removeListenerCallback = TaskProcessor.taskCompletedEvent.addEventListener(
+ function (error) {
eventRaised = true;
expect(error).toBeDefined();
- });
+ }
+ );
await expectAsync(taskProcessor.scheduleTask(parameters)).toBeRejected();
expect(eventRaised).toBe(true);
@@ -230,7 +232,7 @@ describe("Core/TaskProcessor", function () {
it("can load and compile web assembly module", async function () {
const binaryUrl = absolutize("../Specs/TestWorkers/TestWasm/testWasm.wasm");
taskProcessor = new TaskProcessor(
- absolutize("../Build/Specs/TestWorkers/returnWasmConfig.js", 5),
+ absolutize("../Build/Specs/TestWorkers/returnWasmConfig.js", 5)
);
const result = await taskProcessor.initWebAssemblyModule({
wasmBinaryFile: binaryUrl,
@@ -247,7 +249,7 @@ describe("Core/TaskProcessor", function () {
it("uses a backup module if web assembly is not supported", async function () {
const binaryUrl = absolutize("../Specs/TestWorkers/TestWasm/testWasm.wasm");
taskProcessor = new TaskProcessor(
- absolutize("../Build/Specs/TestWorkers/returnWasmConfig.js", 5),
+ absolutize("../Build/Specs/TestWorkers/returnWasmConfig.js", 5)
);
spyOn(FeatureDetection, "supportsWebAssembly").and.returnValue(false);
@@ -265,7 +267,7 @@ describe("Core/TaskProcessor", function () {
it("throws runtime error if web assembly is not supported and no backup is provided", async function () {
const binaryUrl = absolutize("../Specs/TestWorkers/TestWasm/testWasm.wasm");
taskProcessor = new TaskProcessor(
- absolutize("../Build/Specs/TestWorkers/returnWasmConfig.js", 5),
+ absolutize("../Build/Specs/TestWorkers/returnWasmConfig.js", 5)
);
spyOn(FeatureDetection, "supportsWebAssembly").and.returnValue(false);
@@ -273,7 +275,7 @@ describe("Core/TaskProcessor", function () {
await expectAsync(
taskProcessor.initWebAssemblyModule({
wasmBinaryFile: binaryUrl,
- }),
+ })
).toBeRejectedWithError(RuntimeError);
});
});
diff --git a/packages/engine/Specs/Core/TerrainEncodingSpec.js b/packages/engine/Specs/Core/TerrainEncodingSpec.js
index b6a896a3be58..3856b6a59521 100644
--- a/packages/engine/Specs/Core/TerrainEncodingSpec.js
+++ b/packages/engine/Specs/Core/TerrainEncodingSpec.js
@@ -56,7 +56,7 @@ describe("Core/TerrainEncoding", function () {
minimumHeight,
maximumHeight,
fromENU,
- hasVertexNormals,
+ hasVertexNormals
);
expect(encoding.quantization).toEqual(TerrainQuantization.NONE);
@@ -85,7 +85,7 @@ describe("Core/TerrainEncoding", function () {
minimumHeight,
maximumHeight,
fromENU,
- hasVertexNormals,
+ hasVertexNormals
);
expect(encoding.quantization).toEqual(TerrainQuantization.BITS12);
@@ -114,7 +114,7 @@ describe("Core/TerrainEncoding", function () {
minimumHeight,
maximumHeight,
fromENU,
- hasVertexNormals,
+ hasVertexNormals
);
const position = new Cartesian3(1.0e3, 1.0e3, 1.0e3);
@@ -142,7 +142,7 @@ describe("Core/TerrainEncoding", function () {
minimumHeight,
maximumHeight,
fromENU,
- hasVertexNormals,
+ hasVertexNormals
);
const position = new Cartesian3(1.0e3, 1.0e3, 1.0e3);
@@ -166,7 +166,7 @@ describe("Core/TerrainEncoding", function () {
minimumHeight,
maximumHeight,
fromENU,
- hasVertexNormals,
+ hasVertexNormals
);
const position = new Cartesian3(1.0e2, 1.0e2, 1.0e2);
@@ -189,7 +189,7 @@ describe("Core/TerrainEncoding", function () {
minimumHeight,
maximumHeight,
fromENU,
- hasVertexNormals,
+ hasVertexNormals
);
const position = new Cartesian3(1.0e2, 1.0e2, 1.0e2);
@@ -219,7 +219,7 @@ describe("Core/TerrainEncoding", function () {
const exaggeratedHeight = VerticalExaggeration.getHeight(
height,
exaggeration,
- exaggerationRelativeHeight,
+ exaggerationRelativeHeight
);
const exaggeratedPosition = new Cartesian3(exaggeratedHeight, 0.0, 0.0);
@@ -239,7 +239,7 @@ describe("Core/TerrainEncoding", function () {
hasWebMercatorT,
hasGeodeticSurfaceNormals,
exaggeration,
- exaggerationRelativeHeight,
+ exaggerationRelativeHeight
);
const buffer = [];
@@ -251,17 +251,17 @@ describe("Core/TerrainEncoding", function () {
height,
undefined,
undefined,
- geodeticSurfaceNormal,
+ geodeticSurfaceNormal
);
expect(encoding.stride).toEqual(9);
expect(buffer.length).toEqual(encoding.stride);
expect(encoding.getExaggeratedPosition(buffer, 0)).toEqualEpsilon(
exaggeratedPosition,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
expect(
- encoding.decodeGeodeticSurfaceNormal(buffer, 0, new Cartesian3()),
+ encoding.decodeGeodeticSurfaceNormal(buffer, 0, new Cartesian3())
).toEqualEpsilon(geodeticSurfaceNormal, CesiumMath.EPSILON5);
});
@@ -273,7 +273,7 @@ describe("Core/TerrainEncoding", function () {
minimumHeight,
maximumHeight,
fromENU,
- hasVertexNormals,
+ hasVertexNormals
);
const texCoords = new Cartesian2(0.25, 0.75);
@@ -286,7 +286,7 @@ describe("Core/TerrainEncoding", function () {
expect(encoding.decodeTextureCoordinates(buffer, 0)).toEqualEpsilon(
texCoords,
- 1.0 / 4095.0,
+ 1.0 / 4095.0
);
});
@@ -298,7 +298,7 @@ describe("Core/TerrainEncoding", function () {
minimumHeight,
maximumHeight,
fromENU,
- hasVertexNormals,
+ hasVertexNormals
);
const texCoords = new Cartesian2(0.75, 0.25);
@@ -310,7 +310,7 @@ describe("Core/TerrainEncoding", function () {
Cartesian3.ZERO,
texCoords,
100.0,
- Cartesian3.UNIT_X,
+ Cartesian3.UNIT_X
);
expect(encoding.stride).toEqual(4);
@@ -318,7 +318,7 @@ describe("Core/TerrainEncoding", function () {
expect(encoding.decodeTextureCoordinates(buffer, 0)).toEqualEpsilon(
texCoords,
- 1.0 / 4095.0,
+ 1.0 / 4095.0
);
});
@@ -332,7 +332,7 @@ describe("Core/TerrainEncoding", function () {
minimumHeight,
maximumHeight,
fromENU,
- hasVertexNormals,
+ hasVertexNormals
);
const buffer = [];
@@ -344,7 +344,7 @@ describe("Core/TerrainEncoding", function () {
expect(encoding.decodeHeight(buffer, 0)).toEqualEpsilon(
height,
- 200.0 / 4095.0,
+ 200.0 / 4095.0
);
});
@@ -358,7 +358,7 @@ describe("Core/TerrainEncoding", function () {
minimumHeight,
maximumHeight,
fromENU,
- hasVertexNormals,
+ hasVertexNormals
);
const buffer = [];
@@ -369,7 +369,7 @@ describe("Core/TerrainEncoding", function () {
center,
Cartesian2.ZERO,
height,
- Cartesian3.UNIT_X,
+ Cartesian3.UNIT_X
);
expect(encoding.stride).toEqual(4);
@@ -377,7 +377,7 @@ describe("Core/TerrainEncoding", function () {
expect(encoding.decodeHeight(buffer, 0)).toEqualEpsilon(
height,
- 200.0 / 4095.0,
+ 200.0 / 4095.0
);
});
@@ -389,7 +389,7 @@ describe("Core/TerrainEncoding", function () {
minimumHeight,
maximumHeight,
fromENU,
- hasVertexNormals,
+ hasVertexNormals
);
const normal = new Cartesian3(1.0, 1.0, 1.0);
@@ -403,7 +403,7 @@ describe("Core/TerrainEncoding", function () {
center,
Cartesian2.ZERO,
minimumHeight,
- octNormal,
+ octNormal
);
expect(encoding.stride).toEqual(4);
@@ -420,7 +420,7 @@ describe("Core/TerrainEncoding", function () {
minimumHeight,
maximumHeight,
fromENU,
- hasVertexNormals,
+ hasVertexNormals
);
const oldBuffer = [];
@@ -450,7 +450,7 @@ describe("Core/TerrainEncoding", function () {
fromENU,
hasVertexNormals,
hasWebMarcatorT,
- hasGeodeticSurfaceNormals,
+ hasGeodeticSurfaceNormals
);
const geodeticSurfaceNormal = new Cartesian3(1.0, 0.0, 0.0);
@@ -463,7 +463,7 @@ describe("Core/TerrainEncoding", function () {
minimumHeight,
undefined,
undefined,
- geodeticSurfaceNormal,
+ geodeticSurfaceNormal
);
const oldStride = encoding.stride;
@@ -496,7 +496,7 @@ describe("Core/TerrainEncoding", function () {
minimumHeight,
maximumHeight,
fromENU,
- hasVertexNormals,
+ hasVertexNormals
);
const buffer = [];
@@ -525,7 +525,7 @@ describe("Core/TerrainEncoding", function () {
minimumHeight,
maximumHeight,
fromENU,
- hasVertexNormals,
+ hasVertexNormals
);
const attributeLocations = encoding.getAttributeLocations();
@@ -551,7 +551,7 @@ describe("Core/TerrainEncoding", function () {
minimumHeight,
maximumHeight,
fromENU,
- hasVertexNormals,
+ hasVertexNormals
);
const cloned = TerrainEncoding.clone(encoding);
@@ -584,7 +584,7 @@ describe("Core/TerrainEncoding", function () {
minimumHeight,
maximumHeight,
fromENU,
- hasVertexNormals,
+ hasVertexNormals
);
const result = new TerrainEncoding();
const cloned = TerrainEncoding.clone(encoding, result);
diff --git a/packages/engine/Specs/Core/TileAvailabilitySpec.js b/packages/engine/Specs/Core/TileAvailabilitySpec.js
index fe4766f80417..6dabad854007 100644
--- a/packages/engine/Specs/Core/TileAvailabilitySpec.js
+++ b/packages/engine/Specs/Core/TileAvailabilitySpec.js
@@ -18,7 +18,7 @@ describe("Core/TileAvailability", function () {
0,
0,
tilingScheme.getNumberOfXTilesAtLevel(),
- tilingScheme.getNumberOfYTilesAtLevel(),
+ tilingScheme.getNumberOfYTilesAtLevel()
);
return availability;
}
@@ -28,8 +28,8 @@ describe("Core/TileAvailability", function () {
const availability = createAvailability(webMercator, 15);
expect(
availability.computeMaximumLevelAtPosition(
- Cartographic.fromDegrees(25.0, 88.0),
- ),
+ Cartographic.fromDegrees(25.0, 88.0)
+ )
).toBe(-1);
});
@@ -37,8 +37,8 @@ describe("Core/TileAvailability", function () {
const availability = createAvailability(geographic, 15);
expect(
availability.computeMaximumLevelAtPosition(
- Cartographic.fromDegrees(25.0, 88.0),
- ),
+ Cartographic.fromDegrees(25.0, 88.0)
+ )
).toBe(0);
});
@@ -48,8 +48,8 @@ describe("Core/TileAvailability", function () {
availability.addAvailableTileRange(1, 1, 0, 1, 0);
expect(
availability.computeMaximumLevelAtPosition(
- Cartographic.fromRadians(0.0, 0.0),
- ),
+ Cartographic.fromRadians(0.0, 0.0)
+ )
).toBe(1);
// Make sure it isn't dependent on the order we add the rectangles.
@@ -58,8 +58,8 @@ describe("Core/TileAvailability", function () {
availability.addAvailableTileRange(0, 0, 0, 0, 0);
expect(
availability.computeMaximumLevelAtPosition(
- Cartographic.fromRadians(0.0, 0.0),
- ),
+ Cartographic.fromRadians(0.0, 0.0)
+ )
).toBe(1);
});
@@ -69,8 +69,8 @@ describe("Core/TileAvailability", function () {
availability.addAvailableTileRange(1, 1, 1, 1, 1);
expect(
availability.computeMaximumLevelAtPosition(
- Cartographic.fromRadians(-Math.PI / 2.0, 0.0),
- ),
+ Cartographic.fromRadians(-Math.PI / 2.0, 0.0)
+ )
).toBe(1);
});
});
@@ -80,8 +80,8 @@ describe("Core/TileAvailability", function () {
const availability = createAvailability(geographic, 15);
expect(
availability.computeBestAvailableLevelOverRectangle(
- Rectangle.fromDegrees(1.0, 2.0, 3.0, 4.0),
- ),
+ Rectangle.fromDegrees(1.0, 2.0, 3.0, 4.0)
+ )
).toBe(0);
});
@@ -92,13 +92,13 @@ describe("Core/TileAvailability", function () {
0,
0,
geographic.getNumberOfXTilesAtLevel(5) - 1,
- geographic.getNumberOfYTilesAtLevel(5) - 1,
+ geographic.getNumberOfYTilesAtLevel(5) - 1
);
availability.addAvailableTileRange(6, 7, 8, 9, 10);
expect(
availability.computeBestAvailableLevelOverRectangle(
- Rectangle.fromDegrees(1.0, 2.0, 3.0, 4.0),
- ),
+ Rectangle.fromDegrees(1.0, 2.0, 3.0, 4.0)
+ )
).toBe(5);
});
@@ -109,12 +109,12 @@ describe("Core/TileAvailability", function () {
0,
0,
geographic.getNumberOfXTilesAtLevel(5) - 1,
- geographic.getNumberOfYTilesAtLevel(5) - 1,
+ geographic.getNumberOfYTilesAtLevel(5) - 1
);
availability.addAvailableTileRange(6, 7, 8, 9, 10);
const rectangle = geographic.tileXYToRectangle(8, 9, 6);
expect(
- availability.computeBestAvailableLevelOverRectangle(rectangle),
+ availability.computeBestAvailableLevelOverRectangle(rectangle)
).toBe(6);
});
@@ -125,7 +125,7 @@ describe("Core/TileAvailability", function () {
0,
0,
geographic.getNumberOfXTilesAtLevel(5) - 1,
- geographic.getNumberOfYTilesAtLevel(5) - 1,
+ geographic.getNumberOfYTilesAtLevel(5) - 1
);
availability.addAvailableTileRange(6, 7, 8, 7, 8);
const rectangle = geographic.tileXYToRectangle(7, 8, 6);
@@ -134,7 +134,7 @@ describe("Core/TileAvailability", function () {
rectangle.south -= 0.01;
rectangle.north += 0.01;
expect(
- availability.computeBestAvailableLevelOverRectangle(rectangle),
+ availability.computeBestAvailableLevelOverRectangle(rectangle)
).toBe(5);
});
@@ -145,30 +145,30 @@ describe("Core/TileAvailability", function () {
0,
0,
geographic.getNumberOfXTilesAtLevel(5) - 1,
- geographic.getNumberOfYTilesAtLevel(5) - 1,
+ geographic.getNumberOfYTilesAtLevel(5) - 1
);
availability.addAvailableTileRange(
6,
0,
0,
10,
- geographic.getNumberOfYTilesAtLevel(6) - 1,
+ geographic.getNumberOfYTilesAtLevel(6) - 1
);
availability.addAvailableTileRange(
6,
geographic.getNumberOfXTilesAtLevel(6) - 11,
0,
geographic.getNumberOfXTilesAtLevel(6) - 1,
- geographic.getNumberOfYTilesAtLevel(6) - 1,
+ geographic.getNumberOfYTilesAtLevel(6) - 1
);
let rectangle = Rectangle.fromDegrees(179.0, 45.0, -179.0, 50.0);
expect(
- availability.computeBestAvailableLevelOverRectangle(rectangle),
+ availability.computeBestAvailableLevelOverRectangle(rectangle)
).toBe(6);
rectangle = Rectangle.fromDegrees(45.0, 45.0, -45.0, 50.0);
expect(
- availability.computeBestAvailableLevelOverRectangle(rectangle),
+ availability.computeBestAvailableLevelOverRectangle(rectangle)
).toBe(5);
});
@@ -179,7 +179,7 @@ describe("Core/TileAvailability", function () {
0,
0,
geographic.getNumberOfXTilesAtLevel(5) - 1,
- geographic.getNumberOfYTilesAtLevel(5) - 1,
+ geographic.getNumberOfYTilesAtLevel(5) - 1
);
availability.addAvailableTileRange(6, 0, 2, 1, 3);
availability.addAvailableTileRange(6, 2, 0, 3, 1);
@@ -187,7 +187,7 @@ describe("Core/TileAvailability", function () {
availability.addAvailableTileRange(6, 2, 2, 3, 3);
const rectangle = geographic.tileXYToRectangle(0, 0, 4);
expect(
- availability.computeBestAvailableLevelOverRectangle(rectangle),
+ availability.computeBestAvailableLevelOverRectangle(rectangle)
).toBe(6);
});
});
@@ -202,7 +202,7 @@ describe("Core/TileAvailability", function () {
for (let i = 0; i < levelRectangles.length; ++i) {
for (let j = i; j < levelRectangles.length; ++j) {
expect(levelRectangles[i].level <= levelRectangles[j].level).toBe(
- true,
+ true
);
}
}
@@ -219,8 +219,8 @@ describe("Core/TileAvailability", function () {
availability.addAvailableTileRange(1, 0, 0, 3, 1);
expect(
availability.computeMaximumLevelAtPosition(
- new Cartographic(-Math.PI / 2.0, 0.0),
- ),
+ new Cartographic(-Math.PI / 2.0, 0.0)
+ )
).toBe(1);
// We should get the same result adding them in the opposite order.
@@ -229,8 +229,8 @@ describe("Core/TileAvailability", function () {
availability.addAvailableTileRange(0, 0, 0, 1, 0);
expect(
availability.computeMaximumLevelAtPosition(
- new Cartographic(-Math.PI / 2.0, 0.0),
- ),
+ new Cartographic(-Math.PI / 2.0, 0.0)
+ )
).toBe(1);
});
diff --git a/packages/engine/Specs/Core/TimeIntervalCollectionSpec.js b/packages/engine/Specs/Core/TimeIntervalCollectionSpec.js
index f365491cb12f..707215ec6292 100644
--- a/packages/engine/Specs/Core/TimeIntervalCollectionSpec.js
+++ b/packages/engine/Specs/Core/TimeIntervalCollectionSpec.js
@@ -26,7 +26,7 @@ describe("Core/TimeIntervalCollection", function () {
julianDates,
isStartIncluded,
isStopIncluded,
- dataCallback,
+ dataCallback
) {
dataCallback = defaultValue(dataCallback, defaultDataCallback);
const length = intervals.length;
@@ -37,7 +37,7 @@ describe("Core/TimeIntervalCollection", function () {
expect(JulianDate.compare(interval.stop, julianDates[i + 1])).toEqual(0);
expect(interval.isStartIncluded).toBe(i === 0 ? isStartIncluded : true);
expect(interval.isStopIncluded).toBe(
- i === length - 1 ? isStopIncluded : false,
+ i === length - 1 ? isStopIncluded : false
);
expect(interval.data).toEqual(dataCallback(interval, i));
}
@@ -291,7 +291,7 @@ describe("Core/TimeIntervalCollection", function () {
stop: interval2.stop,
isStartIncluded: true,
isStopIncluded: false,
- }),
+ })
).toEqual(interval2);
});
@@ -325,7 +325,7 @@ describe("Core/TimeIntervalCollection", function () {
intervals.findInterval({
start: interval2.start,
stop: interval2.stop,
- }),
+ })
).toEqual(interval2);
});
@@ -357,7 +357,7 @@ describe("Core/TimeIntervalCollection", function () {
stop: new JulianDate(2),
isStartIncluded: false,
isStopIncluded: true,
- }),
+ })
);
expect(intervals.isEmpty).toEqual(false);
intervals.removeAll();
@@ -375,7 +375,7 @@ describe("Core/TimeIntervalCollection", function () {
isStartIncluded: true,
isStopIncluded: true,
data: 1,
- }),
+ })
);
expect(intervals.length).toEqual(1);
@@ -386,7 +386,7 @@ describe("Core/TimeIntervalCollection", function () {
isStartIncluded: true,
isStopIncluded: true,
data: 2,
- }),
+ })
);
expect(intervals.length).toEqual(3);
@@ -404,7 +404,7 @@ describe("Core/TimeIntervalCollection", function () {
isStartIncluded: true,
isStopIncluded: true,
data: 1,
- }),
+ })
);
expect(intervals.length).toEqual(1);
@@ -415,7 +415,7 @@ describe("Core/TimeIntervalCollection", function () {
isStartIncluded: true,
isStopIncluded: true,
data: 1,
- }),
+ })
);
expect(intervals.length).toEqual(1);
@@ -455,10 +455,10 @@ describe("Core/TimeIntervalCollection", function () {
expect(intervals.isEmpty).toEqual(false);
expect(intervals.findIntervalContainingDate(interval1.start)).toEqual(
- interval1,
+ interval1
);
expect(intervals.findIntervalContainingDate(interval1.stop)).toEqual(
- interval1,
+ interval1
);
intervals.addInterval(interval2);
@@ -469,13 +469,13 @@ describe("Core/TimeIntervalCollection", function () {
expect(intervals.isEmpty).toEqual(false);
expect(intervals.findIntervalContainingDate(interval1.start)).toEqual(
- interval1,
+ interval1
);
expect(intervals.findIntervalContainingDate(interval1.stop)).toEqual(
- interval1,
+ interval1
);
expect(intervals.findIntervalContainingDate(interval2.stop)).toEqual(
- interval2,
+ interval2
);
intervals.addInterval(interval3);
@@ -485,19 +485,19 @@ describe("Core/TimeIntervalCollection", function () {
expect(intervals.isEmpty).toEqual(false);
expect(intervals.findIntervalContainingDate(interval1.start)).toEqual(
- interval1,
+ interval1
);
expect(intervals.findIntervalContainingDate(interval1.stop)).toEqual(
- interval1,
+ interval1
);
expect(intervals.findIntervalContainingDate(interval2.stop)).toEqual(
- interval2,
+ interval2
);
expect(intervals.findIntervalContainingDate(interval3.start)).toEqual(
- interval3,
+ interval3
);
expect(intervals.findIntervalContainingDate(interval3.stop)).toEqual(
- interval3,
+ interval3
);
});
@@ -533,10 +533,10 @@ describe("Core/TimeIntervalCollection", function () {
expect(intervals.isEmpty).toEqual(false);
expect(intervals.findIntervalContainingDate(interval1.start).data).toEqual(
- 1,
+ 1
);
expect(intervals.findIntervalContainingDate(interval1.stop).data).toEqual(
- 1,
+ 1
);
intervals.addInterval(interval2);
@@ -547,13 +547,13 @@ describe("Core/TimeIntervalCollection", function () {
expect(intervals.isEmpty).toEqual(false);
expect(intervals.findIntervalContainingDate(interval1.start).data).toEqual(
- 1,
+ 1
);
expect(intervals.findIntervalContainingDate(interval1.stop).data).toEqual(
- 2,
+ 2
);
expect(intervals.findIntervalContainingDate(interval2.stop).data).toEqual(
- 2,
+ 2
);
intervals.addInterval(interval3);
@@ -563,22 +563,22 @@ describe("Core/TimeIntervalCollection", function () {
expect(intervals.isEmpty).toEqual(false);
expect(intervals.findIntervalContainingDate(interval1.start).data).toEqual(
- 3,
+ 3
);
expect(intervals.findIntervalContainingDate(interval1.stop).data).toEqual(
- 3,
+ 3
);
expect(intervals.findIntervalContainingDate(interval2.start).data).toEqual(
- 3,
+ 3
);
expect(intervals.findIntervalContainingDate(interval2.stop).data).toEqual(
- 3,
+ 3
);
expect(intervals.findIntervalContainingDate(interval3.start).data).toEqual(
- 3,
+ 3
);
expect(intervals.findIntervalContainingDate(interval3.stop).data).toEqual(
- 3,
+ 3
);
});
@@ -601,25 +601,25 @@ describe("Core/TimeIntervalCollection", function () {
const intervals = new TimeIntervalCollection();
intervals.addInterval(interval1);
expect(
- intervals.findDataForIntervalContainingDate(interval1.start),
+ intervals.findDataForIntervalContainingDate(interval1.start)
).toEqual(1);
expect(intervals.findDataForIntervalContainingDate(interval1.stop)).toEqual(
- 1,
+ 1
);
intervals.addInterval(interval2);
expect(
- intervals.findDataForIntervalContainingDate(interval1.start),
+ intervals.findDataForIntervalContainingDate(interval1.start)
).toEqual(1);
expect(intervals.findDataForIntervalContainingDate(interval1.stop)).toEqual(
- 2,
+ 2
);
expect(intervals.findDataForIntervalContainingDate(interval2.stop)).toEqual(
- 2,
+ 2
);
expect(
- intervals.findDataForIntervalContainingDate(new JulianDate(5)),
+ intervals.findDataForIntervalContainingDate(new JulianDate(5))
).toBeUndefined();
});
@@ -697,7 +697,7 @@ describe("Core/TimeIntervalCollection", function () {
startDays,
stopDays,
isStartIncluded,
- isStopIncluded,
+ isStopIncluded
) {
return new TimeInterval({
start: new JulianDate(startDays, 0.0, TimeStandard.TAI),
@@ -717,25 +717,25 @@ describe("Core/TimeIntervalCollection", function () {
// Before first
expect(intervals.removeInterval(createTimeInterval(1.0, 5.0))).toEqual(
- false,
+ false
);
expect(intervals.length).toEqual(2);
// After last
expect(intervals.removeInterval(createTimeInterval(50.0, 60.0))).toEqual(
- false,
+ false
);
expect(intervals.length).toEqual(2);
// Inside hole
expect(intervals.removeInterval(createTimeInterval(22.0, 28.0))).toEqual(
- false,
+ false
);
expect(intervals.length).toEqual(2);
// From beginning
expect(intervals.removeInterval(createTimeInterval(5.0, 15.0))).toEqual(
- true,
+ true
);
expect(intervals.length).toEqual(2);
expect(JulianDate.totalDays(intervals.get(0).start)).toEqual(15.0);
@@ -743,7 +743,7 @@ describe("Core/TimeIntervalCollection", function () {
// From end
expect(intervals.removeInterval(createTimeInterval(35.0, 45.0))).toEqual(
- true,
+ true
);
expect(intervals.length).toEqual(2);
expect(JulianDate.totalDays(intervals.get(1).start)).toEqual(30.0);
@@ -755,7 +755,7 @@ describe("Core/TimeIntervalCollection", function () {
// From middle of single interval
expect(intervals.removeInterval(createTimeInterval(12.0, 18.0))).toEqual(
- true,
+ true
);
expect(intervals.length).toEqual(3);
expect(JulianDate.totalDays(intervals.get(0).stop)).toEqual(12.0);
@@ -770,7 +770,7 @@ describe("Core/TimeIntervalCollection", function () {
// Span an entire interval and into part of next
expect(intervals.removeInterval(createTimeInterval(25.0, 46.0))).toEqual(
- true,
+ true
);
expect(intervals.length).toEqual(2);
expect(JulianDate.totalDays(intervals.get(1).start)).toEqual(46.0);
@@ -783,7 +783,7 @@ describe("Core/TimeIntervalCollection", function () {
// Interval ends at same date as an existing interval
expect(intervals.removeInterval(createTimeInterval(25.0, 40.0))).toEqual(
- true,
+ true
);
expect(intervals.length).toEqual(2);
expect(JulianDate.totalDays(intervals.get(0).stop)).toEqual(20.0);
@@ -797,7 +797,7 @@ describe("Core/TimeIntervalCollection", function () {
// Interval ends at same date as an existing interval and single point of existing
// interval survives.
expect(
- intervals.removeInterval(createTimeInterval(25.0, 40.0, true, false)),
+ intervals.removeInterval(createTimeInterval(25.0, 40.0, true, false))
).toEqual(true);
expect(intervals.length).toEqual(3);
expect(JulianDate.totalDays(intervals.get(0).stop)).toEqual(20.0);
@@ -815,7 +815,7 @@ describe("Core/TimeIntervalCollection", function () {
// Interval ends at same date as an existing interval, single point of existing
// interval survives, and single point can be combined with the next interval.
expect(
- intervals.removeInterval(createTimeInterval(25.0, 40.0, true, false)),
+ intervals.removeInterval(createTimeInterval(25.0, 40.0, true, false))
).toEqual(true);
expect(intervals.length).toEqual(2);
expect(JulianDate.totalDays(intervals.get(0).stop)).toEqual(20.0);
@@ -827,7 +827,7 @@ describe("Core/TimeIntervalCollection", function () {
// End point of removal interval overlaps first point of existing interval.
expect(intervals.removeInterval(createTimeInterval(0.0, 10.0))).toEqual(
- true,
+ true
);
expect(intervals.length).toEqual(1);
expect(JulianDate.totalDays(intervals.get(0).start)).toEqual(10.0);
@@ -841,7 +841,7 @@ describe("Core/TimeIntervalCollection", function () {
// Start point of removal interval does NOT overlap last point of existing interval
// because the start point is not included.
expect(
- intervals.removeInterval(createTimeInterval(20.0, 30.0, false, true)),
+ intervals.removeInterval(createTimeInterval(20.0, 30.0, false, true))
).toEqual(false);
expect(intervals.length).toEqual(1);
expect(JulianDate.totalDays(intervals.get(0).start)).toEqual(10.0);
@@ -853,7 +853,7 @@ describe("Core/TimeIntervalCollection", function () {
intervals.removeAll();
intervals.addInterval(createTimeInterval(0.0, 20.0));
expect(
- intervals.removeInterval(createTimeInterval(0.0, 20.0, false, false)),
+ intervals.removeInterval(createTimeInterval(0.0, 20.0, false, false))
).toEqual(true);
expect(intervals.length).toEqual(2);
expect(JulianDate.totalDays(intervals.get(0).start)).toEqual(0.0);
@@ -946,37 +946,37 @@ describe("Core/TimeIntervalCollection", function () {
isStartIncluded: true,
isStopIncluded: true,
data: undefined,
- }),
+ })
);
}
function expectCollection(collection, count, expectation) {
expectation.forEach(function (item) {
const interval = collection.findIntervalContainingDate(
- new JulianDate(CONST_DAY_NUM, item.sec),
+ new JulianDate(CONST_DAY_NUM, item.sec)
);
if (item.data === null) {
// expect the interval at this time not to exist
if (interval !== undefined) {
throw new Error(
- `expected undefined at ${item.sec} seconds but it was ${interval.data}`,
+ `expected undefined at ${item.sec} seconds but it was ${interval.data}`
);
}
expect(interval).toBeUndefined();
} else if (interval === undefined) {
throw new Error(
- `expected ${item.data} at ${item.sec} seconds, but it was undefined`,
+ `expected ${item.data} at ${item.sec} seconds, but it was undefined`
);
} else if (interval.data !== item.data) {
throw new Error(
- `expected ${item.data} at ${item.sec} seconds, but it was ${interval.data}`,
+ `expected ${item.data} at ${item.sec} seconds, but it was ${interval.data}`
);
}
});
if (collection.length !== count) {
throw new Error(
- `Expected interval to have ${count} elements but it had ${collection.length}`,
+ `Expected interval to have ${count} elements but it had ${collection.length}`
);
}
}
@@ -1232,7 +1232,7 @@ describe("Core/TimeIntervalCollection", function () {
stop: new JulianDate(2),
isStartIncluded: true,
isStopIncluded: false,
- }),
+ })
);
intervals.addInterval(
new TimeInterval({
@@ -1240,7 +1240,7 @@ describe("Core/TimeIntervalCollection", function () {
stop: new JulianDate(3),
isStartIncluded: false,
isStopIncluded: false,
- }),
+ })
);
intervals.addInterval(
new TimeInterval({
@@ -1248,7 +1248,7 @@ describe("Core/TimeIntervalCollection", function () {
stop: new JulianDate(4),
isStartIncluded: false,
isStopIncluded: false,
- }),
+ })
);
intervals.addInterval(
new TimeInterval({
@@ -1256,7 +1256,7 @@ describe("Core/TimeIntervalCollection", function () {
stop: new JulianDate(5),
isStartIncluded: false,
isStopIncluded: true,
- }),
+ })
);
const removedInterval = new TimeInterval({
@@ -1280,7 +1280,7 @@ describe("Core/TimeIntervalCollection", function () {
stop: new JulianDate(4),
isStartIncluded: true,
isStopIncluded: true,
- }),
+ })
);
expect(left.intersect(new TimeIntervalCollection()).length).toEqual(0);
});
@@ -1293,7 +1293,7 @@ describe("Core/TimeIntervalCollection", function () {
stop: new JulianDate(2),
isStartIncluded: true,
isStopIncluded: false,
- }),
+ })
);
const right = new TimeIntervalCollection();
@@ -1303,7 +1303,7 @@ describe("Core/TimeIntervalCollection", function () {
stop: new JulianDate(3),
isStartIncluded: true,
isStopIncluded: true,
- }),
+ })
);
expect(left.intersect(right).length).toEqual(0);
});
@@ -1316,7 +1316,7 @@ describe("Core/TimeIntervalCollection", function () {
stop: new JulianDate(4),
isStartIncluded: true,
isStopIncluded: true,
- }),
+ })
);
const right = new TimeIntervalCollection();
@@ -1326,7 +1326,7 @@ describe("Core/TimeIntervalCollection", function () {
stop: new JulianDate(3),
isStartIncluded: false,
isStopIncluded: false,
- }),
+ })
);
const intersectedIntervals = left.intersect(right);
@@ -1347,7 +1347,7 @@ describe("Core/TimeIntervalCollection", function () {
isStartIncluded: true,
isStopIncluded: true,
data: new TestObject(1),
- }),
+ })
);
const right = new TimeIntervalCollection();
@@ -1358,13 +1358,13 @@ describe("Core/TimeIntervalCollection", function () {
isStartIncluded: false,
isStopIncluded: false,
data: new TestObject(2),
- }),
+ })
);
const intersectedIntervals = left.intersect(
right,
TestObject.equals,
- TestObject.merge,
+ TestObject.merge
);
expect(intersectedIntervals.length).toEqual(1);
@@ -1416,7 +1416,7 @@ describe("Core/TimeIntervalCollection", function () {
isStartIncluded: true,
isStopIncluded: true,
data: {},
- }),
+ })
);
left.addInterval(
new TimeInterval({
@@ -1425,7 +1425,7 @@ describe("Core/TimeIntervalCollection", function () {
isStartIncluded: false,
isStopIncluded: true,
data: {},
- }),
+ })
);
left.addInterval(
new TimeInterval({
@@ -1434,7 +1434,7 @@ describe("Core/TimeIntervalCollection", function () {
isStartIncluded: true,
isStopIncluded: true,
data: {},
- }),
+ })
);
const right = new TimeIntervalCollection();
@@ -1445,7 +1445,7 @@ describe("Core/TimeIntervalCollection", function () {
isStartIncluded: true,
isStopIncluded: true,
data: {},
- }),
+ })
);
right.addInterval(
new TimeInterval({
@@ -1454,7 +1454,7 @@ describe("Core/TimeIntervalCollection", function () {
isStartIncluded: false,
isStopIncluded: true,
data: {},
- }),
+ })
);
right.addInterval(
new TimeInterval({
@@ -1463,7 +1463,7 @@ describe("Core/TimeIntervalCollection", function () {
isStartIncluded: true,
isStopIncluded: true,
data: {},
- }),
+ })
);
expect(left.equals(right)).toEqual(false);
@@ -1471,13 +1471,13 @@ describe("Core/TimeIntervalCollection", function () {
expect(
left.equals(right, function () {
return true;
- }),
+ })
).toEqual(true);
expect(
left.equals(right, function () {
return false;
- }),
+ })
).toEqual(false);
});
@@ -1891,7 +1891,7 @@ describe("Core/TimeIntervalCollection", function () {
// Check trailing interval
const trailing = intervals._intervals.pop();
expect(
- JulianDate.compare(trailing.start, julianDates[iso8601Dates.length - 1]),
+ JulianDate.compare(trailing.start, julianDates[iso8601Dates.length - 1])
).toEqual(0);
expect(JulianDate.compare(trailing.stop, Iso8601.MAXIMUM_VALUE)).toEqual(0);
expect(trailing.isStartIncluded).toBe(false);
@@ -1938,7 +1938,7 @@ describe("Core/TimeIntervalCollection", function () {
// Check trailing interval
const trailing = intervals._intervals.pop();
expect(
- JulianDate.compare(trailing.start, julianDates[iso8601Dates.length - 1]),
+ JulianDate.compare(trailing.start, julianDates[iso8601Dates.length - 1])
).toEqual(0);
expect(JulianDate.compare(trailing.stop, Iso8601.MAXIMUM_VALUE)).toEqual(0);
expect(trailing.isStartIncluded).toBe(true);
@@ -2009,7 +2009,7 @@ describe("Core/TimeIntervalCollection", function () {
// Check trailing interval
const trailing = intervals._intervals.pop();
expect(
- JulianDate.compare(trailing.start, julianDates[iso8601Dates.length - 1]),
+ JulianDate.compare(trailing.start, julianDates[iso8601Dates.length - 1])
).toEqual(0);
expect(JulianDate.compare(trailing.stop, Iso8601.MAXIMUM_VALUE)).toEqual(0);
expect(trailing.isStartIncluded).toBe(false);
@@ -2054,7 +2054,7 @@ describe("Core/TimeIntervalCollection", function () {
// Check trailing interval
const trailing = intervals._intervals.pop();
expect(
- JulianDate.compare(trailing.start, julianDates[iso8601Dates.length - 1]),
+ JulianDate.compare(trailing.start, julianDates[iso8601Dates.length - 1])
).toEqual(0);
expect(JulianDate.compare(trailing.stop, Iso8601.MAXIMUM_VALUE)).toEqual(0);
expect(trailing.isStartIncluded).toBe(true);
@@ -2103,7 +2103,7 @@ describe("Core/TimeIntervalCollection", function () {
// Check trailing interval
const trailing = intervals._intervals.pop();
expect(
- JulianDate.compare(trailing.start, julianDates[iso8601Dates.length - 1]),
+ JulianDate.compare(trailing.start, julianDates[iso8601Dates.length - 1])
).toEqual(0);
expect(JulianDate.compare(trailing.stop, Iso8601.MAXIMUM_VALUE)).toEqual(0);
expect(trailing.isStartIncluded).toBe(true);
@@ -2152,7 +2152,7 @@ describe("Core/TimeIntervalCollection", function () {
// Check trailing interval
const trailing = intervals._intervals.pop();
expect(
- JulianDate.compare(trailing.start, julianDates[iso8601Dates.length - 1]),
+ JulianDate.compare(trailing.start, julianDates[iso8601Dates.length - 1])
).toEqual(0);
expect(JulianDate.compare(trailing.stop, Iso8601.MAXIMUM_VALUE)).toEqual(0);
expect(trailing.isStartIncluded).toBe(true);
diff --git a/packages/engine/Specs/Core/TimeIntervalSpec.js b/packages/engine/Specs/Core/TimeIntervalSpec.js
index ec596303ab8c..465c1382f83e 100644
--- a/packages/engine/Specs/Core/TimeIntervalSpec.js
+++ b/packages/engine/Specs/Core/TimeIntervalSpec.js
@@ -87,7 +87,7 @@ describe("Core/TimeInterval", function () {
isStopIncluded: isStopIncluded,
data: data,
},
- expectedResult,
+ expectedResult
);
expect(expectedResult).toBe(interval);
@@ -112,7 +112,7 @@ describe("Core/TimeInterval", function () {
stop: JulianDate.fromIso8601(isoDate2),
});
expect(TimeInterval.toIso8601(interval)).toEqual(
- "0950-01-02T03:04:05Z/0950-01-03T03:04:05Z",
+ "0950-01-02T03:04:05Z/0950-01-03T03:04:05Z"
);
});
@@ -124,7 +124,7 @@ describe("Core/TimeInterval", function () {
expect(
TimeInterval.fromIso8601({
iso8601: TimeInterval.toIso8601(interval),
- }),
+ })
).toEqual(interval);
});
@@ -136,10 +136,10 @@ describe("Core/TimeInterval", function () {
stop: JulianDate.fromIso8601(isoDate2),
});
expect(TimeInterval.toIso8601(interval, 0)).toEqual(
- "0950-01-02T03:04:05Z/0950-01-03T03:04:05Z",
+ "0950-01-02T03:04:05Z/0950-01-03T03:04:05Z"
);
expect(TimeInterval.toIso8601(interval, 7)).toEqual(
- "0950-01-02T03:04:05.0123450Z/0950-01-03T03:04:05.0123450Z",
+ "0950-01-02T03:04:05.0123450Z/0950-01-03T03:04:05.0123450Z"
);
});
@@ -223,16 +223,16 @@ describe("Core/TimeInterval", function () {
stop: new JulianDate(2451546),
});
expect(TimeInterval.contains(interval, new JulianDate(2451545.5))).toEqual(
- true,
+ true
);
expect(TimeInterval.contains(interval, new JulianDate(2451546.5))).toEqual(
- false,
+ false
);
});
it("contains works for an empty interval.", function () {
expect(TimeInterval.contains(TimeInterval.EMPTY, new JulianDate())).toEqual(
- false,
+ false
);
});
@@ -244,10 +244,10 @@ describe("Core/TimeInterval", function () {
isStopIncluded: true,
});
expect(TimeInterval.contains(interval, new JulianDate(2451545))).toEqual(
- true,
+ true
);
expect(TimeInterval.contains(interval, new JulianDate(2451546))).toEqual(
- true,
+ true
);
});
@@ -259,10 +259,10 @@ describe("Core/TimeInterval", function () {
isStopIncluded: false,
});
expect(TimeInterval.contains(interval, new JulianDate(2451545))).toEqual(
- false,
+ false
);
expect(TimeInterval.contains(interval, new JulianDate(2451546))).toEqual(
- false,
+ false
);
});
@@ -571,12 +571,12 @@ describe("Core/TimeInterval", function () {
const intersect1 = TimeInterval.intersect(
first,
second,
- new TimeInterval(),
+ new TimeInterval()
);
const intersect2 = TimeInterval.intersect(
second,
first,
- new TimeInterval(),
+ new TimeInterval()
);
expect(intersect1).toEqual(intersect2);
expect(intersect2).toEqual(intersect1);
@@ -590,7 +590,7 @@ describe("Core/TimeInterval", function () {
stop: new JulianDate(2),
});
expect(
- TimeInterval.intersect(interval, undefined, new TimeInterval()),
+ TimeInterval.intersect(interval, undefined, new TimeInterval())
).toEqual(TimeInterval.EMPTY);
});
@@ -611,7 +611,7 @@ describe("Core/TimeInterval", function () {
new TimeInterval(),
function (left, right) {
return left + right;
- },
+ }
);
expect(twoToThree.start).toEqual(twoToFour.start);
expect(twoToThree.stop).toEqual(oneToThree.stop);
diff --git a/packages/engine/Specs/Core/TipsifySpec.js b/packages/engine/Specs/Core/TipsifySpec.js
index 354d5630ff83..df81516f5aa3 100644
--- a/packages/engine/Specs/Core/TipsifySpec.js
+++ b/packages/engine/Specs/Core/TipsifySpec.js
@@ -8,7 +8,7 @@ describe("Core/Tipsify", function () {
indices: [0, 1, 2, 0, 2, 3, 0, 3, 4, 0, 4, 5, 0, 5, 6, 0, 1, 6],
maximumIndex: 6,
cacheSize: 3,
- }),
+ })
).toEqual(2);
});
@@ -17,7 +17,7 @@ describe("Core/Tipsify", function () {
Tipsify.calculateACMR({
indices: [0, 1, 2, 0, 2, 3, 0, 3, 4, 0, 4, 5, 0, 5, 6, 0, 1, 6],
cacheSize: 3,
- }),
+ })
).toEqual(2);
});
@@ -93,12 +93,117 @@ describe("Core/Tipsify", function () {
it("can lower ACMR using the Tipsify algorithm", function () {
const indices = [
- 0, 1, 7, 1, 7, 8, 1, 2, 8, 2, 8, 9, 2, 3, 9, 3, 9, 10, 3, 4, 10, 4, 10,
- 11, 4, 5, 11, 5, 11, 12, 6, 13, 14, 6, 7, 14, 7, 14, 15, 7, 8, 15, 8, 15,
- 16, 8, 9, 16, 9, 16, 17, 9, 10, 17, 10, 17, 18, 10, 11, 18, 11, 18, 19,
- 11, 12, 19, 12, 19, 20, 13, 21, 22, 13, 14, 22, 14, 22, 23, 14, 15, 23,
- 15, 23, 24, 15, 16, 24, 16, 24, 25, 16, 17, 25, 17, 25, 26, 17, 18, 26,
- 18, 26, 27, 18, 19, 27, 19, 27, 28, 19, 20, 28,
+ 0,
+ 1,
+ 7,
+ 1,
+ 7,
+ 8,
+ 1,
+ 2,
+ 8,
+ 2,
+ 8,
+ 9,
+ 2,
+ 3,
+ 9,
+ 3,
+ 9,
+ 10,
+ 3,
+ 4,
+ 10,
+ 4,
+ 10,
+ 11,
+ 4,
+ 5,
+ 11,
+ 5,
+ 11,
+ 12,
+ 6,
+ 13,
+ 14,
+ 6,
+ 7,
+ 14,
+ 7,
+ 14,
+ 15,
+ 7,
+ 8,
+ 15,
+ 8,
+ 15,
+ 16,
+ 8,
+ 9,
+ 16,
+ 9,
+ 16,
+ 17,
+ 9,
+ 10,
+ 17,
+ 10,
+ 17,
+ 18,
+ 10,
+ 11,
+ 18,
+ 11,
+ 18,
+ 19,
+ 11,
+ 12,
+ 19,
+ 12,
+ 19,
+ 20,
+ 13,
+ 21,
+ 22,
+ 13,
+ 14,
+ 22,
+ 14,
+ 22,
+ 23,
+ 14,
+ 15,
+ 23,
+ 15,
+ 23,
+ 24,
+ 15,
+ 16,
+ 24,
+ 16,
+ 24,
+ 25,
+ 16,
+ 17,
+ 25,
+ 17,
+ 25,
+ 26,
+ 17,
+ 18,
+ 26,
+ 18,
+ 26,
+ 27,
+ 18,
+ 19,
+ 27,
+ 19,
+ 27,
+ 28,
+ 19,
+ 20,
+ 28,
];
const acmrBefore = Tipsify.calculateACMR({
indices: indices,
@@ -120,15 +225,120 @@ describe("Core/Tipsify", function () {
it("can Tipsify without knowing the maximum index", function () {
const indices = [
- 0, 1, 7, 1, 7, 8, 1, 2, 8, 2, 8, 9, 2, 3, 9, 3, 9, 10, 3, 4, 10, 4, 10,
- 11, 4, 5, 11, 5, 11, 12, 6, 13, 14, 6, 7, 14, 7, 14, 15, 7, 8, 15, 8, 15,
- 16, 8, 9, 16, 9, 16, 17, 9, 10, 17, 10, 17, 18, 10, 11, 18, 11, 18, 19,
- 11, 12, 19, 12, 19, 20, 13, 21, 22, 13, 14, 22, 14, 22, 23, 14, 15, 23,
- 15, 23, 24, 15, 16, 24, 16, 24, 25, 16, 17, 25, 17, 25, 26, 17, 18, 26,
- 18, 26, 27, 18, 19, 27, 19, 27, 28, 19, 20, 28,
+ 0,
+ 1,
+ 7,
+ 1,
+ 7,
+ 8,
+ 1,
+ 2,
+ 8,
+ 2,
+ 8,
+ 9,
+ 2,
+ 3,
+ 9,
+ 3,
+ 9,
+ 10,
+ 3,
+ 4,
+ 10,
+ 4,
+ 10,
+ 11,
+ 4,
+ 5,
+ 11,
+ 5,
+ 11,
+ 12,
+ 6,
+ 13,
+ 14,
+ 6,
+ 7,
+ 14,
+ 7,
+ 14,
+ 15,
+ 7,
+ 8,
+ 15,
+ 8,
+ 15,
+ 16,
+ 8,
+ 9,
+ 16,
+ 9,
+ 16,
+ 17,
+ 9,
+ 10,
+ 17,
+ 10,
+ 17,
+ 18,
+ 10,
+ 11,
+ 18,
+ 11,
+ 18,
+ 19,
+ 11,
+ 12,
+ 19,
+ 12,
+ 19,
+ 20,
+ 13,
+ 21,
+ 22,
+ 13,
+ 14,
+ 22,
+ 14,
+ 22,
+ 23,
+ 14,
+ 15,
+ 23,
+ 15,
+ 23,
+ 24,
+ 15,
+ 16,
+ 24,
+ 16,
+ 24,
+ 25,
+ 16,
+ 17,
+ 25,
+ 17,
+ 25,
+ 26,
+ 17,
+ 18,
+ 26,
+ 18,
+ 26,
+ 27,
+ 18,
+ 19,
+ 27,
+ 19,
+ 27,
+ 28,
+ 19,
+ 20,
+ 28,
];
expect(Tipsify.tipsify({ indices: indices, cacheSize: 6 })).toEqual(
- Tipsify.tipsify({ indices: indices, maximumIndex: 28, cacheSize: 6 }),
+ Tipsify.tipsify({ indices: indices, maximumIndex: 28, cacheSize: 6 })
);
});
});
diff --git a/packages/engine/Specs/Core/TransformsSpec.js b/packages/engine/Specs/Core/TransformsSpec.js
index a879b23d9a35..1f2277b58330 100644
--- a/packages/engine/Specs/Core/TransformsSpec.js
+++ b/packages/engine/Specs/Core/TransformsSpec.js
@@ -30,24 +30,24 @@ describe("Core/Transforms", function () {
origin.x,
origin.y,
origin.z,
- 1.0,
+ 1.0
);
const returnedResult = Transforms.eastNorthUpToFixedFrame(
origin,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(Matrix4.getColumn(returnedResult, 0, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Y,
+ Cartesian4.UNIT_Y
); // east
expect(Matrix4.getColumn(returnedResult, 1, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Z,
+ Cartesian4.UNIT_Z
); // north
expect(Matrix4.getColumn(returnedResult, 2, new Cartesian4())).toEqual(
- Cartesian4.UNIT_X,
+ Cartesian4.UNIT_X
); // up
expect(Matrix4.getColumn(returnedResult, 3, new Cartesian4())).toEqual(
- expectedTranslation,
+ expectedTranslation
); // translation
});
@@ -57,27 +57,27 @@ describe("Core/Transforms", function () {
origin.x,
origin.y,
origin.z,
- 1.0,
+ 1.0
);
const result = new Matrix4(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
const returnedResult = Transforms.eastNorthUpToFixedFrame(
origin,
Ellipsoid.UNIT_SPHERE,
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(Matrix4.getColumn(returnedResult, 0, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Y,
+ Cartesian4.UNIT_Y
); // east
expect(Matrix4.getColumn(returnedResult, 1, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Z,
+ Cartesian4.UNIT_Z
); // north
expect(Matrix4.getColumn(returnedResult, 2, new Cartesian4())).toEqual(
- Cartesian4.UNIT_X,
+ Cartesian4.UNIT_X
); // up
expect(Matrix4.getColumn(returnedResult, 3, new Cartesian4())).toEqual(
- expectedTranslation,
+ expectedTranslation
); // translation
});
@@ -87,27 +87,27 @@ describe("Core/Transforms", function () {
northPole.x,
northPole.y,
northPole.z,
- 1.0,
+ 1.0
);
const result = new Matrix4();
const returnedResult = Transforms.eastNorthUpToFixedFrame(
northPole,
Ellipsoid.UNIT_SPHERE,
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(Matrix4.getColumn(returnedResult, 0, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Y,
+ Cartesian4.UNIT_Y
); // east
expect(Matrix4.getColumn(returnedResult, 1, new Cartesian4())).toEqual(
- negativeX,
+ negativeX
); // north
expect(Matrix4.getColumn(returnedResult, 2, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Z,
+ Cartesian4.UNIT_Z
); // up
expect(Matrix4.getColumn(returnedResult, 3, new Cartesian4())).toEqual(
- expectedTranslation,
+ expectedTranslation
); // translation
});
@@ -117,24 +117,24 @@ describe("Core/Transforms", function () {
southPole.x,
southPole.y,
southPole.z,
- 1.0,
+ 1.0
);
const returnedResult = Transforms.eastNorthUpToFixedFrame(
southPole,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(Matrix4.getColumn(returnedResult, 0, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Y,
+ Cartesian4.UNIT_Y
); // east
expect(Matrix4.getColumn(returnedResult, 1, new Cartesian4())).toEqual(
- Cartesian4.UNIT_X,
+ Cartesian4.UNIT_X
); // north
expect(Matrix4.getColumn(returnedResult, 2, new Cartesian4())).toEqual(
- negativeZ,
+ negativeZ
); // up
expect(Matrix4.getColumn(returnedResult, 3, new Cartesian4())).toEqual(
- expectedTranslation,
+ expectedTranslation
); // translation
});
@@ -144,19 +144,19 @@ describe("Core/Transforms", function () {
const returnedResult = Transforms.eastNorthUpToFixedFrame(
origin,
- Ellipsoid.WGS84,
+ Ellipsoid.WGS84
);
expect(Matrix4.getColumn(returnedResult, 0, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Y,
+ Cartesian4.UNIT_Y
); // east
expect(Matrix4.getColumn(returnedResult, 1, new Cartesian4())).toEqual(
- negativeX,
+ negativeX
); // north
expect(Matrix4.getColumn(returnedResult, 2, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Z,
+ Cartesian4.UNIT_Z
); // up
expect(Matrix4.getColumn(returnedResult, 3, new Cartesian4())).toEqual(
- expectedTranslation,
+ expectedTranslation
); // translation
});
@@ -166,24 +166,24 @@ describe("Core/Transforms", function () {
origin.x,
origin.y,
origin.z,
- 1.0,
+ 1.0
);
const returnedResult = Transforms.northEastDownToFixedFrame(
origin,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(Matrix4.getColumn(returnedResult, 0, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Z,
+ Cartesian4.UNIT_Z
); // north
expect(Matrix4.getColumn(returnedResult, 1, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Y,
+ Cartesian4.UNIT_Y
); // east
expect(Matrix4.getColumn(returnedResult, 2, new Cartesian4())).toEqual(
- negativeX,
+ negativeX
); // down
expect(Matrix4.getColumn(returnedResult, 3, new Cartesian4())).toEqual(
- expectedTranslation,
+ expectedTranslation
); // translation
});
@@ -193,27 +193,27 @@ describe("Core/Transforms", function () {
origin.x,
origin.y,
origin.z,
- 1.0,
+ 1.0
);
const result = new Matrix4(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
const returnedResult = Transforms.northEastDownToFixedFrame(
origin,
Ellipsoid.UNIT_SPHERE,
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(Matrix4.getColumn(returnedResult, 0, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Z,
+ Cartesian4.UNIT_Z
); // north
expect(Matrix4.getColumn(returnedResult, 1, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Y,
+ Cartesian4.UNIT_Y
); // east
expect(Matrix4.getColumn(returnedResult, 2, new Cartesian4())).toEqual(
- negativeX,
+ negativeX
); // down
expect(Matrix4.getColumn(returnedResult, 3, new Cartesian4())).toEqual(
- expectedTranslation,
+ expectedTranslation
); // translation
});
@@ -223,27 +223,27 @@ describe("Core/Transforms", function () {
northPole.x,
northPole.y,
northPole.z,
- 1.0,
+ 1.0
);
const result = new Matrix4();
const returnedResult = Transforms.northEastDownToFixedFrame(
northPole,
Ellipsoid.UNIT_SPHERE,
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(Matrix4.getColumn(returnedResult, 0, new Cartesian4())).toEqual(
- negativeX,
+ negativeX
); // north
expect(Matrix4.getColumn(returnedResult, 1, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Y,
+ Cartesian4.UNIT_Y
); // east
expect(Matrix4.getColumn(returnedResult, 2, new Cartesian4())).toEqual(
- negativeZ,
+ negativeZ
); // down
expect(Matrix4.getColumn(returnedResult, 3, new Cartesian4())).toEqual(
- expectedTranslation,
+ expectedTranslation
); // translation
});
@@ -253,24 +253,24 @@ describe("Core/Transforms", function () {
southPole.x,
southPole.y,
southPole.z,
- 1.0,
+ 1.0
);
const returnedResult = Transforms.northEastDownToFixedFrame(
southPole,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(Matrix4.getColumn(returnedResult, 0, new Cartesian4())).toEqual(
- Cartesian4.UNIT_X,
+ Cartesian4.UNIT_X
); // north
expect(Matrix4.getColumn(returnedResult, 1, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Y,
+ Cartesian4.UNIT_Y
); // east
expect(Matrix4.getColumn(returnedResult, 2, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Z,
+ Cartesian4.UNIT_Z
); // down
expect(Matrix4.getColumn(returnedResult, 3, new Cartesian4())).toEqual(
- expectedTranslation,
+ expectedTranslation
); // translation
});
@@ -280,19 +280,19 @@ describe("Core/Transforms", function () {
const returnedResult = Transforms.northEastDownToFixedFrame(
origin,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(Matrix4.getColumn(returnedResult, 0, new Cartesian4())).toEqual(
- negativeX,
+ negativeX
); // north
expect(Matrix4.getColumn(returnedResult, 1, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Y,
+ Cartesian4.UNIT_Y
); // east
expect(Matrix4.getColumn(returnedResult, 2, new Cartesian4())).toEqual(
- negativeZ,
+ negativeZ
); // down
expect(Matrix4.getColumn(returnedResult, 3, new Cartesian4())).toEqual(
- expectedTranslation,
+ expectedTranslation
); // translation
});
@@ -302,24 +302,24 @@ describe("Core/Transforms", function () {
origin.x,
origin.y,
origin.z,
- 1.0,
+ 1.0
);
const returnedResult = Transforms.northUpEastToFixedFrame(
origin,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(Matrix4.getColumn(returnedResult, 0, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Z,
+ Cartesian4.UNIT_Z
); // north
expect(Matrix4.getColumn(returnedResult, 1, new Cartesian4())).toEqual(
- Cartesian4.UNIT_X,
+ Cartesian4.UNIT_X
); // up
expect(Matrix4.getColumn(returnedResult, 2, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Y,
+ Cartesian4.UNIT_Y
); // east
expect(Matrix4.getColumn(returnedResult, 3, new Cartesian4())).toEqual(
- expectedTranslation,
+ expectedTranslation
); // translation
});
@@ -329,27 +329,27 @@ describe("Core/Transforms", function () {
origin.x,
origin.y,
origin.z,
- 1.0,
+ 1.0
);
const result = new Matrix4(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
const returnedResult = Transforms.northUpEastToFixedFrame(
origin,
Ellipsoid.UNIT_SPHERE,
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(Matrix4.getColumn(returnedResult, 0, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Z,
+ Cartesian4.UNIT_Z
); // north
expect(Matrix4.getColumn(returnedResult, 1, new Cartesian4())).toEqual(
- Cartesian4.UNIT_X,
+ Cartesian4.UNIT_X
); // up
expect(Matrix4.getColumn(returnedResult, 2, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Y,
+ Cartesian4.UNIT_Y
); // east
expect(Matrix4.getColumn(returnedResult, 3, new Cartesian4())).toEqual(
- expectedTranslation,
+ expectedTranslation
); // translation
});
@@ -359,27 +359,27 @@ describe("Core/Transforms", function () {
northPole.x,
northPole.y,
northPole.z,
- 1.0,
+ 1.0
);
const result = new Matrix4();
const returnedResult = Transforms.northUpEastToFixedFrame(
northPole,
Ellipsoid.UNIT_SPHERE,
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(Matrix4.getColumn(returnedResult, 0, new Cartesian4())).toEqual(
- negativeX,
+ negativeX
); // north
expect(Matrix4.getColumn(returnedResult, 1, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Z,
+ Cartesian4.UNIT_Z
); // up
expect(Matrix4.getColumn(returnedResult, 2, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Y,
+ Cartesian4.UNIT_Y
); // east
expect(Matrix4.getColumn(returnedResult, 3, new Cartesian4())).toEqual(
- expectedTranslation,
+ expectedTranslation
); // translation
});
@@ -389,24 +389,24 @@ describe("Core/Transforms", function () {
southPole.x,
southPole.y,
southPole.z,
- 1.0,
+ 1.0
);
const returnedResult = Transforms.northUpEastToFixedFrame(
southPole,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(Matrix4.getColumn(returnedResult, 0, new Cartesian4())).toEqual(
- Cartesian4.UNIT_X,
+ Cartesian4.UNIT_X
); // north
expect(Matrix4.getColumn(returnedResult, 1, new Cartesian4())).toEqual(
- negativeZ,
+ negativeZ
); // up
expect(Matrix4.getColumn(returnedResult, 2, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Y,
+ Cartesian4.UNIT_Y
); // east
expect(Matrix4.getColumn(returnedResult, 3, new Cartesian4())).toEqual(
- expectedTranslation,
+ expectedTranslation
); // translation
});
@@ -416,19 +416,19 @@ describe("Core/Transforms", function () {
const returnedResult = Transforms.northUpEastToFixedFrame(
origin,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(Matrix4.getColumn(returnedResult, 0, new Cartesian4())).toEqual(
- negativeX,
+ negativeX
); // north
expect(Matrix4.getColumn(returnedResult, 1, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Z,
+ Cartesian4.UNIT_Z
); // up
expect(Matrix4.getColumn(returnedResult, 2, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Y,
+ Cartesian4.UNIT_Y
); // east
expect(Matrix4.getColumn(returnedResult, 3, new Cartesian4())).toEqual(
- expectedTranslation,
+ expectedTranslation
); // translation
});
@@ -438,24 +438,24 @@ describe("Core/Transforms", function () {
origin.x,
origin.y,
origin.z,
- 1.0,
+ 1.0
);
const returnedResult = Transforms.northWestUpToFixedFrame(
origin,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(Matrix4.getColumn(returnedResult, 0, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Z,
+ Cartesian4.UNIT_Z
); // north
expect(Matrix4.getColumn(returnedResult, 1, new Cartesian4())).toEqual(
- negativeY,
+ negativeY
); // west
expect(Matrix4.getColumn(returnedResult, 2, new Cartesian4())).toEqual(
- Cartesian4.UNIT_X,
+ Cartesian4.UNIT_X
); // up
expect(Matrix4.getColumn(returnedResult, 3, new Cartesian4())).toEqual(
- expectedTranslation,
+ expectedTranslation
); // translation
});
@@ -465,27 +465,27 @@ describe("Core/Transforms", function () {
origin.x,
origin.y,
origin.z,
- 1.0,
+ 1.0
);
const result = new Matrix4(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
const returnedResult = Transforms.northWestUpToFixedFrame(
origin,
Ellipsoid.UNIT_SPHERE,
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(Matrix4.getColumn(returnedResult, 0, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Z,
+ Cartesian4.UNIT_Z
); // north
expect(Matrix4.getColumn(returnedResult, 1, new Cartesian4())).toEqual(
- negativeY,
+ negativeY
); // west
expect(Matrix4.getColumn(returnedResult, 2, new Cartesian4())).toEqual(
- Cartesian4.UNIT_X,
+ Cartesian4.UNIT_X
); // up
expect(Matrix4.getColumn(returnedResult, 3, new Cartesian4())).toEqual(
- expectedTranslation,
+ expectedTranslation
); // translation
});
@@ -495,27 +495,27 @@ describe("Core/Transforms", function () {
northPole.x,
northPole.y,
northPole.z,
- 1.0,
+ 1.0
);
const result = new Matrix4();
const returnedResult = Transforms.northWestUpToFixedFrame(
northPole,
Ellipsoid.UNIT_SPHERE,
- result,
+ result
);
expect(returnedResult).toBe(result);
expect(Matrix4.getColumn(returnedResult, 0, new Cartesian4())).toEqual(
- negativeX,
+ negativeX
); // north
expect(Matrix4.getColumn(returnedResult, 1, new Cartesian4())).toEqual(
- negativeY,
+ negativeY
); // west
expect(Matrix4.getColumn(returnedResult, 2, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Z,
+ Cartesian4.UNIT_Z
); // up
expect(Matrix4.getColumn(returnedResult, 3, new Cartesian4())).toEqual(
- expectedTranslation,
+ expectedTranslation
); // translation
});
@@ -525,24 +525,24 @@ describe("Core/Transforms", function () {
southPole.x,
southPole.y,
southPole.z,
- 1.0,
+ 1.0
);
const returnedResult = Transforms.northWestUpToFixedFrame(
southPole,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(Matrix4.getColumn(returnedResult, 0, new Cartesian4())).toEqual(
- Cartesian4.UNIT_X,
+ Cartesian4.UNIT_X
); // north
expect(Matrix4.getColumn(returnedResult, 1, new Cartesian4())).toEqual(
- negativeY,
+ negativeY
); // west
expect(Matrix4.getColumn(returnedResult, 2, new Cartesian4())).toEqual(
- negativeZ,
+ negativeZ
); // up
expect(Matrix4.getColumn(returnedResult, 3, new Cartesian4())).toEqual(
- expectedTranslation,
+ expectedTranslation
); // translation
});
@@ -552,19 +552,19 @@ describe("Core/Transforms", function () {
const returnedResult = Transforms.northWestUpToFixedFrame(
origin,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(Matrix4.getColumn(returnedResult, 0, new Cartesian4())).toEqual(
- negativeX,
+ negativeX
); // north
expect(Matrix4.getColumn(returnedResult, 1, new Cartesian4())).toEqual(
- negativeY,
+ negativeY
); // west
expect(Matrix4.getColumn(returnedResult, 2, new Cartesian4())).toEqual(
- Cartesian4.UNIT_Z,
+ Cartesian4.UNIT_Z
); // up
expect(Matrix4.getColumn(returnedResult, 3, new Cartesian4())).toEqual(
- expectedTranslation,
+ expectedTranslation
); // translation
});
@@ -667,7 +667,7 @@ describe("Core/Transforms", function () {
for (let i = 0; i < converterTab.length; i++) {
const converterMatrix = converterTab[i].converter(
position,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
const order = converterTab[i].order;
// check translation
@@ -701,8 +701,10 @@ describe("Core/Transforms", function () {
for (let i = 0; i < cartesianTab.length; i++) {
const cartesian = cartesianTab[i];
- const classicalEastNorthUpReferential =
- Transforms.eastNorthUpToFixedFrame(cartesian, Ellipsoid.UNIT_SPHERE);
+ const classicalEastNorthUpReferential = Transforms.eastNorthUpToFixedFrame(
+ cartesian,
+ Ellipsoid.UNIT_SPHERE
+ );
testAllLocalFrame(classicalEastNorthUpReferential, cartesian);
}
});
@@ -744,7 +746,7 @@ describe("Core/Transforms", function () {
const hpr = new HeadingPitchRoll(heading, pitch, roll);
const expectedRotation = Matrix3.fromQuaternion(
- Quaternion.fromHeadingPitchRoll(hpr),
+ Quaternion.fromHeadingPitchRoll(hpr)
);
const expectedX = Matrix3.getColumn(expectedRotation, 0, new Cartesian3());
const expectedY = Matrix3.getColumn(expectedRotation, 1, new Cartesian3());
@@ -757,19 +759,19 @@ describe("Core/Transforms", function () {
const returnedResult = Transforms.headingPitchRollToFixedFrame(
origin,
hpr,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
const actualX = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 0, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 0, new Cartesian4())
);
const actualY = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 1, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 1, new Cartesian4())
);
const actualZ = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 2, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 2, new Cartesian4())
);
const actualTranslation = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 3, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 3, new Cartesian4())
);
expect(actualX).toEqual(expectedX);
@@ -786,7 +788,7 @@ describe("Core/Transforms", function () {
const hpr = new HeadingPitchRoll(heading, pitch, roll);
const expectedRotation = Matrix3.fromQuaternion(
- Quaternion.fromHeadingPitchRoll(hpr),
+ Quaternion.fromHeadingPitchRoll(hpr)
);
const expectedX = Matrix3.getColumn(expectedRotation, 0, new Cartesian3());
const expectedY = Matrix3.getColumn(expectedRotation, 1, new Cartesian3());
@@ -799,19 +801,19 @@ describe("Core/Transforms", function () {
const returnedResult = Transforms.headingPitchRollToFixedFrame(
origin,
hpr,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
const actualX = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 0, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 0, new Cartesian4())
);
const actualY = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 1, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 1, new Cartesian4())
);
const actualZ = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 2, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 2, new Cartesian4())
);
const actualTranslation = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 3, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 3, new Cartesian4())
);
expect(actualX).toEqual(expectedX);
@@ -828,7 +830,7 @@ describe("Core/Transforms", function () {
const hpr = new HeadingPitchRoll(heading, pitch, roll);
const expectedRotation = Matrix3.fromQuaternion(
- Quaternion.fromHeadingPitchRoll(hpr),
+ Quaternion.fromHeadingPitchRoll(hpr)
);
const expectedX = Matrix3.getColumn(expectedRotation, 0, new Cartesian3());
const expectedY = Matrix3.getColumn(expectedRotation, 1, new Cartesian3());
@@ -842,19 +844,19 @@ describe("Core/Transforms", function () {
origin,
hpr,
Ellipsoid.UNIT_SPHERE,
- Transforms.eastNorthUpToFixedFrame,
+ Transforms.eastNorthUpToFixedFrame
);
const actualX = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 0, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 0, new Cartesian4())
);
const actualY = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 1, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 1, new Cartesian4())
);
const actualZ = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 2, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 2, new Cartesian4())
);
const actualTranslation = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 3, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 3, new Cartesian4())
);
expect(actualX).toEqual(expectedX);
@@ -871,7 +873,7 @@ describe("Core/Transforms", function () {
const hpr = new HeadingPitchRoll(heading, pitch, roll);
const expectedRotation = Matrix3.fromQuaternion(
- Quaternion.fromHeadingPitchRoll(hpr),
+ Quaternion.fromHeadingPitchRoll(hpr)
);
const expectedX = Matrix3.getColumn(expectedRotation, 0, new Cartesian3());
const expectedY = Matrix3.getColumn(expectedRotation, 1, new Cartesian3());
@@ -887,19 +889,19 @@ describe("Core/Transforms", function () {
hpr,
Ellipsoid.UNIT_SPHERE,
Transforms.eastNorthUpToFixedFrame,
- result,
+ result
);
const actualX = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 0, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 0, new Cartesian4())
);
const actualY = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 1, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 1, new Cartesian4())
);
const actualZ = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 2, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 2, new Cartesian4())
);
const actualTranslation = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 3, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 3, new Cartesian4())
);
expect(returnedResult).toBe(result);
@@ -917,17 +919,17 @@ describe("Core/Transforms", function () {
const hpr = new HeadingPitchRoll(heading, pitch, roll);
const expectedRotation = Matrix3.fromQuaternion(
- Quaternion.fromHeadingPitchRoll(hpr),
+ Quaternion.fromHeadingPitchRoll(hpr)
);
const expectedEast = Matrix3.getColumn(
expectedRotation,
0,
- new Cartesian3(),
+ new Cartesian3()
); // east
const expectedNorth = Matrix3.getColumn(
expectedRotation,
1,
- new Cartesian3(),
+ new Cartesian3()
); // north
const expectedUp = Matrix3.getColumn(expectedRotation, 2, new Cartesian3()); // up
@@ -935,19 +937,19 @@ describe("Core/Transforms", function () {
expectedEast.z,
expectedEast.x,
expectedEast.y,
- expectedEast,
+ expectedEast
);
Cartesian3.fromElements(
expectedNorth.z,
expectedNorth.x,
expectedNorth.y,
- expectedNorth,
+ expectedNorth
);
Cartesian3.fromElements(
expectedUp.z,
expectedUp.x,
expectedUp.y,
- expectedUp,
+ expectedUp
);
const result = new Matrix4();
@@ -956,19 +958,19 @@ describe("Core/Transforms", function () {
hpr,
Ellipsoid.UNIT_SPHERE,
Transforms.eastNorthUpToFixedFrame,
- result,
+ result
);
let actualEast = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 0, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 0, new Cartesian4())
); // east
let actualNorth = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 1, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 1, new Cartesian4())
); // north
let actualUp = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 2, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 2, new Cartesian4())
); // up
let actualTranslation = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 3, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 3, new Cartesian4())
);
expect(returnedResult).toBe(result);
@@ -979,32 +981,32 @@ describe("Core/Transforms", function () {
const UNEFixedFrameConverter = Transforms.localFrameToFixedFrameGenerator(
"west",
- "south",
+ "south"
); // up north east
returnedResult = Transforms.headingPitchRollToFixedFrame(
origin,
hpr,
Ellipsoid.UNIT_SPHERE,
UNEFixedFrameConverter,
- result,
+ result
);
actualEast = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 0, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 0, new Cartesian4())
); // east
actualEast.y = -actualEast.y;
actualEast.z = -actualEast.z;
actualNorth = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 1, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 1, new Cartesian4())
); // north
actualNorth.y = -actualNorth.y;
actualNorth.z = -actualNorth.z;
actualUp = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 2, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 2, new Cartesian4())
); // up
actualUp.y = -actualUp.y;
actualUp.z = -actualUp.z;
actualTranslation = Cartesian3.fromCartesian4(
- Matrix4.getColumn(returnedResult, 3, new Cartesian4()),
+ Matrix4.getColumn(returnedResult, 3, new Cartesian4())
);
expect(returnedResult).toBe(result);
@@ -1024,7 +1026,7 @@ describe("Core/Transforms", function () {
const transform = Transforms.headingPitchRollToFixedFrame(
origin,
hpr,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
const expected = Matrix4.getMatrix3(transform, new Matrix3());
@@ -1032,7 +1034,7 @@ describe("Core/Transforms", function () {
origin,
hpr,
Ellipsoid.UNIT_SPHERE,
- Transforms.eastNorthUpToFixedFrame,
+ Transforms.eastNorthUpToFixedFrame
);
const actual = Matrix3.fromQuaternion(quaternion);
expect(actual).toEqualEpsilon(expected, CesiumMath.EPSILON11);
@@ -1048,7 +1050,7 @@ describe("Core/Transforms", function () {
const transform = Transforms.headingPitchRollToFixedFrame(
origin,
hpr,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
const expected = Matrix4.getMatrix3(transform, new Matrix3());
@@ -1058,7 +1060,7 @@ describe("Core/Transforms", function () {
hpr,
Ellipsoid.UNIT_SPHERE,
Transforms.eastNorthUpToFixedFrame,
- result,
+ result
);
const actual = Matrix3.fromQuaternion(quaternion);
expect(quaternion).toBe(result);
@@ -1075,7 +1077,7 @@ describe("Core/Transforms", function () {
const transform = Transforms.headingPitchRollToFixedFrame(
origin,
hpr,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
const expected = Matrix4.getMatrix3(transform, new Matrix3());
@@ -1085,7 +1087,7 @@ describe("Core/Transforms", function () {
hpr,
Ellipsoid.UNIT_SPHERE,
undefined,
- result,
+ result
);
const actual = Matrix3.fromQuaternion(quaternion);
expect(quaternion).toBe(result);
@@ -1100,14 +1102,14 @@ describe("Core/Transforms", function () {
const hpr = new HeadingPitchRoll(heading, pitch, roll);
const fixedFrameTransform = Transforms.localFrameToFixedFrameGenerator(
"west",
- "south",
+ "south"
);
const transform = Transforms.headingPitchRollToFixedFrame(
origin,
hpr,
Ellipsoid.UNIT_SPHERE,
- fixedFrameTransform,
+ fixedFrameTransform
);
const expected = Matrix4.getMatrix3(transform, new Matrix3());
@@ -1117,7 +1119,7 @@ describe("Core/Transforms", function () {
hpr,
Ellipsoid.UNIT_SPHERE,
fixedFrameTransform,
- result,
+ result
);
const actual = Matrix3.fromQuaternion(quaternion);
expect(quaternion).toBe(result);
@@ -1142,11 +1144,11 @@ describe("Core/Transforms", function () {
const t4 = Matrix4.fromRotationTranslation(
t,
Cartesian3.ZERO,
- new Matrix4(),
+ new Matrix4()
);
expect(Matrix4.inverse(t4, new Matrix4())).toEqualEpsilon(
Matrix4.inverseTransformation(t4, new Matrix4()),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
time = JulianDate.addHours(time, 23.93447, new JulianDate()); // add one sidereal day
@@ -1175,7 +1177,7 @@ describe("Core/Transforms", function () {
const t4 = Matrix4.fromRotationTranslation(t);
expect(Matrix4.inverse(t4, new Matrix4())).toEqualEpsilon(
Matrix4.inverseTransformation(t4, new Matrix4()),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
time = JulianDate.addHours(time, 23.93447, new JulianDate()); // add one sidereal day
@@ -1206,7 +1208,7 @@ describe("Core/Transforms", function () {
const t4 = Matrix4.fromRotationTranslation(t);
expect(Matrix4.inverse(t4, new Matrix4())).toEqualEpsilon(
Matrix4.inverseTransformation(t4, new Matrix4()),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
time = JulianDate.addHours(time, 23.93447, new JulianDate()); // add one sidereal day
@@ -1251,7 +1253,7 @@ describe("Core/Transforms", function () {
const t4 = Matrix4.fromRotationTranslation(t);
expect(Matrix4.inverse(t4, new Matrix4())).toEqualEpsilon(
Matrix4.inverseTransformation(t4, new Matrix4()),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
time = JulianDate.addHours(time, 27.321661 * 24, new JulianDate()); // add one sidereal month
@@ -1271,13 +1273,13 @@ describe("Core/Transforms", function () {
0.4170384828971786,
0.3598159441089767,
0.2133099942194372,
- -0.9083123541662688,
+ -0.9083123541662688
);
const testInverse = Matrix3.multiply(
Matrix3.transpose(t, new Matrix3()),
expectedMtx,
- new Matrix3(),
+ new Matrix3()
);
const testDiff = new Matrix3();
for (let i = 0; i < 9; i++) {
@@ -1285,7 +1287,7 @@ describe("Core/Transforms", function () {
}
expect(testInverse).toEqualEpsilon(
Matrix3.IDENTITY,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(testDiff).toEqualEpsilon(new Matrix3(), CesiumMath.EPSILON14);
});
@@ -1294,8 +1296,9 @@ describe("Core/Transforms", function () {
describe("computeIcrfToFixedMatrix", function () {
async function preloadTransformationData(start, stop, eopUrl) {
if (defined(eopUrl)) {
- Transforms.earthOrientationParameters =
- await EarthOrientationParameters.fromUrl(eopUrl);
+ Transforms.earthOrientationParameters = await EarthOrientationParameters.fromUrl(
+ eopUrl
+ );
}
Transforms.iau2006XysData = new Iau2006XysData();
@@ -1323,17 +1326,17 @@ describe("Core/Transforms", function () {
// what happens when we try evaluating at times when we don't have EOP as well as at
// times where we do. The samples are not at exact EOP times, in order to test interpolation.
const componentsData = await Resource.fetchJson(
- "Data/EarthOrientationParameters/IcrfToFixedStkComponentsRotationData.json",
+ "Data/EarthOrientationParameters/IcrfToFixedStkComponentsRotationData.json"
);
const start = JulianDate.fromIso8601(componentsData[0].date);
const stop = JulianDate.fromIso8601(
- componentsData[componentsData.length - 1].date,
+ componentsData[componentsData.length - 1].date
);
await preloadTransformationData(
start,
stop,
- "Data/EarthOrientationParameters/EOP-2011-July.json",
+ "Data/EarthOrientationParameters/EOP-2011-July.json"
);
for (let i = 0; i < componentsData.length; ++i) {
const time = JulianDate.fromIso8601(componentsData[i].date);
@@ -1355,19 +1358,19 @@ describe("Core/Transforms", function () {
const t4 = Matrix4.fromRotationTranslation(t);
expect(Matrix4.inverse(t4, new Matrix4())).toEqualEpsilon(
Matrix4.inverseTransformation(t4, new Matrix4()),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
const expectedMtx = Matrix3.fromQuaternion(
Quaternion.conjugate(
componentsData[i].icrfToFixedQuaternion,
- new Quaternion(),
- ),
+ new Quaternion()
+ )
);
const testInverse = Matrix3.multiply(
Matrix3.transpose(t, new Matrix3()),
expectedMtx,
- new Matrix3(),
+ new Matrix3()
);
const testDiff = new Matrix3();
for (let k = 0; k < 9; k++) {
@@ -1375,7 +1378,7 @@ describe("Core/Transforms", function () {
}
expect(testInverse).toEqualEpsilon(
Matrix3.IDENTITY,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(testDiff).toEqualEpsilon(new Matrix3(), CesiumMath.EPSILON14);
}
@@ -1388,7 +1391,7 @@ describe("Core/Transforms", function () {
await preloadTransformationData(
time,
time,
- "Data/EarthOrientationParameters/EOP-2011-July.json",
+ "Data/EarthOrientationParameters/EOP-2011-July.json"
);
const resultT = new Matrix3();
const t = Transforms.computeIcrfToFixedMatrix(time, resultT);
@@ -1408,7 +1411,7 @@ describe("Core/Transforms", function () {
const t4 = Matrix4.fromRotationTranslation(t);
expect(Matrix4.inverse(t4, new Matrix4())).toEqualEpsilon(
Matrix4.inverseTransformation(t4, new Matrix4()),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
time = JulianDate.addHours(time, 23.93447, new JulianDate()); // add one sidereal day
@@ -1429,13 +1432,13 @@ describe("Core/Transforms", function () {
-0.0011325710874539787,
0.0011536112127187594,
-0.0000089534866085598909,
- 0.99999933455028112,
+ 0.99999933455028112
);
const testInverse = Matrix3.multiply(
Matrix3.transpose(t, new Matrix3()),
expectedMtx,
- new Matrix3(),
+ new Matrix3()
);
const testDiff = new Matrix3();
for (let i = 0; i < 9; i++) {
@@ -1443,7 +1446,7 @@ describe("Core/Transforms", function () {
}
expect(testInverse).toEqualEpsilon(
Matrix3.IDENTITY,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(testDiff).toEqualEpsilon(new Matrix3(), CesiumMath.EPSILON14);
});
@@ -1454,7 +1457,7 @@ describe("Core/Transforms", function () {
await preloadTransformationData(
time,
time,
- "Data/EarthOrientationParameters/EOP-2011-July.json",
+ "Data/EarthOrientationParameters/EOP-2011-July.json"
);
const resultT = new Matrix3();
const t = Transforms.computeIcrfToFixedMatrix(time, resultT);
@@ -1469,13 +1472,13 @@ describe("Core/Transforms", function () {
0.0011266944449015753,
0.0011497249933208494,
-0.000010082996932331842,
- 0.99999933901516791,
+ 0.99999933901516791
);
const testInverse = Matrix3.multiply(
Matrix3.transpose(t, new Matrix3()),
expectedMtx,
- new Matrix3(),
+ new Matrix3()
);
const testDiff = new Matrix3();
for (let i = 0; i < 9; i++) {
@@ -1483,7 +1486,7 @@ describe("Core/Transforms", function () {
}
expect(testInverse).toEqualEpsilon(
Matrix3.IDENTITY,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(testDiff).toEqualEpsilon(new Matrix3(), CesiumMath.EPSILON14);
});
@@ -1494,7 +1497,7 @@ describe("Core/Transforms", function () {
await preloadTransformationData(
time,
time,
- "Data/EarthOrientationParameters/EOP-2011-July.json",
+ "Data/EarthOrientationParameters/EOP-2011-July.json"
);
const resultT = new Matrix3();
const t = Transforms.computeIcrfToFixedMatrix(time, resultT);
@@ -1509,13 +1512,13 @@ describe("Core/Transforms", function () {
0.0011297972845023996,
0.0011493056536445096,
-0.00001025368996280683,
- 0.99999933949547,
+ 0.99999933949547
);
const testInverse = Matrix3.multiply(
Matrix3.transpose(t, new Matrix3()),
expectedMtx,
- new Matrix3(),
+ new Matrix3()
);
const testDiff = new Matrix3();
for (let i = 0; i < 9; i++) {
@@ -1523,7 +1526,7 @@ describe("Core/Transforms", function () {
}
expect(testInverse).toEqualEpsilon(
Matrix3.IDENTITY,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(testDiff).toEqualEpsilon(new Matrix3(), CesiumMath.EPSILON14);
});
@@ -1533,13 +1536,13 @@ describe("Core/Transforms", function () {
const inertialPos = new Cartesian3(
-7322101.15395708,
-41525699.1558387,
- 0,
+ 0
);
// The following is the value computed by STK Components for the date specified below
const expectedFixedPos = new Cartesian3(
39489858.9917795,
-14783363.192887,
- -8075.05820056297,
+ -8075.05820056297
);
// 2011-07-03 00:00:00 UTC
@@ -1548,7 +1551,7 @@ describe("Core/Transforms", function () {
await preloadTransformationData(
time,
time,
- "Data/EarthOrientationParameters/EOP-2011-July.json",
+ "Data/EarthOrientationParameters/EOP-2011-July.json"
);
const resultT = new Matrix3();
const t = Transforms.computeIcrfToFixedMatrix(time, resultT);
@@ -1557,7 +1560,7 @@ describe("Core/Transforms", function () {
const error = Cartesian3.subtract(
result,
expectedFixedPos,
- new Cartesian3(),
+ new Cartesian3()
);
// Given the magnitude of the positions involved (1e8)
@@ -1573,7 +1576,7 @@ describe("Core/Transforms", function () {
// we don't have the data in Cesium to load.
await preloadTransformationData(
time,
- JulianDate.addDays(time, 1, new JulianDate()),
+ JulianDate.addDays(time, 1, new JulianDate())
);
const resultT = new Matrix3();
@@ -1590,7 +1593,7 @@ describe("Core/Transforms", function () {
// we don't have the data in Cesium to load.
await preloadTransformationData(
time,
- JulianDate.addDays(time, 1, new JulianDate()),
+ JulianDate.addDays(time, 1, new JulianDate())
);
const resultT = new Matrix3();
const t = Transforms.computeIcrfToFixedMatrix(time, resultT);
@@ -1602,13 +1605,13 @@ describe("Core/Transforms", function () {
const inertialPos = new Cartesian3(
-7322101.15395708,
-41525699.1558387,
- 0,
+ 0
);
// The following is the value computed by STK Components for the date specified below
const expectedFixedPos = new Cartesian3(
39489545.7583001,
-14784199.9085371,
- -8034.77037239318,
+ -8034.77037239318
);
// 2011-07-03 00:00:00 UTC
@@ -1623,7 +1626,7 @@ describe("Core/Transforms", function () {
const error = Cartesian3.subtract(
result,
expectedFixedPos,
- new Cartesian3(),
+ new Cartesian3()
);
// Given the magnitude of the positions involved (1e8)
@@ -1640,13 +1643,13 @@ describe("Core/Transforms", function () {
await preloadTransformationData(
time,
time,
- "Data/EarthOrientationParameters/EOP-Invalid.json",
+ "Data/EarthOrientationParameters/EOP-Invalid.json"
);
return Transforms.computeIcrfToFixedMatrix(time);
- })(),
+ })()
).toBeRejectedWithError(
RuntimeError,
- "Error in loaded EOP data: The columnNames property is required.",
+ "Error in loaded EOP data: The columnNames property is required."
);
});
@@ -1666,7 +1669,7 @@ describe("Core/Transforms", function () {
width / height,
1.0,
10.0,
- new Matrix4(),
+ new Matrix4()
);
const vpTransform = Matrix4.computeViewportTransformation(
{
@@ -1675,7 +1678,7 @@ describe("Core/Transforms", function () {
},
0,
1,
- new Matrix4(),
+ new Matrix4()
);
it("pointToGLWindowCoordinates works at the center", function () {
@@ -1683,7 +1686,7 @@ describe("Core/Transforms", function () {
position: Cartesian3.multiplyByScalar(
Cartesian3.UNIT_X,
2.0,
- new Cartesian3(),
+ new Cartesian3()
),
direction: Cartesian3.negate(Cartesian3.UNIT_X, new Cartesian3()),
up: Cartesian3.UNIT_Z,
@@ -1694,7 +1697,7 @@ describe("Core/Transforms", function () {
const returnedResult = Transforms.pointToGLWindowCoordinates(
mvpMatrix,
vpTransform,
- Cartesian3.ZERO,
+ Cartesian3.ZERO
);
expect(returnedResult).toEqual(expected);
});
@@ -1704,7 +1707,7 @@ describe("Core/Transforms", function () {
position: Cartesian3.multiplyByScalar(
Cartesian3.UNIT_X,
2.0,
- new Cartesian3(),
+ new Cartesian3()
),
direction: Cartesian3.negate(Cartesian3.UNIT_X, new Cartesian3()),
up: Cartesian3.UNIT_Z,
@@ -1717,7 +1720,7 @@ describe("Core/Transforms", function () {
mvpMatrix,
vpTransform,
Cartesian3.ZERO,
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(returnedResult).toEqual(expected);
@@ -1734,7 +1737,7 @@ describe("Core/Transforms", function () {
const returnedResult = Transforms.pointToGLWindowCoordinates(
perspective,
vpTransform,
- point,
+ point
);
expect(returnedResult).toEqualEpsilon(expected, CesiumMath.EPSILON12);
});
@@ -1750,7 +1753,7 @@ describe("Core/Transforms", function () {
const returnedResult = Transforms.pointToGLWindowCoordinates(
perspective,
vpTransform,
- point,
+ point
);
expect(returnedResult).toEqualEpsilon(expected, CesiumMath.EPSILON12);
});
@@ -1760,7 +1763,7 @@ describe("Core/Transforms", function () {
position: Cartesian3.multiplyByScalar(
Cartesian3.UNIT_X,
2.0,
- new Cartesian3(),
+ new Cartesian3()
),
direction: Cartesian3.negate(Cartesian3.UNIT_X, new Cartesian3()),
up: Cartesian3.UNIT_Z,
@@ -1771,7 +1774,7 @@ describe("Core/Transforms", function () {
const returnedResult = Transforms.pointToWindowCoordinates(
mvpMatrix,
vpTransform,
- Cartesian3.ZERO,
+ Cartesian3.ZERO
);
expect(returnedResult).toEqual(expected);
});
@@ -1781,7 +1784,7 @@ describe("Core/Transforms", function () {
position: Cartesian3.multiplyByScalar(
Cartesian3.UNIT_X,
2.0,
- new Cartesian3(),
+ new Cartesian3()
),
direction: Cartesian3.negate(Cartesian3.UNIT_X, new Cartesian3()),
up: Cartesian3.UNIT_Z,
@@ -1794,7 +1797,7 @@ describe("Core/Transforms", function () {
mvpMatrix,
vpTransform,
Cartesian3.ZERO,
- result,
+ result
);
expect(result).toBe(returnedResult);
expect(returnedResult).toEqual(expected);
@@ -1811,7 +1814,7 @@ describe("Core/Transforms", function () {
const returnedResult = Transforms.pointToWindowCoordinates(
perspective,
vpTransform,
- point,
+ point
);
expect(returnedResult).toEqualEpsilon(expected, CesiumMath.EPSILON12);
});
@@ -1827,7 +1830,7 @@ describe("Core/Transforms", function () {
const returnedResult = Transforms.pointToWindowCoordinates(
perspective,
vpTransform,
- point,
+ point
);
expect(returnedResult).toEqualEpsilon(expected, CesiumMath.EPSILON12);
});
@@ -1835,21 +1838,21 @@ describe("Core/Transforms", function () {
it("rotationMatrixFromPositionVelocity works without a result parameter", function () {
let matrix = Transforms.rotationMatrixFromPositionVelocity(
Cartesian3.UNIT_X,
- Cartesian3.UNIT_Y,
+ Cartesian3.UNIT_Y
);
let expected = new Matrix3(0, 0, 1, 1, 0, 0, 0, 1, 0);
expect(matrix).toEqualEpsilon(expected, CesiumMath.EPSILON14);
matrix = Transforms.rotationMatrixFromPositionVelocity(
Cartesian3.UNIT_X,
- Cartesian3.UNIT_Z,
+ Cartesian3.UNIT_Z
);
expected = new Matrix3(0, 0, 1, 0, -1, 0, 1, 0, 0);
expect(matrix).toEqualEpsilon(expected, CesiumMath.EPSILON14);
matrix = Transforms.rotationMatrixFromPositionVelocity(
Cartesian3.UNIT_Y,
- Cartesian3.UNIT_Z,
+ Cartesian3.UNIT_Z
);
expected = new Matrix3(0, 1, 0, 0, 0, 1, 1, 0, 0);
expect(matrix).toEqualEpsilon(expected, CesiumMath.EPSILON14);
@@ -1861,7 +1864,7 @@ describe("Core/Transforms", function () {
Cartesian3.UNIT_X,
Cartesian3.UNIT_Y,
Ellipsoid.WGS84,
- result,
+ result
);
let expected = new Matrix3(0, 0, 1, 1, 0, 0, 0, 1, 0);
expect(result).toEqualEpsilon(expected, CesiumMath.EPSILON14);
@@ -1870,7 +1873,7 @@ describe("Core/Transforms", function () {
Cartesian3.UNIT_X,
Cartesian3.UNIT_Z,
Ellipsoid.WGS84,
- result,
+ result
);
expected = new Matrix3(0, 0, 1, 0, -1, 0, 1, 0, 0);
expect(result).toEqualEpsilon(expected, CesiumMath.EPSILON14);
@@ -1879,7 +1882,7 @@ describe("Core/Transforms", function () {
Cartesian3.UNIT_Y,
Cartesian3.UNIT_Z,
Ellipsoid.WGS84,
- result,
+ result
);
expected = new Matrix3(0, 1, 0, 0, 0, 1, 1, 0, 0);
expect(result).toEqualEpsilon(expected, CesiumMath.EPSILON14);
@@ -1897,16 +1900,16 @@ describe("Core/Transforms", function () {
const modelMatrix = Transforms.headingPitchRollToFixedFrame(
origin,
hpr,
- ellipsoid,
+ ellipsoid
);
const modelMatrix2D = Transforms.basisTo2D(
projection,
modelMatrix,
- new Matrix4(),
+ new Matrix4()
);
const translation2D = Cartesian3.fromCartesian4(
- Matrix4.getColumn(modelMatrix2D, 3, new Cartesian4()),
+ Matrix4.getColumn(modelMatrix2D, 3, new Cartesian4())
);
const carto = ellipsoid.cartesianToCartographic(origin);
@@ -1928,12 +1931,12 @@ describe("Core/Transforms", function () {
const modelMatrix = Transforms.headingPitchRollToFixedFrame(
origin,
hpr,
- ellipsoid,
+ ellipsoid
);
const modelMatrix2D = Transforms.basisTo2D(
projection,
modelMatrix,
- new Matrix4(),
+ new Matrix4()
);
const rotation2D = Matrix4.getMatrix3(modelMatrix2D, new Matrix3());
@@ -1944,7 +1947,7 @@ describe("Core/Transforms", function () {
const hprPlusTranslate = Matrix4.multiply(
enuInverse,
modelMatrix,
- new Matrix4(),
+ new Matrix4()
);
const hpr2 = Matrix4.getMatrix3(hprPlusTranslate, new Matrix3());
@@ -1968,7 +1971,7 @@ describe("Core/Transforms", function () {
const actual = Transforms.ellipsoidTo2DModelMatrix(
projection,
origin,
- new Matrix4(),
+ new Matrix4()
);
const expected = Matrix4.fromTranslation(origin);
Transforms.basisTo2D(projection, expected, expected);
@@ -1977,19 +1980,19 @@ describe("Core/Transforms", function () {
const expectedRotation = Matrix4.getMatrix3(expected, new Matrix3());
expect(actualRotation).toEqualEpsilon(
expectedRotation,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
const fromENU = Transforms.eastNorthUpToFixedFrame(
origin,
ellipsoid,
- new Matrix4(),
+ new Matrix4()
);
const toENU = Matrix4.inverseTransformation(fromENU, new Matrix4());
const toENUTranslation = Matrix4.getTranslation(toENU, new Cartesian4());
const projectedTranslation = Matrix4.getTranslation(
expected,
- new Cartesian4(),
+ new Cartesian4()
);
const expectedTranslation = new Cartesian4();
@@ -2001,7 +2004,7 @@ describe("Core/Transforms", function () {
expect(actualTranslation).toEqualEpsilon(
expectedTranslation,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -2009,12 +2012,12 @@ describe("Core/Transforms", function () {
const expected = new HeadingPitchRoll(0.5, 0.6, 0.7);
let transform = Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(0, 0),
+ Cartesian3.fromDegrees(0, 0)
);
const transform2 = Matrix4.fromTranslationQuaternionRotationScale(
new Cartesian3(),
Quaternion.fromHeadingPitchRoll(expected),
- new Cartesian3(1, 1, 1),
+ new Cartesian3(1, 1, 1)
);
transform = Matrix4.multiply(transform, transform2, transform2);
@@ -2050,7 +2053,7 @@ describe("Core/Transforms", function () {
expect(function () {
Transforms.headingPitchRollToFixedFrame(
undefined,
- new HeadingPitchRoll(),
+ new HeadingPitchRoll()
);
}).toThrowDeveloperError();
});
@@ -2072,7 +2075,7 @@ describe("Core/Transforms", function () {
Transforms.pointToWindowCoordinates(
undefined,
Matrix4.IDENTITY,
- Cartesian3.ZERO,
+ Cartesian3.ZERO
);
}).toThrowDeveloperError();
});
@@ -2082,7 +2085,7 @@ describe("Core/Transforms", function () {
Transforms.pointToWindowCoordinates(
Matrix4.IDENTITY,
undefined,
- Cartesian3.ZERO,
+ Cartesian3.ZERO
);
}).toThrowDeveloperError();
});
@@ -2092,7 +2095,7 @@ describe("Core/Transforms", function () {
Transforms.pointToWindowCoordinates(
Matrix4.IDENTITY,
Matrix4.IDENTITY,
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
@@ -2108,7 +2111,7 @@ describe("Core/Transforms", function () {
Transforms.basisTo2D(
new GeographicProjection(),
undefined,
- new Matrix4(),
+ new Matrix4()
);
}).toThrowDeveloperError();
});
@@ -2118,7 +2121,7 @@ describe("Core/Transforms", function () {
Transforms.basisTo2D(
new GeographicProjection(),
Matrix4.IDENTITY,
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
@@ -2128,7 +2131,7 @@ describe("Core/Transforms", function () {
Transforms.ellipsoidTo2DModelMatrix(
undefined,
Cartesian3.UNIT_X,
- new Matrix4(),
+ new Matrix4()
);
}).toThrowDeveloperError();
});
@@ -2138,7 +2141,7 @@ describe("Core/Transforms", function () {
Transforms.ellipsoidTo2DModelMatrix(
new GeographicProjection(),
undefined,
- new Matrix4(),
+ new Matrix4()
);
}).toThrowDeveloperError();
});
@@ -2148,7 +2151,7 @@ describe("Core/Transforms", function () {
Transforms.ellipsoidTo2DModelMatrix(
new GeographicProjection(),
Cartesian3.UNIT_X,
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
diff --git a/packages/engine/Specs/Core/TranslationRotationScaleSpec.js b/packages/engine/Specs/Core/TranslationRotationScaleSpec.js
index ad3afec38d79..c673745259eb 100644
--- a/packages/engine/Specs/Core/TranslationRotationScaleSpec.js
+++ b/packages/engine/Specs/Core/TranslationRotationScaleSpec.js
@@ -21,7 +21,7 @@ describe("Core/TranslationRotationScale", function () {
const transformation = new TranslationRotationScale(
translation,
rotation,
- scale,
+ scale
);
expect(transformation.translation).toEqual(translation);
diff --git a/packages/engine/Specs/Core/TridiagonalSystemSolverSpec.js b/packages/engine/Specs/Core/TridiagonalSystemSolverSpec.js
index 15db6f082ce6..b96c8720ab31 100644
--- a/packages/engine/Specs/Core/TridiagonalSystemSolverSpec.js
+++ b/packages/engine/Specs/Core/TridiagonalSystemSolverSpec.js
@@ -73,7 +73,14 @@ describe("Core/TridiagonalSystemSolver", function () {
it("solve nine unknowns", function () {
const l = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0];
const d = [
- -2.0304, -2.0288, -2.0272, -2.0256, -2.024, -2.0224, -2.0208, -2.0192,
+ -2.0304,
+ -2.0288,
+ -2.0272,
+ -2.0256,
+ -2.024,
+ -2.0224,
+ -2.0208,
+ -2.0192,
-2.0176,
];
const u = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0];
diff --git a/packages/engine/Specs/Core/TrustedServersSpec.js b/packages/engine/Specs/Core/TrustedServersSpec.js
index 77efce7480ed..f5a174a0f8d5 100644
--- a/packages/engine/Specs/Core/TrustedServersSpec.js
+++ b/packages/engine/Specs/Core/TrustedServersSpec.js
@@ -26,55 +26,55 @@ describe("Core/TrustedServers", function () {
it("http without a port", function () {
TrustedServers.add("cesiumjs.org", 80);
expect(TrustedServers.contains("http://cesiumjs.org/index.html")).toBe(
- true,
+ true
);
expect(TrustedServers.contains("https://cesiumjs.org/index.html")).toBe(
- false,
+ false
);
});
it("https without a port", function () {
TrustedServers.add("cesiumjs.org", 443);
expect(TrustedServers.contains("https://cesiumjs.org/index.html")).toBe(
- true,
+ true
);
expect(TrustedServers.contains("http://cesiumjs.org/index.html")).toBe(
- false,
+ false
);
});
it("add", function () {
expect(TrustedServers.contains("http://cesiumjs.org:81/index.html")).toBe(
- false,
+ false
);
TrustedServers.add("cesiumjs.org", 81);
expect(TrustedServers.contains("http://cesiumjs.org/index.html")).toBe(
- false,
+ false
);
expect(TrustedServers.contains("http://cesiumjs.org:81/index.html")).toBe(
- true,
+ true
);
});
it("remove", function () {
TrustedServers.add("cesiumjs.org", 81);
expect(TrustedServers.contains("http://cesiumjs.org:81/index.html")).toBe(
- true,
+ true
);
TrustedServers.remove("cesiumjs.org", 8080);
expect(TrustedServers.contains("http://cesiumjs.org:81/index.html")).toBe(
- true,
+ true
);
TrustedServers.remove("cesiumjs.org", 81);
expect(TrustedServers.contains("http://cesiumjs.org:81/index.html")).toBe(
- false,
+ false
);
});
it("handles username/password credentials", function () {
TrustedServers.add("cesiumjs.org", 81);
expect(
- TrustedServers.contains("http://user:pass@cesiumjs.org:81/index.html"),
+ TrustedServers.contains("http://user:pass@cesiumjs.org:81/index.html")
).toBe(true);
});
@@ -90,15 +90,15 @@ describe("Core/TrustedServers", function () {
it("clear", function () {
TrustedServers.add("cesiumjs.org", 80);
expect(TrustedServers.contains("http://cesiumjs.org/index.html")).toBe(
- true,
+ true
);
TrustedServers.clear();
expect(TrustedServers.contains("http://cesiumjs.org/index.html")).toBe(
- false,
+ false
);
TrustedServers.add("cesiumjs.org", 80);
expect(TrustedServers.contains("http://cesiumjs.org/index.html")).toBe(
- true,
+ true
);
});
});
diff --git a/packages/engine/Specs/Core/VRTheWorldTerrainProviderSpec.js b/packages/engine/Specs/Core/VRTheWorldTerrainProviderSpec.js
index 900ca48d8131..a4103ae80051 100644
--- a/packages/engine/Specs/Core/VRTheWorldTerrainProviderSpec.js
+++ b/packages/engine/Specs/Core/VRTheWorldTerrainProviderSpec.js
@@ -21,7 +21,7 @@ describe("Core/VRTheWorldTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
if (url === imageUrl) {
Resource._DefaultImplementations.loadWithXhr(
@@ -31,7 +31,7 @@ describe("Core/VRTheWorldTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
return;
}
@@ -90,9 +90,9 @@ describe("Core/VRTheWorldTerrainProvider", function () {
it("fromUrl rejects without url", async function () {
await expectAsync(
- VRTheWorldTerrainProvider.fromUrl(),
+ VRTheWorldTerrainProvider.fromUrl()
).toBeRejectedWithDeveloperError(
- "url is required, actual value was undefined",
+ "url is required, actual value was undefined"
);
});
@@ -131,11 +131,11 @@ describe("Core/VRTheWorldTerrainProvider", function () {
expect(provider.getLevelMaximumGeometricError(0)).toBeGreaterThan(0.0);
expect(provider.getLevelMaximumGeometricError(0)).toEqualEpsilon(
provider.getLevelMaximumGeometricError(1) * 2.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(provider.getLevelMaximumGeometricError(1)).toEqualEpsilon(
provider.getLevelMaximumGeometricError(2) * 2.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -168,7 +168,7 @@ describe("Core/VRTheWorldTerrainProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
setTimeout(function () {
const parser = new DOMParser();
@@ -198,10 +198,10 @@ describe("Core/VRTheWorldTerrainProvider", function () {
};
await expectAsync(
- VRTheWorldTerrainProvider.fromUrl("made/up/url"),
+ VRTheWorldTerrainProvider.fromUrl("made/up/url")
).toBeRejectedWithError(
RuntimeError,
- "An error occurred while accessing made/up/url: SRS EPSG:foo is not supported",
+ "An error occurred while accessing made/up/url: SRS EPSG:foo is not supported"
);
});
@@ -214,24 +214,24 @@ describe("Core/VRTheWorldTerrainProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
expect(request.url.indexOf(".tif?cesium=true")).toBeGreaterThanOrEqual(
- 0,
+ 0
);
// Just return any old image.
Resource._DefaultImplementations.createImage(
new Request({ url: imageUrl }),
crossOrigin,
- deferred,
+ deferred
);
};
const terrainProvider = await VRTheWorldTerrainProvider.fromUrl(baseUrl);
expect(terrainProvider.tilingScheme).toBeInstanceOf(
- GeographicTilingScheme,
+ GeographicTilingScheme
);
const loadedData = await terrainProvider.requestTileGeometry(0, 0, 0);
expect(loadedData).toBeInstanceOf(HeightmapTerrainData);
@@ -244,7 +244,7 @@ describe("Core/VRTheWorldTerrainProvider", function () {
RequestScheduler.maximumRequestsPerServer = 0;
expect(
- terrainProvider.requestTileGeometry(0, 0, 0, createRequest()),
+ terrainProvider.requestTileGeometry(0, 0, 0, createRequest())
).toBeUndefined();
});
});
diff --git a/packages/engine/Specs/Core/VertexFormatSpec.js b/packages/engine/Specs/Core/VertexFormatSpec.js
index f14735bc596c..85acde809a35 100644
--- a/packages/engine/Specs/Core/VertexFormatSpec.js
+++ b/packages/engine/Specs/Core/VertexFormatSpec.js
@@ -23,9 +23,12 @@ describe("Core/VertexFormat", function () {
expect(cloned).toEqual(vertexFormat);
});
- createPackableSpecs(
- VertexFormat,
- VertexFormat.POSITION_AND_NORMAL,
- [1.0, 1.0, 0.0, 0.0, 0.0, 0.0],
- );
+ createPackableSpecs(VertexFormat, VertexFormat.POSITION_AND_NORMAL, [
+ 1.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ ]);
});
diff --git a/packages/engine/Specs/Core/VerticalExaggerationSpec.js b/packages/engine/Specs/Core/VerticalExaggerationSpec.js
index e429cf93c09f..1d261e5c9791 100644
--- a/packages/engine/Specs/Core/VerticalExaggerationSpec.js
+++ b/packages/engine/Specs/Core/VerticalExaggerationSpec.js
@@ -14,7 +14,7 @@ describe("Core/VerticalExaggeration", function () {
const result = VerticalExaggeration.getHeight(
height,
scale,
- relativeHeight,
+ relativeHeight
);
expect(result).toEqual(height);
});
@@ -27,7 +27,7 @@ describe("Core/VerticalExaggeration", function () {
const result = VerticalExaggeration.getHeight(
height,
scale,
- relativeHeight,
+ relativeHeight
);
expect(result).toEqual(200.0);
});
@@ -40,7 +40,7 @@ describe("Core/VerticalExaggeration", function () {
const result = VerticalExaggeration.getHeight(
height,
scale,
- relativeHeight,
+ relativeHeight
);
expect(result).toEqual(100.0);
});
@@ -53,7 +53,7 @@ describe("Core/VerticalExaggeration", function () {
const result = VerticalExaggeration.getHeight(
height,
scale,
- relativeHeight,
+ relativeHeight
);
expect(result).toEqual(0.0);
});
@@ -68,7 +68,7 @@ describe("Core/VerticalExaggeration", function () {
position,
ellipsoid,
verticalExaggeration,
- verticalExaggerationRelativeHeight,
+ verticalExaggerationRelativeHeight
);
expect(result).toEqualEpsilon(position, CesiumMath.EPSILON8);
});
@@ -83,11 +83,11 @@ describe("Core/VerticalExaggeration", function () {
position,
ellipsoid,
verticalExaggeration,
- verticalExaggerationRelativeHeight,
+ verticalExaggerationRelativeHeight
);
expect(result).toEqualEpsilon(
Cartesian3.fromRadians(0.0, 0.0, 200.0),
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
});
@@ -101,7 +101,7 @@ describe("Core/VerticalExaggeration", function () {
position,
ellipsoid,
verticalExaggeration,
- verticalExaggerationRelativeHeight,
+ verticalExaggerationRelativeHeight
);
expect(result).toEqualEpsilon(position, CesiumMath.EPSILON8);
});
@@ -116,11 +116,11 @@ describe("Core/VerticalExaggeration", function () {
position,
ellipsoid,
verticalExaggeration,
- verticalExaggerationRelativeHeight,
+ verticalExaggerationRelativeHeight
);
expect(result).toEqualEpsilon(
Cartesian3.fromRadians(0.0, 0.0, 0.0),
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
});
});
diff --git a/packages/engine/Specs/Core/VideoSynchronizerSpec.js b/packages/engine/Specs/Core/VideoSynchronizerSpec.js
index 642011a73da8..2b7e578238d1 100644
--- a/packages/engine/Specs/Core/VideoSynchronizerSpec.js
+++ b/packages/engine/Specs/Core/VideoSynchronizerSpec.js
@@ -102,7 +102,7 @@ describe("Core/VideoSynchronizer", function () {
return CesiumMath.equalsEpsilon(
element.currentTime,
60 - element.duration,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
});
})
@@ -113,7 +113,7 @@ describe("Core/VideoSynchronizer", function () {
return CesiumMath.equalsEpsilon(
element.currentTime,
element.duration - 1,
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
});
})
@@ -154,7 +154,7 @@ describe("Core/VideoSynchronizer", function () {
return CesiumMath.equalsEpsilon(
element.currentTime,
element.duration,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
});
})
diff --git a/packages/engine/Specs/Core/WallGeometrySpec.js b/packages/engine/Specs/Core/WallGeometrySpec.js
index c7667e7217f3..d8f430d9f0ab 100644
--- a/packages/engine/Specs/Core/WallGeometrySpec.js
+++ b/packages/engine/Specs/Core/WallGeometrySpec.js
@@ -39,9 +39,17 @@ describe("Core/WallGeometry", function () {
const geometry = WallGeometry.createGeometry(
new WallGeometry({
positions: Cartesian3.fromDegreesArrayHeights([
- 49.0, 18.0, 1000.0, 49.0, 18.0, 5000.0, 49.0, 18.0, 1000.0,
+ 49.0,
+ 18.0,
+ 1000.0,
+ 49.0,
+ 18.0,
+ 5000.0,
+ 49.0,
+ 18.0,
+ 1000.0,
]),
- }),
+ })
);
expect(geometry).toBeUndefined();
});
@@ -50,19 +58,29 @@ describe("Core/WallGeometry", function () {
let geometry = WallGeometry.createGeometry(
new WallGeometry({
positions: Cartesian3.fromDegreesArray([
- 49.0, 18.0, 49.0, 18.0, 49.0, 18.0,
+ 49.0,
+ 18.0,
+ 49.0,
+ 18.0,
+ 49.0,
+ 18.0,
]),
- }),
+ })
);
expect(geometry).toBeUndefined();
geometry = WallGeometry.createGeometry(
new WallGeometry({
positions: Cartesian3.fromDegreesArray([
- 49.0, 18.0, 49.0, 18.0, 49.0, 18.0,
+ 49.0,
+ 18.0,
+ 49.0,
+ 18.0,
+ 49.0,
+ 18.0,
]),
maximumHeights: [0, 0, 0],
- }),
+ })
);
expect(geometry).toBeUndefined();
});
@@ -72,10 +90,12 @@ describe("Core/WallGeometry", function () {
new WallGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArray([
- -47.93121266896352, -15.771192496304398, -47.93119792786269,
+ -47.93121266896352,
+ -15.771192496304398,
+ -47.93119792786269,
-15.771148001875085,
]),
- }),
+ })
);
});
@@ -84,9 +104,14 @@ describe("Core/WallGeometry", function () {
new WallGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArrayHeights([
- 49.0, 18.0, 1000.0, 50.0, 18.0, 1000.0,
+ 49.0,
+ 18.0,
+ 1000.0,
+ 50.0,
+ 18.0,
+ 1000.0,
]),
- }),
+ })
);
const positions = w.attributes.position.values;
@@ -96,12 +121,12 @@ describe("Core/WallGeometry", function () {
expect(w.indices.length).toEqual(numTriangles * 3);
let cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 0),
+ Cartesian3.fromArray(positions, 0)
);
expect(cartographic.height).toEqualEpsilon(0.0, CesiumMath.EPSILON8);
cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 3),
+ Cartesian3.fromArray(positions, 3)
);
expect(cartographic.height).toEqualEpsilon(1000.0, CesiumMath.EPSILON8);
});
@@ -111,10 +136,23 @@ describe("Core/WallGeometry", function () {
new WallGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArrayHeights([
- -107.0, 43.0, 1000.0, -106.0, 43.0, 1000.0, -106.0, 42.0, 1000.0,
- -107.0, 42.0, 1000.0, -107.0, 43.0, 1000.0,
+ -107.0,
+ 43.0,
+ 1000.0,
+ -106.0,
+ 43.0,
+ 1000.0,
+ -106.0,
+ 42.0,
+ 1000.0,
+ -107.0,
+ 42.0,
+ 1000.0,
+ -107.0,
+ 43.0,
+ 1000.0,
]),
- }),
+ })
);
const positions = w.attributes.position.values;
@@ -124,12 +162,12 @@ describe("Core/WallGeometry", function () {
expect(w.indices.length).toEqual(numTriangles * 3);
let cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 0),
+ Cartesian3.fromArray(positions, 0)
);
expect(cartographic.height).toEqualEpsilon(0.0, CesiumMath.EPSILON8);
cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 3),
+ Cartesian3.fromArray(positions, 3)
);
expect(cartographic.height).toEqualEpsilon(1000.0, CesiumMath.EPSILON8);
});
@@ -139,11 +177,16 @@ describe("Core/WallGeometry", function () {
new WallGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArrayHeights([
- 49.0, 18.0, 1000.0, 50.0, 18.0, 1000.0,
+ 49.0,
+ 18.0,
+ 1000.0,
+ 50.0,
+ 18.0,
+ 1000.0,
]),
minimumHeights: [1000.0, 2000.0],
maximumHeights: [3000.0, 4000.0],
- }),
+ })
);
const positions = w.attributes.position.values;
@@ -153,22 +196,22 @@ describe("Core/WallGeometry", function () {
expect(w.indices.length).toEqual(numTriangles * 3);
let cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 0),
+ Cartesian3.fromArray(positions, 0)
);
expect(cartographic.height).toEqualEpsilon(1000.0, CesiumMath.EPSILON8);
cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 3),
+ Cartesian3.fromArray(positions, 3)
);
expect(cartographic.height).toEqualEpsilon(3000.0, CesiumMath.EPSILON8);
cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 6),
+ Cartesian3.fromArray(positions, 6)
);
expect(cartographic.height).toEqualEpsilon(2000.0, CesiumMath.EPSILON8);
cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 9),
+ Cartesian3.fromArray(positions, 9)
);
expect(cartographic.height).toEqualEpsilon(4000.0, CesiumMath.EPSILON8);
});
@@ -178,11 +221,29 @@ describe("Core/WallGeometry", function () {
new WallGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArrayHeights([
- 49.0, 18.0, 1000.0, 49.0, 18.0, 2000.0, 50.0, 18.0, 1000.0, 50.0,
- 18.0, 1000.0, 50.0, 18.0, 1000.0, 51.0, 18.0, 1000.0, 51.0, 18.0,
+ 49.0,
+ 18.0,
+ 1000.0,
+ 49.0,
+ 18.0,
+ 2000.0,
+ 50.0,
+ 18.0,
+ 1000.0,
+ 50.0,
+ 18.0,
+ 1000.0,
+ 50.0,
+ 18.0,
+ 1000.0,
+ 51.0,
+ 18.0,
+ 1000.0,
+ 51.0,
+ 18.0,
1000.0,
]),
- }),
+ })
);
const numPositions = 8;
@@ -192,12 +253,12 @@ describe("Core/WallGeometry", function () {
expect(w.indices.length).toEqual(numTriangles * 3);
let cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 0),
+ Cartesian3.fromArray(positions, 0)
);
expect(cartographic.height).toEqualEpsilon(0.0, CesiumMath.EPSILON8);
cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 3),
+ Cartesian3.fromArray(positions, 3)
);
expect(cartographic.height).toEqualEpsilon(2000.0, CesiumMath.EPSILON8);
});
@@ -210,25 +271,25 @@ describe("Core/WallGeometry", function () {
new Cartesian3(
4347090.215457887,
1061403.4237998386,
- 4538066.036525028,
+ 4538066.036525028
),
new Cartesian3(
4348147.589624987,
1043897.8776143644,
- 4541092.234751661,
+ 4541092.234751661
),
new Cartesian3(
4348147.589882754,
1043897.8776762491,
- 4541092.234492364,
+ 4541092.234492364
),
new Cartesian3(
4335659.882947743,
1047571.602084736,
- 4552098.654605664,
+ 4552098.654605664
),
],
- }),
+ })
);
const numPositions = 8;
@@ -258,7 +319,7 @@ describe("Core/WallGeometry", function () {
new WallGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: inputPositions,
- }),
+ })
);
expect(w).toBeDefined();
@@ -274,11 +335,11 @@ describe("Core/WallGeometry", function () {
new WallGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: expectedPositions,
- }),
+ })
);
const positions = w.attributes.position.values;
expect(positions.length).toEqual(
- expectedW.attributes.position.values.length,
+ expectedW.attributes.position.values.length
);
});
@@ -287,10 +348,23 @@ describe("Core/WallGeometry", function () {
new WallGeometry({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArrayHeights([
- 49.0, 18.0, 1000.0, 50.0, 18.0, 1000.0, 50.0, 18.0, 6000.0, 50.0,
- 18.0, 10000.0, 51.0, 18.0, 1000.0,
+ 49.0,
+ 18.0,
+ 1000.0,
+ 50.0,
+ 18.0,
+ 1000.0,
+ 50.0,
+ 18.0,
+ 6000.0,
+ 50.0,
+ 18.0,
+ 10000.0,
+ 51.0,
+ 18.0,
+ 1000.0,
]),
- }),
+ })
);
const numPositions = 8;
@@ -300,12 +374,12 @@ describe("Core/WallGeometry", function () {
expect(w.indices.length).toEqual(numTriangles * 3);
let cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 0),
+ Cartesian3.fromArray(positions, 0)
);
expect(cartographic.height).toEqualEpsilon(0.0, CesiumMath.EPSILON8);
cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 9),
+ Cartesian3.fromArray(positions, 9)
);
expect(cartographic.height).toEqualEpsilon(10000.0, CesiumMath.EPSILON8);
});
@@ -315,9 +389,17 @@ describe("Core/WallGeometry", function () {
new WallGeometry({
vertexFormat: VertexFormat.ALL,
positions: Cartesian3.fromDegreesArrayHeights([
- 49.0, 18.0, 1000.0, 50.0, 18.0, 1000.0, 51.0, 18.0, 1000.0,
+ 49.0,
+ 18.0,
+ 1000.0,
+ 50.0,
+ 18.0,
+ 1000.0,
+ 51.0,
+ 18.0,
+ 1000.0,
]),
- }),
+ })
);
const numPositions = 8;
@@ -335,14 +417,36 @@ describe("Core/WallGeometry", function () {
new WallGeometry({
vertexFormat: VertexFormat.ALL,
positions: Cartesian3.fromDegreesArrayHeights([
- 49.0, 18.0, 1000.0, 50.0, 18.0, 1000.0, 51.0, 18.0, 1000.0,
+ 49.0,
+ 18.0,
+ 1000.0,
+ 50.0,
+ 18.0,
+ 1000.0,
+ 51.0,
+ 18.0,
+ 1000.0,
]),
- }),
+ })
);
expect(w.attributes.st.values.length).toEqual(4 * 2 * 2);
expect(w.attributes.st.values).toEqual([
- 0.0, 0.0, 0.0, 1.0, 0.5, 0.0, 0.5, 1.0, 0.5, 0.0, 0.5, 1.0, 1.0, 0.0, 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.5,
+ 0.0,
+ 0.5,
+ 1.0,
+ 0.5,
+ 0.0,
+ 0.5,
+ 1.0,
+ 1.0,
+ 0.0,
+ 1.0,
1.0,
]);
});
@@ -352,15 +456,39 @@ describe("Core/WallGeometry", function () {
new WallGeometry({
vertexFormat: VertexFormat.ALL,
positions: Cartesian3.fromDegreesArrayHeights([
- 49.0, 18.0, 1000.0, 50.0, 18.0, 1000.0, 50.0, 18.0, 1000.0, 51.0,
- 18.0, 1000.0,
+ 49.0,
+ 18.0,
+ 1000.0,
+ 50.0,
+ 18.0,
+ 1000.0,
+ 50.0,
+ 18.0,
+ 1000.0,
+ 51.0,
+ 18.0,
+ 1000.0,
]),
- }),
+ })
);
expect(w.attributes.st.values.length).toEqual(4 * 2 * 2);
expect(w.attributes.st.values).toEqual([
- 0.0, 0.0, 0.0, 1.0, 0.5, 0.0, 0.5, 1.0, 0.5, 0.0, 0.5, 1.0, 1.0, 0.0, 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.5,
+ 0.0,
+ 0.5,
+ 1.0,
+ 0.5,
+ 0.0,
+ 0.5,
+ 1.0,
+ 1.0,
+ 0.0,
+ 1.0,
1.0,
]);
});
@@ -379,11 +507,16 @@ describe("Core/WallGeometry", function () {
WallGeometry.fromConstantHeights({
vertexFormat: VertexFormat.POSITION_ONLY,
positions: Cartesian3.fromDegreesArrayHeights([
- 49.0, 18.0, 1000.0, 50.0, 18.0, 1000.0,
+ 49.0,
+ 18.0,
+ 1000.0,
+ 50.0,
+ 18.0,
+ 1000.0,
]),
minimumHeight: min,
maximumHeight: max,
- }),
+ })
);
const numPositions = 4;
@@ -393,22 +526,22 @@ describe("Core/WallGeometry", function () {
expect(w.indices.length).toEqual(numTriangles * 3);
let cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 0),
+ Cartesian3.fromArray(positions, 0)
);
expect(cartographic.height).toEqualEpsilon(min, CesiumMath.EPSILON8);
cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 3),
+ Cartesian3.fromArray(positions, 3)
);
expect(cartographic.height).toEqualEpsilon(max, CesiumMath.EPSILON8);
cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 6),
+ Cartesian3.fromArray(positions, 6)
);
expect(cartographic.height).toEqualEpsilon(min, CesiumMath.EPSILON8);
cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 9),
+ Cartesian3.fromArray(positions, 9)
);
expect(cartographic.height).toEqualEpsilon(max, CesiumMath.EPSILON8);
});
@@ -425,8 +558,28 @@ describe("Core/WallGeometry", function () {
ellipsoid: Ellipsoid.UNIT_SPHERE,
});
const packedInstance = [
- 3.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 1.0,
- 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.01,
+ 3.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.01,
];
createPackableSpecs(WallGeometry, wall, packedInstance);
});
diff --git a/packages/engine/Specs/Core/WallOutlineGeometrySpec.js b/packages/engine/Specs/Core/WallOutlineGeometrySpec.js
index 7b4777cd3a29..42435f0eb47c 100644
--- a/packages/engine/Specs/Core/WallOutlineGeometrySpec.js
+++ b/packages/engine/Specs/Core/WallOutlineGeometrySpec.js
@@ -38,9 +38,17 @@ describe("Core/WallOutlineGeometry", function () {
const geometry = WallOutlineGeometry.createGeometry(
new WallOutlineGeometry({
positions: Cartesian3.fromDegreesArrayHeights([
- 49.0, 18.0, 1000.0, 49.0, 18.0, 5000.0, 49.0, 18.0, 1000.0,
+ 49.0,
+ 18.0,
+ 1000.0,
+ 49.0,
+ 18.0,
+ 5000.0,
+ 49.0,
+ 18.0,
+ 1000.0,
]),
- }),
+ })
);
expect(geometry).toBeUndefined();
});
@@ -49,19 +57,29 @@ describe("Core/WallOutlineGeometry", function () {
let geometry = WallOutlineGeometry.createGeometry(
new WallOutlineGeometry({
positions: Cartesian3.fromDegreesArray([
- 49.0, 18.0, 49.0, 18.0, 49.0, 18.0,
+ 49.0,
+ 18.0,
+ 49.0,
+ 18.0,
+ 49.0,
+ 18.0,
]),
- }),
+ })
);
expect(geometry).toBeUndefined();
geometry = WallOutlineGeometry.createGeometry(
new WallOutlineGeometry({
positions: Cartesian3.fromDegreesArray([
- 49.0, 18.0, 49.0, 18.0, 49.0, 18.0,
+ 49.0,
+ 18.0,
+ 49.0,
+ 18.0,
+ 49.0,
+ 18.0,
]),
maximumHeights: [0, 0, 0],
- }),
+ })
);
expect(geometry).toBeUndefined();
});
@@ -70,10 +88,15 @@ describe("Core/WallOutlineGeometry", function () {
const w = WallOutlineGeometry.createGeometry(
new WallOutlineGeometry({
positions: Cartesian3.fromDegreesArrayHeights([
- 49.0, 18.0, 1000.0, 50.0, 18.0, 1000.0,
+ 49.0,
+ 18.0,
+ 1000.0,
+ 50.0,
+ 18.0,
+ 1000.0,
]),
granularity: Math.PI,
- }),
+ })
);
const positions = w.attributes.position.values;
@@ -81,12 +104,12 @@ describe("Core/WallOutlineGeometry", function () {
expect(w.indices.length).toEqual(4 * 2);
let cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 0),
+ Cartesian3.fromArray(positions, 0)
);
expect(cartographic.height).toEqualEpsilon(0.0, CesiumMath.EPSILON8);
cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 3),
+ Cartesian3.fromArray(positions, 3)
);
expect(cartographic.height).toEqualEpsilon(1000.0, CesiumMath.EPSILON8);
});
@@ -95,12 +118,17 @@ describe("Core/WallOutlineGeometry", function () {
const w = WallOutlineGeometry.createGeometry(
new WallOutlineGeometry({
positions: Cartesian3.fromDegreesArrayHeights([
- 49.0, 18.0, 1000.0, 50.0, 18.0, 1000.0,
+ 49.0,
+ 18.0,
+ 1000.0,
+ 50.0,
+ 18.0,
+ 1000.0,
]),
minimumHeights: [1000.0, 2000.0],
maximumHeights: [3000.0, 4000.0],
granularity: Math.PI,
- }),
+ })
);
const positions = w.attributes.position.values;
@@ -108,22 +136,22 @@ describe("Core/WallOutlineGeometry", function () {
expect(w.indices.length).toEqual(4 * 2);
let cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 0),
+ Cartesian3.fromArray(positions, 0)
);
expect(cartographic.height).toEqualEpsilon(1000.0, CesiumMath.EPSILON8);
cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 3),
+ Cartesian3.fromArray(positions, 3)
);
expect(cartographic.height).toEqualEpsilon(3000.0, CesiumMath.EPSILON8);
cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 6),
+ Cartesian3.fromArray(positions, 6)
);
expect(cartographic.height).toEqualEpsilon(2000.0, CesiumMath.EPSILON8);
cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 9),
+ Cartesian3.fromArray(positions, 9)
);
expect(cartographic.height).toEqualEpsilon(4000.0, CesiumMath.EPSILON8);
});
@@ -132,11 +160,29 @@ describe("Core/WallOutlineGeometry", function () {
const w = WallOutlineGeometry.createGeometry(
new WallOutlineGeometry({
positions: Cartesian3.fromDegreesArrayHeights([
- 49.0, 18.0, 1000.0, 49.0, 18.0, 2000.0, 50.0, 18.0, 1000.0, 50.0,
- 18.0, 1000.0, 50.0, 18.0, 1000.0, 51.0, 18.0, 1000.0, 51.0, 18.0,
+ 49.0,
+ 18.0,
+ 1000.0,
+ 49.0,
+ 18.0,
+ 2000.0,
+ 50.0,
+ 18.0,
+ 1000.0,
+ 50.0,
+ 18.0,
+ 1000.0,
+ 50.0,
+ 18.0,
+ 1000.0,
+ 51.0,
+ 18.0,
+ 1000.0,
+ 51.0,
+ 18.0,
1000.0,
]),
- }),
+ })
);
const positions = w.attributes.position.values;
@@ -144,12 +190,12 @@ describe("Core/WallOutlineGeometry", function () {
expect(w.indices.length).toEqual(7 * 2); //3 vertical + 4 horizontal
let cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 0),
+ Cartesian3.fromArray(positions, 0)
);
expect(cartographic.height).toEqualEpsilon(0.0, CesiumMath.EPSILON8);
cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 3),
+ Cartesian3.fromArray(positions, 3)
);
expect(cartographic.height).toEqualEpsilon(2000.0, CesiumMath.EPSILON8);
});
@@ -167,11 +213,16 @@ describe("Core/WallOutlineGeometry", function () {
const w = WallOutlineGeometry.createGeometry(
WallOutlineGeometry.fromConstantHeights({
positions: Cartesian3.fromDegreesArrayHeights([
- 49.0, 18.0, 1000.0, 50.0, 18.0, 1000.0,
+ 49.0,
+ 18.0,
+ 1000.0,
+ 50.0,
+ 18.0,
+ 1000.0,
]),
minimumHeight: min,
maximumHeight: max,
- }),
+ })
);
const positions = w.attributes.position.values;
@@ -179,22 +230,22 @@ describe("Core/WallOutlineGeometry", function () {
expect(w.indices.length).toEqual(4 * 2);
let cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 0),
+ Cartesian3.fromArray(positions, 0)
);
expect(cartographic.height).toEqualEpsilon(min, CesiumMath.EPSILON8);
cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 3),
+ Cartesian3.fromArray(positions, 3)
);
expect(cartographic.height).toEqualEpsilon(max, CesiumMath.EPSILON8);
cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 6),
+ Cartesian3.fromArray(positions, 6)
);
expect(cartographic.height).toEqualEpsilon(min, CesiumMath.EPSILON8);
cartographic = ellipsoid.cartesianToCartographic(
- Cartesian3.fromArray(positions, 9),
+ Cartesian3.fromArray(positions, 9)
);
expect(cartographic.height).toEqualEpsilon(max, CesiumMath.EPSILON8);
});
@@ -210,7 +261,21 @@ describe("Core/WallOutlineGeometry", function () {
ellipsoid: Ellipsoid.UNIT_SPHERE,
});
const packedInstance = [
- 3.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 1.0,
+ 3.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 1.0,
0.01,
];
createPackableSpecs(WallOutlineGeometry, wall, packedInstance);
diff --git a/packages/engine/Specs/Core/WebMercatorProjectionSpec.js b/packages/engine/Specs/Core/WebMercatorProjectionSpec.js
index 5c0045d22f8c..e8c8d0eee172 100644
--- a/packages/engine/Specs/Core/WebMercatorProjectionSpec.js
+++ b/packages/engine/Specs/Core/WebMercatorProjectionSpec.js
@@ -24,7 +24,7 @@ describe("Core/WebMercatorProjection", function () {
const cartographic = new Cartographic(0.0, 0.0, height);
const projection = new WebMercatorProjection();
expect(projection.project(cartographic)).toEqual(
- new Cartesian3(0.0, 0.0, height),
+ new Cartesian3(0.0, 0.0, height)
);
});
@@ -33,7 +33,7 @@ describe("Core/WebMercatorProjection", function () {
const cartographic = new Cartographic(
Math.PI,
CesiumMath.PI_OVER_FOUR,
- 0.0,
+ 0.0
);
// expected equations from Wolfram MathWorld:
@@ -42,13 +42,13 @@ describe("Core/WebMercatorProjection", function () {
ellipsoid.maximumRadius * cartographic.longitude,
ellipsoid.maximumRadius *
Math.log(Math.tan(Math.PI / 4.0 + cartographic.latitude / 2.0)),
- 0.0,
+ 0.0
);
const projection = new WebMercatorProjection(ellipsoid);
expect(projection.project(cartographic)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
});
@@ -57,7 +57,7 @@ describe("Core/WebMercatorProjection", function () {
const cartographic = new Cartographic(
-Math.PI,
CesiumMath.PI_OVER_FOUR,
- 0.0,
+ 0.0
);
// expected equations from Wolfram MathWorld:
@@ -66,13 +66,13 @@ describe("Core/WebMercatorProjection", function () {
ellipsoid.maximumRadius * cartographic.longitude,
ellipsoid.maximumRadius *
Math.log(Math.tan(Math.PI / 4.0 + cartographic.latitude / 2.0)),
- 0.0,
+ 0.0
);
const projection = new WebMercatorProjection(ellipsoid);
expect(projection.project(cartographic)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -81,7 +81,7 @@ describe("Core/WebMercatorProjection", function () {
const cartographic = new Cartographic(
Math.PI,
CesiumMath.PI_OVER_FOUR,
- 0.0,
+ 0.0
);
// expected equations from Wolfram MathWorld:
@@ -90,7 +90,7 @@ describe("Core/WebMercatorProjection", function () {
ellipsoid.maximumRadius * cartographic.longitude,
ellipsoid.maximumRadius *
Math.log(Math.tan(Math.PI / 4.0 + cartographic.latitude / 2.0)),
- 0.0,
+ 0.0
);
const projection = new WebMercatorProjection(ellipsoid);
@@ -104,13 +104,13 @@ describe("Core/WebMercatorProjection", function () {
const cartographic = new Cartographic(
CesiumMath.PI_OVER_TWO,
CesiumMath.PI_OVER_FOUR,
- 12.0,
+ 12.0
);
const projection = new WebMercatorProjection();
const projected = projection.project(cartographic);
expect(projection.unproject(projected)).toEqualEpsilon(
cartographic,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -118,7 +118,7 @@ describe("Core/WebMercatorProjection", function () {
const cartographic = new Cartographic(
CesiumMath.PI_OVER_TWO,
CesiumMath.PI_OVER_FOUR,
- 12.0,
+ 12.0
);
const projection = new WebMercatorProjection();
const projected = projection.project(cartographic);
@@ -131,39 +131,39 @@ describe("Core/WebMercatorProjection", function () {
it("unproject is correct at corners", function () {
const projection = new WebMercatorProjection();
const southwest = projection.unproject(
- new Cartesian2(-20037508.342787, -20037508.342787),
+ new Cartesian2(-20037508.342787, -20037508.342787)
);
expect(southwest.longitude).toEqualEpsilon(-Math.PI, CesiumMath.EPSILON12);
expect(southwest.latitude).toEqualEpsilon(
CesiumMath.toRadians(-85.05112878),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
const southeast = projection.unproject(
- new Cartesian2(20037508.342787, -20037508.342787),
+ new Cartesian2(20037508.342787, -20037508.342787)
);
expect(southeast.longitude).toEqualEpsilon(Math.PI, CesiumMath.EPSILON12);
expect(southeast.latitude).toEqualEpsilon(
CesiumMath.toRadians(-85.05112878),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
const northeast = projection.unproject(
- new Cartesian2(20037508.342787, 20037508.342787),
+ new Cartesian2(20037508.342787, 20037508.342787)
);
expect(northeast.longitude).toEqualEpsilon(Math.PI, CesiumMath.EPSILON12);
expect(northeast.latitude).toEqualEpsilon(
CesiumMath.toRadians(85.05112878),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
const northwest = projection.unproject(
- new Cartesian2(-20037508.342787, 20037508.342787),
+ new Cartesian2(-20037508.342787, 20037508.342787)
);
expect(northwest.longitude).toEqualEpsilon(-Math.PI, CesiumMath.EPSILON12);
expect(northwest.latitude).toEqualEpsilon(
CesiumMath.toRadians(85.05112878),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
});
@@ -173,25 +173,25 @@ describe("Core/WebMercatorProjection", function () {
const projection = new WebMercatorProjection();
const southwest = projection.project(
- new Cartographic(-Math.PI, -maxLatitude),
+ new Cartographic(-Math.PI, -maxLatitude)
);
expect(southwest.x).toEqualEpsilon(-20037508.342787, CesiumMath.EPSILON3);
expect(southwest.y).toEqualEpsilon(-20037508.342787, CesiumMath.EPSILON3);
const southeast = projection.project(
- new Cartographic(Math.PI, -maxLatitude),
+ new Cartographic(Math.PI, -maxLatitude)
);
expect(southeast.x).toEqualEpsilon(20037508.342787, CesiumMath.EPSILON3);
expect(southeast.y).toEqualEpsilon(-20037508.342787, CesiumMath.EPSILON3);
const northeast = projection.project(
- new Cartographic(Math.PI, maxLatitude),
+ new Cartographic(Math.PI, maxLatitude)
);
expect(northeast.x).toEqualEpsilon(20037508.342787, CesiumMath.EPSILON3);
expect(northeast.y).toEqualEpsilon(20037508.342787, CesiumMath.EPSILON3);
const northwest = projection.project(
- new Cartographic(-Math.PI, maxLatitude),
+ new Cartographic(-Math.PI, maxLatitude)
);
expect(northwest.x).toEqualEpsilon(-20037508.342787, CesiumMath.EPSILON3);
expect(northwest.y).toEqualEpsilon(20037508.342787, CesiumMath.EPSILON3);
@@ -200,18 +200,18 @@ describe("Core/WebMercatorProjection", function () {
it("projected y is clamped to valid latitude range.", function () {
const projection = new WebMercatorProjection();
const southPole = projection.project(
- new Cartographic(0.0, -CesiumMath.PI_OVER_TWO),
+ new Cartographic(0.0, -CesiumMath.PI_OVER_TWO)
);
const southLimit = projection.project(
- new Cartographic(0.0, -WebMercatorProjection.MaximumLatitude),
+ new Cartographic(0.0, -WebMercatorProjection.MaximumLatitude)
);
expect(southPole.y).toEqual(southLimit.y);
const northPole = projection.project(
- new Cartographic(0.0, CesiumMath.PI_OVER_TWO),
+ new Cartographic(0.0, CesiumMath.PI_OVER_TWO)
);
const northLimit = projection.project(
- new Cartographic(0.0, WebMercatorProjection.MaximumLatitude),
+ new Cartographic(0.0, WebMercatorProjection.MaximumLatitude)
);
expect(northPole.y).toEqual(northLimit.y);
});
diff --git a/packages/engine/Specs/Core/WebMercatorTilingSchemeSpec.js b/packages/engine/Specs/Core/WebMercatorTilingSchemeSpec.js
index 985be4a81ce8..8c1b325fbeac 100644
--- a/packages/engine/Specs/Core/WebMercatorTilingSchemeSpec.js
+++ b/packages/engine/Specs/Core/WebMercatorTilingSchemeSpec.js
@@ -37,19 +37,19 @@ describe("Core/WebMercatorTilingScheme", function () {
const tilingSchemeRectangle = tilingScheme.rectangle;
expect(rectangle.west).toEqualEpsilon(
tilingSchemeRectangle.west,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(rectangle.south).toEqualEpsilon(
tilingSchemeRectangle.south,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(rectangle.east).toEqualEpsilon(
tilingSchemeRectangle.east,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(rectangle.north).toEqualEpsilon(
tilingSchemeRectangle.north,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -60,19 +60,19 @@ describe("Core/WebMercatorTilingScheme", function () {
expect(result).toEqual(rectangle);
expect(rectangle.west).toEqualEpsilon(
tilingSchemeRectangle.west,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(rectangle.south).toEqualEpsilon(
tilingSchemeRectangle.south,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(rectangle.east).toEqualEpsilon(
tilingSchemeRectangle.east,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(rectangle.north).toEqualEpsilon(
tilingSchemeRectangle.north,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -111,20 +111,20 @@ describe("Core/WebMercatorTilingScheme", function () {
expect(northeast.south).toEqualEpsilon(
southeast.north,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(northwest.south).toEqualEpsilon(
southwest.north,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(northeast.west).toEqualEpsilon(
northwest.east,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(southeast.west).toEqualEpsilon(
southwest.east,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
});
@@ -136,28 +136,28 @@ describe("Core/WebMercatorTilingScheme", function () {
coordinates = tilingScheme.positionToTileXY(
Rectangle.southwest(tilingSchemeRectangle),
- 0,
+ 0
);
expect(coordinates.x).toEqual(0);
expect(coordinates.y).toEqual(0);
coordinates = tilingScheme.positionToTileXY(
Rectangle.northwest(tilingSchemeRectangle),
- 0,
+ 0
);
expect(coordinates.x).toEqual(0);
expect(coordinates.y).toEqual(0);
coordinates = tilingScheme.positionToTileXY(
Rectangle.northeast(tilingSchemeRectangle),
- 0,
+ 0
);
expect(coordinates.x).toEqual(0);
expect(coordinates.y).toEqual(0);
coordinates = tilingScheme.positionToTileXY(
Rectangle.southeast(tilingSchemeRectangle),
- 0,
+ 0
);
expect(coordinates.x).toEqual(0);
expect(coordinates.y).toEqual(0);
@@ -169,28 +169,28 @@ describe("Core/WebMercatorTilingScheme", function () {
coordinates = tilingScheme.positionToTileXY(
Rectangle.southwest(tilingSchemeRectangle),
- 1,
+ 1
);
expect(coordinates.x).toEqual(0);
expect(coordinates.y).toEqual(1);
coordinates = tilingScheme.positionToTileXY(
Rectangle.northwest(tilingSchemeRectangle),
- 1,
+ 1
);
expect(coordinates.x).toEqual(0);
expect(coordinates.y).toEqual(0);
coordinates = tilingScheme.positionToTileXY(
Rectangle.northeast(tilingSchemeRectangle),
- 1,
+ 1
);
expect(coordinates.x).toEqual(1);
expect(coordinates.y).toEqual(0);
coordinates = tilingScheme.positionToTileXY(
Rectangle.southeast(tilingSchemeRectangle),
- 1,
+ 1
);
expect(coordinates.x).toEqual(1);
expect(coordinates.y).toEqual(1);
@@ -199,7 +199,7 @@ describe("Core/WebMercatorTilingScheme", function () {
it("calculates correct tile indices for the center at level 1", function () {
const coordinates = tilingScheme.positionToTileXY(
new Cartographic(0, 0),
- 1,
+ 1
);
expect(coordinates.x).toEqual(1);
expect(coordinates.y).toEqual(1);
@@ -208,7 +208,7 @@ describe("Core/WebMercatorTilingScheme", function () {
it("calculates correct tile indices for the center at level 2", function () {
const coordinates = tilingScheme.positionToTileXY(
new Cartographic(0, 0),
- 2,
+ 2
);
expect(coordinates.x).toEqual(2);
expect(coordinates.y).toEqual(2);
@@ -219,28 +219,28 @@ describe("Core/WebMercatorTilingScheme", function () {
coordinates = tilingScheme.positionToTileXY(
new Cartographic(-0.05, -0.05),
- 2,
+ 2
);
expect(coordinates.x).toEqual(1);
expect(coordinates.y).toEqual(2);
coordinates = tilingScheme.positionToTileXY(
new Cartographic(-0.05, 0.05),
- 2,
+ 2
);
expect(coordinates.x).toEqual(1);
expect(coordinates.y).toEqual(1);
coordinates = tilingScheme.positionToTileXY(
new Cartographic(0.05, 0.05),
- 2,
+ 2
);
expect(coordinates.x).toEqual(2);
expect(coordinates.y).toEqual(1);
coordinates = tilingScheme.positionToTileXY(
new Cartographic(0.05, -0.05),
- 2,
+ 2
);
expect(coordinates.x).toEqual(2);
expect(coordinates.y).toEqual(2);
@@ -256,32 +256,33 @@ describe("Core/WebMercatorTilingScheme", function () {
it("converts radians to web mercator meters", function () {
const tilingScheme = new WebMercatorTilingScheme();
const rectangleInRadians = new Rectangle(0.1, 0.2, 0.3, 0.4);
- const nativeRectangle =
- tilingScheme.rectangleToNativeRectangle(rectangleInRadians);
+ const nativeRectangle = tilingScheme.rectangleToNativeRectangle(
+ rectangleInRadians
+ );
const projection = new WebMercatorProjection();
const expectedSouthwest = projection.project(
- Rectangle.southwest(rectangleInRadians),
+ Rectangle.southwest(rectangleInRadians)
);
const expectedNortheast = projection.project(
- Rectangle.northeast(rectangleInRadians),
+ Rectangle.northeast(rectangleInRadians)
);
expect(nativeRectangle.west).toEqualEpsilon(
expectedSouthwest.x,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
expect(nativeRectangle.south).toEqualEpsilon(
expectedSouthwest.y,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
expect(nativeRectangle.east).toEqualEpsilon(
expectedNortheast.x,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
expect(nativeRectangle.north).toEqualEpsilon(
expectedNortheast.y,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
});
@@ -291,34 +292,34 @@ describe("Core/WebMercatorTilingScheme", function () {
const projection = new WebMercatorProjection();
const expectedSouthwest = projection.project(
- Rectangle.southwest(rectangleInRadians),
+ Rectangle.southwest(rectangleInRadians)
);
const expectedNortheast = projection.project(
- Rectangle.northeast(rectangleInRadians),
+ Rectangle.northeast(rectangleInRadians)
);
const resultRectangle = new Rectangle(0.0, 0.0, 0.0, 0.0);
const outputRectangle = tilingScheme.rectangleToNativeRectangle(
rectangleInRadians,
- resultRectangle,
+ resultRectangle
);
expect(outputRectangle).toEqual(resultRectangle);
expect(resultRectangle.west).toEqualEpsilon(
expectedSouthwest.x,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
expect(resultRectangle.south).toEqualEpsilon(
expectedSouthwest.y,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
expect(resultRectangle.east).toEqualEpsilon(
expectedNortheast.x,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
expect(resultRectangle.north).toEqualEpsilon(
expectedNortheast.y,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
});
});
@@ -329,10 +330,10 @@ describe("Core/WebMercatorTilingScheme", function () {
const rectangleInRadians = new Rectangle(0.1, 0.2, 0.3, 0.4);
const tilingScheme = new WebMercatorTilingScheme({
rectangleSouthwestInMeters: projection.project(
- Rectangle.southwest(rectangleInRadians),
+ Rectangle.southwest(rectangleInRadians)
),
rectangleNortheastInMeters: projection.project(
- Rectangle.northeast(rectangleInRadians),
+ Rectangle.northeast(rectangleInRadians)
),
});
@@ -351,18 +352,18 @@ describe("Core/WebMercatorTilingScheme", function () {
const centerOfSouthwesternChild = new Cartographic(
-Math.PI / 2.0,
- -Math.PI / 4.0,
+ -Math.PI / 4.0
);
expect(
- tilingScheme.positionToTileXY(centerOfSouthwesternChild, 1),
+ tilingScheme.positionToTileXY(centerOfSouthwesternChild, 1)
).toEqual(new Cartesian2(0, 1));
const centerOfNortheasternChild = new Cartographic(
Math.PI / 2.0,
- Math.PI / 4.0,
+ Math.PI / 4.0
);
expect(
- tilingScheme.positionToTileXY(centerOfNortheasternChild, 1),
+ tilingScheme.positionToTileXY(centerOfNortheasternChild, 1)
).toEqual(new Cartesian2(1, 0));
});
@@ -371,7 +372,7 @@ describe("Core/WebMercatorTilingScheme", function () {
const centerOfMap = new Cartographic(0.0, 0.0);
expect(tilingScheme.positionToTileXY(centerOfMap, 1)).toEqual(
- new Cartesian2(1, 1),
+ new Cartesian2(1, 1)
);
});
@@ -380,7 +381,7 @@ describe("Core/WebMercatorTilingScheme", function () {
const southeastCorner = Rectangle.southeast(tilingScheme.rectangle);
expect(tilingScheme.positionToTileXY(southeastCorner, 1)).toEqual(
- new Cartesian2(1, 1),
+ new Cartesian2(1, 1)
);
});
@@ -389,13 +390,13 @@ describe("Core/WebMercatorTilingScheme", function () {
const centerOfNortheasternChild = new Cartographic(
Math.PI / 2.0,
- Math.PI / 4.0,
+ Math.PI / 4.0
);
const resultParameter = new Cartesian2(0, 0);
const returnedResult = tilingScheme.positionToTileXY(
centerOfNortheasternChild,
1,
- resultParameter,
+ resultParameter
);
expect(resultParameter).toEqual(returnedResult);
expect(resultParameter).toEqual(new Cartesian2(1, 0));
diff --git a/packages/engine/Specs/Core/WireframeIndexGeneratorSpec.js b/packages/engine/Specs/Core/WireframeIndexGeneratorSpec.js
index ade29ffccce7..1ece2697105e 100644
--- a/packages/engine/Specs/Core/WireframeIndexGeneratorSpec.js
+++ b/packages/engine/Specs/Core/WireframeIndexGeneratorSpec.js
@@ -62,7 +62,7 @@ describe("Core/WireframeIndexGenerator", function () {
const result = createWireframeIndices(
PrimitiveType.TRIANGLE_STRIP,
6,
- indices,
+ indices
);
expect(result).toEqual(expected);
});
@@ -91,7 +91,7 @@ describe("Core/WireframeIndexGenerator", function () {
const result = createWireframeIndices(
PrimitiveType.TRIANGLE_FAN,
6,
- indices,
+ indices
);
expect(result).toEqual(expected);
});
@@ -115,19 +115,19 @@ describe("Core/WireframeIndexGenerator", function () {
const originalCount = 6;
let result = getWireframeIndicesCount(
PrimitiveType.TRIANGLES,
- originalCount,
+ originalCount
);
expect(result).toEqual(12);
result = getWireframeIndicesCount(
PrimitiveType.TRIANGLE_STRIP,
- originalCount,
+ originalCount
);
expect(result).toEqual(18);
result = getWireframeIndicesCount(
PrimitiveType.TRIANGLE_FAN,
- originalCount,
+ originalCount
);
expect(result).toEqual(18);
});
diff --git a/packages/engine/Specs/Core/appendForwardSlashSpec.js b/packages/engine/Specs/Core/appendForwardSlashSpec.js
index 2c6d52337fde..c60d227362c3 100644
--- a/packages/engine/Specs/Core/appendForwardSlashSpec.js
+++ b/packages/engine/Specs/Core/appendForwardSlashSpec.js
@@ -3,13 +3,13 @@ import { appendForwardSlash } from "../../index.js";
describe("Core/appendForwardSlash", function () {
it("Appends to a url", function () {
expect(appendForwardSlash("http://cesiumjs.org")).toEqual(
- "http://cesiumjs.org/",
+ "http://cesiumjs.org/"
);
});
it("Does not append to a url", function () {
expect(appendForwardSlash("http://cesiumjs.org/")).toEqual(
- "http://cesiumjs.org/",
+ "http://cesiumjs.org/"
);
});
diff --git a/packages/engine/Specs/Core/arrayRemoveDuplicatesSpec.js b/packages/engine/Specs/Core/arrayRemoveDuplicatesSpec.js
index 8cb95a15b3a4..fa7bd7714a78 100644
--- a/packages/engine/Specs/Core/arrayRemoveDuplicatesSpec.js
+++ b/packages/engine/Specs/Core/arrayRemoveDuplicatesSpec.js
@@ -10,7 +10,7 @@ describe("Core/arrayRemoveDuplicates", function () {
const positions = [Cartesian3.ZERO];
const noDuplicates = arrayRemoveDuplicates(
positions,
- Cartesian3.equalsEpsilon,
+ Cartesian3.equalsEpsilon
);
expect(noDuplicates).toBe(positions);
});
@@ -24,7 +24,7 @@ describe("Core/arrayRemoveDuplicates", function () {
];
const noDuplicates = arrayRemoveDuplicates(
positions,
- Cartesian3.equalsEpsilon,
+ Cartesian3.equalsEpsilon
);
expect(noDuplicates).toBe(positions);
});
@@ -39,7 +39,7 @@ describe("Core/arrayRemoveDuplicates", function () {
const noDuplicates = arrayRemoveDuplicates(
positions,
Cartesian3.equalsEpsilon,
- true,
+ true
);
expect(noDuplicates).toBe(positions);
});
@@ -61,7 +61,7 @@ describe("Core/arrayRemoveDuplicates", function () {
];
const noDuplicates = arrayRemoveDuplicates(
positions,
- Cartesian3.equalsEpsilon,
+ Cartesian3.equalsEpsilon
);
expect(noDuplicates).toEqual(expectedPositions);
});
@@ -85,7 +85,7 @@ describe("Core/arrayRemoveDuplicates", function () {
];
const noDuplicates = arrayRemoveDuplicates(
positions,
- Cartesian3.equalsEpsilon,
+ Cartesian3.equalsEpsilon
);
expect(noDuplicates).toEqual(expectedPositions);
});
@@ -107,7 +107,7 @@ describe("Core/arrayRemoveDuplicates", function () {
];
const noDuplicates = arrayRemoveDuplicates(
positions,
- Cartesian3.equalsEpsilon,
+ Cartesian3.equalsEpsilon
);
expect(noDuplicates).toEqual(expectedPositions);
});
@@ -130,7 +130,7 @@ describe("Core/arrayRemoveDuplicates", function () {
];
const noDuplicates = arrayRemoveDuplicates(
positions,
- Spherical.equalsEpsilon,
+ Spherical.equalsEpsilon
);
expect(noDuplicates).toEqual(expectedPositions);
});
@@ -139,7 +139,7 @@ describe("Core/arrayRemoveDuplicates", function () {
const positions = [];
const noDuplicates = arrayRemoveDuplicates(
positions,
- Cartesian3.equalsEpsilon,
+ Cartesian3.equalsEpsilon
);
expect(noDuplicates).toEqual(positions);
});
@@ -156,7 +156,7 @@ describe("Core/arrayRemoveDuplicates", function () {
];
const noDuplicates = arrayRemoveDuplicates(
positions,
- Cartesian3.equalsEpsilon,
+ Cartesian3.equalsEpsilon
);
expect(noDuplicates).toEqual(expectedPositions);
});
@@ -173,7 +173,7 @@ describe("Core/arrayRemoveDuplicates", function () {
];
const noDuplicates = arrayRemoveDuplicates(
positions,
- Cartesian3.equalsEpsilon,
+ Cartesian3.equalsEpsilon
);
expect(noDuplicates).toEqual(expectedPositions);
});
@@ -192,7 +192,7 @@ describe("Core/arrayRemoveDuplicates", function () {
];
const noDuplicates = arrayRemoveDuplicates(
positions,
- Cartesian3.equalsEpsilon,
+ Cartesian3.equalsEpsilon
);
expect(noDuplicates).toEqual(expectedPositions);
});
@@ -200,7 +200,7 @@ describe("Core/arrayRemoveDuplicates", function () {
it("removeDuplicates returns undefined", function () {
const noDuplicates = arrayRemoveDuplicates(
undefined,
- Cartesian3.equalsEpsilon,
+ Cartesian3.equalsEpsilon
);
expect(noDuplicates).toBe(undefined);
});
@@ -214,7 +214,7 @@ describe("Core/arrayRemoveDuplicates", function () {
];
const noDuplicates = arrayRemoveDuplicates(
positions,
- Cartesian3.equalsEpsilon,
+ Cartesian3.equalsEpsilon
);
expect(noDuplicates).toBe(positions);
@@ -237,7 +237,7 @@ describe("Core/arrayRemoveDuplicates", function () {
const noDuplicates = arrayRemoveDuplicates(
positions,
Cartesian3.equalsEpsilon,
- true,
+ true
);
expect(noDuplicates).toEqual(expectedPositions);
@@ -263,7 +263,7 @@ describe("Core/arrayRemoveDuplicates", function () {
const noDuplicates = arrayRemoveDuplicates(
positions,
Cartesian3.equalsEpsilon,
- true,
+ true
);
expect(noDuplicates).toEqual(expectedPositions);
@@ -291,7 +291,7 @@ describe("Core/arrayRemoveDuplicates", function () {
const noDuplicates = arrayRemoveDuplicates(
positions,
Cartesian3.equalsEpsilon,
- true,
+ true
);
expect(noDuplicates).toEqual(expectedPositions);
@@ -316,7 +316,7 @@ describe("Core/arrayRemoveDuplicates", function () {
const noDuplicates = arrayRemoveDuplicates(
positions,
Cartesian3.equalsEpsilon,
- true,
+ true
);
expect(noDuplicates).toEqual(expectedPositions);
@@ -331,7 +331,7 @@ describe("Core/arrayRemoveDuplicates", function () {
positions,
Cartesian3.equalsEpsilon,
false,
- removedIndices,
+ removedIndices
);
expect(noDuplicates).toBe(positions);
@@ -352,7 +352,7 @@ describe("Core/arrayRemoveDuplicates", function () {
positions,
Cartesian3.equalsEpsilon,
false,
- removedIndices,
+ removedIndices
);
expect(noDuplicates).toBe(positions);
@@ -382,7 +382,7 @@ describe("Core/arrayRemoveDuplicates", function () {
positions,
Cartesian3.equalsEpsilon,
false,
- removedIndices,
+ removedIndices
);
expect(noDuplicates).toEqual(expectedPositions);
@@ -403,7 +403,7 @@ describe("Core/arrayRemoveDuplicates", function () {
positions,
Cartesian3.equalsEpsilon,
false,
- removedIndices,
+ removedIndices
);
expect(noDuplicates).toBe(positions);
@@ -432,7 +432,7 @@ describe("Core/arrayRemoveDuplicates", function () {
positions,
Cartesian3.equalsEpsilon,
true,
- removedIndices,
+ removedIndices
);
expect(noDuplicates).toEqual(expectedPositions);
@@ -463,7 +463,7 @@ describe("Core/arrayRemoveDuplicates", function () {
positions,
Cartesian3.equalsEpsilon,
true,
- removedIndices,
+ removedIndices
);
expect(noDuplicates).toEqual(expectedPositions);
@@ -494,7 +494,7 @@ describe("Core/arrayRemoveDuplicates", function () {
positions,
Cartesian3.equalsEpsilon,
true,
- removedIndices,
+ removedIndices
);
expect(noDuplicates).toEqual(expectedPositions);
@@ -530,7 +530,7 @@ describe("Core/arrayRemoveDuplicates", function () {
positions,
Cartesian3.equalsEpsilon,
true,
- removedIndices,
+ removedIndices
);
expect(noDuplicates).toEqual(expectedPositions);
diff --git a/packages/engine/Specs/Core/barycentricCoordinatesSpec.js b/packages/engine/Specs/Core/barycentricCoordinatesSpec.js
index 767af70e54b7..3b8f81d46388 100644
--- a/packages/engine/Specs/Core/barycentricCoordinatesSpec.js
+++ b/packages/engine/Specs/Core/barycentricCoordinatesSpec.js
@@ -12,21 +12,21 @@ describe("Core/barycentricCoordinates", function () {
it("evaluates to p0", function () {
const point = Cartesian3.clone(p0);
expect(barycentricCoordinates(point, p0, p1, p2)).toEqual(
- Cartesian3.UNIT_X,
+ Cartesian3.UNIT_X
);
});
it("evaluates to p1", function () {
const point = Cartesian3.clone(p1);
expect(barycentricCoordinates(point, p0, p1, p2)).toEqual(
- Cartesian3.UNIT_Y,
+ Cartesian3.UNIT_Y
);
});
it("evaluates to p2", function () {
const point = Cartesian3.clone(p2);
expect(barycentricCoordinates(point, p0, p1, p2)).toEqual(
- Cartesian3.UNIT_Z,
+ Cartesian3.UNIT_Z
);
});
@@ -34,10 +34,10 @@ describe("Core/barycentricCoordinates", function () {
const point = Cartesian3.multiplyByScalar(
Cartesian3.add(p1, p0, new Cartesian3()),
0.5,
- new Cartesian3(),
+ new Cartesian3()
);
expect(barycentricCoordinates(point, p0, p1, p2)).toEqual(
- new Cartesian3(0.5, 0.5, 0.0),
+ new Cartesian3(0.5, 0.5, 0.0)
);
});
@@ -45,10 +45,10 @@ describe("Core/barycentricCoordinates", function () {
const point = Cartesian3.multiplyByScalar(
Cartesian3.add(p2, p0, new Cartesian3()),
0.5,
- new Cartesian3(),
+ new Cartesian3()
);
expect(barycentricCoordinates(point, p0, p1, p2)).toEqual(
- new Cartesian3(0.5, 0.0, 0.5),
+ new Cartesian3(0.5, 0.0, 0.5)
);
});
@@ -56,10 +56,10 @@ describe("Core/barycentricCoordinates", function () {
const point = Cartesian3.multiplyByScalar(
Cartesian3.add(p2, p1, new Cartesian3()),
0.5,
- new Cartesian3(),
+ new Cartesian3()
);
expect(barycentricCoordinates(point, p0, p1, p2)).toEqual(
- new Cartesian3(0.0, 0.5, 0.5),
+ new Cartesian3(0.0, 0.5, 0.5)
);
});
@@ -69,14 +69,14 @@ describe("Core/barycentricCoordinates", function () {
Cartesian3.add(
Cartesian3.add(p0, p1, new Cartesian3()),
p2,
- new Cartesian3(),
+ new Cartesian3()
),
scalar,
- new Cartesian3(),
+ new Cartesian3()
);
expect(barycentricCoordinates(point, p0, p1, p2)).toEqualEpsilon(
new Cartesian3(scalar, scalar, scalar),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -93,17 +93,17 @@ describe("Core/barycentricCoordinates", function () {
const p0 = new Cartesian3(
9635312487071484,
13827945400273020,
- -16479219993905144,
+ -16479219993905144
);
const p1 = new Cartesian3(
12832234.180639317,
-10455085.701705107,
- 750010.7274386138,
+ 750010.7274386138
);
const p2 = new Cartesian3(
-9689011.10628853,
-13420063.892507521,
- 750010.7274386119,
+ 750010.7274386119
);
expect(barycentricCoordinates(p0, p0, p1, p2)).toEqual(Cartesian3.UNIT_X);
expect(barycentricCoordinates(p1, p0, p1, p2)).toEqual(Cartesian3.UNIT_Y);
@@ -133,7 +133,7 @@ describe("Core/barycentricCoordinates", function () {
barycentricCoordinates(
new Cartesian3(),
new Cartesian3(),
- new Cartesian3(),
+ new Cartesian3()
);
}).toThrowDeveloperError();
});
diff --git a/packages/engine/Specs/Core/buildModuleUrlSpec.js b/packages/engine/Specs/Core/buildModuleUrlSpec.js
index 7013370154a2..c2ab34ca0b24 100644
--- a/packages/engine/Specs/Core/buildModuleUrlSpec.js
+++ b/packages/engine/Specs/Core/buildModuleUrlSpec.js
@@ -22,10 +22,10 @@ describe("Core/buildModuleUrl", function () {
expect(r.exec("assets/foo/Cesium.js")[1]).toEqual("assets/foo/");
expect(r.exec("assets/foo/Cesium.js?v=1.7")[1]).toEqual("assets/foo/");
expect(
- r.exec("http://example.invalid/Cesium/assets/foo/Cesium.js")[1],
+ r.exec("http://example.invalid/Cesium/assets/foo/Cesium.js")[1]
).toEqual("http://example.invalid/Cesium/assets/foo/");
expect(
- r.exec("http://example.invalid/Cesium/assets/foo/Cesium.js?v=1.7")[1],
+ r.exec("http://example.invalid/Cesium/assets/foo/Cesium.js?v=1.7")[1]
).toEqual("http://example.invalid/Cesium/assets/foo/");
expect(r.exec("cesium.js")).toBeNull();
diff --git a/packages/engine/Specs/Core/createGuidSpec.js b/packages/engine/Specs/Core/createGuidSpec.js
index 9339e3b28102..3d5d6dd994b4 100644
--- a/packages/engine/Specs/Core/createGuidSpec.js
+++ b/packages/engine/Specs/Core/createGuidSpec.js
@@ -2,8 +2,7 @@ import { createGuid } from "../../index.js";
describe("Core/createGuid", function () {
it("creates GUIDs", function () {
- const isGuidRegex =
- /^(\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1}$/;
+ const isGuidRegex = /^(\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1}$/;
//Create three GUIDs
const guid1 = createGuid();
diff --git a/packages/engine/Specs/Core/getAbsoluteUriSpec.js b/packages/engine/Specs/Core/getAbsoluteUriSpec.js
index 0cfb50541ada..9d4b1d11b575 100644
--- a/packages/engine/Specs/Core/getAbsoluteUriSpec.js
+++ b/packages/engine/Specs/Core/getAbsoluteUriSpec.js
@@ -3,7 +3,7 @@ import { getAbsoluteUri, getBaseUri } from "../../index.js";
describe("Core/getAbsoluteUri", function () {
it("works as expected", function () {
let result = getAbsoluteUri(
- "http://www.mysite.com/awesome?makeitawesome=true",
+ "http://www.mysite.com/awesome?makeitawesome=true"
);
expect(result).toEqual("http://www.mysite.com/awesome?makeitawesome=true");
@@ -23,7 +23,7 @@ describe("Core/getAbsoluteUri", function () {
const result = getAbsoluteUri._implementation(
"awesome.png",
undefined,
- fakeDocument,
+ fakeDocument
);
expect(result).toEqual("http://test.com/awesome.png");
});
diff --git a/packages/engine/Specs/Core/getBaseUriSpec.js b/packages/engine/Specs/Core/getBaseUriSpec.js
index 13c095001d77..909941e6dd8c 100644
--- a/packages/engine/Specs/Core/getBaseUriSpec.js
+++ b/packages/engine/Specs/Core/getBaseUriSpec.js
@@ -6,7 +6,7 @@ describe("Core/getBaseUri", function () {
expect(result).toEqual("http://www.mysite.com/");
result = getBaseUri(
- "http://www.mysite.com/somefolder/awesome.png#makeitawesome",
+ "http://www.mysite.com/somefolder/awesome.png#makeitawesome"
);
expect(result).toEqual("http://www.mysite.com/somefolder/");
});
@@ -14,13 +14,13 @@ describe("Core/getBaseUri", function () {
it("works with includeQuery flag", function () {
let result = getBaseUri(
"http://www.mysite.com/awesome?makeitawesome=true",
- true,
+ true
);
expect(result).toEqual("http://www.mysite.com/?makeitawesome=true");
result = getBaseUri(
"http://www.mysite.com/somefolder/awesome.png#makeitawesome",
- true,
+ true
);
expect(result).toEqual("http://www.mysite.com/somefolder/#makeitawesome");
});
diff --git a/packages/engine/Specs/Core/getExtensionFromUriSpec.js b/packages/engine/Specs/Core/getExtensionFromUriSpec.js
index 3e19accb260b..7817f7493c79 100644
--- a/packages/engine/Specs/Core/getExtensionFromUriSpec.js
+++ b/packages/engine/Specs/Core/getExtensionFromUriSpec.js
@@ -3,12 +3,12 @@ import { getExtensionFromUri } from "../../index.js";
describe("Core/getExtensionFromUri", function () {
it("works as expected", function () {
let result = getExtensionFromUri(
- "http://www.mysite.com/awesome?makeitawesome=true",
+ "http://www.mysite.com/awesome?makeitawesome=true"
);
expect(result).toEqual("");
result = getExtensionFromUri(
- "http://www.mysite.com/somefolder/awesome.png#makeitawesome",
+ "http://www.mysite.com/somefolder/awesome.png#makeitawesome"
);
expect(result).toEqual("png");
diff --git a/packages/engine/Specs/Core/getFilenameFromUriSpec.js b/packages/engine/Specs/Core/getFilenameFromUriSpec.js
index 7c7fa482a6e6..71611a9ff752 100644
--- a/packages/engine/Specs/Core/getFilenameFromUriSpec.js
+++ b/packages/engine/Specs/Core/getFilenameFromUriSpec.js
@@ -3,12 +3,12 @@ import { getFilenameFromUri } from "../../index.js";
describe("Core/getFilenameFromUri", function () {
it("works as expected", function () {
let result = getFilenameFromUri(
- "http://www.mysite.com/awesome?makeitawesome=true",
+ "http://www.mysite.com/awesome?makeitawesome=true"
);
expect(result).toEqual("awesome");
result = getFilenameFromUri(
- "http://www.mysite.com/somefolder/awesome.png#makeitawesome",
+ "http://www.mysite.com/somefolder/awesome.png#makeitawesome"
);
expect(result).toEqual("awesome.png");
});
diff --git a/packages/engine/Specs/Core/getStringFromTypedArraySpec.js b/packages/engine/Specs/Core/getStringFromTypedArraySpec.js
index 5ea515ebd778..0c348a6665d9 100644
--- a/packages/engine/Specs/Core/getStringFromTypedArraySpec.js
+++ b/packages/engine/Specs/Core/getStringFromTypedArraySpec.js
@@ -17,7 +17,7 @@ describe("Core/getStringFromTypedArray", function () {
it("converts a typed array to string when forced to use fromCharCode", function () {
spyOn(getStringFromTypedArray, "decode").and.callFake(
- getStringFromTypedArray.decodeWithFromCharCode,
+ getStringFromTypedArray.decodeWithFromCharCode
);
verifyString();
@@ -63,7 +63,7 @@ describe("Core/getStringFromTypedArray", function () {
it("Unicode 2-byte characters work with decodeWithFromCharCode forced", function () {
spyOn(getStringFromTypedArray, "decode").and.callFake(
- getStringFromTypedArray.decodeWithFromCharCode,
+ getStringFromTypedArray.decodeWithFromCharCode
);
const arr = new Uint8Array([90, 195, 188, 114, 105, 99, 104]);
@@ -77,7 +77,7 @@ describe("Core/getStringFromTypedArray", function () {
it("Unicode 3-byte characters work with decodeWithFromCharCode forced", function () {
spyOn(getStringFromTypedArray, "decode").and.callFake(
- getStringFromTypedArray.decodeWithFromCharCode,
+ getStringFromTypedArray.decodeWithFromCharCode
);
const arr = new Uint8Array([224, 162, 160]);
@@ -91,7 +91,7 @@ describe("Core/getStringFromTypedArray", function () {
it("Unicode 4-byte characters work with decodeWithFromCharCode forced", function () {
spyOn(getStringFromTypedArray, "decode").and.callFake(
- getStringFromTypedArray.decodeWithFromCharCode,
+ getStringFromTypedArray.decodeWithFromCharCode
);
const arr = new Uint8Array([240, 144, 138, 129]);
diff --git a/packages/engine/Specs/Core/isCrossOriginUrlSpec.js b/packages/engine/Specs/Core/isCrossOriginUrlSpec.js
index 9f6fb85bb7f3..f3a238635dea 100644
--- a/packages/engine/Specs/Core/isCrossOriginUrlSpec.js
+++ b/packages/engine/Specs/Core/isCrossOriginUrlSpec.js
@@ -17,7 +17,7 @@ describe("Core/isCrossOriginUrl", function () {
it("returns true for absolute urls that are cross-origin", function () {
expect(isCrossOriginUrl("http://example.invalid/some/url.jpg")).toEqual(
- true,
+ true
);
// a different scheme counts as cross-origin
diff --git a/packages/engine/Specs/Core/loadImageFromTypedArraySpec.js b/packages/engine/Specs/Core/loadImageFromTypedArraySpec.js
index 698f6ef538ba..bc73ccd2086c 100644
--- a/packages/engine/Specs/Core/loadImageFromTypedArraySpec.js
+++ b/packages/engine/Specs/Core/loadImageFromTypedArraySpec.js
@@ -21,7 +21,7 @@ describe("Core/loadImageFromTypedArray", function () {
expect(image.width).toEqual(10);
expect(image.height).toEqual(10);
});
- },
+ }
);
});
@@ -116,7 +116,7 @@ describe("Core/loadImageFromTypedArray", function () {
}
spyOn(Resource, "supportsImageBitmapOptions").and.returnValue(
- Promise.resolve(false),
+ Promise.resolve(false)
);
spyOn(window, "createImageBitmap").and.callThrough();
return Resource.fetchArrayBuffer("./Data/Images/Blue10x10.png").then(
@@ -131,7 +131,7 @@ describe("Core/loadImageFromTypedArray", function () {
expect(image.height).toEqual(10);
expect(window.createImageBitmap).not.toHaveBeenCalled();
});
- },
+ }
);
});
diff --git a/packages/engine/Specs/Core/loadKTX2Spec.js b/packages/engine/Specs/Core/loadKTX2Spec.js
index 56d9fb783f04..e046e41f28a1 100644
--- a/packages/engine/Specs/Core/loadKTX2Spec.js
+++ b/packages/engine/Specs/Core/loadKTX2Spec.js
@@ -36,7 +36,7 @@ describe("Core/loadKTX2", function () {
supportedFormats,
width,
height,
- isCompressed,
+ isCompressed
) {
const resource = Resource.createIfNeeded(url);
const loadPromise = resource.fetchArrayBuffer();
@@ -47,7 +47,7 @@ describe("Core/loadKTX2", function () {
expect(result.width).toEqual(width);
expect(result.height).toEqual(height);
expect(PixelFormat.isCompressedFormat(result.internalFormat)).toEqual(
- isCompressed,
+ isCompressed
);
expect(result.bufferView).toBeDefined();
});
@@ -60,7 +60,7 @@ describe("Core/loadKTX2", function () {
{ etc: true },
4,
4,
- true,
+ true
);
});
@@ -70,7 +70,7 @@ describe("Core/loadKTX2", function () {
{ etc: true },
32,
32,
- true,
+ true
);
});
@@ -80,7 +80,7 @@ describe("Core/loadKTX2", function () {
{ etc1: true },
4,
4,
- true,
+ true
);
});
@@ -90,7 +90,7 @@ describe("Core/loadKTX2", function () {
{ etc1: true },
32,
32,
- true,
+ true
);
});
@@ -100,7 +100,7 @@ describe("Core/loadKTX2", function () {
{ astc: true },
4,
4,
- true,
+ true
);
});
@@ -110,7 +110,7 @@ describe("Core/loadKTX2", function () {
{ astc: true },
32,
32,
- true,
+ true
);
});
@@ -120,7 +120,7 @@ describe("Core/loadKTX2", function () {
{ pvrtc: true },
4,
4,
- true,
+ true
);
});
@@ -130,7 +130,7 @@ describe("Core/loadKTX2", function () {
{ pvrtc: true },
32,
32,
- true,
+ true
);
});
@@ -140,7 +140,7 @@ describe("Core/loadKTX2", function () {
{ s3tc: true },
4,
4,
- true,
+ true
);
});
@@ -150,7 +150,7 @@ describe("Core/loadKTX2", function () {
{ s3tc: true },
32,
32,
- true,
+ true
);
});
@@ -160,7 +160,7 @@ describe("Core/loadKTX2", function () {
{ bc7: true },
4,
4,
- true,
+ true
);
});
@@ -170,7 +170,7 @@ describe("Core/loadKTX2", function () {
{ bc7: true },
32,
32,
- true,
+ true
);
});
@@ -180,13 +180,13 @@ describe("Core/loadKTX2", function () {
{ s3tc: true },
4,
4,
- false,
+ false
);
});
it("returns a promise that resolves to an uncompressed texture containing all mip levels of the original texture", function () {
const resource = Resource.createIfNeeded(
- "./Data/Images/Green4x4Mipmap.ktx2",
+ "./Data/Images/Green4x4Mipmap.ktx2"
);
const loadPromise = resource.fetchArrayBuffer();
return loadPromise.then(function (buffer) {
@@ -199,7 +199,7 @@ describe("Core/loadKTX2", function () {
expect(resolvedValue[i].width).toEqual(dims[i]);
expect(resolvedValue[i].height).toEqual(dims[i]);
expect(
- PixelFormat.isCompressedFormat(resolvedValue[i].internalFormat),
+ PixelFormat.isCompressedFormat(resolvedValue[i].internalFormat)
).toEqual(false);
expect(resolvedValue[i].bufferView).toBeDefined();
}
@@ -209,7 +209,7 @@ describe("Core/loadKTX2", function () {
it("returns a promise that resolves to a compressed texture containing all mip levels of the original texture", function () {
const resource = Resource.createIfNeeded(
- "./Data/Images/Green4x4Mipmap_ETC1S.ktx2",
+ "./Data/Images/Green4x4Mipmap_ETC1S.ktx2"
);
const loadPromise = resource.fetchArrayBuffer();
return loadPromise.then(function (buffer) {
@@ -222,7 +222,7 @@ describe("Core/loadKTX2", function () {
expect(resolvedValue[i].width).toEqual(dims[i]);
expect(resolvedValue[i].height).toEqual(dims[i]);
expect(
- PixelFormat.isCompressedFormat(resolvedValue[i].internalFormat),
+ PixelFormat.isCompressedFormat(resolvedValue[i].internalFormat)
).toEqual(true);
expect(resolvedValue[i].bufferView).toBeDefined();
}
@@ -266,7 +266,7 @@ describe("Core/loadKTX2", function () {
expect(resolvedValue).toBeUndefined();
expect(rejectedError).toBeInstanceOf(RuntimeError);
expect(rejectedError.message).toEqual(
- "KTX2 3D textures are unsupported.",
+ "KTX2 3D textures are unsupported."
);
});
});
@@ -291,7 +291,7 @@ describe("Core/loadKTX2", function () {
expect(resolvedValue).toBeUndefined();
expect(rejectedError).toBeInstanceOf(RuntimeError);
expect(rejectedError.message).toEqual(
- "KTX2 texture arrays are not supported.",
+ "KTX2 texture arrays are not supported."
);
});
});
diff --git a/packages/engine/Specs/Core/pointInsideTriangleSpec.js b/packages/engine/Specs/Core/pointInsideTriangleSpec.js
index 77239352ab6f..931a7ff67fe7 100644
--- a/packages/engine/Specs/Core/pointInsideTriangleSpec.js
+++ b/packages/engine/Specs/Core/pointInsideTriangleSpec.js
@@ -7,8 +7,8 @@ describe("Core/pointInsideTriangle", function () {
new Cartesian2(0.25, 0.25),
Cartesian2.ZERO,
new Cartesian2(1.0, 0.0),
- new Cartesian2(0.0, 1.0),
- ),
+ new Cartesian2(0.0, 1.0)
+ )
).toEqual(true);
});
@@ -18,8 +18,8 @@ describe("Core/pointInsideTriangle", function () {
new Cartesian2(1.0, 1.0),
Cartesian2.ZERO,
new Cartesian2(1.0, 0.0),
- new Cartesian2(0.0, 1.0),
- ),
+ new Cartesian2(0.0, 1.0)
+ )
).toEqual(false);
});
@@ -29,8 +29,8 @@ describe("Core/pointInsideTriangle", function () {
new Cartesian2(0.5, -0.5),
Cartesian2.ZERO,
new Cartesian2(1.0, 0.0),
- new Cartesian2(0.0, 1.0),
- ),
+ new Cartesian2(0.0, 1.0)
+ )
).toEqual(false);
});
@@ -40,8 +40,8 @@ describe("Core/pointInsideTriangle", function () {
new Cartesian2(-0.5, 0.5),
Cartesian2.ZERO,
new Cartesian2(1.0, 0.0),
- new Cartesian2(0.0, 1.0),
- ),
+ new Cartesian2(0.0, 1.0)
+ )
).toEqual(false);
});
@@ -51,8 +51,8 @@ describe("Core/pointInsideTriangle", function () {
Cartesian2.ZERO,
Cartesian2.ZERO,
new Cartesian2(1.0, 0.0),
- new Cartesian2(0.0, 1.0),
- ),
+ new Cartesian2(0.0, 1.0)
+ )
).toEqual(false);
});
@@ -62,8 +62,8 @@ describe("Core/pointInsideTriangle", function () {
new Cartesian2(0.5, 0.0),
Cartesian2.ZERO,
new Cartesian2(1.0, 0.0),
- new Cartesian2(0.0, 1.0),
- ),
+ new Cartesian2(0.0, 1.0)
+ )
).toEqual(false);
});
diff --git a/packages/engine/Specs/Core/sampleTerrainMostDetailedSpec.js b/packages/engine/Specs/Core/sampleTerrainMostDetailedSpec.js
index 9649ad6a11e0..77635449b0d9 100644
--- a/packages/engine/Specs/Core/sampleTerrainMostDetailedSpec.js
+++ b/packages/engine/Specs/Core/sampleTerrainMostDetailedSpec.js
@@ -19,7 +19,7 @@ describe("Core/sampleTerrainMostDetailed", function () {
const passedPositions = await sampleTerrainMostDetailed(
worldTerrain,
- positions,
+ positions
);
expect(passedPositions).toBe(positions);
expect(positions[0].height).toBeGreaterThan(5000);
@@ -30,7 +30,7 @@ describe("Core/sampleTerrainMostDetailed", function () {
it("should throw querying heights from terrain without availability", async function () {
const terrainProvider = await CesiumTerrainProvider.fromUrl(
- "Data/CesiumTerrainTileJson/StandardHeightmap.tile.json",
+ "Data/CesiumTerrainTileJson/StandardHeightmap.tile.json"
);
const positions = [
@@ -39,9 +39,9 @@ describe("Core/sampleTerrainMostDetailed", function () {
];
await expectAsync(
- sampleTerrainMostDetailed(terrainProvider, positions),
+ sampleTerrainMostDetailed(terrainProvider, positions)
).toBeRejectedWithDeveloperError(
- "sampleTerrainMostDetailed requires a terrain provider that has tile availability.",
+ "sampleTerrainMostDetailed requires a terrain provider that has tile availability."
);
});
@@ -65,13 +65,13 @@ describe("Core/sampleTerrainMostDetailed", function () {
];
await expectAsync(
- sampleTerrainMostDetailed(undefined, positions),
+ sampleTerrainMostDetailed(undefined, positions)
).toBeRejectedWithDeveloperError("terrainProvider is required.");
});
it("throws without positions", async function () {
await expectAsync(
- sampleTerrainMostDetailed(worldTerrain, undefined),
+ sampleTerrainMostDetailed(worldTerrain, undefined)
).toBeRejectedWithDeveloperError("positions is required.");
});
@@ -94,7 +94,7 @@ describe("Core/sampleTerrainMostDetailed", function () {
const positions = [Cartographic.fromDegrees(0.0, 0.0, 0.0)];
return expectAsync(
- sampleTerrainMostDetailed(terrainProvider, positions, true),
+ sampleTerrainMostDetailed(terrainProvider, positions, true)
).toBeRejected();
});
});
diff --git a/packages/engine/Specs/Core/sampleTerrainSpec.js b/packages/engine/Specs/Core/sampleTerrainSpec.js
index 1c7ef5b2f0cd..ce265ee5ca58 100644
--- a/packages/engine/Specs/Core/sampleTerrainSpec.js
+++ b/packages/engine/Specs/Core/sampleTerrainSpec.js
@@ -26,15 +26,15 @@ describe("Core/sampleTerrain", function () {
Cartographic.fromDegrees(87.0, 28.0),
];
- return sampleTerrain(worldTerrain, 11, positions).then(
- function (passedPositions) {
- expect(passedPositions).toBe(positions);
- expect(positions[0].height).toBeGreaterThan(5000);
- expect(positions[0].height).toBeLessThan(10000);
- expect(positions[1].height).toBeGreaterThan(5000);
- expect(positions[1].height).toBeLessThan(10000);
- },
- );
+ return sampleTerrain(worldTerrain, 11, positions).then(function (
+ passedPositions
+ ) {
+ expect(passedPositions).toBe(positions);
+ expect(positions[0].height).toBeGreaterThan(5000);
+ expect(positions[0].height).toBeLessThan(10000);
+ expect(positions[1].height).toBeGreaterThan(5000);
+ expect(positions[1].height).toBeLessThan(10000);
+ });
});
it("queries heights from terrain without availability", async function () {
@@ -46,7 +46,7 @@ describe("Core/sampleTerrain", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
if (defined(url.match(/\/\d+\/\d+\/\d+\.terrain/))) {
Resource._DefaultImplementations.loadWithXhr(
@@ -55,7 +55,7 @@ describe("Core/sampleTerrain", function () {
method,
data,
headers,
- deferred,
+ deferred
);
return;
}
@@ -67,12 +67,12 @@ describe("Core/sampleTerrain", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
};
const terrainProvider = await CesiumTerrainProvider.fromUrl(
- "Data/CesiumTerrainTileJson/StandardHeightmap.tile.json",
+ "Data/CesiumTerrainTileJson/StandardHeightmap.tile.json"
);
const positions = [
@@ -100,7 +100,7 @@ describe("Core/sampleTerrain", function () {
const positions = [Cartographic.fromDegrees(0.0, 0.0, 0.0)];
return expectAsync(
- sampleTerrain(worldTerrain, 18, positions, true),
+ sampleTerrain(worldTerrain, 18, positions, true)
).toBeRejected();
});
@@ -110,7 +110,7 @@ describe("Core/sampleTerrain", function () {
const positions = [positionWithData, positionWithoutData];
return expectAsync(
- sampleTerrain(worldTerrain, 12, positions, true),
+ sampleTerrain(worldTerrain, 12, positions, true)
).toBeRejected();
});
@@ -138,15 +138,15 @@ describe("Core/sampleTerrain", function () {
];
await expectAsync(
- sampleTerrain(undefined, 11, positions),
+ sampleTerrain(undefined, 11, positions)
).toBeRejectedWithDeveloperError();
await expectAsync(
- sampleTerrain(worldTerrain, undefined, positions),
+ sampleTerrain(worldTerrain, undefined, positions)
).toBeRejectedWithDeveloperError();
await expectAsync(
- sampleTerrain(worldTerrain, 11, undefined),
+ sampleTerrain(worldTerrain, 11, undefined)
).toBeRejectedWithDeveloperError();
});
@@ -173,28 +173,31 @@ describe("Core/sampleTerrain", function () {
function spyOnTerrainDataCreateMesh(terrainProvider) {
// do some sneaky spying, so we can check how many times createMesh is called
const 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;
- });
- },
- );
+ 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,
+ wasFirstTileMeshCreated
) {
// assert how many tiles were requested
expect(terrainProvider.requestTileGeometry.calls.count()).toEqual(
- numberOfTilesRequested,
+ numberOfTilesRequested
);
// get the first tile that was requested
@@ -205,7 +208,7 @@ describe("Core/sampleTerrain", function () {
.returnValue.then(function (terrainData) {
// assert if the mesh was created or not for this tile
expect(terrainData.createMesh.calls.count()).toEqual(
- wasFirstTileMeshCreated ? 1 : 0,
+ wasFirstTileMeshCreated ? 1 : 0
);
})
);
@@ -223,7 +226,7 @@ describe("Core/sampleTerrain", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
// find a key (source path) path in the spec which matches (ends with) the requested url
const availablePaths = Object.keys(proxySpec);
@@ -241,8 +244,8 @@ describe("Core/sampleTerrain", function () {
if (!defined(proxiedUrl)) {
throw new Error(
`Unexpected XHR load to url: ${url}; spec includes: ${availablePaths.join(
- ", ",
- )}`,
+ ", "
+ )}`
);
}
@@ -254,7 +257,7 @@ describe("Core/sampleTerrain", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
};
}
@@ -265,22 +268,23 @@ describe("Core/sampleTerrain", function () {
"/9/759/335.terrain?v=1.2.0":
"Data/CesiumTerrainTileJson/9_759_335/9_759_335.terrain",
});
- const terrainProvider =
- await CesiumTerrainProvider.fromUrl("made/up/url");
+ const terrainProvider = await CesiumTerrainProvider.fromUrl(
+ "made/up/url"
+ );
spyOnTerrainDataCreateMesh(terrainProvider);
const positionA = Cartographic.fromDegrees(
86.93666235421982,
- 27.97989963555095,
+ 27.97989963555095
);
const positionB = Cartographic.fromDegrees(
86.9366623542198,
- 27.9798996355509,
+ 27.9798996355509
);
const positionC = Cartographic.fromDegrees(
86.936662354213,
- 27.979899635557,
+ 27.979899635557
);
const level = 9;
@@ -307,22 +311,23 @@ describe("Core/sampleTerrain", function () {
"/tile/9/214/379": "Data/ArcGIS/9_214_379/tile_9_214_379.tile",
});
- const terrainProvider =
- await ArcGISTiledElevationTerrainProvider.fromUrl("made/up/url");
+ const terrainProvider = await ArcGISTiledElevationTerrainProvider.fromUrl(
+ "made/up/url"
+ );
spyOnTerrainDataCreateMesh(terrainProvider);
const positionA = Cartographic.fromDegrees(
86.93666235421982,
- 27.97989963555095,
+ 27.97989963555095
);
const positionB = Cartographic.fromDegrees(
86.9366623542198,
- 27.9798996355509,
+ 27.9798996355509
);
const positionC = Cartographic.fromDegrees(
86.936662354213,
- 27.979899635557,
+ 27.979899635557
);
const level = 9;
@@ -351,29 +356,33 @@ describe("Core/sampleTerrain", function () {
"/tile/9/214/376": "Data/ArcGIS/9_214_379/tile_9_214_379.tile",
});
- const terrainProvider =
- await ArcGISTiledElevationTerrainProvider.fromUrl("made/up/url");
+ const terrainProvider = await ArcGISTiledElevationTerrainProvider.fromUrl(
+ "made/up/url"
+ );
let i = 0;
const originalRequestTileGeometry = terrainProvider.requestTileGeometry;
- spyOn(terrainProvider, "requestTileGeometry").and.callFake(
- function (x, y, level, request) {
- i++;
- if (i === 2 || i === 3) {
- // on the 2nd and 3rd requestTileGeometry call, return undefined
- // to simulate RequestScheduler throttling the request
- return undefined;
- }
- // otherwise, call the original method
- return originalRequestTileGeometry.call(
- terrainProvider,
- x,
- y,
- level,
- request,
- );
- },
- );
+ spyOn(terrainProvider, "requestTileGeometry").and.callFake(function (
+ x,
+ y,
+ level,
+ request
+ ) {
+ i++;
+ if (i === 2 || i === 3) {
+ // on the 2nd and 3rd requestTileGeometry call, return undefined
+ // to simulate RequestScheduler throttling the request
+ return undefined;
+ }
+ // otherwise, call the original method
+ return originalRequestTileGeometry.call(
+ terrainProvider,
+ x,
+ y,
+ level,
+ request
+ );
+ });
// 3 positions, quite far apart (requires multiple tile requests)
const positionA = Cartographic.fromDegrees(85, 28);
diff --git a/packages/engine/Specs/DataSources/BillboardGraphicsSpec.js b/packages/engine/Specs/DataSources/BillboardGraphicsSpec.js
index 68fd9c52383c..6da4f355301c 100644
--- a/packages/engine/Specs/DataSources/BillboardGraphicsSpec.js
+++ b/packages/engine/Specs/DataSources/BillboardGraphicsSpec.js
@@ -53,7 +53,7 @@ describe("DataSources/BillboardGraphics", function () {
expect(billboard.scaleByDistance).toBeInstanceOf(ConstantProperty);
expect(billboard.translucencyByDistance).toBeInstanceOf(ConstantProperty);
expect(billboard.pixelOffsetScaleByDistance).toBeInstanceOf(
- ConstantProperty,
+ ConstantProperty
);
expect(billboard.sizeInMeters).toBeInstanceOf(ConstantProperty);
expect(billboard.distanceDisplayCondition).toBeInstanceOf(ConstantProperty);
@@ -65,10 +65,10 @@ describe("DataSources/BillboardGraphics", function () {
expect(billboard.alignedAxis.getValue()).toEqual(options.alignedAxis);
expect(billboard.color.getValue()).toEqual(options.color);
expect(billboard.heightReference.getValue()).toEqual(
- options.heightReference,
+ options.heightReference
);
expect(billboard.horizontalOrigin.getValue()).toEqual(
- options.horizontalOrigin,
+ options.horizontalOrigin
);
expect(billboard.verticalOrigin.getValue()).toEqual(options.verticalOrigin);
expect(billboard.eyeOffset.getValue()).toEqual(options.eyeOffset);
@@ -77,20 +77,20 @@ describe("DataSources/BillboardGraphics", function () {
expect(billboard.width.getValue()).toEqual(options.width);
expect(billboard.height.getValue()).toEqual(options.height);
expect(billboard.scaleByDistance.getValue()).toEqual(
- options.scaleByDistance,
+ options.scaleByDistance
);
expect(billboard.translucencyByDistance.getValue()).toEqual(
- options.translucencyByDistance,
+ options.translucencyByDistance
);
expect(billboard.pixelOffsetScaleByDistance.getValue()).toEqual(
- options.pixelOffsetScaleByDistance,
+ options.pixelOffsetScaleByDistance
);
expect(billboard.sizeInMeters.getValue()).toEqual(options.sizeInMeters);
expect(billboard.distanceDisplayCondition.getValue()).toEqual(
- options.distanceDisplayCondition,
+ options.distanceDisplayCondition
);
expect(billboard.disableDepthTestDistance.getValue()).toEqual(
- options.disableDepthTestDistance,
+ options.disableDepthTestDistance
);
expect(billboard.splitDirection.getValue()).toEqual(options.splitDirection);
});
@@ -103,7 +103,7 @@ describe("DataSources/BillboardGraphics", function () {
source.alignedAxis = new ConstantProperty(new Cartesian3());
source.color = new ConstantProperty(Color.BLACK);
source.heightReference = new ConstantProperty(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
source.horizontalOrigin = new ConstantProperty(HorizontalOrigin.LEFT);
source.verticalOrigin = new ConstantProperty(VerticalOrigin.BOTTOM);
@@ -116,11 +116,11 @@ describe("DataSources/BillboardGraphics", function () {
source.scaleByDistance = new ConstantProperty(new NearFarScalar());
source.translucencyByDistance = new ConstantProperty(new NearFarScalar());
source.pixelOffsetScaleByDistance = new ConstantProperty(
- new NearFarScalar(1.0, 0.0, 3.0e9, 0.0),
+ new NearFarScalar(1.0, 0.0, 3.0e9, 0.0)
);
source.sizeInMeters = new ConstantProperty(true);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
source.disableDepthTestDistance = new ConstantProperty(10.0);
source.splitDirection = new ConstantProperty(SplitDirection.LEFT);
@@ -145,14 +145,14 @@ describe("DataSources/BillboardGraphics", function () {
expect(target.scaleByDistance).toBe(source.scaleByDistance);
expect(target.translucencyByDistance).toBe(source.translucencyByDistance);
expect(target.pixelOffsetScaleByDistance).toBe(
- source.pixelOffsetScaleByDistance,
+ source.pixelOffsetScaleByDistance
);
expect(target.sizeInMeters).toBe(source.sizeInMeters);
expect(target.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
expect(target.disableDepthTestDistance).toBe(
- source.disableDepthTestDistance,
+ source.disableDepthTestDistance
);
expect(target.splitDirection).toBe(source.splitDirection);
});
@@ -165,7 +165,7 @@ describe("DataSources/BillboardGraphics", function () {
source.alignedAxis = new ConstantProperty(new Cartesian3());
source.color = new ConstantProperty(Color.BLACK);
source.heightReference = new ConstantProperty(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
source.horizontalOrigin = new ConstantProperty(HorizontalOrigin.LEFT);
source.verticalOrigin = new ConstantProperty(VerticalOrigin.BOTTOM);
@@ -178,11 +178,11 @@ describe("DataSources/BillboardGraphics", function () {
source.scaleByDistance = new ConstantProperty(new NearFarScalar());
source.translucencyByDistance = new ConstantProperty(new NearFarScalar());
source.pixelOffsetScaleByDistance = new ConstantProperty(
- new NearFarScalar(1.0, 0.0, 3.0e9, 0.0),
+ new NearFarScalar(1.0, 0.0, 3.0e9, 0.0)
);
source.sizeInMeters = new ConstantProperty(true);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
source.disableDepthTestDistance = new ConstantProperty(10.0);
source.splitDirection = new ConstantProperty(SplitDirection.LEFT);
@@ -193,7 +193,7 @@ describe("DataSources/BillboardGraphics", function () {
const alignedAxis = new ConstantProperty(new Cartesian3());
const color = new ConstantProperty(Color.BLACK);
const heightReference = new ConstantProperty(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
const horizontalOrigin = new ConstantProperty(HorizontalOrigin.LEFT);
const verticalOrigin = new ConstantProperty(VerticalOrigin.BOTTOM);
@@ -206,11 +206,11 @@ describe("DataSources/BillboardGraphics", function () {
const scaleByDistance = new ConstantProperty(new NearFarScalar());
const translucencyByDistance = new ConstantProperty(new NearFarScalar());
const pixelOffsetScaleByDistance = new ConstantProperty(
- new NearFarScalar(),
+ new NearFarScalar()
);
const sizeInMeters = new ConstantProperty(true);
const distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(),
+ new DistanceDisplayCondition()
);
const disableDepthTestDistance = new ConstantProperty(10.0);
const splitDirection = new ConstantProperty(SplitDirection.LEFT);
@@ -271,7 +271,7 @@ describe("DataSources/BillboardGraphics", function () {
source.alignedAxis = new ConstantProperty(new Cartesian3());
source.color = new ConstantProperty(Color.BLACK);
source.heightReference = new ConstantProperty(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
source.horizontalOrigin = new ConstantProperty(HorizontalOrigin.LEFT);
source.verticalOrigin = new ConstantProperty(VerticalOrigin.BOTTOM);
@@ -284,11 +284,11 @@ describe("DataSources/BillboardGraphics", function () {
source.scaleByDistance = new ConstantProperty(new NearFarScalar());
source.translucencyByDistance = new ConstantProperty(new NearFarScalar());
source.pixelOffsetScaleByDistance = new ConstantProperty(
- new NearFarScalar(1.0, 0.0, 3.0e9, 0.0),
+ new NearFarScalar(1.0, 0.0, 3.0e9, 0.0)
);
source.sizeInMeters = new ConstantProperty(true);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
source.disableDepthTestDistance = new ConstantProperty(10.0);
source.splitDirection = new ConstantProperty(SplitDirection.LEFT);
@@ -311,14 +311,14 @@ describe("DataSources/BillboardGraphics", function () {
expect(result.scaleByDistance).toBe(source.scaleByDistance);
expect(result.translucencyByDistance).toBe(source.translucencyByDistance);
expect(result.pixelOffsetScaleByDistance).toBe(
- source.pixelOffsetScaleByDistance,
+ source.pixelOffsetScaleByDistance
);
expect(result.sizeInMeters).toBe(source.sizeInMeters);
expect(result.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
expect(result.disableDepthTestDistance).toBe(
- source.disableDepthTestDistance,
+ source.disableDepthTestDistance
);
expect(result.splitDirection).toBe(source.splitDirection);
});
diff --git a/packages/engine/Specs/DataSources/BillboardVisualizerSpec.js b/packages/engine/Specs/DataSources/BillboardVisualizerSpec.js
index b0b10a7ceebc..a01bec49ccbf 100644
--- a/packages/engine/Specs/DataSources/BillboardVisualizerSpec.js
+++ b/packages/engine/Specs/DataSources/BillboardVisualizerSpec.js
@@ -79,7 +79,7 @@ describe(
const entityCollection = new EntityCollection();
const visualizer = new BillboardVisualizer(
entityCluster,
- entityCollection,
+ entityCollection
);
expect(entityCollection.collectionChanged.numberOfListeners).toEqual(1);
visualizer.destroy();
@@ -92,7 +92,7 @@ describe(
const testObject = entityCollection.getOrCreateEntity("test");
testObject.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
visualizer.update(JulianDate.now());
expect(entityCluster._billboardCollection).not.toBeDefined();
@@ -117,7 +117,7 @@ describe(
const testObject = entityCollection.getOrCreateEntity("test");
testObject.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
const billboard = (testObject.billboard = new BillboardGraphics());
billboard.show = new ConstantProperty(true);
@@ -136,20 +136,20 @@ describe(
const billboard = (testObject.billboard = new BillboardGraphics());
testObject.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
billboard.show = new ConstantProperty(true);
billboard.color = new ConstantProperty(new Color(0.5, 0.5, 0.5, 0.5));
billboard.image = new ConstantProperty("Data/Images/Blue.png");
billboard.imageSubRegion = new ConstantProperty(
- new BoundingRectangle(0, 0, 1, 1),
+ new BoundingRectangle(0, 0, 1, 1)
);
billboard.eyeOffset = new ConstantProperty(new Cartesian3(1.0, 2.0, 3.0));
billboard.scale = new ConstantProperty(12.5);
billboard.rotation = new ConstantProperty(1.5);
billboard.alignedAxis = new ConstantProperty(Cartesian3.UNIT_Z);
billboard.heightReference = new ConstantProperty(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
billboard.horizontalOrigin = new ConstantProperty(HorizontalOrigin.RIGHT);
billboard.verticalOrigin = new ConstantProperty(VerticalOrigin.TOP);
@@ -158,14 +158,14 @@ describe(
billboard.height = new ConstantProperty(5);
billboard.scaleByDistance = new ConstantProperty(new NearFarScalar());
billboard.translucencyByDistance = new ConstantProperty(
- new NearFarScalar(),
+ new NearFarScalar()
);
billboard.pixelOffsetScaleByDistance = new ConstantProperty(
- new NearFarScalar(1.0, 0.0, 3.0e9, 0.0),
+ new NearFarScalar(1.0, 0.0, 3.0e9, 0.0)
);
billboard.sizeInMeters = new ConstantProperty(true);
billboard.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
billboard.disableDepthTestDistance = new ConstantProperty(10.0);
billboard.splitDirection = new ConstantProperty(SplitDirection.LEFT);
@@ -184,49 +184,49 @@ describe(
expect(bb.position).toEqual(testObject.position.getValue(time));
expect(bb.color).toEqual(testObject.billboard.color.getValue(time));
expect(bb.eyeOffset).toEqual(
- testObject.billboard.eyeOffset.getValue(time),
+ testObject.billboard.eyeOffset.getValue(time)
);
expect(bb.scale).toEqual(testObject.billboard.scale.getValue(time));
expect(bb.rotation).toEqual(
- testObject.billboard.rotation.getValue(time),
+ testObject.billboard.rotation.getValue(time)
);
expect(bb.alignedAxis).toEqual(
- testObject.billboard.alignedAxis.getValue(time),
+ testObject.billboard.alignedAxis.getValue(time)
);
expect(bb.heightReference).toEqual(
- testObject.billboard.heightReference.getValue(time),
+ testObject.billboard.heightReference.getValue(time)
);
expect(bb.horizontalOrigin).toEqual(
- testObject.billboard.horizontalOrigin.getValue(time),
+ testObject.billboard.horizontalOrigin.getValue(time)
);
expect(bb.verticalOrigin).toEqual(
- testObject.billboard.verticalOrigin.getValue(time),
+ testObject.billboard.verticalOrigin.getValue(time)
);
expect(bb.width).toEqual(testObject.billboard.width.getValue(time));
expect(bb.height).toEqual(testObject.billboard.height.getValue(time));
expect(bb.scaleByDistance).toEqual(
- testObject.billboard.scaleByDistance.getValue(time),
+ testObject.billboard.scaleByDistance.getValue(time)
);
expect(bb.translucencyByDistance).toEqual(
- testObject.billboard.translucencyByDistance.getValue(time),
+ testObject.billboard.translucencyByDistance.getValue(time)
);
expect(bb.pixelOffsetScaleByDistance).toEqual(
- testObject.billboard.pixelOffsetScaleByDistance.getValue(time),
+ testObject.billboard.pixelOffsetScaleByDistance.getValue(time)
);
expect(bb.sizeInMeters).toEqual(
- testObject.billboard.sizeInMeters.getValue(time),
+ testObject.billboard.sizeInMeters.getValue(time)
);
expect(bb.distanceDisplayCondition).toEqual(
- testObject.billboard.distanceDisplayCondition.getValue(time),
+ testObject.billboard.distanceDisplayCondition.getValue(time)
);
expect(bb.disableDepthTestDistance).toEqual(
- testObject.billboard.disableDepthTestDistance.getValue(time),
+ testObject.billboard.disableDepthTestDistance.getValue(time)
);
expect(bb.splitDirection).toEqual(
- testObject.billboard.splitDirection.getValue(time),
+ testObject.billboard.splitDirection.getValue(time)
);
expect(bb._imageSubRegion).toEqual(
- testObject.billboard.imageSubRegion.getValue(time),
+ testObject.billboard.imageSubRegion.getValue(time)
);
billboard.show = new ConstantProperty(false);
@@ -248,20 +248,20 @@ describe(
const billboard = (testObject.billboard = new BillboardGraphics());
testObject.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
billboard.show = new ConstantProperty(true);
billboard.color = new ConstantProperty(new Color(0.5, 0.5, 0.5, 0.5));
billboard.image = new ConstantProperty("Data/Images/Blue.png");
billboard.imageSubRegion = new ConstantProperty(
- new BoundingRectangle(0, 0, 1, 1),
+ new BoundingRectangle(0, 0, 1, 1)
);
billboard.eyeOffset = new ConstantProperty(new Cartesian3(1.0, 2.0, 3.0));
billboard.scale = new ConstantProperty(12.5);
billboard.rotation = new ConstantProperty(1.5);
billboard.alignedAxis = new ConstantProperty(Cartesian3.UNIT_Z);
billboard.heightReference = new ConstantProperty(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
billboard.horizontalOrigin = new ConstantProperty(HorizontalOrigin.RIGHT);
billboard.verticalOrigin = new ConstantProperty(VerticalOrigin.TOP);
@@ -270,14 +270,14 @@ describe(
billboard.height = new ConstantProperty(5);
billboard.scaleByDistance = new ConstantProperty(new NearFarScalar());
billboard.translucencyByDistance = new ConstantProperty(
- new NearFarScalar(),
+ new NearFarScalar()
);
billboard.pixelOffsetScaleByDistance = new ConstantProperty(
- new NearFarScalar(1.0, 0.0, 3.0e9, 0.0),
+ new NearFarScalar(1.0, 0.0, 3.0e9, 0.0)
);
billboard.sizeInMeters = new ConstantProperty(true);
billboard.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
billboard.disableDepthTestDistance = new ConstantProperty(10.0);
billboard.splitDirection = new ConstantProperty(SplitDirection.LEFT);
@@ -308,52 +308,52 @@ describe(
expect(bb.position).toEqual(testObject.position.getValue(time));
expect(bb.color).toEqual(testObject.billboard.color.getValue(time));
expect(bb.eyeOffset).toEqual(
- testObject.billboard.eyeOffset.getValue(time),
+ testObject.billboard.eyeOffset.getValue(time)
);
expect(bb.scale).toEqual(testObject.billboard.scale.getValue(time));
expect(bb.rotation).toEqual(
- testObject.billboard.rotation.getValue(time),
+ testObject.billboard.rotation.getValue(time)
);
expect(bb.alignedAxis).toEqual(
- testObject.billboard.alignedAxis.getValue(time),
+ testObject.billboard.alignedAxis.getValue(time)
);
expect(bb.heightReference).toEqual(
- testObject.billboard.heightReference.getValue(time),
+ testObject.billboard.heightReference.getValue(time)
);
expect(bb.horizontalOrigin).toEqual(
- testObject.billboard.horizontalOrigin.getValue(time),
+ testObject.billboard.horizontalOrigin.getValue(time)
);
expect(bb.verticalOrigin).toEqual(
- testObject.billboard.verticalOrigin.getValue(time),
+ testObject.billboard.verticalOrigin.getValue(time)
);
expect(bb.width).toEqual(testObject.billboard.width.getValue(time));
expect(bb.height).toEqual(
- testObject.billboard.height.getValue(time),
+ testObject.billboard.height.getValue(time)
);
expect(bb.scaleByDistance).toEqual(
- testObject.billboard.scaleByDistance.getValue(time),
+ testObject.billboard.scaleByDistance.getValue(time)
);
expect(bb.translucencyByDistance).toEqual(
- testObject.billboard.translucencyByDistance.getValue(time),
+ testObject.billboard.translucencyByDistance.getValue(time)
);
expect(bb.pixelOffsetScaleByDistance).toEqual(
- testObject.billboard.pixelOffsetScaleByDistance.getValue(time),
+ testObject.billboard.pixelOffsetScaleByDistance.getValue(time)
);
expect(bb.sizeInMeters).toEqual(
- testObject.billboard.sizeInMeters.getValue(time),
+ testObject.billboard.sizeInMeters.getValue(time)
);
expect(bb.distanceDisplayCondition).toEqual(
- testObject.billboard.distanceDisplayCondition.getValue(time),
+ testObject.billboard.distanceDisplayCondition.getValue(time)
);
expect(bb.disableDepthTestDistance).toEqual(
- testObject.billboard.disableDepthTestDistance.getValue(time),
+ testObject.billboard.disableDepthTestDistance.getValue(time)
);
expect(bb.splitDirection).toEqual(
- testObject.billboard.splitDirection.getValue(time),
+ testObject.billboard.splitDirection.getValue(time)
);
expect(bb.image).toBeDefined();
expect(bb._imageSubRegion).toEqual(
- testObject.billboard.imageSubRegion.getValue(time),
+ testObject.billboard.imageSubRegion.getValue(time)
);
});
});
@@ -367,7 +367,7 @@ describe(
const testObject = entityCollection.getOrCreateEntity("test");
testObject.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
testObject.billboard = new BillboardGraphics();
testObject.billboard.image = new ConstantProperty("Data/Images/Blue.png");
@@ -386,11 +386,11 @@ describe(
const testObject2 = entityCollection.getOrCreateEntity("test2");
testObject2.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
testObject2.billboard = new BillboardGraphics();
testObject2.billboard.image = new ConstantProperty(
- "Data/Images/Blue.png",
+ "Data/Images/Blue.png"
);
testObject2.billboard.show = new ConstantProperty(true);
@@ -408,7 +408,7 @@ describe(
const billboard = (testObject.billboard = new BillboardGraphics());
testObject.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
billboard.show = new ConstantProperty(true);
billboard.image = new ConstantProperty("Data/Images/Blue.png");
@@ -439,7 +439,7 @@ describe(
const billboard = (testObject.billboard = new BillboardGraphics());
testObject.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
billboard.show = new ConstantProperty(true);
billboard.image = new ConstantProperty("Data/Images/Blue.png");
@@ -460,7 +460,7 @@ describe(
const billboard = (testObject.billboard = new BillboardGraphics());
testObject.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
billboard.show = new ConstantProperty(true);
billboard.image = new ConstantProperty("Data/Images/Blue.png");
@@ -502,5 +502,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/DataSources/BoxGeometryUpdaterSpec.js b/packages/engine/Specs/DataSources/BoxGeometryUpdaterSpec.js
index 5dd917aeb550..55d6932c9fbd 100644
--- a/packages/engine/Specs/DataSources/BoxGeometryUpdaterSpec.js
+++ b/packages/engine/Specs/DataSources/BoxGeometryUpdaterSpec.js
@@ -38,7 +38,7 @@ describe(
box.dimensions = new ConstantProperty(new Cartesian3(1, 2, 3));
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- Cartesian3.fromDegrees(0, 0, 0),
+ Cartesian3.fromDegrees(0, 0, 0)
);
entity.box = box;
return entity;
@@ -74,14 +74,14 @@ describe(
instance = updater.createFillGeometryInstance(time);
geometry = instance.geometry;
expect(geometry._maximum).toEqual(
- Cartesian3.multiplyByScalar(dimensions, 0.5, new Cartesian3()),
+ Cartesian3.multiplyByScalar(dimensions, 0.5, new Cartesian3())
);
expect(geometry._offsetAttribute).toBeUndefined();
instance = updater.createOutlineGeometryInstance(time);
geometry = instance.geometry;
expect(geometry._max).toEqual(
- Cartesian3.multiplyByScalar(dimensions, 0.5, new Cartesian3()),
+ Cartesian3.multiplyByScalar(dimensions, 0.5, new Cartesian3())
);
expect(geometry._offsetAttribute).toBeUndefined();
});
@@ -111,29 +111,29 @@ describe(
expect(instance.geometry._offsetAttribute).toBeUndefined();
graphics.heightReference = new ConstantProperty(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
updater._onEntityPropertyChanged(entity, "box");
instance = updater.createFillGeometryInstance(time);
expect(instance.geometry._offsetAttribute).toEqual(
- GeometryOffsetAttribute.ALL,
+ GeometryOffsetAttribute.ALL
);
instance = updater.createOutlineGeometryInstance(time);
expect(instance.geometry._offsetAttribute).toEqual(
- GeometryOffsetAttribute.ALL,
+ GeometryOffsetAttribute.ALL
);
graphics.heightReference = new ConstantProperty(
- HeightReference.RELATIVE_TO_GROUND,
+ HeightReference.RELATIVE_TO_GROUND
);
updater._onEntityPropertyChanged(entity, "box");
instance = updater.createFillGeometryInstance(time);
expect(instance.geometry._offsetAttribute).toEqual(
- GeometryOffsetAttribute.ALL,
+ GeometryOffsetAttribute.ALL
);
instance = updater.createOutlineGeometryInstance(time);
expect(instance.geometry._offsetAttribute).toEqual(
- GeometryOffsetAttribute.ALL,
+ GeometryOffsetAttribute.ALL
);
});
@@ -143,12 +143,12 @@ describe(
const updater = new BoxGeometryUpdater(entity, scene);
const dynamicUpdater = updater.createDynamicUpdater(
new PrimitiveCollection(),
- new PrimitiveCollection(),
+ new PrimitiveCollection()
);
dynamicUpdater.update(JulianDate.now());
expect(dynamicUpdater._options.dimensions).toEqual(
- entity.box.dimensions.getValue(),
+ entity.box.dimensions.getValue()
);
expect(dynamicUpdater._options.offsetAttribute).toBeUndefined();
});
@@ -186,7 +186,7 @@ describe(
const updater = new BoxGeometryUpdater(entity, scene);
expect(updater._computeCenter(time)).toEqual(
- entity.position.getValue(time),
+ entity.position.getValue(time)
);
});
@@ -198,15 +198,15 @@ describe(
BoxGeometryUpdater,
"box",
createBasicBox,
- getScene,
+ getScene
);
createDynamicGeometryUpdaterSpecs(
BoxGeometryUpdater,
"box",
createDynamicBox,
- getScene,
+ getScene
);
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/DataSources/BoxGraphicsSpec.js b/packages/engine/Specs/DataSources/BoxGraphicsSpec.js
index aa71c78b741d..6c1a2080f629 100644
--- a/packages/engine/Specs/DataSources/BoxGraphicsSpec.js
+++ b/packages/engine/Specs/DataSources/BoxGraphicsSpec.js
@@ -45,7 +45,7 @@ describe("DataSources/BoxGraphics", function () {
expect(box.dimensions.getValue()).toEqual(options.dimensions);
expect(box.shadows.getValue()).toEqual(options.shadows);
expect(box.distanceDisplayCondition.getValue()).toEqual(
- options.distanceDisplayCondition,
+ options.distanceDisplayCondition
);
});
@@ -60,7 +60,7 @@ describe("DataSources/BoxGraphics", function () {
source.dimensions = new ConstantProperty();
source.shadows = new ConstantProperty(ShadowMode.ENABLED);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
const target = new BoxGraphics();
@@ -75,7 +75,7 @@ describe("DataSources/BoxGraphics", function () {
expect(target.dimensions).toBe(source.dimensions);
expect(target.shadows).toBe(source.shadows);
expect(target.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
});
@@ -138,7 +138,7 @@ describe("DataSources/BoxGraphics", function () {
expect(result.dimensions).toBe(source.dimensions);
expect(result.shadows).toBe(source.shadows);
expect(result.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
});
@@ -161,19 +161,19 @@ describe("DataSources/BoxGraphics", function () {
property,
"dimensions",
new Cartesian3(0, 0, 0),
- new Cartesian3(1, 1, 1),
+ new Cartesian3(1, 1, 1)
);
testDefinitionChanged(
property,
"shadows",
ShadowMode.ENABLED,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
testDefinitionChanged(
property,
"distanceDisplayCondition",
new DistanceDisplayCondition(),
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
});
});
diff --git a/packages/engine/Specs/DataSources/CallbackPositionPropertySpec.js b/packages/engine/Specs/DataSources/CallbackPositionPropertySpec.js
index 8668e22daf7a..c9c2470f89aa 100644
--- a/packages/engine/Specs/DataSources/CallbackPositionPropertySpec.js
+++ b/packages/engine/Specs/DataSources/CallbackPositionPropertySpec.js
@@ -29,7 +29,7 @@ describe("DataSources/CallbackPositionProperty", function () {
property = new CallbackPositionProperty(
callback,
true,
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
);
expect(property.referenceFrame).toBe(ReferenceFrame.INERTIAL);
});
@@ -62,7 +62,7 @@ describe("DataSources/CallbackPositionProperty", function () {
time,
valueInertial,
ReferenceFrame.INERTIAL,
- ReferenceFrame.FIXED,
+ ReferenceFrame.FIXED
);
const callback = function (_time, result) {
return valueInertial.clone(result);
@@ -70,7 +70,7 @@ describe("DataSources/CallbackPositionProperty", function () {
const property = new CallbackPositionProperty(
callback,
true,
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
);
const result = property.getValue(time);
@@ -99,7 +99,7 @@ describe("DataSources/CallbackPositionProperty", function () {
const result = property.getValueInReferenceFrame(
time,
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
);
expect(result).not.toBe(value);
expect(result).toEqual(
@@ -107,8 +107,8 @@ describe("DataSources/CallbackPositionProperty", function () {
time,
value,
ReferenceFrame.FIXED,
- ReferenceFrame.INERTIAL,
- ),
+ ReferenceFrame.INERTIAL
+ )
);
});
@@ -120,14 +120,14 @@ describe("DataSources/CallbackPositionProperty", function () {
const property = new CallbackPositionProperty(
callback,
true,
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
);
const expected = new Cartesian3();
const result = property.getValueInReferenceFrame(
time,
ReferenceFrame.FIXED,
- expected,
+ expected
);
expect(result).toBe(expected);
expect(expected).toEqual(
@@ -135,8 +135,8 @@ describe("DataSources/CallbackPositionProperty", function () {
time,
value,
ReferenceFrame.INERTIAL,
- ReferenceFrame.FIXED,
- ),
+ ReferenceFrame.FIXED
+ )
);
});
@@ -189,7 +189,7 @@ describe("DataSources/CallbackPositionProperty", function () {
right = new CallbackPositionProperty(
callback,
true,
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
);
expect(left.equals(right)).toEqual(false);
});
diff --git a/packages/engine/Specs/DataSources/Cesium3DTilesetGraphicsSpec.js b/packages/engine/Specs/DataSources/Cesium3DTilesetGraphicsSpec.js
index be59405ccd3c..37d85b422952 100644
--- a/packages/engine/Specs/DataSources/Cesium3DTilesetGraphicsSpec.js
+++ b/packages/engine/Specs/DataSources/Cesium3DTilesetGraphicsSpec.js
@@ -16,7 +16,7 @@ describe("DataSources/Cesium3DTilesetGraphics", function () {
expect(model.uri.getValue()).toEqual(options.uri);
expect(model.show.getValue()).toEqual(options.show);
expect(model.maximumScreenSpaceError.getValue()).toEqual(
- options.maximumScreenSpaceError,
+ options.maximumScreenSpaceError
);
});
diff --git a/packages/engine/Specs/DataSources/Cesium3DTilesetVisualizerSpec.js b/packages/engine/Specs/DataSources/Cesium3DTilesetVisualizerSpec.js
index 0c9ef09da4fe..95c9db6e8767 100644
--- a/packages/engine/Specs/DataSources/Cesium3DTilesetVisualizerSpec.js
+++ b/packages/engine/Specs/DataSources/Cesium3DTilesetVisualizerSpec.js
@@ -80,7 +80,7 @@ describe(
const testObject = entityCollection.getOrCreateEntity("test");
testObject.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
visualizer.update(JulianDate.now());
expect(scene.primitives.length).toEqual(0);
@@ -116,7 +116,7 @@ describe(
const testObject = entityCollection.getOrCreateEntity("test");
testObject.position = new ConstantPositionProperty(
- Cartesian3.fromDegrees(1, 2, 3),
+ Cartesian3.fromDegrees(1, 2, 3)
);
testObject.tileset = tileset;
@@ -145,12 +145,12 @@ describe(
tileset.uri = new ConstantProperty(
new Resource({
url: tilesetUrl,
- }),
+ })
);
const testObject = entityCollection.getOrCreateEntity("test");
testObject.position = new ConstantPositionProperty(
- Cartesian3.fromDegrees(1, 2, 3),
+ Cartesian3.fromDegrees(1, 2, 3)
);
testObject.tileset = tileset;
@@ -174,7 +174,7 @@ describe(
const time = JulianDate.now();
const testObject = entityCollection.getOrCreateEntity("test");
testObject.position = new ConstantProperty(
- new Cartesian3(5678, 1234, 1101112),
+ new Cartesian3(5678, 1234, 1101112)
);
testObject.tileset = tileset;
visualizer.update(time);
@@ -198,7 +198,7 @@ describe(
testObject.tileset = tileset;
testObject.position = new ConstantProperty(
- new Cartesian3(5678, 1234, 1101112),
+ new Cartesian3(5678, 1234, 1101112)
);
tileset.uri = new ConstantProperty(tilesetUrl);
visualizer.update(time);
@@ -221,12 +221,12 @@ describe(
tileset.uri = new ConstantProperty(
new Resource({
url: tilesetUrl,
- }),
+ })
);
const testObject = entityCollection.getOrCreateEntity("test");
testObject.position = new ConstantPositionProperty(
- Cartesian3.fromDegrees(1, 2, 3),
+ Cartesian3.fromDegrees(1, 2, 3)
);
testObject.tileset = tileset;
@@ -261,12 +261,12 @@ describe(
tileset.uri = new ConstantProperty(
new Resource({
url: tilesetUrl,
- }),
+ })
);
const testObject = entityCollection.getOrCreateEntity("test");
testObject.position = new ConstantPositionProperty(
- Cartesian3.fromDegrees(1, 2, 3),
+ Cartesian3.fromDegrees(1, 2, 3)
);
testObject.tileset = tileset;
@@ -288,7 +288,7 @@ describe(
testObject.tileset = tileset;
testObject.position = new ConstantProperty(
- new Cartesian3(5678, 1234, 1101112),
+ new Cartesian3(5678, 1234, 1101112)
);
tileset.uri = new ConstantProperty(tilesetUrl);
visualizer.update(time);
@@ -317,7 +317,7 @@ describe(
testObject.tileset = tileset;
testObject.position = new ConstantProperty(
- new Cartesian3(5678, 1234, 1101112),
+ new Cartesian3(5678, 1234, 1101112)
);
tileset.uri = new ConstantProperty(tilesetUrl);
visualizer.update(time);
@@ -356,7 +356,7 @@ describe(
testObject.tileset = tileset;
testObject.position = new ConstantProperty(
- new Cartesian3(5678, 1234, 1101112),
+ new Cartesian3(5678, 1234, 1101112)
);
tileset.uri = new ConstantProperty("/path/to/incorrect/file");
visualizer.update(time);
@@ -392,5 +392,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/DataSources/CheckerboardMaterialPropertySpec.js b/packages/engine/Specs/DataSources/CheckerboardMaterialPropertySpec.js
index 31f11faea7e0..26a349ac869f 100644
--- a/packages/engine/Specs/DataSources/CheckerboardMaterialPropertySpec.js
+++ b/packages/engine/Specs/DataSources/CheckerboardMaterialPropertySpec.js
@@ -67,21 +67,21 @@ describe("DataSources/CheckerboardMaterialProperty", function () {
start: start,
stop: stop,
data: Color.RED,
- }),
+ })
);
property.oddColor.intervals.addInterval(
new TimeInterval({
start: start,
stop: stop,
data: Color.BLUE,
- }),
+ })
);
property.repeat.intervals.addInterval(
new TimeInterval({
start: start,
stop: stop,
data: new Cartesian2(5, 5),
- }),
+ })
);
expect(property.isConstant).toBe(false);
@@ -146,7 +146,7 @@ describe("DataSources/CheckerboardMaterialProperty", function () {
property,
"repeat",
new Cartesian2(5, 5),
- new Cartesian2(7, 7),
+ new Cartesian2(7, 7)
);
});
});
diff --git a/packages/engine/Specs/DataSources/ColorMaterialPropertySpec.js b/packages/engine/Specs/DataSources/ColorMaterialPropertySpec.js
index 47da83aea010..f3b6b0bd2f4f 100644
--- a/packages/engine/Specs/DataSources/ColorMaterialPropertySpec.js
+++ b/packages/engine/Specs/DataSources/ColorMaterialPropertySpec.js
@@ -45,7 +45,7 @@ describe("DataSources/ColorMaterialProperty", function () {
start: start,
stop: stop,
data: Color.BLUE,
- }),
+ })
);
expect(property.isConstant).toBe(false);
@@ -90,7 +90,7 @@ describe("DataSources/ColorMaterialProperty", function () {
property,
"color",
property.color,
- oldValue,
+ oldValue
);
listener.calls.reset();
@@ -99,7 +99,7 @@ describe("DataSources/ColorMaterialProperty", function () {
property,
"color",
property.color,
- property.color,
+ property.color
);
listener.calls.reset();
diff --git a/packages/engine/Specs/DataSources/CompositeEntityCollectionSpec.js b/packages/engine/Specs/DataSources/CompositeEntityCollectionSpec.js
index 093e32c15d9d..bf0194423096 100644
--- a/packages/engine/Specs/DataSources/CompositeEntityCollectionSpec.js
+++ b/packages/engine/Specs/DataSources/CompositeEntityCollectionSpec.js
@@ -21,7 +21,7 @@ describe("DataSources/CompositeEntityCollection", function () {
CollectionListener.prototype.onCollectionChanged = function (
collection,
added,
- removed,
+ removed
) {
this.timesCalled++;
this.added = added.slice(0);
@@ -207,7 +207,7 @@ describe("DataSources/CompositeEntityCollection", function () {
const listener = new CollectionListener();
composite.collectionChanged.addEventListener(
listener.onCollectionChanged,
- listener,
+ listener
);
entityCollection.add(entity);
@@ -236,7 +236,7 @@ describe("DataSources/CompositeEntityCollection", function () {
composite.collectionChanged.removeEventListener(
listener.onCollectionChanged,
- listener,
+ listener
);
});
@@ -251,7 +251,7 @@ describe("DataSources/CompositeEntityCollection", function () {
const listener = new CollectionListener();
composite.collectionChanged.addEventListener(
listener.onCollectionChanged,
- listener,
+ listener
);
composite.suspendEvents();
@@ -284,7 +284,7 @@ describe("DataSources/CompositeEntityCollection", function () {
composite.collectionChanged.removeEventListener(
listener.onCollectionChanged,
- listener,
+ listener
);
});
@@ -314,7 +314,7 @@ describe("DataSources/CompositeEntityCollection", function () {
composite.collectionChanged.addEventListener(
listener.onCollectionChanged,
- listener,
+ listener
);
composite.removeAllCollections();
@@ -329,7 +329,7 @@ describe("DataSources/CompositeEntityCollection", function () {
composite.collectionChanged.removeEventListener(
listener.onCollectionChanged,
- listener,
+ listener
);
});
@@ -346,7 +346,7 @@ describe("DataSources/CompositeEntityCollection", function () {
composite.collectionChanged.addEventListener(
listener.onCollectionChanged,
- listener,
+ listener
);
composite.suspendEvents();
@@ -367,7 +367,7 @@ describe("DataSources/CompositeEntityCollection", function () {
composite.collectionChanged.removeEventListener(
listener.onCollectionChanged,
- listener,
+ listener
);
});
@@ -410,13 +410,13 @@ describe("DataSources/CompositeEntityCollection", function () {
entity.availability.addInterval(
TimeInterval.fromIso8601({
iso8601: "2012-08-01/2012-08-02",
- }),
+ })
);
entity2.availability = new TimeIntervalCollection();
entity2.availability.addInterval(
TimeInterval.fromIso8601({
iso8601: "2012-08-05/2012-08-06",
- }),
+ })
);
entity3.availability = undefined;
@@ -438,13 +438,13 @@ describe("DataSources/CompositeEntityCollection", function () {
entity.availability.addInterval(
TimeInterval.fromIso8601({
iso8601: "2012-08-01/9999-12-31T24:00:00Z",
- }),
+ })
);
entity2.availability = new TimeIntervalCollection();
entity2.availability.addInterval(
TimeInterval.fromIso8601({
iso8601: "0000-01-01T00:00:00Z/2012-08-06",
- }),
+ })
);
entity3.availability = undefined;
@@ -568,7 +568,7 @@ describe("DataSources/CompositeEntityCollection", function () {
availability1.addInterval(
TimeInterval.fromIso8601({
iso8601: "2019-01-01/2019-01-04",
- }),
+ })
);
const entity1 = new Entity({
id: id,
@@ -581,7 +581,7 @@ describe("DataSources/CompositeEntityCollection", function () {
availability2.addInterval(
TimeInterval.fromIso8601({
iso8601: "2019-01-02/2019-01-05",
- }),
+ })
);
const entity2 = new Entity({
id: id,
@@ -594,7 +594,7 @@ describe("DataSources/CompositeEntityCollection", function () {
availability3.addInterval(
TimeInterval.fromIso8601({
iso8601: "2019-01-03/2019-01-06",
- }),
+ })
);
const entity3 = new Entity({
id: id,
@@ -610,17 +610,17 @@ describe("DataSources/CompositeEntityCollection", function () {
const compositeObject = composite.getById(id);
expect(compositeObject.availability.start).toEqual(
- JulianDate.fromIso8601("2019-01-01"),
+ JulianDate.fromIso8601("2019-01-01")
);
composite.removeCollection(collection1);
expect(compositeObject.availability.start).toEqual(
- JulianDate.fromIso8601("2019-01-02"),
+ JulianDate.fromIso8601("2019-01-02")
);
composite.removeCollection(collection2);
expect(compositeObject.availability.start).toEqual(
- JulianDate.fromIso8601("2019-01-03"),
+ JulianDate.fromIso8601("2019-01-03")
);
});
@@ -663,7 +663,7 @@ describe("DataSources/CompositeEntityCollection", function () {
e1Composite,
propertyName,
newValue,
- oldValue,
+ oldValue
);
});
@@ -691,7 +691,7 @@ describe("DataSources/CompositeEntityCollection", function () {
e1Composite,
propertyName,
newValue,
- oldValue,
+ oldValue
);
});
@@ -727,17 +727,17 @@ describe("DataSources/CompositeEntityCollection", function () {
composite2.addCollection(collection2);
expect(
- composite1.getById(id).billboard.show.getValue(JulianDate.now()),
+ composite1.getById(id).billboard.show.getValue(JulianDate.now())
).toEqual(true);
expect(
- composite2.getById(id).billboard.show.getValue(JulianDate.now()),
+ composite2.getById(id).billboard.show.getValue(JulianDate.now())
).toEqual(false);
// switch the billboard show for the entity in collection2 to true, this should affect
// composite2 but not composite1
entity2.billboard.show = new ConstantProperty(true);
expect(
- composite2.getById(id).billboard.show.getValue(JulianDate.now()),
+ composite2.getById(id).billboard.show.getValue(JulianDate.now())
).toEqual(true);
expect(composite1.getById(id).billboard.show).toBe(entity1.billboard.show);
expect(composite2.getById(id).billboard.show).toBe(entity2.billboard.show);
diff --git a/packages/engine/Specs/DataSources/CompositePositionPropertySpec.js b/packages/engine/Specs/DataSources/CompositePositionPropertySpec.js
index 703a67111cae..8d9263c0f7ba 100644
--- a/packages/engine/Specs/DataSources/CompositePositionPropertySpec.js
+++ b/packages/engine/Specs/DataSources/CompositePositionPropertySpec.js
@@ -115,7 +115,7 @@ describe("DataSources/CompositePositionProperty", function () {
stop: new JulianDate(12, 0),
data: new ConstantPositionProperty(
new Cartesian3(1, 2, 3),
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
),
});
const interval2 = new TimeInterval({
@@ -124,7 +124,7 @@ describe("DataSources/CompositePositionProperty", function () {
isStartIncluded: false,
data: new ConstantPositionProperty(
new Cartesian3(4, 5, 6),
- ReferenceFrame.FIXED,
+ ReferenceFrame.FIXED
),
});
@@ -137,7 +137,7 @@ describe("DataSources/CompositePositionProperty", function () {
interval1.start,
valueInertial,
ReferenceFrame.INERTIAL,
- ReferenceFrame.FIXED,
+ ReferenceFrame.FIXED
);
const result1 = property.getValue(interval1.start);
@@ -153,7 +153,7 @@ describe("DataSources/CompositePositionProperty", function () {
stop: new JulianDate(12, 0),
data: new ConstantPositionProperty(
new Cartesian3(1, 2, 3),
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
),
});
const interval2 = new TimeInterval({
@@ -162,7 +162,7 @@ describe("DataSources/CompositePositionProperty", function () {
isStartIncluded: false,
data: new ConstantPositionProperty(
new Cartesian3(4, 5, 6),
- ReferenceFrame.FIXED,
+ ReferenceFrame.FIXED
),
});
@@ -174,27 +174,27 @@ describe("DataSources/CompositePositionProperty", function () {
const result1 = property.getValueInReferenceFrame(
interval1.start,
ReferenceFrame.INERTIAL,
- expected,
+ expected
);
expect(result1).toBe(expected);
expect(result1).toEqual(
interval1.data.getValueInReferenceFrame(
interval1.start,
- ReferenceFrame.INERTIAL,
- ),
+ ReferenceFrame.INERTIAL
+ )
);
const result2 = property.getValueInReferenceFrame(
interval2.stop,
ReferenceFrame.FIXED,
- expected,
+ expected
);
expect(result2).toBe(expected);
expect(result2).toEqual(
interval2.data.getValueInReferenceFrame(
interval2.stop,
- ReferenceFrame.FIXED,
- ),
+ ReferenceFrame.FIXED
+ )
);
});
@@ -204,7 +204,7 @@ describe("DataSources/CompositePositionProperty", function () {
stop: new JulianDate(12, 0),
data: new ConstantPositionProperty(
new Cartesian3(1, 2, 3),
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
),
});
const interval2 = new TimeInterval({
@@ -213,7 +213,7 @@ describe("DataSources/CompositePositionProperty", function () {
isStartIncluded: false,
data: new ConstantPositionProperty(
new Cartesian3(4, 5, 6),
- ReferenceFrame.FIXED,
+ ReferenceFrame.FIXED
),
});
@@ -223,24 +223,24 @@ describe("DataSources/CompositePositionProperty", function () {
const result1 = property.getValueInReferenceFrame(
interval1.start,
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
);
expect(result1).toEqual(
interval1.data.getValueInReferenceFrame(
interval1.start,
- ReferenceFrame.INERTIAL,
- ),
+ ReferenceFrame.INERTIAL
+ )
);
const result2 = property.getValueInReferenceFrame(
interval2.stop,
- ReferenceFrame.FIXED,
+ ReferenceFrame.FIXED
);
expect(result2).toEqual(
interval2.data.getValueInReferenceFrame(
interval2.stop,
- ReferenceFrame.FIXED,
- ),
+ ReferenceFrame.FIXED
+ )
);
});
diff --git a/packages/engine/Specs/DataSources/ConstantPositionPropertySpec.js b/packages/engine/Specs/DataSources/ConstantPositionPropertySpec.js
index 4811bf078653..0d4c734aeef8 100644
--- a/packages/engine/Specs/DataSources/ConstantPositionPropertySpec.js
+++ b/packages/engine/Specs/DataSources/ConstantPositionPropertySpec.js
@@ -15,7 +15,7 @@ describe("DataSources/ConstantPositionProperty", function () {
property = new ConstantPositionProperty(
new Cartesian3(1, 2, 3),
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
);
expect(property.referenceFrame).toBe(ReferenceFrame.INERTIAL);
});
@@ -45,11 +45,11 @@ describe("DataSources/ConstantPositionProperty", function () {
time,
valueInertial,
ReferenceFrame.INERTIAL,
- ReferenceFrame.FIXED,
+ ReferenceFrame.FIXED
);
const property = new ConstantPositionProperty(
valueInertial,
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
);
const result = property.getValue(time);
@@ -64,7 +64,7 @@ describe("DataSources/ConstantPositionProperty", function () {
it("getValue works with undefined inertial value", function () {
const property = new ConstantPositionProperty(
undefined,
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
);
expect(property.getValue(time)).toBeUndefined();
});
@@ -75,7 +75,7 @@ describe("DataSources/ConstantPositionProperty", function () {
const result = property.getValueInReferenceFrame(
time,
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
);
expect(result).not.toBe(value);
expect(result).toEqual(
@@ -83,8 +83,8 @@ describe("DataSources/ConstantPositionProperty", function () {
time,
value,
ReferenceFrame.FIXED,
- ReferenceFrame.INERTIAL,
- ),
+ ReferenceFrame.INERTIAL
+ )
);
});
@@ -92,14 +92,14 @@ describe("DataSources/ConstantPositionProperty", function () {
const value = new Cartesian3(1, 2, 3);
const property = new ConstantPositionProperty(
value,
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
);
const expected = new Cartesian3();
const result = property.getValueInReferenceFrame(
time,
ReferenceFrame.FIXED,
- expected,
+ expected
);
expect(result).toBe(expected);
expect(expected).toEqual(
@@ -107,8 +107,8 @@ describe("DataSources/ConstantPositionProperty", function () {
time,
value,
ReferenceFrame.INERTIAL,
- ReferenceFrame.FIXED,
- ),
+ ReferenceFrame.FIXED
+ )
);
});
@@ -131,7 +131,7 @@ describe("DataSources/ConstantPositionProperty", function () {
it("setValue raises definitionChanged when referenceFrame changes", function () {
const property = new ConstantPositionProperty(
new Cartesian3(0, 0, 0),
- ReferenceFrame.FIXED,
+ ReferenceFrame.FIXED
);
const listener = jasmine.createSpy("listener");
property.definitionChanged.addEventListener(listener);
@@ -142,24 +142,24 @@ describe("DataSources/ConstantPositionProperty", function () {
it("equals works", function () {
const left = new ConstantPositionProperty(
new Cartesian3(1, 2, 3),
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
);
let right = new ConstantPositionProperty(
new Cartesian3(1, 2, 3),
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
);
expect(left.equals(right)).toEqual(true);
right = new ConstantPositionProperty(
new Cartesian3(1, 2, 3),
- ReferenceFrame.FIXED,
+ ReferenceFrame.FIXED
);
expect(left.equals(right)).toEqual(false);
right = new ConstantPositionProperty(
new Cartesian3(1, 2, 4),
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
);
expect(left.equals(right)).toEqual(false);
});
diff --git a/packages/engine/Specs/DataSources/CorridorGeometryUpdaterSpec.js b/packages/engine/Specs/DataSources/CorridorGeometryUpdaterSpec.js
index 599a4446c955..6f455e96ce6e 100644
--- a/packages/engine/Specs/DataSources/CorridorGeometryUpdaterSpec.js
+++ b/packages/engine/Specs/DataSources/CorridorGeometryUpdaterSpec.js
@@ -46,7 +46,7 @@ describe(
function createBasicCorridor() {
const corridor = new CorridorGraphics();
corridor.positions = new ConstantProperty(
- Cartesian3.fromDegreesArray([0, 0, 1, 0, 1, 1, 0, 1]),
+ Cartesian3.fromDegreesArray([0, 0, 1, 0, 1, 1, 0, 1])
);
corridor.width = new ConstantProperty(1);
corridor.height = new ConstantProperty(0);
@@ -58,7 +58,7 @@ describe(
function createDynamicCorridor() {
const entity = createBasicCorridor();
entity.corridor.positions = createDynamicProperty(
- Cartesian3.fromDegreesArray([0, 0, 1, 0, 1, 1, 0, 1]),
+ Cartesian3.fromDegreesArray([0, 0, 1, 0, 1, 1, 0, 1])
);
return entity;
}
@@ -66,7 +66,7 @@ describe(
function createBasicCorridorWithoutHeight() {
const corridor = new CorridorGraphics();
corridor.positions = new ConstantProperty(
- Cartesian3.fromDegreesArray([0, 0, 1, 0, 1, 1, 0, 1]),
+ Cartesian3.fromDegreesArray([0, 0, 1, 0, 1, 1, 0, 1])
);
corridor.width = new ConstantProperty(1);
const entity = new Entity();
@@ -77,7 +77,7 @@ describe(
function createDynamicCorridorWithoutHeight() {
const entity = createBasicCorridorWithoutHeight();
entity.corridor.positions = createDynamicProperty(
- Cartesian3.fromDegreesArray([0, 0, 1, 0, 1, 1, 0, 1]),
+ Cartesian3.fromDegreesArray([0, 0, 1, 0, 1, 1, 0, 1])
);
return entity;
}
@@ -148,7 +148,7 @@ describe(
start: JulianDate.now(),
stop: JulianDate.now(),
data: CornerType.ROUNDED,
- }),
+ })
);
updater._onEntityPropertyChanged(entity, "corridor");
@@ -199,7 +199,7 @@ describe(
it("dynamic updater sets properties", function () {
const corridor = new CorridorGraphics();
corridor.positions = createDynamicProperty(
- Cartesian3.fromDegreesArray([0, 0, 1, 0, 1, 1, 0, 1]),
+ Cartesian3.fromDegreesArray([0, 0, 1, 0, 1, 1, 0, 1])
);
corridor.show = createDynamicProperty(true);
corridor.height = createDynamicProperty(3);
@@ -216,7 +216,7 @@ describe(
const updater = new CorridorGeometryUpdater(entity, scene);
const dynamicUpdater = updater.createDynamicUpdater(
new PrimitiveCollection(),
- new PrimitiveCollection(),
+ new PrimitiveCollection()
);
dynamicUpdater.update(time);
@@ -224,7 +224,7 @@ describe(
expect(options.positions).toEqual(corridor.positions.getValue());
expect(options.height).toEqual(corridor.height.getValue());
expect(options.extrudedHeight).toEqual(
- corridor.extrudedHeight.getValue(),
+ corridor.extrudedHeight.getValue()
);
expect(options.width).toEqual(corridor.width.getValue());
expect(options.granularity).toEqual(corridor.granularity.getValue());
@@ -270,7 +270,7 @@ describe(
expect(updater._computeCenter(time)).toEqualEpsilon(
Cartesian3.fromDegrees(1.0, 1.0),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -282,14 +282,14 @@ describe(
CorridorGeometryUpdater,
"corridor",
createBasicCorridor,
- getScene,
+ getScene
);
createDynamicGeometryUpdaterSpecs(
CorridorGeometryUpdater,
"corridor",
createDynamicCorridor,
- getScene,
+ getScene
);
createGeometryUpdaterGroundGeometrySpecs(
@@ -297,8 +297,8 @@ describe(
"corridor",
createBasicCorridorWithoutHeight,
createDynamicCorridorWithoutHeight,
- getScene,
+ getScene
);
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/DataSources/CorridorGraphicsSpec.js b/packages/engine/Specs/DataSources/CorridorGraphicsSpec.js
index a18b4cc398ae..1f311c4d7d0d 100644
--- a/packages/engine/Specs/DataSources/CorridorGraphicsSpec.js
+++ b/packages/engine/Specs/DataSources/CorridorGraphicsSpec.js
@@ -65,10 +65,10 @@ describe("DataSources/CorridorGraphics", function () {
expect(corridor.cornerType.getValue()).toEqual(options.cornerType);
expect(corridor.shadows.getValue()).toEqual(options.shadows);
expect(corridor.distanceDisplayCondition.getValue()).toEqual(
- options.distanceDisplayCondition,
+ options.distanceDisplayCondition
);
expect(corridor.classificationType.getValue()).toEqual(
- options.classificationType,
+ options.classificationType
);
expect(corridor.zIndex.getValue()).toEqual(options.zIndex);
});
@@ -89,10 +89,10 @@ describe("DataSources/CorridorGraphics", function () {
source.cornerType = new ConstantProperty();
source.shadows = new ConstantProperty(ShadowMode.ENABLED);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
source.classificationType = new ConstantProperty(
- ClassificationType.TERRAIN,
+ ClassificationType.TERRAIN
);
source.zIndex = new ConstantProperty(3);
@@ -113,7 +113,7 @@ describe("DataSources/CorridorGraphics", function () {
expect(target.cornerType).toBe(source.cornerType);
expect(target.shadows).toBe(source.shadows);
expect(target.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
expect(target.classificationType).toBe(source.classificationType);
expect(target.zIndex).toBe(source.zIndex);
@@ -211,7 +211,7 @@ describe("DataSources/CorridorGraphics", function () {
expect(result.cornerType).toBe(source.cornerType);
expect(result.shadows).toBe(source.shadows);
expect(result.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
expect(result.classificationType).toBe(source.classificationType);
expect(result.zIndex).toBe(source.zIndex);
@@ -241,25 +241,25 @@ describe("DataSources/CorridorGraphics", function () {
property,
"cornerType",
CornerType.BEVELED,
- CornerType.MITERED,
+ CornerType.MITERED
);
testDefinitionChanged(
property,
"shadows",
ShadowMode.ENABLED,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
testDefinitionChanged(
property,
"distanceDisplayCondition",
new DistanceDisplayCondition(),
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
testDefinitionChanged(
property,
"classificationType",
ClassificationType.TERRAIN,
- ClassificationType.BOTH,
+ ClassificationType.BOTH
);
testDefinitionChanged(property, "zIndex", 3, 0);
});
diff --git a/packages/engine/Specs/DataSources/CylinderGeometryUpdaterSpec.js b/packages/engine/Specs/DataSources/CylinderGeometryUpdaterSpec.js
index b6edf9c6f11c..ff00f1535d99 100644
--- a/packages/engine/Specs/DataSources/CylinderGeometryUpdaterSpec.js
+++ b/packages/engine/Specs/DataSources/CylinderGeometryUpdaterSpec.js
@@ -44,7 +44,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- Cartesian3.fromDegrees(0, 0, 0),
+ Cartesian3.fromDegrees(0, 0, 0)
);
entity.cylinder = cylinder;
return entity;
@@ -142,7 +142,7 @@ describe(
const cylinder = new CylinderGraphics();
cylinder.outline = true;
cylinder.numberOfVerticalLines = new ConstantProperty(
- options.numberOfVerticalLines,
+ options.numberOfVerticalLines
);
cylinder.length = new ConstantProperty(options.length);
cylinder.topRadius = new ConstantProperty(options.topRadius);
@@ -166,7 +166,7 @@ describe(
expect(geometry._bottomRadius).toEqual(options.bottomRadius);
expect(geometry._length).toEqual(options.length);
expect(geometry._numberOfVerticalLines).toEqual(
- options.numberOfVerticalLines,
+ options.numberOfVerticalLines
);
expect(geometry._offsetAttribute).toBeUndefined();
});
@@ -196,29 +196,29 @@ describe(
expect(instance.geometry._offsetAttribute).toBeUndefined();
graphics.heightReference = new ConstantProperty(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
updater._onEntityPropertyChanged(entity, "cylinder");
instance = updater.createFillGeometryInstance(time);
expect(instance.geometry._offsetAttribute).toEqual(
- GeometryOffsetAttribute.ALL,
+ GeometryOffsetAttribute.ALL
);
instance = updater.createOutlineGeometryInstance(time);
expect(instance.geometry._offsetAttribute).toEqual(
- GeometryOffsetAttribute.ALL,
+ GeometryOffsetAttribute.ALL
);
graphics.heightReference = new ConstantProperty(
- HeightReference.RELATIVE_TO_GROUND,
+ HeightReference.RELATIVE_TO_GROUND
);
updater._onEntityPropertyChanged(entity, "cylinder");
instance = updater.createFillGeometryInstance(time);
expect(instance.geometry._offsetAttribute).toEqual(
- GeometryOffsetAttribute.ALL,
+ GeometryOffsetAttribute.ALL
);
instance = updater.createOutlineGeometryInstance(time);
expect(instance.geometry._offsetAttribute).toEqual(
- GeometryOffsetAttribute.ALL,
+ GeometryOffsetAttribute.ALL
);
});
@@ -236,7 +236,7 @@ describe(
const updater = new CylinderGeometryUpdater(entity, scene);
const dynamicUpdater = updater.createDynamicUpdater(
new PrimitiveCollection(),
- new PrimitiveCollection(),
+ new PrimitiveCollection()
);
dynamicUpdater.update(JulianDate.now());
const options = dynamicUpdater._options;
@@ -288,7 +288,7 @@ describe(
const updater = new CylinderGeometryUpdater(entity, scene);
expect(updater._computeCenter(time)).toEqual(
- entity.position.getValue(time),
+ entity.position.getValue(time)
);
});
@@ -300,15 +300,15 @@ describe(
CylinderGeometryUpdater,
"cylinder",
createBasicCylinder,
- getScene,
+ getScene
);
createDynamicGeometryUpdaterSpecs(
CylinderGeometryUpdater,
"cylinder",
createDynamicCylinder,
- getScene,
+ getScene
);
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/DataSources/CylinderGraphicsSpec.js b/packages/engine/Specs/DataSources/CylinderGraphicsSpec.js
index 75cc56d36cc8..acc20e7caa8e 100644
--- a/packages/engine/Specs/DataSources/CylinderGraphicsSpec.js
+++ b/packages/engine/Specs/DataSources/CylinderGraphicsSpec.js
@@ -49,7 +49,7 @@ describe("DataSources/CylinderGraphics", function () {
expect(cylinder.topRadius.getValue()).toEqual(options.topRadius);
expect(cylinder.bottomRadius.getValue()).toEqual(options.bottomRadius);
expect(cylinder.numberOfVerticalLines.getValue()).toEqual(
- options.numberOfVerticalLines,
+ options.numberOfVerticalLines
);
expect(cylinder.slices.getValue()).toEqual(options.slices);
expect(cylinder.fill.getValue()).toEqual(options.fill);
@@ -58,7 +58,7 @@ describe("DataSources/CylinderGraphics", function () {
expect(cylinder.outlineWidth.getValue()).toEqual(options.outlineWidth);
expect(cylinder.shadows.getValue()).toEqual(options.shadows);
expect(cylinder.distanceDisplayCondition.getValue()).toEqual(
- options.distanceDisplayCondition,
+ options.distanceDisplayCondition
);
});
@@ -92,7 +92,7 @@ describe("DataSources/CylinderGraphics", function () {
expect(target.outlineWidth).toBe(source.outlineWidth);
expect(target.shadows).toBe(source.shadows);
expect(target.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
});
@@ -170,7 +170,7 @@ describe("DataSources/CylinderGraphics", function () {
expect(result.outlineWidth).toBe(source.outlineWidth);
expect(result.shadows).toBe(source.shadows);
expect(result.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
});
@@ -197,13 +197,13 @@ describe("DataSources/CylinderGraphics", function () {
property,
"shadows",
ShadowMode.ENABLED,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
testDefinitionChanged(
property,
"distanceDisplayCondition",
new DistanceDisplayCondition(),
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
});
});
diff --git a/packages/engine/Specs/DataSources/CzmlDataSourceSpec.js b/packages/engine/Specs/DataSources/CzmlDataSourceSpec.js
index 735d0e24eb30..492d54fd31bc 100644
--- a/packages/engine/Specs/DataSources/CzmlDataSourceSpec.js
+++ b/packages/engine/Specs/DataSources/CzmlDataSourceSpec.js
@@ -152,14 +152,14 @@ describe("DataSources/CzmlDataSource", function () {
function cartesianFromArrayDegrees(array, startIndex, ellipsoid) {
return Cartesian3.fromDegrees.apply(
null,
- [].concat(arraySubset(array, startIndex, 3), ellipsoid),
+ [].concat(arraySubset(array, startIndex, 3), ellipsoid)
);
}
function cartesianFromArrayRadians(array, startIndex, ellipsoid) {
return Cartesian3.fromRadians.apply(
null,
- [].concat(arraySubset(array, startIndex, 3), ellipsoid),
+ [].concat(arraySubset(array, startIndex, 3), ellipsoid)
);
}
@@ -222,11 +222,11 @@ describe("DataSources/CzmlDataSource", function () {
});
it("clock returns undefined for static CZML", function () {
- return CzmlDataSource.load(makeDocument(staticCzml)).then(
- function (dataSource) {
- expect(dataSource.clock).toBeUndefined();
- },
- );
+ return CzmlDataSource.load(makeDocument(staticCzml)).then(function (
+ dataSource
+ ) {
+ expect(dataSource.clock).toBeUndefined();
+ });
});
it("clock returns CZML defined clock", function () {
@@ -260,20 +260,20 @@ describe("DataSources/CzmlDataSource", function () {
iso8601: dynamicCzml.availability,
});
- return CzmlDataSource.load(makeDocument(dynamicCzml)).then(
- function (dataSource) {
- const clock = dataSource.clock;
- expect(clock).toBeDefined();
- expect(clock.startTime).toEqual(interval.start);
- expect(clock.stopTime).toEqual(interval.stop);
- expect(clock.currentTime).toEqual(interval.start);
- expect(clock.clockRange).toEqual(ClockRange.LOOP_STOP);
- expect(clock.clockStep).toEqual(ClockStep.SYSTEM_CLOCK_MULTIPLIER);
- expect(clock.multiplier).toEqual(
- JulianDate.secondsDifference(interval.stop, interval.start) / 120.0,
- );
- },
- );
+ return CzmlDataSource.load(makeDocument(dynamicCzml)).then(function (
+ dataSource
+ ) {
+ const clock = dataSource.clock;
+ expect(clock).toBeDefined();
+ expect(clock.startTime).toEqual(interval.start);
+ expect(clock.stopTime).toEqual(interval.stop);
+ expect(clock.currentTime).toEqual(interval.start);
+ expect(clock.clockRange).toEqual(ClockRange.LOOP_STOP);
+ expect(clock.clockStep).toEqual(ClockStep.SYSTEM_CLOCK_MULTIPLIER);
+ expect(clock.multiplier).toEqual(
+ JulianDate.secondsDifference(interval.stop, interval.start) / 120.0
+ );
+ });
});
it("process loads expected data", function () {
@@ -289,7 +289,7 @@ describe("DataSources/CzmlDataSource", function () {
.process(
new Resource({
url: simpleUrl,
- }),
+ })
)
.then(function (dataSource) {
expect(dataSource.entities.values.length).toEqual(10);
@@ -529,66 +529,66 @@ describe("DataSources/CzmlDataSource", function () {
expect(entity.billboard).toBeDefined();
expect(entity.billboard.image.getValue(time).url).toEqual(
- sourceUri + packet.billboard.image,
+ sourceUri + packet.billboard.image
);
expect(entity.billboard.rotation.getValue(time)).toEqual(
- packet.billboard.rotation,
+ packet.billboard.rotation
);
expect(entity.billboard.scale.getValue(time)).toEqual(
- packet.billboard.scale,
+ packet.billboard.scale
);
expect(entity.billboard.heightReference.getValue(time)).toEqual(
- HeightReference[packet.billboard.heightReference],
+ HeightReference[packet.billboard.heightReference]
);
expect(entity.billboard.horizontalOrigin.getValue(time)).toEqual(
- HorizontalOrigin[packet.billboard.horizontalOrigin],
+ HorizontalOrigin[packet.billboard.horizontalOrigin]
);
expect(entity.billboard.verticalOrigin.getValue(time)).toEqual(
- VerticalOrigin[packet.billboard.verticalOrigin],
+ VerticalOrigin[packet.billboard.verticalOrigin]
);
expect(entity.billboard.color.getValue(time)).toEqual(
- Color.unpack(packet.billboard.color.rgbaf),
+ Color.unpack(packet.billboard.color.rgbaf)
);
expect(entity.billboard.eyeOffset.getValue(time)).toEqual(
- Cartesian3.unpack(packet.billboard.eyeOffset.cartesian),
+ Cartesian3.unpack(packet.billboard.eyeOffset.cartesian)
);
expect(entity.billboard.pixelOffset.getValue(time)).toEqual(
- Cartesian2.unpack(packet.billboard.pixelOffset.cartesian2),
+ Cartesian2.unpack(packet.billboard.pixelOffset.cartesian2)
);
expect(entity.billboard.alignedAxis.getValue(time)).toEqual(
- Cartesian3.unpack(packet.billboard.alignedAxis.unitCartesian),
+ Cartesian3.unpack(packet.billboard.alignedAxis.unitCartesian)
);
expect(entity.billboard.show.getValue(time)).toEqual(
- packet.billboard.show,
+ packet.billboard.show
);
expect(entity.billboard.sizeInMeters.getValue(time)).toEqual(
- packet.billboard.sizeInMeters,
+ packet.billboard.sizeInMeters
);
expect(entity.billboard.width.getValue(time)).toEqual(
- packet.billboard.width,
+ packet.billboard.width
);
expect(entity.billboard.height.getValue(time)).toEqual(
- packet.billboard.height,
+ packet.billboard.height
);
expect(entity.billboard.scaleByDistance.getValue(time)).toEqual(
- NearFarScalar.unpack(packet.billboard.scaleByDistance.nearFarScalar),
+ NearFarScalar.unpack(packet.billboard.scaleByDistance.nearFarScalar)
);
expect(entity.billboard.translucencyByDistance.getValue(time)).toEqual(
NearFarScalar.unpack(
- packet.billboard.translucencyByDistance.nearFarScalar,
- ),
+ packet.billboard.translucencyByDistance.nearFarScalar
+ )
);
expect(
- entity.billboard.pixelOffsetScaleByDistance.getValue(time),
+ entity.billboard.pixelOffsetScaleByDistance.getValue(time)
).toEqual(
NearFarScalar.unpack(
- packet.billboard.pixelOffsetScaleByDistance.nearFarScalar,
- ),
+ packet.billboard.pixelOffsetScaleByDistance.nearFarScalar
+ )
);
expect(entity.billboard.imageSubRegion.getValue(time)).toEqual(
BoundingRectangle.unpack(
- packet.billboard.imageSubRegion.boundingRectangle,
- ),
+ packet.billboard.imageSubRegion.boundingRectangle
+ )
);
});
});
@@ -607,16 +607,16 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.billboard).toBeDefined();
- expect(entity.billboard.alignedAxis.getValue(time)).toEqual(
- Cartesian3.unpack(packet.billboard.alignedAxis.cartesian),
- );
- },
- );
+ expect(entity.billboard).toBeDefined();
+ expect(entity.billboard.alignedAxis.getValue(time)).toEqual(
+ Cartesian3.unpack(packet.billboard.alignedAxis.cartesian)
+ );
+ });
});
it("can handle aligned axis expressed as a velocity reference", function () {
@@ -632,25 +632,25 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- const property = entity.billboard.alignedAxis;
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ const property = entity.billboard.alignedAxis;
- const expectedVelocity = new Cartesian3(1.0, 2.0, 3.0);
- const expectedVelocityDirection = Cartesian3.normalize(
- expectedVelocity,
- new Cartesian3(),
- );
+ const expectedVelocity = new Cartesian3(1.0, 2.0, 3.0);
+ const expectedVelocityDirection = Cartesian3.normalize(
+ expectedVelocity,
+ new Cartesian3()
+ );
- expect(
- property.getValue(JulianDate.fromIso8601("2016-06-17T12:00:00Z")),
- ).toEqualEpsilon(expectedVelocityDirection, CesiumMath.EPSILON15);
- expect(
- property.getValue(JulianDate.fromIso8601("2016-06-17T12:00:30Z")),
- ).toEqualEpsilon(expectedVelocityDirection, CesiumMath.EPSILON15);
- },
- );
+ expect(
+ property.getValue(JulianDate.fromIso8601("2016-06-17T12:00:00Z"))
+ ).toEqualEpsilon(expectedVelocityDirection, CesiumMath.EPSILON15);
+ expect(
+ property.getValue(JulianDate.fromIso8601("2016-06-17T12:00:30Z"))
+ ).toEqualEpsilon(expectedVelocityDirection, CesiumMath.EPSILON15);
+ });
});
it("can handle aligned axis expressed as a velocity reference within an interval", function () {
@@ -673,33 +673,33 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- const property = entity.billboard.alignedAxis;
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ const property = entity.billboard.alignedAxis;
- const expected = new Cartesian3(0, 1, 0);
- expect(
- property.getValue(JulianDate.fromIso8601("2016-06-17T12:00:00Z")),
- ).toEqual(expected);
- expect(
- property.getValue(JulianDate.fromIso8601("2016-06-17T12:00:29Z")),
- ).toEqual(expected);
+ const expected = new Cartesian3(0, 1, 0);
+ expect(
+ property.getValue(JulianDate.fromIso8601("2016-06-17T12:00:00Z"))
+ ).toEqual(expected);
+ expect(
+ property.getValue(JulianDate.fromIso8601("2016-06-17T12:00:29Z"))
+ ).toEqual(expected);
- const expectedVelocity = new Cartesian3(1.0, 2.0, 3.0);
- const expectedVelocityDirection = Cartesian3.normalize(
- expectedVelocity,
- new Cartesian3(),
- );
+ const expectedVelocity = new Cartesian3(1.0, 2.0, 3.0);
+ const expectedVelocityDirection = Cartesian3.normalize(
+ expectedVelocity,
+ new Cartesian3()
+ );
- expect(
- property.getValue(JulianDate.fromIso8601("2016-06-17T12:00:30Z")),
- ).toEqualEpsilon(expectedVelocityDirection, CesiumMath.EPSILON15);
- expect(
- property.getValue(JulianDate.fromIso8601("2016-06-17T12:01:00Z")),
- ).toEqualEpsilon(expectedVelocityDirection, CesiumMath.EPSILON12);
- },
- );
+ expect(
+ property.getValue(JulianDate.fromIso8601("2016-06-17T12:00:30Z"))
+ ).toEqualEpsilon(expectedVelocityDirection, CesiumMath.EPSILON15);
+ expect(
+ property.getValue(JulianDate.fromIso8601("2016-06-17T12:01:00Z"))
+ ).toEqualEpsilon(expectedVelocityDirection, CesiumMath.EPSILON12);
+ });
});
it("can handle image intervals both of type uri and image", function () {
@@ -726,11 +726,11 @@ describe("DataSources/CzmlDataSource", function () {
const imageProperty = entity.billboard.image;
expect(
imageProperty.getValue(JulianDate.fromIso8601("2013-01-01T00:00:00Z"))
- .url,
+ .url
).toEqual(`${source}image.png`);
expect(
imageProperty.getValue(JulianDate.fromIso8601("2013-01-01T01:00:00Z"))
- .url,
+ .url
).toEqual(`${source}image2.png`);
});
});
@@ -761,55 +761,53 @@ describe("DataSources/CzmlDataSource", function () {
}).start;
const invalidTime = JulianDate.addSeconds(validTime, -1, new JulianDate());
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.billboard).toBeDefined();
- expect(entity.billboard.image.getValue(validTime).url).toEqual(
- packet.billboard.image,
- );
- expect(entity.billboard.scale.getValue(validTime)).toEqual(
- packet.billboard.scale,
- );
- expect(entity.billboard.horizontalOrigin.getValue(validTime)).toEqual(
- HorizontalOrigin[packet.billboard.horizontalOrigin],
- );
- expect(entity.billboard.verticalOrigin.getValue(validTime)).toEqual(
- VerticalOrigin[packet.billboard.verticalOrigin],
- );
- expect(entity.billboard.color.getValue(validTime)).toEqual(
- Color.unpack(packet.billboard.color.rgbaf),
- );
- expect(entity.billboard.eyeOffset.getValue(validTime)).toEqual(
- Cartesian3.unpack(packet.billboard.eyeOffset.cartesian),
- );
- expect(entity.billboard.pixelOffset.getValue(validTime)).toEqual(
- Cartesian2.unpack(packet.billboard.pixelOffset.cartesian2),
- );
- expect(entity.billboard.show.getValue(validTime)).toEqual(
- packet.billboard.show,
- );
+ expect(entity.billboard).toBeDefined();
+ expect(entity.billboard.image.getValue(validTime).url).toEqual(
+ packet.billboard.image
+ );
+ expect(entity.billboard.scale.getValue(validTime)).toEqual(
+ packet.billboard.scale
+ );
+ expect(entity.billboard.horizontalOrigin.getValue(validTime)).toEqual(
+ HorizontalOrigin[packet.billboard.horizontalOrigin]
+ );
+ expect(entity.billboard.verticalOrigin.getValue(validTime)).toEqual(
+ VerticalOrigin[packet.billboard.verticalOrigin]
+ );
+ expect(entity.billboard.color.getValue(validTime)).toEqual(
+ Color.unpack(packet.billboard.color.rgbaf)
+ );
+ expect(entity.billboard.eyeOffset.getValue(validTime)).toEqual(
+ Cartesian3.unpack(packet.billboard.eyeOffset.cartesian)
+ );
+ expect(entity.billboard.pixelOffset.getValue(validTime)).toEqual(
+ Cartesian2.unpack(packet.billboard.pixelOffset.cartesian2)
+ );
+ expect(entity.billboard.show.getValue(validTime)).toEqual(
+ packet.billboard.show
+ );
- expect(entity.billboard).toBeDefined();
- expect(entity.billboard.image.getValue(invalidTime)).toBeUndefined();
- expect(entity.billboard.scale.getValue(invalidTime)).toBeUndefined();
- expect(
- entity.billboard.horizontalOrigin.getValue(invalidTime),
- ).toBeUndefined();
- expect(
- entity.billboard.verticalOrigin.getValue(invalidTime),
- ).toBeUndefined();
- expect(entity.billboard.color.getValue(invalidTime)).toBeUndefined();
- expect(
- entity.billboard.eyeOffset.getValue(invalidTime),
- ).toBeUndefined();
- expect(
- entity.billboard.pixelOffset.getValue(invalidTime),
- ).toBeUndefined();
- expect(entity.billboard.show.getValue(invalidTime)).toBeUndefined();
- },
- );
+ expect(entity.billboard).toBeDefined();
+ expect(entity.billboard.image.getValue(invalidTime)).toBeUndefined();
+ expect(entity.billboard.scale.getValue(invalidTime)).toBeUndefined();
+ expect(
+ entity.billboard.horizontalOrigin.getValue(invalidTime)
+ ).toBeUndefined();
+ expect(
+ entity.billboard.verticalOrigin.getValue(invalidTime)
+ ).toBeUndefined();
+ expect(entity.billboard.color.getValue(invalidTime)).toBeUndefined();
+ expect(entity.billboard.eyeOffset.getValue(invalidTime)).toBeUndefined();
+ expect(
+ entity.billboard.pixelOffset.getValue(invalidTime)
+ ).toBeUndefined();
+ expect(entity.billboard.show.getValue(invalidTime)).toBeUndefined();
+ });
});
it("can load interval data with further constrained intervals in subproperties", function () {
@@ -850,45 +848,41 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.billboard).toBeDefined();
- expect(entity.ellipsoid).toBeDefined();
-
- // before billboard interval: not defined, even though the scaleByDistance includes the time in its intervals
- let time = JulianDate.fromIso8601("2009-01-01T00:00:00Z");
- expect(entity.billboard.scaleByDistance.getValue(time)).toBeUndefined();
- expect(entity.ellipsoid.material.getValue(time)).toBeUndefined();
-
- // within both billboard and scaleByDistance intervals
- time = JulianDate.fromIso8601("2010-01-01T00:05:00Z");
- expect(entity.billboard.scaleByDistance.getValue(time)).toEqual(
- NearFarScalar.unpack(
- packet.billboard.scaleByDistance[0].nearFarScalar,
- ),
- );
- expect(entity.ellipsoid.material.getValue(time).color).toEqual(
- Color.unpack(packet.ellipsoid.material[0].solidColor.color.rgbaf),
- );
+ expect(entity.billboard).toBeDefined();
+ expect(entity.ellipsoid).toBeDefined();
- time = JulianDate.fromIso8601("2010-01-01T00:35:00Z");
- expect(entity.billboard.scaleByDistance.getValue(time)).toEqual(
- NearFarScalar.unpack(
- packet.billboard.scaleByDistance[1].nearFarScalar,
- ),
- );
- expect(entity.ellipsoid.material.getValue(time).color).toEqual(
- Color.unpack(packet.ellipsoid.material[1].solidColor.color.rgbaf),
- );
+ // before billboard interval: not defined, even though the scaleByDistance includes the time in its intervals
+ let time = JulianDate.fromIso8601("2009-01-01T00:00:00Z");
+ expect(entity.billboard.scaleByDistance.getValue(time)).toBeUndefined();
+ expect(entity.ellipsoid.material.getValue(time)).toBeUndefined();
- // after billboard interval: not defined, even though the scaleByDistance includes the time in its intervals
- time = JulianDate.fromIso8601("2010-01-03T00:00:00Z");
- expect(entity.billboard.scaleByDistance.getValue(time)).toBeUndefined();
- expect(entity.ellipsoid.material.getValue(time)).toBeUndefined();
- },
- );
+ // within both billboard and scaleByDistance intervals
+ time = JulianDate.fromIso8601("2010-01-01T00:05:00Z");
+ expect(entity.billboard.scaleByDistance.getValue(time)).toEqual(
+ NearFarScalar.unpack(packet.billboard.scaleByDistance[0].nearFarScalar)
+ );
+ expect(entity.ellipsoid.material.getValue(time).color).toEqual(
+ Color.unpack(packet.ellipsoid.material[0].solidColor.color.rgbaf)
+ );
+
+ time = JulianDate.fromIso8601("2010-01-01T00:35:00Z");
+ expect(entity.billboard.scaleByDistance.getValue(time)).toEqual(
+ NearFarScalar.unpack(packet.billboard.scaleByDistance[1].nearFarScalar)
+ );
+ expect(entity.ellipsoid.material.getValue(time).color).toEqual(
+ Color.unpack(packet.ellipsoid.material[1].solidColor.color.rgbaf)
+ );
+
+ // after billboard interval: not defined, even though the scaleByDistance includes the time in its intervals
+ time = JulianDate.fromIso8601("2010-01-03T00:00:00Z");
+ expect(entity.billboard.scaleByDistance.getValue(time)).toBeUndefined();
+ expect(entity.ellipsoid.material.getValue(time)).toBeUndefined();
+ });
});
it("can constrain a constant property by sending an interval in a subsequent packet", function () {
@@ -921,18 +915,18 @@ describe("DataSources/CzmlDataSource", function () {
expect(entity.billboard.scale).toBeInstanceOf(CompositeProperty);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2009-01-01T00:00:00Z"),
- ),
+ JulianDate.fromIso8601("2009-01-01T00:00:00Z")
+ )
).toEqual(constantPacket.billboard.scale);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2010-01-01T00:00:00Z"),
- ),
+ JulianDate.fromIso8601("2010-01-01T00:00:00Z")
+ )
).toEqual(intervalPacket.billboard.scale.number);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2011-01-01T00:00:00Z"),
- ),
+ JulianDate.fromIso8601("2011-01-01T00:00:00Z")
+ )
).toEqual(constantPacket.billboard.scale);
});
});
@@ -964,30 +958,24 @@ describe("DataSources/CzmlDataSource", function () {
expect(entity.position).toBeInstanceOf(CompositePositionProperty);
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2009-01-01T00:00:00Z"),
- ),
+ JulianDate.fromIso8601("2009-01-01T00:00:00Z")
+ )
).toEqual(
- cartesianFromArrayDegrees(
- constantPacket.position.cartographicDegrees,
- ),
+ cartesianFromArrayDegrees(constantPacket.position.cartographicDegrees)
);
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2010-01-01T00:00:00Z"),
- ),
+ JulianDate.fromIso8601("2010-01-01T00:00:00Z")
+ )
).toEqual(
- cartesianFromArrayDegrees(
- intervalPacket.position.cartographicDegrees,
- ),
+ cartesianFromArrayDegrees(intervalPacket.position.cartographicDegrees)
);
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2011-01-01T00:00:00Z"),
- ),
+ JulianDate.fromIso8601("2011-01-01T00:00:00Z")
+ )
).toEqual(
- cartesianFromArrayDegrees(
- constantPacket.position.cartographicDegrees,
- ),
+ cartesianFromArrayDegrees(constantPacket.position.cartographicDegrees)
);
});
});
@@ -1032,35 +1020,35 @@ describe("DataSources/CzmlDataSource", function () {
expect(entity.billboard.scale).toBeInstanceOf(CompositeProperty);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2010-01-01T00:00:00Z"),
- ),
+ JulianDate.fromIso8601("2010-01-01T00:00:00Z")
+ )
).toEqual(1.0);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2010-01-01T00:20:00Z"),
- ),
+ JulianDate.fromIso8601("2010-01-01T00:20:00Z")
+ )
).toEqual(10.0);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2010-01-01T00:21:00Z"),
- ),
+ JulianDate.fromIso8601("2010-01-01T00:21:00Z")
+ )
).toEqual(15.0);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2010-01-01T00:22:00Z"),
- ),
+ JulianDate.fromIso8601("2010-01-01T00:22:00Z")
+ )
).toEqual(20.0);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2010-01-01T01:00:00Z"),
- ),
+ JulianDate.fromIso8601("2010-01-01T01:00:00Z")
+ )
).toEqual(2.0);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2010-01-01T02:00:00Z"),
- ),
+ JulianDate.fromIso8601("2010-01-01T02:00:00Z")
+ )
).toEqual(3.0);
});
});
@@ -1112,33 +1100,33 @@ describe("DataSources/CzmlDataSource", function () {
expect(entity.position).toBeInstanceOf(CompositePositionProperty);
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2010-01-01T00:00:00Z"),
- ),
+ JulianDate.fromIso8601("2010-01-01T00:00:00Z")
+ )
).toEqual(Cartesian3.fromDegrees(34, 117, 10000));
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2010-01-01T00:20:00Z"),
- ),
+ JulianDate.fromIso8601("2010-01-01T00:20:00Z")
+ )
).toEqual(Cartesian3.fromDegrees(40, 100, 10000));
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2010-01-01T00:21:00Z"),
- ),
+ JulianDate.fromIso8601("2010-01-01T00:21:00Z")
+ )
).toEqualEpsilon(
Cartesian3.fromDegrees(40, 100, 15000),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2010-01-01T00:22:00Z"),
- ),
+ JulianDate.fromIso8601("2010-01-01T00:22:00Z")
+ )
).toEqual(Cartesian3.fromDegrees(40, 100, 20000));
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2010-01-01T01:00:00Z"),
- ),
+ JulianDate.fromIso8601("2010-01-01T01:00:00Z")
+ )
).toEqual(Cartesian3.fromDegrees(34, 117, 20000));
});
});
@@ -1155,25 +1143,25 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.billboard).toBeDefined();
- const date1 = epoch;
- const date2 = JulianDate.addSeconds(epoch, 0.5, new JulianDate());
- const date3 = JulianDate.addSeconds(epoch, 1.0, new JulianDate());
- expect(entity.billboard.pixelOffset.getValue(date1)).toEqual(
- new Cartesian2(1.0, 2.0),
- );
- expect(entity.billboard.pixelOffset.getValue(date2)).toEqual(
- new Cartesian2(2.0, 3.0),
- );
- expect(entity.billboard.pixelOffset.getValue(date3)).toEqual(
- new Cartesian2(3.0, 4.0),
- );
- },
- );
+ expect(entity.billboard).toBeDefined();
+ const date1 = epoch;
+ const date2 = JulianDate.addSeconds(epoch, 0.5, new JulianDate());
+ const date3 = JulianDate.addSeconds(epoch, 1.0, new JulianDate());
+ expect(entity.billboard.pixelOffset.getValue(date1)).toEqual(
+ new Cartesian2(1.0, 2.0)
+ );
+ expect(entity.billboard.pixelOffset.getValue(date2)).toEqual(
+ new Cartesian2(2.0, 3.0)
+ );
+ expect(entity.billboard.pixelOffset.getValue(date3)).toEqual(
+ new Cartesian2(3.0, 4.0)
+ );
+ });
});
it("can handle interval billboard scaleByDistance", function () {
@@ -1192,31 +1180,27 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.billboard).toBeDefined();
- expect(
- entity.billboard.scaleByDistance.getValue(
- JulianDate.fromIso8601("2013-01-01T00:00:00Z"),
- ),
- ).toEqual(
- NearFarScalar.unpack(
- packet.billboard.scaleByDistance[0].nearFarScalar,
- ),
- );
- expect(
- entity.billboard.scaleByDistance.getValue(
- JulianDate.fromIso8601("2013-01-01T01:00:00Z"),
- ),
- ).toEqual(
- NearFarScalar.unpack(
- packet.billboard.scaleByDistance[1].nearFarScalar,
- ),
- );
- },
- );
+ expect(entity.billboard).toBeDefined();
+ expect(
+ entity.billboard.scaleByDistance.getValue(
+ JulianDate.fromIso8601("2013-01-01T00:00:00Z")
+ )
+ ).toEqual(
+ NearFarScalar.unpack(packet.billboard.scaleByDistance[0].nearFarScalar)
+ );
+ expect(
+ entity.billboard.scaleByDistance.getValue(
+ JulianDate.fromIso8601("2013-01-01T01:00:00Z")
+ )
+ ).toEqual(
+ NearFarScalar.unpack(packet.billboard.scaleByDistance[1].nearFarScalar)
+ );
+ });
});
it("can handle sampled billboard scaleByDistance", function () {
@@ -1231,25 +1215,25 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.billboard).toBeDefined();
- const date1 = epoch;
- const date2 = JulianDate.addSeconds(epoch, 1.0, new JulianDate());
- const date3 = JulianDate.addSeconds(epoch, 2.0, new JulianDate());
- expect(entity.billboard.scaleByDistance.getValue(date1)).toEqual(
- new NearFarScalar(1.0, 2.0, 10000.0, 3.0),
- );
- expect(entity.billboard.scaleByDistance.getValue(date2)).toEqual(
- new NearFarScalar(1.5, 2.5, 15000.0, 3.5),
- );
- expect(entity.billboard.scaleByDistance.getValue(date3)).toEqual(
- new NearFarScalar(2.0, 3.0, 20000.0, 4.0),
- );
- },
- );
+ expect(entity.billboard).toBeDefined();
+ const date1 = epoch;
+ const date2 = JulianDate.addSeconds(epoch, 1.0, new JulianDate());
+ const date3 = JulianDate.addSeconds(epoch, 2.0, new JulianDate());
+ expect(entity.billboard.scaleByDistance.getValue(date1)).toEqual(
+ new NearFarScalar(1.0, 2.0, 10000.0, 3.0)
+ );
+ expect(entity.billboard.scaleByDistance.getValue(date2)).toEqual(
+ new NearFarScalar(1.5, 2.5, 15000.0, 3.5)
+ );
+ expect(entity.billboard.scaleByDistance.getValue(date3)).toEqual(
+ new NearFarScalar(2.0, 3.0, 20000.0, 4.0)
+ );
+ });
});
it("can handle sampled billboard color rgba.", function () {
@@ -1264,25 +1248,25 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.billboard).toBeDefined();
- const date1 = epoch;
- const date2 = JulianDate.addSeconds(epoch, 1.0, new JulianDate());
- const date3 = JulianDate.addSeconds(epoch, 2.0, new JulianDate());
- expect(entity.billboard.color.getValue(date1)).toEqual(
- Color.fromBytes(200, 202, 204, 206),
- );
- expect(entity.billboard.color.getValue(date2)).toEqual(
- Color.fromBytes(100, 101, 102, 103),
- );
- expect(entity.billboard.color.getValue(date3)).toEqual(
- Color.fromBytes(0, 0, 0, 0),
- );
- },
- );
+ expect(entity.billboard).toBeDefined();
+ const date1 = epoch;
+ const date2 = JulianDate.addSeconds(epoch, 1.0, new JulianDate());
+ const date3 = JulianDate.addSeconds(epoch, 2.0, new JulianDate());
+ expect(entity.billboard.color.getValue(date1)).toEqual(
+ Color.fromBytes(200, 202, 204, 206)
+ );
+ expect(entity.billboard.color.getValue(date2)).toEqual(
+ Color.fromBytes(100, 101, 102, 103)
+ );
+ expect(entity.billboard.color.getValue(date3)).toEqual(
+ Color.fromBytes(0, 0, 0, 0)
+ );
+ });
});
it("can handle clock data.", function () {
@@ -1308,7 +1292,7 @@ describe("DataSources/CzmlDataSource", function () {
expect(clock.startTime).toEqual(interval.start);
expect(clock.stopTime).toEqual(interval.stop);
expect(clock.currentTime).toEqual(
- JulianDate.fromIso8601(documentPacket.clock.currentTime),
+ JulianDate.fromIso8601(documentPacket.clock.currentTime)
);
expect(clock.clockRange).toEqual(ClockRange[documentPacket.clock.range]);
expect(clock.clockStep).toEqual(ClockStep[documentPacket.clock.step]);
@@ -1323,15 +1307,15 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- const resultCartesian = entity.position.getValue(JulianDate.now());
- expect(resultCartesian).toEqual(
- cartesianFromArrayDegrees(packet.position.cartographicDegrees),
- );
- },
- );
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ const resultCartesian = entity.position.getValue(JulianDate.now());
+ expect(resultCartesian).toEqual(
+ cartesianFromArrayDegrees(packet.position.cartographicDegrees)
+ );
+ });
});
it("can handle position specified as constant cartographicsDegrees with non-standard ellipsoid", async function () {
@@ -1349,8 +1333,8 @@ describe("DataSources/CzmlDataSource", function () {
cartesianFromArrayDegrees(
packet.position.cartographicDegrees,
0,
- Ellipsoid.default,
- ),
+ Ellipsoid.default
+ )
);
Ellipsoid.default = Ellipsoid.WGS84;
});
@@ -1369,14 +1353,14 @@ describe("DataSources/CzmlDataSource", function () {
const entity = dataSource.entities.values[0];
let resultCartesian = entity.position.getValue(epoch);
expect(resultCartesian).toEqual(
- cartesianFromArrayDegrees(packet.position.cartographicDegrees, 1),
+ cartesianFromArrayDegrees(packet.position.cartographicDegrees, 1)
);
resultCartesian = entity.position.getValue(
- JulianDate.addSeconds(epoch, 1, new JulianDate()),
+ JulianDate.addSeconds(epoch, 1, new JulianDate())
);
expect(resultCartesian).toEqual(
- cartesianFromArrayDegrees(packet.position.cartographicDegrees, 5),
+ cartesianFromArrayDegrees(packet.position.cartographicDegrees, 5)
);
});
@@ -1403,12 +1387,12 @@ describe("DataSources/CzmlDataSource", function () {
const entity = dataSource.entities.values[0];
let resultCartesian = entity.position.getValue(firstDate);
expect(resultCartesian).toEqual(
- cartesianFromArrayDegrees(packet.position.cartographicDegrees, 1),
+ cartesianFromArrayDegrees(packet.position.cartographicDegrees, 1)
);
resultCartesian = entity.position.getValue(lastDate);
expect(resultCartesian).toEqual(
- cartesianFromArrayDegrees(packet.position.cartographicDegrees, 5),
+ cartesianFromArrayDegrees(packet.position.cartographicDegrees, 5)
);
});
@@ -1423,7 +1407,7 @@ describe("DataSources/CzmlDataSource", function () {
const entity = dataSource.entities.values[0];
const resultCartesian = entity.position.getValue(JulianDate.now());
expect(resultCartesian).toEqual(
- cartesianFromArrayRadians(packet.position.cartographicRadians),
+ cartesianFromArrayRadians(packet.position.cartographicRadians)
);
});
@@ -1442,8 +1426,8 @@ describe("DataSources/CzmlDataSource", function () {
cartesianFromArrayRadians(
packet.position.cartographicRadians,
0,
- Ellipsoid.default,
- ),
+ Ellipsoid.default
+ )
);
Ellipsoid.default = Ellipsoid.WGS84;
});
@@ -1458,22 +1442,22 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- let resultCartesian = entity.position.getValue(epoch);
- expect(resultCartesian).toEqual(
- cartesianFromArrayRadians(packet.position.cartographicRadians, 1),
- );
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ let resultCartesian = entity.position.getValue(epoch);
+ expect(resultCartesian).toEqual(
+ cartesianFromArrayRadians(packet.position.cartographicRadians, 1)
+ );
- resultCartesian = entity.position.getValue(
- JulianDate.addSeconds(epoch, 1, new JulianDate()),
- );
- expect(resultCartesian).toEqual(
- cartesianFromArrayRadians(packet.position.cartographicRadians, 5),
- );
- },
- );
+ resultCartesian = entity.position.getValue(
+ JulianDate.addSeconds(epoch, 1, new JulianDate())
+ );
+ expect(resultCartesian).toEqual(
+ cartesianFromArrayRadians(packet.position.cartographicRadians, 5)
+ );
+ });
});
it("can set position reference frame", function () {
@@ -1520,12 +1504,12 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- expect(entity.position.referenceFrame).toEqual(ReferenceFrame.FIXED);
- },
- );
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ expect(entity.position.referenceFrame).toEqual(ReferenceFrame.FIXED);
+ });
});
it("does not reset value to FIXED when omitting reference frame on subsequent packet", function () {
@@ -1578,16 +1562,16 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.ellipse).toBeDefined();
- expect(entity.ellipse.semiMajorAxis.getValue(firstDate)).toEqual(0);
- expect(entity.ellipse.semiMajorAxis.getValue(midDate)).toEqual(5);
- expect(entity.ellipse.semiMajorAxis.getValue(lastDate)).toEqual(10);
- },
- );
+ expect(entity.ellipse).toBeDefined();
+ expect(entity.ellipse.semiMajorAxis.getValue(firstDate)).toEqual(0);
+ expect(entity.ellipse.semiMajorAxis.getValue(midDate)).toEqual(5);
+ expect(entity.ellipse.semiMajorAxis.getValue(lastDate)).toEqual(10);
+ });
});
it("can load a direction specified as constant unitSpherical", function () {
@@ -1599,17 +1583,17 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- const resultCartesian = entity.billboard.alignedAxis.getValue(
- JulianDate.now(),
- );
- expect(resultCartesian).toEqual(
- Cartesian3.fromSpherical(new Spherical(1.0, 2.0)),
- );
- },
- );
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ const resultCartesian = entity.billboard.alignedAxis.getValue(
+ JulianDate.now()
+ );
+ expect(resultCartesian).toEqual(
+ Cartesian3.fromSpherical(new Spherical(1.0, 2.0))
+ );
+ });
});
it("can load a direction specified as sampled unitSpherical", function () {
@@ -1624,22 +1608,22 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- let resultCartesian = entity.billboard.alignedAxis.getValue(epoch);
- expect(resultCartesian).toEqual(
- Cartesian3.fromSpherical(new Spherical(1.0, 2.0)),
- );
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ let resultCartesian = entity.billboard.alignedAxis.getValue(epoch);
+ expect(resultCartesian).toEqual(
+ Cartesian3.fromSpherical(new Spherical(1.0, 2.0))
+ );
- resultCartesian = entity.billboard.alignedAxis.getValue(
- JulianDate.addSeconds(epoch, 1, new JulianDate()),
- );
- expect(resultCartesian).toEqual(
- Cartesian3.fromSpherical(new Spherical(-1.0, -2.0)),
- );
- },
- );
+ resultCartesian = entity.billboard.alignedAxis.getValue(
+ JulianDate.addSeconds(epoch, 1, new JulianDate())
+ );
+ expect(resultCartesian).toEqual(
+ Cartesian3.fromSpherical(new Spherical(-1.0, -2.0))
+ );
+ });
});
it("can load a direction specified as constant spherical", function () {
@@ -1651,19 +1635,17 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- const resultCartesian = entity.billboard.alignedAxis.getValue(
- JulianDate.now(),
- );
- const expected = Cartesian3.fromSpherical(
- new Spherical(1.0, 2.0, 30.0),
- );
- Cartesian3.normalize(expected, expected);
- expect(resultCartesian).toEqual(expected);
- },
- );
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ const resultCartesian = entity.billboard.alignedAxis.getValue(
+ JulianDate.now()
+ );
+ const expected = Cartesian3.fromSpherical(new Spherical(1.0, 2.0, 30.0));
+ Cartesian3.normalize(expected, expected);
+ expect(resultCartesian).toEqual(expected);
+ });
});
it("can load a direction specified as sampled spherical", function () {
@@ -1678,22 +1660,22 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- let resultCartesian = entity.billboard.alignedAxis.getValue(epoch);
- let expected = Cartesian3.fromSpherical(new Spherical(1.0, 2.0, 30.0));
- Cartesian3.normalize(expected, expected);
- expect(resultCartesian).toEqual(expected);
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ let resultCartesian = entity.billboard.alignedAxis.getValue(epoch);
+ let expected = Cartesian3.fromSpherical(new Spherical(1.0, 2.0, 30.0));
+ Cartesian3.normalize(expected, expected);
+ expect(resultCartesian).toEqual(expected);
- resultCartesian = entity.billboard.alignedAxis.getValue(
- JulianDate.addSeconds(epoch, 1, new JulianDate()),
- );
- expected = Cartesian3.fromSpherical(new Spherical(-1.0, -2.0, 40.0));
- Cartesian3.normalize(expected, expected);
- expect(resultCartesian).toEqual(expected);
- },
- );
+ resultCartesian = entity.billboard.alignedAxis.getValue(
+ JulianDate.addSeconds(epoch, 1, new JulianDate())
+ );
+ expected = Cartesian3.fromSpherical(new Spherical(-1.0, -2.0, 40.0));
+ Cartesian3.normalize(expected, expected);
+ expect(resultCartesian).toEqual(expected);
+ });
});
it("can load constant data for ellipse", function () {
@@ -1715,40 +1697,40 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.ellipse).toBeDefined();
- 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(time)).toEqual(
- packet.ellipse.outline,
- );
- 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(time)).toEqual(
- packet.ellipse.zIndex,
- );
- expect(entity.ellipse.classificationType.getValue(time)).toEqual(
- ClassificationType[packet.ellipse.classificationType],
- );
- },
- );
+ expect(entity.ellipse).toBeDefined();
+ 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(time)).toEqual(
+ packet.ellipse.outline
+ );
+ 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(time)).toEqual(
+ packet.ellipse.zIndex
+ );
+ expect(entity.ellipse.classificationType.getValue(time)).toEqual(
+ ClassificationType[packet.ellipse.classificationType]
+ );
+ });
});
it("can load interval data for ellipse", function () {
@@ -1762,43 +1744,43 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- const validTime = TimeInterval.fromIso8601({
- iso8601: packet.ellipse.interval,
- }).start;
- const invalidTime = JulianDate.addSeconds(
- validTime,
- -1,
- new JulianDate(),
- );
+ const validTime = TimeInterval.fromIso8601({
+ iso8601: packet.ellipse.interval,
+ }).start;
+ const invalidTime = JulianDate.addSeconds(
+ validTime,
+ -1,
+ new JulianDate()
+ );
- expect(entity.ellipse).toBeDefined();
- expect(entity.ellipse.semiMajorAxis.getValue(validTime)).toEqual(
- packet.ellipse.semiMajorAxis,
- );
- expect(entity.ellipse.semiMinorAxis.getValue(validTime)).toEqual(
- packet.ellipse.semiMinorAxis,
- );
- expect(entity.ellipse.rotation.getValue(validTime)).toEqual(
- packet.ellipse.rotation,
- );
- expect(entity.ellipse.shadows.getValue(validTime)).toEqual(
- ShadowMode[packet.ellipse.shadows],
- );
+ expect(entity.ellipse).toBeDefined();
+ expect(entity.ellipse.semiMajorAxis.getValue(validTime)).toEqual(
+ packet.ellipse.semiMajorAxis
+ );
+ expect(entity.ellipse.semiMinorAxis.getValue(validTime)).toEqual(
+ packet.ellipse.semiMinorAxis
+ );
+ expect(entity.ellipse.rotation.getValue(validTime)).toEqual(
+ packet.ellipse.rotation
+ );
+ expect(entity.ellipse.shadows.getValue(validTime)).toEqual(
+ ShadowMode[packet.ellipse.shadows]
+ );
- expect(
- entity.ellipse.semiMajorAxis.getValue(invalidTime),
- ).toBeUndefined();
- expect(
- entity.ellipse.semiMinorAxis.getValue(invalidTime),
- ).toBeUndefined();
- expect(entity.ellipse.rotation.getValue(invalidTime)).toBeUndefined();
- expect(entity.ellipse.shadows.getValue(invalidTime)).toBeUndefined();
- },
- );
+ expect(
+ entity.ellipse.semiMajorAxis.getValue(invalidTime)
+ ).toBeUndefined();
+ expect(
+ entity.ellipse.semiMinorAxis.getValue(invalidTime)
+ ).toBeUndefined();
+ expect(entity.ellipse.rotation.getValue(invalidTime)).toBeUndefined();
+ expect(entity.ellipse.shadows.getValue(invalidTime)).toBeUndefined();
+ });
});
it("can load constant data for ellipsoid", function () {
@@ -1829,43 +1811,43 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.ellipsoid).toBeDefined();
- expect(entity.ellipsoid.radii.getValue(time)).toEqual(
- Cartesian3.unpack(packet.ellipsoid.radii.cartesian),
- );
- expect(entity.ellipsoid.show.getValue(time)).toEqual(
- packet.ellipsoid.show,
- );
- 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(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],
- );
- },
- );
+ expect(entity.ellipsoid).toBeDefined();
+ expect(entity.ellipsoid.radii.getValue(time)).toEqual(
+ Cartesian3.unpack(packet.ellipsoid.radii.cartesian)
+ );
+ expect(entity.ellipsoid.show.getValue(time)).toEqual(
+ packet.ellipsoid.show
+ );
+ 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(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]
+ );
+ });
});
it("can load interval data for ellipsoid", function () {
@@ -1892,30 +1874,30 @@ describe("DataSources/CzmlDataSource", function () {
}).start;
const invalidTime = JulianDate.addSeconds(validTime, -1, new JulianDate());
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.ellipsoid).toBeDefined();
- expect(entity.ellipsoid.radii.getValue(validTime)).toEqual(
- Cartesian3.unpack(packet.ellipsoid.radii.cartesian),
- );
- expect(entity.ellipsoid.show.getValue(validTime)).toEqual(
- packet.ellipsoid.show,
- );
- expect(entity.ellipsoid.material.getValue(validTime).color).toEqual(
- Color.unpack(packet.ellipsoid.material.solidColor.color.rgbaf),
- );
- expect(entity.ellipsoid.shadows.getValue(validTime)).toEqual(
- ShadowMode[packet.ellipsoid.shadows],
- );
+ expect(entity.ellipsoid).toBeDefined();
+ expect(entity.ellipsoid.radii.getValue(validTime)).toEqual(
+ Cartesian3.unpack(packet.ellipsoid.radii.cartesian)
+ );
+ expect(entity.ellipsoid.show.getValue(validTime)).toEqual(
+ packet.ellipsoid.show
+ );
+ expect(entity.ellipsoid.material.getValue(validTime).color).toEqual(
+ Color.unpack(packet.ellipsoid.material.solidColor.color.rgbaf)
+ );
+ expect(entity.ellipsoid.shadows.getValue(validTime)).toEqual(
+ ShadowMode[packet.ellipsoid.shadows]
+ );
- expect(entity.ellipsoid.radii.getValue(invalidTime)).toBeUndefined();
- expect(entity.ellipsoid.show.getValue(invalidTime)).toBeUndefined();
- expect(entity.ellipsoid.material.getValue(invalidTime)).toBeUndefined();
- expect(entity.ellipsoid.shadows.getValue(invalidTime)).toBeUndefined();
- },
- );
+ expect(entity.ellipsoid.radii.getValue(invalidTime)).toBeUndefined();
+ expect(entity.ellipsoid.show.getValue(invalidTime)).toBeUndefined();
+ expect(entity.ellipsoid.material.getValue(invalidTime)).toBeUndefined();
+ expect(entity.ellipsoid.shadows.getValue(invalidTime)).toBeUndefined();
+ });
});
it("can load constant data for label", function () {
@@ -1952,51 +1934,49 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.label).toBeDefined();
- 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(time)).toEqual(
- Color.unpack(packet.label.fillColor.rgbaf),
- );
- expect(entity.label.outlineColor.getValue(time)).toEqual(
- Color.unpack(packet.label.outlineColor.rgbaf),
- );
- expect(entity.label.outlineWidth.getValue(time)).toEqual(
- packet.label.outlineWidth,
- );
- expect(entity.label.horizontalOrigin.getValue(time)).toEqual(
- HorizontalOrigin[packet.label.horizontalOrigin],
- );
- expect(entity.label.verticalOrigin.getValue(time)).toEqual(
- VerticalOrigin[packet.label.verticalOrigin],
- );
- expect(entity.label.eyeOffset.getValue(time)).toEqual(
- Cartesian3.unpack(packet.label.eyeOffset.cartesian),
- );
- expect(entity.label.pixelOffset.getValue(time)).toEqual(
- Cartesian2.unpack(packet.label.pixelOffset.cartesian2),
- );
- 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(time)).toEqual(
- NearFarScalar.unpack(
- packet.label.pixelOffsetScaleByDistance.nearFarScalar,
- ),
- );
- },
- );
+ expect(entity.label).toBeDefined();
+ 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(time)).toEqual(
+ Color.unpack(packet.label.fillColor.rgbaf)
+ );
+ expect(entity.label.outlineColor.getValue(time)).toEqual(
+ Color.unpack(packet.label.outlineColor.rgbaf)
+ );
+ expect(entity.label.outlineWidth.getValue(time)).toEqual(
+ packet.label.outlineWidth
+ );
+ expect(entity.label.horizontalOrigin.getValue(time)).toEqual(
+ HorizontalOrigin[packet.label.horizontalOrigin]
+ );
+ expect(entity.label.verticalOrigin.getValue(time)).toEqual(
+ VerticalOrigin[packet.label.verticalOrigin]
+ );
+ expect(entity.label.eyeOffset.getValue(time)).toEqual(
+ Cartesian3.unpack(packet.label.eyeOffset.cartesian)
+ );
+ expect(entity.label.pixelOffset.getValue(time)).toEqual(
+ Cartesian2.unpack(packet.label.pixelOffset.cartesian2)
+ );
+ 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(time)).toEqual(
+ NearFarScalar.unpack(
+ packet.label.pixelOffsetScaleByDistance.nearFarScalar
+ )
+ );
+ });
});
it("can load interval data for label", function () {
@@ -2031,66 +2011,58 @@ describe("DataSources/CzmlDataSource", function () {
}).start;
const invalidTime = JulianDate.addSeconds(validTime, -1, new JulianDate());
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
-
- expect(entity.label).toBeDefined();
- expect(entity.label.text.getValue(validTime)).toEqual(
- packet.label.text,
- );
- expect(entity.label.font.getValue(validTime)).toEqual(
- packet.label.font,
- );
- expect(entity.label.style.getValue(validTime)).toEqual(
- LabelStyle[packet.label.style],
- );
- expect(entity.label.fillColor.getValue(validTime)).toEqual(
- Color.unpack(packet.label.fillColor.rgbaf),
- );
- expect(entity.label.outlineColor.getValue(validTime)).toEqual(
- Color.unpack(packet.label.outlineColor.rgbaf),
- );
- expect(entity.label.outlineWidth.getValue(validTime)).toEqual(
- packet.label.outlineWidth,
- );
- expect(entity.label.horizontalOrigin.getValue(validTime)).toEqual(
- HorizontalOrigin[packet.label.horizontalOrigin],
- );
- expect(entity.label.verticalOrigin.getValue(validTime)).toEqual(
- VerticalOrigin[packet.label.verticalOrigin],
- );
- expect(entity.label.eyeOffset.getValue(validTime)).toEqual(
- Cartesian3.unpack(packet.label.eyeOffset.cartesian),
- );
- expect(entity.label.pixelOffset.getValue(validTime)).toEqual(
- Cartesian2.unpack(packet.label.pixelOffset.cartesian2),
- );
- expect(entity.label.scale.getValue(validTime)).toEqual(
- packet.label.scale,
- );
- expect(entity.label.show.getValue(validTime)).toEqual(
- packet.label.show,
- );
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.label.text.getValue(invalidTime)).toBeUndefined();
- expect(entity.label.font.getValue(invalidTime)).toBeUndefined();
- expect(entity.label.style.getValue(invalidTime)).toBeUndefined();
- expect(entity.label.fillColor.getValue(invalidTime)).toBeUndefined();
- expect(entity.label.outlineColor.getValue(invalidTime)).toBeUndefined();
- expect(entity.label.outlineWidth.getValue(invalidTime)).toBeUndefined();
- expect(
- entity.label.horizontalOrigin.getValue(invalidTime),
- ).toBeUndefined();
- expect(
- entity.label.verticalOrigin.getValue(invalidTime),
- ).toBeUndefined();
- expect(entity.label.eyeOffset.getValue(invalidTime)).toBeUndefined();
- expect(entity.label.pixelOffset.getValue(invalidTime)).toBeUndefined();
- expect(entity.label.scale.getValue(invalidTime)).toBeUndefined();
- expect(entity.label.show.getValue(invalidTime)).toBeUndefined();
- },
- );
+ expect(entity.label).toBeDefined();
+ expect(entity.label.text.getValue(validTime)).toEqual(packet.label.text);
+ expect(entity.label.font.getValue(validTime)).toEqual(packet.label.font);
+ expect(entity.label.style.getValue(validTime)).toEqual(
+ LabelStyle[packet.label.style]
+ );
+ expect(entity.label.fillColor.getValue(validTime)).toEqual(
+ Color.unpack(packet.label.fillColor.rgbaf)
+ );
+ expect(entity.label.outlineColor.getValue(validTime)).toEqual(
+ Color.unpack(packet.label.outlineColor.rgbaf)
+ );
+ expect(entity.label.outlineWidth.getValue(validTime)).toEqual(
+ packet.label.outlineWidth
+ );
+ expect(entity.label.horizontalOrigin.getValue(validTime)).toEqual(
+ HorizontalOrigin[packet.label.horizontalOrigin]
+ );
+ expect(entity.label.verticalOrigin.getValue(validTime)).toEqual(
+ VerticalOrigin[packet.label.verticalOrigin]
+ );
+ expect(entity.label.eyeOffset.getValue(validTime)).toEqual(
+ Cartesian3.unpack(packet.label.eyeOffset.cartesian)
+ );
+ expect(entity.label.pixelOffset.getValue(validTime)).toEqual(
+ Cartesian2.unpack(packet.label.pixelOffset.cartesian2)
+ );
+ expect(entity.label.scale.getValue(validTime)).toEqual(
+ packet.label.scale
+ );
+ expect(entity.label.show.getValue(validTime)).toEqual(packet.label.show);
+
+ expect(entity.label.text.getValue(invalidTime)).toBeUndefined();
+ expect(entity.label.font.getValue(invalidTime)).toBeUndefined();
+ expect(entity.label.style.getValue(invalidTime)).toBeUndefined();
+ expect(entity.label.fillColor.getValue(invalidTime)).toBeUndefined();
+ expect(entity.label.outlineColor.getValue(invalidTime)).toBeUndefined();
+ expect(entity.label.outlineWidth.getValue(invalidTime)).toBeUndefined();
+ expect(
+ entity.label.horizontalOrigin.getValue(invalidTime)
+ ).toBeUndefined();
+ expect(entity.label.verticalOrigin.getValue(invalidTime)).toBeUndefined();
+ expect(entity.label.eyeOffset.getValue(invalidTime)).toBeUndefined();
+ expect(entity.label.pixelOffset.getValue(invalidTime)).toBeUndefined();
+ expect(entity.label.scale.getValue(invalidTime)).toBeUndefined();
+ expect(entity.label.show.getValue(invalidTime)).toBeUndefined();
+ });
});
it("can handle sampled label pixelOffset.", function () {
@@ -2105,21 +2077,21 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.label).toBeDefined();
- const date1 = epoch;
- const date2 = JulianDate.addSeconds(epoch, 1.0, new JulianDate());
- expect(entity.label.pixelOffset.getValue(date1)).toEqual(
- new Cartesian2(1.0, 2.0),
- );
- expect(entity.label.pixelOffset.getValue(date2)).toEqual(
- new Cartesian2(3.0, 4.0),
- );
- },
- );
+ expect(entity.label).toBeDefined();
+ const date1 = epoch;
+ const date2 = JulianDate.addSeconds(epoch, 1.0, new JulianDate());
+ expect(entity.label.pixelOffset.getValue(date1)).toEqual(
+ new Cartesian2(1.0, 2.0)
+ );
+ expect(entity.label.pixelOffset.getValue(date2)).toEqual(
+ new Cartesian2(3.0, 4.0)
+ );
+ });
});
it("can load position", function () {
@@ -2131,14 +2103,14 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- expect(entity.position.getValue(time)).toEqual(
- Cartesian3.unpack(packet.position.cartesian),
- );
- },
- );
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ expect(entity.position.getValue(time)).toEqual(
+ Cartesian3.unpack(packet.position.cartesian)
+ );
+ });
});
it("can load orientation", function () {
@@ -2150,14 +2122,14 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- expect(entity.orientation.getValue(time)).toEqual(
- Quaternion.unpack(packet.orientation.unitQuaternion),
- );
- },
- );
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ expect(entity.orientation.getValue(time)).toEqual(
+ Quaternion.unpack(packet.orientation.unitQuaternion)
+ );
+ });
});
it("normalizes constant orientation on load", function () {
@@ -2172,12 +2144,12 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- expect(entity.orientation.getValue(time)).toEqual(expected);
- },
- );
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ expect(entity.orientation.getValue(time)).toEqual(expected);
+ });
});
it("normalizes sampled orientation on load", function () {
@@ -2206,17 +2178,17 @@ describe("DataSources/CzmlDataSource", function () {
const expected2 = Quaternion.unpack(packet.orientation.unitQuaternion, 6);
Quaternion.normalize(expected2, expected2);
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- expect(
- entity.orientation.getValue(JulianDate.fromIso8601(time1)),
- ).toEqual(expected1);
- expect(
- entity.orientation.getValue(JulianDate.fromIso8601(time2)),
- ).toEqual(expected2);
- },
- );
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ expect(
+ entity.orientation.getValue(JulianDate.fromIso8601(time1))
+ ).toEqual(expected1);
+ expect(
+ entity.orientation.getValue(JulianDate.fromIso8601(time2))
+ ).toEqual(expected2);
+ });
});
it("can handle orientation expressed as a velocity reference", function () {
@@ -2230,33 +2202,34 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- const property = entity.orientation;
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ const property = entity.orientation;
- const expectedVelocity = new Cartesian3(1.0, 2.0, 3.0);
- const expectedVelocityDirection = Cartesian3.normalize(
- expectedVelocity,
- new Cartesian3(),
- );
+ const expectedVelocity = new Cartesian3(1.0, 2.0, 3.0);
+ const expectedVelocityDirection = Cartesian3.normalize(
+ expectedVelocity,
+ new Cartesian3()
+ );
- const expectedPosition = new Cartesian3(1, 2, 3);
- const expectedRotation = Transforms.rotationMatrixFromPositionVelocity(
- expectedPosition,
- expectedVelocityDirection,
- );
- const expectedOrientation =
- Quaternion.fromRotationMatrix(expectedRotation);
+ const expectedPosition = new Cartesian3(1, 2, 3);
+ const expectedRotation = Transforms.rotationMatrixFromPositionVelocity(
+ expectedPosition,
+ expectedVelocityDirection
+ );
+ const expectedOrientation = Quaternion.fromRotationMatrix(
+ expectedRotation
+ );
- expect(
- property.getValue(JulianDate.fromIso8601("2016-06-17T12:00:00Z")),
- ).toEqualEpsilon(expectedOrientation, CesiumMath.EPSILON15);
- expect(
- property.getValue(JulianDate.fromIso8601("2016-06-17T12:00:30Z")),
- ).toEqualEpsilon(expectedOrientation, CesiumMath.EPSILON15);
- },
- );
+ expect(
+ property.getValue(JulianDate.fromIso8601("2016-06-17T12:00:00Z"))
+ ).toEqualEpsilon(expectedOrientation, CesiumMath.EPSILON15);
+ expect(
+ property.getValue(JulianDate.fromIso8601("2016-06-17T12:00:30Z"))
+ ).toEqualEpsilon(expectedOrientation, CesiumMath.EPSILON15);
+ });
});
it("can load positions expressed as cartesians", function () {
@@ -2270,14 +2243,14 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- expect(entity.polyline.positions.getValue(time)).toEqual(
- Cartesian3.unpackArray(packet.polyline.positions.cartesian),
- );
- },
- );
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ expect(entity.polyline.positions.getValue(time)).toEqual(
+ Cartesian3.unpackArray(packet.polyline.positions.cartesian)
+ );
+ });
});
it("can load positions expressed as cartographicRadians", function () {
@@ -2291,16 +2264,16 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- expect(entity.polyline.positions.getValue(time)).toEqual(
- Cartesian3.fromRadiansArrayHeights(
- packet.polyline.positions.cartographicRadians,
- ),
- );
- },
- );
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ expect(entity.polyline.positions.getValue(time)).toEqual(
+ Cartesian3.fromRadiansArrayHeights(
+ packet.polyline.positions.cartographicRadians
+ )
+ );
+ });
});
it("can load positions expressed as cartographicDegrees", function () {
@@ -2314,16 +2287,16 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- expect(entity.polyline.positions.getValue(time)).toEqual(
- Cartesian3.fromDegreesArrayHeights(
- packet.polyline.positions.cartographicDegrees,
- ),
- );
- },
- );
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ expect(entity.polyline.positions.getValue(time)).toEqual(
+ Cartesian3.fromDegreesArrayHeights(
+ packet.polyline.positions.cartographicDegrees
+ )
+ );
+ });
});
it("can load viewFrom", function () {
@@ -2335,14 +2308,14 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- expect(entity.viewFrom.getValue(time)).toEqual(
- Cartesian3.unpack(packet.viewFrom.cartesian),
- );
- },
- );
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ expect(entity.viewFrom.getValue(time)).toEqual(
+ Cartesian3.unpack(packet.viewFrom.cartesian)
+ );
+ });
});
it("can load description", function () {
@@ -2352,12 +2325,12 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- expect(entity.description.getValue(time)).toEqual(packet.description);
- },
- );
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ expect(entity.description.getValue(time)).toEqual(packet.description);
+ });
});
it("can load constant custom properties", function () {
@@ -2384,23 +2357,23 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- 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,
- );
- },
- );
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ 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
+ );
+ });
});
it("can load custom properties which are constant with specified type", function () {
@@ -2430,23 +2403,23 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- 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,
- );
- },
- );
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ 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
+ );
+ });
});
it("can load custom properties with one interval", function () {
@@ -2459,22 +2432,18 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(
- entity.properties.changing_name.getValue(
- JulianDate.fromIso8601("2013"),
- ),
- ).toEqual(packet.properties.changing_name.value);
- expect(
- entity.properties.changing_name.getValue(
- JulianDate.fromIso8601("2015"),
- ),
- ).toBeUndefined();
- },
- );
+ expect(
+ entity.properties.changing_name.getValue(JulianDate.fromIso8601("2013"))
+ ).toEqual(packet.properties.changing_name.value);
+ expect(
+ entity.properties.changing_name.getValue(JulianDate.fromIso8601("2015"))
+ ).toBeUndefined();
+ });
});
it("can load custom properties with one interval with specified type", function () {
@@ -2487,22 +2456,18 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(
- entity.properties.changing_name.getValue(
- JulianDate.fromIso8601("2013"),
- ),
- ).toEqual(packet.properties.changing_name.string);
- expect(
- entity.properties.changing_name.getValue(
- JulianDate.fromIso8601("2015"),
- ),
- ).toBeUndefined();
- },
- );
+ expect(
+ entity.properties.changing_name.getValue(JulianDate.fromIso8601("2013"))
+ ).toEqual(packet.properties.changing_name.string);
+ expect(
+ entity.properties.changing_name.getValue(JulianDate.fromIso8601("2015"))
+ ).toBeUndefined();
+ });
});
it("can load custom properties with multiple intervals", function () {
@@ -2523,22 +2488,22 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(
- entity.properties.changing_array.getValue(
- JulianDate.fromIso8601("2012-06-01"),
- ),
- ).toEqual(array1);
- expect(
- entity.properties.changing_array.getValue(
- JulianDate.fromIso8601("2013-06-01"),
- ),
- ).toEqual(array2);
- },
- );
+ expect(
+ entity.properties.changing_array.getValue(
+ JulianDate.fromIso8601("2012-06-01")
+ )
+ ).toEqual(array1);
+ expect(
+ entity.properties.changing_array.getValue(
+ JulianDate.fromIso8601("2013-06-01")
+ )
+ ).toEqual(array2);
+ });
});
it("can load boolean custom properties with multiple intervals", function () {
@@ -2562,30 +2527,30 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.getById("MyID");
- expect(entity).toBeDefined();
- expect(entity.properties).toBeDefined();
- expect(entity.properties.custom_boolean).toBeDefined();
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.getById("MyID");
+ expect(entity).toBeDefined();
+ expect(entity.properties).toBeDefined();
+ expect(entity.properties.custom_boolean).toBeDefined();
- expect(
- entity.properties.custom_boolean.getValue(
- JulianDate.fromIso8601("2012-04-02T12:00:00Z"),
- ),
- ).toEqual(true);
- expect(
- entity.properties.custom_boolean.getValue(
- JulianDate.fromIso8601("2012-04-02T12:00:01Z"),
- ),
- ).toEqual(false);
- expect(
- entity.properties.custom_boolean.getValue(
- JulianDate.fromIso8601("2012-04-02T12:00:02Z"),
- ),
- ).toEqual(true);
- },
- );
+ expect(
+ entity.properties.custom_boolean.getValue(
+ JulianDate.fromIso8601("2012-04-02T12:00:00Z")
+ )
+ ).toEqual(true);
+ expect(
+ entity.properties.custom_boolean.getValue(
+ JulianDate.fromIso8601("2012-04-02T12:00:01Z")
+ )
+ ).toEqual(false);
+ expect(
+ entity.properties.custom_boolean.getValue(
+ JulianDate.fromIso8601("2012-04-02T12:00:02Z")
+ )
+ ).toEqual(true);
+ });
});
it("can load custom properties with multiple intervals with specified type", function () {
@@ -2606,22 +2571,22 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(
- entity.properties.changing_array.getValue(
- JulianDate.fromIso8601("2012-06-01"),
- ),
- ).toEqual(array1);
- expect(
- entity.properties.changing_array.getValue(
- JulianDate.fromIso8601("2013-06-01"),
- ),
- ).toEqual(array2);
- },
- );
+ expect(
+ entity.properties.changing_array.getValue(
+ JulianDate.fromIso8601("2012-06-01")
+ )
+ ).toEqual(array1);
+ expect(
+ entity.properties.changing_array.getValue(
+ JulianDate.fromIso8601("2013-06-01")
+ )
+ ).toEqual(array2);
+ });
});
it("can load sampled custom properties", function () {
@@ -2635,42 +2600,42 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.getById("MyID");
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.getById("MyID");
- expect(entity).toBeDefined();
- expect(entity.properties).toBeDefined();
- expect(entity.properties.custom_cartesian).toBeDefined();
+ expect(entity).toBeDefined();
+ expect(entity.properties).toBeDefined();
+ expect(entity.properties.custom_cartesian).toBeDefined();
- expect(
- entity.properties.custom_cartesian.getValue(
- JulianDate.fromIso8601("2012-04-02T12:00:00Z"),
- ),
- ).toBeInstanceOf(Cartesian3);
- expect(
- entity.properties.custom_cartesian.getValue(
- JulianDate.fromIso8601("2012-04-02T12:00:00Z"),
- ),
- ).toEqual(new Cartesian3(1, 2, 3));
- // halfway between two samples, linearly interpolated
- expect(
- entity.properties.custom_cartesian.getValue(
- JulianDate.fromIso8601("2012-04-02T12:00:30Z"),
- ),
- ).toEqual(new Cartesian3((1 + 4) / 2, (2 + 5) / 2, (3 + 6) / 2));
- expect(
- entity.properties.custom_cartesian.getValue(
- JulianDate.fromIso8601("2012-04-02T12:01:00Z"),
- ),
- ).toEqual(new Cartesian3(4, 5, 6));
- expect(
- entity.properties.custom_cartesian.getValue(
- JulianDate.fromIso8601("2012-04-02T12:02:00Z"),
- ),
- ).toEqual(new Cartesian3(7, 8, 9));
- },
- );
+ expect(
+ entity.properties.custom_cartesian.getValue(
+ JulianDate.fromIso8601("2012-04-02T12:00:00Z")
+ )
+ ).toBeInstanceOf(Cartesian3);
+ expect(
+ entity.properties.custom_cartesian.getValue(
+ JulianDate.fromIso8601("2012-04-02T12:00:00Z")
+ )
+ ).toEqual(new Cartesian3(1, 2, 3));
+ // halfway between two samples, linearly interpolated
+ expect(
+ entity.properties.custom_cartesian.getValue(
+ JulianDate.fromIso8601("2012-04-02T12:00:30Z")
+ )
+ ).toEqual(new Cartesian3((1 + 4) / 2, (2 + 5) / 2, (3 + 6) / 2));
+ expect(
+ entity.properties.custom_cartesian.getValue(
+ JulianDate.fromIso8601("2012-04-02T12:01:00Z")
+ )
+ ).toEqual(new Cartesian3(4, 5, 6));
+ expect(
+ entity.properties.custom_cartesian.getValue(
+ JulianDate.fromIso8601("2012-04-02T12:02:00Z")
+ )
+ ).toEqual(new Cartesian3(7, 8, 9));
+ });
});
it("can load various types of custom properties", function () {
@@ -2789,279 +2754,264 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.getById("MyID");
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.getById("MyID");
- expect(entity).toBeDefined();
- expect(entity.properties).toBeDefined();
+ expect(entity).toBeDefined();
+ expect(entity.properties).toBeDefined();
- const time1 = JulianDate.fromIso8601("2012-06-01");
- const time2 = JulianDate.fromIso8601("2013-06-01");
+ const time1 = JulianDate.fromIso8601("2012-06-01");
+ const time2 = JulianDate.fromIso8601("2013-06-01");
- expect(entity.properties.custom_array_constant).toBeDefined();
- expect(
- entity.properties.custom_array_constant.getValue(time1),
- ).toBeInstanceOf(Array);
- expect(entity.properties.custom_array_constant.getValue(time1)).toEqual(
- packet.properties.custom_array_constant.array,
- );
+ expect(entity.properties.custom_array_constant).toBeDefined();
+ expect(
+ entity.properties.custom_array_constant.getValue(time1)
+ ).toBeInstanceOf(Array);
+ expect(entity.properties.custom_array_constant.getValue(time1)).toEqual(
+ packet.properties.custom_array_constant.array
+ );
- expect(entity.properties.custom_array_interval).toBeDefined();
- expect(
- entity.properties.custom_array_interval.getValue(time1),
- ).toBeInstanceOf(Array);
- expect(entity.properties.custom_array_interval.getValue(time1)).toEqual(
- packet.properties.custom_array_interval[0].array,
- );
- expect(entity.properties.custom_array_interval.getValue(time2)).toEqual(
- packet.properties.custom_array_interval[1].array,
- );
+ expect(entity.properties.custom_array_interval).toBeDefined();
+ expect(
+ entity.properties.custom_array_interval.getValue(time1)
+ ).toBeInstanceOf(Array);
+ expect(entity.properties.custom_array_interval.getValue(time1)).toEqual(
+ packet.properties.custom_array_interval[0].array
+ );
+ expect(entity.properties.custom_array_interval.getValue(time2)).toEqual(
+ packet.properties.custom_array_interval[1].array
+ );
- expect(entity.properties.custom_boolean_constant).toBeDefined();
- expect(
- entity.properties.custom_boolean_constant.getValue(time1),
- ).toEqual(packet.properties.custom_boolean_constant.boolean);
+ expect(entity.properties.custom_boolean_constant).toBeDefined();
+ expect(entity.properties.custom_boolean_constant.getValue(time1)).toEqual(
+ packet.properties.custom_boolean_constant.boolean
+ );
- expect(entity.properties.custom_boolean_interval).toBeDefined();
- expect(
- entity.properties.custom_boolean_interval.getValue(time1),
- ).toEqual(packet.properties.custom_boolean_interval[0].boolean);
- expect(
- entity.properties.custom_boolean_interval.getValue(time2),
- ).toEqual(packet.properties.custom_boolean_interval[1].boolean);
+ expect(entity.properties.custom_boolean_interval).toBeDefined();
+ expect(entity.properties.custom_boolean_interval.getValue(time1)).toEqual(
+ packet.properties.custom_boolean_interval[0].boolean
+ );
+ expect(entity.properties.custom_boolean_interval.getValue(time2)).toEqual(
+ packet.properties.custom_boolean_interval[1].boolean
+ );
- expect(
- entity.properties.custom_boundingRectangle_constant,
- ).toBeDefined();
- expect(
- entity.properties.custom_boundingRectangle_constant.getValue(time1),
- ).toBeInstanceOf(BoundingRectangle);
- expect(
- entity.properties.custom_boundingRectangle_constant.getValue(time1),
- ).toEqual(
- BoundingRectangle.unpack(
- packet.properties.custom_boundingRectangle_constant
- .boundingRectangle,
- ),
- );
+ expect(entity.properties.custom_boundingRectangle_constant).toBeDefined();
+ expect(
+ entity.properties.custom_boundingRectangle_constant.getValue(time1)
+ ).toBeInstanceOf(BoundingRectangle);
+ expect(
+ entity.properties.custom_boundingRectangle_constant.getValue(time1)
+ ).toEqual(
+ BoundingRectangle.unpack(
+ packet.properties.custom_boundingRectangle_constant.boundingRectangle
+ )
+ );
- expect(
- entity.properties.custom_boundingRectangle_interval,
- ).toBeDefined();
- expect(
- entity.properties.custom_boundingRectangle_interval.getValue(time1),
- ).toBeInstanceOf(BoundingRectangle);
- expect(
- entity.properties.custom_boundingRectangle_interval.getValue(time1),
- ).toEqual(
- BoundingRectangle.unpack(
- packet.properties.custom_boundingRectangle_interval[0]
- .boundingRectangle,
- ),
- );
- expect(
- entity.properties.custom_boundingRectangle_interval.getValue(time2),
- ).toEqual(
- BoundingRectangle.unpack(
- packet.properties.custom_boundingRectangle_interval[1]
- .boundingRectangle,
- ),
- );
+ expect(entity.properties.custom_boundingRectangle_interval).toBeDefined();
+ expect(
+ entity.properties.custom_boundingRectangle_interval.getValue(time1)
+ ).toBeInstanceOf(BoundingRectangle);
+ expect(
+ entity.properties.custom_boundingRectangle_interval.getValue(time1)
+ ).toEqual(
+ BoundingRectangle.unpack(
+ packet.properties.custom_boundingRectangle_interval[0]
+ .boundingRectangle
+ )
+ );
+ expect(
+ entity.properties.custom_boundingRectangle_interval.getValue(time2)
+ ).toEqual(
+ BoundingRectangle.unpack(
+ packet.properties.custom_boundingRectangle_interval[1]
+ .boundingRectangle
+ )
+ );
- expect(
- entity.properties.custom_boundingRectangle_sampled,
- ).toBeDefined();
- expect(
- entity.properties.custom_boundingRectangle_sampled.getValue(time1),
- ).toBeInstanceOf(BoundingRectangle);
- expect(
- entity.properties.custom_boundingRectangle_sampled.getValue(time1),
- ).toEqual(
- BoundingRectangle.unpack(
- packet.properties.custom_boundingRectangle_sampled
- .boundingRectangle,
- 0 + 1,
- ),
- );
- expect(
- entity.properties.custom_boundingRectangle_sampled.getValue(
- JulianDate.addSeconds(time1, 60, new JulianDate()),
- ),
- ).toEqual(
- BoundingRectangle.unpack(
- packet.properties.custom_boundingRectangle_sampled
- .boundingRectangle,
- 4 + 2,
- ),
- );
+ expect(entity.properties.custom_boundingRectangle_sampled).toBeDefined();
+ expect(
+ entity.properties.custom_boundingRectangle_sampled.getValue(time1)
+ ).toBeInstanceOf(BoundingRectangle);
+ expect(
+ entity.properties.custom_boundingRectangle_sampled.getValue(time1)
+ ).toEqual(
+ BoundingRectangle.unpack(
+ packet.properties.custom_boundingRectangle_sampled.boundingRectangle,
+ 0 + 1
+ )
+ );
+ expect(
+ entity.properties.custom_boundingRectangle_sampled.getValue(
+ JulianDate.addSeconds(time1, 60, new JulianDate())
+ )
+ ).toEqual(
+ BoundingRectangle.unpack(
+ packet.properties.custom_boundingRectangle_sampled.boundingRectangle,
+ 4 + 2
+ )
+ );
- expect(entity.properties.custom_cartesian2_constant).toBeDefined();
- expect(
- entity.properties.custom_cartesian2_constant.getValue(time1),
- ).toBeInstanceOf(Cartesian2);
- expect(
- entity.properties.custom_cartesian2_constant.getValue(time1),
- ).toEqual(
- Cartesian2.unpack(
- packet.properties.custom_cartesian2_constant.cartesian2,
- ),
- );
+ expect(entity.properties.custom_cartesian2_constant).toBeDefined();
+ expect(
+ entity.properties.custom_cartesian2_constant.getValue(time1)
+ ).toBeInstanceOf(Cartesian2);
+ expect(
+ entity.properties.custom_cartesian2_constant.getValue(time1)
+ ).toEqual(
+ Cartesian2.unpack(
+ packet.properties.custom_cartesian2_constant.cartesian2
+ )
+ );
- expect(entity.properties.custom_cartesian2_interval).toBeDefined();
- expect(
- entity.properties.custom_cartesian2_interval.getValue(time1),
- ).toBeInstanceOf(Cartesian2);
- expect(
- entity.properties.custom_cartesian2_interval.getValue(time1),
- ).toEqual(
- Cartesian2.unpack(
- packet.properties.custom_cartesian2_interval[0].cartesian2,
- ),
- );
- expect(
- entity.properties.custom_cartesian2_interval.getValue(time2),
- ).toEqual(
- Cartesian2.unpack(
- packet.properties.custom_cartesian2_interval[1].cartesian2,
- ),
- );
+ expect(entity.properties.custom_cartesian2_interval).toBeDefined();
+ expect(
+ entity.properties.custom_cartesian2_interval.getValue(time1)
+ ).toBeInstanceOf(Cartesian2);
+ expect(
+ entity.properties.custom_cartesian2_interval.getValue(time1)
+ ).toEqual(
+ Cartesian2.unpack(
+ packet.properties.custom_cartesian2_interval[0].cartesian2
+ )
+ );
+ expect(
+ entity.properties.custom_cartesian2_interval.getValue(time2)
+ ).toEqual(
+ Cartesian2.unpack(
+ packet.properties.custom_cartesian2_interval[1].cartesian2
+ )
+ );
- expect(entity.properties.custom_cartesian2_sampled).toBeDefined();
- expect(
- entity.properties.custom_cartesian2_sampled.getValue(time1),
- ).toBeInstanceOf(Cartesian2);
- expect(
- entity.properties.custom_cartesian2_sampled.getValue(time1),
- ).toEqual(
- Cartesian2.unpack(
- packet.properties.custom_cartesian2_sampled.cartesian2,
- 0 + 1,
- ),
- );
- expect(
- entity.properties.custom_cartesian2_sampled.getValue(
- JulianDate.addSeconds(time1, 60, new JulianDate()),
- ),
- ).toEqual(
- Cartesian2.unpack(
- packet.properties.custom_cartesian2_sampled.cartesian2,
- 2 + 2,
- ),
- );
+ expect(entity.properties.custom_cartesian2_sampled).toBeDefined();
+ expect(
+ entity.properties.custom_cartesian2_sampled.getValue(time1)
+ ).toBeInstanceOf(Cartesian2);
+ expect(
+ entity.properties.custom_cartesian2_sampled.getValue(time1)
+ ).toEqual(
+ Cartesian2.unpack(
+ packet.properties.custom_cartesian2_sampled.cartesian2,
+ 0 + 1
+ )
+ );
+ expect(
+ entity.properties.custom_cartesian2_sampled.getValue(
+ JulianDate.addSeconds(time1, 60, new JulianDate())
+ )
+ ).toEqual(
+ Cartesian2.unpack(
+ packet.properties.custom_cartesian2_sampled.cartesian2,
+ 2 + 2
+ )
+ );
- expect(entity.properties.custom_cartesian_constant).toBeDefined();
- expect(
- entity.properties.custom_cartesian_constant.getValue(time1),
- ).toBeInstanceOf(Cartesian3);
- expect(
- entity.properties.custom_cartesian_constant.getValue(time1),
- ).toEqual(
- Cartesian3.unpack(
- packet.properties.custom_cartesian_constant.cartesian,
- ),
- );
+ expect(entity.properties.custom_cartesian_constant).toBeDefined();
+ expect(
+ entity.properties.custom_cartesian_constant.getValue(time1)
+ ).toBeInstanceOf(Cartesian3);
+ expect(
+ entity.properties.custom_cartesian_constant.getValue(time1)
+ ).toEqual(
+ Cartesian3.unpack(packet.properties.custom_cartesian_constant.cartesian)
+ );
- expect(entity.properties.custom_cartesian_interval).toBeDefined();
- expect(
- entity.properties.custom_cartesian_interval.getValue(time1),
- ).toBeInstanceOf(Cartesian3);
- expect(
- entity.properties.custom_cartesian_interval.getValue(time1),
- ).toEqual(
- Cartesian3.unpack(
- packet.properties.custom_cartesian_interval[0].cartesian,
- ),
- );
- expect(
- entity.properties.custom_cartesian_interval.getValue(time2),
- ).toEqual(
- Cartesian3.unpack(
- packet.properties.custom_cartesian_interval[1].cartesian,
- ),
- );
+ expect(entity.properties.custom_cartesian_interval).toBeDefined();
+ expect(
+ entity.properties.custom_cartesian_interval.getValue(time1)
+ ).toBeInstanceOf(Cartesian3);
+ expect(
+ entity.properties.custom_cartesian_interval.getValue(time1)
+ ).toEqual(
+ Cartesian3.unpack(
+ packet.properties.custom_cartesian_interval[0].cartesian
+ )
+ );
+ expect(
+ entity.properties.custom_cartesian_interval.getValue(time2)
+ ).toEqual(
+ Cartesian3.unpack(
+ packet.properties.custom_cartesian_interval[1].cartesian
+ )
+ );
- expect(entity.properties.custom_cartesian_sampled).toBeDefined();
- expect(
- entity.properties.custom_cartesian_sampled.getValue(time1),
- ).toBeInstanceOf(Cartesian3);
- expect(
- entity.properties.custom_cartesian_sampled.getValue(time1),
- ).toEqual(
- Cartesian3.unpack(
- packet.properties.custom_cartesian_sampled.cartesian,
- 0 + 1,
- ),
- );
- expect(
- entity.properties.custom_cartesian_sampled.getValue(
- JulianDate.addSeconds(time1, 60, new JulianDate()),
- ),
- ).toEqual(
- Cartesian3.unpack(
- packet.properties.custom_cartesian_sampled.cartesian,
- 3 + 2,
- ),
- );
+ expect(entity.properties.custom_cartesian_sampled).toBeDefined();
+ expect(
+ entity.properties.custom_cartesian_sampled.getValue(time1)
+ ).toBeInstanceOf(Cartesian3);
+ expect(
+ entity.properties.custom_cartesian_sampled.getValue(time1)
+ ).toEqual(
+ Cartesian3.unpack(
+ packet.properties.custom_cartesian_sampled.cartesian,
+ 0 + 1
+ )
+ );
+ expect(
+ entity.properties.custom_cartesian_sampled.getValue(
+ JulianDate.addSeconds(time1, 60, new JulianDate())
+ )
+ ).toEqual(
+ Cartesian3.unpack(
+ packet.properties.custom_cartesian_sampled.cartesian,
+ 3 + 2
+ )
+ );
- expect(entity.properties.custom_color_constant).toBeDefined();
- expect(
- entity.properties.custom_color_constant.getValue(time1),
- ).toBeInstanceOf(Color);
- expect(entity.properties.custom_color_constant.getValue(time1)).toEqual(
- Color.unpack(packet.properties.custom_color_constant.rgbaf),
- );
+ expect(entity.properties.custom_color_constant).toBeDefined();
+ expect(
+ entity.properties.custom_color_constant.getValue(time1)
+ ).toBeInstanceOf(Color);
+ expect(entity.properties.custom_color_constant.getValue(time1)).toEqual(
+ Color.unpack(packet.properties.custom_color_constant.rgbaf)
+ );
- expect(entity.properties.custom_color_interval).toBeDefined();
- expect(
- entity.properties.custom_color_interval.getValue(time1),
- ).toBeInstanceOf(Color);
- expect(entity.properties.custom_color_interval.getValue(time1)).toEqual(
- Color.unpack(packet.properties.custom_color_interval[0].rgbaf),
- );
- expect(entity.properties.custom_color_interval.getValue(time2)).toEqual(
- Color.unpack(packet.properties.custom_color_interval[1].rgbaf),
- );
+ expect(entity.properties.custom_color_interval).toBeDefined();
+ expect(
+ entity.properties.custom_color_interval.getValue(time1)
+ ).toBeInstanceOf(Color);
+ expect(entity.properties.custom_color_interval.getValue(time1)).toEqual(
+ Color.unpack(packet.properties.custom_color_interval[0].rgbaf)
+ );
+ expect(entity.properties.custom_color_interval.getValue(time2)).toEqual(
+ Color.unpack(packet.properties.custom_color_interval[1].rgbaf)
+ );
- expect(entity.properties.custom_color_sampled).toBeDefined();
- expect(
- entity.properties.custom_color_sampled.getValue(time1),
- ).toBeInstanceOf(Color);
- expect(entity.properties.custom_color_sampled.getValue(time1)).toEqual(
- Color.unpack(packet.properties.custom_color_sampled.rgbaf, 0 + 1),
- );
- expect(
- entity.properties.custom_color_sampled.getValue(
- JulianDate.addSeconds(time1, 60, new JulianDate()),
- ),
- ).toEqual(
- Color.unpack(packet.properties.custom_color_sampled.rgbaf, 4 + 2),
- );
+ expect(entity.properties.custom_color_sampled).toBeDefined();
+ expect(
+ entity.properties.custom_color_sampled.getValue(time1)
+ ).toBeInstanceOf(Color);
+ expect(entity.properties.custom_color_sampled.getValue(time1)).toEqual(
+ Color.unpack(packet.properties.custom_color_sampled.rgbaf, 0 + 1)
+ );
+ expect(
+ entity.properties.custom_color_sampled.getValue(
+ JulianDate.addSeconds(time1, 60, new JulianDate())
+ )
+ ).toEqual(
+ Color.unpack(packet.properties.custom_color_sampled.rgbaf, 4 + 2)
+ );
- expect(entity.properties.custom_date_constant).toBeDefined();
- expect(
- entity.properties.custom_date_constant.getValue(time1),
- ).toBeInstanceOf(JulianDate);
- expect(entity.properties.custom_date_constant.getValue(time1)).toEqual(
- JulianDate.fromIso8601(packet.properties.custom_date_constant.date),
- );
+ expect(entity.properties.custom_date_constant).toBeDefined();
+ expect(
+ entity.properties.custom_date_constant.getValue(time1)
+ ).toBeInstanceOf(JulianDate);
+ expect(entity.properties.custom_date_constant.getValue(time1)).toEqual(
+ JulianDate.fromIso8601(packet.properties.custom_date_constant.date)
+ );
- expect(entity.properties.custom_date_interval).toBeDefined();
- expect(
- entity.properties.custom_date_interval.getValue(time1),
- ).toBeInstanceOf(JulianDate);
- expect(entity.properties.custom_date_interval.getValue(time1)).toEqual(
- JulianDate.fromIso8601(
- packet.properties.custom_date_interval[0].date,
- ),
- );
- expect(entity.properties.custom_date_interval.getValue(time2)).toEqual(
- JulianDate.fromIso8601(
- packet.properties.custom_date_interval[1].date,
- ),
- );
- },
- );
+ expect(entity.properties.custom_date_interval).toBeDefined();
+ expect(
+ entity.properties.custom_date_interval.getValue(time1)
+ ).toBeInstanceOf(JulianDate);
+ expect(entity.properties.custom_date_interval.getValue(time1)).toEqual(
+ JulianDate.fromIso8601(packet.properties.custom_date_interval[0].date)
+ );
+ expect(entity.properties.custom_date_interval.getValue(time2)).toEqual(
+ JulianDate.fromIso8601(packet.properties.custom_date_interval[1].date)
+ );
+ });
});
it("can delete an entire property", function () {
@@ -3161,7 +3111,7 @@ describe("DataSources/CzmlDataSource", function () {
expect(entity.billboard.scale).toBeInstanceOf(ConstantProperty);
entity = dataSource.entities.getById("test-interval");
expect(entity.billboard.scale).toBeInstanceOf(
- TimeIntervalCollectionProperty,
+ TimeIntervalCollectionProperty
);
entity = dataSource.entities.getById("test-sampled");
expect(entity.billboard.scale).toBeInstanceOf(SampledProperty);
@@ -3339,7 +3289,7 @@ describe("DataSources/CzmlDataSource", function () {
expect(entity.position).toBeInstanceOf(ConstantPositionProperty);
entity = dataSource.entities.getById("test-interval");
expect(entity.position).toBeInstanceOf(
- TimeIntervalCollectionPositionProperty,
+ TimeIntervalCollectionPositionProperty
);
entity = dataSource.entities.getById("test-sampled");
expect(entity.position).toBeInstanceOf(SampledPositionProperty);
@@ -3405,18 +3355,18 @@ describe("DataSources/CzmlDataSource", function () {
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2012-03-15T10:00:00Z"),
- ),
+ JulianDate.fromIso8601("2012-03-15T10:00:00Z")
+ )
).toEqual(1);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2012-03-15T11:00:00Z"),
- ),
+ JulianDate.fromIso8601("2012-03-15T11:00:00Z")
+ )
).toEqual(5);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2012-03-15T12:00:00Z"),
- ),
+ JulianDate.fromIso8601("2012-03-15T12:00:00Z")
+ )
).toEqual(3);
return dataSource;
@@ -3439,19 +3389,19 @@ describe("DataSources/CzmlDataSource", function () {
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2012-03-15T10:00:00Z"),
- ),
+ JulianDate.fromIso8601("2012-03-15T10:00:00Z")
+ )
).toEqual(1);
// deleting sample will cause the property to interpolate from remaining samples
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2012-03-15T11:00:00Z"),
- ),
+ JulianDate.fromIso8601("2012-03-15T11:00:00Z")
+ )
).toEqual(2);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2012-03-15T12:00:00Z"),
- ),
+ JulianDate.fromIso8601("2012-03-15T12:00:00Z")
+ )
).toEqual(3);
});
});
@@ -3480,18 +3430,18 @@ describe("DataSources/CzmlDataSource", function () {
expect(
entity.properties.custom.getValue(
- JulianDate.fromIso8601("2012-03-15T10:00:00Z"),
- ),
+ JulianDate.fromIso8601("2012-03-15T10:00:00Z")
+ )
).toEqual(1);
expect(
entity.properties.custom.getValue(
- JulianDate.fromIso8601("2012-03-15T11:00:00Z"),
- ),
+ JulianDate.fromIso8601("2012-03-15T11:00:00Z")
+ )
).toEqual(5);
expect(
entity.properties.custom.getValue(
- JulianDate.fromIso8601("2012-03-15T12:00:00Z"),
- ),
+ JulianDate.fromIso8601("2012-03-15T12:00:00Z")
+ )
).toEqual(3);
return dataSource;
@@ -3514,19 +3464,19 @@ describe("DataSources/CzmlDataSource", function () {
expect(
entity.properties.custom.getValue(
- JulianDate.fromIso8601("2012-03-15T10:00:00Z"),
- ),
+ JulianDate.fromIso8601("2012-03-15T10:00:00Z")
+ )
).toEqual(1);
// deleting sample will cause the property to interpolate from remaining samples
expect(
entity.properties.custom.getValue(
- JulianDate.fromIso8601("2012-03-15T11:00:00Z"),
- ),
+ JulianDate.fromIso8601("2012-03-15T11:00:00Z")
+ )
).toEqual(2);
expect(
entity.properties.custom.getValue(
- JulianDate.fromIso8601("2012-03-15T12:00:00Z"),
- ),
+ JulianDate.fromIso8601("2012-03-15T12:00:00Z")
+ )
).toEqual(3);
});
});
@@ -3547,18 +3497,18 @@ describe("DataSources/CzmlDataSource", function () {
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2016-06-17T12:00:00Z"),
- ),
+ JulianDate.fromIso8601("2016-06-17T12:00:00Z")
+ )
).toEqual(new Cartesian3(1, 2, 3));
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2016-06-17T12:01:00Z"),
- ),
+ JulianDate.fromIso8601("2016-06-17T12:01:00Z")
+ )
).toEqual(new Cartesian3(61, 122, 183));
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2016-06-17T12:02:00Z"),
- ),
+ JulianDate.fromIso8601("2016-06-17T12:02:00Z")
+ )
).toEqual(new Cartesian3(3, 4, 5));
return dataSource;
@@ -3579,19 +3529,19 @@ describe("DataSources/CzmlDataSource", function () {
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2016-06-17T12:00:00Z"),
- ),
+ JulianDate.fromIso8601("2016-06-17T12:00:00Z")
+ )
).toEqual(new Cartesian3(1, 2, 3));
// deleting sample will cause the property to interpolate from remaining samples
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2016-06-17T12:01:00Z"),
- ),
+ JulianDate.fromIso8601("2016-06-17T12:01:00Z")
+ )
).toEqual(new Cartesian3(2, 3, 4));
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2016-06-17T12:02:00Z"),
- ),
+ JulianDate.fromIso8601("2016-06-17T12:02:00Z")
+ )
).toEqual(new Cartesian3(3, 4, 5));
});
});
@@ -3617,18 +3567,18 @@ describe("DataSources/CzmlDataSource", function () {
.then(function (dataSource) {
const entity = dataSource.entities.getById("id");
expect(entity.billboard.scale).toBeInstanceOf(
- TimeIntervalCollectionProperty,
+ TimeIntervalCollectionProperty
);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2013-01-01T00:30:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:30:00Z")
+ )
).toEqual(2);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2013-01-01T01:30:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T01:30:00Z")
+ )
).toEqual(6);
return dataSource;
@@ -3648,28 +3598,28 @@ describe("DataSources/CzmlDataSource", function () {
.then(function (dataSource) {
const entity = dataSource.entities.getById("id");
expect(entity.billboard.scale).toBeInstanceOf(
- TimeIntervalCollectionProperty,
+ TimeIntervalCollectionProperty
);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2013-01-01T00:30:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:30:00Z")
+ )
).toBeUndefined();
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2013-01-01T01:30:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T01:30:00Z")
+ )
).toBeUndefined();
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2013-01-01T00:29:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:29:00Z")
+ )
).toEqual(2);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2013-01-01T01:31:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T01:31:00Z")
+ )
).toEqual(6);
});
});
@@ -3693,18 +3643,18 @@ describe("DataSources/CzmlDataSource", function () {
.then(function (dataSource) {
const entity = dataSource.entities.getById("id");
expect(entity.position).toBeInstanceOf(
- TimeIntervalCollectionPositionProperty,
+ TimeIntervalCollectionPositionProperty
);
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2013-01-01T00:30:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:30:00Z")
+ )
).toEqual(new Cartesian3(1, 2, 3));
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2013-01-01T01:30:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T01:30:00Z")
+ )
).toEqual(new Cartesian3(4, 5, 6));
return dataSource;
@@ -3722,28 +3672,28 @@ describe("DataSources/CzmlDataSource", function () {
.then(function (dataSource) {
const entity = dataSource.entities.getById("id");
expect(entity.position).toBeInstanceOf(
- TimeIntervalCollectionPositionProperty,
+ TimeIntervalCollectionPositionProperty
);
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2013-01-01T00:30:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:30:00Z")
+ )
).toBeUndefined();
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2013-01-01T01:30:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T01:30:00Z")
+ )
).toBeUndefined();
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2013-01-01T00:29:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:29:00Z")
+ )
).toEqual(new Cartesian3(1, 2, 3));
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2013-01-01T01:31:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T01:31:00Z")
+ )
).toEqual(new Cartesian3(4, 5, 6));
});
});
@@ -3784,38 +3734,38 @@ describe("DataSources/CzmlDataSource", function () {
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2013-01-01T00:00:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:00:00Z")
+ )
).toEqual(1);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2013-01-01T00:00:30Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:00:30Z")
+ )
).toEqual(6);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2013-01-01T00:01:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:01:00Z")
+ )
).toEqual(3);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2013-01-01T00:02:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:02:00Z")
+ )
).toEqual(33);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2013-01-01T01:00:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T01:00:00Z")
+ )
).toEqual(9);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2013-01-01T01:00:30Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T01:00:30Z")
+ )
).toEqual(19);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2013-01-01T01:01:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T01:01:00Z")
+ )
).toEqual(11);
return dataSource;
@@ -3838,38 +3788,38 @@ describe("DataSources/CzmlDataSource", function () {
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2013-01-01T00:00:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:00:00Z")
+ )
).toEqual(1);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2013-01-01T00:00:30Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:00:30Z")
+ )
).toEqual(6);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2013-01-01T00:01:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:01:00Z")
+ )
).toBeUndefined();
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2013-01-01T00:02:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:02:00Z")
+ )
).toBeUndefined();
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2013-01-01T01:00:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T01:00:00Z")
+ )
).toBeUndefined();
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2013-01-01T01:00:30Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T01:00:30Z")
+ )
).toEqual(19);
expect(
entity.billboard.scale.getValue(
- JulianDate.fromIso8601("2013-01-01T01:01:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T01:01:00Z")
+ )
).toEqual(11);
});
});
@@ -3914,38 +3864,38 @@ describe("DataSources/CzmlDataSource", function () {
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2013-01-01T00:00:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:00:00Z")
+ )
).toEqual(new Cartesian3(1, 2, 3));
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2013-01-01T00:00:30Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:00:30Z")
+ )
).toEqual(new Cartesian3(6, 7, 8));
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2013-01-01T00:01:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:01:00Z")
+ )
).toEqual(new Cartesian3(3, 4, 5));
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2013-01-01T00:02:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:02:00Z")
+ )
).toEqual(new Cartesian3(15, 16, 17));
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2013-01-01T01:00:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T01:00:00Z")
+ )
).toEqual(new Cartesian3(9, 15, 10));
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2013-01-01T01:00:30Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T01:00:30Z")
+ )
).toEqual(new Cartesian3(19, 16, 11));
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2013-01-01T01:01:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T01:01:00Z")
+ )
).toEqual(new Cartesian3(11, 17, 12));
return dataSource;
@@ -3966,38 +3916,38 @@ describe("DataSources/CzmlDataSource", function () {
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2013-01-01T00:00:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:00:00Z")
+ )
).toEqual(new Cartesian3(1, 2, 3));
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2013-01-01T00:00:30Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:00:30Z")
+ )
).toEqual(new Cartesian3(6, 7, 8));
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2013-01-01T00:01:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:01:00Z")
+ )
).toBeUndefined();
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2013-01-01T00:02:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:02:00Z")
+ )
).toBeUndefined();
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2013-01-01T01:00:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T01:00:00Z")
+ )
).toBeUndefined();
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2013-01-01T01:00:30Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T01:00:30Z")
+ )
).toEqual(new Cartesian3(19, 16, 11));
expect(
entity.position.getValue(
- JulianDate.fromIso8601("2013-01-01T01:01:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T01:01:00Z")
+ )
).toEqual(new Cartesian3(11, 17, 12));
});
});
@@ -4062,16 +4012,16 @@ describe("DataSources/CzmlDataSource", function () {
// Initially we use all the properties from dataSource1.
entity = composite.values[0];
expect(entity.properties.constant_name.getValue(time)).toEqual(
- packet1.properties.constant_name,
+ packet1.properties.constant_name
);
expect(entity.properties.constant_height.getValue(time)).toEqual(
- packet1.properties.constant_height,
+ packet1.properties.constant_height
);
expect(entity.properties.constant_object.getValue(time)).toEqual(
- testObject1,
+ testObject1
);
expect(entity.properties.constant_array.getValue(time)).toEqual(
- testArray1,
+ testArray1
);
// Load a new packet into dataSource2 and it should take precedence in the composite.
@@ -4080,16 +4030,16 @@ describe("DataSources/CzmlDataSource", function () {
.then(function () {
entity = composite.values[0];
expect(entity.properties.constant_name.getValue(time)).toEqual(
- packet2.properties.constant_name,
+ packet2.properties.constant_name
);
expect(entity.properties.constant_height.getValue(time)).toEqual(
- packet1.properties.constant_height,
+ packet1.properties.constant_height
);
expect(entity.properties.constant_object.getValue(time)).toEqual(
- testObject1,
+ testObject1
);
expect(entity.properties.constant_array.getValue(time)).toEqual(
- testArray1,
+ testArray1
);
// Changed values should be mirrored in the composite, too.
@@ -4098,16 +4048,16 @@ describe("DataSources/CzmlDataSource", function () {
.then(function () {
entity = composite.values[0];
expect(entity.properties.constant_name.getValue(time)).toEqual(
- packet2.properties.constant_name,
+ packet2.properties.constant_name
);
expect(entity.properties.constant_height.getValue(time)).toEqual(
- packet3.properties.constant_height,
+ packet3.properties.constant_height
);
expect(entity.properties.constant_object.getValue(time)).toEqual(
- testObject3,
+ testObject3
);
expect(entity.properties.constant_array.getValue(time)).toEqual(
- testArray3,
+ testArray3
);
});
});
@@ -4212,33 +4162,31 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.path).toBeDefined();
- 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(time)).toEqual(
- packet.path.material.polylineOutline.outlineWidth,
- );
- 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(time)).toEqual(
- packet.path.leadTime,
- );
- expect(entity.path.trailTime.getValue(time)).toEqual(
- packet.path.trailTime,
- );
- expect(entity.path.show.getValue(time)).toEqual(packet.path.show);
- },
- );
+ expect(entity.path).toBeDefined();
+ 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(time)).toEqual(
+ packet.path.material.polylineOutline.outlineWidth
+ );
+ 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(time)).toEqual(packet.path.leadTime);
+ expect(entity.path.trailTime.getValue(time)).toEqual(
+ packet.path.trailTime
+ );
+ expect(entity.path.show.getValue(time)).toEqual(packet.path.show);
+ });
});
it("can load interval data for path", function () {
@@ -4269,41 +4217,39 @@ describe("DataSources/CzmlDataSource", function () {
}).start;
const invalidTime = JulianDate.addSeconds(validTime, -1, new JulianDate());
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.path).toBeDefined();
- expect(entity.path.width.getValue(validTime)).toEqual(
- packet.path.width,
- );
- expect(entity.path.resolution.getValue(validTime)).toEqual(
- packet.path.resolution,
- );
- expect(entity.path.leadTime.getValue(validTime)).toEqual(
- packet.path.leadTime,
- );
- expect(entity.path.trailTime.getValue(validTime)).toEqual(
- packet.path.trailTime,
- );
- expect(entity.path.show.getValue(validTime)).toEqual(packet.path.show);
- expect(entity.path.material.getValue(validTime).color).toEqual(
- Color.unpack(packet.path.material.polylineOutline.color.rgbaf),
- );
- expect(entity.path.material.getValue(validTime).outlineColor).toEqual(
- Color.unpack(packet.path.material.polylineOutline.outlineColor.rgbaf),
- );
- expect(entity.path.material.getValue(validTime).outlineWidth).toEqual(
- packet.path.material.polylineOutline.outlineWidth,
- );
+ expect(entity.path).toBeDefined();
+ expect(entity.path.width.getValue(validTime)).toEqual(packet.path.width);
+ expect(entity.path.resolution.getValue(validTime)).toEqual(
+ packet.path.resolution
+ );
+ expect(entity.path.leadTime.getValue(validTime)).toEqual(
+ packet.path.leadTime
+ );
+ expect(entity.path.trailTime.getValue(validTime)).toEqual(
+ packet.path.trailTime
+ );
+ expect(entity.path.show.getValue(validTime)).toEqual(packet.path.show);
+ expect(entity.path.material.getValue(validTime).color).toEqual(
+ Color.unpack(packet.path.material.polylineOutline.color.rgbaf)
+ );
+ expect(entity.path.material.getValue(validTime).outlineColor).toEqual(
+ Color.unpack(packet.path.material.polylineOutline.outlineColor.rgbaf)
+ );
+ expect(entity.path.material.getValue(validTime).outlineWidth).toEqual(
+ packet.path.material.polylineOutline.outlineWidth
+ );
- expect(entity.path.material.getValue(invalidTime)).toBeUndefined();
- expect(entity.path.width.getValue(invalidTime)).toBeUndefined();
- expect(entity.path.leadTime.getValue(invalidTime)).toBeUndefined();
- expect(entity.path.trailTime.getValue(invalidTime)).toBeUndefined();
- expect(entity.path.show.getValue(invalidTime)).toBeUndefined();
- },
- );
+ expect(entity.path.material.getValue(invalidTime)).toBeUndefined();
+ expect(entity.path.width.getValue(invalidTime)).toBeUndefined();
+ expect(entity.path.leadTime.getValue(invalidTime)).toBeUndefined();
+ expect(entity.path.trailTime.getValue(invalidTime)).toBeUndefined();
+ expect(entity.path.show.getValue(invalidTime)).toBeUndefined();
+ });
});
it("can load constant data for point", function () {
@@ -4330,37 +4276,35 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.point).toBeDefined();
- expect(entity.point.color.getValue(time)).toEqual(
- Color.unpack(packet.point.color.rgbaf),
- );
- expect(entity.point.pixelSize.getValue(time)).toEqual(
- packet.point.pixelSize,
- );
- expect(entity.point.outlineColor.getValue(time)).toEqual(
- Color.unpack(packet.point.outlineColor.rgbaf),
- );
- expect(entity.point.outlineWidth.getValue(time)).toEqual(
- packet.point.outlineWidth,
- );
- 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(time)).toEqual(
- NearFarScalar.unpack(
- packet.point.translucencyByDistance.nearFarScalar,
- ),
- );
- expect(entity.point.heightReference.getValue(time)).toEqual(
- HeightReference[packet.point.heightReference],
- );
- },
- );
+ expect(entity.point).toBeDefined();
+ expect(entity.point.color.getValue(time)).toEqual(
+ Color.unpack(packet.point.color.rgbaf)
+ );
+ expect(entity.point.pixelSize.getValue(time)).toEqual(
+ packet.point.pixelSize
+ );
+ expect(entity.point.outlineColor.getValue(time)).toEqual(
+ Color.unpack(packet.point.outlineColor.rgbaf)
+ );
+ expect(entity.point.outlineWidth.getValue(time)).toEqual(
+ packet.point.outlineWidth
+ );
+ 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(time)).toEqual(
+ NearFarScalar.unpack(packet.point.translucencyByDistance.nearFarScalar)
+ );
+ expect(entity.point.heightReference.getValue(time)).toEqual(
+ HeightReference[packet.point.heightReference]
+ );
+ });
});
it("can load interval data for point", function () {
@@ -4384,34 +4328,32 @@ describe("DataSources/CzmlDataSource", function () {
}).start;
const invalidTime = JulianDate.addSeconds(validTime, -1, new JulianDate());
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.point).toBeDefined();
- expect(entity.point.color.getValue(validTime)).toEqual(
- Color.unpack(packet.point.color.rgbaf),
- );
- expect(entity.point.pixelSize.getValue(validTime)).toEqual(
- packet.point.pixelSize,
- );
- expect(entity.point.outlineColor.getValue(validTime)).toEqual(
- Color.unpack(packet.point.outlineColor.rgbaf),
- );
- expect(entity.point.outlineWidth.getValue(validTime)).toEqual(
- packet.point.outlineWidth,
- );
- expect(entity.point.show.getValue(validTime)).toEqual(
- packet.point.show,
- );
+ expect(entity.point).toBeDefined();
+ expect(entity.point.color.getValue(validTime)).toEqual(
+ Color.unpack(packet.point.color.rgbaf)
+ );
+ expect(entity.point.pixelSize.getValue(validTime)).toEqual(
+ packet.point.pixelSize
+ );
+ expect(entity.point.outlineColor.getValue(validTime)).toEqual(
+ Color.unpack(packet.point.outlineColor.rgbaf)
+ );
+ expect(entity.point.outlineWidth.getValue(validTime)).toEqual(
+ packet.point.outlineWidth
+ );
+ expect(entity.point.show.getValue(validTime)).toEqual(packet.point.show);
- expect(entity.point.color.getValue(invalidTime)).toBeUndefined();
- expect(entity.point.pixelSize.getValue(invalidTime)).toBeUndefined();
- expect(entity.point.outlineColor.getValue(invalidTime)).toBeUndefined();
- expect(entity.point.outlineWidth.getValue(invalidTime)).toBeUndefined();
- expect(entity.point.show.getValue(invalidTime)).toBeUndefined();
- },
- );
+ expect(entity.point.color.getValue(invalidTime)).toBeUndefined();
+ expect(entity.point.pixelSize.getValue(invalidTime)).toBeUndefined();
+ expect(entity.point.outlineColor.getValue(invalidTime)).toBeUndefined();
+ expect(entity.point.outlineWidth.getValue(invalidTime)).toBeUndefined();
+ expect(entity.point.show.getValue(invalidTime)).toBeUndefined();
+ });
});
it("can load constant data for polygon", function () {
@@ -4444,53 +4386,53 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.polygon).toBeDefined();
- expect(entity.polygon.material.getValue(time).color).toEqual(
- Color.unpack(packet.polygon.material.solidColor.color.rgbaf),
- );
- 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(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(time)).toEqual(
- packet.polygon.outline,
- );
- 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(time)).toEqual(
- packet.polygon.closeBottom,
- );
- expect(entity.polygon.shadows.getValue(time)).toEqual(
- ShadowMode[packet.polygon.shadows],
- );
- expect(entity.polygon.zIndex.getValue(time)).toEqual(
- packet.polygon.zIndex,
- );
- expect(entity.polygon.classificationType.getValue(time)).toEqual(
- ClassificationType[packet.polygon.classificationType],
- );
- },
- );
+ expect(entity.polygon).toBeDefined();
+ expect(entity.polygon.material.getValue(time).color).toEqual(
+ Color.unpack(packet.polygon.material.solidColor.color.rgbaf)
+ );
+ 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(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(time)).toEqual(
+ packet.polygon.outline
+ );
+ 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(time)).toEqual(
+ packet.polygon.closeBottom
+ );
+ expect(entity.polygon.shadows.getValue(time)).toEqual(
+ ShadowMode[packet.polygon.shadows]
+ );
+ expect(entity.polygon.zIndex.getValue(time)).toEqual(
+ packet.polygon.zIndex
+ );
+ expect(entity.polygon.classificationType.getValue(time)).toEqual(
+ ClassificationType[packet.polygon.classificationType]
+ );
+ });
});
it("can load interval data for polygon", function () {
@@ -4514,26 +4456,26 @@ describe("DataSources/CzmlDataSource", function () {
}).start;
const invalidTime = JulianDate.addSeconds(validTime, -1, new JulianDate());
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.polygon).toBeDefined();
- expect(entity.polygon.material.getValue(validTime).color).toEqual(
- Color.unpack(packet.polygon.material.solidColor.color.rgbaf),
- );
- expect(entity.polygon.show.getValue(validTime)).toEqual(
- packet.polygon.show,
- );
- expect(entity.polygon.shadows.getValue(validTime)).toEqual(
- ShadowMode[packet.polygon.shadows],
- );
+ expect(entity.polygon).toBeDefined();
+ expect(entity.polygon.material.getValue(validTime).color).toEqual(
+ Color.unpack(packet.polygon.material.solidColor.color.rgbaf)
+ );
+ expect(entity.polygon.show.getValue(validTime)).toEqual(
+ packet.polygon.show
+ );
+ expect(entity.polygon.shadows.getValue(validTime)).toEqual(
+ ShadowMode[packet.polygon.shadows]
+ );
- expect(entity.polygon.material.getValue(invalidTime)).toBeUndefined();
- expect(entity.polygon.show.getValue(invalidTime)).toBeUndefined();
- expect(entity.polygon.shadows.getValue(invalidTime)).toBeUndefined();
- },
- );
+ expect(entity.polygon.material.getValue(invalidTime)).toBeUndefined();
+ expect(entity.polygon.show.getValue(invalidTime)).toBeUndefined();
+ expect(entity.polygon.shadows.getValue(invalidTime)).toBeUndefined();
+ });
});
it("can load constant polygon positions", function () {
@@ -4547,39 +4489,39 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.polygon).toBeDefined();
- expect(entity.polygon.hierarchy).toBeDefined();
- expect(entity.polygon.hierarchy.isConstant).toEqual(true);
+ expect(entity.polygon).toBeDefined();
+ expect(entity.polygon.hierarchy).toBeDefined();
+ expect(entity.polygon.hierarchy.isConstant).toEqual(true);
- let hierarchy = entity.polygon.hierarchy.getValue(time);
- expect(hierarchy).toBeInstanceOf(PolygonHierarchy);
- expect(hierarchy.positions).toEqual(
- Cartesian3.fromDegreesArrayHeights(
- packet.polygon.positions.cartographicDegrees,
- ),
- );
+ let hierarchy = entity.polygon.hierarchy.getValue(time);
+ expect(hierarchy).toBeInstanceOf(PolygonHierarchy);
+ expect(hierarchy.positions).toEqual(
+ Cartesian3.fromDegreesArrayHeights(
+ packet.polygon.positions.cartographicDegrees
+ )
+ );
- hierarchy = entity.polygon.hierarchy.getValue(
- time,
- new PolygonHierarchy(),
- );
- expect(hierarchy).toBeInstanceOf(PolygonHierarchy);
- expect(hierarchy.positions).toEqual(
- Cartesian3.fromDegreesArrayHeights(
- packet.polygon.positions.cartographicDegrees,
- ),
- );
- },
- );
+ hierarchy = entity.polygon.hierarchy.getValue(
+ time,
+ new PolygonHierarchy()
+ );
+ expect(hierarchy).toBeInstanceOf(PolygonHierarchy);
+ expect(hierarchy.positions).toEqual(
+ Cartesian3.fromDegreesArrayHeights(
+ packet.polygon.positions.cartographicDegrees
+ )
+ );
+ });
});
function unpackPolygonHoleFromCartographicDegrees(holePositions) {
return new PolygonHierarchy(
- Cartesian3.fromDegreesArrayHeights(holePositions),
+ Cartesian3.fromDegreesArrayHeights(holePositions)
);
}
@@ -4600,28 +4542,28 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.polygon).toBeDefined();
- expect(entity.polygon.hierarchy).toBeDefined();
- expect(entity.polygon.hierarchy.isConstant).toEqual(true);
+ expect(entity.polygon).toBeDefined();
+ expect(entity.polygon.hierarchy).toBeDefined();
+ expect(entity.polygon.hierarchy.isConstant).toEqual(true);
- const hierarchy = entity.polygon.hierarchy.getValue(time);
- expect(hierarchy).toBeInstanceOf(PolygonHierarchy);
- expect(hierarchy.positions).toEqual(
- Cartesian3.fromDegreesArrayHeights(
- packet.polygon.positions.cartographicDegrees,
- ),
- );
- expect(hierarchy.holes).toEqual(
- packet.polygon.holes.cartographicDegrees.map(
- unpackPolygonHoleFromCartographicDegrees,
- ),
- );
- },
- );
+ const hierarchy = entity.polygon.hierarchy.getValue(time);
+ expect(hierarchy).toBeInstanceOf(PolygonHierarchy);
+ expect(hierarchy.positions).toEqual(
+ Cartesian3.fromDegreesArrayHeights(
+ packet.polygon.positions.cartographicDegrees
+ )
+ );
+ expect(hierarchy.holes).toEqual(
+ packet.polygon.holes.cartographicDegrees.map(
+ unpackPolygonHoleFromCartographicDegrees
+ )
+ );
+ });
});
it("can load interval polygon positions", function () {
@@ -4631,7 +4573,18 @@ describe("DataSources/CzmlDataSource", function () {
{
interval: "2012-08-04T16:00:00Z/2012-08-04T16:20:00Z",
cartographicDegrees: [
- -50, 20, 0, -50, 40, 0, -40, 40, 0, -40, 20, 0,
+ -50,
+ 20,
+ 0,
+ -50,
+ 40,
+ 0,
+ -40,
+ 40,
+ 0,
+ -40,
+ 20,
+ 0,
],
},
{
@@ -4642,35 +4595,35 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.polygon).toBeDefined();
- expect(entity.polygon.hierarchy).toBeDefined();
- expect(entity.polygon.hierarchy.isConstant).toEqual(false);
+ expect(entity.polygon).toBeDefined();
+ expect(entity.polygon.hierarchy).toBeDefined();
+ expect(entity.polygon.hierarchy.isConstant).toEqual(false);
- let hierarchy = entity.polygon.hierarchy.getValue(
- JulianDate.fromIso8601("2012-08-04T16:10:00Z"),
- );
- expect(hierarchy).toBeInstanceOf(PolygonHierarchy);
- expect(hierarchy.positions).toEqual(
- Cartesian3.fromDegreesArrayHeights(
- packet.polygon.positions[0].cartographicDegrees,
- ),
- );
+ let hierarchy = entity.polygon.hierarchy.getValue(
+ JulianDate.fromIso8601("2012-08-04T16:10:00Z")
+ );
+ expect(hierarchy).toBeInstanceOf(PolygonHierarchy);
+ expect(hierarchy.positions).toEqual(
+ Cartesian3.fromDegreesArrayHeights(
+ packet.polygon.positions[0].cartographicDegrees
+ )
+ );
- hierarchy = entity.polygon.hierarchy.getValue(
- JulianDate.fromIso8601("2012-08-04T16:20:00Z"),
- );
- expect(hierarchy).toBeInstanceOf(PolygonHierarchy);
- expect(hierarchy.positions).toEqual(
- Cartesian3.fromDegreesArrayHeights(
- packet.polygon.positions[1].cartographicDegrees,
- ),
- );
- },
- );
+ hierarchy = entity.polygon.hierarchy.getValue(
+ JulianDate.fromIso8601("2012-08-04T16:20:00Z")
+ );
+ expect(hierarchy).toBeInstanceOf(PolygonHierarchy);
+ expect(hierarchy.positions).toEqual(
+ Cartesian3.fromDegreesArrayHeights(
+ packet.polygon.positions[1].cartographicDegrees
+ )
+ );
+ });
});
it("can load interval polygon positions with holes expressed as degrees", function () {
@@ -4680,7 +4633,18 @@ describe("DataSources/CzmlDataSource", function () {
{
interval: "2012-08-04T16:00:00Z/2012-08-04T16:20:00Z",
cartographicDegrees: [
- -50, 20, 0, -50, 40, 0, -40, 40, 0, -40, 20, 0,
+ -50,
+ 20,
+ 0,
+ -50,
+ 40,
+ 0,
+ -40,
+ 40,
+ 0,
+ -40,
+ 20,
+ 0,
],
},
{
@@ -4704,50 +4668,50 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.polygon).toBeDefined();
- expect(entity.polygon.hierarchy).toBeDefined();
- expect(entity.polygon.hierarchy.isConstant).toEqual(false);
+ expect(entity.polygon).toBeDefined();
+ expect(entity.polygon.hierarchy).toBeDefined();
+ expect(entity.polygon.hierarchy.isConstant).toEqual(false);
- let hierarchy = entity.polygon.hierarchy.getValue(
- JulianDate.fromIso8601("2012-08-04T16:10:00Z"),
- );
- expect(hierarchy).toBeInstanceOf(PolygonHierarchy);
- expect(hierarchy.positions).toEqual(
- Cartesian3.fromDegreesArrayHeights(
- packet.polygon.positions[0].cartographicDegrees,
- ),
- );
- expect(hierarchy.holes).toEqual(
- packet.polygon.holes[0].cartographicDegrees.map(
- unpackPolygonHoleFromCartographicDegrees,
- ),
- );
+ let hierarchy = entity.polygon.hierarchy.getValue(
+ JulianDate.fromIso8601("2012-08-04T16:10:00Z")
+ );
+ expect(hierarchy).toBeInstanceOf(PolygonHierarchy);
+ expect(hierarchy.positions).toEqual(
+ Cartesian3.fromDegreesArrayHeights(
+ packet.polygon.positions[0].cartographicDegrees
+ )
+ );
+ expect(hierarchy.holes).toEqual(
+ packet.polygon.holes[0].cartographicDegrees.map(
+ unpackPolygonHoleFromCartographicDegrees
+ )
+ );
- hierarchy = entity.polygon.hierarchy.getValue(
- JulianDate.fromIso8601("2012-08-04T16:20:00Z"),
- );
- expect(hierarchy).toBeInstanceOf(PolygonHierarchy);
- expect(hierarchy.positions).toEqual(
- Cartesian3.fromDegreesArrayHeights(
- packet.polygon.positions[1].cartographicDegrees,
- ),
- );
- expect(hierarchy.holes).toEqual(
- packet.polygon.holes[1].cartographicDegrees.map(
- unpackPolygonHoleFromCartographicDegrees,
- ),
- );
- },
- );
+ hierarchy = entity.polygon.hierarchy.getValue(
+ JulianDate.fromIso8601("2012-08-04T16:20:00Z")
+ );
+ expect(hierarchy).toBeInstanceOf(PolygonHierarchy);
+ expect(hierarchy.positions).toEqual(
+ Cartesian3.fromDegreesArrayHeights(
+ packet.polygon.positions[1].cartographicDegrees
+ )
+ );
+ expect(hierarchy.holes).toEqual(
+ packet.polygon.holes[1].cartographicDegrees.map(
+ unpackPolygonHoleFromCartographicDegrees
+ )
+ );
+ });
});
function unpackPolygonHoleFromCartographicRadians(holePositions) {
return new PolygonHierarchy(
- Cartesian3.fromRadiansArrayHeights(holePositions),
+ Cartesian3.fromRadiansArrayHeights(holePositions)
);
}
@@ -4758,9 +4722,18 @@ describe("DataSources/CzmlDataSource", function () {
{
interval: "2012-08-04T16:00:00Z/2012-08-04T16:20:00Z",
cartographicRadians: [
- -0.8726646259971648, 0.3490658503988659, 0, -0.8726646259971648,
- 0.6981317007977318, 0, -0.6981317007977318, 0.6981317007977318, 0,
- -0.6981317007977318, 0.3490658503988659, 0,
+ -0.8726646259971648,
+ 0.3490658503988659,
+ 0,
+ -0.8726646259971648,
+ 0.6981317007977318,
+ 0,
+ -0.6981317007977318,
+ 0.6981317007977318,
+ 0,
+ -0.6981317007977318,
+ 0.3490658503988659,
+ 0,
],
},
],
@@ -4769,9 +4742,18 @@ describe("DataSources/CzmlDataSource", function () {
interval: "2012-08-04T16:00:00Z/2012-08-04T16:20:00Z",
cartographicRadians: [
[
- -0.8412486994612669, 0.6806784082777885, 0, -0.7766715171374766,
- 0.6457718232379019, 0, -0.8534660042252271, 0.5777039824101231,
- 0, -0.8552113334772214, 0.6387905062299246, 0,
+ -0.8412486994612669,
+ 0.6806784082777885,
+ 0,
+ -0.7766715171374766,
+ 0.6457718232379019,
+ 0,
+ -0.8534660042252271,
+ 0.5777039824101231,
+ 0,
+ -0.8552113334772214,
+ 0.6387905062299246,
+ 0,
],
],
},
@@ -4779,30 +4761,30 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.polygon).toBeDefined();
- expect(entity.polygon.hierarchy).toBeDefined();
- expect(entity.polygon.hierarchy.isConstant).toEqual(false);
+ expect(entity.polygon).toBeDefined();
+ expect(entity.polygon.hierarchy).toBeDefined();
+ expect(entity.polygon.hierarchy.isConstant).toEqual(false);
- const hierarchy = entity.polygon.hierarchy.getValue(
- JulianDate.fromIso8601("2012-08-04T16:10:00Z"),
- );
- expect(hierarchy).toBeInstanceOf(PolygonHierarchy);
- expect(hierarchy.positions).toEqual(
- Cartesian3.fromRadiansArrayHeights(
- packet.polygon.positions[0].cartographicRadians,
- ),
- );
- expect(hierarchy.holes).toEqual(
- packet.polygon.holes[0].cartographicRadians.map(
- unpackPolygonHoleFromCartographicRadians,
- ),
- );
- },
- );
+ const hierarchy = entity.polygon.hierarchy.getValue(
+ JulianDate.fromIso8601("2012-08-04T16:10:00Z")
+ );
+ expect(hierarchy).toBeInstanceOf(PolygonHierarchy);
+ expect(hierarchy.positions).toEqual(
+ Cartesian3.fromRadiansArrayHeights(
+ packet.polygon.positions[0].cartographicRadians
+ )
+ );
+ expect(hierarchy.holes).toEqual(
+ packet.polygon.holes[0].cartographicRadians.map(
+ unpackPolygonHoleFromCartographicRadians
+ )
+ );
+ });
});
function unpackPolygonHoleFromCartesian(holePositions) {
@@ -4827,26 +4809,26 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.polygon).toBeDefined();
- expect(entity.polygon.hierarchy).toBeDefined();
- expect(entity.polygon.hierarchy.isConstant).toEqual(false);
+ expect(entity.polygon).toBeDefined();
+ expect(entity.polygon.hierarchy).toBeDefined();
+ expect(entity.polygon.hierarchy.isConstant).toEqual(false);
- const hierarchy = entity.polygon.hierarchy.getValue(
- JulianDate.fromIso8601("2012-08-04T16:10:00Z"),
- );
- expect(hierarchy).toBeInstanceOf(PolygonHierarchy);
- expect(hierarchy.positions).toEqual(
- Cartesian3.unpackArray(packet.polygon.positions[0].cartesian),
- );
- expect(hierarchy.holes).toEqual(
- packet.polygon.holes[0].cartesian.map(unpackPolygonHoleFromCartesian),
- );
- },
- );
+ const hierarchy = entity.polygon.hierarchy.getValue(
+ JulianDate.fromIso8601("2012-08-04T16:10:00Z")
+ );
+ expect(hierarchy).toBeInstanceOf(PolygonHierarchy);
+ expect(hierarchy.positions).toEqual(
+ Cartesian3.unpackArray(packet.polygon.positions[0].cartesian)
+ );
+ expect(hierarchy.holes).toEqual(
+ packet.polygon.holes[0].cartesian.map(unpackPolygonHoleFromCartesian)
+ );
+ });
});
it("can load reference polygon positions with holes", function () {
@@ -4946,7 +4928,18 @@ describe("DataSources/CzmlDataSource", function () {
polygon: {
positions: {
cartographicDegrees: [
- -50, 20, 0, -50, 40, 0, -40, 40, 0, -40, 20, 0,
+ -50,
+ 20,
+ 0,
+ -50,
+ 40,
+ 0,
+ -40,
+ 40,
+ 0,
+ -40,
+ 20,
+ 0,
],
},
holes: [
@@ -4970,7 +4963,18 @@ describe("DataSources/CzmlDataSource", function () {
{
interval: "2012-08-04T16:00:00Z/2012-08-04T16:20:00Z",
cartographicDegrees: [
- -50, 20, 0, -50, 40, 0, -40, 40, 0, -40, 20, 0,
+ -50,
+ 20,
+ 0,
+ -50,
+ 40,
+ 0,
+ -40,
+ 40,
+ 0,
+ -40,
+ 20,
+ 0,
],
},
{
@@ -4987,7 +4991,7 @@ describe("DataSources/CzmlDataSource", function () {
return CzmlDataSource.load(document).then(function (dataSource) {
let entity = dataSource.entities.getById(
- "constantPositionsTimeVaryingHoles",
+ "constantPositionsTimeVaryingHoles"
);
expect(entity.polygon).toBeDefined();
@@ -5025,36 +5029,34 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.polyline).toBeDefined();
- expect(entity.polyline.material.color.getValue(time)).toEqual(
- Color.unpack(packet.polyline.material.polylineOutline.color.rgbaf),
- );
- expect(entity.polyline.material.outlineColor.getValue(time)).toEqual(
- Color.unpack(
- packet.polyline.material.polylineOutline.outlineColor.rgbaf,
- ),
- );
- 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(time)).toEqual(
- packet.polyline.show,
- );
- expect(entity.polyline.shadows.getValue(time)).toEqual(
- ShadowMode[packet.polyline.shadows],
- );
- expect(entity.polyline.classificationType.getValue(time)).toEqual(
- ClassificationType[packet.polyline.classificationType],
- );
- },
- );
+ expect(entity.polyline).toBeDefined();
+ expect(entity.polyline.material.color.getValue(time)).toEqual(
+ Color.unpack(packet.polyline.material.polylineOutline.color.rgbaf)
+ );
+ expect(entity.polyline.material.outlineColor.getValue(time)).toEqual(
+ Color.unpack(
+ packet.polyline.material.polylineOutline.outlineColor.rgbaf
+ )
+ );
+ 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(time)).toEqual(packet.polyline.show);
+ expect(entity.polyline.shadows.getValue(time)).toEqual(
+ ShadowMode[packet.polyline.shadows]
+ );
+ expect(entity.polyline.classificationType.getValue(time)).toEqual(
+ ClassificationType[packet.polyline.classificationType]
+ );
+ });
});
it("can load interval data for polyline", function () {
@@ -5083,40 +5085,38 @@ describe("DataSources/CzmlDataSource", function () {
}).start;
const invalidTime = JulianDate.addSeconds(validTime, -1, new JulianDate());
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.polyline).toBeDefined();
- expect(entity.polyline.material.getValue(validTime).color).toEqual(
- Color.unpack(packet.polyline.material.polylineOutline.color.rgbaf),
- );
- expect(
- entity.polyline.material.getValue(validTime).outlineColor,
- ).toEqual(
- Color.unpack(
- packet.polyline.material.polylineOutline.outlineColor.rgbaf,
- ),
- );
- expect(
- entity.polyline.material.getValue(validTime).outlineWidth,
- ).toEqual(packet.polyline.material.polylineOutline.outlineWidth);
- expect(entity.polyline.width.getValue(validTime)).toEqual(
- packet.polyline.width,
- );
- expect(entity.polyline.show.getValue(validTime)).toEqual(
- packet.polyline.show,
- );
- expect(entity.polyline.shadows.getValue(validTime)).toEqual(
- ShadowMode[packet.polyline.shadows],
- );
+ expect(entity.polyline).toBeDefined();
+ expect(entity.polyline.material.getValue(validTime).color).toEqual(
+ Color.unpack(packet.polyline.material.polylineOutline.color.rgbaf)
+ );
+ expect(entity.polyline.material.getValue(validTime).outlineColor).toEqual(
+ Color.unpack(
+ packet.polyline.material.polylineOutline.outlineColor.rgbaf
+ )
+ );
+ expect(entity.polyline.material.getValue(validTime).outlineWidth).toEqual(
+ packet.polyline.material.polylineOutline.outlineWidth
+ );
+ expect(entity.polyline.width.getValue(validTime)).toEqual(
+ packet.polyline.width
+ );
+ expect(entity.polyline.show.getValue(validTime)).toEqual(
+ packet.polyline.show
+ );
+ expect(entity.polyline.shadows.getValue(validTime)).toEqual(
+ ShadowMode[packet.polyline.shadows]
+ );
- expect(entity.polyline.material.getValue(invalidTime)).toBeUndefined();
- expect(entity.polyline.width.getValue(invalidTime)).toBeUndefined();
- expect(entity.polyline.show.getValue(invalidTime)).toBeUndefined();
- expect(entity.polyline.shadows.getValue(invalidTime)).toBeUndefined();
- },
- );
+ expect(entity.polyline.material.getValue(invalidTime)).toBeUndefined();
+ expect(entity.polyline.width.getValue(invalidTime)).toBeUndefined();
+ expect(entity.polyline.show.getValue(invalidTime)).toBeUndefined();
+ expect(entity.polyline.shadows.getValue(invalidTime)).toBeUndefined();
+ });
});
it("can load constant data for polyline clamped to terrain.", function () {
@@ -5142,36 +5142,34 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.polyline).toBeDefined();
- expect(entity.polyline.material.color.getValue(time)).toEqual(
- Color.unpack(packet.polyline.material.polylineOutline.color.rgbaf),
- );
- expect(entity.polyline.material.outlineColor.getValue(time)).toEqual(
- Color.unpack(
- packet.polyline.material.polylineOutline.outlineColor.rgbaf,
- ),
- );
- 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(time)).toEqual(
- packet.polyline.show,
- );
- expect(entity.polyline.clampToGround.getValue(time)).toEqual(
- packet.polyline.clampToGround,
- );
- expect(entity.polyline.zIndex.getValue(time)).toEqual(
- packet.polyline.zIndex,
- );
- },
- );
+ expect(entity.polyline).toBeDefined();
+ expect(entity.polyline.material.color.getValue(time)).toEqual(
+ Color.unpack(packet.polyline.material.polylineOutline.color.rgbaf)
+ );
+ expect(entity.polyline.material.outlineColor.getValue(time)).toEqual(
+ Color.unpack(
+ packet.polyline.material.polylineOutline.outlineColor.rgbaf
+ )
+ );
+ 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(time)).toEqual(packet.polyline.show);
+ expect(entity.polyline.clampToGround.getValue(time)).toEqual(
+ packet.polyline.clampToGround
+ );
+ expect(entity.polyline.zIndex.getValue(time)).toEqual(
+ packet.polyline.zIndex
+ );
+ });
});
it("can load constant data for polylineVolume", function () {
@@ -5215,33 +5213,33 @@ describe("DataSources/CzmlDataSource", function () {
expect(entity.polylineVolume).toBeDefined();
expect(entity.polylineVolume.positions.getValue(time)).toEqual(
- Cartesian3.unpackArray(packet.polylineVolume.positions.cartesian),
+ Cartesian3.unpackArray(packet.polylineVolume.positions.cartesian)
);
expect(entity.polylineVolume.shape.getValue(time)).toEqual(
- Cartesian2.unpackArray(packet.polylineVolume.shape.cartesian2),
+ Cartesian2.unpackArray(packet.polylineVolume.shape.cartesian2)
);
expect(entity.polylineVolume.cornerType.getValue(time)).toEqual(
- CornerType[packet.polylineVolume.cornerType],
+ CornerType[packet.polylineVolume.cornerType]
);
expect(entity.polylineVolume.show.getValue(time)).toEqual(
- packet.polylineVolume.show,
+ packet.polylineVolume.show
);
expect(entity.polylineVolume.fill.getValue(time)).toEqual(
- packet.polylineVolume.fill,
+ packet.polylineVolume.fill
);
expect(entity.polylineVolume.material.getValue(time).color).toEqual(
- Color.unpack(packet.polylineVolume.material.solidColor.color.rgbaf),
+ 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),
+ Color.unpack(packet.polylineVolume.outlineColor.rgbaf)
);
expect(entity.polylineVolume.outlineWidth.getValue(time)).toEqual(6);
expect(entity.polylineVolume.granularity.getValue(time)).toEqual(
- packet.polylineVolume.granularity,
+ packet.polylineVolume.granularity
);
expect(entity.polylineVolume.shadows.getValue(time)).toEqual(
- ShadowMode[packet.polylineVolume.shadows],
+ ShadowMode[packet.polylineVolume.shadows]
);
// for backwards compatibility, also accept `shape` specified as `cartesian`
@@ -5257,7 +5255,7 @@ describe("DataSources/CzmlDataSource", function () {
expect(entity.id).toEqual("id");
expect(entity.polylineVolume.shape.getValue(time)).toEqual(
- Cartesian2.unpackArray(packet.polylineVolume.shape.cartesian),
+ Cartesian2.unpackArray(packet.polylineVolume.shape.cartesian)
);
});
});
@@ -5269,7 +5267,8 @@ describe("DataSources/CzmlDataSource", function () {
scale: 3.0,
minimumPixelSize: 5.0,
maximumScale: 4.0,
- gltf: "./Data/Models/glTF-2.0/BoxArticulations/glTF/BoxArticulations.gltf",
+ gltf:
+ "./Data/Models/glTF-2.0/BoxArticulations/glTF/BoxArticulations.gltf",
incrementallyLoadTextures: true,
shadows: "ENABLED",
heightReference: "CLAMP_TO_GROUND",
@@ -5305,96 +5304,92 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.model).toBeDefined();
- 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.maximumScale.getValue(time)).toEqual(
- packet.model.maximumScale,
- );
- expect(entity.model.uri.getValue(time).url).toEqual(packet.model.gltf);
- expect(entity.model.incrementallyLoadTextures.getValue(time)).toEqual(
- packet.model.incrementallyLoadTextures,
- );
- expect(entity.model.shadows.getValue(time)).toEqual(
- ShadowMode[packet.model.shadows],
- );
- 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(time)).toEqual(
- ColorBlendMode[packet.model.colorBlendMode],
- );
- expect(entity.model.colorBlendAmount.getValue(time)).toEqual(
- packet.model.colorBlendAmount,
- );
+ expect(entity.model).toBeDefined();
+ 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.maximumScale.getValue(time)).toEqual(
+ packet.model.maximumScale
+ );
+ expect(entity.model.uri.getValue(time).url).toEqual(packet.model.gltf);
+ expect(entity.model.incrementallyLoadTextures.getValue(time)).toEqual(
+ packet.model.incrementallyLoadTextures
+ );
+ expect(entity.model.shadows.getValue(time)).toEqual(
+ ShadowMode[packet.model.shadows]
+ );
+ 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(time)).toEqual(
+ ColorBlendMode[packet.model.colorBlendMode]
+ );
+ expect(entity.model.colorBlendAmount.getValue(time)).toEqual(
+ packet.model.colorBlendAmount
+ );
- const nodeTransform =
- entity.model.nodeTransformations.getValue(time).Mesh;
- expect(nodeTransform).toBeDefined();
- expect(nodeTransform.scale).toEqual(
- Cartesian3.unpack(
- packet.model.nodeTransformations.Mesh.scale.cartesian,
- ),
- );
- expect(nodeTransform.translation).toEqual(
- Cartesian3.unpack(
- packet.model.nodeTransformations.Mesh.translation.cartesian,
- ),
- );
+ const nodeTransform = entity.model.nodeTransformations.getValue(time)
+ .Mesh;
+ expect(nodeTransform).toBeDefined();
+ expect(nodeTransform.scale).toEqual(
+ Cartesian3.unpack(packet.model.nodeTransformations.Mesh.scale.cartesian)
+ );
+ expect(nodeTransform.translation).toEqual(
+ Cartesian3.unpack(
+ packet.model.nodeTransformations.Mesh.translation.cartesian
+ )
+ );
- const expectedRotation = Quaternion.unpack(
- packet.model.nodeTransformations.Mesh.rotation.unitQuaternion,
- );
- Quaternion.normalize(expectedRotation, expectedRotation);
- expect(nodeTransform.rotation).toEqual(expectedRotation);
+ const expectedRotation = Quaternion.unpack(
+ packet.model.nodeTransformations.Mesh.rotation.unitQuaternion
+ );
+ Quaternion.normalize(expectedRotation, expectedRotation);
+ expect(nodeTransform.rotation).toEqual(expectedRotation);
- expect(
- entity.model.nodeTransformations.Mesh.scale.getValue(time),
- ).toEqual(
- Cartesian3.unpack(
- packet.model.nodeTransformations.Mesh.scale.cartesian,
- ),
- );
- expect(
- entity.model.nodeTransformations.Mesh.translation.getValue(time),
- ).toEqual(
- Cartesian3.unpack(
- packet.model.nodeTransformations.Mesh.translation.cartesian,
- ),
- );
- expect(
- entity.model.nodeTransformations.Mesh.rotation.getValue(time),
- ).toEqual(expectedRotation);
+ expect(
+ entity.model.nodeTransformations.Mesh.scale.getValue(time)
+ ).toEqual(
+ Cartesian3.unpack(packet.model.nodeTransformations.Mesh.scale.cartesian)
+ );
+ expect(
+ entity.model.nodeTransformations.Mesh.translation.getValue(time)
+ ).toEqual(
+ Cartesian3.unpack(
+ packet.model.nodeTransformations.Mesh.translation.cartesian
+ )
+ );
+ expect(
+ entity.model.nodeTransformations.Mesh.rotation.getValue(time)
+ ).toEqual(expectedRotation);
- const articulations = entity.model.articulations.getValue(time);
- expect(articulations).toBeDefined();
- expect(articulations["SampleArticulation Yaw"]).toEqual(
- packet.model.articulations["SampleArticulation Yaw"],
- );
- expect(articulations["SampleArticulation Pitch"]).toEqual(
- packet.model.articulations["SampleArticulation Pitch"],
- );
- expect(articulations["SampleArticulation Roll"]).toEqual(
- packet.model.articulations["SampleArticulation Roll"],
- );
- },
- );
+ const articulations = entity.model.articulations.getValue(time);
+ expect(articulations).toBeDefined();
+ expect(articulations["SampleArticulation Yaw"]).toEqual(
+ packet.model.articulations["SampleArticulation Yaw"]
+ );
+ expect(articulations["SampleArticulation Pitch"]).toEqual(
+ packet.model.articulations["SampleArticulation Pitch"]
+ );
+ expect(articulations["SampleArticulation Roll"]).toEqual(
+ packet.model.articulations["SampleArticulation Roll"]
+ );
+ });
});
it("can load interval data for model", function () {
@@ -5404,7 +5399,8 @@ describe("DataSources/CzmlDataSource", function () {
show: true,
scale: 3.0,
minimumPixelSize: 5.0,
- gltf: "./Data/Models/glTF-2.0/BoxArticulations/glTF/BoxArticulations.gltf",
+ gltf:
+ "./Data/Models/glTF-2.0/BoxArticulations/glTF/BoxArticulations.gltf",
incrementallyLoadTextures: true,
shadows: "ENABLED",
heightReference: "CLAMP_TO_GROUND",
@@ -5443,150 +5439,137 @@ describe("DataSources/CzmlDataSource", function () {
}).start;
const invalidTime = JulianDate.addSeconds(validTime, -1, new JulianDate());
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.model).toBeDefined();
- expect(entity.model.show.getValue(validTime)).toEqual(
- packet.model.show,
- );
- expect(entity.model.scale.getValue(validTime)).toEqual(
- packet.model.scale,
- );
- expect(entity.model.minimumPixelSize.getValue(validTime)).toEqual(
- packet.model.minimumPixelSize,
- );
- expect(entity.model.uri.getValue(validTime).url).toEqual(
- packet.model.gltf,
- );
- expect(
- entity.model.incrementallyLoadTextures.getValue(validTime),
- ).toEqual(packet.model.incrementallyLoadTextures);
- expect(entity.model.shadows.getValue(validTime)).toEqual(
- ShadowMode[packet.model.shadows],
- );
- expect(entity.model.heightReference.getValue(validTime)).toEqual(
- HeightReference[packet.model.heightReference],
- );
- expect(entity.model.silhouetteColor.getValue(validTime)).toEqual(
- Color.unpack(packet.model.silhouetteColor.rgbaf),
- );
- expect(entity.model.silhouetteSize.getValue(validTime)).toEqual(
- packet.model.silhouetteSize,
- );
- expect(entity.model.color.getValue(validTime)).toEqual(
- Color.unpack(packet.model.color.rgbaf),
- );
- expect(entity.model.colorBlendMode.getValue(validTime)).toEqual(
- ColorBlendMode[packet.model.colorBlendMode],
- );
- expect(entity.model.colorBlendAmount.getValue(validTime)).toEqual(
- packet.model.colorBlendAmount,
- );
+ expect(entity.model).toBeDefined();
+ expect(entity.model.show.getValue(validTime)).toEqual(packet.model.show);
+ expect(entity.model.scale.getValue(validTime)).toEqual(
+ packet.model.scale
+ );
+ expect(entity.model.minimumPixelSize.getValue(validTime)).toEqual(
+ packet.model.minimumPixelSize
+ );
+ expect(entity.model.uri.getValue(validTime).url).toEqual(
+ packet.model.gltf
+ );
+ expect(
+ entity.model.incrementallyLoadTextures.getValue(validTime)
+ ).toEqual(packet.model.incrementallyLoadTextures);
+ expect(entity.model.shadows.getValue(validTime)).toEqual(
+ ShadowMode[packet.model.shadows]
+ );
+ expect(entity.model.heightReference.getValue(validTime)).toEqual(
+ HeightReference[packet.model.heightReference]
+ );
+ expect(entity.model.silhouetteColor.getValue(validTime)).toEqual(
+ Color.unpack(packet.model.silhouetteColor.rgbaf)
+ );
+ expect(entity.model.silhouetteSize.getValue(validTime)).toEqual(
+ packet.model.silhouetteSize
+ );
+ expect(entity.model.color.getValue(validTime)).toEqual(
+ Color.unpack(packet.model.color.rgbaf)
+ );
+ expect(entity.model.colorBlendMode.getValue(validTime)).toEqual(
+ ColorBlendMode[packet.model.colorBlendMode]
+ );
+ expect(entity.model.colorBlendAmount.getValue(validTime)).toEqual(
+ packet.model.colorBlendAmount
+ );
- const nodeTransform =
- entity.model.nodeTransformations.getValue(validTime).Mesh;
- expect(nodeTransform).toBeDefined();
- expect(nodeTransform.scale).toEqual(
- Cartesian3.unpack(
- packet.model.nodeTransformations.Mesh.scale.cartesian,
- ),
- );
- expect(nodeTransform.translation).toEqual(
- Cartesian3.unpack(
- packet.model.nodeTransformations.Mesh.translation.cartesian,
- ),
- );
+ const nodeTransform = entity.model.nodeTransformations.getValue(validTime)
+ .Mesh;
+ expect(nodeTransform).toBeDefined();
+ expect(nodeTransform.scale).toEqual(
+ Cartesian3.unpack(packet.model.nodeTransformations.Mesh.scale.cartesian)
+ );
+ expect(nodeTransform.translation).toEqual(
+ Cartesian3.unpack(
+ packet.model.nodeTransformations.Mesh.translation.cartesian
+ )
+ );
- const expectedRotation = Quaternion.unpack(
- packet.model.nodeTransformations.Mesh.rotation.unitQuaternion,
- );
- Quaternion.normalize(expectedRotation, expectedRotation);
- expect(nodeTransform.rotation).toEqual(expectedRotation);
+ const expectedRotation = Quaternion.unpack(
+ packet.model.nodeTransformations.Mesh.rotation.unitQuaternion
+ );
+ Quaternion.normalize(expectedRotation, expectedRotation);
+ expect(nodeTransform.rotation).toEqual(expectedRotation);
- expect(
- entity.model.nodeTransformations.Mesh.scale.getValue(validTime),
- ).toEqual(
- Cartesian3.unpack(
- packet.model.nodeTransformations.Mesh.scale.cartesian,
- ),
- );
- expect(
- entity.model.nodeTransformations.Mesh.translation.getValue(validTime),
- ).toEqual(
- Cartesian3.unpack(
- packet.model.nodeTransformations.Mesh.translation.cartesian,
- ),
- );
- expect(
- entity.model.nodeTransformations.Mesh.rotation.getValue(validTime),
- ).toEqual(expectedRotation);
+ expect(
+ entity.model.nodeTransformations.Mesh.scale.getValue(validTime)
+ ).toEqual(
+ Cartesian3.unpack(packet.model.nodeTransformations.Mesh.scale.cartesian)
+ );
+ expect(
+ entity.model.nodeTransformations.Mesh.translation.getValue(validTime)
+ ).toEqual(
+ Cartesian3.unpack(
+ packet.model.nodeTransformations.Mesh.translation.cartesian
+ )
+ );
+ expect(
+ entity.model.nodeTransformations.Mesh.rotation.getValue(validTime)
+ ).toEqual(expectedRotation);
- const articulations = entity.model.articulations.getValue(validTime);
- expect(articulations).toBeDefined();
- expect(articulations["SampleArticulation Yaw"]).toEqual(
- packet.model.articulations["SampleArticulation Yaw"],
- );
- expect(articulations["SampleArticulation Pitch"]).toEqual(
- packet.model.articulations["SampleArticulation Pitch"],
- );
- expect(articulations["SampleArticulation Roll"]).toEqual(
- packet.model.articulations["SampleArticulation Roll"],
- );
+ const articulations = entity.model.articulations.getValue(validTime);
+ expect(articulations).toBeDefined();
+ expect(articulations["SampleArticulation Yaw"]).toEqual(
+ packet.model.articulations["SampleArticulation Yaw"]
+ );
+ expect(articulations["SampleArticulation Pitch"]).toEqual(
+ packet.model.articulations["SampleArticulation Pitch"]
+ );
+ expect(articulations["SampleArticulation Roll"]).toEqual(
+ packet.model.articulations["SampleArticulation Roll"]
+ );
- expect(entity.model.show.getValue(invalidTime)).toBeUndefined();
- expect(entity.model.scale.getValue(invalidTime)).toBeUndefined();
- expect(
- entity.model.minimumPixelSize.getValue(invalidTime),
- ).toBeUndefined();
- expect(entity.model.uri.getValue(invalidTime)).toBeUndefined();
- expect(
- entity.model.incrementallyLoadTextures.getValue(invalidTime),
- ).toBeUndefined();
- expect(entity.model.shadows.getValue(invalidTime)).toBeUndefined();
- expect(
- entity.model.heightReference.getValue(invalidTime),
- ).toBeUndefined();
- expect(entity.model.color.getValue(invalidTime)).toBeUndefined();
- expect(
- entity.model.silhouetteColor.getValue(invalidTime),
- ).toBeUndefined();
- expect(
- entity.model.silhouetteSize.getValue(invalidTime),
- ).toBeUndefined();
- expect(
- entity.model.colorBlendMode.getValue(invalidTime),
- ).toBeUndefined();
- expect(
- entity.model.colorBlendAmount.getValue(invalidTime),
- ).toBeUndefined();
+ expect(entity.model.show.getValue(invalidTime)).toBeUndefined();
+ expect(entity.model.scale.getValue(invalidTime)).toBeUndefined();
+ expect(
+ entity.model.minimumPixelSize.getValue(invalidTime)
+ ).toBeUndefined();
+ expect(entity.model.uri.getValue(invalidTime)).toBeUndefined();
+ expect(
+ entity.model.incrementallyLoadTextures.getValue(invalidTime)
+ ).toBeUndefined();
+ expect(entity.model.shadows.getValue(invalidTime)).toBeUndefined();
+ expect(
+ entity.model.heightReference.getValue(invalidTime)
+ ).toBeUndefined();
+ expect(entity.model.color.getValue(invalidTime)).toBeUndefined();
+ expect(
+ entity.model.silhouetteColor.getValue(invalidTime)
+ ).toBeUndefined();
+ expect(entity.model.silhouetteSize.getValue(invalidTime)).toBeUndefined();
+ expect(entity.model.colorBlendMode.getValue(invalidTime)).toBeUndefined();
+ expect(
+ entity.model.colorBlendAmount.getValue(invalidTime)
+ ).toBeUndefined();
- expect(
- entity.model.nodeTransformations.Mesh.getValue(invalidTime),
- ).toEqual(new TranslationRotationScale());
- expect(
- entity.model.nodeTransformations.Mesh.scale.getValue(invalidTime),
- ).toBeUndefined();
- expect(
- entity.model.nodeTransformations.Mesh.translation.getValue(
- invalidTime,
- ),
- ).toBeUndefined();
- expect(
- entity.model.nodeTransformations.Mesh.rotation.getValue(invalidTime),
- ).toBeUndefined();
+ expect(
+ entity.model.nodeTransformations.Mesh.getValue(invalidTime)
+ ).toEqual(new TranslationRotationScale());
+ expect(
+ entity.model.nodeTransformations.Mesh.scale.getValue(invalidTime)
+ ).toBeUndefined();
+ expect(
+ entity.model.nodeTransformations.Mesh.translation.getValue(invalidTime)
+ ).toBeUndefined();
+ expect(
+ entity.model.nodeTransformations.Mesh.rotation.getValue(invalidTime)
+ ).toBeUndefined();
- const invalidArticulations =
- entity.model.articulations.getValue(invalidTime);
- expect(invalidArticulations).toBeDefined();
- expect(invalidArticulations["SampleArticulation Yaw"]).toBeUndefined();
- expect(
- invalidArticulations["SampleArticulation Pitch"],
- ).toBeUndefined();
- expect(invalidArticulations["SampleArticulation Roll"]).toBeUndefined();
- },
- );
+ const invalidArticulations = entity.model.articulations.getValue(
+ invalidTime
+ );
+ expect(invalidArticulations).toBeDefined();
+ expect(invalidArticulations["SampleArticulation Yaw"]).toBeUndefined();
+ expect(invalidArticulations["SampleArticulation Pitch"]).toBeUndefined();
+ expect(invalidArticulations["SampleArticulation Roll"]).toBeUndefined();
+ });
});
it("can load node transformations expressed as intervals", function () {
@@ -5626,54 +5609,53 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.model).toBeDefined();
+ expect(entity.model).toBeDefined();
- let time = JulianDate.fromIso8601("2012-04-02T12:00:00Z");
- let nodeTransform =
- entity.model.nodeTransformations.getValue(time).Mesh;
- expect(nodeTransform).toBeDefined();
- expect(nodeTransform.scale).toEqual(
- Cartesian3.unpack(
- packet.model.nodeTransformations[0].Mesh.scale.cartesian,
- ),
- );
- expect(nodeTransform.translation).toEqual(
- Cartesian3.unpack(
- packet.model.nodeTransformations[0].Mesh.translation.cartesian,
- ),
- );
+ let time = JulianDate.fromIso8601("2012-04-02T12:00:00Z");
+ let nodeTransform = entity.model.nodeTransformations.getValue(time).Mesh;
+ expect(nodeTransform).toBeDefined();
+ expect(nodeTransform.scale).toEqual(
+ Cartesian3.unpack(
+ packet.model.nodeTransformations[0].Mesh.scale.cartesian
+ )
+ );
+ expect(nodeTransform.translation).toEqual(
+ Cartesian3.unpack(
+ packet.model.nodeTransformations[0].Mesh.translation.cartesian
+ )
+ );
- let expectedRotation = Quaternion.unpack(
- packet.model.nodeTransformations[0].Mesh.rotation.unitQuaternion,
- );
- Quaternion.normalize(expectedRotation, expectedRotation);
- expect(nodeTransform.rotation).toEqual(expectedRotation);
-
- time = JulianDate.fromIso8601("2012-04-02T12:00:01Z");
- nodeTransform = entity.model.nodeTransformations.getValue(time).Mesh;
- expect(nodeTransform).toBeDefined();
- expect(nodeTransform.scale).toEqual(
- Cartesian3.unpack(
- packet.model.nodeTransformations[1].Mesh.scale.cartesian,
- ),
- );
- expect(nodeTransform.translation).toEqual(
- Cartesian3.unpack(
- packet.model.nodeTransformations[1].Mesh.translation.cartesian,
- ),
- );
+ let expectedRotation = Quaternion.unpack(
+ packet.model.nodeTransformations[0].Mesh.rotation.unitQuaternion
+ );
+ Quaternion.normalize(expectedRotation, expectedRotation);
+ expect(nodeTransform.rotation).toEqual(expectedRotation);
+
+ time = JulianDate.fromIso8601("2012-04-02T12:00:01Z");
+ nodeTransform = entity.model.nodeTransformations.getValue(time).Mesh;
+ expect(nodeTransform).toBeDefined();
+ expect(nodeTransform.scale).toEqual(
+ Cartesian3.unpack(
+ packet.model.nodeTransformations[1].Mesh.scale.cartesian
+ )
+ );
+ expect(nodeTransform.translation).toEqual(
+ Cartesian3.unpack(
+ packet.model.nodeTransformations[1].Mesh.translation.cartesian
+ )
+ );
- expectedRotation = Quaternion.unpack(
- packet.model.nodeTransformations[1].Mesh.rotation.unitQuaternion,
- );
- Quaternion.normalize(expectedRotation, expectedRotation);
- expect(nodeTransform.rotation).toEqual(expectedRotation);
- },
- );
+ expectedRotation = Quaternion.unpack(
+ packet.model.nodeTransformations[1].Mesh.rotation.unitQuaternion
+ );
+ Quaternion.normalize(expectedRotation, expectedRotation);
+ expect(nodeTransform.rotation).toEqual(expectedRotation);
+ });
});
it("can load articulations expressed as intervals", function () {
@@ -5697,39 +5679,39 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.model).toBeDefined();
+ expect(entity.model).toBeDefined();
- let time = JulianDate.fromIso8601("2012-04-02T12:00:00Z");
- let articulations = entity.model.articulations.getValue(time);
- expect(articulations).toBeDefined();
- expect(articulations["SampleArticulation Yaw"]).toEqual(
- packet.model.articulations[0]["SampleArticulation Yaw"],
- );
- expect(articulations["SampleArticulation Pitch"]).toEqual(
- packet.model.articulations[0]["SampleArticulation Pitch"],
- );
- expect(articulations["SampleArticulation Roll"]).toEqual(
- packet.model.articulations[0]["SampleArticulation Roll"],
- );
+ let time = JulianDate.fromIso8601("2012-04-02T12:00:00Z");
+ let articulations = entity.model.articulations.getValue(time);
+ expect(articulations).toBeDefined();
+ expect(articulations["SampleArticulation Yaw"]).toEqual(
+ packet.model.articulations[0]["SampleArticulation Yaw"]
+ );
+ expect(articulations["SampleArticulation Pitch"]).toEqual(
+ packet.model.articulations[0]["SampleArticulation Pitch"]
+ );
+ expect(articulations["SampleArticulation Roll"]).toEqual(
+ packet.model.articulations[0]["SampleArticulation Roll"]
+ );
- time = JulianDate.fromIso8601("2012-04-02T12:00:01Z");
- articulations = entity.model.articulations.getValue(time);
- expect(articulations).toBeDefined();
- expect(articulations["SampleArticulation Yaw"]).toEqual(
- packet.model.articulations[1]["SampleArticulation Yaw"],
- );
- expect(articulations["SampleArticulation Pitch"]).toEqual(
- packet.model.articulations[1]["SampleArticulation Pitch"],
- );
- expect(articulations["SampleArticulation Roll"]).toEqual(
- packet.model.articulations[1]["SampleArticulation Roll"],
- );
- },
- );
+ time = JulianDate.fromIso8601("2012-04-02T12:00:01Z");
+ articulations = entity.model.articulations.getValue(time);
+ expect(articulations).toBeDefined();
+ expect(articulations["SampleArticulation Yaw"]).toEqual(
+ packet.model.articulations[1]["SampleArticulation Yaw"]
+ );
+ expect(articulations["SampleArticulation Pitch"]).toEqual(
+ packet.model.articulations[1]["SampleArticulation Pitch"]
+ );
+ expect(articulations["SampleArticulation Roll"]).toEqual(
+ packet.model.articulations[1]["SampleArticulation Roll"]
+ );
+ });
});
it("can delete an existing object", function () {
@@ -5828,7 +5810,7 @@ describe("DataSources/CzmlDataSource", function () {
JulianDate,
object,
"simpleDate",
- JulianDate.toIso8601(date),
+ JulianDate.toIso8601(date)
);
expect(object.simpleDate).toBeDefined();
@@ -5892,7 +5874,7 @@ describe("DataSources/CzmlDataSource", function () {
new TimeInterval({
start: startTime,
stop: stopTime,
- }),
+ })
);
}
@@ -5943,41 +5925,41 @@ describe("DataSources/CzmlDataSource", function () {
const entity = dataSource.entities.getById("obj");
expect(entity.polygon.material).toBeInstanceOf(
- CompositeMaterialProperty,
+ CompositeMaterialProperty
);
expect(entity.polygon.material.getType(solidTime)).toEqual("Color");
expect(entity.polygon.material.getValue(solidTime).color).toEqual(
Color.unpack(
packet.polygon.material[0].solidColor.color.rgba.map(
- Color.byteToFloat,
- ),
- ),
+ Color.byteToFloat
+ )
+ )
);
function assertValuesForGridMaterial(time) {
expect(entity.polygon.material.getValue(time).color).toEqual(
Color.unpack(
- packet.polygon.material[1].grid.color.rgba.map(Color.byteToFloat),
- ),
+ packet.polygon.material[1].grid.color.rgba.map(Color.byteToFloat)
+ )
);
expect(entity.polygon.material.getValue(time).cellAlpha).toEqual(
- packet.polygon.material[1].grid.cellAlpha,
+ packet.polygon.material[1].grid.cellAlpha
);
expect(entity.polygon.material.getValue(time).lineCount).toEqual(
Cartesian2.unpack(
- packet.polygon.material[1].grid.lineCount.cartesian2,
- ),
+ packet.polygon.material[1].grid.lineCount.cartesian2
+ )
);
expect(entity.polygon.material.getValue(time).lineThickness).toEqual(
Cartesian2.unpack(
- packet.polygon.material[1].grid.lineThickness.cartesian2,
- ),
+ packet.polygon.material[1].grid.lineThickness.cartesian2
+ )
);
expect(entity.polygon.material.getValue(time).lineOffset).toEqual(
Cartesian2.unpack(
- packet.polygon.material[1].grid.lineOffset.cartesian2,
- ),
+ packet.polygon.material[1].grid.lineOffset.cartesian2
+ )
);
}
@@ -6014,15 +5996,15 @@ describe("DataSources/CzmlDataSource", function () {
const entity = dataSource.entities.getById("obj");
expect(entity.polygon.material).toBeInstanceOf(
- CompositeMaterialProperty,
+ CompositeMaterialProperty
);
expect(entity.polygon.material.getType(solidTime)).toEqual("Color");
expect(entity.polygon.material.getValue(solidTime).color).toEqual(
Color.unpack(
secondPacket.polygon.material[0].solidColor.color.rgba.map(
- Color.byteToFloat,
- ),
- ),
+ Color.byteToFloat
+ )
+ )
);
});
});
@@ -6059,55 +6041,55 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.rectangle).toBeDefined();
- 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(time)).toEqual(
- packet.rectangle.height,
- );
- 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(time)).toEqual(
- packet.rectangle.stRotation,
- );
- expect(entity.rectangle.outline.getValue(time)).toEqual(
- packet.rectangle.outline,
- );
- 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(time)).toEqual(
- packet.rectangle.zIndex,
- );
- expect(entity.rectangle.classificationType.getValue(time)).toEqual(
- ClassificationType[packet.rectangle.classificationType],
- );
- },
- );
+ expect(entity.rectangle).toBeDefined();
+ 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(time)).toEqual(
+ packet.rectangle.height
+ );
+ 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(time)).toEqual(
+ packet.rectangle.stRotation
+ );
+ expect(entity.rectangle.outline.getValue(time)).toEqual(
+ packet.rectangle.outline
+ );
+ 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(time)).toEqual(
+ packet.rectangle.zIndex
+ );
+ expect(entity.rectangle.classificationType.getValue(time)).toEqual(
+ ClassificationType[packet.rectangle.classificationType]
+ );
+ });
});
it("can handle constant rectangle coordinates in degrees.", function () {
@@ -6121,14 +6103,14 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- expect(entity.rectangle.coordinates.getValue(time)).toEqual(
- Rectangle.fromDegrees(0, 1, 2, 3),
- );
- },
- );
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ expect(entity.rectangle.coordinates.getValue(time)).toEqual(
+ Rectangle.fromDegrees(0, 1, 2, 3)
+ );
+ });
});
it("can handle sampled rectangle coordinates.", function () {
@@ -6143,25 +6125,25 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.rectangle).toBeDefined();
- const date1 = epoch;
- const date2 = JulianDate.addSeconds(epoch, 0.5, new JulianDate());
- const date3 = JulianDate.addSeconds(epoch, 1.0, new JulianDate());
- expect(entity.rectangle.coordinates.getValue(date1)).toEqual(
- new Rectangle(1.0, 2.0, 3.0, 4.0),
- );
- expect(entity.rectangle.coordinates.getValue(date2)).toEqual(
- new Rectangle(2.0, 3.0, 4.0, 5.0),
- );
- expect(entity.rectangle.coordinates.getValue(date3)).toEqual(
- new Rectangle(3.0, 4.0, 5.0, 6.0),
- );
- },
- );
+ expect(entity.rectangle).toBeDefined();
+ const date1 = epoch;
+ const date2 = JulianDate.addSeconds(epoch, 0.5, new JulianDate());
+ const date3 = JulianDate.addSeconds(epoch, 1.0, new JulianDate());
+ expect(entity.rectangle.coordinates.getValue(date1)).toEqual(
+ new Rectangle(1.0, 2.0, 3.0, 4.0)
+ );
+ expect(entity.rectangle.coordinates.getValue(date2)).toEqual(
+ new Rectangle(2.0, 3.0, 4.0, 5.0)
+ );
+ expect(entity.rectangle.coordinates.getValue(date3)).toEqual(
+ new Rectangle(3.0, 4.0, 5.0, 6.0)
+ );
+ });
});
it("can handle sampled rectangle coordinates in degrees.", function () {
@@ -6176,26 +6158,26 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.rectangle).toBeDefined();
- const date1 = epoch;
- const date2 = JulianDate.addSeconds(epoch, 0.5, new JulianDate());
- const date3 = JulianDate.addSeconds(epoch, 1.0, new JulianDate());
- expect(entity.rectangle.coordinates.getValue(date1)).toEqual(
- Rectangle.fromDegrees(1.0, 2.0, 3.0, 4.0),
- );
- expect(entity.rectangle.coordinates.getValue(date2)).toEqualEpsilon(
- Rectangle.fromDegrees(2.0, 3.0, 4.0, 5.0),
- CesiumMath.EPSILON15,
- );
- expect(entity.rectangle.coordinates.getValue(date3)).toEqual(
- Rectangle.fromDegrees(3.0, 4.0, 5.0, 6.0),
- );
- },
- );
+ expect(entity.rectangle).toBeDefined();
+ const date1 = epoch;
+ const date2 = JulianDate.addSeconds(epoch, 0.5, new JulianDate());
+ const date3 = JulianDate.addSeconds(epoch, 1.0, new JulianDate());
+ expect(entity.rectangle.coordinates.getValue(date1)).toEqual(
+ Rectangle.fromDegrees(1.0, 2.0, 3.0, 4.0)
+ );
+ expect(entity.rectangle.coordinates.getValue(date2)).toEqualEpsilon(
+ Rectangle.fromDegrees(2.0, 3.0, 4.0, 5.0),
+ CesiumMath.EPSILON15
+ );
+ expect(entity.rectangle.coordinates.getValue(date3)).toEqual(
+ Rectangle.fromDegrees(3.0, 4.0, 5.0, 6.0)
+ );
+ });
});
it("can load constant data for wall", function () {
@@ -6227,36 +6209,36 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.wall).toBeDefined();
- expect(entity.wall.material.getValue(time).color).toEqual(
- Color.unpack(packet.wall.material.solidColor.color.rgbaf),
- );
- 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(time)).toEqual(
- packet.wall.minimumHeights.array,
- );
- 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(time)).toEqual(
- packet.wall.outlineWidth,
- );
- expect(entity.wall.shadows.getValue(time)).toEqual(
- ShadowMode[packet.wall.shadows],
- );
- },
- );
+ expect(entity.wall).toBeDefined();
+ expect(entity.wall.material.getValue(time).color).toEqual(
+ Color.unpack(packet.wall.material.solidColor.color.rgbaf)
+ );
+ 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(time)).toEqual(
+ packet.wall.minimumHeights.array
+ );
+ 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(time)).toEqual(
+ packet.wall.outlineWidth
+ );
+ expect(entity.wall.shadows.getValue(time)).toEqual(
+ ShadowMode[packet.wall.shadows]
+ );
+ });
});
it("can load data for wall with minimumHeights as references.", function () {
@@ -6355,18 +6337,18 @@ describe("DataSources/CzmlDataSource", function () {
expect(entity.wall.minimumHeights).toBeInstanceOf(CompositeProperty);
expect(
entity.wall.minimumHeights.getValue(
- JulianDate.fromIso8601("2009-01-01T00:00:00Z"),
- ),
+ JulianDate.fromIso8601("2009-01-01T00:00:00Z")
+ )
).toBeUndefined();
expect(
entity.wall.minimumHeights.getValue(
- JulianDate.fromIso8601("2010-01-01T00:00:00Z"),
- ),
+ JulianDate.fromIso8601("2010-01-01T00:00:00Z")
+ )
).toEqual([packets[1].billboard.scale, packets[2].billboard.scale]);
expect(
entity.wall.minimumHeights.getValue(
- JulianDate.fromIso8601("2010-01-01T01:00:00Z"),
- ),
+ JulianDate.fromIso8601("2010-01-01T01:00:00Z")
+ )
).toEqual([packets[2].billboard.scale, packets[3].billboard.scale]);
});
});
@@ -6396,30 +6378,30 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.box).toBeDefined();
- expect(entity.box.dimensions.getValue(time)).toEqual(
- Cartesian3.unpack(packet.box.dimensions.cartesian),
- );
- expect(entity.box.material.getValue(time).color).toEqual(
- Color.unpack(packet.box.material.solidColor.color.rgbaf),
- );
- 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(time)).toEqual(
- packet.box.outlineWidth,
- );
- expect(entity.box.shadows.getValue(time)).toEqual(
- ShadowMode[packet.box.shadows],
- );
- },
- );
+ expect(entity.box).toBeDefined();
+ expect(entity.box.dimensions.getValue(time)).toEqual(
+ Cartesian3.unpack(packet.box.dimensions.cartesian)
+ );
+ expect(entity.box.material.getValue(time).color).toEqual(
+ Color.unpack(packet.box.material.solidColor.color.rgbaf)
+ );
+ 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(time)).toEqual(
+ packet.box.outlineWidth
+ );
+ expect(entity.box.shadows.getValue(time)).toEqual(
+ ShadowMode[packet.box.shadows]
+ );
+ });
});
it("can load constant data for cylinder", function () {
@@ -6449,46 +6431,44 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.cylinder).toBeDefined();
- expect(entity.cylinder.length.getValue(time)).toEqual(
- packet.cylinder.length,
- );
- expect(entity.cylinder.topRadius.getValue(time)).toEqual(
- packet.cylinder.topRadius,
- );
- 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.show.getValue(time)).toEqual(
- packet.cylinder.show,
- );
- expect(entity.cylinder.outline.getValue(time)).toEqual(
- packet.cylinder.outline,
- );
- 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(time)).toEqual(
- ShadowMode[packet.cylinder.shadows],
- );
- },
- );
+ expect(entity.cylinder).toBeDefined();
+ expect(entity.cylinder.length.getValue(time)).toEqual(
+ packet.cylinder.length
+ );
+ expect(entity.cylinder.topRadius.getValue(time)).toEqual(
+ packet.cylinder.topRadius
+ );
+ 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.show.getValue(time)).toEqual(packet.cylinder.show);
+ expect(entity.cylinder.outline.getValue(time)).toEqual(
+ packet.cylinder.outline
+ );
+ 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(time)).toEqual(
+ ShadowMode[packet.cylinder.shadows]
+ );
+ });
});
it("can load constant data for corridor", function () {
@@ -6523,55 +6503,53 @@ describe("DataSources/CzmlDataSource", function () {
const time = Iso8601.MINIMUM_VALUE;
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.corridor).toBeDefined();
- expect(entity.corridor.positions.getValue(time)).toEqual(
- Cartesian3.unpackArray(packet.corridor.positions.cartesian),
- );
- expect(entity.corridor.material.getValue(time).color).toEqual(
- Color.unpack(packet.corridor.material.solidColor.color.rgbaf),
- );
- 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(time)).toEqual(
- packet.corridor.width,
- );
- 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(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(time)).toEqual(
- packet.corridor.zIndex,
- );
- expect(entity.corridor.classificationType.getValue(time)).toEqual(
- ClassificationType[packet.corridor.classificationType],
- );
- },
- );
+ expect(entity.corridor).toBeDefined();
+ expect(entity.corridor.positions.getValue(time)).toEqual(
+ Cartesian3.unpackArray(packet.corridor.positions.cartesian)
+ );
+ expect(entity.corridor.material.getValue(time).color).toEqual(
+ Color.unpack(packet.corridor.material.solidColor.color.rgbaf)
+ );
+ 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(time)).toEqual(
+ packet.corridor.width
+ );
+ 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(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(time)).toEqual(
+ packet.corridor.zIndex
+ );
+ expect(entity.corridor.classificationType.getValue(time)).toEqual(
+ ClassificationType[packet.corridor.classificationType]
+ );
+ });
});
it("has entity collection with link to data source", function () {
@@ -6581,12 +6559,12 @@ describe("DataSources/CzmlDataSource", function () {
});
it("has entity with link to entity collection", function () {
- return CzmlDataSource.load(makeDocument(staticCzml)).then(
- function (dataSource) {
- const entities = dataSource.entities;
- expect(entities.values[0].entityCollection).toEqual(entities);
- },
- );
+ return CzmlDataSource.load(makeDocument(staticCzml)).then(function (
+ dataSource
+ ) {
+ const entities = dataSource.entities;
+ expect(entities.values[0].entityCollection).toEqual(entities);
+ });
});
it("can use constant reference properties", function () {
@@ -6618,7 +6596,7 @@ describe("DataSources/CzmlDataSource", function () {
expect(referenceObject.point.pixelSize).toBeInstanceOf(ReferenceProperty);
expect(targetEntity.point.pixelSize.getValue(time)).toEqual(
- referenceObject.point.pixelSize.getValue(time),
+ referenceObject.point.pixelSize.getValue(time)
);
});
});
@@ -6667,10 +6645,10 @@ describe("DataSources/CzmlDataSource", function () {
const referenceObject = dataSource.entities.getById("referenceId");
expect(targetEntity.point.pixelSize.getValue(time1)).toEqual(
- referenceObject.point.pixelSize.getValue(time1),
+ referenceObject.point.pixelSize.getValue(time1)
);
expect(targetEntity2.point.pixelSize.getValue(time2)).toEqual(
- referenceObject.point.pixelSize.getValue(time2),
+ referenceObject.point.pixelSize.getValue(time2)
);
});
});
@@ -6703,7 +6681,7 @@ describe("DataSources/CzmlDataSource", function () {
expect(referenceObject.position).toBeInstanceOf(ReferenceProperty);
expect(targetEntity.position.getValue(time)).toEqual(
- referenceObject.position.getValue(time),
+ referenceObject.position.getValue(time)
);
});
});
@@ -6750,10 +6728,10 @@ describe("DataSources/CzmlDataSource", function () {
const referenceObject = dataSource.entities.getById("referenceId");
expect(targetEntity.position.getValue(time1)).toEqual(
- referenceObject.position.getValue(time1),
+ referenceObject.position.getValue(time1)
);
expect(targetEntity2.position.getValue(time2)).toEqual(
- referenceObject.position.getValue(time2),
+ referenceObject.position.getValue(time2)
);
});
});
@@ -6787,7 +6765,7 @@ describe("DataSources/CzmlDataSource", function () {
expect(referenceObject.point.pixelSize).toBeInstanceOf(ReferenceProperty);
expect(targetEntity.point.pixelSize.getValue(time)).toEqual(
- referenceObject.point.pixelSize.getValue(time),
+ referenceObject.point.pixelSize.getValue(time)
);
});
});
@@ -6804,17 +6782,15 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const targetEntity = dataSource.entities.getById("testObject");
- expect(targetEntity.point.outlineWidth).toBeInstanceOf(
- ReferenceProperty,
- );
- expect(targetEntity.point.outlineWidth.getValue(time)).toEqual(
- targetEntity.point.pixelSize.getValue(time),
- );
- },
- );
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const targetEntity = dataSource.entities.getById("testObject");
+ expect(targetEntity.point.outlineWidth).toBeInstanceOf(ReferenceProperty);
+ expect(targetEntity.point.outlineWidth.getValue(time)).toEqual(
+ targetEntity.point.pixelSize.getValue(time)
+ );
+ });
});
it("can load a polyline with polyline glow material", function () {
@@ -6833,21 +6809,21 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.getById("polylineGlow");
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.getById("polylineGlow");
- expect(entity.polyline.material.color.getValue()).toEqual(
- Color.unpack(packet.polyline.material.polylineGlow.color.rgbaf),
- );
- expect(entity.polyline.material.glowPower.getValue()).toEqual(
- packet.polyline.material.polylineGlow.glowPower,
- );
- expect(entity.polyline.material.taperPower.getValue()).toEqual(
- packet.polyline.material.polylineGlow.taperPower,
- );
- },
- );
+ expect(entity.polyline.material.color.getValue()).toEqual(
+ Color.unpack(packet.polyline.material.polylineGlow.color.rgbaf)
+ );
+ expect(entity.polyline.material.glowPower.getValue()).toEqual(
+ packet.polyline.material.polylineGlow.glowPower
+ );
+ expect(entity.polyline.material.taperPower.getValue()).toEqual(
+ packet.polyline.material.polylineGlow.taperPower
+ );
+ });
});
it("can load a polyline with polyline arrow material", function () {
@@ -6864,15 +6840,15 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.getById("polylineArrow");
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.getById("polylineArrow");
- expect(entity.polyline.material.color.getValue()).toEqual(
- Color.unpack(packet.polyline.material.polylineArrow.color.rgbaf),
- );
- },
- );
+ expect(entity.polyline.material.color.getValue()).toEqual(
+ Color.unpack(packet.polyline.material.polylineArrow.color.rgbaf)
+ );
+ });
});
it("can load a polyline with polyline dash material", function () {
@@ -6891,21 +6867,21 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.getById("polylineDash");
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.getById("polylineDash");
- expect(entity.polyline.material.color.getValue()).toEqual(
- Color.unpack(packet.polyline.material.polylineDash.color.rgbaf),
- );
- expect(entity.polyline.material.dashLength.getValue()).toEqual(
- packet.polyline.material.polylineDash.dashLength,
- );
- expect(entity.polyline.material.dashPattern.getValue()).toEqual(
- packet.polyline.material.polylineDash.dashPattern,
- );
- },
- );
+ expect(entity.polyline.material.color.getValue()).toEqual(
+ Color.unpack(packet.polyline.material.polylineDash.color.rgbaf)
+ );
+ expect(entity.polyline.material.dashLength.getValue()).toEqual(
+ packet.polyline.material.polylineDash.dashLength
+ );
+ expect(entity.polyline.material.dashPattern.getValue()).toEqual(
+ packet.polyline.material.polylineDash.dashPattern
+ );
+ });
});
it("loads extrapolation options", function () {
@@ -6929,38 +6905,38 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.getById("point");
- const color = entity.point.color;
- expect(color.forwardExtrapolationType).toEqual(
- ExtrapolationType[packet.point.color.forwardExtrapolationType],
- );
- expect(color.forwardExtrapolationDuration).toEqual(
- packet.point.color.forwardExtrapolationDuration,
- );
- expect(color.backwardExtrapolationType).toEqual(
- ExtrapolationType[packet.point.color.backwardExtrapolationType],
- );
- expect(color.backwardExtrapolationDuration).toEqual(
- packet.point.color.backwardExtrapolationDuration,
- );
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.getById("point");
+ const color = entity.point.color;
+ expect(color.forwardExtrapolationType).toEqual(
+ ExtrapolationType[packet.point.color.forwardExtrapolationType]
+ );
+ expect(color.forwardExtrapolationDuration).toEqual(
+ packet.point.color.forwardExtrapolationDuration
+ );
+ expect(color.backwardExtrapolationType).toEqual(
+ ExtrapolationType[packet.point.color.backwardExtrapolationType]
+ );
+ expect(color.backwardExtrapolationDuration).toEqual(
+ packet.point.color.backwardExtrapolationDuration
+ );
- const position = entity.position;
- expect(position.forwardExtrapolationType).toEqual(
- ExtrapolationType[packet.position.forwardExtrapolationType],
- );
- expect(position.forwardExtrapolationDuration).toEqual(
- packet.position.forwardExtrapolationDuration,
- );
- expect(position.backwardExtrapolationType).toEqual(
- ExtrapolationType[packet.position.backwardExtrapolationType],
- );
- expect(position.backwardExtrapolationDuration).toEqual(
- packet.position.backwardExtrapolationDuration,
- );
- },
- );
+ const position = entity.position;
+ expect(position.forwardExtrapolationType).toEqual(
+ ExtrapolationType[packet.position.forwardExtrapolationType]
+ );
+ expect(position.forwardExtrapolationDuration).toEqual(
+ packet.position.forwardExtrapolationDuration
+ );
+ expect(position.backwardExtrapolationType).toEqual(
+ ExtrapolationType[packet.position.backwardExtrapolationType]
+ );
+ expect(position.backwardExtrapolationDuration).toEqual(
+ packet.position.backwardExtrapolationDuration
+ );
+ });
});
it("rejects if first document packet lacks version information", function () {
@@ -6973,7 +6949,7 @@ describe("DataSources/CzmlDataSource", function () {
.catch(function (error) {
expect(error).toBeInstanceOf(RuntimeError);
expect(error.message).toEqual(
- "CZML version information invalid. It is expected to be a property on the document object in the
. version format.",
+ "CZML version information invalid. It is expected to be a property on the document object in the . version format."
);
});
});
@@ -6988,7 +6964,7 @@ describe("DataSources/CzmlDataSource", function () {
.catch(function (error) {
expect(error).toBeInstanceOf(RuntimeError);
expect(error.message).toEqual(
- "The first CZML packet is required to be the document object.",
+ "The first CZML packet is required to be the document object."
);
});
});
@@ -7003,7 +6979,7 @@ describe("DataSources/CzmlDataSource", function () {
.catch(function (error) {
expect(error).toBeInstanceOf(RuntimeError);
expect(error.message).toContain(
- "CZML version information invalid. It is expected to be a property on the document object in the . version format.",
+ "CZML version information invalid. It is expected to be a property on the document object in the . version format."
);
});
});
@@ -7017,14 +6993,14 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.billboard).toBeDefined();
- expect(entity.billboard.color).toBeUndefined();
- },
- );
+ expect(entity.billboard).toBeDefined();
+ expect(entity.billboard.color).toBeUndefined();
+ });
});
it("ignores rectangle values not expressed as a known type", function () {
@@ -7036,14 +7012,14 @@ describe("DataSources/CzmlDataSource", function () {
},
};
- return CzmlDataSource.load(makeDocument(packet)).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
+ return CzmlDataSource.load(makeDocument(packet)).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
- expect(entity.rectangle).toBeDefined();
- expect(entity.rectangle.coordinates).toBeUndefined();
- },
- );
+ expect(entity.rectangle).toBeDefined();
+ expect(entity.rectangle.coordinates).toBeUndefined();
+ });
});
it("converts followSurface to arcType for backwards compatibility", function () {
@@ -7103,13 +7079,13 @@ describe("DataSources/CzmlDataSource", function () {
expect(entity.polyline.arcType.isConstant).toEqual(false);
expect(
entity.polyline.arcType.getValue(
- JulianDate.fromIso8601("2013-01-01T00:00:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T00:00:00Z")
+ )
).toEqual(ArcType.GEODESIC);
expect(
entity.polyline.arcType.getValue(
- JulianDate.fromIso8601("2013-01-01T01:00:00Z"),
- ),
+ JulianDate.fromIso8601("2013-01-01T01:00:00Z")
+ )
).toEqual(ArcType.NONE);
entity = dataSource.entities.getById("arcType-overrides-followSurface");
diff --git a/packages/engine/Specs/DataSources/DataSourceCollectionSpec.js b/packages/engine/Specs/DataSources/DataSourceCollectionSpec.js
index 3bb3a4208104..566532c75a79 100644
--- a/packages/engine/Specs/DataSources/DataSourceCollectionSpec.js
+++ b/packages/engine/Specs/DataSources/DataSourceCollectionSpec.js
@@ -154,13 +154,14 @@ describe("DataSources/DataSourceCollection", function () {
const collection = new DataSourceCollection();
let removeCalled = 0;
- collection.dataSourceRemoved.addEventListener(
- function (sender, dataSource) {
- expect(sender).toBe(collection);
- expect(sources.indexOf(dataSource)).not.toEqual(-1);
- removeCalled++;
- },
- );
+ collection.dataSourceRemoved.addEventListener(function (
+ sender,
+ dataSource
+ ) {
+ expect(sender).toBe(collection);
+ expect(sources.indexOf(dataSource)).not.toEqual(-1);
+ removeCalled++;
+ });
return Promise.all([
collection.add(sources[0]),
@@ -183,13 +184,14 @@ describe("DataSources/DataSourceCollection", function () {
const collection = new DataSourceCollection();
let removeCalled = 0;
- collection.dataSourceRemoved.addEventListener(
- function (sender, dataSource) {
- expect(sender).toBe(collection);
- expect(sources.indexOf(dataSource)).not.toEqual(-1);
- removeCalled++;
- },
- );
+ collection.dataSourceRemoved.addEventListener(function (
+ sender,
+ dataSource
+ ) {
+ expect(sender).toBe(collection);
+ expect(sources.indexOf(dataSource)).not.toEqual(-1);
+ removeCalled++;
+ });
return Promise.all([
collection.add(sources[0]),
diff --git a/packages/engine/Specs/DataSources/DataSourceDisplaySpec.js b/packages/engine/Specs/DataSources/DataSourceDisplaySpec.js
index 7169eb3414ee..fea15067b3e5 100644
--- a/packages/engine/Specs/DataSources/DataSourceDisplaySpec.js
+++ b/packages/engine/Specs/DataSources/DataSourceDisplaySpec.js
@@ -105,14 +105,14 @@ describe(
const visualizer1 = new MockVisualizer();
visualizer1.getBoundingSphereResult = new BoundingSphere(
new Cartesian3(1, 2, 3),
- 456,
+ 456
);
visualizer1.getBoundingSphereState = BoundingSphereState.DONE;
const visualizer2 = new MockVisualizer();
visualizer2.getBoundingSphereResult = new BoundingSphere(
new Cartesian3(7, 8, 9),
- 1011,
+ 1011
);
visualizer2.getBoundingSphereState = BoundingSphereState.DONE;
@@ -135,7 +135,7 @@ describe(
const expected = BoundingSphere.union(
visualizer1.getBoundingSphereResult,
- visualizer2.getBoundingSphereResult,
+ visualizer2.getBoundingSphereResult
);
expect(state).toBe(BoundingSphereState.DONE);
@@ -147,14 +147,14 @@ describe(
const visualizer1 = new MockVisualizer();
visualizer1.getBoundingSphereResult = new BoundingSphere(
new Cartesian3(1, 2, 3),
- 456,
+ 456
);
visualizer1.getBoundingSphereState = BoundingSphereState.PENDING;
const visualizer2 = new MockVisualizer();
visualizer2.getBoundingSphereResult = new BoundingSphere(
new Cartesian3(7, 8, 9),
- 1011,
+ 1011
);
visualizer2.getBoundingSphereState = BoundingSphereState.DONE;
@@ -184,14 +184,14 @@ describe(
const visualizer1 = new MockVisualizer();
visualizer1.getBoundingSphereResult = new BoundingSphere(
new Cartesian3(1, 2, 3),
- 456,
+ 456
);
visualizer1.getBoundingSphereState = BoundingSphereState.PENDING;
const visualizer2 = new MockVisualizer();
visualizer2.getBoundingSphereResult = new BoundingSphere(
new Cartesian3(7, 8, 9),
- 1011,
+ 1011
);
visualizer2.getBoundingSphereState = BoundingSphereState.DONE;
@@ -470,7 +470,7 @@ describe(
expect(display._primitives.contains(source._primitives)).toBe(true);
expect(
- display._groundPrimitives.contains(source._groundPrimitives),
+ display._groundPrimitives.contains(source._groundPrimitives)
).toBe(true);
});
});
@@ -487,7 +487,7 @@ describe(
return dataSourceCollection.add(source).then(function () {
expect(display._primitives.contains(source._primitives)).toBe(true);
expect(
- display._groundPrimitives.contains(source._groundPrimitives),
+ display._groundPrimitives.contains(source._groundPrimitives)
).toBe(true);
dataSourceCollection.remove(source);
@@ -601,13 +601,13 @@ describe(
});
expect(scene.primitives.contains(display._primitives)).toBe(false);
expect(scene.groundPrimitives.contains(display._groundPrimitives)).toBe(
- false,
+ false
);
return dataSourceCollection.add(new MockDataSource()).then(function () {
expect(scene.primitives.contains(display._primitives)).toBe(true);
expect(scene.groundPrimitives.contains(display._groundPrimitives)).toBe(
- true,
+ true
);
});
});
@@ -622,7 +622,7 @@ describe(
expect(scene.primitives.contains(display._primitives)).toBe(true);
expect(scene.groundPrimitives.contains(display._groundPrimitives)).toBe(
- true,
+ true
);
});
});
@@ -635,14 +635,14 @@ describe(
});
expect(scene.primitives.contains(display._primitives)).toBe(false);
expect(scene.groundPrimitives.contains(display._groundPrimitives)).toBe(
- false,
+ false
);
display.defaultDataSource.entities.add(new Entity());
expect(scene.primitives.contains(display._primitives)).toBe(true);
expect(scene.groundPrimitives.contains(display._groundPrimitives)).toBe(
- true,
+ true
);
});
@@ -652,7 +652,7 @@ describe(
const callback = DataSourceDisplay.defaultVisualizersCallback(
scene,
entityCluster,
- dataSource,
+ dataSource
);
expect(callback.length).toEqual(8);
expect(callback[0]).toBeInstanceOf(BillboardVisualizer);
@@ -673,7 +673,7 @@ describe(
const callback = DataSourceDisplay.defaultVisualizersCallback(
scene,
entityCluster,
- dataSource,
+ dataSource
);
expect(callback.length).withContext("length before register").toEqual(8);
@@ -681,7 +681,7 @@ describe(
const callback2 = DataSourceDisplay.defaultVisualizersCallback(
scene,
entityCluster,
- dataSource,
+ dataSource
);
expect(callback2.length).withContext("length after register").toEqual(9);
expect(callback2[8]).toBeInstanceOf(FakeVisualizer);
@@ -690,12 +690,12 @@ describe(
const callback3 = DataSourceDisplay.defaultVisualizersCallback(
scene,
entityCluster,
- dataSource,
+ dataSource
);
expect(callback3.length)
.withContext("length after unregister")
.toEqual(8);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/DataSources/DynamicGeometryUpdaterSpec.js b/packages/engine/Specs/DataSources/DynamicGeometryUpdaterSpec.js
index 9b4533d52a31..3d908213f4be 100644
--- a/packages/engine/Specs/DataSources/DynamicGeometryUpdaterSpec.js
+++ b/packages/engine/Specs/DataSources/DynamicGeometryUpdaterSpec.js
@@ -23,7 +23,7 @@ describe("DataSources/DynamicGeometryUpdater", function () {
return new DynamicGeometryUpdater(
undefined,
new PrimitiveCollection(),
- new PrimitiveCollection(),
+ new PrimitiveCollection()
);
}).toThrowDeveloperError();
});
@@ -40,7 +40,7 @@ describe("DataSources/DynamicGeometryUpdater", function () {
return new DynamicGeometryUpdater(
updater,
undefined,
- new PrimitiveCollection(),
+ new PrimitiveCollection()
);
}).toThrowDeveloperError();
});
@@ -57,7 +57,7 @@ describe("DataSources/DynamicGeometryUpdater", function () {
return new DynamicGeometryUpdater(
updater,
undefined,
- new PrimitiveCollection(),
+ new PrimitiveCollection()
);
}).toThrowDeveloperError();
});
@@ -73,7 +73,7 @@ describe("DataSources/DynamicGeometryUpdater", function () {
const dynamicUpdater = new DynamicGeometryUpdater(
updater,
new PrimitiveCollection(),
- new PrimitiveCollection(),
+ new PrimitiveCollection()
);
expect(function () {
return dynamicUpdater.update();
diff --git a/packages/engine/Specs/DataSources/EllipseGeometryUpdaterSpec.js b/packages/engine/Specs/DataSources/EllipseGeometryUpdaterSpec.js
index d2549e89b0ca..75ac52a43e41 100644
--- a/packages/engine/Specs/DataSources/EllipseGeometryUpdaterSpec.js
+++ b/packages/engine/Specs/DataSources/EllipseGeometryUpdaterSpec.js
@@ -47,7 +47,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- Cartesian3.fromDegrees(0, 0, 0),
+ Cartesian3.fromDegrees(0, 0, 0)
);
entity.ellipse = ellipse;
return entity;
@@ -66,7 +66,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- Cartesian3.fromDegrees(0, 0, 0),
+ Cartesian3.fromDegrees(0, 0, 0)
);
entity.ellipse = ellipse;
return entity;
@@ -208,7 +208,7 @@ describe(
const ellipse = new EllipseGraphics();
ellipse.outline = true;
ellipse.numberOfVerticalLines = new ConstantProperty(
- options.numberOfVerticalLines,
+ options.numberOfVerticalLines
);
ellipse.semiMajorAxis = new ConstantProperty(options.semiMajorAxis);
ellipse.semiMinorAxis = new ConstantProperty(options.semiMinorAxis);
@@ -245,7 +245,7 @@ describe(
expect(geometry._granularity).toEqual(options.granularity);
expect(geometry._extrudedHeight).toEqual(options.extrudedHeight);
expect(geometry._numberOfVerticalLines).toEqual(
- options.numberOfVerticalLines,
+ options.numberOfVerticalLines
);
expect(geometry._offsetAttribute).toBeUndefined();
});
@@ -263,7 +263,7 @@ describe(
const updater = new EllipseGeometryUpdater(entity, scene);
const dynamicUpdater = updater.createDynamicUpdater(
new PrimitiveCollection(),
- new PrimitiveCollection(),
+ new PrimitiveCollection()
);
dynamicUpdater.update(JulianDate.now());
@@ -316,7 +316,7 @@ describe(
const updater = new EllipseGeometryUpdater(entity, scene);
expect(updater._computeCenter(time)).toEqual(
- entity.position.getValue(time),
+ entity.position.getValue(time)
);
});
@@ -328,14 +328,14 @@ describe(
EllipseGeometryUpdater,
"ellipse",
createBasicEllipse,
- getScene,
+ getScene
);
createDynamicGeometryUpdaterSpecs(
EllipseGeometryUpdater,
"ellipse",
createDynamicEllipse,
- getScene,
+ getScene
);
createGeometryUpdaterGroundGeometrySpecs(
@@ -343,8 +343,8 @@ describe(
"ellipse",
createBasicEllipseWithoutHeight,
createDynamicEllipseWithoutHeight,
- getScene,
+ getScene
);
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/DataSources/EllipseGraphicsSpec.js b/packages/engine/Specs/DataSources/EllipseGraphicsSpec.js
index bd88399496ff..587e63e4517e 100644
--- a/packages/engine/Specs/DataSources/EllipseGraphicsSpec.js
+++ b/packages/engine/Specs/DataSources/EllipseGraphicsSpec.js
@@ -64,7 +64,7 @@ describe("DataSources/EllipseGraphics", function () {
expect(ellipse.rotation.getValue()).toEqual(options.rotation);
expect(ellipse.stRotation.getValue()).toEqual(options.stRotation);
expect(ellipse.numberOfVerticalLines.getValue()).toEqual(
- options.numberOfVerticalLines,
+ options.numberOfVerticalLines
);
expect(ellipse.fill.getValue()).toEqual(options.fill);
expect(ellipse.outline.getValue()).toEqual(options.outline);
@@ -72,10 +72,10 @@ describe("DataSources/EllipseGraphics", function () {
expect(ellipse.outlineWidth.getValue()).toEqual(options.outlineWidth);
expect(ellipse.shadows.getValue()).toEqual(options.shadows);
expect(ellipse.distanceDisplayCondition.getValue()).toEqual(
- options.distanceDisplayCondition,
+ options.distanceDisplayCondition
);
expect(ellipse.classificationType.getValue()).toEqual(
- options.classificationType,
+ options.classificationType
);
expect(ellipse.zIndex.getValue()).toEqual(options.zIndex);
});
@@ -98,10 +98,10 @@ describe("DataSources/EllipseGraphics", function () {
source.numberOfVerticalLines = new ConstantProperty();
source.shadows = new ConstantProperty(ShadowMode.ENABLED);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
source.classificationType = new ConstantProperty(
- ClassificationType.TERRAIN,
+ ClassificationType.TERRAIN
);
source.zIndex = new ConstantProperty(3);
@@ -124,7 +124,7 @@ describe("DataSources/EllipseGraphics", function () {
expect(target.numberOfVerticalLines).toBe(source.numberOfVerticalLines);
expect(target.shadows).toBe(source.shadows);
expect(target.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
expect(target.classificationType).toBe(source.classificationType);
expect(target.zIndex).toBe(source.zIndex);
@@ -232,7 +232,7 @@ describe("DataSources/EllipseGraphics", function () {
expect(result.numberOfVerticalLines).toBe(source.numberOfVerticalLines);
expect(result.shadows).toBe(source.shadows);
expect(result.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
expect(result.classificationType).toBe(source.classificationType);
expect(result.zIndex).toBe(source.zIndex);
@@ -265,19 +265,19 @@ describe("DataSources/EllipseGraphics", function () {
property,
"shadows",
ShadowMode.ENABLED,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
testDefinitionChanged(
property,
"distanceDisplayCondition",
new DistanceDisplayCondition(),
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
testDefinitionChanged(
property,
"classificationType",
ClassificationType.TERRAIN,
- ClassificationType.BOTH,
+ ClassificationType.BOTH
);
testDefinitionChanged(property, "zIndex", 4, 0);
});
diff --git a/packages/engine/Specs/DataSources/EllipsoidGeometryUpdaterSpec.js b/packages/engine/Specs/DataSources/EllipsoidGeometryUpdaterSpec.js
index 767061d8bbba..15429632c911 100644
--- a/packages/engine/Specs/DataSources/EllipsoidGeometryUpdaterSpec.js
+++ b/packages/engine/Specs/DataSources/EllipsoidGeometryUpdaterSpec.js
@@ -44,7 +44,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- Cartesian3.fromDegrees(0, 0, 0),
+ Cartesian3.fromDegrees(0, 0, 0)
);
entity.ellipsoid = ellipsoid;
return entity;
@@ -254,29 +254,29 @@ describe(
expect(instance.geometry._offsetAttribute).toBeUndefined();
graphics.heightReference = new ConstantProperty(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
updater._onEntityPropertyChanged(entity, "ellipsoid");
instance = updater.createFillGeometryInstance(time);
expect(instance.geometry._offsetAttribute).toEqual(
- GeometryOffsetAttribute.ALL,
+ GeometryOffsetAttribute.ALL
);
instance = updater.createOutlineGeometryInstance(time);
expect(instance.geometry._offsetAttribute).toEqual(
- GeometryOffsetAttribute.ALL,
+ GeometryOffsetAttribute.ALL
);
graphics.heightReference = new ConstantProperty(
- HeightReference.RELATIVE_TO_GROUND,
+ HeightReference.RELATIVE_TO_GROUND
);
updater._onEntityPropertyChanged(entity, "ellipsoid");
instance = updater.createFillGeometryInstance(time);
expect(instance.geometry._offsetAttribute).toEqual(
- GeometryOffsetAttribute.ALL,
+ GeometryOffsetAttribute.ALL
);
instance = updater.createOutlineGeometryInstance(time);
expect(instance.geometry._offsetAttribute).toEqual(
- GeometryOffsetAttribute.ALL,
+ GeometryOffsetAttribute.ALL
);
});
@@ -285,7 +285,7 @@ describe(
const updater = new EllipsoidGeometryUpdater(entity, scene);
expect(updater._computeCenter(time)).toEqual(
- entity.position.getValue(time),
+ entity.position.getValue(time)
);
});
@@ -306,7 +306,7 @@ describe(
const dynamicUpdater = updater.createDynamicUpdater(
primitives,
- new PrimitiveCollection(),
+ new PrimitiveCollection()
);
expect(dynamicUpdater.isDestroyed()).toBe(false);
expect(primitives.length).toBe(0);
@@ -344,7 +344,7 @@ describe(
const dynamicUpdater = updater.createDynamicUpdater(
primitives,
- new PrimitiveCollection(),
+ new PrimitiveCollection()
);
dynamicUpdater.update(time);
expect(primitives.length).toBe(2); //Ellipsoid always has both fill and outline primitives regardless of setting
@@ -389,7 +389,7 @@ describe(
ellipsoid.innerRadii = createDynamicProperty(new Cartesian3(0.5, 1, 1.5));
// Turns 3d mode path off
ellipsoid.heightReference = new ConstantProperty(
- HeightReference.RELATIVE_TO_GROUND,
+ HeightReference.RELATIVE_TO_GROUND
);
ellipsoid.material = new ColorMaterialProperty(Color.RED);
@@ -403,7 +403,7 @@ describe(
const dynamicUpdater = updater.createDynamicUpdater(
primitives,
- new PrimitiveCollection(),
+ new PrimitiveCollection()
);
dynamicUpdater.update(time);
@@ -411,7 +411,7 @@ describe(
scene.render();
expect(dynamicUpdater._options.innerRadii).toEqual(
- ellipsoid.innerRadii.getValue(),
+ ellipsoid.innerRadii.getValue()
);
});
@@ -430,7 +430,7 @@ describe(
const dynamicUpdater = updater.createDynamicUpdater(
primitives,
- new PrimitiveCollection(),
+ new PrimitiveCollection()
);
dynamicUpdater.update(time);
@@ -461,7 +461,7 @@ describe(
const dynamicUpdater = updater.createDynamicUpdater(
primitives,
- new PrimitiveCollection(),
+ new PrimitiveCollection()
);
dynamicUpdater.update(time);
expect(primitives.length).toBe(2); //Ellipsoid always has both fill and outline primitives regardless of setting
@@ -479,15 +479,15 @@ describe(
let attributes = primitives.get(0).getGeometryInstanceAttributes(entity);
expect(attributes.show[0]).toEqual(0);
expect(primitives.get(0).appearance.material.uniforms.color).toEqual(
- ellipsoid.material.color.getValue(),
+ ellipsoid.material.color.getValue()
);
attributes = primitives.get(1).getGeometryInstanceAttributes(entity);
expect(attributes.show[0]).toEqual(0);
expect(attributes.color).toEqual(
ColorGeometryInstanceAttribute.toValue(
- ellipsoid.outlineColor.getValue(),
- ),
+ ellipsoid.outlineColor.getValue()
+ )
);
});
@@ -532,15 +532,15 @@ describe(
EllipsoidGeometryUpdater,
"ellipsoid",
createBasicEllipsoid,
- getScene,
+ getScene
);
createDynamicGeometryUpdaterSpecs(
EllipsoidGeometryUpdater,
"ellipsoid",
createDynamicEllipsoid,
- getScene,
+ getScene
);
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/DataSources/EllipsoidGraphicsSpec.js b/packages/engine/Specs/DataSources/EllipsoidGraphicsSpec.js
index 3a31b4213f7e..adb4edd3efc0 100644
--- a/packages/engine/Specs/DataSources/EllipsoidGraphicsSpec.js
+++ b/packages/engine/Specs/DataSources/EllipsoidGraphicsSpec.js
@@ -43,10 +43,10 @@ describe("DataSources/EllipsoidGraphics", function () {
expect(ellipsoid.material.color.getValue()).toEqual(options.material);
expect(ellipsoid.show.getValue()).toEqual(options.show);
expect(ellipsoid.stackPartitions.getValue()).toEqual(
- options.stackPartitions,
+ options.stackPartitions
);
expect(ellipsoid.slicePartitions.getValue()).toEqual(
- options.slicePartitions,
+ options.slicePartitions
);
expect(ellipsoid.subdivisions.getValue()).toEqual(options.subdivisions);
expect(ellipsoid.fill.getValue()).toEqual(options.fill);
@@ -55,7 +55,7 @@ describe("DataSources/EllipsoidGraphics", function () {
expect(ellipsoid.outlineWidth.getValue()).toEqual(options.outlineWidth);
expect(ellipsoid.shadows.getValue()).toEqual(options.shadows);
expect(ellipsoid.distanceDisplayCondition.getValue()).toEqual(
- options.distanceDisplayCondition,
+ options.distanceDisplayCondition
);
});
@@ -78,7 +78,7 @@ describe("DataSources/EllipsoidGraphics", function () {
source.outlineWidth = new ConstantProperty();
source.shadows = new ConstantProperty(ShadowMode.ENABLED);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(),
+ new DistanceDisplayCondition()
);
const target = new EllipsoidGraphics();
@@ -101,7 +101,7 @@ describe("DataSources/EllipsoidGraphics", function () {
expect(target.outlineWidth).toBe(source.outlineWidth);
expect(target.shadows).toBe(source.shadows);
expect(target.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
});
@@ -195,7 +195,7 @@ describe("DataSources/EllipsoidGraphics", function () {
expect(result.outlineWidth).toBe(source.outlineWidth);
expect(result.shadows).toBe(source.shadows);
expect(result.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
// Clone with source passed
@@ -212,7 +212,7 @@ describe("DataSources/EllipsoidGraphics", function () {
expect(result.outlineWidth).toBe(source.outlineWidth);
expect(result.shadows).toBe(source.shadows);
expect(result.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
});
@@ -230,7 +230,7 @@ describe("DataSources/EllipsoidGraphics", function () {
property,
"radii",
new Cartesian3(1, 2, 3),
- new Cartesian3(4, 5, 6),
+ new Cartesian3(4, 5, 6)
);
testDefinitionChanged(property, "show", true, false);
testDefinitionChanged(property, "stackPartitions", 1, 2);
@@ -244,13 +244,13 @@ describe("DataSources/EllipsoidGraphics", function () {
property,
"shadows",
ShadowMode.ENABLED,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
testDefinitionChanged(
property,
"distanceDisplayCondition",
new DistanceDisplayCondition(),
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
});
});
diff --git a/packages/engine/Specs/DataSources/EntityClusterSpec.js b/packages/engine/Specs/DataSources/EntityClusterSpec.js
index e1c70e5e3fd3..2d4aa8beb9ce 100644
--- a/packages/engine/Specs/DataSources/EntityClusterSpec.js
+++ b/packages/engine/Specs/DataSources/EntityClusterSpec.js
@@ -158,7 +158,7 @@ describe(
billboard.position = SceneTransforms.drawingBufferToWorldCoordinates(
scene,
new Cartesian2(0.0, 0.0),
- depth,
+ depth
);
entity = new Entity();
@@ -168,7 +168,7 @@ describe(
billboard.position = SceneTransforms.drawingBufferToWorldCoordinates(
scene,
new Cartesian2(scene.canvas.clientWidth, scene.canvas.clientHeight),
- depth,
+ depth
);
const frameState = scene.frameState;
@@ -200,7 +200,7 @@ describe(
label.position = SceneTransforms.drawingBufferToWorldCoordinates(
scene,
new Cartesian2(0.0, 0.0),
- depth,
+ depth
);
entity = new Entity();
@@ -210,7 +210,7 @@ describe(
label.position = SceneTransforms.drawingBufferToWorldCoordinates(
scene,
new Cartesian2(scene.canvas.clientWidth, scene.canvas.clientHeight),
- depth,
+ depth
);
const frameState = scene.frameState;
@@ -241,7 +241,7 @@ describe(
point.position = SceneTransforms.drawingBufferToWorldCoordinates(
scene,
new Cartesian2(0.0, 0.0),
- depth,
+ depth
);
entity = new Entity();
@@ -251,7 +251,7 @@ describe(
point.position = SceneTransforms.drawingBufferToWorldCoordinates(
scene,
new Cartesian2(scene.canvas.clientWidth, scene.canvas.clientHeight),
- depth,
+ depth
);
const frameState = scene.frameState;
@@ -282,7 +282,7 @@ describe(
point.position = SceneTransforms.drawingBufferToWorldCoordinates(
scene,
new Cartesian2(0.0, 0.0),
- depth,
+ depth
);
entity = new Entity();
@@ -292,7 +292,7 @@ describe(
point.position = SceneTransforms.drawingBufferToWorldCoordinates(
scene,
new Cartesian2(scene.canvas.clientWidth, scene.canvas.clientHeight),
- depth,
+ depth
);
cluster.enabled = true;
@@ -313,7 +313,7 @@ describe(
point.position = SceneTransforms.drawingBufferToWorldCoordinates(
scene,
new Cartesian2(0.0, 0.0),
- depth,
+ depth
);
entity = new Entity();
@@ -323,7 +323,7 @@ describe(
point.position = SceneTransforms.drawingBufferToWorldCoordinates(
scene,
new Cartesian2(scene.canvas.clientWidth, scene.canvas.clientHeight),
- depth,
+ depth
);
const frameState = scene.frameState;
@@ -355,13 +355,13 @@ describe(
cluster.getPoint(entity);
expect(
- cluster._collectionIndicesByEntity[entity.id].billboardIndex,
+ cluster._collectionIndicesByEntity[entity.id].billboardIndex
).toBeDefined();
expect(
- cluster._collectionIndicesByEntity[entity.id].labelIndex,
+ cluster._collectionIndicesByEntity[entity.id].labelIndex
).toBeDefined();
expect(
- cluster._collectionIndicesByEntity[entity.id].pointIndex,
+ cluster._collectionIndicesByEntity[entity.id].pointIndex
).toBeDefined();
});
@@ -436,7 +436,7 @@ describe(
billboard.position = SceneTransforms.drawingBufferToWorldCoordinates(
scene,
new Cartesian2(0.0, 0.0),
- depth,
+ depth
);
entity = new Entity();
@@ -446,7 +446,7 @@ describe(
billboard.position = SceneTransforms.drawingBufferToWorldCoordinates(
scene,
new Cartesian2(scene.canvas.clientWidth, scene.canvas.clientHeight),
- depth,
+ depth
);
const frameState = scene.frameState;
@@ -477,7 +477,7 @@ describe(
billboard.position = SceneTransforms.drawingBufferToWorldCoordinates(
scene,
new Cartesian2(0.0, 0.0),
- depth,
+ depth
);
entity = new Entity();
@@ -487,7 +487,7 @@ describe(
billboard.position = SceneTransforms.drawingBufferToWorldCoordinates(
scene,
new Cartesian2(scene.canvas.clientWidth, 0),
- depth,
+ depth
);
entity = new Entity();
@@ -497,7 +497,7 @@ describe(
billboard.position = SceneTransforms.drawingBufferToWorldCoordinates(
scene,
new Cartesian2(0, scene.canvas.clientHeight),
- depth,
+ depth
);
entity = new Entity();
@@ -507,7 +507,7 @@ describe(
billboard.position = SceneTransforms.drawingBufferToWorldCoordinates(
scene,
new Cartesian2(scene.canvas.clientWidth, scene.canvas.clientHeight),
- depth,
+ depth
);
const frameState = scene.frameState;
@@ -538,7 +538,7 @@ describe(
billboard.position = SceneTransforms.drawingBufferToWorldCoordinates(
scene,
new Cartesian2(0.0, 0.0),
- farDepth,
+ farDepth
);
entity = new Entity();
@@ -548,7 +548,7 @@ describe(
billboard.position = SceneTransforms.drawingBufferToWorldCoordinates(
scene,
new Cartesian2(scene.canvas.clientWidth, scene.canvas.clientHeight),
- farDepth,
+ farDepth
);
const frameState = scene.frameState;
@@ -562,7 +562,7 @@ describe(
expect(cluster._clusterLabelCollection.length).toEqual(1);
const position = Cartesian3.clone(
- cluster._clusterLabelCollection.get(0).position,
+ cluster._clusterLabelCollection.get(0).position
);
scene.camera.moveForward(1.0e-6);
@@ -572,7 +572,7 @@ describe(
expect(cluster._clusterLabelCollection).toBeDefined();
expect(cluster._clusterLabelCollection.length).toEqual(1);
expect(cluster._clusterLabelCollection.get(0).position).toEqual(
- position,
+ position
);
});
});
@@ -581,13 +581,14 @@ describe(
cluster = new EntityCluster();
cluster._initialize(scene);
- cluster.clusterEvent.addEventListener(
- function (clusteredEntities, cluster) {
- cluster.billboard.show = true;
- cluster.billboard.image = createBillboardImage();
- cluster.label.text = "cluster";
- },
- );
+ cluster.clusterEvent.addEventListener(function (
+ clusteredEntities,
+ cluster
+ ) {
+ cluster.billboard.show = true;
+ cluster.billboard.image = createBillboardImage();
+ cluster.label.text = "cluster";
+ });
let entity = new Entity();
let point = cluster.getPoint(entity);
@@ -596,7 +597,7 @@ describe(
point.position = SceneTransforms.drawingBufferToWorldCoordinates(
scene,
new Cartesian2(0.0, 0.0),
- farDepth,
+ farDepth
);
entity = new Entity();
@@ -606,7 +607,7 @@ describe(
point.position = SceneTransforms.drawingBufferToWorldCoordinates(
scene,
new Cartesian2(scene.canvas.clientWidth, scene.canvas.clientHeight),
- farDepth,
+ farDepth
);
const frameState = scene.frameState;
@@ -636,7 +637,7 @@ describe(
dataSource._visualizers = DataSourceDisplay.defaultVisualizersCallback(
scene,
cluster,
- dataSource,
+ dataSource
);
const entityCollection = dataSource.entities;
@@ -645,7 +646,7 @@ describe(
position: SceneTransforms.drawingBufferToWorldCoordinates(
scene,
new Cartesian2(0.0, 0.0),
- depth,
+ depth
),
billboard: {
image: createBillboardImage(),
@@ -659,7 +660,7 @@ describe(
position: SceneTransforms.drawingBufferToWorldCoordinates(
scene,
new Cartesian2(scene.canvas.clientWidth, scene.canvas.clientHeight),
- depth,
+ depth
),
billboard: {
image: createBillboardImage(),
@@ -692,5 +693,5 @@ describe(
expect(cluster._billboardCollection.length).toEqual(2);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/DataSources/EntityCollectionSpec.js b/packages/engine/Specs/DataSources/EntityCollectionSpec.js
index a00f5d431079..a8b94f763355 100644
--- a/packages/engine/Specs/DataSources/EntityCollectionSpec.js
+++ b/packages/engine/Specs/DataSources/EntityCollectionSpec.js
@@ -18,7 +18,7 @@ describe("DataSources/EntityCollection", function () {
collection,
added,
removed,
- changed,
+ changed
) {
this.timesCalled++;
this.added = added.slice(0);
@@ -101,7 +101,7 @@ describe("DataSources/EntityCollection", function () {
const listener = new CollectionListener();
entityCollection.collectionChanged.addEventListener(
listener.onCollectionChanged,
- listener,
+ listener
);
entityCollection.add(entity);
@@ -140,7 +140,7 @@ describe("DataSources/EntityCollection", function () {
entityCollection.collectionChanged.removeEventListener(
listener.onCollectionChanged,
- listener,
+ listener
);
});
@@ -213,7 +213,7 @@ describe("DataSources/EntityCollection", function () {
const listener = new CollectionListener();
entityCollection.collectionChanged.addEventListener(
listener.onCollectionChanged,
- listener,
+ listener
);
entityCollection.suspendEvents();
@@ -260,7 +260,7 @@ describe("DataSources/EntityCollection", function () {
entityCollection.collectionChanged.removeEventListener(
listener.onCollectionChanged,
- listener,
+ listener
);
});
@@ -287,7 +287,7 @@ describe("DataSources/EntityCollection", function () {
entityCollection.collectionChanged.addEventListener(
listener.onCollectionChanged,
- listener,
+ listener
);
entityCollection.removeAll();
@@ -302,7 +302,7 @@ describe("DataSources/EntityCollection", function () {
entityCollection.collectionChanged.removeEventListener(
listener.onCollectionChanged,
- listener,
+ listener
);
});
@@ -318,7 +318,7 @@ describe("DataSources/EntityCollection", function () {
entityCollection.collectionChanged.addEventListener(
listener.onCollectionChanged,
- listener,
+ listener
);
entityCollection.suspendEvents();
@@ -342,7 +342,7 @@ describe("DataSources/EntityCollection", function () {
entityCollection.collectionChanged.removeEventListener(
listener.onCollectionChanged,
- listener,
+ listener
);
});
@@ -406,13 +406,13 @@ describe("DataSources/EntityCollection", function () {
entity.availability.addInterval(
TimeInterval.fromIso8601({
iso8601: "2012-08-01/2012-08-02",
- }),
+ })
);
entity2.availability = new TimeIntervalCollection();
entity2.availability.addInterval(
TimeInterval.fromIso8601({
iso8601: "2012-08-05/2012-08-06",
- }),
+ })
);
entity3.availability = undefined;
@@ -432,13 +432,13 @@ describe("DataSources/EntityCollection", function () {
entity.availability.addInterval(
TimeInterval.fromIso8601({
iso8601: "2012-08-01/9999-12-31T24:00:00Z",
- }),
+ })
);
entity2.availability = new TimeIntervalCollection();
entity2.availability.addInterval(
TimeInterval.fromIso8601({
iso8601: "0000-01-01T00:00:00Z/2012-08-06",
- }),
+ })
);
entity3.availability = undefined;
diff --git a/packages/engine/Specs/DataSources/EntitySpec.js b/packages/engine/Specs/DataSources/EntitySpec.js
index 4edfdbffc4da..f38163f0d0e3 100644
--- a/packages/engine/Specs/DataSources/EntitySpec.js
+++ b/packages/engine/Specs/DataSources/EntitySpec.js
@@ -145,15 +145,15 @@ describe("DataSources/Entity", function () {
entity.availability = intervals;
expect(
entity.isAvailable(
- JulianDate.addSeconds(interval.start, -1, new JulianDate()),
- ),
+ JulianDate.addSeconds(interval.start, -1, new JulianDate())
+ )
).toEqual(false);
expect(entity.isAvailable(interval.start)).toEqual(true);
expect(entity.isAvailable(interval.stop)).toEqual(true);
expect(
entity.isAvailable(
- JulianDate.addSeconds(interval.stop, 1, new JulianDate()),
- ),
+ JulianDate.addSeconds(interval.stop, 1, new JulianDate())
+ )
).toEqual(false);
});
@@ -198,7 +198,7 @@ describe("DataSources/Entity", function () {
entity,
propertyName,
newValue,
- oldValue,
+ oldValue
);
});
@@ -298,7 +298,7 @@ describe("DataSources/Entity", function () {
const modelMatrix = entity.computeModelMatrix(new JulianDate());
const expected = Matrix4.fromRotationTranslation(
Matrix3.fromQuaternion(orientation),
- position,
+ position
);
expect(modelMatrix).toEqual(expected);
});
diff --git a/packages/engine/Specs/DataSources/EntityViewSpec.js b/packages/engine/Specs/DataSources/EntityViewSpec.js
index 1406cf8207d3..5cba71e6ca8b 100644
--- a/packages/engine/Specs/DataSources/EntityViewSpec.js
+++ b/packages/engine/Specs/DataSources/EntityViewSpec.js
@@ -56,7 +56,7 @@ describe(
EntityView.defaultOffset3D = sampleOffset;
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- Cartesian3.fromDegrees(0.0, 0.0),
+ Cartesian3.fromDegrees(0.0, 0.0)
);
const view = new EntityView(entity, scene);
view.update(JulianDate.now());
@@ -68,7 +68,7 @@ describe(
const sampleOffset = new Cartesian3(1, 2, 3);
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- Cartesian3.fromDegrees(0.0, 0.0),
+ Cartesian3.fromDegrees(0.0, 0.0)
);
entity.viewFrom = sampleOffset;
const view = new EntityView(entity, scene);
@@ -80,16 +80,16 @@ describe(
const sampleOffset = new Cartesian3(
-1.3322676295501878e-15,
-7.348469228349534,
- 7.3484692283495345,
+ 7.3484692283495345
);
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- Cartesian3.fromDegrees(0.0, 0.0),
+ Cartesian3.fromDegrees(0.0, 0.0)
);
const view = new EntityView(entity, scene, undefined);
view.update(
JulianDate.now(),
- new BoundingSphere(new Cartesian3(3, 4, 5), 6),
+ new BoundingSphere(new Cartesian3(3, 4, 5), 6)
);
expect(view.scene.camera.position).toEqualEpsilon(sampleOffset, 1e-10);
});
@@ -98,14 +98,14 @@ describe(
const sampleOffset = new Cartesian3(1, 2, 3);
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- Cartesian3.fromDegrees(0.0, 0.0),
+ Cartesian3.fromDegrees(0.0, 0.0)
);
entity.viewFrom = sampleOffset;
const view = new EntityView(
entity,
scene,
undefined,
- new BoundingSphere(new Cartesian3(3, 4, 5), 6),
+ new BoundingSphere(new Cartesian3(3, 4, 5), 6)
);
view.update(JulianDate.now());
expect(view.scene.camera.position).toEqualEpsilon(sampleOffset, 1e-10);
@@ -126,5 +126,5 @@ describe(
view.update(JulianDate.now());
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/DataSources/GeoJsonDataSourceSpec.js b/packages/engine/Specs/DataSources/GeoJsonDataSourceSpec.js
index c702bea93968..aff11fe035c4 100644
--- a/packages/engine/Specs/DataSources/GeoJsonDataSourceSpec.js
+++ b/packages/engine/Specs/DataSources/GeoJsonDataSourceSpec.js
@@ -48,7 +48,7 @@ describe("DataSources/GeoJsonDataSource", function () {
return Cartesian3.fromDegrees(
coordinates[0],
coordinates[1],
- coordinates[2],
+ coordinates[2]
);
}
@@ -414,7 +414,7 @@ describe("DataSources/GeoJsonDataSource", function () {
const entity = entityCollection.values[0];
expect(entity.properties).toBe(feature.properties);
expect(entity.position.getValue(time)).toEqual(
- coordinatesToCartesian(feature.geometry.coordinates),
+ coordinatesToCartesian(feature.geometry.coordinates)
);
expect(entity.billboard).toBeDefined();
});
@@ -523,7 +523,7 @@ describe("DataSources/GeoJsonDataSource", function () {
function testDescribeProperty(properties, nameProperty) {
return new CallbackProperty(
createDescriptionCallback(testDescribe, properties, nameProperty),
- true,
+ true
);
}
@@ -559,7 +559,7 @@ describe("DataSources/GeoJsonDataSource", function () {
const entity = entityCollection.values[0];
expect(entity.description).toBeDefined();
expect(entity.description.getValue(time)).toEqual(
- featureWithDescription.properties.description,
+ featureWithDescription.properties.description
);
});
});
@@ -588,13 +588,13 @@ describe("DataSources/GeoJsonDataSource", function () {
const entity = entityCollection.values[0];
expect(entity.name).toBeUndefined();
expect(entity.properties.name.getValue()).toBe(
- featureWithNullName.properties.name,
+ featureWithNullName.properties.name
);
expect(entity.properties.getValue(time)).toEqual(
- featureWithNullName.properties,
+ featureWithNullName.properties
);
expect(entity.position.getValue(time)).toEqual(
- coordinatesToCartesian(featureWithNullName.geometry.coordinates),
+ coordinatesToCartesian(featureWithNullName.geometry.coordinates)
);
expect(entity.billboard).toBeDefined();
});
@@ -665,7 +665,7 @@ describe("DataSources/GeoJsonDataSource", function () {
const entity = entityCollection.values[0];
expect(entity.properties).toBe(point.properties);
expect(entity.position.getValue(time)).toEqual(
- coordinatesToCartesian(point.coordinates),
+ coordinatesToCartesian(point.coordinates)
);
expect(entity.billboard).toBeDefined();
expect(entity.billboard.image).toBeDefined();
@@ -683,12 +683,12 @@ describe("DataSources/GeoJsonDataSource", function () {
const entity = entityCollection.values[0];
expect(entity.properties).toBe(point.properties);
expect(entity.position.getValue(time)).toEqual(
- coordinatesToCartesian(point.coordinates),
+ coordinatesToCartesian(point.coordinates)
);
expect(entity.billboard).toBeDefined();
expect(entity.billboard.image).toBeDefined();
expect(entity.billboard.heightReference.getValue(time)).toBe(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
});
});
@@ -710,7 +710,7 @@ describe("DataSources/GeoJsonDataSource", function () {
const entity = entityCollection.values[0];
expect(entity.billboard).toBeDefined();
return Promise.resolve(
- dataSource._pinBuilder.fromMakiIconId("bus", Color.WHITE, 64),
+ dataSource._pinBuilder.fromMakiIconId("bus", Color.WHITE, 64)
).then(function (image) {
expect(entity.billboard.image.getValue()).toBe(image);
});
@@ -732,7 +732,7 @@ describe("DataSources/GeoJsonDataSource", function () {
return dataSource.load(geojson).then(function () {
const image = dataSource._pinBuilder.fromColor(
GeoJsonDataSource.markerColor,
- GeoJsonDataSource.markerSize,
+ GeoJsonDataSource.markerSize
);
const entityCollection = dataSource.entities;
const entity = entityCollection.values[0];
@@ -758,7 +758,7 @@ describe("DataSources/GeoJsonDataSource", function () {
const entity = entityCollection.values[0];
expect(entity.billboard).toBeDefined();
return Promise.resolve(
- dataSource._pinBuilder.fromColor(Color.WHITE, 64),
+ dataSource._pinBuilder.fromColor(Color.WHITE, 64)
).then(function (image) {
expect(entity.billboard.image.getValue()).toBe(image);
});
@@ -771,7 +771,7 @@ describe("DataSources/GeoJsonDataSource", function () {
const entityCollection = dataSource.entities;
const entities = entityCollection.values;
const expectedPositions = coordinatesArrayToCartesian(
- multiPoint.coordinates,
+ multiPoint.coordinates
);
for (let i = 0; i < multiPoint.coordinates.length; i++) {
const entity = entities[i];
@@ -790,7 +790,7 @@ describe("DataSources/GeoJsonDataSource", function () {
const entityCollection = dataSource.entities;
const entities = entityCollection.values;
const expectedPositions = coordinatesArrayToCartesian(
- multiPoint.coordinates,
+ multiPoint.coordinates
);
for (let i = 0; i < multiPoint.coordinates.length; i++) {
const entity = entities[i];
@@ -799,7 +799,7 @@ describe("DataSources/GeoJsonDataSource", function () {
expect(entity.billboard).toBeDefined();
expect(entity.billboard.image).toBeDefined();
expect(entity.billboard.heightReference.getValue()).toBe(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
}
});
@@ -812,10 +812,10 @@ describe("DataSources/GeoJsonDataSource", function () {
const entity = entityCollection.values[0];
expect(entity.properties).toBe(lineString.properties);
expect(entity.polyline.positions.getValue(time)).toEqual(
- coordinatesArrayToCartesian(lineString.coordinates),
+ coordinatesArrayToCartesian(lineString.coordinates)
);
expect(entity.polyline.material.color.getValue(time)).toEqual(
- GeoJsonDataSource.stroke,
+ GeoJsonDataSource.stroke
);
expect(entity.polyline.width.getValue(time)).toEqual(2);
});
@@ -832,10 +832,10 @@ describe("DataSources/GeoJsonDataSource", function () {
const entity = entityCollection.values[0];
expect(entity.properties).toBe(lineString.properties);
expect(entity.polyline.positions.getValue(time)).toEqual(
- coordinatesArrayToCartesian(lineString.coordinates),
+ coordinatesArrayToCartesian(lineString.coordinates)
);
expect(entity.polyline.material.color.getValue(time)).toEqual(
- GeoJsonDataSource.stroke,
+ GeoJsonDataSource.stroke
);
expect(entity.polyline.width.getValue(time)).toEqual(2);
expect(entity.polyline.clampToGround.getValue(time)).toEqual(true);
@@ -853,7 +853,7 @@ describe("DataSources/GeoJsonDataSource", function () {
expect(entity.properties).toBe(multiLineString.properties);
expect(entity.polyline.positions.getValue(time)).toEqual(lines[i]);
expect(entity.polyline.material.color.getValue(time)).toEqual(
- Color.YELLOW,
+ Color.YELLOW
);
expect(entity.polyline.width.getValue(time)).toEqual(2);
}
@@ -875,7 +875,7 @@ describe("DataSources/GeoJsonDataSource", function () {
expect(entity.properties).toBe(multiLineString.properties);
expect(entity.polyline.positions.getValue(time)).toEqual(lines[i]);
expect(entity.polyline.material.color.getValue(time)).toEqual(
- Color.YELLOW,
+ Color.YELLOW
);
expect(entity.polyline.width.getValue(time)).toEqual(2);
expect(entity.polyline.clampToGround.getValue(time)).toEqual(true);
@@ -891,19 +891,19 @@ describe("DataSources/GeoJsonDataSource", function () {
expect(entity.properties).toBe(polygon.properties);
expect(entity.polygon.hierarchy.getValue(time)).toEqual(
new PolygonHierarchy(
- polygonCoordinatesToCartesian(polygon.coordinates[0]),
- ),
+ polygonCoordinatesToCartesian(polygon.coordinates[0])
+ )
);
expect(entity.polygon.perPositionHeight).toBeUndefined();
expect(entity.polygon.material.color.getValue(time)).toEqual(
- GeoJsonDataSource.fill,
+ GeoJsonDataSource.fill
);
expect(entity.polygon.outline.getValue(time)).toEqual(true);
expect(entity.polygon.outlineWidth.getValue(time)).toEqual(
- GeoJsonDataSource.strokeWidth,
+ GeoJsonDataSource.strokeWidth
);
expect(entity.polygon.outlineColor.getValue(time)).toEqual(
- GeoJsonDataSource.stroke,
+ GeoJsonDataSource.stroke
);
expect(entity.polygon.height).toBeInstanceOf(ConstantProperty);
});
@@ -921,19 +921,19 @@ describe("DataSources/GeoJsonDataSource", function () {
expect(entity.properties).toBe(polygon.properties);
expect(entity.polygon.hierarchy.getValue(time)).toEqual(
new PolygonHierarchy(
- polygonCoordinatesToCartesian(polygon.coordinates[0]),
- ),
+ polygonCoordinatesToCartesian(polygon.coordinates[0])
+ )
);
expect(entity.polygon.perPositionHeight).toBeUndefined();
expect(entity.polygon.material.color.getValue(time)).toEqual(
- GeoJsonDataSource.fill,
+ GeoJsonDataSource.fill
);
expect(entity.polygon.outline.getValue(time)).toEqual(true);
expect(entity.polygon.outlineWidth.getValue(time)).toEqual(
- GeoJsonDataSource.strokeWidth,
+ GeoJsonDataSource.strokeWidth
);
expect(entity.polygon.outlineColor.getValue(time)).toEqual(
- GeoJsonDataSource.stroke,
+ GeoJsonDataSource.stroke
);
expect(entity.polygon.height).toBeUndefined();
});
@@ -947,19 +947,19 @@ describe("DataSources/GeoJsonDataSource", function () {
expect(entity.properties).toBe(polygonWithHeights.properties);
expect(entity.polygon.hierarchy.getValue(time)).toEqual(
new PolygonHierarchy(
- polygonCoordinatesToCartesian(polygonWithHeights.coordinates[0]),
- ),
+ polygonCoordinatesToCartesian(polygonWithHeights.coordinates[0])
+ )
);
expect(entity.polygon.perPositionHeight.getValue(time)).toBe(true);
expect(entity.polygon.material.color.getValue(time)).toEqual(
- GeoJsonDataSource.fill,
+ GeoJsonDataSource.fill
);
expect(entity.polygon.outline.getValue(time)).toEqual(true);
expect(entity.polygon.outlineWidth.getValue(time)).toEqual(
- GeoJsonDataSource.strokeWidth,
+ GeoJsonDataSource.strokeWidth
);
expect(entity.polygon.outlineColor.getValue(time)).toEqual(
- GeoJsonDataSource.stroke,
+ GeoJsonDataSource.stroke
);
});
});
@@ -975,10 +975,10 @@ describe("DataSources/GeoJsonDataSource", function () {
polygonCoordinatesToCartesian(polygonWithHoles.coordinates[0]),
[
new PolygonHierarchy(
- polygonCoordinatesToCartesian(polygonWithHoles.coordinates[1]),
+ polygonCoordinatesToCartesian(polygonWithHoles.coordinates[1])
),
- ],
- ),
+ ]
+ )
);
});
});
@@ -989,13 +989,13 @@ describe("DataSources/GeoJsonDataSource", function () {
const entityCollection = dataSource.entities;
const entities = entityCollection.values;
const positions = multiPolygonCoordinatesToCartesian(
- multiPolygon.coordinates,
+ multiPolygon.coordinates
);
for (let i = 0; i < multiPolygon.coordinates.length; i++) {
const entity = entities[i];
expect(entity.properties).toBe(multiPolygon.properties);
expect(entity.polygon.hierarchy.getValue(time)).toEqual(
- new PolygonHierarchy(positions[i]),
+ new PolygonHierarchy(positions[i])
);
}
});
@@ -1009,20 +1009,20 @@ describe("DataSources/GeoJsonDataSource", function () {
const polygon = entities[0];
expect(polygon.properties.myProps.getValue()).toBe(
- topoJson.objects.polygon.properties.myProps,
+ topoJson.objects.polygon.properties.myProps
);
expect(polygon.properties.getValue(time)).toEqual(
- topoJson.objects.polygon.properties,
+ topoJson.objects.polygon.properties
);
expect(polygon.polygon.hierarchy).toBeDefined();
const lineString = entities[1];
expect(lineString.properties.myProps.getValue()).toBe(
- topoJson.objects.lineString.properties.myProps,
+ topoJson.objects.lineString.properties.myProps
);
expect(lineString.properties.getValue(time)).toEqual(
- topoJson.objects.lineString.properties,
+ topoJson.objects.lineString.properties
);
expect(lineString.polyline).toBeDefined();
@@ -1052,14 +1052,14 @@ describe("DataSources/GeoJsonDataSource", function () {
expect(entity.polygon.material.color.getValue()).toEqual(options.fill);
expect(entity.polygon.outlineColor.getValue()).toEqual(options.stroke);
expect(entity.polygon.outlineWidth.getValue()).toEqual(
- options.strokeWidth,
+ options.strokeWidth
);
entity = entities[2];
const expectedImage = dataSource._pinBuilder.fromMakiIconId(
options.markerSymbol,
options.markerColor,
- options.markerSize,
+ options.markerSize
);
expect(entity.billboard.image.getValue()).toEqual(expectedImage);
});
@@ -1080,28 +1080,28 @@ describe("DataSources/GeoJsonDataSource", function () {
let entity = entities[0];
expect(entity.polyline.material.color.getValue()).toEqual(
- GeoJsonDataSource.stroke,
+ GeoJsonDataSource.stroke
);
expect(entity.polyline.width.getValue()).toEqual(
- GeoJsonDataSource.strokeWidth,
+ GeoJsonDataSource.strokeWidth
);
entity = entities[1];
expect(entity.polygon.material.color.getValue()).toEqual(
- GeoJsonDataSource.fill,
+ GeoJsonDataSource.fill
);
expect(entity.polygon.outlineColor.getValue()).toEqual(
- GeoJsonDataSource.stroke,
+ GeoJsonDataSource.stroke
);
expect(entity.polygon.outlineWidth.getValue()).toEqual(
- GeoJsonDataSource.strokeWidth,
+ GeoJsonDataSource.strokeWidth
);
entity = entities[2];
const expectedImage = dataSource._pinBuilder.fromMakiIconId(
GeoJsonDataSource.markerSymbol,
GeoJsonDataSource.markerColor,
- GeoJsonDataSource.markerSize,
+ GeoJsonDataSource.markerSize
);
expect(entity.billboard.image.getValue()).toEqual(expectedImage);
});
@@ -1124,7 +1124,7 @@ describe("DataSources/GeoJsonDataSource", function () {
let entity = entityCollection.values[0];
expect(entity.properties).toBe(geometryCollection.properties);
expect(entity.position.getValue(time)).toEqual(
- coordinatesToCartesian(geometryCollection.geometries[0].coordinates),
+ coordinatesToCartesian(geometryCollection.geometries[0].coordinates)
);
expect(entity.billboard).toBeDefined();
@@ -1132,8 +1132,8 @@ describe("DataSources/GeoJsonDataSource", function () {
expect(entity.properties).toBe(geometryCollection.properties);
expect(entity.polyline.positions.getValue(time)).toEqual(
coordinatesArrayToCartesian(
- geometryCollection.geometries[1].coordinates,
- ),
+ geometryCollection.geometries[1].coordinates
+ )
);
});
});
@@ -1144,7 +1144,7 @@ describe("DataSources/GeoJsonDataSource", function () {
const entityCollection = dataSource.entities;
const entity = entityCollection.values[0];
expect(entity.position.getValue(time)).toEqual(
- coordinatesToCartesian(point.coordinates),
+ coordinatesToCartesian(point.coordinates)
);
});
});
@@ -1155,7 +1155,7 @@ describe("DataSources/GeoJsonDataSource", function () {
const entityCollection = dataSource.entities;
const entity = entityCollection.values[0];
expect(entity.position.getValue(time)).toEqual(
- coordinatesToCartesian(point.coordinates),
+ coordinatesToCartesian(point.coordinates)
);
});
});
@@ -1166,23 +1166,24 @@ describe("DataSources/GeoJsonDataSource", function () {
const entityCollection = dataSource.entities;
const entity = entityCollection.values[0];
expect(entity.position.getValue(time)).toEqual(
- coordinatesToCartesian(point.coordinates),
+ coordinatesToCartesian(point.coordinates)
);
});
});
it("Works with link crs href", function () {
const projectedPosition = new Cartesian3(1, 2, 3);
- GeoJsonDataSource.crsLinkHrefs[pointCrsLinkHref.crs.properties.href] =
- function (properties) {
- expect(properties).toBe(pointCrsLinkHref.crs.properties);
- return Promise.resolve(properties.href).then(function (href) {
- return function (coordinate) {
- expect(coordinate).toBe(pointCrsLinkHref.coordinates);
- return projectedPosition;
- };
- });
- };
+ GeoJsonDataSource.crsLinkHrefs[
+ pointCrsLinkHref.crs.properties.href
+ ] = function (properties) {
+ expect(properties).toBe(pointCrsLinkHref.crs.properties);
+ return Promise.resolve(properties.href).then(function (href) {
+ return function (coordinate) {
+ expect(coordinate).toBe(pointCrsLinkHref.coordinates);
+ return projectedPosition;
+ };
+ });
+ };
const dataSource = new GeoJsonDataSource();
return dataSource.load(pointCrsLinkHref).then(function () {
@@ -1199,7 +1200,7 @@ describe("DataSources/GeoJsonDataSource", function () {
const entityCollection = dataSource.entities;
const entity = entityCollection.values[0];
expect(entity.position.getValue(time)).toEqual(
- coordinatesToCartesian(point.coordinates),
+ coordinatesToCartesian(point.coordinates)
);
});
});
@@ -1229,16 +1230,16 @@ describe("DataSources/GeoJsonDataSource", function () {
const entity = entityCollection.values[0];
expect(entity.name).toEqual(geoJson.properties.title);
expect(entity.description.getValue(time)).toEqual(
- geoJson.properties.description,
+ geoJson.properties.description
);
const expectedColor = Color.fromCssColorString(geoJson.properties.stroke);
expectedColor.alpha = geoJson.properties["stroke-opacity"];
expect(entity.polyline.material.color.getValue(time)).toEqual(
- expectedColor,
+ expectedColor
);
expect(entity.polyline.width.getValue(time)).toEqual(
- geoJson.properties["stroke-width"],
+ geoJson.properties["stroke-width"]
);
});
});
@@ -1269,10 +1270,10 @@ describe("DataSources/GeoJsonDataSource", function () {
expect(entity.name).toBeUndefined();
expect(entity.description).toBeUndefined();
expect(entity.polyline.material.color.getValue(time)).toEqual(
- GeoJsonDataSource.stroke,
+ GeoJsonDataSource.stroke
);
expect(entity.polyline.width.getValue(time)).toEqual(
- GeoJsonDataSource.strokeWidth,
+ GeoJsonDataSource.strokeWidth
);
});
});
@@ -1306,10 +1307,10 @@ describe("DataSources/GeoJsonDataSource", function () {
const expectedMaterialColor = GeoJsonDataSource.stroke.clone();
expectedMaterialColor.alpha = 0.42;
expect(entity.polyline.material.color.getValue(time)).toEqual(
- expectedMaterialColor,
+ expectedMaterialColor
);
expect(entity.polyline.width.getValue(time)).toEqual(
- GeoJsonDataSource.strokeWidth,
+ GeoJsonDataSource.strokeWidth
);
});
});
@@ -1346,24 +1347,24 @@ describe("DataSources/GeoJsonDataSource", function () {
const entity = entityCollection.values[0];
expect(entity.name).toEqual(geoJson.properties.title);
expect(entity.description.getValue(time)).toEqual(
- geoJson.properties.description,
+ geoJson.properties.description
);
const expectedFill = Color.fromCssColorString(geoJson.properties.fill);
expectedFill.alpha = geoJson.properties["fill-opacity"];
const expectedOutlineColor = Color.fromCssColorString(
- geoJson.properties.stroke,
+ geoJson.properties.stroke
);
expectedOutlineColor.alpha = geoJson.properties["stroke-opacity"];
expect(entity.polygon.material.color.getValue(time)).toEqual(
- expectedFill,
+ expectedFill
);
expect(entity.polygon.outline.getValue(time)).toEqual(true);
expect(entity.polygon.outlineWidth.getValue(time)).toEqual(5);
expect(entity.polygon.outlineColor.getValue(time)).toEqual(
- expectedOutlineColor,
+ expectedOutlineColor
);
});
});
@@ -1401,14 +1402,14 @@ describe("DataSources/GeoJsonDataSource", function () {
expect(entity.name).toBeUndefined();
expect(entity.description).toBeUndefined();
expect(entity.polygon.material.color.getValue(time)).toEqual(
- GeoJsonDataSource.fill,
+ GeoJsonDataSource.fill
);
expect(entity.polygon.outline.getValue(time)).toEqual(true);
expect(entity.polygon.outlineWidth.getValue(time)).toEqual(
- GeoJsonDataSource.strokeWidth,
+ GeoJsonDataSource.strokeWidth
);
expect(entity.polygon.outlineColor.getValue(time)).toEqual(
- GeoJsonDataSource.stroke,
+ GeoJsonDataSource.stroke
);
});
});
@@ -1449,17 +1450,17 @@ describe("DataSources/GeoJsonDataSource", function () {
const expectedFill = GeoJsonDataSource.fill.clone();
expectedFill.alpha = geoJson.properties["fill-opacity"];
expect(entity.polygon.material.color.getValue(time)).toEqual(
- expectedFill,
+ expectedFill
);
const expectedOutlineColor = GeoJsonDataSource.stroke.clone();
expectedOutlineColor.alpha = 0.42;
expect(entity.polygon.outline.getValue(time)).toEqual(true);
expect(entity.polygon.outlineWidth.getValue(time)).toEqual(
- GeoJsonDataSource.strokeWidth,
+ GeoJsonDataSource.strokeWidth
);
expect(entity.polygon.outlineColor.getValue(time)).toEqual(
- expectedOutlineColor,
+ expectedOutlineColor
);
});
});
@@ -1516,7 +1517,7 @@ describe("DataSources/GeoJsonDataSource", function () {
.catch(function (error) {
expect(error).toBeInstanceOf(RuntimeError);
expect(error.message).toContain(
- "Unsupported GeoJSON object type: TimeyWimey",
+ "Unsupported GeoJSON object type: TimeyWimey"
);
});
});
@@ -1538,11 +1539,11 @@ describe("DataSources/GeoJsonDataSource", function () {
crs: null,
};
- return GeoJsonDataSource.load(featureWithNullCrs).then(
- function (dataSource) {
- expect(dataSource.entities.values.length).toBe(0);
- },
- );
+ return GeoJsonDataSource.load(featureWithNullCrs).then(function (
+ dataSource
+ ) {
+ expect(dataSource.entities.values.length).toBe(0);
+ });
});
it("rejects unknown CRS", function () {
@@ -1626,7 +1627,7 @@ describe("DataSources/GeoJsonDataSource", function () {
.catch(function (error) {
expect(error).toBeInstanceOf(RuntimeError);
expect(error.message).toContain(
- 'Unable to resolve crs link: {"href":"failMe","type":"failMeTwice"}',
+ 'Unable to resolve crs link: {"href":"failMe","type":"failMeTwice"}'
);
});
});
diff --git a/packages/engine/Specs/DataSources/GeometryUpdaterSetSpec.js b/packages/engine/Specs/DataSources/GeometryUpdaterSetSpec.js
index 4aec38f38203..79da7d2f5a34 100644
--- a/packages/engine/Specs/DataSources/GeometryUpdaterSetSpec.js
+++ b/packages/engine/Specs/DataSources/GeometryUpdaterSetSpec.js
@@ -37,7 +37,7 @@ describe("GeometryUpdaterSet", () => {
expect(updaterSet.updaters[5]).toBeInstanceOf(PlaneGeometryUpdater);
expect(updaterSet.updaters[6]).toBeInstanceOf(PolygonGeometryUpdater);
expect(updaterSet.updaters[7]).toBeInstanceOf(
- PolylineVolumeGeometryUpdater,
+ PolylineVolumeGeometryUpdater
);
expect(updaterSet.updaters[8]).toBeInstanceOf(RectangleGeometryUpdater);
expect(updaterSet.updaters[9]).toBeInstanceOf(WallGeometryUpdater);
diff --git a/packages/engine/Specs/DataSources/GeometryUpdaterSpec.js b/packages/engine/Specs/DataSources/GeometryUpdaterSpec.js
index 26d4c323ef09..39b3e15e293d 100644
--- a/packages/engine/Specs/DataSources/GeometryUpdaterSpec.js
+++ b/packages/engine/Specs/DataSources/GeometryUpdaterSpec.js
@@ -84,7 +84,7 @@ describe("DataSources/GeometryUpdater", function () {
expect(function () {
return updater.createDynamicUpdater(
new PrimitiveCollection(),
- new PrimitiveCollection(),
+ new PrimitiveCollection()
);
}).toThrowDeveloperError();
});
diff --git a/packages/engine/Specs/DataSources/GeometryVisualizerSpec.js b/packages/engine/Specs/DataSources/GeometryVisualizerSpec.js
index 1cea7ceba254..8b8aae5048a2 100644
--- a/packages/engine/Specs/DataSources/GeometryVisualizerSpec.js
+++ b/packages/engine/Specs/DataSources/GeometryVisualizerSpec.js
@@ -77,7 +77,7 @@ describe(
scene,
objects,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
expect(visualizer.update(time)).toBe(true);
expect(scene.primitives.length).toBe(0);
@@ -92,7 +92,7 @@ describe(
scene,
objects,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
const ellipse = new EllipseGraphics();
@@ -103,7 +103,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
entity.ellipse = ellipse;
objects.add(entity);
@@ -113,10 +113,10 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
expect(attributes.color).toEqual(
- ColorGeometryInstanceAttribute.toValue(Color.WHITE),
+ ColorGeometryInstanceAttribute.toValue(Color.WHITE)
);
expect(primitive.appearance).toBeInstanceOf(PerInstanceColorAppearance);
expect(primitive.appearance.closed).toBe(true);
@@ -135,7 +135,7 @@ describe(
scene,
objects,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
const ellipse = new EllipseGraphics();
@@ -146,7 +146,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
entity.ellipse = ellipse;
objects.add(entity);
@@ -156,7 +156,7 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
expect(attributes.color).toBeUndefined();
expect(primitive.appearance).toBeInstanceOf(MaterialAppearance);
@@ -176,7 +176,7 @@ describe(
scene,
objects,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
const ellipse = new EllipseGraphics();
@@ -187,7 +187,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
entity.ellipse = ellipse;
objects.add(entity);
@@ -197,10 +197,10 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
expect(attributes.color).toEqual(
- ColorGeometryInstanceAttribute.toValue(Color.WHITE),
+ ColorGeometryInstanceAttribute.toValue(Color.WHITE)
);
expect(primitive.appearance).toBeInstanceOf(PerInstanceColorAppearance);
expect(primitive.appearance.closed).toBe(true);
@@ -219,7 +219,7 @@ describe(
scene,
objects,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
const ellipse = new EllipseGraphics();
@@ -230,7 +230,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
entity.ellipse = ellipse;
objects.add(entity);
@@ -240,7 +240,7 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
expect(attributes.color).toBeUndefined();
expect(primitive.appearance).toBeInstanceOf(MaterialAppearance);
@@ -260,7 +260,7 @@ describe(
scene,
objects,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
const ellipse = new EllipseGraphics();
@@ -272,7 +272,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
entity.ellipse = ellipse;
objects.add(entity);
@@ -282,10 +282,10 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
expect(attributes.color).toEqual(
- ColorGeometryInstanceAttribute.toValue(Color.BLUE),
+ ColorGeometryInstanceAttribute.toValue(Color.BLUE)
);
expect(primitive.appearance).toBeInstanceOf(PerInstanceColorAppearance);
@@ -303,7 +303,7 @@ describe(
scene,
objects,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
const ellipse = new EllipseGraphics();
@@ -315,7 +315,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
entity.ellipse = ellipse;
objects.add(entity);
@@ -354,7 +354,7 @@ describe(
scene,
objects,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
const ellipse = new EllipseGraphics();
@@ -365,7 +365,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
entity.ellipse = ellipse;
objects.add(entity);
@@ -384,19 +384,19 @@ describe(
it("Creates and removes geometry classifying terrain", function () {
return createAndRemoveGeometryWithClassificationType(
- ClassificationType.TERRAIN,
+ ClassificationType.TERRAIN
);
});
it("Creates and removes geometry classifying 3D Tiles", function () {
return createAndRemoveGeometryWithClassificationType(
- ClassificationType.CESIUM_3D_TILE,
+ ClassificationType.CESIUM_3D_TILE
);
});
it("Creates and removes geometry classifying both terrain and 3D Tiles", function () {
return createAndRemoveGeometryWithClassificationType(
- ClassificationType.BOTH,
+ ClassificationType.BOTH
);
});
@@ -406,7 +406,7 @@ describe(
scene,
objects,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
const ellipse = new EllipseGraphics();
@@ -417,7 +417,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
entity.ellipse = ellipse;
objects.add(entity);
@@ -427,10 +427,10 @@ describe(
let attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
expect(attributes.color).toEqual(
- ColorGeometryInstanceAttribute.toValue(Color.WHITE),
+ ColorGeometryInstanceAttribute.toValue(Color.WHITE)
);
expect(primitive.appearance).toBeInstanceOf(PerInstanceColorAppearance);
@@ -441,7 +441,7 @@ describe(
attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
expect(attributes.color).toBeUndefined();
expect(primitive.appearance).toBeInstanceOf(MaterialAppearance);
@@ -464,7 +464,7 @@ describe(
scene,
entities,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
let color = Color.BLUE.withAlpha(0.5);
@@ -485,7 +485,7 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.color).toEqual(
- ColorGeometryInstanceAttribute.toValue(color),
+ ColorGeometryInstanceAttribute.toValue(color)
);
color = Color.RED.withAlpha(0.5);
@@ -498,7 +498,7 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.color).toEqual(
- ColorGeometryInstanceAttribute.toValue(color),
+ ColorGeometryInstanceAttribute.toValue(color)
);
entities.remove(entity);
@@ -512,7 +512,7 @@ describe(
scene,
objects,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
const ellipse = new EllipseGraphics();
@@ -524,7 +524,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
entity.ellipse = ellipse;
objects.add(entity);
@@ -546,7 +546,7 @@ describe(
scene,
objects,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
const ellipse = new EllipseGraphics();
@@ -557,7 +557,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
entity.ellipse = ellipse;
objects.add(entity);
@@ -580,7 +580,7 @@ describe(
undefined,
objects,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
}).toThrowDeveloperError();
});
@@ -591,7 +591,7 @@ describe(
scene,
undefined,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
}).toThrowDeveloperError();
});
@@ -601,7 +601,7 @@ describe(
scene,
new EntityCollection(),
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
expect(function () {
visualizer.update(undefined);
@@ -614,7 +614,7 @@ describe(
scene,
entityCollection,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
expect(entityCollection.collectionChanged.numberOfListeners).toEqual(1);
visualizer.destroy();
@@ -627,7 +627,7 @@ describe(
scene,
entityCollection,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
const destroySpy = jasmine.createSpy("destroy");
@@ -649,7 +649,7 @@ describe(
scene,
entityCollection,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
const ellipse = new EllipseGraphics();
@@ -679,8 +679,8 @@ describe(
BoundingSphere.transform(
attributes.boundingSphere,
primitive.modelMatrix,
- new BoundingSphere(),
- ),
+ new BoundingSphere()
+ )
);
visualizer.destroy();
@@ -693,7 +693,7 @@ describe(
scene,
entityCollection,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
const result = new BoundingSphere();
@@ -712,7 +712,7 @@ describe(
scene,
entityCollection,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
expect(function () {
@@ -728,7 +728,7 @@ describe(
scene,
objects,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
const entity = new Entity({
@@ -763,13 +763,13 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity2);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
expect(attributes.color).toEqual(
- ColorGeometryInstanceAttribute.toValue(Color.BLUE),
+ ColorGeometryInstanceAttribute.toValue(Color.BLUE)
);
expect(primitive.appearance).toBeInstanceOf(
- PerInstanceColorAppearance,
+ PerInstanceColorAppearance
);
objects.remove(entity);
@@ -787,7 +787,7 @@ describe(
scene,
entities,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
const entity = entities.add({
@@ -796,7 +796,7 @@ describe(
semiMajorAxis: 2,
semiMinorAxis: 1,
material: new ColorMaterialProperty(
- createDynamicProperty(Color.BLUE),
+ createDynamicProperty(Color.BLUE)
),
height: 0,
},
@@ -808,7 +808,7 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
entity.show = false;
@@ -820,7 +820,7 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(false),
+ ShowGeometryInstanceAttribute.toValue(false)
);
entities.remove(entity);
@@ -834,7 +834,7 @@ describe(
scene,
entities,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
const entity = entities.add({
@@ -854,7 +854,7 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
entity.show = false;
@@ -866,7 +866,7 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(false),
+ ShowGeometryInstanceAttribute.toValue(false)
);
entities.remove(entity);
@@ -880,7 +880,7 @@ describe(
scene,
entities,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
const entity = entities.add({
@@ -901,7 +901,7 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
entity.show = false;
@@ -913,7 +913,7 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(false),
+ ShowGeometryInstanceAttribute.toValue(false)
);
entities.remove(entity);
@@ -934,7 +934,7 @@ describe(
scene,
entities,
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
const blueColor = Color.BLUE.withAlpha(0.5);
@@ -1035,5 +1035,5 @@ describe(
expect(spy).toHaveBeenCalledOnceWith(FakeUpdater);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/DataSources/GpxDataSourceSpec.js b/packages/engine/Specs/DataSources/GpxDataSourceSpec.js
index 73224a389d60..8c9152c1572f 100755
--- a/packages/engine/Specs/DataSources/GpxDataSourceSpec.js
+++ b/packages/engine/Specs/DataSources/GpxDataSourceSpec.js
@@ -271,7 +271,7 @@ describe("DataSources/GpxDataSource", function () {
expect(entity.name).toBe("Test");
expect(entity.label).toBeDefined();
expect(entity.label.text.getValue()).toBe("Test");
- },
+ }
);
});
@@ -285,7 +285,7 @@ describe("DataSources/GpxDataSource", function () {
return GpxDataSource.load(parser.parseFromString(gpx, "text/xml")).catch(
function (e) {
expect(e).toBeInstanceOf(DeveloperError);
- },
+ }
);
});
@@ -299,7 +299,7 @@ describe("DataSources/GpxDataSource", function () {
return GpxDataSource.load(parser.parseFromString(gpx, "text/xml")).catch(
function (e) {
expect(e).toBeInstanceOf(DeveloperError);
- },
+ }
);
});
@@ -316,10 +316,10 @@ describe("DataSources/GpxDataSource", function () {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
expect(entities[0].position.getValue(Iso8601.MINIMUM_VALUE)).toEqual(
- Cartesian3.fromDegrees(38.737125, -9.139242, undefined),
+ Cartesian3.fromDegrees(38.737125, -9.139242, undefined)
);
expect(entities[0].name).toEqual("Position 1");
- },
+ }
);
});
@@ -338,10 +338,10 @@ describe("DataSources/GpxDataSource", function () {
expect(entities[0].billboard.height.getValue()).toEqual(BILLBOARD_SIZE);
expect(entities[0].billboard.width.getValue()).toEqual(BILLBOARD_SIZE);
expect(entities[0].billboard.verticalOrigin.getValue()).toEqual(
- VerticalOrigin.BOTTOM,
+ VerticalOrigin.BOTTOM
);
expect(entities[0].billboard.heightReference).toBeUndefined();
- },
+ }
);
});
@@ -358,7 +358,7 @@ describe("DataSources/GpxDataSource", function () {
}).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities[0].billboard.heightReference.getValue()).toEqual(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
});
});
@@ -398,9 +398,9 @@ describe("DataSources/GpxDataSource", function () {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
expect(entities[0].position.getValue(Iso8601.MINIMUM_VALUE)).toEqual(
- Cartesian3.fromDegrees(1, 2, 3),
+ Cartesian3.fromDegrees(1, 2, 3)
);
- },
+ }
);
});
@@ -423,15 +423,15 @@ describe("DataSources/GpxDataSource", function () {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(3);
expect(entities[0].position.getValue(Iso8601.MINIMUM_VALUE)).toEqual(
- Cartesian3.fromDegrees(1, 2, undefined),
+ Cartesian3.fromDegrees(1, 2, undefined)
);
expect(entities[1].position.getValue(Iso8601.MINIMUM_VALUE)).toEqual(
- Cartesian3.fromDegrees(3, 4, undefined),
+ Cartesian3.fromDegrees(3, 4, undefined)
);
expect(entities[2].position.getValue(Iso8601.MINIMUM_VALUE)).toEqual(
- Cartesian3.fromDegrees(5, 6, undefined),
+ Cartesian3.fromDegrees(5, 6, undefined)
);
- },
+ }
);
});
@@ -455,7 +455,7 @@ describe("DataSources/GpxDataSource", function () {
expect(div.style["background-color"]).toEqual("rgb(255, 255, 255)");
expect(div.style.color).toEqual("rgb(0, 0, 0)");
expect(div.textContent).toEqual("Description: The Description");
- },
+ }
);
});
@@ -479,7 +479,7 @@ describe("DataSources/GpxDataSource", function () {
expect(div.style["background-color"]).toEqual("rgb(255, 255, 255)");
expect(div.style.color).toEqual("rgb(0, 0, 0)");
expect(div.textContent).toEqual("Time: 2015-08-17T00:06Z");
- },
+ }
);
});
@@ -503,7 +503,7 @@ describe("DataSources/GpxDataSource", function () {
expect(div.style["background-color"]).toEqual("rgb(255, 255, 255)");
expect(div.style.color).toEqual("rgb(0, 0, 0)");
expect(div.textContent).toEqual("Comment: The comment");
- },
+ }
);
});
@@ -527,7 +527,7 @@ describe("DataSources/GpxDataSource", function () {
expect(div.style["background-color"]).toEqual("rgb(255, 255, 255)");
expect(div.style.color).toEqual("rgb(0, 0, 0)");
expect(div.textContent).toEqual("Source: The source");
- },
+ }
);
});
@@ -551,7 +551,7 @@ describe("DataSources/GpxDataSource", function () {
expect(div.style["background-color"]).toEqual("rgb(255, 255, 255)");
expect(div.style.color).toEqual("rgb(0, 0, 0)");
expect(div.textContent).toEqual("GPS track/route number: The number");
- },
+ }
);
});
@@ -575,7 +575,7 @@ describe("DataSources/GpxDataSource", function () {
expect(div.style["background-color"]).toEqual("rgb(255, 255, 255)");
expect(div.style.color).toEqual("rgb(0, 0, 0)");
expect(div.textContent).toEqual("Type: The type");
- },
+ }
);
});
@@ -601,9 +601,9 @@ describe("DataSources/GpxDataSource", function () {
expect(div.style["background-color"]).toEqual("rgb(255, 255, 255)");
expect(div.style.color).toEqual("rgb(0, 0, 0)");
expect(div.textContent).toEqual(
- "Comment: The commentDescription: The descriptionType: The type",
+ "Comment: The commentDescription: The descriptionType: The type"
);
- },
+ }
);
});
@@ -645,9 +645,9 @@ describe("DataSources/GpxDataSource", function () {
expect(div.style["background-color"]).toEqual("rgb(255, 255, 255)");
expect(div.style.color).toEqual("rgb(0, 0, 0)");
expect(div.textContent).toEqual(
- "Comment: The commentDescription: The descriptionType: The type",
+ "Comment: The commentDescription: The descriptionType: The type"
);
- },
+ }
);
});
@@ -680,18 +680,18 @@ describe("DataSources/GpxDataSource", function () {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(5); //1 for the route and 4 routepoints
expect(entities[1].position.getValue(Iso8601.MINIMUM_VALUE)).toEqual(
- Cartesian3.fromDegrees(1, 2, 1),
+ Cartesian3.fromDegrees(1, 2, 1)
);
expect(entities[2].position.getValue(Iso8601.MINIMUM_VALUE)).toEqual(
- Cartesian3.fromDegrees(3, 4, 1),
+ Cartesian3.fromDegrees(3, 4, 1)
);
expect(entities[3].position.getValue(Iso8601.MINIMUM_VALUE)).toEqual(
- Cartesian3.fromDegrees(5, 6, 1),
+ Cartesian3.fromDegrees(5, 6, 1)
);
expect(entities[4].position.getValue(Iso8601.MINIMUM_VALUE)).toEqual(
- Cartesian3.fromDegrees(7, 8, 1),
+ Cartesian3.fromDegrees(7, 8, 1)
);
- },
+ }
);
});
@@ -723,13 +723,13 @@ describe("DataSources/GpxDataSource", function () {
expect(entity.polyline).toBeDefined();
const positions = entity.polyline.positions.getValue(
- Iso8601.MINIMUM_VALUE,
+ Iso8601.MINIMUM_VALUE
);
expect(positions).toEqual([
Cartesian3.fromDegrees(1, 2, 1),
Cartesian3.fromDegrees(3, 4, 1),
]);
- },
+ }
);
});
@@ -764,9 +764,9 @@ describe("DataSources/GpxDataSource", function () {
expect(entity.polyline.material.color.getValue()).toEqual(Color.RED);
expect(entity.polyline.material.outlineWidth.getValue()).toEqual(2);
expect(entity.polyline.material.outlineColor.getValue()).toEqual(
- Color.BLACK,
+ Color.BLACK
);
- },
+ }
);
});
@@ -894,19 +894,19 @@ describe("DataSources/GpxDataSource", function () {
const entity = dataSource.entities.values[0];
expect(entity.position.getValue(time1)).toEqual(
- Cartesian3.fromDegrees(1, 2, 1),
+ Cartesian3.fromDegrees(1, 2, 1)
);
expect(entity.position.getValue(time2)).toEqual(
- Cartesian3.fromDegrees(3, 4, 1),
+ Cartesian3.fromDegrees(3, 4, 1)
);
expect(entity.position.getValue(time3)).toEqual(
- Cartesian3.fromDegrees(5, 6, 1),
+ Cartesian3.fromDegrees(5, 6, 1)
);
expect(entity.polyline).toBeDefined();
expect(entity.availability.start).toEqual(time1);
expect(entity.availability.stop).toEqual(time3);
- },
+ }
);
});
@@ -947,9 +947,9 @@ describe("DataSources/GpxDataSource", function () {
expect(entity.polyline.material.color.getValue()).toEqual(Color.RED);
expect(entity.polyline.material.outlineWidth.getValue()).toEqual(2);
expect(entity.polyline.material.outlineColor.getValue()).toEqual(
- Color.BLACK,
+ Color.BLACK
);
- },
+ }
);
});
diff --git a/packages/engine/Specs/DataSources/GridMaterialPropertySpec.js b/packages/engine/Specs/DataSources/GridMaterialPropertySpec.js
index 0986d5119394..efeb61875a5d 100644
--- a/packages/engine/Specs/DataSources/GridMaterialPropertySpec.js
+++ b/packages/engine/Specs/DataSources/GridMaterialPropertySpec.js
@@ -82,35 +82,35 @@ describe("DataSources/GridMaterialProperty", function () {
start: start,
stop: stop,
data: Color.BLUE,
- }),
+ })
);
property.cellAlpha.intervals.addInterval(
new TimeInterval({
start: start,
stop: stop,
data: 1.0,
- }),
+ })
);
property.lineCount.intervals.addInterval(
new TimeInterval({
start: start,
stop: stop,
data: new Cartesian2(3.4, 5.0),
- }),
+ })
);
property.lineThickness.intervals.addInterval(
new TimeInterval({
start: start,
stop: stop,
data: new Cartesian2(2, 3),
- }),
+ })
);
property.lineOffset.intervals.addInterval(
new TimeInterval({
start: start,
stop: stop,
data: new Cartesian2(0.7, 0.8),
- }),
+ })
);
const result = property.getValue(start);
@@ -190,7 +190,7 @@ describe("DataSources/GridMaterialProperty", function () {
property,
"color",
property.color,
- oldValue,
+ oldValue
);
listener.calls.reset();
@@ -199,7 +199,7 @@ describe("DataSources/GridMaterialProperty", function () {
property,
"color",
property.color,
- property.color,
+ property.color
);
listener.calls.reset();
@@ -213,7 +213,7 @@ describe("DataSources/GridMaterialProperty", function () {
property,
"cellAlpha",
property.cellAlpha,
- oldValue,
+ oldValue
);
listener.calls.reset();
@@ -222,7 +222,7 @@ describe("DataSources/GridMaterialProperty", function () {
property,
"cellAlpha",
property.cellAlpha,
- property.cellAlpha,
+ property.cellAlpha
);
listener.calls.reset();
@@ -236,7 +236,7 @@ describe("DataSources/GridMaterialProperty", function () {
property,
"lineCount",
property.lineCount,
- oldValue,
+ oldValue
);
listener.calls.reset();
@@ -245,7 +245,7 @@ describe("DataSources/GridMaterialProperty", function () {
property,
"lineCount",
property.lineCount,
- property.lineCount,
+ property.lineCount
);
listener.calls.reset();
@@ -259,7 +259,7 @@ describe("DataSources/GridMaterialProperty", function () {
property,
"lineThickness",
property.lineThickness,
- oldValue,
+ oldValue
);
listener.calls.reset();
@@ -268,7 +268,7 @@ describe("DataSources/GridMaterialProperty", function () {
property,
"lineThickness",
property.lineThickness,
- property.lineThickness,
+ property.lineThickness
);
listener.calls.reset();
@@ -278,7 +278,7 @@ describe("DataSources/GridMaterialProperty", function () {
property,
"lineOffset",
property.lineOffset,
- oldValue,
+ oldValue
);
listener.calls.reset();
@@ -287,7 +287,7 @@ describe("DataSources/GridMaterialProperty", function () {
property,
"lineOffset",
property.lineOffset,
- property.lineOffset,
+ property.lineOffset
);
listener.calls.reset();
diff --git a/packages/engine/Specs/DataSources/GroundGeometryUpdaterSpec.js b/packages/engine/Specs/DataSources/GroundGeometryUpdaterSpec.js
index 35c1980dd34a..1b52765079f3 100644
--- a/packages/engine/Specs/DataSources/GroundGeometryUpdaterSpec.js
+++ b/packages/engine/Specs/DataSources/GroundGeometryUpdaterSpec.js
@@ -20,12 +20,12 @@ describe("DataSources/GroundGeometryUpdater", function () {
const height = expected;
let heightReference = HeightReference.NONE;
expect(
- GroundGeometryUpdater.getGeometryHeight(height, heightReference),
+ GroundGeometryUpdater.getGeometryHeight(height, heightReference)
).toEqual(expected);
heightReference = HeightReference.RELATIVE_TO_GROUND;
expect(
- GroundGeometryUpdater.getGeometryHeight(height, heightReference),
+ GroundGeometryUpdater.getGeometryHeight(height, heightReference)
).toEqual(expected);
});
@@ -33,7 +33,7 @@ describe("DataSources/GroundGeometryUpdater", function () {
const height = 50;
const heightReference = HeightReference.CLAMP_TO_GROUND;
expect(
- GroundGeometryUpdater.getGeometryHeight(height, heightReference),
+ GroundGeometryUpdater.getGeometryHeight(height, heightReference)
).toEqual(0);
});
@@ -42,12 +42,12 @@ describe("DataSources/GroundGeometryUpdater", function () {
const height = expected;
let heightReference = HeightReference.NONE;
expect(
- GroundGeometryUpdater.getGeometryExtrudedHeight(height, heightReference),
+ GroundGeometryUpdater.getGeometryExtrudedHeight(height, heightReference)
).toEqual(expected);
heightReference = HeightReference.RELATIVE_TO_GROUND;
expect(
- GroundGeometryUpdater.getGeometryExtrudedHeight(height, heightReference),
+ GroundGeometryUpdater.getGeometryExtrudedHeight(height, heightReference)
).toEqual(expected);
});
@@ -55,7 +55,7 @@ describe("DataSources/GroundGeometryUpdater", function () {
const height = 50;
const heightReference = HeightReference.CLAMP_TO_GROUND;
expect(
- GroundGeometryUpdater.getGeometryExtrudedHeight(height, heightReference),
+ GroundGeometryUpdater.getGeometryExtrudedHeight(height, heightReference)
).toEqual(GroundGeometryUpdater.CLAMP_TO_GROUND);
});
@@ -68,7 +68,7 @@ describe("DataSources/GroundGeometryUpdater", function () {
height,
heightReference,
extrudedHeight,
- extrudedHeightReference,
+ extrudedHeightReference
);
expect(result).toBeUndefined();
@@ -78,7 +78,7 @@ describe("DataSources/GroundGeometryUpdater", function () {
height,
heightReference,
extrudedHeight,
- extrudedHeightReference,
+ extrudedHeightReference
);
expect(result).toBeUndefined();
@@ -88,7 +88,7 @@ describe("DataSources/GroundGeometryUpdater", function () {
height,
heightReference,
extrudedHeight,
- extrudedHeightReference,
+ extrudedHeightReference
);
expect(result).toBeUndefined();
@@ -98,7 +98,7 @@ describe("DataSources/GroundGeometryUpdater", function () {
height,
heightReference,
extrudedHeight,
- extrudedHeightReference,
+ extrudedHeightReference
);
expect(result).toBe(GeometryOffsetAttribute.TOP);
@@ -108,7 +108,7 @@ describe("DataSources/GroundGeometryUpdater", function () {
height,
heightReference,
extrudedHeight,
- extrudedHeightReference,
+ extrudedHeightReference
);
expect(result).toBe(GeometryOffsetAttribute.TOP);
@@ -118,7 +118,7 @@ describe("DataSources/GroundGeometryUpdater", function () {
height,
heightReference,
extrudedHeight,
- extrudedHeightReference,
+ extrudedHeightReference
);
expect(result).toBe(GeometryOffsetAttribute.TOP);
@@ -128,7 +128,7 @@ describe("DataSources/GroundGeometryUpdater", function () {
height,
heightReference,
extrudedHeight,
- extrudedHeightReference,
+ extrudedHeightReference
);
expect(result).toBe(GeometryOffsetAttribute.ALL);
@@ -138,7 +138,7 @@ describe("DataSources/GroundGeometryUpdater", function () {
height,
heightReference,
extrudedHeight,
- extrudedHeightReference,
+ extrudedHeightReference
);
expect(result).toBe(GeometryOffsetAttribute.TOP);
@@ -148,7 +148,7 @@ describe("DataSources/GroundGeometryUpdater", function () {
height,
heightReference,
extrudedHeight,
- extrudedHeightReference,
+ extrudedHeightReference
);
expect(result).toBe(GeometryOffsetAttribute.TOP);
@@ -158,7 +158,7 @@ describe("DataSources/GroundGeometryUpdater", function () {
height,
heightReference,
extrudedHeight,
- extrudedHeightReference,
+ extrudedHeightReference
);
expect(result).toBe(GeometryOffsetAttribute.ALL);
@@ -166,7 +166,7 @@ describe("DataSources/GroundGeometryUpdater", function () {
undefined,
heightReference,
undefined,
- extrudedHeightReference,
+ extrudedHeightReference
);
expect(result).toBeUndefined();
});
diff --git a/packages/engine/Specs/DataSources/ImageMaterialPropertySpec.js b/packages/engine/Specs/DataSources/ImageMaterialPropertySpec.js
index aee441645283..7bd5eeaa214a 100644
--- a/packages/engine/Specs/DataSources/ImageMaterialPropertySpec.js
+++ b/packages/engine/Specs/DataSources/ImageMaterialPropertySpec.js
@@ -61,14 +61,14 @@ describe("DataSources/ImageMaterialProperty", function () {
start: start,
stop: stop,
data: "http://test.invalid/image.png",
- }),
+ })
);
property.repeat.intervals.addInterval(
new TimeInterval({
start: start,
stop: stop,
data: new Cartesian2(2, 3),
- }),
+ })
);
const result = property.getValue(start);
@@ -121,7 +121,7 @@ describe("DataSources/ImageMaterialProperty", function () {
property,
"image",
property.image,
- oldValue,
+ oldValue
);
listener.calls.reset();
@@ -130,7 +130,7 @@ describe("DataSources/ImageMaterialProperty", function () {
property,
"image",
property.image,
- property.image,
+ property.image
);
listener.calls.reset();
@@ -144,7 +144,7 @@ describe("DataSources/ImageMaterialProperty", function () {
property,
"repeat",
property.repeat,
- oldValue,
+ oldValue
);
listener.calls.reset();
@@ -153,7 +153,7 @@ describe("DataSources/ImageMaterialProperty", function () {
property,
"repeat",
property.repeat,
- property.repeat,
+ property.repeat
);
listener.calls.reset();
@@ -177,7 +177,7 @@ describe("DataSources/ImageMaterialProperty", function () {
start: start,
stop: stop,
data: "http://test.invalid/image.png",
- }),
+ })
);
expect(property.isConstant).toBe(false);
@@ -189,7 +189,7 @@ describe("DataSources/ImageMaterialProperty", function () {
start: start,
stop: stop,
data: new Cartesian2(2, 3),
- }),
+ })
);
expect(property.isConstant).toBe(false);
});
diff --git a/packages/engine/Specs/DataSources/KmlDataSourceSpec.js b/packages/engine/Specs/DataSources/KmlDataSourceSpec.js
index ba8b4d048e04..0fe44e005c4b 100644
--- a/packages/engine/Specs/DataSources/KmlDataSourceSpec.js
+++ b/packages/engine/Specs/DataSources/KmlDataSourceSpec.js
@@ -250,7 +250,7 @@ describe("DataSources/KmlDataSource", function () {
return dataSource.load("Data/KML/backslash.kmz").then(function (source) {
expect(source).toBe(dataSource);
expect(
- isDataUri(source.entities.values[0]._billboard._image._value.url),
+ isDataUri(source.entities.values[0]._billboard._image._value.url)
).toBe(true);
});
});
@@ -287,25 +287,25 @@ describe("DataSources/KmlDataSource", function () {
const OrigDeferredLoading = KmlDataSource._DeferredLoading;
let deferredLoading;
- spyOn(KmlDataSource, "_DeferredLoading").and.callFake(
- function (datasource) {
- deferredLoading = new OrigDeferredLoading(datasource);
-
- const process = deferredLoading._process.bind(deferredLoading);
- spyOn(deferredLoading, "_process").and.callFake(function (isFirst) {
- jasmine.clock().tick(1001); // Step over a second everytime, so we only process 1 feature
- return process(isFirst);
- });
-
- const giveUpTime = deferredLoading._giveUpTime.bind(deferredLoading);
- spyOn(deferredLoading, "_giveUpTime").and.callFake(function () {
- giveUpTime();
- jasmine.clock().tick(1); // Fire the setTimeout callback
- });
-
- return deferredLoading;
- },
- );
+ spyOn(KmlDataSource, "_DeferredLoading").and.callFake(function (
+ datasource
+ ) {
+ deferredLoading = new OrigDeferredLoading(datasource);
+
+ const process = deferredLoading._process.bind(deferredLoading);
+ spyOn(deferredLoading, "_process").and.callFake(function (isFirst) {
+ jasmine.clock().tick(1001); // Step over a second everytime, so we only process 1 feature
+ return process(isFirst);
+ });
+
+ const giveUpTime = deferredLoading._giveUpTime.bind(deferredLoading);
+ spyOn(deferredLoading, "_giveUpTime").and.callFake(function () {
+ giveUpTime();
+ jasmine.clock().tick(1); // Fire the setTimeout callback
+ });
+
+ return deferredLoading;
+ });
const dataSource = new KmlDataSource(options);
return dataSource
@@ -364,20 +364,20 @@ describe("DataSources/KmlDataSource", function () {
});
it("load rejects loading non-KML URL", function () {
- return KmlDataSource.load("Data/Images/Blue.png", options).catch(
- function (e) {
- expect(e).toBeInstanceOf(RuntimeError);
- },
- );
+ return KmlDataSource.load("Data/Images/Blue.png", options).catch(function (
+ e
+ ) {
+ expect(e).toBeInstanceOf(RuntimeError);
+ });
});
it("load rejects valid KMZ zip URL with no KML contained", function () {
- return KmlDataSource.load("Data/KML/empty.kmz", options).catch(
- function (e) {
- expect(e).toBeInstanceOf(RuntimeError);
- expect(e.message).toEqual("KMZ file does not contain a KML document.");
- },
- );
+ return KmlDataSource.load("Data/KML/empty.kmz", options).catch(function (
+ e
+ ) {
+ expect(e).toBeInstanceOf(RuntimeError);
+ expect(e.message).toEqual("KMZ file does not contain a KML document.");
+ });
});
it("if load contains tag with no image included, no image is added", function () {
@@ -391,7 +391,7 @@ describe("DataSources/KmlDataSource", function () {
expect(source.entities.values.length).toEqual(1);
expect(source.entities._entities._array.length).toEqual(1);
expect(
- source.entities._entities._array[0]._billboard._image,
+ source.entities._entities._array[0]._billboard._image
).toBeUndefined();
});
});
@@ -407,7 +407,7 @@ describe("DataSources/KmlDataSource", function () {
expect(source.entities.values.length).toEqual(1);
expect(source.entities._entities._array.length).toEqual(1);
expect(
- source.entities._entities._array[0]._billboard._image._value,
+ source.entities._entities._array[0]._billboard._image._value
).toEqual(dataSource._pinBuilder.fromColor(Color.YELLOW, 64));
});
});
@@ -423,7 +423,7 @@ describe("DataSources/KmlDataSource", function () {
expect(source.entities.values.length).toEqual(1);
expect(source.entities._entities._array.length).toEqual(1);
expect(
- source.entities._entities._array[0]._billboard._image._value,
+ source.entities._entities._array[0]._billboard._image._value
).toEqual(dataSource._pinBuilder.fromColor(Color.YELLOW, 64));
});
});
@@ -583,7 +583,7 @@ describe("DataSources/KmlDataSource", function () {
expect(clock.clockRange).toEqual(ClockRange.LOOP_STOP);
expect(clock.clockStep).toEqual(ClockStep.SYSTEM_CLOCK_MULTIPLIER);
expect(clock.multiplier).toEqual(
- JulianDate.secondsDifference(endDate, beginDate) / 60,
+ JulianDate.secondsDifference(endDate, beginDate) / 60
);
return dataSource;
})
@@ -599,7 +599,7 @@ describe("DataSources/KmlDataSource", function () {
return dataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
);
})
.then(function (dataSource) {
@@ -615,7 +615,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.id).toBe("Bob");
@@ -635,7 +635,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities[0].id).toBe("Bob");
@@ -652,7 +652,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.name).toBe("bob");
@@ -670,7 +670,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.kml.address).toBe("1826 South 16th Street");
@@ -686,7 +686,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.kml.phoneNumber).toBe("555-555-5555");
@@ -702,7 +702,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.kml.snippet).toBe("Hey!");
@@ -723,7 +723,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.kml).toBeDefined();
@@ -750,7 +750,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.kml).toBeDefined();
@@ -779,7 +779,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.availability).toBeDefined();
@@ -803,7 +803,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.availability).toBeDefined();
@@ -822,7 +822,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.availability).toBeUndefined();
@@ -842,7 +842,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.availability).toBeDefined();
@@ -864,7 +864,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.availability).toBeDefined();
@@ -886,7 +886,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.availability).toBeDefined();
@@ -904,7 +904,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.show).toBe(false);
@@ -921,7 +921,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.availability).toBeUndefined();
@@ -939,7 +939,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.availability).toBeUndefined();
@@ -966,7 +966,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.kml.extendedData).toBeDefined();
@@ -993,7 +993,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.name).toBeUndefined();
@@ -1018,12 +1018,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.rectangle.material).toBeInstanceOf(ImageMaterialProperty);
expect(entity.rectangle.material.image.getValue().url).toEqual(
- "http://test.invalid/image.png",
+ "http://test.invalid/image.png"
);
});
});
@@ -1040,15 +1040,15 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.rectangle.material).toBeInstanceOf(ImageMaterialProperty);
expect(entity.rectangle.material.image.getValue().url).toEqual(
- "http://test.invalid/image.png",
+ "http://test.invalid/image.png"
);
expect(entity.rectangle.material.color.getValue()).toEqual(
- new Color(1.0, 0.0, 0.0, 127 / 255),
+ new Color(1.0, 0.0, 0.0, 127 / 255)
);
});
});
@@ -1063,7 +1063,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.rectangle.material).toBeInstanceOf(ColorMaterialProperty);
@@ -1087,13 +1087,13 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.polygon).toBeUndefined();
expect(entity.rectangle.coordinates.getValue()).toEqualEpsilon(
Rectangle.fromDegrees(3, 1, 4, 2),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(entity.rectangle.rotation.getValue()).toEqual(Math.PI / 4);
expect(entity.rectangle.stRotation.getValue()).toEqual(Math.PI / 4);
@@ -1115,12 +1115,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.polygon).toBeUndefined();
expect(entity.rectangle.coordinates.getValue()).toEqual(
- Rectangle.fromDegrees(-180, -90, 180, 90),
+ Rectangle.fromDegrees(-180, -90, 180, 90)
);
});
});
@@ -1139,12 +1139,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.polygon).toBeUndefined();
expect(entity.rectangle.coordinates.getValue()).toEqual(
- Rectangle.fromDegrees(-180, -90, 180, 90),
+ Rectangle.fromDegrees(-180, -90, 180, 90)
);
});
});
@@ -1163,13 +1163,13 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.rectangle).toBeUndefined();
expect(entity.polygon.hierarchy.getValue().positions).toEqualEpsilon(
Cartesian3.fromDegreesArray([1, 2, 3, 4, 5, 6, 7, 8]),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
});
@@ -1191,12 +1191,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.polygon.material).toBeInstanceOf(ImageMaterialProperty);
expect(entity.polygon.material.image.getValue().url).toEqual(
- "http://test.invalid/image.png",
+ "http://test.invalid/image.png"
);
});
});
@@ -1216,7 +1216,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.polygon.zIndex.getValue()).toEqual(3);
@@ -1233,7 +1233,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.rectangle.height.getValue()).toEqual(23);
@@ -1254,7 +1254,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(screenOverlayContainer.children.length).toEqual(1);
const child = screenOverlayContainer.children[0];
@@ -1267,7 +1267,7 @@ describe("DataSources/KmlDataSource", function () {
expect(child.style.height).toEqual("");
expect(child.style.top).toEqual("");
expect(["calc(100% + 0px)", "calc(100% - 0px)"]).toContain(
- child.style.bottom,
+ child.style.bottom
);
expect(child.style.right).toEqual("");
expect(["calc(0% + 0px)", "calc(0% - 0px)"]).toContain(child.style.left);
@@ -1300,16 +1300,16 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(screenOverlayContainer.children.length).toEqual(2);
expect(screenOverlayContainer.children[0].tagName).toEqual("IMG");
expect(screenOverlayContainer.children[0].getAttribute("src")).toEqual(
- "http://invalid.url/first",
+ "http://invalid.url/first"
);
expect(screenOverlayContainer.children[1].tagName).toEqual("IMG");
expect(screenOverlayContainer.children[1].getAttribute("src")).toEqual(
- "http://invalid.url/second",
+ "http://invalid.url/second"
);
dataSource.destroy();
@@ -1330,7 +1330,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(screenOverlayContainer.children.length).toEqual(1);
const child = screenOverlayContainer.children[0];
@@ -1364,7 +1364,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(screenOverlayContainer.children.length).toEqual(1);
const child = screenOverlayContainer.children[0];
@@ -1398,7 +1398,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(screenOverlayContainer.children.length).toEqual(1);
const child = screenOverlayContainer.children[0];
@@ -1432,7 +1432,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(screenOverlayContainer.children.length).toEqual(1);
dataSource.destroy();
@@ -1456,7 +1456,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
@@ -1480,7 +1480,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
@@ -1497,7 +1497,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities[0].billboard.scale.getValue()).toEqual(3.0);
@@ -1513,7 +1513,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities[0].billboard.scale.getValue()).toEqual(3.0);
@@ -1545,7 +1545,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
@@ -1573,10 +1573,9 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
- const generatedColor =
- dataSource.entities.values[0].billboard.color.getValue();
+ const generatedColor = dataSource.entities.values[0].billboard.color.getValue();
expect(generatedColor.red).toBeLessThan(1.0);
expect(generatedColor.green).toBeLessThan(1.0);
expect(generatedColor.blue).toBeLessThan(1.0);
@@ -1600,10 +1599,9 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
- const generatedColor =
- dataSource.entities.values[0].billboard.color.getValue();
+ const generatedColor = dataSource.entities.values[0].billboard.color.getValue();
expect(generatedColor.red).toEqual(0);
expect(generatedColor.green).toEqual(0);
expect(generatedColor.blue).toEqual(0);
@@ -1626,7 +1624,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(dataSource.entities.values[0].billboard.color).toBeUndefined();
});
@@ -1647,7 +1645,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
@@ -1682,7 +1680,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
@@ -1718,7 +1716,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.polyline.material).toBeInstanceOf(ColorMaterialProperty);
@@ -1748,7 +1746,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
@@ -1787,7 +1785,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
@@ -1818,7 +1816,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
@@ -1861,7 +1859,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
@@ -1906,7 +1904,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
@@ -1951,7 +1949,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
@@ -1998,7 +1996,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.billboard.scale.getValue()).toBe(2.0);
@@ -2026,7 +2024,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.billboard.scale.getValue()).toBe(2.0);
@@ -2055,7 +2053,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.billboard.scale.getValue()).toBe(2.0);
@@ -2084,7 +2082,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.billboard.scale.getValue()).toBe(2.0);
@@ -2103,7 +2101,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities[0].billboard).toBeDefined();
@@ -2125,12 +2123,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
const billboard = entities[0].billboard;
expect(billboard.image.getValue().url).toEqual(
- "http://test.invalid/image.png",
+ "http://test.invalid/image.png"
);
});
});
@@ -2150,12 +2148,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
const billboard = entities[0].billboard;
expect(billboard.image.getValue().url).toEqual(
- "https://maps.google.com/mapfiles/kml/pal3/icon56.png",
+ "https://maps.google.com/mapfiles/kml/pal3/icon56.png"
);
});
});
@@ -2179,19 +2177,19 @@ describe("DataSources/KmlDataSource", function () {
const entities = dataSource.entities.values;
const billboard = entities[0].billboard;
expect(billboard.image.getValue().url).toEqual(
- "http://test.invalid/image.png",
+ "http://test.invalid/image.png"
);
});
});
it("IconStyle: Sets billboard image inside KMZ", function () {
- return KmlDataSource.load("Data/KML/simple.kmz", options).then(
- function (dataSource) {
- const entities = dataSource.entities.values;
- const billboard = entities[0].billboard;
- expect(billboard.image.getValue().url).toEqual(image);
- },
- );
+ return KmlDataSource.load("Data/KML/simple.kmz", options).then(function (
+ dataSource
+ ) {
+ const entities = dataSource.entities.values;
+ const billboard = entities[0].billboard;
+ expect(billboard.image.getValue().url).toEqual(image);
+ });
});
it("IconStyle: Sets billboard image with subregion", function () {
@@ -2218,12 +2216,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const billboard = dataSource.entities.values[0].billboard;
expect(billboard.image.getValue().url).toEqual(expectedIconHref);
expect(billboard.imageSubRegion.getValue()).toEqual(
- new BoundingRectangle(49, 43, 18, 18),
+ new BoundingRectangle(49, 43, 18, 18)
);
});
});
@@ -2241,7 +2239,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const billboard = dataSource.entities.values[0].billboard;
expect(billboard.pixelOffset.getValue()).toEqual(new Cartesian2(8, 8));
@@ -2261,7 +2259,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const billboard = dataSource.entities.values[0].billboard;
expect(billboard.pixelOffset.getValue()).toEqual(new Cartesian2(15, -14));
@@ -2281,7 +2279,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const billboard = dataSource.entities.values[0].billboard;
expect(billboard.pixelOffset.getValue()).toEqual(new Cartesian2(-15, 14));
@@ -2302,7 +2300,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities[0].billboard.color.getValue()).toEqual(color);
@@ -2322,7 +2320,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities[0].billboard.scale.getValue()).toEqual(2.2);
@@ -2342,14 +2340,14 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities[0].billboard.rotation.getValue()).toEqual(
- CesiumMath.toRadians(-4),
+ CesiumMath.toRadians(-4)
);
expect(entities[0].billboard.alignedAxis.getValue()).toEqual(
- Cartesian3.UNIT_Z,
+ Cartesian3.UNIT_Z
);
});
});
@@ -2379,7 +2377,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
@@ -2391,7 +2389,7 @@ describe("DataSources/KmlDataSource", function () {
expect(div.style["background-color"]).toEqual("rgba(102, 68, 34, 0)");
expect(div.style.color).toEqual("rgba(0, 34, 68, 0.4)");
expect(div.textContent).toEqual(
- "The Name The Description The Address The Snippet The ID The Property The Value $[prop2/displayName] $[prop2]",
+ "The Name The Description The Address The Snippet The ID The Property The Value $[prop2/displayName] $[prop2]"
);
});
});
@@ -2409,7 +2407,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
@@ -2430,7 +2428,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
@@ -2465,7 +2463,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
@@ -2505,7 +2503,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.description).toBeUndefined();
@@ -2521,7 +2519,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
@@ -2565,7 +2563,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
@@ -2589,7 +2587,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
@@ -2602,27 +2600,27 @@ describe("DataSources/KmlDataSource", function () {
});
it("BalloonStyle: description is rewritten for embedded kmz links and images", function () {
- return KmlDataSource.load("Data/KML/simple.kmz", options).then(
- function (dataSource) {
- const entity = dataSource.entities.values[0];
- const description = entity.description.getValue();
- const div = document.createElement("div");
- div.innerHTML = description;
-
- expect(div.textContent).toEqual("image.png image.png");
- const children = div.firstChild.querySelectorAll("*");
- expect(children.length).toEqual(2);
-
- const link = children[0];
- expect(link.localName).toEqual("a");
- expect(link.getAttribute("href")).toEqual(image);
- expect(link.getAttribute("download")).toEqual("image.png");
-
- const img = children[1];
- expect(img.localName).toEqual("img");
- expect(img.src).toEqual(image);
- },
- );
+ return KmlDataSource.load("Data/KML/simple.kmz", options).then(function (
+ dataSource
+ ) {
+ const entity = dataSource.entities.values[0];
+ const description = entity.description.getValue();
+ const div = document.createElement("div");
+ div.innerHTML = description;
+
+ expect(div.textContent).toEqual("image.png image.png");
+ const children = div.firstChild.querySelectorAll("*");
+ expect(children.length).toEqual(2);
+
+ const link = children[0];
+ expect(link.localName).toEqual("a");
+ expect(link.getAttribute("href")).toEqual(image);
+ expect(link.getAttribute("download")).toEqual("image.png");
+
+ const img = children[1];
+ expect(img.localName).toEqual("img");
+ expect(img.src).toEqual(image);
+ });
});
it("LabelStyle: Sets defaults", function () {
@@ -2637,7 +2635,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
const label = entities[0].label;
@@ -2668,7 +2666,7 @@ describe("DataSources/KmlDataSource", function () {
expect(label.horizontalOrigin.getValue()).toEqual(HorizontalOrigin.LEFT);
expect(label.pixelOffset.getValue()).toEqual(new Cartesian2(17, 0));
expect(label.translucencyByDistance.getValue()).toEqual(
- new NearFarScalar(3000000, 1.0, 5000000, 0.0),
+ new NearFarScalar(3000000, 1.0, 5000000, 0.0)
);
});
});
@@ -2687,7 +2685,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities[0].label.fillColor.getValue()).toEqual(color);
@@ -2709,11 +2707,11 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities[0].label.pixelOffset.getValue()).toEqual(
- new Cartesian2(33, 0),
+ new Cartesian2(33, 0)
);
});
});
@@ -2731,11 +2729,11 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities[0].label.pixelOffset.getValue()).toEqual(
- new Cartesian3(3 * 16 + 1, 0),
+ new Cartesian3(3 * 16 + 1, 0)
);
});
});
@@ -2753,7 +2751,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities[0].label.pixelOffset).toBeUndefined();
@@ -2773,7 +2771,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
const polyline = entities[0].polyline;
@@ -2802,7 +2800,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
const polyline = entities[0].polyline;
@@ -2824,7 +2822,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
const polyline = entities[0].polyline;
@@ -2844,7 +2842,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
const polygon = entities[0].polygon;
@@ -2880,7 +2878,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
const polygon = entities[0].polygon;
@@ -2902,7 +2900,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
const polygon = entities[0].polygon;
@@ -2923,7 +2921,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
const polygon = entities[0].polygon;
@@ -2941,7 +2939,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities;
const folder = entities.getById("parent");
@@ -2967,7 +2965,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const start = JulianDate.fromIso8601("2000-01-01");
const stop = JulianDate.fromIso8601("2000-01-03");
@@ -3000,7 +2998,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const startFolder = JulianDate.fromIso8601("2000-01-01");
const stopFolder = JulianDate.fromIso8601("2000-01-04");
@@ -3032,7 +3030,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const start = JulianDate.fromIso8601("2000-01-03");
@@ -3063,7 +3061,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const startFolder = JulianDate.fromIso8601("2000-01-03");
const startFeature = JulianDate.fromIso8601("2000-01-04");
@@ -3091,12 +3089,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
expect(entities[0].position.getValue(Iso8601.MINIMUM_VALUE)).toEqual(
- Cartesian3.fromDegrees(0, 0, 0),
+ Cartesian3.fromDegrees(0, 0, 0)
);
expect(entities[0].polyline).toBeUndefined();
});
@@ -3114,12 +3112,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
expect(entities[0].position.getValue(Iso8601.MINIMUM_VALUE)).toEqual(
- Cartesian3.fromDegrees(1, 2, 3),
+ Cartesian3.fromDegrees(1, 2, 3)
);
expect(entities[0].polyline).toBeUndefined();
});
@@ -3136,12 +3134,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
expect(entities[0].position.getValue(Iso8601.MINIMUM_VALUE)).toEqual(
- Cartesian3.fromDegrees(0, 0, 0),
+ Cartesian3.fromDegrees(0, 0, 0)
);
expect(entities[0].polyline).toBeUndefined();
});
@@ -3162,7 +3160,7 @@ describe("DataSources/KmlDataSource", function () {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
expect(
- entities[0].billboard.heightReference.getValue(Iso8601.MINIMUM_VALUE),
+ entities[0].billboard.heightReference.getValue(Iso8601.MINIMUM_VALUE)
).toEqual(HeightReference.CLAMP_TO_GROUND);
expect(entities[0].polyline).toBeUndefined();
});
@@ -3180,12 +3178,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
expect(entities[0].position.getValue(Iso8601.MINIMUM_VALUE)).toEqual(
- Cartesian3.fromDegrees(1, 2, 3),
+ Cartesian3.fromDegrees(1, 2, 3)
);
expect(entities[0].billboard.pixelOffset).toBeUndefined();
expect(entities[0].polyline).toBeUndefined();
@@ -3204,12 +3202,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
expect(entities[0].position.getValue(Iso8601.MINIMUM_VALUE)).toEqual(
- Cartesian3.fromDegrees(1, 2, 3),
+ Cartesian3.fromDegrees(1, 2, 3)
);
expect(entities[0].billboard.pixelOffset).toBeUndefined();
expect(entities[0].polyline).toBeUndefined();
@@ -3229,12 +3227,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
expect(entities[0].position.getValue(Iso8601.MINIMUM_VALUE)).toEqual(
- Cartesian3.fromDegrees(1, 2, 0),
+ Cartesian3.fromDegrees(1, 2, 0)
);
expect(entities[0].billboard.pixelOffset).toBeUndefined();
expect(entities[0].polyline).toBeUndefined();
@@ -3255,12 +3253,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
expect(entities[0].position.getValue(Iso8601.MINIMUM_VALUE)).toEqual(
- Cartesian3.fromDegrees(1, 2),
+ Cartesian3.fromDegrees(1, 2)
);
expect(entities[0].polyline).toBeUndefined();
});
@@ -3279,21 +3277,21 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
expect(entities[0].position.getValue(Iso8601.MINIMUM_VALUE)).toEqual(
- Cartesian3.fromDegrees(1, 2, 3),
+ Cartesian3.fromDegrees(1, 2, 3)
);
expect(entities[0].polyline).toBeDefined();
const positions = entities[0].polyline.positions.getValue(
- Iso8601.MINIMUM_VALUE,
+ Iso8601.MINIMUM_VALUE
);
expect(positions).toEqualEpsilon(
[Cartesian3.fromDegrees(1, 2, 3), Cartesian3.fromDegrees(1, 2, 0)],
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
});
});
@@ -3312,21 +3310,21 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
expect(entities[0].position.getValue(Iso8601.MINIMUM_VALUE)).toEqual(
- Cartesian3.fromDegrees(1, 2, 3),
+ Cartesian3.fromDegrees(1, 2, 3)
);
expect(entities[0].polyline).toBeDefined();
const positions = entities[0].polyline.positions.getValue(
- Iso8601.MINIMUM_VALUE,
+ Iso8601.MINIMUM_VALUE
);
expect(positions).toEqualEpsilon(
[Cartesian3.fromDegrees(1, 2, 3), Cartesian3.fromDegrees(1, 2, 0)],
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
});
});
@@ -3344,21 +3342,21 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
expect(entities[0].position.getValue(Iso8601.MINIMUM_VALUE)).toEqual(
- Cartesian3.fromDegrees(1, 2, 3),
+ Cartesian3.fromDegrees(1, 2, 3)
);
expect(entities[0].polyline).toBeDefined();
const positions = entities[0].polyline.positions.getValue(
- Iso8601.MINIMUM_VALUE,
+ Iso8601.MINIMUM_VALUE
);
expect(positions).toEqualEpsilon(
[Cartesian3.fromDegrees(1, 2, 3), Cartesian3.fromDegrees(1, 2, 0)],
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
});
});
@@ -3374,15 +3372,15 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
expect(
- entities[0].position.getValue(Iso8601.MINIMUM_VALUE),
+ entities[0].position.getValue(Iso8601.MINIMUM_VALUE)
).toEqualEpsilon(
new Cartesian3(213935.5635247161, 95566.36983235707, 6352461.425213023),
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
});
});
@@ -3399,15 +3397,15 @@ describe("DataSources/KmlDataSource", function () {
const moonOptions = combine(options, { ellipsoid: Ellipsoid.MOON });
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- moonOptions,
+ moonOptions
).then(function (moonDataSource) {
const entities = moonDataSource.entities.values;
expect(entities.length).toEqual(1);
expect(
- entities[0].position.getValue(Iso8601.MINIMUM_VALUE),
+ entities[0].position.getValue(Iso8601.MINIMUM_VALUE)
).toEqualEpsilon(
new Cartesian3(58080.7702560248, 25945.04756005268, 1736235.0758562544),
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
});
});
@@ -3428,7 +3426,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.polygon.hierarchy).toBeUndefined();
@@ -3454,7 +3452,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
const coordinates = [
@@ -3463,7 +3461,7 @@ describe("DataSources/KmlDataSource", function () {
Cartesian3.fromDegrees(7, 8, 9),
];
expect(entity.polygon.hierarchy.getValue().positions).toEqual(
- coordinates,
+ coordinates
);
});
});
@@ -3505,7 +3503,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
const coordinates = [
@@ -3548,7 +3546,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.polygon.perPositionHeight.getValue()).toEqual(true);
@@ -3568,7 +3566,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.polygon.perPositionHeight.getValue()).toEqual(true);
@@ -3589,7 +3587,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.polygon.perPositionHeight).toBeUndefined();
@@ -3610,7 +3608,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.polygon.perPositionHeight.getValue()).toEqual(true);
@@ -3631,7 +3629,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.polygon.perPositionHeight).toBeUndefined();
@@ -3660,13 +3658,13 @@ describe("DataSources/KmlDataSource", function () {
const moonOptions = combine(options, { ellipsoid: Ellipsoid.MOON });
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- moonOptions,
+ moonOptions
).then(function (moonDataSource) {
const entity = moonDataSource.entities.values[0];
const moonPoint = entity.polygon.hierarchy.getValue().positions[0];
expect(moonPoint).toEqualEpsilon(
new Cartesian3(58080.7702560248, 25945.04756005268, 1736235.0758562544),
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
});
});
@@ -3691,13 +3689,13 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
const earthPoint = entity.polygon.hierarchy.getValue().positions[0];
expect(earthPoint).toEqualEpsilon(
new Cartesian3(213935.5635247161, 95566.36983235707, 6352461.425213023),
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
});
});
@@ -3712,7 +3710,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
@@ -3737,7 +3735,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
@@ -3747,11 +3745,11 @@ describe("DataSources/KmlDataSource", function () {
expect(entity.polyline).toBeDefined();
const positions = entity.polyline.positions.getValue(
- Iso8601.MINIMUM_VALUE,
+ Iso8601.MINIMUM_VALUE
);
expect(positions).toEqualEpsilon(
[Cartesian3.fromDegrees(1, 2), Cartesian3.fromDegrees(4, 5)],
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(entity.polyline.arcType.getValue()).toEqual(ArcType.NONE);
});
@@ -3772,7 +3770,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
@@ -3784,7 +3782,7 @@ describe("DataSources/KmlDataSource", function () {
const positions = entity.wall.positions.getValue(Iso8601.MINIMUM_VALUE);
expect(positions).toEqualEpsilon(
[Cartesian3.fromDegrees(1, 2, 3), Cartesian3.fromDegrees(4, 5, 6)],
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
});
@@ -3803,7 +3801,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
@@ -3811,11 +3809,11 @@ describe("DataSources/KmlDataSource", function () {
const entity = entities[0];
expect(entity.polyline.arcType).toBeUndefined();
const positions = entity.polyline.positions.getValue(
- Iso8601.MINIMUM_VALUE,
+ Iso8601.MINIMUM_VALUE
);
expect(positions).toEqualEpsilon(
[Cartesian3.fromDegrees(1, 2), Cartesian3.fromDegrees(4, 5)],
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
});
@@ -3835,7 +3833,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
@@ -3843,11 +3841,11 @@ describe("DataSources/KmlDataSource", function () {
const entity = entities[0];
expect(entity.polyline.arcType).toBeUndefined();
const positions = entity.polyline.positions.getValue(
- Iso8601.MINIMUM_VALUE,
+ Iso8601.MINIMUM_VALUE
);
expect(positions).toEqualEpsilon(
[Cartesian3.fromDegrees(1, 2), Cartesian3.fromDegrees(4, 5)],
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
});
@@ -3867,7 +3865,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
@@ -3878,7 +3876,7 @@ describe("DataSources/KmlDataSource", function () {
const positions = entity.wall.positions.getValue(Iso8601.MINIMUM_VALUE);
expect(positions).toEqualEpsilon(
[Cartesian3.fromDegrees(1, 2, 3), Cartesian3.fromDegrees(4, 5, 6)],
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
});
@@ -3897,7 +3895,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
@@ -3908,7 +3906,7 @@ describe("DataSources/KmlDataSource", function () {
const positions = entity.wall.positions.getValue(Iso8601.MINIMUM_VALUE);
expect(positions).toEqualEpsilon(
[Cartesian3.fromDegrees(1, 2, 3), Cartesian3.fromDegrees(4, 5, 6)],
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
});
@@ -3927,7 +3925,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(1);
@@ -3938,7 +3936,7 @@ describe("DataSources/KmlDataSource", function () {
const positions = entity.wall.positions.getValue(Iso8601.MINIMUM_VALUE);
expect(positions).toEqualEpsilon(
[Cartesian3.fromDegrees(1, 2, 3), Cartesian3.fromDegrees(4, 5, 6)],
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
});
@@ -3968,24 +3966,24 @@ describe("DataSources/KmlDataSource", function () {
const entity = dataSource.entities.values[0];
expect(entity.position.getValue(time1)).toEqualEpsilon(
Cartesian3.fromDegrees(1, 2, 3),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.position.getValue(time2)).toEqualEpsilon(
Cartesian3.fromDegrees(4, 5, 6),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.position.getValue(time3)).toEqualEpsilon(
Cartesian3.fromDegrees(7, 8, 9),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.billboard.heightReference.getValue(time1)).toEqual(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
expect(entity.billboard.heightReference.getValue(time2)).toEqual(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
expect(entity.billboard.heightReference.getValue(time3)).toEqual(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
expect(entity.polyline).toBeUndefined();
@@ -4021,24 +4019,24 @@ describe("DataSources/KmlDataSource", function () {
const entity = dataSource.entities.values[0];
expect(entity.position.getValue(time1)).toEqualEpsilon(
Cartesian3.fromDegrees(1, 2, 3),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.position.getValue(time2)).toEqualEpsilon(
Cartesian3.fromDegrees(4, 5, 6),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.position.getValue(time3)).toEqualEpsilon(
Cartesian3.fromDegrees(7, 8, 9),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.billboard.heightReference.getValue(time1)).toEqual(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
expect(entity.billboard.heightReference.getValue(time2)).toEqual(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
expect(entity.billboard.heightReference.getValue(time3)).toEqual(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
expect(entity.polyline).toBeUndefined();
});
@@ -4063,7 +4061,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const time1 = JulianDate.fromIso8601("2000-01-01T00:00:00Z");
const time2 = JulianDate.fromIso8601("2000-01-01T00:00:01Z");
@@ -4072,28 +4070,28 @@ describe("DataSources/KmlDataSource", function () {
const entity = dataSource.entities.values[0];
expect(entity.position.getValue(time1)).toEqualEpsilon(
Cartesian3.fromDegrees(1, 2, 3),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.position.getValue(time2)).toEqualEpsilon(
Cartesian3.fromDegrees(4, 5, 6),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.position.getValue(time3)).toEqualEpsilon(
Cartesian3.fromDegrees(7, 8, 9),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.polyline.positions.getValue(time1)).toEqualEpsilon(
[Cartesian3.fromDegrees(1, 2, 3), Cartesian3.fromDegrees(1, 2)],
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.polyline.positions.getValue(time2)).toEqualEpsilon(
[Cartesian3.fromDegrees(4, 5, 6), Cartesian3.fromDegrees(4, 5)],
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.polyline.positions.getValue(time3)).toEqualEpsilon(
[Cartesian3.fromDegrees(7, 8, 9), Cartesian3.fromDegrees(7, 8)],
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
});
@@ -4117,7 +4115,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const time1 = JulianDate.fromIso8601("2000-01-01T00:00:00Z");
const time2 = JulianDate.fromIso8601("2000-01-01T00:00:01Z");
@@ -4126,28 +4124,28 @@ describe("DataSources/KmlDataSource", function () {
const entity = dataSource.entities.values[0];
expect(entity.position.getValue(time1)).toEqualEpsilon(
Cartesian3.fromDegrees(1, 2, 3),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.position.getValue(time2)).toEqualEpsilon(
Cartesian3.fromDegrees(4, 5, 6),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.position.getValue(time3)).toEqualEpsilon(
Cartesian3.fromDegrees(7, 8, 9),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.polyline.positions.getValue(time1)).toEqualEpsilon(
[Cartesian3.fromDegrees(1, 2, 3), Cartesian3.fromDegrees(1, 2)],
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.polyline.positions.getValue(time2)).toEqualEpsilon(
[Cartesian3.fromDegrees(4, 5, 6), Cartesian3.fromDegrees(4, 5)],
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.polyline.positions.getValue(time3)).toEqualEpsilon(
[Cartesian3.fromDegrees(7, 8, 9), Cartesian3.fromDegrees(7, 8)],
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
});
@@ -4176,23 +4174,23 @@ describe("DataSources/KmlDataSource", function () {
const entity = dataSource.entities.values[0];
expect(entity.position.getValue(time1)).toEqualEpsilon(
Cartesian3.fromDegrees(1, 2, 3),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.position.getValue(time2)).toEqualEpsilon(
Cartesian3.fromDegrees(4, 5, 6),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.position.getValue(time3)).toBeUndefined();
// heightReference should be constant so its available all the time
expect(entity.billboard.heightReference.getValue(time1)).toEqual(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
expect(entity.billboard.heightReference.getValue(time2)).toEqual(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
expect(entity.billboard.heightReference.getValue(time3)).toEqual(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
expect(entity.availability.start).toEqual(time1);
@@ -4223,7 +4221,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const time1 = JulianDate.fromIso8601("2000-01-01T00:00:00Z");
const time2 = JulianDate.fromIso8601("2000-01-01T00:00:01Z");
@@ -4239,19 +4237,19 @@ describe("DataSources/KmlDataSource", function () {
expect(entity.position.getValue(time1)).toEqualEpsilon(
Cartesian3.fromDegrees(1, 2),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.position.getValue(time2)).toEqualEpsilon(
Cartesian3.fromDegrees(4, 5),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.position.getValue(time3)).toEqualEpsilon(
Cartesian3.fromDegrees(6, 5),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.position.getValue(time4)).toEqualEpsilon(
Cartesian3.fromDegrees(3, 2),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
});
@@ -4280,7 +4278,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const time1 = JulianDate.fromIso8601("2000-01-01T00:00:00Z");
const time2 = JulianDate.fromIso8601("2000-01-01T00:00:01Z");
@@ -4294,19 +4292,19 @@ describe("DataSources/KmlDataSource", function () {
expect(entity.position.getValue(time1)).toEqualEpsilon(
Cartesian3.fromDegrees(1, 2),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.position.getValue(time2)).toEqualEpsilon(
Cartesian3.fromDegrees(4, 5),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.position.getValue(time3)).toEqualEpsilon(
Cartesian3.fromDegrees(6, 5),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(entity.position.getValue(time4)).toEqualEpsilon(
Cartesian3.fromDegrees(3, 2),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
});
@@ -4339,7 +4337,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const time1 = JulianDate.fromIso8601("2000-01-01T00:00:00Z");
const time2 = JulianDate.fromIso8601("2000-01-01T00:00:01Z");
@@ -4352,16 +4350,16 @@ describe("DataSources/KmlDataSource", function () {
expect(entity.availability.get(0).stop).toEqual(time4);
expect(entity.position.getValue(time1)).toEqual(
- Cartesian3.fromDegrees(1, 2, 3),
+ Cartesian3.fromDegrees(1, 2, 3)
);
expect(entity.position.getValue(time2)).toEqual(
- Cartesian3.fromDegrees(4, 5, 6),
+ Cartesian3.fromDegrees(4, 5, 6)
);
expect(entity.position.getValue(time3)).toEqual(
- Cartesian3.fromDegrees(6, 5, 4),
+ Cartesian3.fromDegrees(6, 5, 4)
);
expect(entity.position.getValue(time4)).toEqual(
- Cartesian3.fromDegrees(3, 2, 1),
+ Cartesian3.fromDegrees(3, 2, 1)
);
});
});
@@ -4384,7 +4382,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities;
expect(entities.values.length).toEqual(3);
@@ -4400,7 +4398,7 @@ describe("DataSources/KmlDataSource", function () {
expect(point1.kml).toBe(multi.kml);
expect(point1.position.getValue(Iso8601.MINIMUM_VALUE)).toEqualEpsilon(
Cartesian3.fromDegrees(1, 2),
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
const point2 = entities.getById("testIDpoint2");
@@ -4411,7 +4409,7 @@ describe("DataSources/KmlDataSource", function () {
expect(point2.kml).toBe(multi.kml);
expect(point2.position.getValue(Iso8601.MINIMUM_VALUE)).toEqualEpsilon(
Cartesian3.fromDegrees(3, 4),
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
});
});
@@ -4423,7 +4421,7 @@ describe("DataSources/KmlDataSource", function () {
expect(entities.length).toEqual(2);
expect(entities[0].id).toEqual("link");
expect(entities[1].parent).toBe(entities[0]);
- },
+ }
);
});
@@ -4440,7 +4438,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(3);
@@ -4486,7 +4484,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(3);
@@ -4536,7 +4534,7 @@ describe("DataSources/KmlDataSource", function () {
canvas: uberCanvas,
camera: uberCamera,
options: options,
- }),
+ })
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(3);
@@ -4559,7 +4557,7 @@ describe("DataSources/KmlDataSource", function () {
}).then(function () {
expect(spy).toHaveBeenCalledWith(
dataSource,
- `${expectedRefreshLinkHref}?BBOX=-180%2C-90%2C180%2C90`,
+ `${expectedRefreshLinkHref}?BBOX=-180%2C-90%2C180%2C90`
);
expect(entities.length).toEqual(3);
@@ -4586,20 +4584,18 @@ describe("DataSources/KmlDataSource", function () {
';
const requestNetworkLink = defer();
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- requestNetworkLink.resolve(url);
- deferred.reject();
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ requestNetworkLink.resolve(url);
+ deferred.reject();
+ });
KmlDataSource.load(parser.parseFromString(kml, "text/xml"), options);
@@ -4618,20 +4614,18 @@ describe("DataSources/KmlDataSource", function () {
';
const requestNetworkLink = defer();
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- requestNetworkLink.resolve(url);
- deferred.reject();
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ requestNetworkLink.resolve(url);
+ deferred.reject();
+ });
KmlDataSource.load(parser.parseFromString(kml, "text/xml"), options);
@@ -4651,26 +4645,24 @@ describe("DataSources/KmlDataSource", function () {
';
const requestNetworkLink = defer();
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- requestNetworkLink.resolve(url);
- deferred.reject();
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ requestNetworkLink.resolve(url);
+ deferred.reject();
+ });
KmlDataSource.load(parser.parseFromString(kml, "text/xml"), options);
return requestNetworkLink.promise.then(function (url) {
expect(url).toEqual(
- `${expectedRefreshLinkHref}?BBOX=-180%2C-90%2C180%2C90`,
+ `${expectedRefreshLinkHref}?BBOX=-180%2C-90%2C180%2C90`
);
});
});
@@ -4687,26 +4679,24 @@ describe("DataSources/KmlDataSource", function () {
';
const requestNetworkLink = defer();
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- requestNetworkLink.resolve(url);
- deferred.reject();
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ requestNetworkLink.resolve(url);
+ deferred.reject();
+ });
KmlDataSource.load(parser.parseFromString(kml, "text/xml"), options);
return requestNetworkLink.promise.then(function (url) {
expect(url).toEqual(
- `${expectedRefreshLinkHref}?client=Cesium-v1&v=2.2&lang=English`,
+ `${expectedRefreshLinkHref}?client=Cesium-v1&v=2.2&lang=English`
);
});
});
@@ -4723,26 +4713,24 @@ describe("DataSources/KmlDataSource", function () {
';
const requestNetworkLink = defer();
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- requestNetworkLink.resolve(url);
- deferred.reject();
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ requestNetworkLink.resolve(url);
+ deferred.reject();
+ });
KmlDataSource.load(parser.parseFromString(kml, "text/xml"), options);
return requestNetworkLink.promise.then(function (url) {
expect(url).toEqual(
- `${expectedRefreshLinkHref}?client=Cesium-v1&v=2.2&lang=English`,
+ `${expectedRefreshLinkHref}?client=Cesium-v1&v=2.2&lang=English`
);
});
});
@@ -4761,29 +4749,27 @@ describe("DataSources/KmlDataSource", function () {
';
const requestNetworkLink = defer();
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- requestNetworkLink.resolve(url);
- deferred.reject();
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ requestNetworkLink.resolve(url);
+ deferred.reject();
+ });
KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- Object.assign({ camera: uberCamera, canvas: uberCanvas }, options),
+ Object.assign({ camera: uberCamera, canvas: uberCanvas }, options)
);
return requestNetworkLink.promise.then(function (url) {
expect(url).toEqual(
- `${expectedRefreshLinkHref}?BBOX=-180%2C-90%2C180%2C90&CAMERA=0%2C0%2C6378137%2C0%2C0&VIEW=45%2C45%2C512%2C512%2C1`,
+ `${expectedRefreshLinkHref}?BBOX=-180%2C-90%2C180%2C90&CAMERA=0%2C0%2C6378137%2C0%2C0&VIEW=45%2C45%2C512%2C512%2C1`
);
});
});
@@ -4802,20 +4788,18 @@ describe("DataSources/KmlDataSource", function () {
';
const requestNetworkLink = defer();
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- requestNetworkLink.resolve(url);
- deferred.reject();
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ requestNetworkLink.resolve(url);
+ deferred.reject();
+ });
const src = new KmlDataSource();
src.camera = uberCamera;
@@ -4824,7 +4808,7 @@ describe("DataSources/KmlDataSource", function () {
return requestNetworkLink.promise.then(function (url) {
expect(url).toEqual(
- `${expectedRefreshLinkHref}?BBOX=-180%2C-90%2C180%2C90&CAMERA=0%2C0%2C6378137%2C0%2C0&VIEW=45%2C45%2C512%2C512%2C1`,
+ `${expectedRefreshLinkHref}?BBOX=-180%2C-90%2C180%2C90&CAMERA=0%2C0%2C6378137%2C0%2C0&VIEW=45%2C45%2C512%2C512%2C1`
);
});
});
@@ -4842,20 +4826,18 @@ describe("DataSources/KmlDataSource", function () {
';
const requestNetworkLink = defer();
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- requestNetworkLink.resolve(url);
- deferred.reject();
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ requestNetworkLink.resolve(url);
+ deferred.reject();
+ });
KmlDataSource.load(parser.parseFromString(kml, "text/xml"), options);
@@ -4897,7 +4879,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- ourOptions,
+ ourOptions
).then(function (dataSource) {
const entities = dataSource.entities.values;
expect(entities.length).toEqual(3);
@@ -4920,7 +4902,7 @@ describe("DataSources/KmlDataSource", function () {
}).then(function () {
expect(spy).toHaveBeenCalledWith(
dataSource,
- `${expectedRefreshLinkHref}?BBOX=0%2C0%2C0%2C0`,
+ `${expectedRefreshLinkHref}?BBOX=0%2C0%2C0%2C0`
);
expect(entities.length).toEqual(3);
@@ -4952,7 +4934,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const start = JulianDate.fromIso8601("2000-01-01");
const stop = JulianDate.fromIso8601("2000-01-03");
@@ -4981,7 +4963,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const start = JulianDate.fromIso8601("2000-01-03");
@@ -5002,7 +4984,7 @@ describe("DataSources/KmlDataSource", function () {
expect(entities.length).toBe(3);
expect(entities[1].billboard).not.toBeNull();
expect(entities[1].position.getValue(Iso8601.MINIMUM_VALUE)).toEqual(
- Cartesian3.fromDegrees(1, 2, 3),
+ Cartesian3.fromDegrees(1, 2, 3)
);
// The root network link is loaded, then the children
@@ -5011,7 +4993,7 @@ describe("DataSources/KmlDataSource", function () {
expect(entities[0].parent).toBeUndefined();
expect(entities[2].parent).toBe(entities[0]);
expect(entities[1].parent).toBe(entities[2]);
- },
+ }
);
});
@@ -5019,7 +5001,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load("Data/KML/namespaced.kml", options).then(
function (dataSource) {
expect(dataSource.entities.values.length).toBe(3);
- },
+ }
);
});
@@ -5032,7 +5014,7 @@ describe("DataSources/KmlDataSource", function () {
const polylineColor = polyline.material.color.getValue();
expect(polylineColor).toEqual(expectedColor);
expect(polyline.width.getValue()).toEqual(10);
- },
+ }
);
});
@@ -5048,7 +5030,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.polygon.perPositionHeight.getValue()).toEqual(true);
@@ -5067,7 +5049,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.polygon.perPositionHeight.getValue()).toEqual(true);
@@ -5087,7 +5069,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.name).toBe("bob");
@@ -5113,7 +5095,7 @@ describe("DataSources/KmlDataSource", function () {
';
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entityCollection = dataSource.entities;
const entity = entityCollection.values[0];
@@ -5135,12 +5117,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(dataSource.entities.values.length).toEqual(1);
expect(console.warn.calls.count()).toEqual(1);
expect(console.warn).toHaveBeenCalledWith(
- "KML - Unsupported Icon refreshMode: onInterval",
+ "KML - Unsupported Icon refreshMode: onInterval"
);
});
});
@@ -5159,12 +5141,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(dataSource.entities.values.length).toEqual(1);
expect(console.warn.calls.count()).toEqual(1);
expect(console.warn).toHaveBeenCalledWith(
- "KML - Unsupported Icon viewRefreshMode: onStop",
+ "KML - Unsupported Icon viewRefreshMode: onStop"
);
});
});
@@ -5186,12 +5168,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(dataSource.entities.values.length).toEqual(1);
expect(console.warn.calls.count()).toEqual(1);
expect(console.warn).toHaveBeenCalledWith(
- "KML - gx:x, gx:y, gx:w, gx:h aren't supported for GroundOverlays",
+ "KML - gx:x, gx:y, gx:w, gx:h aren't supported for GroundOverlays"
);
});
});
@@ -5222,21 +5204,21 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(dataSource.entities.values.length).toEqual(1);
expect(console.warn.calls.count()).toEqual(4);
expect(console.warn.calls.argsFor(0)[0]).toBe(
- "KML - gx:outerColor is not supported in a LineStyle",
+ "KML - gx:outerColor is not supported in a LineStyle"
);
expect(console.warn.calls.argsFor(1)[0]).toBe(
- "KML - gx:outerWidth is not supported in a LineStyle",
+ "KML - gx:outerWidth is not supported in a LineStyle"
);
expect(console.warn.calls.argsFor(2)[0]).toBe(
- "KML - gx:physicalWidth is not supported in a LineStyle",
+ "KML - gx:physicalWidth is not supported in a LineStyle"
);
expect(console.warn.calls.argsFor(3)[0]).toBe(
- "KML - gx:labelVisibility is not supported in a LineStyle",
+ "KML - gx:labelVisibility is not supported in a LineStyle"
);
});
});
@@ -5256,12 +5238,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(dataSource.entities.values.length).toEqual(1);
expect(console.warn.calls.count()).toEqual(1);
expect(console.warn).toHaveBeenCalledWith(
- "KML - Unsupported ListStyle with listItemType: radioFolder",
+ "KML - Unsupported ListStyle with listItemType: radioFolder"
);
});
});
@@ -5288,12 +5270,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(dataSource.entities.values.length).toEqual(1);
expect(console.warn.calls.count()).toEqual(1);
expect(console.warn).toHaveBeenCalledWith(
- "KML - Unsupported StyleMap key: highlighted",
+ "KML - Unsupported StyleMap key: highlighted"
);
});
});
@@ -5317,12 +5299,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(dataSource.entities.values.length).toEqual(1);
expect(console.warn.calls.count()).toEqual(1);
expect(console.warn).toHaveBeenCalledWith(
- "KML - gx:drawOrder is not supported in LineStrings when clampToGround is false",
+ "KML - gx:drawOrder is not supported in LineStrings when clampToGround is false"
);
});
});
@@ -5343,12 +5325,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(dataSource.entities.values.length).toEqual(1);
expect(console.warn.calls.count()).toEqual(1);
expect(console.warn).toHaveBeenCalledWith(
- "KML - gx:angles are not supported in gx:Tracks",
+ "KML - gx:angles are not supported in gx:Tracks"
);
});
});
@@ -5364,12 +5346,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(dataSource.entities.values.length).toEqual(1);
expect(console.warn.calls.count()).toEqual(1);
expect(console.warn).toHaveBeenCalledWith(
- "KML - Unsupported geometry: Model",
+ "KML - Unsupported geometry: Model"
);
});
});
@@ -5392,15 +5374,15 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(dataSource.entities.values.length).toEqual(1);
expect(console.warn.calls.count()).toEqual(2);
expect(console.warn.calls.argsFor(0)[0]).toBe(
- "KML - SchemaData is unsupported",
+ "KML - SchemaData is unsupported"
);
expect(console.warn.calls.argsFor(1)[0]).toBe(
- "KML - ExtendedData with xmlns:prefix is unsupported",
+ "KML - ExtendedData with xmlns:prefix is unsupported"
);
});
});
@@ -5429,22 +5411,22 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(dataSource.entities.values.length).toEqual(1);
const placemark = dataSource.entities.values[0];
expect(placemark.kml.camera).toBeInstanceOf(KmlCamera);
expect(placemark.kml.lookAt).toBeInstanceOf(KmlLookAt);
expect(placemark.kml.lookAt.position).toEqual(
- Cartesian3.fromDegrees(-120, 40, 100),
+ Cartesian3.fromDegrees(-120, 40, 100)
);
expect(placemark.kml.lookAt.headingPitchRange).toEqualEpsilon(
new HeadingPitchRange(
CesiumMath.toRadians(90),
CesiumMath.toRadians(30 - 90),
- 1250,
+ 1250
),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
});
@@ -5465,12 +5447,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(dataSource.entities.values.length).toEqual(1);
expect(console.warn.calls.count()).toEqual(1);
expect(console.warn).toHaveBeenCalledWith(
- "KML - Placemark Regions are unsupported",
+ "KML - Placemark Regions are unsupported"
);
});
});
@@ -5489,12 +5471,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(dataSource.entities.values.length).toEqual(1);
expect(console.warn.calls.count()).toEqual(1);
expect(console.warn).toHaveBeenCalledWith(
- "KML - Unsupported viewRefreshMode: onRegion",
+ "KML - Unsupported viewRefreshMode: onRegion"
);
});
});
@@ -5519,7 +5501,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(dataSource.kmlTours.length).toEqual(1);
const tour = dataSource.kmlTours[0];
@@ -5572,7 +5554,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(dataSource.kmlTours.length).toEqual(1);
const tour = dataSource.kmlTours[0];
@@ -5617,18 +5599,18 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(dataSource.kmlTours.length).toEqual(1);
expect(dataSource.kmlTours[0].playlist.length).toEqual(0);
expect(console.warn).toHaveBeenCalledWith(
- "KML Tour unsupported node AnimatedUpdate",
+ "KML Tour unsupported node AnimatedUpdate"
);
expect(console.warn).toHaveBeenCalledWith(
- "KML Tour unsupported node TourControl",
+ "KML Tour unsupported node TourControl"
);
expect(console.warn).toHaveBeenCalledWith(
- "KML Tour unsupported node SoundCue",
+ "KML Tour unsupported node SoundCue"
);
});
});
@@ -5647,12 +5629,12 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(dataSource.entities.values.length).toEqual(2);
expect(console.warn.calls.count()).toEqual(1);
expect(console.warn).toHaveBeenCalledWith(
- "KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element",
+ "KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element"
);
});
});
@@ -5681,7 +5663,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- kmlOptions,
+ kmlOptions
).then(function (dataSource) {
expect(dataSource.entities.values.length).toEqual(2);
});
@@ -5698,7 +5680,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.polygon.perPositionHeight.getValue()).toEqual(true);
@@ -5717,7 +5699,7 @@ describe("DataSources/KmlDataSource", function () {
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.polygon.perPositionHeight).toBeUndefined();
@@ -5745,7 +5727,7 @@ describe("DataSources/KmlDataSource", function () {
const clampToGroundOptions = combine(options, { clampToGround: true });
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- clampToGroundOptions,
+ clampToGroundOptions
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.polyline).toBeDefined();
@@ -5778,7 +5760,7 @@ describe("DataSources/KmlDataSource", function () {
const clampToGroundOptions = combine(options, { clampToGround: true });
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- clampToGroundOptions,
+ clampToGroundOptions
).then(function (dataSource) {
const entity = dataSource.entities.values[0];
expect(entity.polyline).toBeDefined();
@@ -5851,13 +5833,13 @@ describe("DataSources/KmlDataSource", function () {
CesiumMath.setRandomNumberSeed(0);
return KmlDataSource.load(
parser.parseFromString(kml, "text/xml"),
- options,
+ options
).then(function (dataSource) {
expect(dataSource.entities.values.length).toEqual(4);
expect(
- dataSource.entities.values[2].polygon.material.color.getValue(),
+ dataSource.entities.values[2].polygon.material.color.getValue()
).not.toEqual(
- dataSource.entities.values[3].polygon.material.color.getValue(),
+ dataSource.entities.values[3].polygon.material.color.getValue()
);
});
});
diff --git a/packages/engine/Specs/DataSources/KmlTourFlyToSpec.js b/packages/engine/Specs/DataSources/KmlTourFlyToSpec.js
index b7647fd76368..da982b9920aa 100644
--- a/packages/engine/Specs/DataSources/KmlTourFlyToSpec.js
+++ b/packages/engine/Specs/DataSources/KmlTourFlyToSpec.js
@@ -16,7 +16,7 @@ describe("DataSources/KmlTourFlyTo", function () {
const hpr = new HeadingPitchRange(
CesiumMath.toRadians(10.0),
CesiumMath.toRadians(45.0),
- 10000,
+ 10000
);
const flyto = new KmlTourFlyTo(10, "bounce", new KmlLookAt(position, hpr));
@@ -35,7 +35,7 @@ describe("DataSources/KmlTourFlyTo", function () {
const hpr = new HeadingPitchRoll(
CesiumMath.toRadians(10.0),
CesiumMath.toRadians(45.0),
- 0,
+ 0
);
const flyto = new KmlTourFlyTo(10, "bounce", new KmlCamera(position, hpr));
@@ -56,7 +56,7 @@ describe("DataSources/KmlTourFlyTo", function () {
const hpr = new HeadingPitchRange(
CesiumMath.toRadians(10.0),
CesiumMath.toRadians(45.0),
- 10000,
+ 10000
);
const flyto = new KmlTourFlyTo(10, "bounce", new KmlLookAt(position, hpr));
@@ -73,13 +73,13 @@ describe("DataSources/KmlTourFlyTo", function () {
const hpr = new HeadingPitchRoll(
CesiumMath.toRadians(10.0),
CesiumMath.toRadians(45.0),
- 0,
+ 0
);
const flyto = new KmlTourFlyTo(
0.01,
"bounce",
- new KmlCamera(position, hpr),
+ new KmlCamera(position, hpr)
);
const doneSpy = jasmine.createSpy("cameraDone");
const flyFake = jasmine.createSpy("flyTo").and.callFake(function (options) {
@@ -97,7 +97,7 @@ describe("DataSources/KmlTourFlyTo", function () {
}).then(function () {
expect(fakeCamera.flyTo).toHaveBeenCalled();
expect(fakeCamera.flyTo.calls.mostRecent().args[0].destination).toBe(
- position,
+ position
);
expect(fakeCamera.flyTo.calls.mostRecent().args[0].orientation).toBe(hpr);
expect(doneSpy).toHaveBeenCalled();
@@ -109,13 +109,13 @@ describe("DataSources/KmlTourFlyTo", function () {
const hpr = new HeadingPitchRange(
CesiumMath.toRadians(10.0),
CesiumMath.toRadians(45.0),
- 10000,
+ 10000
);
const flyto = new KmlTourFlyTo(
0.01,
"bounce",
- new KmlLookAt(position, hpr),
+ new KmlLookAt(position, hpr)
);
const doneSpy = jasmine.createSpy("cameraDone");
const flyFake = jasmine
@@ -135,16 +135,16 @@ describe("DataSources/KmlTourFlyTo", function () {
}).then(function () {
expect(fakeCamera.flyToBoundingSphere).toHaveBeenCalled();
expect(
- fakeCamera.flyToBoundingSphere.calls.mostRecent().args[0].center.x,
+ fakeCamera.flyToBoundingSphere.calls.mostRecent().args[0].center.x
).toEqual(position.x);
expect(
- fakeCamera.flyToBoundingSphere.calls.mostRecent().args[0].center.y,
+ fakeCamera.flyToBoundingSphere.calls.mostRecent().args[0].center.y
).toEqual(position.y);
expect(
- fakeCamera.flyToBoundingSphere.calls.mostRecent().args[0].center.z,
+ fakeCamera.flyToBoundingSphere.calls.mostRecent().args[0].center.z
).toEqual(position.z);
expect(
- fakeCamera.flyToBoundingSphere.calls.mostRecent().args[1].offset,
+ fakeCamera.flyToBoundingSphere.calls.mostRecent().args[1].offset
).toBe(hpr);
expect(doneSpy).toHaveBeenCalled();
});
diff --git a/packages/engine/Specs/DataSources/KmlTourSpec.js b/packages/engine/Specs/DataSources/KmlTourSpec.js
index bfb9f4b6f883..4e2c87e8f35a 100644
--- a/packages/engine/Specs/DataSources/KmlTourSpec.js
+++ b/packages/engine/Specs/DataSources/KmlTourSpec.js
@@ -16,7 +16,7 @@ describe("DataSources/KmlTour", function () {
const hpr = new HeadingPitchRange(
CesiumMath.toRadians(10.0),
CesiumMath.toRadians(45.0),
- 10000,
+ 10000
);
return new KmlLookAt(position, hpr);
}
@@ -55,16 +55,16 @@ describe("DataSources/KmlTour", function () {
});
it("calls entries play", function () {
- const waitSpy = spyOn(KmlTourWait.prototype, "play").and.callFake(
- function (callback) {
- callback();
- },
- );
- const flySpy = spyOn(KmlTourFlyTo.prototype, "play").and.callFake(
- function (callback) {
- callback();
- },
- );
+ const waitSpy = spyOn(KmlTourWait.prototype, "play").and.callFake(function (
+ callback
+ ) {
+ callback();
+ });
+ const flySpy = spyOn(KmlTourFlyTo.prototype, "play").and.callFake(function (
+ callback
+ ) {
+ callback();
+ });
const tour = new KmlTour("test", "test");
const wait = new KmlTourWait(0.1);
@@ -147,7 +147,7 @@ describe("DataSources/KmlTour", function () {
expect(mockWidget.scene.camera.flyTo.calls.count()).toEqual(0);
expect(mockWidget.scene.camera.flyToBoundingSphere.calls.count()).toEqual(
- 0,
+ 0
);
}, 5);
});
diff --git a/packages/engine/Specs/DataSources/LabelGraphicsSpec.js b/packages/engine/Specs/DataSources/LabelGraphicsSpec.js
index eed297c88dba..8c712664d2cd 100644
--- a/packages/engine/Specs/DataSources/LabelGraphicsSpec.js
+++ b/packages/engine/Specs/DataSources/LabelGraphicsSpec.js
@@ -63,17 +63,17 @@ describe("DataSources/LabelGraphics", function () {
expect(label.scale.getValue()).toEqual(options.scale);
expect(label.show.getValue()).toEqual(options.show);
expect(label.translucencyByDistance.getValue()).toEqual(
- options.translucencyByDistance,
+ options.translucencyByDistance
);
expect(label.pixelOffsetScaleByDistance.getValue()).toEqual(
- options.pixelOffsetScaleByDistance,
+ options.pixelOffsetScaleByDistance
);
expect(label.scaleByDistance.getValue()).toEqual(options.scaleByDistance);
expect(label.distanceDisplayCondition.getValue()).toEqual(
- options.distanceDisplayCondition,
+ options.distanceDisplayCondition
);
expect(label.disableDepthTestDistance.getValue()).toEqual(
- options.disableDepthTestDistance,
+ options.disableDepthTestDistance
);
});
@@ -93,13 +93,13 @@ describe("DataSources/LabelGraphics", function () {
source.show = new ConstantProperty(false);
source.translucencyByDistance = new ConstantProperty(new NearFarScalar());
source.pixelOffsetScaleByDistance = new ConstantProperty(
- new NearFarScalar(1.0, 0.0, 3.0e9, 0.0),
+ new NearFarScalar(1.0, 0.0, 3.0e9, 0.0)
);
source.scaleByDistance = new ConstantProperty(
- new NearFarScalar(1.0, 0.0, 3.0e9, 0.0),
+ new NearFarScalar(1.0, 0.0, 3.0e9, 0.0)
);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
source.disableDepthTestDistance = new ConstantProperty(10.0);
@@ -120,14 +120,14 @@ describe("DataSources/LabelGraphics", function () {
expect(target.show).toBe(source.show);
expect(target.translucencyByDistance).toBe(source.translucencyByDistance);
expect(target.pixelOffsetScaleByDistance).toBe(
- source.pixelOffsetScaleByDistance,
+ source.pixelOffsetScaleByDistance
);
expect(target.scaleByDistance).toBe(source.scaleByDistance);
expect(target.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
expect(target.disableDepthTestDistance).toBe(
- source.disableDepthTestDistance,
+ source.disableDepthTestDistance
);
});
@@ -147,13 +147,13 @@ describe("DataSources/LabelGraphics", function () {
source.show = new ConstantProperty(false);
source.translucencyByDistance = new ConstantProperty(new NearFarScalar());
source.pixelOffsetScaleByDistance = new ConstantProperty(
- new NearFarScalar(1.0, 0.0, 3.0e9, 0.0),
+ new NearFarScalar(1.0, 0.0, 3.0e9, 0.0)
);
source.scaleByDistance = new ConstantProperty(
- new NearFarScalar(1.0, 0.0, 3.0e9, 0.0),
+ new NearFarScalar(1.0, 0.0, 3.0e9, 0.0)
);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
source.disableDepthTestDistance = new ConstantProperty(10.0);
@@ -171,11 +171,11 @@ describe("DataSources/LabelGraphics", function () {
const show = new ConstantProperty(true);
const translucencyByDistance = new ConstantProperty(new NearFarScalar());
const pixelOffsetScaleByDistance = new ConstantProperty(
- new NearFarScalar(),
+ new NearFarScalar()
);
const scaleByDistance = new ConstantProperty(new NearFarScalar());
const distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(),
+ new DistanceDisplayCondition()
);
const disableDepthTestDistance = new ConstantProperty(20.0);
@@ -235,13 +235,13 @@ describe("DataSources/LabelGraphics", function () {
source.show = new ConstantProperty(false);
source.translucencyByDistance = new ConstantProperty(new NearFarScalar());
source.pixelOffsetScaleByDistance = new ConstantProperty(
- new NearFarScalar(1.0, 0.0, 3.0e9, 0.0),
+ new NearFarScalar(1.0, 0.0, 3.0e9, 0.0)
);
source.scaleByDistance = new ConstantProperty(
- new NearFarScalar(1.0, 0.0, 3.0e9, 0.0),
+ new NearFarScalar(1.0, 0.0, 3.0e9, 0.0)
);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
source.disableDepthTestDistance = new ConstantProperty(10.0);
@@ -260,14 +260,14 @@ describe("DataSources/LabelGraphics", function () {
expect(result.show).toBe(source.show);
expect(result.translucencyByDistance).toBe(source.translucencyByDistance);
expect(result.pixelOffsetScaleByDistance).toBe(
- source.pixelOffsetScaleByDistance,
+ source.pixelOffsetScaleByDistance
);
expect(result.scaleByDistance).toBe(source.scaleByDistance);
expect(result.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
expect(result.disableDepthTestDistance).toBe(
- source.disableDepthTestDistance,
+ source.disableDepthTestDistance
);
});
diff --git a/packages/engine/Specs/DataSources/LabelVisualizerSpec.js b/packages/engine/Specs/DataSources/LabelVisualizerSpec.js
index 2c47034ebcd2..d256deb1825d 100644
--- a/packages/engine/Specs/DataSources/LabelVisualizerSpec.js
+++ b/packages/engine/Specs/DataSources/LabelVisualizerSpec.js
@@ -87,7 +87,7 @@ describe(
const testObject = entityCollection.getOrCreateEntity("test");
testObject.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
visualizer.update(JulianDate.now());
expect(scene.primitives.get(0)).toBeUndefined();
@@ -112,7 +112,7 @@ describe(
const testObject = entityCollection.getOrCreateEntity("test");
testObject.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
const label = (testObject.label = new LabelGraphics());
label.show = new ConstantProperty(true);
@@ -131,7 +131,7 @@ describe(
const label = (testObject.label = new LabelGraphics());
testObject.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
label.text = new ConstantProperty("a");
label.font = new ConstantProperty("sans serif");
@@ -147,11 +147,11 @@ describe(
label.show = new ConstantProperty(true);
label.translucencyByDistance = new ConstantProperty(new NearFarScalar());
label.pixelOffsetScaleByDistance = new ConstantProperty(
- new NearFarScalar(),
+ new NearFarScalar()
);
label.scaleByDistance = new ConstantProperty(new NearFarScalar());
label.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(),
+ new DistanceDisplayCondition()
);
label.disableDepthTestDistance = new ConstantProperty(10.0);
@@ -169,41 +169,41 @@ describe(
expect(l.style).toEqual(testObject.label.style.getValue(time));
expect(l.fillColor).toEqual(testObject.label.fillColor.getValue(time));
expect(l.outlineColor).toEqual(
- testObject.label.outlineColor.getValue(time),
+ testObject.label.outlineColor.getValue(time)
);
expect(l.outlineWidth).toEqual(
- testObject.label.outlineWidth.getValue(time),
+ testObject.label.outlineWidth.getValue(time)
);
expect(l.horizontalOrigin).toEqual(
- testObject.label.horizontalOrigin.getValue(time),
+ testObject.label.horizontalOrigin.getValue(time)
);
expect(l.verticalOrigin).toEqual(
- testObject.label.verticalOrigin.getValue(time),
+ testObject.label.verticalOrigin.getValue(time)
);
expect(l.eyeOffset).toEqual(testObject.label.eyeOffset.getValue(time));
expect(l.pixelOffset).toEqual(
- testObject.label.pixelOffset.getValue(time),
+ testObject.label.pixelOffset.getValue(time)
);
expect(l.scale).toEqual(testObject.label.scale.getValue(time));
expect(l.show).toEqual(testObject.label.show.getValue(time));
expect(l.translucencyByDistance).toEqual(
- testObject.label.translucencyByDistance.getValue(time),
+ testObject.label.translucencyByDistance.getValue(time)
);
expect(l.pixelOffsetScaleByDistance).toEqual(
- testObject.label.pixelOffsetScaleByDistance.getValue(time),
+ testObject.label.pixelOffsetScaleByDistance.getValue(time)
);
expect(l.scaleByDistance).toEqual(
- testObject.label.scaleByDistance.getValue(time),
+ testObject.label.scaleByDistance.getValue(time)
);
expect(l.distanceDisplayCondition).toEqual(
- testObject.label.distanceDisplayCondition.getValue(time),
+ testObject.label.distanceDisplayCondition.getValue(time)
);
expect(l.disableDepthTestDistance).toEqual(
- testObject.label.disableDepthTestDistance.getValue(time),
+ testObject.label.disableDepthTestDistance.getValue(time)
);
testObject.position = new ConstantProperty(
- new Cartesian3(5678, 1234, 1293434),
+ new Cartesian3(5678, 1234, 1293434)
);
label.text = new ConstantProperty("b");
label.font = new ConstantProperty("serif");
@@ -219,11 +219,11 @@ describe(
label.show = new ConstantProperty(true);
label.translucencyByDistance = new ConstantProperty(new NearFarScalar());
label.pixelOffsetScaleByDistance = new ConstantProperty(
- new NearFarScalar(),
+ new NearFarScalar()
);
label.scaleByDistance = new ConstantProperty(new NearFarScalar());
label.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(),
+ new DistanceDisplayCondition()
);
label.disableDepthTestDistance = new ConstantProperty(20.0);
@@ -234,37 +234,37 @@ describe(
expect(l.style).toEqual(testObject.label.style.getValue(time));
expect(l.fillColor).toEqual(testObject.label.fillColor.getValue(time));
expect(l.outlineColor).toEqual(
- testObject.label.outlineColor.getValue(time),
+ testObject.label.outlineColor.getValue(time)
);
expect(l.outlineWidth).toEqual(
- testObject.label.outlineWidth.getValue(time),
+ testObject.label.outlineWidth.getValue(time)
);
expect(l.horizontalOrigin).toEqual(
- testObject.label.horizontalOrigin.getValue(time),
+ testObject.label.horizontalOrigin.getValue(time)
);
expect(l.verticalOrigin).toEqual(
- testObject.label.verticalOrigin.getValue(time),
+ testObject.label.verticalOrigin.getValue(time)
);
expect(l.eyeOffset).toEqual(testObject.label.eyeOffset.getValue(time));
expect(l.pixelOffset).toEqual(
- testObject.label.pixelOffset.getValue(time),
+ testObject.label.pixelOffset.getValue(time)
);
expect(l.scale).toEqual(testObject.label.scale.getValue(time));
expect(l.show).toEqual(testObject.label.show.getValue(time));
expect(l.translucencyByDistance).toEqual(
- testObject.label.translucencyByDistance.getValue(time),
+ testObject.label.translucencyByDistance.getValue(time)
);
expect(l.pixelOffsetScaleByDistance).toEqual(
- testObject.label.pixelOffsetScaleByDistance.getValue(time),
+ testObject.label.pixelOffsetScaleByDistance.getValue(time)
);
expect(l.scaleByDistance).toEqual(
- testObject.label.scaleByDistance.getValue(time),
+ testObject.label.scaleByDistance.getValue(time)
);
expect(l.distanceDisplayCondition).toEqual(
- testObject.label.distanceDisplayCondition.getValue(time),
+ testObject.label.distanceDisplayCondition.getValue(time)
);
expect(l.disableDepthTestDistance).toEqual(
- testObject.label.disableDepthTestDistance.getValue(time),
+ testObject.label.disableDepthTestDistance.getValue(time)
);
label.show = new ConstantProperty(false);
@@ -278,7 +278,7 @@ describe(
const testObject = entityCollection.getOrCreateEntity("test");
testObject.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
testObject.label = new LabelGraphics();
testObject.label.text = new ConstantProperty("a");
@@ -297,7 +297,7 @@ describe(
const testObject2 = entityCollection.getOrCreateEntity("test2");
testObject2.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
testObject2.label = new LabelGraphics();
testObject2.label.text = new ConstantProperty("b");
@@ -316,7 +316,7 @@ describe(
const label = (testObject.label = new LabelGraphics());
testObject.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
label.show = new ConstantProperty(true);
label.text = new ConstantProperty("lorum ipsum");
@@ -344,7 +344,7 @@ describe(
const label = (testObject.label = new LabelGraphics());
testObject.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
label.show = new ConstantProperty(true);
label.text = new ConstantProperty("lorum ipsum");
@@ -365,7 +365,7 @@ describe(
const label = (testObject.label = new LabelGraphics());
testObject.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
label.show = new ConstantProperty(true);
label.text = new ConstantProperty("lorum ipsum");
@@ -407,5 +407,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/DataSources/ModelGraphicsSpec.js b/packages/engine/Specs/DataSources/ModelGraphicsSpec.js
index 3f49259bd9f6..6c88b6e94086 100644
--- a/packages/engine/Specs/DataSources/ModelGraphicsSpec.js
+++ b/packages/engine/Specs/DataSources/ModelGraphicsSpec.js
@@ -82,12 +82,12 @@ describe("DataSources/ModelGraphics", function () {
expect(model.minimumPixelSize.getValue()).toEqual(options.minimumPixelSize);
expect(model.maximumScale.getValue()).toEqual(options.maximumScale);
expect(model.incrementallyLoadTextures.getValue()).toEqual(
- options.incrementallyLoadTextures,
+ options.incrementallyLoadTextures
);
expect(model.shadows.getValue()).toEqual(options.shadows);
expect(model.heightReference.getValue()).toEqual(options.heightReference);
expect(model.distanceDisplayCondition.getValue()).toEqual(
- options.distanceDisplayCondition,
+ options.distanceDisplayCondition
);
expect(model.silhouetteColor.getValue()).toEqual(options.silhouetteColor);
expect(model.silhouetteSize.getValue()).toEqual(options.silhouetteSize);
@@ -95,27 +95,27 @@ describe("DataSources/ModelGraphics", function () {
expect(model.colorBlendMode.getValue()).toEqual(options.colorBlendMode);
expect(model.colorBlendAmount.getValue()).toEqual(options.colorBlendAmount);
expect(model.clippingPlanes.getValue().planes).toEqual(
- options.clippingPlanes.planes,
+ options.clippingPlanes.planes
);
expect(model.customShader.getValue()).toEqual(options.customShader);
expect(model.imageBasedLightingFactor.getValue()).toEqual(
- options.imageBasedLightingFactor,
+ options.imageBasedLightingFactor
);
expect(model.lightColor.getValue()).toEqual(options.lightColor);
expect(model.runAnimations.getValue()).toEqual(options.runAnimations);
expect(model.clampAnimations.getValue()).toEqual(options.clampAnimations);
let actualNodeTransformations = model.nodeTransformations.getValue(
- new JulianDate(),
+ new JulianDate()
);
let expectedNodeTransformations = options.nodeTransformations;
// by default toEqual requires constructors to match. for the purposes of this test, we only care about the structure.
actualNodeTransformations = JSON.parse(
- JSON.stringify(actualNodeTransformations),
+ JSON.stringify(actualNodeTransformations)
);
expectedNodeTransformations = JSON.parse(
- JSON.stringify(expectedNodeTransformations),
+ JSON.stringify(expectedNodeTransformations)
);
expect(actualNodeTransformations).toEqual(expectedNodeTransformations);
@@ -138,13 +138,13 @@ describe("DataSources/ModelGraphics", function () {
source.incrementallyLoadTextures = new ConstantProperty(true);
source.shadows = new ConstantProperty(ShadowMode.ENABLED);
source.heightReference = new ConstantProperty(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(),
+ new DistanceDisplayCondition()
);
source.silhouetteColor = new ConstantProperty(
- new Color(1.0, 0.0, 0.0, 1.0),
+ new Color(1.0, 0.0, 0.0, 1.0)
);
source.silhouetteSize = new ConstantProperty(3.0);
source.color = new ConstantProperty(new Color(0.0, 1.0, 0.0, 0.2));
@@ -153,7 +153,7 @@ describe("DataSources/ModelGraphics", function () {
source.clippingPlanes = new ConstantProperty(new ClippingPlaneCollection());
source.customShader = new ConstantProperty(new CustomShader());
source.imageBasedLightingFactor = new ConstantProperty(
- new Cartesian2(0.5, 0.5),
+ new Cartesian2(0.5, 0.5)
);
source.lightColor = new ConstantProperty(new Color(1.0, 1.0, 0.0, 1.0));
source.runAnimations = new ConstantProperty(true);
@@ -182,12 +182,12 @@ describe("DataSources/ModelGraphics", function () {
expect(target.minimumPixelSize).toBe(source.minimumPixelSize);
expect(target.maximumScale).toBe(source.maximumScale);
expect(target.incrementallyLoadTextures).toBe(
- source.incrementallyLoadTextures,
+ source.incrementallyLoadTextures
);
expect(target.shadows).toBe(source.shadows);
expect(target.heightReference).toBe(source.heightReference);
expect(target.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
expect(target.silhouetteColor).toEqual(source.silhouetteColor);
expect(target.silhouetteSize).toEqual(source.silhouetteSize);
@@ -197,7 +197,7 @@ describe("DataSources/ModelGraphics", function () {
expect(target.clippingPlanes).toBe(source.clippingPlanes);
expect(target.customShader).toBe(source.customShader);
expect(target.imageBasedLightingFactor).toBe(
- source.imageBasedLightingFactor,
+ source.imageBasedLightingFactor
);
expect(target.lightColor).toBe(source.lightColor);
expect(target.runAnimations).toBe(source.runAnimations);
@@ -216,10 +216,10 @@ describe("DataSources/ModelGraphics", function () {
source.incrementallyLoadTextures = new ConstantProperty(true);
source.shadows = new ConstantProperty(ShadowMode.ENABLED);
source.heightReference = new ConstantProperty(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(),
+ new DistanceDisplayCondition()
);
source.silhouetteColor = new ConstantProperty(new Color());
source.silhouetteSize = new ConstantProperty(1.0);
@@ -229,7 +229,7 @@ describe("DataSources/ModelGraphics", function () {
source.clippingPlanes = new ConstantProperty(new ClippingPlaneCollection());
source.customShader = new ConstantProperty(new CustomShader());
source.imageBasedLightingFactor = new ConstantProperty(
- new Cartesian2(0.5, 0.5),
+ new Cartesian2(0.5, 0.5)
);
source.lightColor = new ConstantProperty(new Color(1.0, 1.0, 0.0, 1.0));
source.runAnimations = new ConstantProperty(true);
@@ -250,10 +250,10 @@ describe("DataSources/ModelGraphics", function () {
const incrementallyLoadTextures = new ConstantProperty(true);
const shadows = new ConstantProperty(ShadowMode.ENABLED);
const heightReference = new ConstantProperty(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
const distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(),
+ new DistanceDisplayCondition()
);
const silhouetteColor = new ConstantProperty(new Color());
const silhouetteSize = new ConstantProperty(1.0);
@@ -263,7 +263,7 @@ describe("DataSources/ModelGraphics", function () {
const clippingPlanes = new ConstantProperty(new ClippingPlaneCollection());
const customShader = new ConstantProperty(new CustomShader());
const imageBasedLightingFactor = new ConstantProperty(
- new Cartesian2(0.5, 0.5),
+ new Cartesian2(0.5, 0.5)
);
const lightColor = new ConstantProperty(new Color(1.0, 1.0, 0.0, 1.0));
const runAnimations = new ConstantProperty(true);
@@ -336,10 +336,10 @@ describe("DataSources/ModelGraphics", function () {
source.incrementallyLoadTextures = new ConstantProperty(true);
source.shadows = new ConstantProperty(ShadowMode.ENABLED);
source.heightReference = new ConstantProperty(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(),
+ new DistanceDisplayCondition()
);
source.silhouetteColor = new ConstantProperty(new Color());
source.silhouetteSize = new ConstantProperty(2.0);
@@ -349,7 +349,7 @@ describe("DataSources/ModelGraphics", function () {
source.clippingPlanes = new ConstantProperty(new ClippingPlaneCollection());
source.customShader = new ConstantProperty(new CustomShader());
source.imageBasedLightingFactor = new ConstantProperty(
- new Cartesian2(0.5, 0.5),
+ new Cartesian2(0.5, 0.5)
);
source.lightColor = new ConstantProperty(new Color(1.0, 1.0, 0.0, 1.0));
source.runAnimations = new ConstantProperty(true);
@@ -370,12 +370,12 @@ describe("DataSources/ModelGraphics", function () {
expect(result.minimumPixelSize).toBe(source.minimumPixelSize);
expect(result.maximumScale).toBe(source.maximumScale);
expect(result.incrementallyLoadTextures).toBe(
- source.incrementallyLoadTextures,
+ source.incrementallyLoadTextures
);
expect(result.shadows).toBe(source.shadows);
expect(result.heightReference).toBe(source.heightReference);
expect(result.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
expect(result.silhouetteColor).toEqual(source.silhouetteColor);
expect(result.silhouetteSize).toEqual(source.silhouetteSize);
@@ -385,7 +385,7 @@ describe("DataSources/ModelGraphics", function () {
expect(result.clippingPlanes).toBe(source.clippingPlanes);
expect(result.customShader).toBe(source.customShader);
expect(result.imageBasedLightingFactor).toBe(
- source.imageBasedLightingFactor,
+ source.imageBasedLightingFactor
);
expect(result.lightColor).toBe(source.lightColor);
expect(result.runAnimations).toBe(source.runAnimations);
diff --git a/packages/engine/Specs/DataSources/ModelVisualizerSpec.js b/packages/engine/Specs/DataSources/ModelVisualizerSpec.js
index 738d0db51195..18ca6a8e558a 100644
--- a/packages/engine/Specs/DataSources/ModelVisualizerSpec.js
+++ b/packages/engine/Specs/DataSources/ModelVisualizerSpec.js
@@ -95,7 +95,7 @@ describe(
it("object with no model does not create one", function () {
const testObject = entityCollection.getOrCreateEntity("test");
testObject.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
visualizer.update(JulianDate.now());
expect(scene.primitives.length).toEqual(0);
@@ -119,7 +119,7 @@ describe(
model.minimumPixelSize = new ConstantProperty(24.0);
model.uri = new ConstantProperty(boxArticulationsUrl);
model.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
const translation = new Cartesian3(1.0, 2.0, 3.0);
@@ -143,13 +143,13 @@ describe(
model.customShader = new ConstantProperty(customShader);
model.imageBasedLightingFactor = new ConstantProperty(
- new Cartesian2(0.5, 0.5),
+ new Cartesian2(0.5, 0.5)
);
model.lightColor = new ConstantProperty(new Color(1.0, 1.0, 0.0, 1.0));
const testObject = entityCollection.getOrCreateEntity("test");
testObject.position = new ConstantPositionProperty(
- Cartesian3.fromDegrees(1, 2, 3),
+ Cartesian3.fromDegrees(1, 2, 3)
);
testObject.model = model;
@@ -169,29 +169,29 @@ describe(
expect(primitive.modelMatrix).toEqual(
Transforms.eastNorthUpToFixedFrame(
Cartesian3.fromDegrees(1, 2, 3),
- scene.globe.ellipsoid,
- ),
+ scene.globe.ellipsoid
+ )
);
expect(primitive.distanceDisplayCondition).toEqual(
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
expect(primitive.clippingPlanes._planes.length).toEqual(
- clippingPlanes._planes.length,
+ clippingPlanes._planes.length
);
expect(
Cartesian3.equals(
primitive.clippingPlanes._planes[0].normal,
- clippingPlanes._planes[0].normal,
- ),
+ clippingPlanes._planes[0].normal
+ )
).toBe(true);
expect(primitive.clippingPlanes._planes[0].distance).toEqual(
- clippingPlanes._planes[0].distance,
+ clippingPlanes._planes[0].distance
);
expect(primitive.customShader).toEqual(customShader);
expect(primitive.imageBasedLighting.imageBasedLightingFactor).toEqual(
- new Cartesian2(0.5, 0.5),
+ new Cartesian2(0.5, 0.5)
);
expect(primitive.lightColor).toEqual(new Cartesian3(1.0, 1.0, 0.0));
@@ -207,17 +207,16 @@ describe(
const node = primitive.getNode("Root");
expect(node).toBeDefined();
- const transformationMatrix =
- Matrix4.fromTranslationQuaternionRotationScale(
- translation,
- rotation,
- scale,
- );
+ const transformationMatrix = Matrix4.fromTranslationQuaternionRotationScale(
+ translation,
+ rotation,
+ scale
+ );
Matrix4.multiplyTransformation(
node.originalMatrix,
transformationMatrix,
- transformationMatrix,
+ transformationMatrix
);
expect(node.matrix).toEqual(transformationMatrix);
@@ -245,7 +244,7 @@ describe(
const testObject = entityCollection.getOrCreateEntity("test");
testObject.position = new ConstantPositionProperty(
- Cartesian3.fromDegrees(1, 2, 3),
+ Cartesian3.fromDegrees(1, 2, 3)
);
testObject.model = model;
@@ -267,10 +266,22 @@ describe(
const node = primitive.getNode("Root");
const expected = [
- 0.7147690483240505, -0.04340611926232735, -0.0749741046529782, 0,
- -0.06188330295778636, 0.05906797312763484, -0.6241645867602773, 0,
- 0.03752515582279579, 0.5366347296529127, 0.04706410108373541, 0, 1, 3,
- -2, 1,
+ 0.7147690483240505,
+ -0.04340611926232735,
+ -0.0749741046529782,
+ 0,
+ -0.06188330295778636,
+ 0.05906797312763484,
+ -0.6241645867602773,
+ 0,
+ 0.03752515582279579,
+ 0.5366347296529127,
+ 0.04706410108373541,
+ 0,
+ 1,
+ 3,
+ -2,
+ 1,
];
expect(node.matrix).toEqualEpsilon(expected, CesiumMath.EPSILON14);
@@ -284,12 +295,12 @@ describe(
model.uri = new ConstantProperty(
new Resource({
url: boxArticulationsUrl,
- }),
+ })
);
const testObject = entityCollection.getOrCreateEntity("test");
testObject.position = new ConstantPositionProperty(
- Cartesian3.fromDegrees(1, 2, 3),
+ Cartesian3.fromDegrees(1, 2, 3)
);
testObject.model = model;
@@ -320,7 +331,7 @@ describe(
const time = JulianDate.now();
const testObject = entityCollection.getOrCreateEntity("test");
testObject.position = new ConstantProperty(
- new Cartesian3(5678, 1234, 1101112),
+ new Cartesian3(5678, 1234, 1101112)
);
testObject.model = model;
visualizer.update(time);
@@ -344,7 +355,7 @@ describe(
testObject.model = model;
testObject.position = new ConstantProperty(
- new Cartesian3(5678, 1234, 1101112),
+ new Cartesian3(5678, 1234, 1101112)
);
model.uri = new ConstantProperty(boxUrl);
visualizer.update(time);
@@ -365,7 +376,7 @@ describe(
testObject.model = model;
testObject.position = new ConstantProperty(
- new Cartesian3(5678, 1234, 1101112),
+ new Cartesian3(5678, 1234, 1101112)
);
model.uri = new ConstantProperty(boxUrl);
visualizer.update(time);
@@ -389,7 +400,7 @@ describe(
expect(state).toBe(BoundingSphereState.DONE);
const expected = BoundingSphere.clone(
primitive.boundingSphere,
- new BoundingSphere(),
+ new BoundingSphere()
);
expect(result).toEqual(expected);
});
@@ -441,7 +452,7 @@ describe(
expectedCenter.height = 10.0;
expect(result.center).toEqualEpsilon(
Cartographic.toCartesian(expectedCenter),
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
});
@@ -451,7 +462,7 @@ describe(
const position = Cartesian3.fromDegrees(
149.515332,
-34.984799,
- heightOffset,
+ heightOffset
);
const tileset = new Cesium3DTileset({
@@ -496,7 +507,7 @@ describe(
expectedCenter.height = heightOffset + 10.0;
expect(result.center).toEqualEpsilon(
Cartographic.toCartesian(expectedCenter),
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
});
@@ -547,7 +558,7 @@ describe(
expectedCenter.height = 10.0;
expect(result.center).toEqualEpsilon(
Cartographic.toCartesian(expectedCenter),
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
});
@@ -557,7 +568,7 @@ describe(
const position = Cartesian3.fromDegrees(
149.515332,
-34.984799,
- heightOffset,
+ heightOffset
);
const tileset = new Cesium3DTileset({
@@ -602,7 +613,7 @@ describe(
expectedCenter.height = heightOffset + 10.0;
expect(result.center).toEqualEpsilon(
Cartographic.toCartesian(expectedCenter),
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
});
@@ -653,7 +664,7 @@ describe(
expectedCenter.height = 20.0;
expect(result.center).toEqualEpsilon(
Cartographic.toCartesian(expectedCenter),
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
});
@@ -663,7 +674,7 @@ describe(
const position = Cartesian3.fromDegrees(
149.515332,
-34.984799,
- heightOffset,
+ heightOffset
);
const tileset = new Cesium3DTileset({
@@ -708,7 +719,7 @@ describe(
expectedCenter.height = heightOffset + 20.0;
expect(result.center).toEqualEpsilon(
Cartographic.toCartesian(expectedCenter),
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
});
@@ -721,7 +732,7 @@ describe(
testObject.model = model;
testObject.position = new ConstantProperty(
- new Cartesian3(5678, 1234, 1101112),
+ new Cartesian3(5678, 1234, 1101112)
);
model.uri = new ConstantProperty(boxUrl);
visualizer.update(time);
@@ -745,7 +756,7 @@ describe(
expect(state).toBe(BoundingSphereState.DONE);
const expected = BoundingSphere.clone(
primitive.boundingSphere,
- new BoundingSphere(),
+ new BoundingSphere()
);
expect(result).toEqual(expected);
});
@@ -765,7 +776,7 @@ describe(
testObject.model = model;
testObject.position = new ConstantProperty(
- new Cartesian3(5678, 1234, 1101112),
+ new Cartesian3(5678, 1234, 1101112)
);
model.uri = new ConstantProperty("/path/to/incorrect/file");
visualizer.update(time);
@@ -796,5 +807,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/DataSources/NodeTransformationPropertySpec.js b/packages/engine/Specs/DataSources/NodeTransformationPropertySpec.js
index f0d19cc567a4..1480f44dee7e 100644
--- a/packages/engine/Specs/DataSources/NodeTransformationPropertySpec.js
+++ b/packages/engine/Specs/DataSources/NodeTransformationPropertySpec.js
@@ -45,7 +45,7 @@ describe("DataSources/NodeTransformationProperty", function () {
const property = new NodeTransformationProperty();
property.translation = new ConstantProperty(Cartesian3.UNIT_Y);
property.rotation = new ConstantProperty(
- new Quaternion(0.5, 0.5, 0.5, 0.5),
+ new Quaternion(0.5, 0.5, 0.5, 0.5)
);
property.scale = new ConstantProperty(Cartesian3.UNIT_X);
@@ -68,21 +68,21 @@ describe("DataSources/NodeTransformationProperty", function () {
start: start,
stop: stop,
data: Cartesian3.UNIT_Y,
- }),
+ })
);
property.rotation.intervals.addInterval(
new TimeInterval({
start: start,
stop: stop,
data: new Quaternion(0.5, 0.5, 0.5, 0.5),
- }),
+ })
);
property.scale.intervals.addInterval(
new TimeInterval({
start: start,
stop: stop,
data: Cartesian3.UNIT_X,
- }),
+ })
);
expect(property.isConstant).toBe(false);
@@ -97,7 +97,7 @@ describe("DataSources/NodeTransformationProperty", function () {
const property = new NodeTransformationProperty();
property.translation = new ConstantProperty(Cartesian3.UNIT_Y);
property.rotation = new ConstantProperty(
- new Quaternion(0.5, 0.5, 0.5, 0.5),
+ new Quaternion(0.5, 0.5, 0.5, 0.5)
);
property.scale = new ConstantProperty(Cartesian3.UNIT_X);
@@ -150,19 +150,19 @@ describe("DataSources/NodeTransformationProperty", function () {
property,
"rotation",
Cartesian3.UNIT_X,
- Cartesian3.ZERO,
+ Cartesian3.ZERO
);
testDefinitionChanged(
property,
"translation",
new Quaternion(0.5, 0.5, 0.5, 0.5),
- Quaternion.ZERO,
+ Quaternion.ZERO
);
testDefinitionChanged(
property,
"scale",
Cartesian3.UNIT_X,
- Cartesian3.ZERO,
+ Cartesian3.ZERO
);
});
});
diff --git a/packages/engine/Specs/DataSources/PathGraphicsSpec.js b/packages/engine/Specs/DataSources/PathGraphicsSpec.js
index 39a7b6c9adad..664fedc68a95 100644
--- a/packages/engine/Specs/DataSources/PathGraphicsSpec.js
+++ b/packages/engine/Specs/DataSources/PathGraphicsSpec.js
@@ -34,7 +34,7 @@ describe("DataSources/PathGraphics", function () {
expect(path.trailTime.getValue()).toEqual(options.trailTime);
expect(path.resolution.getValue()).toEqual(options.resolution);
expect(path.distanceDisplayCondition.getValue()).toEqual(
- options.distanceDisplayCondition,
+ options.distanceDisplayCondition
);
});
@@ -47,7 +47,7 @@ describe("DataSources/PathGraphics", function () {
source.trailTime = new ConstantProperty(1);
source.resolution = new ConstantProperty(1);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(10.0, 20.0),
+ new DistanceDisplayCondition(10.0, 20.0)
);
const target = new PathGraphics();
@@ -59,7 +59,7 @@ describe("DataSources/PathGraphics", function () {
expect(target.trailTime).toBe(source.trailTime);
expect(target.resolution).toBe(source.resolution);
expect(target.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
});
@@ -72,7 +72,7 @@ describe("DataSources/PathGraphics", function () {
source.trailTime = new ConstantProperty(1);
source.resolution = new ConstantProperty(1);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(),
+ new DistanceDisplayCondition()
);
const color = new ColorMaterialProperty();
@@ -82,7 +82,7 @@ describe("DataSources/PathGraphics", function () {
const trailTime = new ConstantProperty(1);
const resolution = new ConstantProperty(1);
const distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(),
+ new DistanceDisplayCondition()
);
const target = new PathGraphics();
@@ -113,7 +113,7 @@ describe("DataSources/PathGraphics", function () {
source.trailTime = new ConstantProperty(1);
source.resolution = new ConstantProperty(1);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(),
+ new DistanceDisplayCondition()
);
const result = source.clone();
@@ -124,7 +124,7 @@ describe("DataSources/PathGraphics", function () {
expect(result.trailTime).toBe(source.trailTime);
expect(result.resolution).toBe(source.resolution);
expect(result.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
});
diff --git a/packages/engine/Specs/DataSources/PathVisualizerSpec.js b/packages/engine/Specs/DataSources/PathVisualizerSpec.js
index 0a6c1b78e4ea..ce9ecfff2787 100644
--- a/packages/engine/Specs/DataSources/PathVisualizerSpec.js
+++ b/packages/engine/Specs/DataSources/PathVisualizerSpec.js
@@ -144,12 +144,12 @@ describe(
path.material = new PolylineOutlineMaterialProperty();
path.material.color = new ConstantProperty(new Color(0.8, 0.7, 0.6, 0.5));
path.material.outlineColor = new ConstantProperty(
- new Color(0.1, 0.2, 0.3, 0.4),
+ new Color(0.1, 0.2, 0.3, 0.4)
);
path.material.outlineWidth = new ConstantProperty(2.5);
path.width = new ConstantProperty(12.5);
path.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(10.0, 20.0),
+ new DistanceDisplayCondition(10.0, 20.0)
);
path.leadTime = new ConstantProperty(25);
path.trailTime = new ConstantProperty(10);
@@ -165,39 +165,39 @@ describe(
JulianDate.addSeconds(
updateTime,
-path.trailTime.getValue(),
- new JulianDate(),
- ),
- ),
+ new JulianDate()
+ )
+ )
);
expect(primitive.positions[1]).toEqual(
- testObject.position.getValue(updateTime),
+ testObject.position.getValue(updateTime)
);
expect(primitive.positions[2]).toEqual(
testObject.position.getValue(
JulianDate.addSeconds(
updateTime,
path.leadTime.getValue(),
- new JulianDate(),
- ),
- ),
+ new JulianDate()
+ )
+ )
);
expect(primitive.show).toEqual(testObject.path.show.getValue(updateTime));
expect(primitive.width).toEqual(
- testObject.path.width.getValue(updateTime),
+ testObject.path.width.getValue(updateTime)
);
expect(primitive.distanceDisplayCondition).toEqual(
- testObject.path.distanceDisplayCondition.getValue(updateTime),
+ testObject.path.distanceDisplayCondition.getValue(updateTime)
);
const material = primitive.material;
expect(material.uniforms.color).toEqual(
- testObject.path.material.color.getValue(updateTime),
+ testObject.path.material.color.getValue(updateTime)
);
expect(material.uniforms.outlineColor).toEqual(
- testObject.path.material.outlineColor.getValue(updateTime),
+ testObject.path.material.outlineColor.getValue(updateTime)
);
expect(material.uniforms.outlineWidth).toEqual(
- testObject.path.material.outlineWidth.getValue(updateTime),
+ testObject.path.material.outlineWidth.getValue(updateTime)
);
path.show = new ConstantProperty(false);
@@ -225,7 +225,7 @@ describe(
path.material = new PolylineOutlineMaterialProperty();
path.material.color = new ConstantProperty(new Color(0.8, 0.7, 0.6, 0.5));
path.material.outlineColor = new ConstantProperty(
- new Color(0.1, 0.2, 0.3, 0.4),
+ new Color(0.1, 0.2, 0.3, 0.4)
);
path.material.outlineWidth = new ConstantProperty(2.5);
path.width = new ConstantProperty(12.5);
@@ -278,13 +278,13 @@ describe(
const material = primitive.material;
expect(material.uniforms.color).toEqual(
- testObject.path.material.color.getValue(updateTime),
+ testObject.path.material.color.getValue(updateTime)
);
expect(material.uniforms.glowPower).toEqual(
- testObject.path.material.glowPower.getValue(updateTime),
+ testObject.path.material.glowPower.getValue(updateTime)
);
expect(material.uniforms.taperPower).toEqual(
- testObject.path.material.taperPower.getValue(updateTime),
+ testObject.path.material.taperPower.getValue(updateTime)
);
});
@@ -361,7 +361,7 @@ describe(
const inertialPolylineCollection = scene.primitives.get(0);
expect(inertialPolylineCollection.length).toEqual(1);
expect(inertialPolylineCollection.modelMatrix).not.toEqual(
- Matrix4.IDENTITY,
+ Matrix4.IDENTITY
);
const inertialLine = inertialPolylineCollection.get(0);
@@ -498,7 +498,7 @@ describe(
it("subSample works for constant properties", function () {
const property = new ConstantPositionProperty(
- new Cartesian3(1000, 2000, 3000),
+ new Cartesian3(1000, 2000, 3000)
);
const start = new JulianDate(0, 0);
const stop = new JulianDate(1, 0);
@@ -511,14 +511,14 @@ describe(
stop,
updateTime,
referenceFrame,
- maximumStep,
+ maximumStep
);
expect(result).toEqual([property._value]);
});
it("subSample works for reference properties", function () {
const property = new ConstantPositionProperty(
- new Cartesian3(1000, 2000, 3000),
+ new Cartesian3(1000, 2000, 3000)
);
const start = new JulianDate(0, 0);
const stop = new JulianDate(1, 0);
@@ -540,7 +540,7 @@ describe(
stop,
updateTime,
referenceFrame,
- maximumStep,
+ maximumStep
);
expect(result).toEqual([property._value]);
});
@@ -567,7 +567,7 @@ describe(
updateTime,
referenceFrame,
maximumStep,
- result,
+ result
);
expect(result).toEqual([
property.getValue(start),
@@ -585,16 +585,16 @@ describe(
updateTime,
referenceFrame,
maximumStep,
- result,
+ result
);
expect(result).toEqual([
property.getValue(start),
property.getValue(
- JulianDate.addSeconds(start, expectedStep, new JulianDate()),
+ JulianDate.addSeconds(start, expectedStep, new JulianDate())
),
property.getValue(updateTime),
property.getValue(
- JulianDate.addSeconds(start, expectedStep * 2, new JulianDate()),
+ JulianDate.addSeconds(start, expectedStep * 2, new JulianDate())
),
property.getValue(stop),
]);
@@ -610,12 +610,12 @@ describe(
updateTime,
referenceFrame,
maximumStep,
- result,
+ result
);
expect(result).toEqual([
property.getValue(start),
property.getValue(
- JulianDate.addSeconds(start, expectedStep, new JulianDate()),
+ JulianDate.addSeconds(start, expectedStep, new JulianDate())
),
property.getValue(updateTime),
property.getValue(stop),
@@ -632,16 +632,16 @@ describe(
updateTime,
referenceFrame,
maximumStep,
- result,
+ result
);
expect(result).toEqual([
property.getValue(start),
property.getValue(updateTime),
property.getValue(
- JulianDate.addSeconds(start, expectedStep, new JulianDate()),
+ JulianDate.addSeconds(start, expectedStep, new JulianDate())
),
property.getValue(
- JulianDate.addSeconds(start, expectedStep * 2, new JulianDate()),
+ JulianDate.addSeconds(start, expectedStep * 2, new JulianDate())
),
property.getValue(stop),
]);
@@ -659,7 +659,7 @@ describe(
start: t1,
stop: t2,
data: new Cartesian3(0, 0, 1),
- }),
+ })
);
property.intervals.addInterval(
new TimeInterval({
@@ -668,14 +668,14 @@ describe(
isStartIncluded: false,
isStopIncluded: false,
data: new Cartesian3(0, 0, 2),
- }),
+ })
);
property.intervals.addInterval(
new TimeInterval({
start: t3,
stop: t4,
data: new Cartesian3(0, 0, 3),
- }),
+ })
);
const updateTime = new JulianDate(1, 43200);
@@ -689,7 +689,7 @@ describe(
updateTime,
referenceFrame,
maximumStep,
- result,
+ result
);
expect(result).toEqual([
new Cartesian3(0, 0, 1),
@@ -704,7 +704,7 @@ describe(
updateTime,
referenceFrame,
maximumStep,
- result,
+ result
);
expect(result).toEqual([
new Cartesian3(0, 0, 1),
@@ -719,7 +719,7 @@ describe(
updateTime,
referenceFrame,
maximumStep,
- result,
+ result
);
expect(result).toEqual([new Cartesian3(0, 0, 1)]);
@@ -730,7 +730,7 @@ describe(
updateTime,
referenceFrame,
maximumStep,
- result,
+ result
);
expect(result).toEqual([new Cartesian3(0, 0, 3)]);
});
@@ -767,22 +767,22 @@ describe(
updateTime,
referenceFrame,
maximumStep,
- result,
+ result
);
expect(result).toEqual([
property.getValue(t1),
property.getValue(
- JulianDate.addSeconds(t1, maximumStep, new JulianDate()),
+ JulianDate.addSeconds(t1, maximumStep, new JulianDate())
),
property.getValue(
- JulianDate.addSeconds(t1, maximumStep * 2, new JulianDate()),
+ JulianDate.addSeconds(t1, maximumStep * 2, new JulianDate())
),
property.getValue(updateTime),
property.getValue(
- JulianDate.addSeconds(t1, maximumStep * 3, new JulianDate()),
+ JulianDate.addSeconds(t1, maximumStep * 3, new JulianDate())
),
property.getValue(
- JulianDate.addSeconds(t1, maximumStep * 4, new JulianDate()),
+ JulianDate.addSeconds(t1, maximumStep * 4, new JulianDate())
),
]);
});
@@ -801,7 +801,7 @@ describe(
return innerProperty.getValueInReferenceFrame(
time,
referenceFrame,
- result,
+ result
);
};
@@ -835,28 +835,28 @@ describe(
updateTime,
referenceFrame,
maximumStep,
- result,
+ result
);
expect(result).toEqual([
sampledProperty.getValue(t1),
sampledProperty.getValue(
- JulianDate.addSeconds(t1, maximumStep, new JulianDate()),
+ JulianDate.addSeconds(t1, maximumStep, new JulianDate())
),
sampledProperty.getValue(
- JulianDate.addSeconds(t1, maximumStep * 2, new JulianDate()),
+ JulianDate.addSeconds(t1, maximumStep * 2, new JulianDate())
),
sampledProperty.getValue(updateTime),
sampledProperty.getValue(
- JulianDate.addSeconds(t1, maximumStep * 3, new JulianDate()),
+ JulianDate.addSeconds(t1, maximumStep * 3, new JulianDate())
),
sampledProperty.getValue(
- JulianDate.addSeconds(t1, maximumStep * 4, new JulianDate()),
+ JulianDate.addSeconds(t1, maximumStep * 4, new JulianDate())
),
sampledProperty.getValue(
- JulianDate.addSeconds(t1, maximumStep * 5, new JulianDate()),
+ JulianDate.addSeconds(t1, maximumStep * 5, new JulianDate())
),
sampledProperty.getValue(
- JulianDate.addSeconds(t1, maximumStep * 6, new JulianDate()),
+ JulianDate.addSeconds(t1, maximumStep * 6, new JulianDate())
),
]);
});
@@ -870,7 +870,7 @@ describe(
const t6 = new JulianDate(5, 0);
const constantProperty = new ConstantPositionProperty(
- new Cartesian3(0, 0, 1),
+ new Cartesian3(0, 0, 1)
);
const intervalProperty = new TimeIntervalCollectionPositionProperty();
@@ -879,7 +879,7 @@ describe(
start: t1,
stop: t2,
data: new Cartesian3(0, 0, 1),
- }),
+ })
);
intervalProperty.intervals.addInterval(
new TimeInterval({
@@ -888,14 +888,14 @@ describe(
isStartIncluded: false,
isStopIncluded: false,
data: new Cartesian3(0, 0, 2),
- }),
+ })
);
intervalProperty.intervals.addInterval(
new TimeInterval({
start: t1,
stop: t2,
data: new Cartesian3(0, 0, 3),
- }),
+ })
);
const sampledProperty = new SampledPositionProperty();
@@ -907,7 +907,7 @@ describe(
const entities = new EntityCollection();
const targetEntity = entities.getOrCreateEntity("target");
targetEntity.position = new ConstantPositionProperty(
- new Cartesian3(0, 0, 5),
+ new Cartesian3(0, 0, 5)
);
const referenceProperty = new ReferenceProperty(entities, "target", [
"position",
@@ -921,7 +921,7 @@ describe(
start: t1,
stop: t2,
data: intervalProperty,
- }),
+ })
);
property.intervals.addInterval(
new TimeInterval({
@@ -930,14 +930,14 @@ describe(
isStartIncluded: false,
isStopIncluded: false,
data: constantProperty,
- }),
+ })
);
property.intervals.addInterval(
new TimeInterval({
start: t3,
stop: t4,
data: sampledProperty,
- }),
+ })
);
property.intervals.addInterval(
new TimeInterval({
@@ -946,7 +946,7 @@ describe(
isStartIncluded: false,
isStopIncluded: true,
data: referenceProperty,
- }),
+ })
);
property.intervals.addInterval(
new TimeInterval({
@@ -955,7 +955,7 @@ describe(
isStartIncluded: false,
isStopIncluded: true,
data: scaledProperty,
- }),
+ })
);
const updateTime = new JulianDate(0, 0);
@@ -979,14 +979,14 @@ describe(
updateTime,
referenceFrame,
maximumStep,
- result,
+ result
);
expect(result).toEqual([
intervalProperty.intervals.get(0).data,
constantProperty.getValue(t1),
sampledProperty.getValue(t3),
sampledProperty.getValue(
- JulianDate.addSeconds(t3, maximumStep, new JulianDate()),
+ JulianDate.addSeconds(t3, maximumStep, new JulianDate())
),
sampledProperty.getValue(t4),
targetEntity.position.getValue(t5),
@@ -1002,5 +1002,5 @@ describe(
createCompositeTest(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/DataSources/PlaneGeometryUpdaterSpec.js b/packages/engine/Specs/DataSources/PlaneGeometryUpdaterSpec.js
index a90e9039abaf..b120f02f216b 100644
--- a/packages/engine/Specs/DataSources/PlaneGeometryUpdaterSpec.js
+++ b/packages/engine/Specs/DataSources/PlaneGeometryUpdaterSpec.js
@@ -33,12 +33,12 @@ describe(
function createBasicPlane() {
const planeGraphics = new PlaneGraphics();
planeGraphics.plane = new ConstantProperty(
- new Plane(Cartesian3.UNIT_X, 0.0),
+ new Plane(Cartesian3.UNIT_X, 0.0)
);
planeGraphics.dimensions = new ConstantProperty(new Cartesian2(1.0, 2.0));
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- Cartesian3.fromDegrees(0, 0, 0),
+ Cartesian3.fromDegrees(0, 0, 0)
);
entity.plane = planeGraphics;
return entity;
@@ -47,7 +47,7 @@ describe(
function createDynamicPlane() {
const entity = createBasicPlane();
entity.plane.plane = createDynamicProperty(
- new Plane(Cartesian3.UNIT_X, 0.0),
+ new Plane(Cartesian3.UNIT_X, 0.0)
);
entity.plane.dimensions = createDynamicProperty(new Cartesian2(1.0, 2.0));
return entity;
@@ -77,7 +77,7 @@ describe(
const updater = new PlaneGeometryUpdater(entity, scene);
const dynamicUpdater = updater.createDynamicUpdater(
new PrimitiveCollection(),
- new PrimitiveCollection(),
+ new PrimitiveCollection()
);
dynamicUpdater.update(JulianDate.now());
@@ -121,15 +121,15 @@ describe(
PlaneGeometryUpdater,
"plane",
createBasicPlane,
- getScene,
+ getScene
);
createDynamicGeometryUpdaterSpecs(
PlaneGeometryUpdater,
"plane",
createDynamicPlane,
- getScene,
+ getScene
);
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/DataSources/PlaneGraphicsSpec.js b/packages/engine/Specs/DataSources/PlaneGraphicsSpec.js
index 657decac19a2..bdcaf48fc3b1 100644
--- a/packages/engine/Specs/DataSources/PlaneGraphicsSpec.js
+++ b/packages/engine/Specs/DataSources/PlaneGraphicsSpec.js
@@ -50,7 +50,7 @@ describe("DataSources/PlaneGraphics", function () {
expect(plane.dimensions.getValue()).toEqual(options.dimensions);
expect(plane.shadows.getValue()).toEqual(options.shadows);
expect(plane.distanceDisplayCondition.getValue()).toEqual(
- options.distanceDisplayCondition,
+ options.distanceDisplayCondition
);
});
@@ -66,7 +66,7 @@ describe("DataSources/PlaneGraphics", function () {
source.dimensions = new ConstantProperty();
source.shadows = new ConstantProperty(ShadowMode.ENABLED);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
const target = new PlaneGraphics();
@@ -82,7 +82,7 @@ describe("DataSources/PlaneGraphics", function () {
expect(target.dimensions).toBe(source.dimensions);
expect(target.shadows).toBe(source.shadows);
expect(target.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
});
@@ -150,7 +150,7 @@ describe("DataSources/PlaneGraphics", function () {
expect(result.dimensions).toBe(source.dimensions);
expect(result.shadows).toBe(source.shadows);
expect(result.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
});
@@ -173,25 +173,25 @@ describe("DataSources/PlaneGraphics", function () {
property,
"plane",
new Plane(Cartesian3.UNIT_X, 0.0),
- new Plane(Cartesian3.UNIT_Z, 1.0),
+ new Plane(Cartesian3.UNIT_Z, 1.0)
);
testDefinitionChanged(
property,
"dimensions",
new Cartesian2(0.0, 0.0),
- new Cartesian2(1.0, 1.0),
+ new Cartesian2(1.0, 1.0)
);
testDefinitionChanged(
property,
"shadows",
ShadowMode.ENABLED,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
testDefinitionChanged(
property,
"distanceDisplayCondition",
new DistanceDisplayCondition(),
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
});
});
diff --git a/packages/engine/Specs/DataSources/PointGraphicsSpec.js b/packages/engine/Specs/DataSources/PointGraphicsSpec.js
index 7178ecc790e6..699e801e71de 100644
--- a/packages/engine/Specs/DataSources/PointGraphicsSpec.js
+++ b/packages/engine/Specs/DataSources/PointGraphicsSpec.js
@@ -43,10 +43,10 @@ describe("DataSources/PointGraphics", function () {
expect(point.scaleByDistance.getValue()).toEqual(options.scaleByDistance);
expect(point.heightReference.getValue()).toEqual(options.heightReference);
expect(point.distanceDisplayCondition.getValue()).toEqual(
- options.distanceDisplayCondition,
+ options.distanceDisplayCondition
);
expect(point.disableDepthTestDistance.getValue()).toEqual(
- options.disableDepthTestDistance,
+ options.disableDepthTestDistance
);
expect(point.splitDirection.getValue()).toEqual(options.splitDirection);
});
@@ -60,10 +60,10 @@ describe("DataSources/PointGraphics", function () {
source.show = new ConstantProperty(true);
source.scaleByDistance = new ConstantProperty(new NearFarScalar());
source.heightReference = new ConstantProperty(
- HeightReference.RELATIVE_TO_GROUND,
+ HeightReference.RELATIVE_TO_GROUND
);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
source.disableDepthTestDistance = new ConstantProperty(10.0);
source.splitDirection = new ConstantProperty(SplitDirection.LEFT);
@@ -78,10 +78,10 @@ describe("DataSources/PointGraphics", function () {
expect(target.scaleByDistance).toBe(source.scaleByDistance);
expect(target.heightReference).toBe(source.heightReference);
expect(target.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
expect(target.disableDepthTestDistance).toBe(
- source.disableDepthTestDistance,
+ source.disableDepthTestDistance
);
expect(target.splitDirection).toBe(source.splitDirection);
});
@@ -95,10 +95,10 @@ describe("DataSources/PointGraphics", function () {
source.show = new ConstantProperty(true);
source.scaleByDistance = new ConstantProperty(new NearFarScalar());
source.heightReference = new ConstantProperty(
- HeightReference.RELATIVE_TO_GROUND,
+ HeightReference.RELATIVE_TO_GROUND
);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
source.disableDepthTestDistance = new ConstantProperty(10.0);
source.splitDirection = new ConstantProperty(SplitDirection.LEFT);
@@ -109,10 +109,10 @@ describe("DataSources/PointGraphics", function () {
const outlineWidth = new ConstantProperty(1);
const show = new ConstantProperty(true);
const heightReference = new ConstantProperty(
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
const distanDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
const disableDepthTestDistance = new ConstantProperty(20.0);
const splitDirection = new ConstantProperty(SplitDirection.RIGHT);
@@ -151,10 +151,10 @@ describe("DataSources/PointGraphics", function () {
source.show = new ConstantProperty(true);
source.scaleByDistance = new ConstantProperty(new NearFarScalar());
source.heightReference = new ConstantProperty(
- HeightReference.RELATIVE_TO_GROUND,
+ HeightReference.RELATIVE_TO_GROUND
);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
source.disableDepthTestDistance = new ConstantProperty(10.0);
source.splitDirection = new ConstantProperty(SplitDirection.LEFT);
@@ -168,10 +168,10 @@ describe("DataSources/PointGraphics", function () {
expect(result.scaleByDistance).toBe(source.scaleByDistance);
expect(result.heightReference).toBe(source.heightReference);
expect(result.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
expect(result.disableDepthTestDistance).toBe(
- source.disableDepthTestDistance,
+ source.disableDepthTestDistance
);
expect(result.splitDirection).toBe(source.splitDirection);
});
diff --git a/packages/engine/Specs/DataSources/PointVisualizerSpec.js b/packages/engine/Specs/DataSources/PointVisualizerSpec.js
index 1f9577df23dc..6f17a7e0b033 100644
--- a/packages/engine/Specs/DataSources/PointVisualizerSpec.js
+++ b/packages/engine/Specs/DataSources/PointVisualizerSpec.js
@@ -117,7 +117,7 @@ describe(
const testObject = entityCollection.getOrCreateEntity("test");
testObject.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
visualizer.update(JulianDate.now());
expect(scene.primitives.length).toEqual(0);
@@ -167,23 +167,23 @@ describe(
expect(pointPrimitive.show).toEqual(point.show.getValue(time));
expect(pointPrimitive.position).toEqual(entity.position.getValue(time));
expect(pointPrimitive.scaleByDistance).toEqual(
- point.scaleByDistance.getValue(time),
+ point.scaleByDistance.getValue(time)
);
expect(pointPrimitive.color).toEqual(point.color.getValue(time));
expect(pointPrimitive.outlineColor).toEqual(
- point.outlineColor.getValue(time),
+ point.outlineColor.getValue(time)
);
expect(pointPrimitive.outlineWidth).toEqual(
- point.outlineWidth.getValue(time),
+ point.outlineWidth.getValue(time)
);
expect(pointPrimitive.distanceDisplayCondition).toEqual(
- point.distanceDisplayCondition.getValue(time),
+ point.distanceDisplayCondition.getValue(time)
);
expect(pointPrimitive.disableDepthTestDistance).toEqual(
- point.disableDepthTestDistance.getValue(time),
+ point.disableDepthTestDistance.getValue(time)
);
expect(pointPrimitive.splitDirection).toEqual(
- point.splitDirection.getValue(time),
+ point.splitDirection.getValue(time)
);
point.color = new Color(0.15, 0.16, 0.17, 0.18);
@@ -193,7 +193,7 @@ describe(
point.scaleByDistance = new NearFarScalar(25, 26, 27, 28);
point.distanceDisplayCondition = new DistanceDisplayCondition(
1000.0,
- 1000000.0,
+ 1000000.0
);
point.disableDepthTestDistance = 20.0;
point.splitDirection = SplitDirection.RIGHT;
@@ -203,23 +203,23 @@ describe(
expect(pointPrimitive.show).toEqual(point.show.getValue(time));
expect(pointPrimitive.position).toEqual(entity.position.getValue(time));
expect(pointPrimitive.scaleByDistance).toEqual(
- point.scaleByDistance.getValue(time),
+ point.scaleByDistance.getValue(time)
);
expect(pointPrimitive.color).toEqual(point.color.getValue(time));
expect(pointPrimitive.outlineColor).toEqual(
- point.outlineColor.getValue(time),
+ point.outlineColor.getValue(time)
);
expect(pointPrimitive.outlineWidth).toEqual(
- point.outlineWidth.getValue(time),
+ point.outlineWidth.getValue(time)
);
expect(pointPrimitive.distanceDisplayCondition).toEqual(
- point.distanceDisplayCondition.getValue(time),
+ point.distanceDisplayCondition.getValue(time)
);
expect(pointPrimitive.disableDepthTestDistance).toEqual(
- point.disableDepthTestDistance.getValue(time),
+ point.disableDepthTestDistance.getValue(time)
);
expect(pointPrimitive.splitDirection).toEqual(
- point.splitDirection.getValue(time),
+ point.splitDirection.getValue(time)
);
point.show = false;
@@ -260,16 +260,16 @@ describe(
expect(billboard.show).toEqual(point.show.getValue(time));
expect(billboard.position).toEqual(entity.position.getValue(time));
expect(billboard.scaleByDistance).toEqual(
- point.scaleByDistance.getValue(time),
+ point.scaleByDistance.getValue(time)
);
expect(billboard.distanceDisplayCondition).toEqual(
- point.distanceDisplayCondition.getValue(time),
+ point.distanceDisplayCondition.getValue(time)
);
expect(billboard.disableDepthTestDistance).toEqual(
- point.disableDepthTestDistance.getValue(time),
+ point.disableDepthTestDistance.getValue(time)
);
expect(billboard.splitDirection).toEqual(
- point.splitDirection.getValue(time),
+ point.splitDirection.getValue(time)
);
//expect(billboard.color).toEqual(point.color.getValue(time));
//expect(billboard.outlineColor).toEqual(point.outlineColor.getValue(time));
@@ -282,7 +282,7 @@ describe(
point.scaleByDistance = new NearFarScalar(25, 26, 27, 28);
point.distanceDisplayCondition = new DistanceDisplayCondition(
1000.0,
- 1000000.0,
+ 1000000.0
);
point.disableDepthTestDistance = 20.0;
@@ -291,13 +291,13 @@ describe(
expect(billboard.show).toEqual(point.show.getValue(time));
expect(billboard.position).toEqual(entity.position.getValue(time));
expect(billboard.scaleByDistance).toEqual(
- point.scaleByDistance.getValue(time),
+ point.scaleByDistance.getValue(time)
);
expect(billboard.distanceDisplayCondition).toEqual(
- point.distanceDisplayCondition.getValue(time),
+ point.distanceDisplayCondition.getValue(time)
);
expect(billboard.disableDepthTestDistance).toEqual(
- point.disableDepthTestDistance.getValue(time),
+ point.disableDepthTestDistance.getValue(time)
);
//expect(billboard.color).toEqual(point.color.getValue(time));
//expect(billboard.outlineColor).toEqual(point.outlineColor.getValue(time));
@@ -315,7 +315,7 @@ describe(
const testObject = entityCollection.getOrCreateEntity("test");
testObject.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
testObject.point = new PointGraphics();
testObject.point.show = new ConstantProperty(true);
@@ -333,7 +333,7 @@ describe(
const testObject2 = entityCollection.getOrCreateEntity("test2");
testObject2.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
testObject2.point = new PointGraphics();
testObject2.point.show = new ConstantProperty(true);
@@ -349,7 +349,7 @@ describe(
const time = JulianDate.now();
testObject.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
const point = (testObject.point = new PointGraphics());
point.show = new ConstantProperty(true);
@@ -376,7 +376,7 @@ describe(
const point = (testObject.point = new PointGraphics());
testObject.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
point.show = new ConstantProperty(true);
@@ -397,7 +397,7 @@ describe(
const point = (testObject.point = new PointGraphics());
testObject.position = new ConstantProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
point.show = new ConstantProperty(true);
@@ -439,5 +439,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/DataSources/PolygonGeometryUpdaterSpec.js b/packages/engine/Specs/DataSources/PolygonGeometryUpdaterSpec.js
index 8f48605dcf26..7e01741214fa 100644
--- a/packages/engine/Specs/DataSources/PolygonGeometryUpdaterSpec.js
+++ b/packages/engine/Specs/DataSources/PolygonGeometryUpdaterSpec.js
@@ -56,8 +56,8 @@ describe(
const polygon = new PolygonGraphics();
polygon.hierarchy = new ConstantProperty(
new PolygonHierarchy(
- Cartesian3.fromRadiansArray([-1, -1, 1, -1, 1, 1, -1, 1]),
- ),
+ Cartesian3.fromRadiansArray([-1, -1, 1, -1, 1, 1, -1, 1])
+ )
);
polygon.height = new ConstantProperty(0);
const entity = new Entity();
@@ -70,9 +70,17 @@ describe(
polygon.hierarchy = new ConstantProperty(
new PolygonHierarchy(
Cartesian3.fromDegreesArrayHeights([
- -1.0, 1.0, 0.0, -2.0, 1.0, 0.0, -2.0, 1.0, 0.0,
- ]),
- ),
+ -1.0,
+ 1.0,
+ 0.0,
+ -2.0,
+ 1.0,
+ 0.0,
+ -2.0,
+ 1.0,
+ 0.0,
+ ])
+ )
);
polygon.perPositionHeight = true;
const entity = new Entity();
@@ -90,8 +98,8 @@ describe(
const polygon = new PolygonGraphics();
polygon.hierarchy = new ConstantProperty(
new PolygonHierarchy(
- Cartesian3.fromRadiansArray([0, 0, 1, 0, 1, 1, 0, 1]),
- ),
+ Cartesian3.fromRadiansArray([0, 0, 1, 0, 1, 1, 0, 1])
+ )
);
const entity = new Entity();
entity.polygon = polygon;
@@ -231,7 +239,7 @@ describe(
const polygon = entity.polygon;
polygon.outline = true;
polygon.perPositionHeight = new ConstantProperty(
- options.perPositionHeight,
+ options.perPositionHeight
);
polygon.closeTop = new ConstantProperty(options.closeTop);
polygon.closeBottom = new ConstantProperty(options.closeBottom);
@@ -241,7 +249,7 @@ describe(
polygon.granularity = new ConstantProperty(options.granularity);
polygon.arcType = new ConstantProperty(options.arcType);
polygon.textureCoordinates = new ConstantProperty(
- options.textureCoordinates,
+ options.textureCoordinates
);
const updater = new PolygonGeometryUpdater(entity, scene);
@@ -334,10 +342,10 @@ describe(
let instance;
graphics.heightReference = new ConstantProperty(
- HeightReference.RELATIVE_TO_GROUND,
+ HeightReference.RELATIVE_TO_GROUND
);
graphics.extrudedHeightReference = new ConstantProperty(
- HeightReference.RELATIVE_TO_GROUND,
+ HeightReference.RELATIVE_TO_GROUND
);
updater._onEntityPropertyChanged(entity, "polygon");
instance = updater.createFillGeometryInstance(time);
@@ -350,8 +358,8 @@ describe(
const polygon = new PolygonGraphics();
polygon.hierarchy = createDynamicProperty(
new PolygonHierarchy(
- Cartesian3.fromRadiansArray([0, 0, 1, 0, 1, 1, 0, 1]),
- ),
+ Cartesian3.fromRadiansArray([0, 0, 1, 0, 1, 1, 0, 1])
+ )
);
polygon.height = createDynamicProperty(3);
polygon.extrudedHeight = createDynamicProperty(2);
@@ -376,7 +384,7 @@ describe(
const updater = new PolygonGeometryUpdater(entity, scene);
const dynamicUpdater = updater.createDynamicUpdater(
new PrimitiveCollection(),
- new PrimitiveCollection(),
+ new PrimitiveCollection()
);
dynamicUpdater.update(time);
@@ -386,12 +394,12 @@ describe(
expect(options.height).toEqual(polygon.height.getValue());
expect(options.extrudedHeight).toEqual(polygon.extrudedHeight.getValue());
expect(options.perPositionHeight).toEqual(
- polygon.perPositionHeight.getValue(),
+ polygon.perPositionHeight.getValue()
);
expect(options.granularity).toEqual(polygon.granularity.getValue());
expect(options.stRotation).toEqual(polygon.stRotation.getValue());
expect(options.textureCoordinates).toEqual(
- polygon.textureCoordinates.getValue(),
+ polygon.textureCoordinates.getValue()
);
expect(options.closeTop).toEqual(polygon.closeTop.getValue());
expect(options.closeBottom).toEqual(polygon.closeBottom.getValue());
@@ -446,7 +454,7 @@ describe(
result = Ellipsoid.WGS84.scaleToGeodeticSurface(result, result);
expect(result).toEqualEpsilon(
Cartesian3.fromDegrees(0.0, 0.0),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -458,14 +466,14 @@ describe(
PolygonGeometryUpdater,
"polygon",
createBasicPolygon,
- getScene,
+ getScene
);
createDynamicGeometryUpdaterSpecs(
PolygonGeometryUpdater,
"polygon",
createDynamicPolygon,
- getScene,
+ getScene
);
createGeometryUpdaterGroundGeometrySpecs(
@@ -473,8 +481,8 @@ describe(
"polygon",
createBasicPolygonWithoutHeight,
createDynamicPolygonWithoutHeight,
- getScene,
+ getScene
);
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/DataSources/PolygonGraphicsSpec.js b/packages/engine/Specs/DataSources/PolygonGraphicsSpec.js
index 4e39288e1607..232bee6b194c 100644
--- a/packages/engine/Specs/DataSources/PolygonGraphicsSpec.js
+++ b/packages/engine/Specs/DataSources/PolygonGraphicsSpec.js
@@ -69,7 +69,7 @@ describe("DataSources/PolygonGraphics", function () {
expect(polygon.granularity.getValue()).toEqual(options.granularity);
expect(polygon.stRotation.getValue()).toEqual(options.stRotation);
expect(polygon.perPositionHeight.getValue()).toEqual(
- options.perPositionHeight,
+ options.perPositionHeight
);
expect(polygon.fill.getValue()).toEqual(options.fill);
expect(polygon.outline.getValue()).toEqual(options.outline);
@@ -79,15 +79,15 @@ describe("DataSources/PolygonGraphics", function () {
expect(polygon.closeBottom.getValue()).toEqual(options.closeBottom);
expect(polygon.shadows.getValue()).toEqual(options.shadows);
expect(polygon.distanceDisplayCondition.getValue()).toEqual(
- options.distanceDisplayCondition,
+ options.distanceDisplayCondition
);
expect(polygon.classificationType.getValue()).toEqual(
- options.classificationType,
+ options.classificationType
);
expect(polygon.arcType.getValue()).toEqual(options.arcType);
expect(polygon.zIndex.getValue()).toEqual(22);
expect(polygon.textureCoordinates.getValue()).toEqual(
- options.textureCoordinates,
+ options.textureCoordinates
);
});
@@ -109,10 +109,10 @@ describe("DataSources/PolygonGraphics", function () {
source.closeBottom = new ConstantProperty();
source.shadows = new ConstantProperty(ShadowMode.ENABLED);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(),
+ new DistanceDisplayCondition()
);
source.classificationType = new ConstantProperty(
- ClassificationType.TERRAIN,
+ ClassificationType.TERRAIN
);
source.arcType = new ConstantProperty(ArcType.RHUMB);
source.zIndex = new ConstantProperty(30);
@@ -137,7 +137,7 @@ describe("DataSources/PolygonGraphics", function () {
expect(target.closeBottom).toBe(source.closeBottom);
expect(target.shadows).toBe(source.shadows);
expect(target.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
expect(target.classificationType).toBe(source.classificationType);
expect(target.arcType).toBe(source.arcType);
@@ -255,7 +255,7 @@ describe("DataSources/PolygonGraphics", function () {
expect(result.closeBottom).toBe(source.closeBottom);
expect(result.shadows).toBe(source.shadows);
expect(result.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
expect(result.classificationType).toBe(source.classificationType);
expect(result.arcType).toBe(source.arcType);
@@ -290,19 +290,19 @@ describe("DataSources/PolygonGraphics", function () {
property,
"shadows",
ShadowMode.ENABLED,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
testDefinitionChanged(
property,
"distanceDisplayCondition",
new DistanceDisplayCondition(),
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
testDefinitionChanged(
property,
"classificationType",
ClassificationType.TERRAIN,
- ClassificationType.BOTH,
+ ClassificationType.BOTH
);
testDefinitionChanged(property, "arcType", ArcType.GEODESIC, ArcType.RHUMB);
testDefinitionChanged(property, "zIndex", 54, 3);
diff --git a/packages/engine/Specs/DataSources/PolylineArrowMaterialPropertySpec.js b/packages/engine/Specs/DataSources/PolylineArrowMaterialPropertySpec.js
index 20e8126809a2..86cbc357d388 100644
--- a/packages/engine/Specs/DataSources/PolylineArrowMaterialPropertySpec.js
+++ b/packages/engine/Specs/DataSources/PolylineArrowMaterialPropertySpec.js
@@ -45,7 +45,7 @@ describe("DataSources/PolylineArrowMaterialProperty", function () {
start: start,
stop: stop,
data: Color.BLUE,
- }),
+ })
);
expect(property.isConstant).toBe(false);
@@ -90,7 +90,7 @@ describe("DataSources/PolylineArrowMaterialProperty", function () {
property,
"color",
property.color,
- oldValue,
+ oldValue
);
listener.calls.reset();
@@ -99,7 +99,7 @@ describe("DataSources/PolylineArrowMaterialProperty", function () {
property,
"color",
property.color,
- property.color,
+ property.color
);
listener.calls.reset();
diff --git a/packages/engine/Specs/DataSources/PolylineDashMaterialPropertySpec.js b/packages/engine/Specs/DataSources/PolylineDashMaterialPropertySpec.js
index 4293d01aea33..1e0b938b4d07 100644
--- a/packages/engine/Specs/DataSources/PolylineDashMaterialPropertySpec.js
+++ b/packages/engine/Specs/DataSources/PolylineDashMaterialPropertySpec.js
@@ -67,28 +67,28 @@ describe("DataSources/PolylineDashMaterialProperty", function () {
start: start,
stop: stop,
data: Color.BLUE,
- }),
+ })
);
property.gapColor.intervals.addInterval(
new TimeInterval({
start: start,
stop: stop,
data: Color.YELLOW,
- }),
+ })
);
property.dashLength.intervals.addInterval(
new TimeInterval({
start: start,
stop: stop,
data: 10.0,
- }),
+ })
);
property.dashPattern.intervals.addInterval(
new TimeInterval({
start: start,
stop: stop,
data: 11.0,
- }),
+ })
);
const result = property.getValue(start);
@@ -152,7 +152,7 @@ describe("DataSources/PolylineDashMaterialProperty", function () {
property,
"color",
property.color,
- oldValue,
+ oldValue
);
listener.calls.reset();
@@ -161,7 +161,7 @@ describe("DataSources/PolylineDashMaterialProperty", function () {
property,
"color",
property.color,
- property.color,
+ property.color
);
listener.calls.reset();
@@ -175,7 +175,7 @@ describe("DataSources/PolylineDashMaterialProperty", function () {
property,
"gapColor",
property.gapColor,
- oldValue,
+ oldValue
);
listener.calls.reset();
@@ -184,7 +184,7 @@ describe("DataSources/PolylineDashMaterialProperty", function () {
property,
"gapColor",
property.gapColor,
- property.gapColor,
+ property.gapColor
);
listener.calls.reset();
@@ -198,7 +198,7 @@ describe("DataSources/PolylineDashMaterialProperty", function () {
property,
"dashLength",
property.dashLength,
- oldValue,
+ oldValue
);
listener.calls.reset();
@@ -207,7 +207,7 @@ describe("DataSources/PolylineDashMaterialProperty", function () {
property,
"dashLength",
property.dashLength,
- property.dashLength,
+ property.dashLength
);
listener.calls.reset();
@@ -220,7 +220,7 @@ describe("DataSources/PolylineDashMaterialProperty", function () {
property,
"dashPattern",
property.dashPattern,
- oldValue,
+ oldValue
);
listener.calls.reset();
@@ -229,7 +229,7 @@ describe("DataSources/PolylineDashMaterialProperty", function () {
property,
"dashPattern",
property.dashPattern,
- property.dashPattern,
+ property.dashPattern
);
listener.calls.reset();
@@ -255,7 +255,7 @@ describe("DataSources/PolylineDashMaterialProperty", function () {
start: start,
stop: stop,
data: Color.RED,
- }),
+ })
);
expect(property.isConstant).toBe(false);
@@ -268,7 +268,7 @@ describe("DataSources/PolylineDashMaterialProperty", function () {
start: start,
stop: stop,
data: Color.RED,
- }),
+ })
);
expect(property.isConstant).toBe(false);
property.gapColor = undefined;
@@ -280,7 +280,7 @@ describe("DataSources/PolylineDashMaterialProperty", function () {
start: start,
stop: stop,
data: 3.0,
- }),
+ })
);
expect(property.isConstant).toBe(false);
@@ -292,7 +292,7 @@ describe("DataSources/PolylineDashMaterialProperty", function () {
start: start,
stop: stop,
data: 3.0,
- }),
+ })
);
expect(property.isConstant).toBe(false);
});
diff --git a/packages/engine/Specs/DataSources/PolylineGeometryUpdaterSpec.js b/packages/engine/Specs/DataSources/PolylineGeometryUpdaterSpec.js
index 285941f48ea0..cfcbba4cdccc 100644
--- a/packages/engine/Specs/DataSources/PolylineGeometryUpdaterSpec.js
+++ b/packages/engine/Specs/DataSources/PolylineGeometryUpdaterSpec.js
@@ -58,7 +58,14 @@ describe(
const time = JulianDate.now();
const basicPositions = Cartesian3.fromRadiansArray([
- 0, 0, 1, 0, 1, 1, 0, 1,
+ 0,
+ 0,
+ 1,
+ 0,
+ 1,
+ 1,
+ 0,
+ 1,
]);
function createBasicPolyline() {
const polyline = new PolylineGraphics();
@@ -122,7 +129,7 @@ describe(
expect(updater.isClosed).toBe(false);
expect(updater.fillEnabled).toBe(true);
expect(updater.fillMaterialProperty).toEqual(
- new ColorMaterialProperty(Color.WHITE),
+ new ColorMaterialProperty(Color.WHITE)
);
expect(updater.depthFailMaterialProperty).toBe(undefined);
expect(updater.outlineEnabled).toBe(false);
@@ -130,10 +137,10 @@ describe(
expect(updater.hasConstantOutline).toBe(true);
expect(updater.outlineColorProperty).toBe(undefined);
expect(updater.shadowsProperty).toEqual(
- new ConstantProperty(ShadowMode.DISABLED),
+ new ConstantProperty(ShadowMode.DISABLED)
);
expect(updater.distanceDisplayConditionProperty).toEqual(
- new ConstantProperty(new DistanceDisplayCondition()),
+ new ConstantProperty(new DistanceDisplayCondition())
);
expect(updater.isDynamic).toBe(false);
expect(updater.clampToGround).toBe(false);
@@ -153,7 +160,7 @@ describe(
const updater = new PolylineGeometryUpdater(entity, scene);
entity.polyline.depthFailMaterial = new ColorMaterialProperty();
expect(updater.depthFailMaterialProperty).toBe(
- entity.polyline.depthFailMaterial,
+ entity.polyline.depthFailMaterial
);
});
@@ -187,7 +194,7 @@ describe(
start: new JulianDate(0, 0),
stop: new JulianDate(10, 0),
data: ArcType.NONE,
- }),
+ })
);
const entity = createBasicPolyline();
@@ -264,8 +271,8 @@ describe(
) {
expect(attributes.depthFailColor.value).toEqual(
ColorGeometryInstanceAttribute.toValue(
- options.depthFailMaterial.color.getValue(time),
- ),
+ options.depthFailMaterial.color.getValue(time)
+ )
);
} else {
expect(attributes.depthFailColor).toBeUndefined();
@@ -275,20 +282,20 @@ describe(
if (options.material instanceof ColorMaterialProperty) {
expect(attributes.color.value).toEqual(
ColorGeometryInstanceAttribute.toValue(
- options.material.color.getValue(time),
- ),
+ options.material.color.getValue(time)
+ )
);
} else {
expect(attributes.color).toBeUndefined();
}
expect(attributes.show.value).toEqual(
- ShowGeometryInstanceAttribute.toValue(options.show),
+ ShowGeometryInstanceAttribute.toValue(options.show)
);
if (options.distanceDisplayCondition) {
expect(attributes.distanceDisplayCondition.value).toEqual(
DistanceDisplayConditionGeometryInstanceAttribute.toValue(
- options.distanceDisplayCondition,
- ),
+ options.distanceDisplayCondition
+ )
);
}
}
@@ -425,7 +432,7 @@ describe(
start: time1,
stop: time2,
data: false,
- }),
+ })
);
show.intervals.addInterval(
new TimeInterval({
@@ -433,7 +440,7 @@ describe(
stop: time3,
isStartIncluded: false,
data: true,
- }),
+ })
);
const colorMaterial = new ColorMaterialProperty();
@@ -452,11 +459,11 @@ describe(
const attributes = instance.attributes;
expect(attributes.color.value).toEqual(
ColorGeometryInstanceAttribute.toValue(
- colorMaterial.color.getValue(time2),
- ),
+ colorMaterial.color.getValue(time2)
+ )
);
expect(attributes.show.value).toEqual(
- ShowGeometryInstanceAttribute.toValue(show.getValue(time2)),
+ ShowGeometryInstanceAttribute.toValue(show.getValue(time2))
);
});
@@ -468,7 +475,7 @@ describe(
const instance = updater.createFillGeometryInstance(new JulianDate());
const attributes = instance.attributes;
expect(attributes.show.value).toEqual(
- ShowGeometryInstanceAttribute.toValue(false),
+ ShowGeometryInstanceAttribute.toValue(false)
);
});
@@ -503,7 +510,7 @@ describe(
const dynamicUpdater = updater.createDynamicUpdater(
primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
expect(dynamicUpdater.isDestroyed()).toBe(false);
@@ -564,7 +571,7 @@ describe(
const dynamicUpdater = updater.createDynamicUpdater(
scene.primitives,
- groundPrimitives,
+ groundPrimitives
);
expect(dynamicUpdater.isDestroyed()).toBe(false);
expect(groundPrimitives.length).toBe(0);
@@ -617,7 +624,7 @@ describe(
const dynamicUpdater = updater.createDynamicUpdater(
primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
expect(dynamicUpdater.isDestroyed()).toBe(false);
expect(primitives.length).toBe(0);
@@ -636,7 +643,7 @@ describe(
dynamicUpdater.update(time);
expect(polylineObject.positions.length).not.toEqual(
- geodesicPolylinePositionsLength,
+ geodesicPolylinePositionsLength
);
dynamicUpdater.destroy();
@@ -654,7 +661,7 @@ describe(
updater.geometryChanged.addEventListener(listener);
entity.polyline.positions = new ConstantProperty(
- Cartesian3.fromRadiansArray([0, 0, 1, 0]),
+ Cartesian3.fromRadiansArray([0, 0, 1, 0])
);
expect(listener.calls.count()).toEqual(1);
@@ -705,7 +712,7 @@ describe(
expect(function () {
return updater.createDynamicUpdater(
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
}).toThrowDeveloperError();
updater.destroy();
@@ -742,7 +749,7 @@ describe(
const updater = new PolylineGeometryUpdater(entity, scene);
const dynamicUpdater = updater.createDynamicUpdater(
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
expect(function () {
dynamicUpdater.update(undefined);
@@ -771,7 +778,7 @@ describe(
const updater = new PolylineGeometryUpdater(entity, scene);
const dynamicUpdater = updater.createDynamicUpdater(
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
dynamicUpdater.update(time);
@@ -802,7 +809,7 @@ describe(
const updater = new PolylineGeometryUpdater(entity, scene);
const dynamicUpdater = updater.createDynamicUpdater(
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
dynamicUpdater.update(time);
@@ -835,7 +842,7 @@ describe(
const updater = new PolylineGeometryUpdater(entity, scene);
const dynamicUpdater = updater.createDynamicUpdater(
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
const result = new BoundingSphere();
@@ -855,7 +862,7 @@ describe(
const updater = new PolylineGeometryUpdater(entity, scene);
const dynamicUpdater = updater.createDynamicUpdater(
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
expect(function () {
@@ -877,7 +884,7 @@ describe(
const updater = new PolylineGeometryUpdater(entity, scene);
const dynamicUpdater = updater.createDynamicUpdater(
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
spyOn(PolylinePipeline, "generateCartesianRhumbArc").and.callThrough();
dynamicUpdater.update(time);
@@ -900,7 +907,7 @@ describe(
const updater = new PolylineGeometryUpdater(entity, scene);
const dynamicUpdater = updater.createDynamicUpdater(
scene.primitives,
- scene.groundPrimitives,
+ scene.groundPrimitives
);
spyOn(PolylinePipeline, "generateCartesianArc").and.callThrough();
dynamicUpdater.update(time);
@@ -934,5 +941,5 @@ describe(
updater.destroy();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/DataSources/PolylineGlowMaterialPropertySpec.js b/packages/engine/Specs/DataSources/PolylineGlowMaterialPropertySpec.js
index a881490466bc..cbf767d89e45 100644
--- a/packages/engine/Specs/DataSources/PolylineGlowMaterialPropertySpec.js
+++ b/packages/engine/Specs/DataSources/PolylineGlowMaterialPropertySpec.js
@@ -66,21 +66,21 @@ describe("DataSources/PolylineGlowMaterialProperty", function () {
start: start,
stop: stop,
data: Color.BLUE,
- }),
+ })
);
property.glowPower.intervals.addInterval(
new TimeInterval({
start: start,
stop: stop,
data: 0.65,
- }),
+ })
);
property.taperPower.intervals.addInterval(
new TimeInterval({
start: start,
stop: stop,
data: 0.55,
- }),
+ })
);
expect(property.isConstant).toBe(false);
@@ -145,7 +145,7 @@ describe("DataSources/PolylineGlowMaterialProperty", function () {
property,
"color",
property.color,
- oldValue,
+ oldValue
);
listener.calls.reset();
@@ -154,7 +154,7 @@ describe("DataSources/PolylineGlowMaterialProperty", function () {
property,
"color",
property.color,
- property.color,
+ property.color
);
listener.calls.reset();
diff --git a/packages/engine/Specs/DataSources/PolylineGraphicsSpec.js b/packages/engine/Specs/DataSources/PolylineGraphicsSpec.js
index f4db09ea9e8d..e40fb5da4101 100644
--- a/packages/engine/Specs/DataSources/PolylineGraphicsSpec.js
+++ b/packages/engine/Specs/DataSources/PolylineGraphicsSpec.js
@@ -45,7 +45,7 @@ describe("DataSources/PolylineGraphics", function () {
expect(polyline.material.color.getValue()).toEqual(options.material);
expect(polyline.depthFailMaterial.color.getValue()).toEqual(
- options.depthFailMaterial,
+ options.depthFailMaterial
);
expect(polyline.positions.getValue()).toEqual(options.positions);
expect(polyline.show.getValue()).toEqual(options.show);
@@ -54,10 +54,10 @@ describe("DataSources/PolylineGraphics", function () {
expect(polyline.granularity.getValue()).toEqual(options.granularity);
expect(polyline.shadows.getValue()).toEqual(options.shadows);
expect(polyline.distanceDisplayCondition.getValue()).toEqual(
- options.distanceDisplayCondition,
+ options.distanceDisplayCondition
);
expect(polyline.classificationType.getValue()).toEqual(
- options.classificationType,
+ options.classificationType
);
expect(polyline.arcType.getValue()).toEqual(options.arcType);
expect(polyline.zIndex.getValue()).toEqual(options.zIndex);
@@ -74,10 +74,10 @@ describe("DataSources/PolylineGraphics", function () {
source.granularity = new ConstantProperty();
source.shadows = new ConstantProperty(ShadowMode.ENABLED);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(),
+ new DistanceDisplayCondition()
);
source.classificationType = new ConstantProperty(
- ClassificationType.TERRAIN,
+ ClassificationType.TERRAIN
);
source.arcType = new ConstantProperty(ArcType.GEODESIC);
source.zIndex = new ConstantProperty();
@@ -93,7 +93,7 @@ describe("DataSources/PolylineGraphics", function () {
expect(target.granularity).toBe(source.granularity);
expect(target.shadows).toBe(source.shadows);
expect(target.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
expect(target.classificationType).toBe(source.classificationType);
expect(target.arcType).toBe(source.arcType);
@@ -182,7 +182,7 @@ describe("DataSources/PolylineGraphics", function () {
expect(result.granularity).toBe(source.granularity);
expect(result.shadows).toBe(source.shadows);
expect(result.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
expect(result.classificationType).toBe(source.classificationType);
expect(result.arcType).toBe(source.arcType);
@@ -203,7 +203,7 @@ describe("DataSources/PolylineGraphics", function () {
property,
"depthFailMaterial",
Color.RED,
- Color.BLUE,
+ Color.BLUE
);
testDefinitionChanged(property, "show", true, false);
testDefinitionChanged(property, "positions", [], []);
@@ -214,18 +214,18 @@ describe("DataSources/PolylineGraphics", function () {
property,
"shadows",
ShadowMode.ENABLED,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
testDefinitionChanged(
property,
"distanceDisplayCondition",
new DistanceDisplayCondition(),
- new DistanceDisplayCondition(10.0, 20.0),
+ new DistanceDisplayCondition(10.0, 20.0)
);
testDefinitionChanged(
property,
"classificationType",
- ClassificationType.TERRAIN,
+ ClassificationType.TERRAIN
);
testDefinitionChanged(property, "arcType", ArcType.GEODESIC, ArcType.RHUMB);
testDefinitionChanged(property, "zIndex", 20, 5);
diff --git a/packages/engine/Specs/DataSources/PolylineOutlineMaterialPropertySpec.js b/packages/engine/Specs/DataSources/PolylineOutlineMaterialPropertySpec.js
index 0094b3fba685..10448d3890c7 100644
--- a/packages/engine/Specs/DataSources/PolylineOutlineMaterialPropertySpec.js
+++ b/packages/engine/Specs/DataSources/PolylineOutlineMaterialPropertySpec.js
@@ -57,14 +57,14 @@ describe("DataSources/PolylineOutlineMaterialProperty", function () {
start: start,
stop: stop,
data: Color.BLUE,
- }),
+ })
);
property.outlineColor.intervals.addInterval(
new TimeInterval({
start: start,
stop: stop,
data: Color.RED,
- }),
+ })
);
const result = property.getValue(start);
@@ -122,7 +122,7 @@ describe("DataSources/PolylineOutlineMaterialProperty", function () {
property,
"color",
property.color,
- oldValue,
+ oldValue
);
listener.calls.reset();
@@ -131,7 +131,7 @@ describe("DataSources/PolylineOutlineMaterialProperty", function () {
property,
"color",
property.color,
- property.color,
+ property.color
);
listener.calls.reset();
@@ -145,7 +145,7 @@ describe("DataSources/PolylineOutlineMaterialProperty", function () {
property,
"outlineColor",
property.outlineColor,
- oldValue,
+ oldValue
);
listener.calls.reset();
@@ -154,7 +154,7 @@ describe("DataSources/PolylineOutlineMaterialProperty", function () {
property,
"outlineColor",
property.outlineColor,
- property.outlineColor,
+ property.outlineColor
);
listener.calls.reset();
@@ -167,7 +167,7 @@ describe("DataSources/PolylineOutlineMaterialProperty", function () {
property,
"outlineWidth",
property.outlineWidth,
- oldValue,
+ oldValue
);
listener.calls.reset();
@@ -176,7 +176,7 @@ describe("DataSources/PolylineOutlineMaterialProperty", function () {
property,
"outlineWidth",
property.outlineWidth,
- property.outlineWidth,
+ property.outlineWidth
);
listener.calls.reset();
@@ -201,7 +201,7 @@ describe("DataSources/PolylineOutlineMaterialProperty", function () {
start: start,
stop: stop,
data: Color.RED,
- }),
+ })
);
expect(property.isConstant).toBe(false);
@@ -213,7 +213,7 @@ describe("DataSources/PolylineOutlineMaterialProperty", function () {
start: start,
stop: stop,
data: Color.BLUE,
- }),
+ })
);
expect(property.isConstant).toBe(false);
@@ -225,7 +225,7 @@ describe("DataSources/PolylineOutlineMaterialProperty", function () {
start: start,
stop: stop,
data: 2.0,
- }),
+ })
);
expect(property.isConstant).toBe(false);
});
diff --git a/packages/engine/Specs/DataSources/PolylineVisualizerSpec.js b/packages/engine/Specs/DataSources/PolylineVisualizerSpec.js
index 5f4ba7b32b53..d2453021e059 100644
--- a/packages/engine/Specs/DataSources/PolylineVisualizerSpec.js
+++ b/packages/engine/Specs/DataSources/PolylineVisualizerSpec.js
@@ -95,10 +95,10 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
expect(attributes.color).toEqual(
- ColorGeometryInstanceAttribute.toValue(Color.WHITE),
+ ColorGeometryInstanceAttribute.toValue(Color.WHITE)
);
expect(primitive.appearance).toBeInstanceOf(PolylineColorAppearance);
expect(primitive.appearance.closed).toBe(false);
@@ -131,7 +131,7 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
expect(attributes.color).toBeUndefined();
expect(primitive.appearance).toBeInstanceOf(PolylineMaterialAppearance);
@@ -170,10 +170,10 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
expect(attributes.color).toEqual(
- ColorGeometryInstanceAttribute.toValue(Color.WHITE),
+ ColorGeometryInstanceAttribute.toValue(Color.WHITE)
);
expect(primitive.appearance).toBeInstanceOf(PolylineColorAppearance);
expect(primitive.appearance.closed).toBe(false);
@@ -244,7 +244,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
entity.polyline = polyline;
objects.add(entity);
@@ -254,17 +254,17 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
expect(attributes.color).toEqual(
- ColorGeometryInstanceAttribute.toValue(Color.WHITE),
+ ColorGeometryInstanceAttribute.toValue(Color.WHITE)
);
expect(attributes.depthFailColor).toEqual(
- ColorGeometryInstanceAttribute.toValue(Color.WHITE),
+ ColorGeometryInstanceAttribute.toValue(Color.WHITE)
);
expect(primitive.appearance).toBeInstanceOf(PolylineColorAppearance);
expect(primitive.depthFailAppearance).toBeInstanceOf(
- PolylineColorAppearance,
+ PolylineColorAppearance
);
objects.remove(entity);
@@ -289,7 +289,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
entity.polyline = polyline;
objects.add(entity);
@@ -299,15 +299,15 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
expect(attributes.color).toEqual(
- ColorGeometryInstanceAttribute.toValue(Color.WHITE),
+ ColorGeometryInstanceAttribute.toValue(Color.WHITE)
);
expect(attributes.depthFailColor).toBeUndefined();
expect(primitive.appearance).toBeInstanceOf(PolylineColorAppearance);
expect(primitive.depthFailAppearance).toBeInstanceOf(
- PolylineMaterialAppearance,
+ PolylineMaterialAppearance
);
objects.remove(entity);
@@ -332,7 +332,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
entity.polyline = polyline;
objects.add(entity);
@@ -342,13 +342,13 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
expect(attributes.color).toBeUndefined();
expect(attributes.depthFailColor).toBeUndefined();
expect(primitive.appearance).toBeInstanceOf(PolylineMaterialAppearance);
expect(primitive.depthFailAppearance).toBeInstanceOf(
- PolylineMaterialAppearance,
+ PolylineMaterialAppearance
);
objects.remove(entity);
@@ -373,7 +373,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
entity.polyline = polyline;
objects.add(entity);
@@ -383,15 +383,15 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
expect(attributes.color).toBeUndefined();
expect(attributes.depthFailColor).toEqual(
- ColorGeometryInstanceAttribute.toValue(Color.WHITE),
+ ColorGeometryInstanceAttribute.toValue(Color.WHITE)
);
expect(primitive.appearance).toBeInstanceOf(PolylineMaterialAppearance);
expect(primitive.depthFailAppearance).toBeInstanceOf(
- PolylineColorAppearance,
+ PolylineColorAppearance
);
objects.remove(entity);
@@ -437,19 +437,19 @@ describe(
it("Creates and removes geometry classifying terrain", function () {
return createAndRemoveGeometryWithClassificationType(
- ClassificationType.TERRAIN,
+ ClassificationType.TERRAIN
);
});
it("Creates and removes geometry classifying 3D Tiles", function () {
return createAndRemoveGeometryWithClassificationType(
- ClassificationType.CESIUM_3D_TILE,
+ ClassificationType.CESIUM_3D_TILE
);
});
it("Creates and removes geometry classifying both terrain and 3D Tiles", function () {
return createAndRemoveGeometryWithClassificationType(
- ClassificationType.BOTH,
+ ClassificationType.BOTH
);
});
@@ -473,10 +473,10 @@ describe(
let attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
expect(attributes.color).toEqual(
- ColorGeometryInstanceAttribute.toValue(Color.WHITE),
+ ColorGeometryInstanceAttribute.toValue(Color.WHITE)
);
expect(primitive.appearance).toBeInstanceOf(PolylineColorAppearance);
@@ -487,11 +487,11 @@ describe(
attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
expect(attributes.color).toBeUndefined();
expect(primitive.appearance).toBeInstanceOf(
- PolylineMaterialAppearance,
+ PolylineMaterialAppearance
);
objects.remove(entity);
@@ -589,8 +589,8 @@ describe(
BoundingSphere.transform(
attributes.boundingSphere,
primitive.modelMatrix,
- new BoundingSphere(),
- ),
+ new BoundingSphere()
+ )
);
visualizer.destroy();
@@ -659,10 +659,10 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity2);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
expect(attributes.color).toEqual(
- ColorGeometryInstanceAttribute.toValue(Color.BLUE),
+ ColorGeometryInstanceAttribute.toValue(Color.BLUE)
);
expect(primitive.appearance).toBeInstanceOf(PolylineColorAppearance);
@@ -686,7 +686,7 @@ describe(
Cartesian3.fromDegrees(0.0, 0.000001),
],
material: new ColorMaterialProperty(
- createDynamicProperty(Color.BLUE),
+ createDynamicProperty(Color.BLUE)
),
},
});
@@ -697,7 +697,7 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
entity.show = false;
@@ -709,7 +709,7 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(false),
+ ShowGeometryInstanceAttribute.toValue(false)
);
entities.remove(entity);
@@ -729,7 +729,7 @@ describe(
Cartesian3.fromDegrees(0.0, 0.000001),
],
material: new PolylineArrowMaterialProperty(
- createDynamicProperty(Color.BLUE),
+ createDynamicProperty(Color.BLUE)
),
},
});
@@ -740,7 +740,7 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
entity.show = false;
@@ -752,7 +752,7 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(false),
+ ShowGeometryInstanceAttribute.toValue(false)
);
entities.remove(entity);
@@ -786,10 +786,10 @@ describe(
const attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes).toBeDefined();
expect(attributes.show).toEqual(
- ShowGeometryInstanceAttribute.toValue(true),
+ ShowGeometryInstanceAttribute.toValue(true)
);
expect(attributes.color).toEqual(
- ColorGeometryInstanceAttribute.toValue(Color.WHITE),
+ ColorGeometryInstanceAttribute.toValue(Color.WHITE)
);
expect(primitive.appearance).toBeInstanceOf(PolylineColorAppearance);
expect(primitive.appearance.closed).toBe(false);
@@ -894,5 +894,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/DataSources/PolylineVolumeGeometryUpdaterSpec.js b/packages/engine/Specs/DataSources/PolylineVolumeGeometryUpdaterSpec.js
index 5fc0211935d1..e2a8541580fd 100644
--- a/packages/engine/Specs/DataSources/PolylineVolumeGeometryUpdaterSpec.js
+++ b/packages/engine/Specs/DataSources/PolylineVolumeGeometryUpdaterSpec.js
@@ -43,7 +43,7 @@ describe(
function createBasicPolylineVolume() {
const polylineVolume = new PolylineVolumeGraphics();
polylineVolume.positions = new ConstantProperty(
- Cartesian3.fromDegreesArray([0, 0, 1, 0, 1, 1, 0, 1]),
+ Cartesian3.fromDegreesArray([0, 0, 1, 0, 1, 1, 0, 1])
);
polylineVolume.shape = new ConstantProperty(shape);
const entity = new Entity();
@@ -61,7 +61,7 @@ describe(
const entity = createBasicPolylineVolume();
const updater = new PolylineVolumeGeometryUpdater(entity, scene);
entity.polylineVolume.positions = createDynamicProperty(
- Cartesian3.fromRadiansArray([0, 0, 1, 0, 1, 1, 0, 1]),
+ Cartesian3.fromRadiansArray([0, 0, 1, 0, 1, 1, 0, 1])
);
updater._onEntityPropertyChanged(entity, "polylineVolume");
@@ -95,7 +95,7 @@ describe(
start: JulianDate.now(),
stop: JulianDate.now(),
data: CornerType.ROUNDED,
- }),
+ })
);
updater._onEntityPropertyChanged(entity, "polylineVolume");
@@ -136,7 +136,7 @@ describe(
it("dynamic updater sets properties", function () {
const polylineVolume = new PolylineVolumeGraphics();
polylineVolume.positions = createDynamicProperty(
- Cartesian3.fromRadiansArray([0, 0, 1, 0, 1, 1, 0, 1]),
+ Cartesian3.fromRadiansArray([0, 0, 1, 0, 1, 1, 0, 1])
);
polylineVolume.show = createDynamicProperty(true);
polylineVolume.shape = createDynamicProperty(shape);
@@ -151,18 +151,18 @@ describe(
const updater = new PolylineVolumeGeometryUpdater(entity, scene);
const dynamicUpdater = updater.createDynamicUpdater(
new PrimitiveCollection(),
- new PrimitiveCollection(),
+ new PrimitiveCollection()
);
dynamicUpdater.update(time);
const options = dynamicUpdater._options;
expect(options.id).toEqual(entity);
expect(options.polylinePositions).toEqual(
- polylineVolume.positions.getValue(),
+ polylineVolume.positions.getValue()
);
expect(options.shapePositions).toEqual(polylineVolume.shape.getValue());
expect(options.granularity).toEqual(
- polylineVolume.granularity.getValue(),
+ polylineVolume.granularity.getValue()
);
expect(options.cornerType).toEqual(polylineVolume.cornerType.getValue());
});
@@ -207,15 +207,15 @@ describe(
PolylineVolumeGeometryUpdater,
"polylineVolume",
createBasicPolylineVolume,
- getScene,
+ getScene
);
createDynamicGeometryUpdaterSpecs(
PolylineVolumeGeometryUpdater,
"polylineVolume",
createDynamicPolylineVolume,
- getScene,
+ getScene
);
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/DataSources/PolylineVolumeGraphicsSpec.js b/packages/engine/Specs/DataSources/PolylineVolumeGraphicsSpec.js
index 89be9150a5f9..103036b04d6e 100644
--- a/packages/engine/Specs/DataSources/PolylineVolumeGraphicsSpec.js
+++ b/packages/engine/Specs/DataSources/PolylineVolumeGraphicsSpec.js
@@ -41,7 +41,7 @@ describe("DataSources/PolylineVolumeGraphics", function () {
expect(polylineVolume.cornerType).toBeInstanceOf(ConstantProperty);
expect(polylineVolume.shadows).toBeInstanceOf(ConstantProperty);
expect(polylineVolume.distanceDisplayCondition).toBeInstanceOf(
- ConstantProperty,
+ ConstantProperty
);
expect(polylineVolume.material.color.getValue()).toEqual(options.material);
@@ -52,15 +52,15 @@ describe("DataSources/PolylineVolumeGraphics", function () {
expect(polylineVolume.fill.getValue()).toEqual(options.fill);
expect(polylineVolume.outline.getValue()).toEqual(options.outline);
expect(polylineVolume.outlineColor.getValue()).toEqual(
- options.outlineColor,
+ options.outlineColor
);
expect(polylineVolume.outlineWidth.getValue()).toEqual(
- options.outlineWidth,
+ options.outlineWidth
);
expect(polylineVolume.cornerType.getValue()).toEqual(options.cornerType);
expect(polylineVolume.shadows.getValue()).toEqual(options.shadows);
expect(polylineVolume.distanceDisplayCondition.getValue()).toEqual(
- options.distanceDisplayCondition,
+ options.distanceDisplayCondition
);
});
@@ -78,7 +78,7 @@ describe("DataSources/PolylineVolumeGraphics", function () {
source.cornerType = new ConstantProperty();
source.shadows = new ConstantProperty(ShadowMode.ENABLED);
source.distanceDisplayCondition = new ConstantProperty(
- new DistanceDisplayCondition(),
+ new DistanceDisplayCondition()
);
const target = new PolylineVolumeGraphics();
@@ -96,7 +96,7 @@ describe("DataSources/PolylineVolumeGraphics", function () {
expect(target.cornerType).toBe(source.cornerType);
expect(target.shadows).toBe(source.shadows);
expect(target.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
});
@@ -174,7 +174,7 @@ describe("DataSources/PolylineVolumeGraphics", function () {
expect(result.cornerType).toBe(source.cornerType);
expect(result.shadows).toBe(source.shadows);
expect(result.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
});
@@ -200,19 +200,19 @@ describe("DataSources/PolylineVolumeGraphics", function () {
property,
"cornerType",
CornerType.BEVELED,
- CornerType.MITERED,
+ CornerType.MITERED
);
testDefinitionChanged(
property,
"shadows",
ShadowMode.ENABLED,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
testDefinitionChanged(
property,
"distanceDisplayCondition",
new DistanceDisplayCondition(),
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
});
});
diff --git a/packages/engine/Specs/DataSources/PositionPropertyArraySpec.js b/packages/engine/Specs/DataSources/PositionPropertyArraySpec.js
index c90dff6d796a..da0af5d54ce3 100644
--- a/packages/engine/Specs/DataSources/PositionPropertyArraySpec.js
+++ b/packages/engine/Specs/DataSources/PositionPropertyArraySpec.js
@@ -69,7 +69,7 @@ describe("DataSources/PositionPropertyArray", function () {
const property = new PositionPropertyArray(value);
const result = property.getValueInReferenceFrame(
time,
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
);
expect(result).toEqual(expected);
});
diff --git a/packages/engine/Specs/DataSources/PropertyBagSpec.js b/packages/engine/Specs/DataSources/PropertyBagSpec.js
index 8a3da3e739ab..8d5eb332d612 100644
--- a/packages/engine/Specs/DataSources/PropertyBagSpec.js
+++ b/packages/engine/Specs/DataSources/PropertyBagSpec.js
@@ -103,7 +103,7 @@ describe("DataSources/PropertyBag", function () {
a: 1,
b: 2,
},
- createFakeProperty,
+ createFakeProperty
);
expect(property.propertyNames).toContain("a");
diff --git a/packages/engine/Specs/DataSources/RectangleGeometryUpdaterSpec.js b/packages/engine/Specs/DataSources/RectangleGeometryUpdaterSpec.js
index 88f94a0d9fb2..551b4e52397c 100644
--- a/packages/engine/Specs/DataSources/RectangleGeometryUpdaterSpec.js
+++ b/packages/engine/Specs/DataSources/RectangleGeometryUpdaterSpec.js
@@ -44,7 +44,7 @@ describe(
const entity = new Entity();
entity.rectangle = rectangle;
entity.rectangle.coordinates = new ConstantProperty(
- new Rectangle(-1, -1, 1, 1),
+ new Rectangle(-1, -1, 1, 1)
);
entity.rectangle.height = new ConstantProperty(0);
return entity;
@@ -61,7 +61,7 @@ describe(
const entity = new Entity();
entity.rectangle = rectangle;
entity.rectangle.coordinates = new ConstantProperty(
- new Rectangle(0, 0, 1, 1),
+ new Rectangle(0, 0, 1, 1)
);
return entity;
}
@@ -187,7 +187,7 @@ describe(
const updater = new RectangleGeometryUpdater(entity, scene);
const dynamicUpdater = updater.createDynamicUpdater(
new PrimitiveCollection(),
- new PrimitiveCollection(),
+ new PrimitiveCollection()
);
dynamicUpdater.update(time);
@@ -196,7 +196,7 @@ describe(
expect(options.rectangle).toEqual(rectangle.coordinates.getValue());
expect(options.height).toEqual(rectangle.height.getValue());
expect(options.extrudedHeight).toEqual(
- rectangle.extrudedHeight.getValue(),
+ rectangle.extrudedHeight.getValue()
);
expect(options.granularity).toEqual(rectangle.granularity.getValue());
expect(options.stRotation).toEqual(rectangle.stRotation.getValue());
@@ -237,7 +237,7 @@ describe(
expect(updater._computeCenter(time)).toEqualEpsilon(
Cartesian3.fromDegrees(0.0, 0.0),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -248,14 +248,14 @@ describe(
RectangleGeometryUpdater,
"rectangle",
createBasicRectangle,
- getScene,
+ getScene
);
createDynamicGeometryUpdaterSpecs(
RectangleGeometryUpdater,
"rectangle",
createDynamicRectangle,
- getScene,
+ getScene
);
createGeometryUpdaterGroundGeometrySpecs(
@@ -263,8 +263,8 @@ describe(
"rectangle",
createBasicRectangleWithoutHeight,
createDynamicRectangleWithoutHeight,
- getScene,
+ getScene
);
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/DataSources/RectangleGraphicsSpec.js b/packages/engine/Specs/DataSources/RectangleGraphicsSpec.js
index 75b1cce95003..bbfdfe34f0ef 100644
--- a/packages/engine/Specs/DataSources/RectangleGraphicsSpec.js
+++ b/packages/engine/Specs/DataSources/RectangleGraphicsSpec.js
@@ -65,10 +65,10 @@ describe("DataSources/RectangleGraphics", function () {
expect(rectangle.outlineWidth.getValue()).toEqual(options.outlineWidth);
expect(rectangle.shadows.getValue()).toEqual(options.shadows);
expect(rectangle.distanceDisplayCondition.getValue()).toEqual(
- options.distanceDisplayCondition,
+ options.distanceDisplayCondition
);
expect(rectangle.classificationType.getValue()).toEqual(
- options.classificationType,
+ options.classificationType
);
expect(rectangle.zIndex.getValue()).toEqual(options.zIndex);
});
@@ -109,7 +109,7 @@ describe("DataSources/RectangleGraphics", function () {
expect(target.outlineWidth).toBe(source.outlineWidth);
expect(target.shadows).toBe(source.shadows);
expect(target.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
expect(target.classificationType).toBe(source.classificationType);
expect(target.zIndex).toBe(source.zIndex);
@@ -207,7 +207,7 @@ describe("DataSources/RectangleGraphics", function () {
expect(result.outlineWidth).toBe(source.outlineWidth);
expect(result.shadows).toBe(source.shadows);
expect(result.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
expect(result.classificationType).toBe(source.classificationType);
expect(result.zIndex).toBe(source.zIndex);
@@ -228,7 +228,7 @@ describe("DataSources/RectangleGraphics", function () {
property,
"coordinates",
new Rectangle(0, 0, 0.1, 0.1),
- new Rectangle(0, 0, 1, 1),
+ new Rectangle(0, 0, 1, 1)
);
testDefinitionChanged(property, "height", 2, 5);
testDefinitionChanged(property, "extrudedHeight", 3, 4);
@@ -243,19 +243,19 @@ describe("DataSources/RectangleGraphics", function () {
property,
"shadows",
ShadowMode.ENABLED,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
testDefinitionChanged(
property,
"distanceDisplayCondition",
new DistanceDisplayCondition(),
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
testDefinitionChanged(
property,
"classificationType",
ClassificationType.TERRAIN,
- ClassificationType.BOTH,
+ ClassificationType.BOTH
);
testDefinitionChanged(property, "zIndex", 20, 5);
});
diff --git a/packages/engine/Specs/DataSources/ReferencePropertySpec.js b/packages/engine/Specs/DataSources/ReferencePropertySpec.js
index 3732e29998c8..cc95f49eccea 100644
--- a/packages/engine/Specs/DataSources/ReferencePropertySpec.js
+++ b/packages/engine/Specs/DataSources/ReferencePropertySpec.js
@@ -33,7 +33,7 @@ describe("DataSources/ReferenceProperty", function () {
const property = ReferenceProperty.fromString(
collection,
- "testId#foo.bar.baz",
+ "testId#foo.bar.baz"
);
expect(property.targetCollection).toBe(collection);
@@ -47,7 +47,7 @@ describe("DataSources/ReferenceProperty", function () {
const propertyNames = ["propertyName", ".abc\\", "def"];
const property = ReferenceProperty.fromString(
collection,
- "\\#identif\\\\\\#ier\\.#propertyName.\\.abc\\\\.def",
+ "\\#identif\\\\\\#ier\\.#propertyName.\\.abc\\\\.def"
);
expect(property.targetCollection).toBe(collection);
@@ -68,7 +68,7 @@ describe("DataSources/ReferenceProperty", function () {
// Basic property resolution
const property = ReferenceProperty.fromString(
collection,
- "testId#billboard.scale",
+ "testId#billboard.scale"
);
expect(property.referenceFrame).toBeUndefined();
expect(property.isConstant).toEqual(true);
@@ -138,7 +138,7 @@ describe("DataSources/ReferenceProperty", function () {
});
testObject.position = new ConstantPositionProperty(
new Cartesian3(1, 2, 3),
- ReferenceFrame.FIXED,
+ ReferenceFrame.FIXED
);
const collection = new EntityCollection();
@@ -150,12 +150,12 @@ describe("DataSources/ReferenceProperty", function () {
expect(property.referenceFrame).toEqual(ReferenceFrame.FIXED);
expect(property.getValue(time)).toEqual(testObject.position.getValue(time));
expect(
- property.getValueInReferenceFrame(time, ReferenceFrame.INERTIAL),
+ property.getValueInReferenceFrame(time, ReferenceFrame.INERTIAL)
).toEqual(
testObject.position.getValueInReferenceFrame(
time,
- ReferenceFrame.INERTIAL,
- ),
+ ReferenceFrame.INERTIAL
+ )
);
property = ReferenceProperty.fromString(collection, "nonExistent#position");
@@ -163,7 +163,7 @@ describe("DataSources/ReferenceProperty", function () {
expect(property.referenceFrame).toBeUndefined();
expect(property.getValue(time)).toBeUndefined();
expect(
- property.getValueInReferenceFrame(time, ReferenceFrame.INERTIAL),
+ property.getValueInReferenceFrame(time, ReferenceFrame.INERTIAL)
).toBeUndefined();
});
@@ -180,19 +180,19 @@ describe("DataSources/ReferenceProperty", function () {
// Basic property resolution
let property = ReferenceProperty.fromString(
collection,
- "testId#testMaterial",
+ "testId#testMaterial"
);
expect(property.isConstant).toEqual(true);
expect(property.getType(time)).toEqual(
- testObject.testMaterial.getType(time),
+ testObject.testMaterial.getType(time)
);
expect(property.getValue(time)).toEqual(
- testObject.testMaterial.getValue(time),
+ testObject.testMaterial.getValue(time)
);
property = ReferenceProperty.fromString(
collection,
- "nonExistent#testMaterial",
+ "nonExistent#testMaterial"
);
expect(property.isConstant).toEqual(true);
expect(property.referenceFrame).toBeUndefined();
@@ -205,25 +205,25 @@ describe("DataSources/ReferenceProperty", function () {
const left = ReferenceProperty.fromString(
entityCollection,
- "objectId#foo.bar",
+ "objectId#foo.bar"
);
let right = ReferenceProperty.fromString(
entityCollection,
- "objectId#foo.bar",
+ "objectId#foo.bar"
);
expect(left.equals(right)).toEqual(true);
// collection differs
right = ReferenceProperty.fromString(
new EntityCollection(),
- "objectId#foo.bar",
+ "objectId#foo.bar"
);
expect(left.equals(right)).toEqual(false);
// target id differs
right = ReferenceProperty.fromString(
entityCollection,
- "otherObjectId#foo.bar",
+ "otherObjectId#foo.bar"
);
expect(left.equals(right)).toEqual(false);
@@ -253,7 +253,7 @@ describe("DataSources/ReferenceProperty", function () {
const property = ReferenceProperty.fromString(
collection,
- "testId#billboard.scale",
+ "testId#billboard.scale"
);
expect(property.resolvedProperty).toBe(testObject.billboard.scale);
@@ -271,7 +271,7 @@ describe("DataSources/ReferenceProperty", function () {
const property = ReferenceProperty.fromString(
collection,
- "testId#billboard.scale",
+ "testId#billboard.scale"
);
expect(property.resolvedProperty).toBeUndefined();
@@ -316,7 +316,7 @@ describe("DataSources/ReferenceProperty", function () {
return new ReferenceProperty(
new EntityCollection(),
"objectId",
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
@@ -375,7 +375,7 @@ describe("DataSources/ReferenceProperty", function () {
const property = ReferenceProperty.fromString(
collection,
- "testId#billboard",
+ "testId#billboard"
);
expect(property.getValue(time)).toBeUndefined();
});
@@ -391,7 +391,7 @@ describe("DataSources/ReferenceProperty", function () {
const property = ReferenceProperty.fromString(
collection,
- "testId#billboard.foo",
+ "testId#billboard.foo"
);
expect(property.getValue(time)).toBeUndefined();
});
diff --git a/packages/engine/Specs/DataSources/SampledPositionPropertySpec.js b/packages/engine/Specs/DataSources/SampledPositionPropertySpec.js
index fea9d91a824b..366de65df190 100644
--- a/packages/engine/Specs/DataSources/SampledPositionPropertySpec.js
+++ b/packages/engine/Specs/DataSources/SampledPositionPropertySpec.js
@@ -65,7 +65,7 @@ describe("DataSources/SampledPositionProperty", function () {
time,
valueInertial,
ReferenceFrame.INERTIAL,
- ReferenceFrame.FIXED,
+ ReferenceFrame.FIXED
);
const property = new SampledPositionProperty(ReferenceFrame.INERTIAL);
property.addSample(time, valueInertial);
@@ -82,7 +82,7 @@ describe("DataSources/SampledPositionProperty", function () {
const result = property.getValueInReferenceFrame(
time,
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
);
expect(result).not.toBe(value);
expect(result).toEqual(
@@ -90,8 +90,8 @@ describe("DataSources/SampledPositionProperty", function () {
time,
value,
ReferenceFrame.FIXED,
- ReferenceFrame.INERTIAL,
- ),
+ ReferenceFrame.INERTIAL
+ )
);
});
@@ -105,7 +105,7 @@ describe("DataSources/SampledPositionProperty", function () {
const result = property.getValueInReferenceFrame(
time,
ReferenceFrame.FIXED,
- expected,
+ expected
);
expect(result).toBe(expected);
expect(expected).toEqual(
@@ -113,8 +113,8 @@ describe("DataSources/SampledPositionProperty", function () {
time,
value,
ReferenceFrame.INERTIAL,
- ReferenceFrame.FIXED,
- ),
+ ReferenceFrame.FIXED
+ )
);
});
@@ -126,7 +126,7 @@ describe("DataSources/SampledPositionProperty", function () {
property.addSamplesPackedArray(data, epoch);
expect(property.getValue(epoch)).toEqual(new Cartesian3(7, 8, 9));
expect(property.getValue(new JulianDate(0, 0.5))).toEqual(
- new Cartesian3(7.5, 8.5, 9.5),
+ new Cartesian3(7.5, 8.5, 9.5)
);
});
@@ -151,7 +151,7 @@ describe("DataSources/SampledPositionProperty", function () {
expect(property.getValue(times[1])).toEqual(values[1]);
expect(property.getValue(times[2])).toEqual(values[2]);
expect(property.getValue(new JulianDate(0.5, 0))).toEqual(
- new Cartesian3(7.5, 8.5, 9.5),
+ new Cartesian3(7.5, 8.5, 9.5)
);
});
@@ -173,7 +173,7 @@ describe("DataSources/SampledPositionProperty", function () {
expect(property.getValue(times[1])).toEqual(values[1]);
expect(property.getValue(times[2])).toEqual(values[2]);
expect(property.getValue(new JulianDate(0.5, 0))).toEqual(
- new Cartesian3(7.5, 8.5, 9.5),
+ new Cartesian3(7.5, 8.5, 9.5)
);
});
@@ -233,7 +233,7 @@ describe("DataSources/SampledPositionProperty", function () {
new TimeInterval({
start: times[1],
stop: times[2],
- }),
+ })
);
expect(listener).toHaveBeenCalledWith(property);
@@ -247,7 +247,27 @@ describe("DataSources/SampledPositionProperty", function () {
it("addSamplesPackedArray works with derivatives", function () {
const data = [
- 0, 7, 8, 9, 1, 0, 0, 1, 8, 9, 10, 0, 1, 0, 2, 9, 10, 11, 0, 0, 1,
+ 0,
+ 7,
+ 8,
+ 9,
+ 1,
+ 0,
+ 0,
+ 1,
+ 8,
+ 9,
+ 10,
+ 0,
+ 1,
+ 0,
+ 2,
+ 9,
+ 10,
+ 11,
+ 0,
+ 0,
+ 1,
];
const epoch = new JulianDate(0, 0);
@@ -255,7 +275,7 @@ describe("DataSources/SampledPositionProperty", function () {
property.addSamplesPackedArray(data, epoch);
expect(property.getValue(epoch)).toEqual(new Cartesian3(7, 8, 9));
expect(property.getValue(new JulianDate(0, 0.5))).toEqual(
- new Cartesian3(7.5, 8.5, 9.5),
+ new Cartesian3(7.5, 8.5, 9.5)
);
});
@@ -285,7 +305,7 @@ describe("DataSources/SampledPositionProperty", function () {
expect(property.getValue(times[1])).toEqual(positions[1]);
expect(property.getValue(times[2])).toEqual(positions[2]);
expect(property.getValue(new JulianDate(0.5, 0))).toEqual(
- new Cartesian3(7.5, 8.5, 9.5),
+ new Cartesian3(7.5, 8.5, 9.5)
);
});
@@ -312,7 +332,7 @@ describe("DataSources/SampledPositionProperty", function () {
expect(property.getValue(times[1])).toEqual(positions[1]);
expect(property.getValue(times[2])).toEqual(positions[2]);
expect(property.getValue(new JulianDate(0.5, 0))).toEqual(
- new Cartesian3(7.5, 8.5, 9.5),
+ new Cartesian3(7.5, 8.5, 9.5)
);
});
@@ -322,7 +342,7 @@ describe("DataSources/SampledPositionProperty", function () {
property.addSample(
new JulianDate(0, 0),
new Cartesian3(7, 8, 9),
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
@@ -415,7 +435,7 @@ describe("DataSources/SampledPositionProperty", function () {
});
expect(property.getValue(epoch)).toEqual(new Cartesian3(7, 8, 9));
expect(property.getValue(new JulianDate(0, 3))).toEqual(
- new Cartesian3(2, 3, 4),
+ new Cartesian3(2, 3, 4)
);
expect(timesCalled).toEqual(1);
@@ -430,7 +450,7 @@ describe("DataSources/SampledPositionProperty", function () {
expect(property.getValue(time)).toEqual(value);
expect(
- property.getValue(JulianDate.addSeconds(time, 4, new JulianDate())),
+ property.getValue(JulianDate.addSeconds(time, 4, new JulianDate()))
).toBeUndefined();
});
diff --git a/packages/engine/Specs/DataSources/SampledPropertySpec.js b/packages/engine/Specs/DataSources/SampledPropertySpec.js
index 3caa5d99fe6c..8f98ee275074 100644
--- a/packages/engine/Specs/DataSources/SampledPropertySpec.js
+++ b/packages/engine/Specs/DataSources/SampledPropertySpec.js
@@ -178,7 +178,7 @@ describe("DataSources/SampledProperty", function () {
new TimeInterval({
start: times[1],
stop: times[3],
- }),
+ })
);
expect(listener).toHaveBeenCalledWith(property);
@@ -201,7 +201,7 @@ describe("DataSources/SampledProperty", function () {
new TimeInterval({
start: JulianDate.addSeconds(times[1], 4, new JulianDate()),
stop: times[3],
- }),
+ })
);
expect(listener).toHaveBeenCalledWith(property);
@@ -219,7 +219,7 @@ describe("DataSources/SampledProperty", function () {
new TimeInterval({
start: JulianDate.addSeconds(times[1], 4, new JulianDate()),
stop: JulianDate.addSeconds(times[3], -4, new JulianDate()),
- }),
+ })
);
expect(listener).toHaveBeenCalledWith(property);
@@ -260,7 +260,7 @@ describe("DataSources/SampledProperty", function () {
stop: times[3],
isStartIncluded: false,
isStopIncluded: true,
- }),
+ })
);
expect(listener).toHaveBeenCalledWith(property);
@@ -278,7 +278,7 @@ describe("DataSources/SampledProperty", function () {
stop: times[3],
isStartIncluded: true,
isStopIncluded: false,
- }),
+ })
);
expect(listener).toHaveBeenCalledWith(property);
@@ -296,7 +296,7 @@ describe("DataSources/SampledProperty", function () {
stop: times[3],
isStartIncluded: false,
isStopIncluded: false,
- }),
+ })
);
expect(listener).toHaveBeenCalledWith(property);
@@ -324,7 +324,7 @@ describe("DataSources/SampledProperty", function () {
packedArray,
startingIndex,
lastIndex,
- result,
+ result
) {
for (let i = 0, len = lastIndex - startingIndex + 1; i < len; i++) {
const offset = i * 2;
@@ -338,7 +338,7 @@ describe("DataSources/SampledProperty", function () {
sourceArray,
firstIndex,
lastIndex,
- result,
+ result
) {
if (!defined(result)) {
result = new CustomType();
@@ -427,7 +427,7 @@ describe("DataSources/SampledProperty", function () {
expect(property.getValue(time)).toEqual(value);
expect(
- property.getValue(JulianDate.addSeconds(time, 4, new JulianDate())),
+ property.getValue(JulianDate.addSeconds(time, 4, new JulianDate()))
).toBeUndefined();
});
@@ -601,15 +601,51 @@ describe("DataSources/SampledProperty", function () {
{
epoch: JulianDate.fromIso8601("20130205T150405.704999999999927Z"),
values: [
- 0.0, 1, 120.0, 2, 240.0, 3, 360.0, 4, 480.0, 6, 600.0, 8, 720.0, 10,
- 840.0, 12, 960.0, 14, 1080.0, 16,
+ 0.0,
+ 1,
+ 120.0,
+ 2,
+ 240.0,
+ 3,
+ 360.0,
+ 4,
+ 480.0,
+ 6,
+ 600.0,
+ 8,
+ 720.0,
+ 10,
+ 840.0,
+ 12,
+ 960.0,
+ 14,
+ 1080.0,
+ 16,
],
},
{
epoch: JulianDate.fromIso8601("20130205T151151.60499999999956Z"),
values: [
- 0.0, 5, 120.0, 7, 240.0, 9, 360.0, 11, 480.0, 13, 600.0, 15, 720.0, 17,
- 840.0, 18, 960.0, 19, 1080.0, 20,
+ 0.0,
+ 5,
+ 120.0,
+ 7,
+ 240.0,
+ 9,
+ 360.0,
+ 11,
+ 480.0,
+ 13,
+ 600.0,
+ 15,
+ 720.0,
+ 17,
+ 840.0,
+ 18,
+ 960.0,
+ 19,
+ 1080.0,
+ 20,
],
},
];
@@ -622,14 +658,14 @@ describe("DataSources/SampledProperty", function () {
times,
values,
interwovenData[0].values,
- 1,
+ 1
);
SampledProperty._mergeNewSamples(
interwovenData[1].epoch,
times,
values,
interwovenData[1].values,
- 1,
+ 1
);
for (let i = 0; i < values.length; i++) {
expect(values[i]).toBe(i + 1);
@@ -723,9 +759,16 @@ describe("DataSources/SampledProperty", function () {
//The remaining tests were verified with STK Components available from http://www.agi.com.
it("addSample works with multiple derivatives", function () {
const results = [
- 0, -3.39969163485071, 0.912945250727628, -6.17439797860995,
- 0.745113160479349, -1.63963048028446, -0.304810621102217,
- 4.83619040459681, -0.993888653923375, 169.448966391543,
+ 0,
+ -3.39969163485071,
+ 0.912945250727628,
+ -6.17439797860995,
+ 0.745113160479349,
+ -1.63963048028446,
+ -0.304810621102217,
+ 4.83619040459681,
+ -0.993888653923375,
+ 169.448966391543,
];
const property = new SampledProperty(Number, [Number, Number]);
@@ -739,17 +782,17 @@ describe("DataSources/SampledProperty", function () {
property.addSample(
JulianDate.addSeconds(epoch, x, new JulianDate()),
Math.sin(x),
- [Math.cos(x), -Math.sin(x)],
+ [Math.cos(x), -Math.sin(x)]
);
}
let resultIndex = 0;
for (let i = 0; i < 100; i += 10) {
const result = property.getValue(
- JulianDate.addSeconds(epoch, i, new JulianDate()),
+ JulianDate.addSeconds(epoch, i, new JulianDate())
);
expect(result).toEqualEpsilon(
results[resultIndex++],
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
}
});
@@ -850,11 +893,11 @@ describe("DataSources/SampledProperty", function () {
let resultIndex = 0;
for (let i = 0; i < 420; i += 20) {
const result = property.getValue(
- JulianDate.addSeconds(epoch, i, new JulianDate()),
+ JulianDate.addSeconds(epoch, i, new JulianDate())
);
expect(result).toEqualEpsilon(
order1Results[resultIndex++],
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
}
});
@@ -873,11 +916,11 @@ describe("DataSources/SampledProperty", function () {
let resultIndex = 0;
for (let i = 0; i < 420; i += 20) {
const result = property.getValue(
- JulianDate.addSeconds(epoch, i, new JulianDate()),
+ JulianDate.addSeconds(epoch, i, new JulianDate())
);
expect(result).toEqualEpsilon(
order0Results[resultIndex++],
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
}
});
@@ -893,11 +936,11 @@ describe("DataSources/SampledProperty", function () {
let resultIndex = 0;
for (let i = 0; i < 420; i += 20) {
const result = property.getValue(
- JulianDate.addSeconds(epoch, i, new JulianDate()),
+ JulianDate.addSeconds(epoch, i, new JulianDate())
);
expect(result).toEqualEpsilon(
order1Results[resultIndex++],
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
}
});
@@ -913,11 +956,11 @@ describe("DataSources/SampledProperty", function () {
let resultIndex = 0;
for (let i = 0; i < 420; i += 20) {
const result = property.getValue(
- JulianDate.addSeconds(epoch, i, new JulianDate()),
+ JulianDate.addSeconds(epoch, i, new JulianDate())
);
expect(result).toEqualEpsilon(
order0Results[resultIndex++],
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
}
});
@@ -940,11 +983,11 @@ describe("DataSources/SampledProperty", function () {
let resultIndex = 0;
for (let i = 0; i < 420; i += 20) {
const result = property.getValue(
- JulianDate.addSeconds(epoch, i, new JulianDate()),
+ JulianDate.addSeconds(epoch, i, new JulianDate())
);
expect(result).toEqualEpsilon(
order1Results[resultIndex++],
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
}
});
@@ -966,11 +1009,11 @@ describe("DataSources/SampledProperty", function () {
let resultIndex = 0;
for (let i = 0; i < 420; i += 20) {
const result = property.getValue(
- JulianDate.addSeconds(epoch, i, new JulianDate()),
+ JulianDate.addSeconds(epoch, i, new JulianDate())
);
expect(result).toEqualEpsilon(
order0Results[resultIndex++],
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
}
});
diff --git a/packages/engine/Specs/DataSources/StaticGeometryColorBatchSpec.js b/packages/engine/Specs/DataSources/StaticGeometryColorBatchSpec.js
index 1f543e7307f4..379410a2a3b8 100644
--- a/packages/engine/Specs/DataSources/StaticGeometryColorBatchSpec.js
+++ b/packages/engine/Specs/DataSources/StaticGeometryColorBatchSpec.js
@@ -38,7 +38,7 @@ describe("DataSources/StaticGeometryColorBatch", function () {
PerInstanceColorAppearance,
undefined,
false,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
const entity = new Entity({
@@ -95,7 +95,7 @@ describe("DataSources/StaticGeometryColorBatch", function () {
TimeInterval.fromIso8601({
iso8601: "2018-02-14T04:00:00+1100/2018-02-14T04:15:00+1100",
data: Color.RED,
- }),
+ })
);
const entity = new Entity({
availability: new TimeIntervalCollection([
@@ -117,7 +117,7 @@ describe("DataSources/StaticGeometryColorBatch", function () {
PerInstanceColorAppearance,
undefined,
false,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
const updater = new EllipseGeometryUpdater(entity, scene);
@@ -153,7 +153,7 @@ describe("DataSources/StaticGeometryColorBatch", function () {
TimeInterval.fromIso8601({
iso8601: "2018-02-14T04:00:00+1100/2018-02-14T04:15:00+1100",
data: new DistanceDisplayCondition(1.0, 2.0),
- }),
+ })
);
const entity = new Entity({
availability: new TimeIntervalCollection([
@@ -176,7 +176,7 @@ describe("DataSources/StaticGeometryColorBatch", function () {
PerInstanceColorAppearance,
undefined,
false,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
const updater = new EllipseGeometryUpdater(entity, scene);
@@ -193,7 +193,7 @@ describe("DataSources/StaticGeometryColorBatch", function () {
let attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes.distanceDisplayCondition).toEqualEpsilon(
[1.0, 2.0],
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
batch.update(outOfRangeTime);
@@ -215,7 +215,7 @@ describe("DataSources/StaticGeometryColorBatch", function () {
TimeInterval.fromIso8601({
iso8601: "2018-02-14T04:00:00+1100/2018-02-14T04:15:00+1100",
data: true,
- }),
+ })
);
const entity = new Entity({
availability: new TimeIntervalCollection([
@@ -237,7 +237,7 @@ describe("DataSources/StaticGeometryColorBatch", function () {
PerInstanceColorAppearance,
undefined,
false,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
const updater = new EllipseGeometryUpdater(entity, scene);
@@ -271,7 +271,7 @@ describe("DataSources/StaticGeometryColorBatch", function () {
PolylineColorAppearance,
undefined,
false,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
const entity = new Entity({
@@ -323,7 +323,7 @@ describe("DataSources/StaticGeometryColorBatch", function () {
TimeInterval.fromIso8601({
iso8601: "2018-02-14T04:00:00+1100/2018-02-14T04:15:00+1100",
data: Color.RED,
- }),
+ })
);
const entity = new Entity({
availability: new TimeIntervalCollection([
@@ -346,7 +346,7 @@ describe("DataSources/StaticGeometryColorBatch", function () {
PolylineColorAppearance,
PolylineColorAppearance,
false,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
const updater = new PolylineGeometryUpdater(entity, scene);
@@ -380,7 +380,7 @@ describe("DataSources/StaticGeometryColorBatch", function () {
PerInstanceColorAppearance,
undefined,
false,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
function buildEntity() {
@@ -448,7 +448,7 @@ describe("DataSources/StaticGeometryColorBatch", function () {
PerInstanceColorAppearance,
undefined,
false,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
function buildEntity() {
diff --git a/packages/engine/Specs/DataSources/StaticGeometryPerMaterialBatchSpec.js b/packages/engine/Specs/DataSources/StaticGeometryPerMaterialBatchSpec.js
index de2af7f170fa..ea0933a13dfd 100644
--- a/packages/engine/Specs/DataSources/StaticGeometryPerMaterialBatchSpec.js
+++ b/packages/engine/Specs/DataSources/StaticGeometryPerMaterialBatchSpec.js
@@ -48,7 +48,7 @@ describe("DataSources/StaticGeometryPerMaterialBatch", function () {
MaterialAppearance,
undefined,
false,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
const ellipse = new EllipseGraphics();
@@ -58,7 +58,7 @@ describe("DataSources/StaticGeometryPerMaterialBatch", function () {
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
entity.ellipse = ellipse;
@@ -69,7 +69,7 @@ describe("DataSources/StaticGeometryPerMaterialBatch", function () {
const entity2 = new Entity();
entity2.position = new ConstantPositionProperty(
- new Cartesian3(1234, 5678, 9101112),
+ new Cartesian3(1234, 5678, 9101112)
);
entity2.ellipse = ellipse2;
@@ -107,7 +107,7 @@ describe("DataSources/StaticGeometryPerMaterialBatch", function () {
TimeInterval.fromIso8601({
iso8601: "2018-02-14T04:00:00+1100/2018-02-14T04:15:00+1100",
data: new DistanceDisplayCondition(1.0, 2.0),
- }),
+ })
);
const entity = new Entity({
availability: new TimeIntervalCollection([
@@ -130,7 +130,7 @@ describe("DataSources/StaticGeometryPerMaterialBatch", function () {
MaterialAppearance,
undefined,
false,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
const updater = new EllipseGeometryUpdater(entity, scene);
@@ -147,7 +147,7 @@ describe("DataSources/StaticGeometryPerMaterialBatch", function () {
let attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes.distanceDisplayCondition).toEqualEpsilon(
[1.0, 2.0],
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
batch.update(outOfRangeTime);
@@ -169,7 +169,7 @@ describe("DataSources/StaticGeometryPerMaterialBatch", function () {
TimeInterval.fromIso8601({
iso8601: "2018-02-14T04:00:00+1100/2018-02-14T04:15:00+1100",
data: true,
- }),
+ })
);
const entity = new Entity({
availability: new TimeIntervalCollection([
@@ -192,7 +192,7 @@ describe("DataSources/StaticGeometryPerMaterialBatch", function () {
MaterialAppearance,
undefined,
false,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
const updater = new EllipseGeometryUpdater(entity, scene);
@@ -226,7 +226,7 @@ describe("DataSources/StaticGeometryPerMaterialBatch", function () {
PolylineMaterialAppearance,
undefined,
false,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
const polyline = new PolylineGraphics();
@@ -282,7 +282,7 @@ describe("DataSources/StaticGeometryPerMaterialBatch", function () {
TimeInterval.fromIso8601({
iso8601: "2018-02-14T04:00:00+1100/2018-02-14T04:15:00+1100",
data: Color.RED,
- }),
+ })
);
const entity = new Entity({
availability: new TimeIntervalCollection([
@@ -305,7 +305,7 @@ describe("DataSources/StaticGeometryPerMaterialBatch", function () {
PolylineMaterialAppearance,
PolylineColorAppearance,
false,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
const updater = new PolylineGeometryUpdater(entity, scene);
@@ -339,7 +339,7 @@ describe("DataSources/StaticGeometryPerMaterialBatch", function () {
MaterialAppearance,
undefined,
false,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
function buildEntity() {
@@ -415,7 +415,7 @@ describe("DataSources/StaticGeometryPerMaterialBatch", function () {
MaterialAppearance,
undefined,
false,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
function buildEntity(MaterialProperty) {
@@ -481,7 +481,7 @@ describe("DataSources/StaticGeometryPerMaterialBatch", function () {
MaterialAppearance,
undefined,
false,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
function buildEntity() {
diff --git a/packages/engine/Specs/DataSources/StaticGroundGeometryColorBatchSpec.js b/packages/engine/Specs/DataSources/StaticGroundGeometryColorBatchSpec.js
index 7fcd76449690..24711775a350 100644
--- a/packages/engine/Specs/DataSources/StaticGroundGeometryColorBatchSpec.js
+++ b/packages/engine/Specs/DataSources/StaticGroundGeometryColorBatchSpec.js
@@ -45,7 +45,7 @@ describe("DataSources/StaticGroundGeometryColorBatch", function () {
const batch = new StaticGroundGeometryColorBatch(
scene.groundPrimitives,
- ClassificationType.BOTH,
+ ClassificationType.BOTH
);
const entity = new Entity({
position: new Cartesian3(1234, 5678, 9101112),
@@ -108,7 +108,7 @@ describe("DataSources/StaticGroundGeometryColorBatch", function () {
const batch = new StaticGroundGeometryColorBatch(
scene.groundPrimitives,
- ClassificationType.BOTH,
+ ClassificationType.BOTH
);
const entity = new Entity({
position: new Cartesian3(1234, 5678, 9101112),
@@ -151,7 +151,7 @@ describe("DataSources/StaticGroundGeometryColorBatch", function () {
TimeInterval.fromIso8601({
iso8601: "2018-02-14T04:00:00+1100/2018-02-14T04:15:00+1100",
data: new DistanceDisplayCondition(1.0, 2.0),
- }),
+ })
);
const entity = new Entity({
availability: new TimeIntervalCollection([
@@ -170,7 +170,7 @@ describe("DataSources/StaticGroundGeometryColorBatch", function () {
const batch = new StaticGroundGeometryColorBatch(
scene.groundPrimitives,
- ClassificationType.BOTH,
+ ClassificationType.BOTH
);
const updater = new EllipseGeometryUpdater(entity, scene);
@@ -187,7 +187,7 @@ describe("DataSources/StaticGroundGeometryColorBatch", function () {
let attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes.distanceDisplayCondition).toEqualEpsilon(
[1.0, 2.0],
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
batch.update(outOfRangeTime);
@@ -209,7 +209,7 @@ describe("DataSources/StaticGroundGeometryColorBatch", function () {
TimeInterval.fromIso8601({
iso8601: "2018-02-14T04:00:00+1100/2018-02-14T04:15:00+1100",
data: true,
- }),
+ })
);
const entity = new Entity({
availability: new TimeIntervalCollection([
@@ -228,7 +228,7 @@ describe("DataSources/StaticGroundGeometryColorBatch", function () {
const batch = new StaticGroundGeometryColorBatch(
scene.groundPrimitives,
- ClassificationType.BOTH,
+ ClassificationType.BOTH
);
const updater = new EllipseGeometryUpdater(entity, scene);
@@ -263,7 +263,7 @@ describe("DataSources/StaticGroundGeometryColorBatch", function () {
const batch = new StaticGroundGeometryColorBatch(
scene.groundPrimitives,
- ClassificationType.BOTH,
+ ClassificationType.BOTH
);
function renderScene() {
@@ -338,7 +338,7 @@ describe("DataSources/StaticGroundGeometryColorBatch", function () {
const batch = new StaticGroundGeometryColorBatch(
scene.groundPrimitives,
- ClassificationType.BOTH,
+ ClassificationType.BOTH
);
function renderScene() {
diff --git a/packages/engine/Specs/DataSources/StaticGroundGeometryPerMaterialBatchSpec.js b/packages/engine/Specs/DataSources/StaticGroundGeometryPerMaterialBatchSpec.js
index f491e0752398..6f7ceb39ab53 100644
--- a/packages/engine/Specs/DataSources/StaticGroundGeometryPerMaterialBatchSpec.js
+++ b/packages/engine/Specs/DataSources/StaticGroundGeometryPerMaterialBatchSpec.js
@@ -54,7 +54,7 @@ describe("DataSources/StaticGroundGeometryPerMaterialBatch", function () {
const batch = new StaticGroundGeometryPerMaterialBatch(
scene.primitives,
ClassificationType.BOTH,
- MaterialAppearance,
+ MaterialAppearance
);
const ellipse = new EllipseGraphics();
@@ -121,7 +121,7 @@ describe("DataSources/StaticGroundGeometryPerMaterialBatch", function () {
TimeInterval.fromIso8601({
iso8601: "2018-02-14T04:00:00+1100/2018-02-14T04:15:00+1100",
data: new DistanceDisplayCondition(1.0, 2.0),
- }),
+ })
);
const entity = new Entity({
availability: new TimeIntervalCollection([
@@ -141,7 +141,7 @@ describe("DataSources/StaticGroundGeometryPerMaterialBatch", function () {
const batch = new StaticGroundGeometryPerMaterialBatch(
scene.primitives,
ClassificationType.BOTH,
- MaterialAppearance,
+ MaterialAppearance
);
const updater = new EllipseGeometryUpdater(entity, scene);
@@ -158,7 +158,7 @@ describe("DataSources/StaticGroundGeometryPerMaterialBatch", function () {
let attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes.distanceDisplayCondition).toEqualEpsilon(
[1.0, 2.0],
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
batch.update(outOfRangeTime);
@@ -188,7 +188,7 @@ describe("DataSources/StaticGroundGeometryPerMaterialBatch", function () {
TimeInterval.fromIso8601({
iso8601: "2018-02-14T04:00:00+1100/2018-02-14T04:15:00+1100",
data: true,
- }),
+ })
);
const entity = new Entity({
availability: new TimeIntervalCollection([
@@ -208,7 +208,7 @@ describe("DataSources/StaticGroundGeometryPerMaterialBatch", function () {
const batch = new StaticGroundGeometryPerMaterialBatch(
scene.primitives,
ClassificationType.BOTH,
- MaterialAppearance,
+ MaterialAppearance
);
const updater = new EllipseGeometryUpdater(entity, scene);
@@ -248,7 +248,7 @@ describe("DataSources/StaticGroundGeometryPerMaterialBatch", function () {
const batch = new StaticGroundGeometryPerMaterialBatch(
scene.primitives,
ClassificationType.BOTH,
- MaterialAppearance,
+ MaterialAppearance
);
function buildEntity(x, y, z) {
@@ -329,7 +329,7 @@ describe("DataSources/StaticGroundGeometryPerMaterialBatch", function () {
const batch = new StaticGroundGeometryPerMaterialBatch(
scene.primitives,
ClassificationType.BOTH,
- MaterialAppearance,
+ MaterialAppearance
);
const ellipse = new EllipseGraphics();
@@ -381,7 +381,7 @@ describe("DataSources/StaticGroundGeometryPerMaterialBatch", function () {
const batch = new StaticGroundGeometryPerMaterialBatch(
scene.primitives,
ClassificationType.BOTH,
- MaterialAppearance,
+ MaterialAppearance
);
const entity = new Entity({
position: new Cartesian3(1234, 5678, 9101112),
@@ -434,7 +434,7 @@ describe("DataSources/StaticGroundGeometryPerMaterialBatch", function () {
const batch = new StaticGroundGeometryPerMaterialBatch(
scene.primitives,
ClassificationType.BOTH,
- MaterialAppearance,
+ MaterialAppearance
);
function buildEntity(x, y, z) {
diff --git a/packages/engine/Specs/DataSources/StaticGroundPolylinePerMaterialBatchSpec.js b/packages/engine/Specs/DataSources/StaticGroundPolylinePerMaterialBatchSpec.js
index e3e05bc22f1b..32ade306d4fd 100644
--- a/packages/engine/Specs/DataSources/StaticGroundPolylinePerMaterialBatchSpec.js
+++ b/packages/engine/Specs/DataSources/StaticGroundPolylinePerMaterialBatchSpec.js
@@ -56,7 +56,7 @@ describe("DataSources/StaticGroundPolylinePerMaterialBatch", function () {
const polyline = new PolylineGraphics();
polyline.clampToGround = new ConstantProperty(true);
polyline.positions = new ConstantProperty(
- Cartesian3.fromDegreesArray([0, 0, 0.1, 0, 0.1, 0.1, 0, 0.1]),
+ Cartesian3.fromDegreesArray([0, 0, 0.1, 0, 0.1, 0.1, 0, 0.1])
);
return polyline;
}
@@ -70,7 +70,7 @@ describe("DataSources/StaticGroundPolylinePerMaterialBatch", function () {
batch = new StaticGroundPolylinePerMaterialBatch(
scene.groundPrimitives,
ClassificationType.BOTH,
- false,
+ false
);
const polyline1 = createGroundPolyline();
@@ -125,7 +125,7 @@ describe("DataSources/StaticGroundPolylinePerMaterialBatch", function () {
TimeInterval.fromIso8601({
iso8601: "2018-02-14T04:00:00+1100/2018-02-14T04:15:00+1100",
data: Color.RED,
- }),
+ })
);
const polyline = createGroundPolyline();
polyline.material = new ColorMaterialProperty(color);
@@ -141,7 +141,7 @@ describe("DataSources/StaticGroundPolylinePerMaterialBatch", function () {
batch = new StaticGroundPolylinePerMaterialBatch(
scene.groundPrimitives,
ClassificationType.BOTH,
- false,
+ false
);
const updater = new PolylineGeometryUpdater(entity, scene);
@@ -181,7 +181,7 @@ describe("DataSources/StaticGroundPolylinePerMaterialBatch", function () {
TimeInterval.fromIso8601({
iso8601: "2018-02-14T04:00:00+1100/2018-02-14T04:15:00+1100",
data: new DistanceDisplayCondition(1.0, 2.0),
- }),
+ })
);
const polyline = createGroundPolyline();
@@ -198,7 +198,7 @@ describe("DataSources/StaticGroundPolylinePerMaterialBatch", function () {
batch = new StaticGroundPolylinePerMaterialBatch(
scene.groundPrimitives,
ClassificationType.BOTH,
- false,
+ false
);
const updater = new PolylineGeometryUpdater(entity, scene);
@@ -215,7 +215,7 @@ describe("DataSources/StaticGroundPolylinePerMaterialBatch", function () {
let attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes.distanceDisplayCondition).toEqualEpsilon(
[1.0, 2.0],
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
batch.update(outOfRangeTime);
@@ -242,7 +242,7 @@ describe("DataSources/StaticGroundPolylinePerMaterialBatch", function () {
TimeInterval.fromIso8601({
iso8601: "2018-02-14T04:00:00+1100/2018-02-14T04:15:00+1100",
data: true,
- }),
+ })
);
const polyline = createGroundPolyline();
polyline.show = show;
@@ -257,7 +257,7 @@ describe("DataSources/StaticGroundPolylinePerMaterialBatch", function () {
batch = new StaticGroundPolylinePerMaterialBatch(
scene.groundPrimitives,
- false,
+ false
);
const updater = new PolylineGeometryUpdater(entity, scene);
@@ -294,7 +294,7 @@ describe("DataSources/StaticGroundPolylinePerMaterialBatch", function () {
batch = new StaticGroundPolylinePerMaterialBatch(
scene.groundPrimitives,
ClassificationType.BOTH,
- false,
+ false
);
function buildEntity() {
@@ -367,7 +367,7 @@ describe("DataSources/StaticGroundPolylinePerMaterialBatch", function () {
batch = new StaticGroundPolylinePerMaterialBatch(
scene.groundPrimitives,
ClassificationType.BOTH,
- false,
+ false
);
const polyline1 = createGroundPolyline();
polyline1.material = Color.RED;
@@ -407,7 +407,7 @@ describe("DataSources/StaticGroundPolylinePerMaterialBatch", function () {
batch = new StaticGroundPolylinePerMaterialBatch(
scene.groundPrimitives,
ClassificationType.BOTH,
- false,
+ false
);
const polyline1 = createGroundPolyline();
@@ -452,7 +452,7 @@ describe("DataSources/StaticGroundPolylinePerMaterialBatch", function () {
batch = new StaticGroundPolylinePerMaterialBatch(
scene.groundPrimitives,
ClassificationType.BOTH,
- false,
+ false
);
const polyline1 = createGroundPolyline();
@@ -499,7 +499,7 @@ describe("DataSources/StaticGroundPolylinePerMaterialBatch", function () {
batch = new StaticGroundPolylinePerMaterialBatch(
scene.groundPrimitives,
ClassificationType.BOTH,
- false,
+ false
);
const polyline1 = createGroundPolyline();
@@ -543,7 +543,7 @@ describe("DataSources/StaticGroundPolylinePerMaterialBatch", function () {
batch = new StaticGroundPolylinePerMaterialBatch(
scene.groundPrimitives,
ClassificationType.BOTH,
- false,
+ false
);
function buildEntity() {
diff --git a/packages/engine/Specs/DataSources/StaticOutlineGeometryBatchSpec.js b/packages/engine/Specs/DataSources/StaticOutlineGeometryBatchSpec.js
index a71a1e04c255..3af4d26484ab 100644
--- a/packages/engine/Specs/DataSources/StaticOutlineGeometryBatchSpec.js
+++ b/packages/engine/Specs/DataSources/StaticOutlineGeometryBatchSpec.js
@@ -33,7 +33,7 @@ describe("DataSources/StaticOutlineGeometryBatch", function () {
scene.primitives,
scene,
false,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
const entity = new Entity({
@@ -91,7 +91,7 @@ describe("DataSources/StaticOutlineGeometryBatch", function () {
TimeInterval.fromIso8601({
iso8601: "2018-02-14T04:00:00+1100/2018-02-14T04:15:00+1100",
data: Color.RED,
- }),
+ })
);
const entity = new Entity({
availability: new TimeIntervalCollection([
@@ -113,7 +113,7 @@ describe("DataSources/StaticOutlineGeometryBatch", function () {
scene.primitives,
scene,
false,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
const updater = new EllipseGeometryUpdater(entity, scene);
@@ -149,7 +149,7 @@ describe("DataSources/StaticOutlineGeometryBatch", function () {
TimeInterval.fromIso8601({
iso8601: "2018-02-14T04:00:00+1100/2018-02-14T04:15:00+1100",
data: new DistanceDisplayCondition(1.0, 2.0),
- }),
+ })
);
const entity = new Entity({
availability: new TimeIntervalCollection([
@@ -172,7 +172,7 @@ describe("DataSources/StaticOutlineGeometryBatch", function () {
scene.primitives,
scene,
false,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
const updater = new EllipseGeometryUpdater(entity, scene);
@@ -189,7 +189,7 @@ describe("DataSources/StaticOutlineGeometryBatch", function () {
let attributes = primitive.getGeometryInstanceAttributes(entity);
expect(attributes.distanceDisplayCondition).toEqualEpsilon(
[1.0, 2.0],
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
batch.update(outOfRangeTime);
@@ -211,7 +211,7 @@ describe("DataSources/StaticOutlineGeometryBatch", function () {
TimeInterval.fromIso8601({
iso8601: "2018-02-14T04:00:00+1100/2018-02-14T04:15:00+1100",
data: true,
- }),
+ })
);
const entity = new Entity({
availability: new TimeIntervalCollection([
@@ -233,7 +233,7 @@ describe("DataSources/StaticOutlineGeometryBatch", function () {
scene.primitives,
scene,
false,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
const updater = new EllipseGeometryUpdater(entity, scene);
@@ -266,7 +266,7 @@ describe("DataSources/StaticOutlineGeometryBatch", function () {
scene.primitives,
scene,
false,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
function buildEntity() {
@@ -335,7 +335,7 @@ describe("DataSources/StaticOutlineGeometryBatch", function () {
scene.primitives,
scene,
false,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
function buildEntity() {
diff --git a/packages/engine/Specs/DataSources/StripeMaterialPropertySpec.js b/packages/engine/Specs/DataSources/StripeMaterialPropertySpec.js
index 94bdb5505fb0..8d1f055a853b 100644
--- a/packages/engine/Specs/DataSources/StripeMaterialPropertySpec.js
+++ b/packages/engine/Specs/DataSources/StripeMaterialPropertySpec.js
@@ -83,35 +83,35 @@ describe("DataSources/StripeMaterialProperty", function () {
start: start,
stop: stop,
data: false,
- }),
+ })
);
property.evenColor.intervals.addInterval(
new TimeInterval({
start: start,
stop: stop,
data: Color.RED,
- }),
+ })
);
property.oddColor.intervals.addInterval(
new TimeInterval({
start: start,
stop: stop,
data: Color.BLUE,
- }),
+ })
);
property.offset.intervals.addInterval(
new TimeInterval({
start: start,
stop: stop,
data: 10,
- }),
+ })
);
property.repeat.intervals.addInterval(
new TimeInterval({
start: start,
stop: stop,
data: 20,
- }),
+ })
);
expect(property.isConstant).toBe(false);
diff --git a/packages/engine/Specs/DataSources/TerrainOffsetPropertySpec.js b/packages/engine/Specs/DataSources/TerrainOffsetPropertySpec.js
index 8a444e67b524..880d682978f7 100644
--- a/packages/engine/Specs/DataSources/TerrainOffsetPropertySpec.js
+++ b/packages/engine/Specs/DataSources/TerrainOffsetPropertySpec.js
@@ -29,7 +29,7 @@ describe("DataSources/TerrainOffsetProperty", function () {
scene,
position,
height,
- extrudedHeight,
+ extrudedHeight
);
expect(property.isConstant).toBe(false);
expect(property.getValue(time)).toEqual(Cartesian3.ZERO);
@@ -46,7 +46,7 @@ describe("DataSources/TerrainOffsetProperty", function () {
undefined,
position,
height,
- extrudedHeight,
+ extrudedHeight
);
}).toThrowDeveloperError();
});
@@ -59,7 +59,7 @@ describe("DataSources/TerrainOffsetProperty", function () {
scene,
undefined,
height,
- extrudedHeight,
+ extrudedHeight
);
}).toThrowDeveloperError();
});
diff --git a/packages/engine/Specs/DataSources/TimeIntervalCollectionPositionPropertySpec.js b/packages/engine/Specs/DataSources/TimeIntervalCollectionPositionPropertySpec.js
index b5d3687b3fc7..ca98185ffac1 100644
--- a/packages/engine/Specs/DataSources/TimeIntervalCollectionPositionPropertySpec.js
+++ b/packages/engine/Specs/DataSources/TimeIntervalCollectionPositionPropertySpec.js
@@ -77,7 +77,7 @@ describe("DataSources/TimeIntervalCollectionPositionProperty", function () {
});
const property = new TimeIntervalCollectionPositionProperty(
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
);
property.intervals.addInterval(interval1);
@@ -86,7 +86,7 @@ describe("DataSources/TimeIntervalCollectionPositionProperty", function () {
interval1.start,
valueInertial,
ReferenceFrame.INERTIAL,
- ReferenceFrame.FIXED,
+ ReferenceFrame.FIXED
);
const result = property.getValue(interval1.start);
@@ -107,7 +107,7 @@ describe("DataSources/TimeIntervalCollectionPositionProperty", function () {
});
const property = new TimeIntervalCollectionPositionProperty(
- ReferenceFrame.FIXED,
+ ReferenceFrame.FIXED
);
property.intervals.addInterval(interval1);
property.intervals.addInterval(interval2);
@@ -116,14 +116,14 @@ describe("DataSources/TimeIntervalCollectionPositionProperty", function () {
interval1.start,
interval1.data,
ReferenceFrame.FIXED,
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
);
const expected = new Cartesian3();
const result1 = property.getValueInReferenceFrame(
interval1.start,
ReferenceFrame.INERTIAL,
- expected,
+ expected
);
expect(result1).toBe(expected);
expect(result1).toEqual(valueInertial);
@@ -131,7 +131,7 @@ describe("DataSources/TimeIntervalCollectionPositionProperty", function () {
const result2 = property.getValueInReferenceFrame(
interval2.stop,
ReferenceFrame.FIXED,
- expected,
+ expected
);
expect(result2).toBe(expected);
expect(result2).toEqual(interval2.data);
@@ -151,7 +151,7 @@ describe("DataSources/TimeIntervalCollectionPositionProperty", function () {
});
const property = new TimeIntervalCollectionPositionProperty(
- ReferenceFrame.FIXED,
+ ReferenceFrame.FIXED
);
property.intervals.addInterval(interval1);
property.intervals.addInterval(interval2);
@@ -160,18 +160,18 @@ describe("DataSources/TimeIntervalCollectionPositionProperty", function () {
interval1.start,
interval1.data,
ReferenceFrame.FIXED,
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
);
const result1 = property.getValueInReferenceFrame(
interval1.start,
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
);
expect(result1).toEqual(valueInertial);
const result2 = property.getValueInReferenceFrame(
interval2.stop,
- ReferenceFrame.FIXED,
+ ReferenceFrame.FIXED
);
expect(result2).toEqual(interval2.data);
});
@@ -207,10 +207,10 @@ describe("DataSources/TimeIntervalCollectionPositionProperty", function () {
it("equals works for differing referenceFrames", function () {
const left = new TimeIntervalCollectionPositionProperty(
- ReferenceFrame.FIXED,
+ ReferenceFrame.FIXED
);
let right = new TimeIntervalCollectionPositionProperty(
- ReferenceFrame.INERTIAL,
+ ReferenceFrame.INERTIAL
);
expect(left.equals(right)).toEqual(false);
@@ -232,13 +232,13 @@ describe("DataSources/TimeIntervalCollectionPositionProperty", function () {
});
const left = new TimeIntervalCollectionPositionProperty(
- ReferenceFrame.FIXED,
+ ReferenceFrame.FIXED
);
left.intervals.addInterval(interval1);
left.intervals.addInterval(interval2);
const right = new TimeIntervalCollectionPositionProperty(
- ReferenceFrame.FIXED,
+ ReferenceFrame.FIXED
);
right.intervals.addInterval(interval1);
diff --git a/packages/engine/Specs/DataSources/VelocityOrientationPropertySpec.js b/packages/engine/Specs/DataSources/VelocityOrientationPropertySpec.js
index ef7951711f3a..75228c1d99d7 100644
--- a/packages/engine/Specs/DataSources/VelocityOrientationPropertySpec.js
+++ b/packages/engine/Specs/DataSources/VelocityOrientationPropertySpec.js
@@ -27,7 +27,7 @@ describe("DataSources/VelocityOrientationProperty", function () {
const position = new SampledPositionProperty();
const property = new VelocityOrientationProperty(
position,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
expect(property.isConstant).toBe(true);
expect(property.definitionChanged).toBeInstanceOf(Event);
@@ -106,7 +106,7 @@ describe("DataSources/VelocityOrientationProperty", function () {
const velocity = Cartesian3.subtract(
values[1],
values[0],
- new Cartesian3(),
+ new Cartesian3()
);
Cartesian3.normalize(velocity, velocity);
@@ -117,18 +117,18 @@ describe("DataSources/VelocityOrientationProperty", function () {
let matrix = Transforms.rotationMatrixFromPositionVelocity(
position.getValue(times[0]),
- velocity,
+ velocity
);
expect(property.getValue(times[0])).toEqual(
- Quaternion.fromRotationMatrix(matrix),
+ Quaternion.fromRotationMatrix(matrix)
);
matrix = Transforms.rotationMatrixFromPositionVelocity(
position.getValue(times[0]),
- velocity,
+ velocity
);
expect(property.getValue(times[1])).toEqual(
- Quaternion.fromRotationMatrix(matrix),
+ Quaternion.fromRotationMatrix(matrix)
);
});
@@ -141,7 +141,7 @@ describe("DataSources/VelocityOrientationProperty", function () {
const velocity = Cartesian3.subtract(
values[1],
values[0],
- new Cartesian3(),
+ new Cartesian3()
);
Cartesian3.normalize(velocity, velocity);
@@ -156,7 +156,7 @@ describe("DataSources/VelocityOrientationProperty", function () {
const matrix = Transforms.rotationMatrixFromPositionVelocity(
position.getValue(times[0]),
- velocity,
+ velocity
);
expect(expected).toEqual(Quaternion.fromRotationMatrix(matrix));
});
diff --git a/packages/engine/Specs/DataSources/VelocityVectorPropertySpec.js b/packages/engine/Specs/DataSources/VelocityVectorPropertySpec.js
index 4e059ecad6d0..c9d59660e9cc 100644
--- a/packages/engine/Specs/DataSources/VelocityVectorPropertySpec.js
+++ b/packages/engine/Specs/DataSources/VelocityVectorPropertySpec.js
@@ -138,11 +138,11 @@ describe("DataSources/VelocityVectorProperty", function () {
const expectedVelocity = new Cartesian3(20.0, 0.0, 0.0);
expect(property.getValue(times[0])).toEqualEpsilon(
expectedVelocity,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
expect(property.getValue(times[1])).toEqualEpsilon(
expectedVelocity,
- CesiumMath.EPSILON13,
+ CesiumMath.EPSILON13
);
});
@@ -168,7 +168,7 @@ describe("DataSources/VelocityVectorProperty", function () {
it("produces normalized value of undefined with constant position", function () {
const position = new ConstantPositionProperty(
- new Cartesian3(1.0, 2.0, 3.0),
+ new Cartesian3(1.0, 2.0, 3.0)
);
const property = new VelocityVectorProperty(position);
@@ -177,7 +177,7 @@ describe("DataSources/VelocityVectorProperty", function () {
it("produces unnormalized value of zero with constant position", function () {
const position = new ConstantPositionProperty(
- new Cartesian3(1.0, 2.0, 3.0),
+ new Cartesian3(1.0, 2.0, 3.0)
);
const property = new VelocityVectorProperty(position, false);
diff --git a/packages/engine/Specs/DataSources/WallGeometryUpdaterSpec.js b/packages/engine/Specs/DataSources/WallGeometryUpdaterSpec.js
index dd4249ea0956..28b8261e334e 100644
--- a/packages/engine/Specs/DataSources/WallGeometryUpdaterSpec.js
+++ b/packages/engine/Specs/DataSources/WallGeometryUpdaterSpec.js
@@ -40,9 +40,7 @@ describe(
function createBasicWall() {
const wall = new WallGraphics();
wall.positions = new ConstantProperty(
- Cartesian3.fromRadiansArrayHeights([
- 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1,
- ]),
+ Cartesian3.fromRadiansArrayHeights([0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1])
);
const entity = new Entity();
entity.wall = wall;
@@ -81,7 +79,7 @@ describe(
start: time,
stop: time2,
data: [],
- }),
+ })
);
updater._onEntityPropertyChanged(entity, "wall");
@@ -97,7 +95,7 @@ describe(
start: time,
stop: time2,
data: [],
- }),
+ })
);
updater._onEntityPropertyChanged(entity, "wall");
@@ -149,7 +147,7 @@ describe(
it("dynamic updater sets properties", function () {
const wall = new WallGraphics();
wall.positions = createDynamicProperty(
- Cartesian3.fromRadiansArray([0, 0, 1, 0, 1, 1, 0, 1]),
+ Cartesian3.fromRadiansArray([0, 0, 1, 0, 1, 1, 0, 1])
);
wall.show = createDynamicProperty(true);
wall.minimumHeights = createDynamicProperty([1, 2, 3, 4]);
@@ -165,7 +163,7 @@ describe(
const updater = new WallGeometryUpdater(entity, scene);
const dynamicUpdater = updater.createDynamicUpdater(
new PrimitiveCollection(),
- new PrimitiveCollection(),
+ new PrimitiveCollection()
);
dynamicUpdater.update(time);
@@ -217,15 +215,15 @@ describe(
WallGeometryUpdater,
"wall",
createBasicWall,
- getScene,
+ getScene
);
createDynamicGeometryUpdaterSpecs(
WallGeometryUpdater,
"wall",
createDynamicWall,
- getScene,
+ getScene
);
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/DataSources/WallGraphicsSpec.js b/packages/engine/Specs/DataSources/WallGraphicsSpec.js
index 78432a7c0615..52856fef58ce 100644
--- a/packages/engine/Specs/DataSources/WallGraphicsSpec.js
+++ b/packages/engine/Specs/DataSources/WallGraphicsSpec.js
@@ -55,7 +55,7 @@ describe("DataSources/WallGraphics", function () {
expect(wall.maximumHeights.getValue()).toEqual(options.maximumHeights);
expect(wall.shadows.getValue()).toEqual(options.shadows);
expect(wall.distanceDisplayCondition.getValue()).toEqual(
- options.distanceDisplayCondition,
+ options.distanceDisplayCondition
);
});
@@ -89,7 +89,7 @@ describe("DataSources/WallGraphics", function () {
expect(target.maximumHeights).toBe(source.maximumHeights);
expect(target.shadows).toBe(source.shadows);
expect(target.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
});
@@ -167,7 +167,7 @@ describe("DataSources/WallGraphics", function () {
expect(result.maximumHeights).toBe(source.maximumHeights);
expect(result.shadows).toBe(source.shadows);
expect(result.distanceDisplayCondition).toBe(
- source.distanceDisplayCondition,
+ source.distanceDisplayCondition
);
});
@@ -194,13 +194,13 @@ describe("DataSources/WallGraphics", function () {
property,
"shadows",
ShadowMode.ENABLED,
- ShadowMode.DISABLED,
+ ShadowMode.DISABLED
);
testDefinitionChanged(
property,
"distanceDisplayCondition",
new DistanceDisplayCondition(),
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
});
});
diff --git a/packages/engine/Specs/DataSources/exportKmlSpec.js b/packages/engine/Specs/DataSources/exportKmlSpec.js
index f6bfc44557fe..61c40af56152 100644
--- a/packages/engine/Specs/DataSources/exportKmlSpec.js
+++ b/packages/engine/Specs/DataSources/exportKmlSpec.js
@@ -55,7 +55,7 @@ describe("DataSources/exportKml", function () {
} else if (typeof attribute === "number") {
expect(Number(nodeAttribute.value)).toEqualEpsilon(
attribute,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
} else {
fail();
@@ -80,7 +80,7 @@ describe("DataSources/exportKml", function () {
} else if (typeof property === "number") {
expect(Number(node.textContent)).toEqualEpsilon(
property,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
} else if (typeof property === "boolean") {
expect(Number(node.textContent)).toBe(property ? 1 : 0);
@@ -100,12 +100,12 @@ describe("DataSources/exportKml", function () {
const cartographic2 = Cartographic.fromDegrees(
Number(values[0]),
Number(values[1]),
- Number(values[2]),
+ Number(values[2])
);
return Cartographic.equalsEpsilon(
cartographic1,
cartographic2,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
}
@@ -511,7 +511,7 @@ describe("DataSources/exportKml", function () {
fileReader.onload = function (event) {
// Verify its a zip archive
expect(new DataView(event.target.result).getUint32(0, false)).toBe(
- 0x504b0304,
+ 0x504b0304
);
resolve();
};
@@ -557,13 +557,13 @@ describe("DataSources/exportKml", function () {
Number(values[0]),
Number(values[1]),
Number(values[2]),
- cartographic2,
+ cartographic2
);
if (
Cartographic.equalsEpsilon(
cartographic1,
cartographic2,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
)
) {
return true;
@@ -729,13 +729,13 @@ describe("DataSources/exportKml", function () {
Number(values[0]),
Number(values[1]),
Number(values[2]),
- cartographic2,
+ cartographic2
);
if (
Cartographic.equalsEpsilon(
cartographic1,
cartographic2,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
)
) {
return true;
@@ -866,13 +866,13 @@ describe("DataSources/exportKml", function () {
Number(values[0]),
Number(values[1]),
Number(values[2]),
- cartographic2,
+ cartographic2
);
if (
Cartographic.equalsEpsilon(
cartographic1,
cartographic2,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
)
) {
return true;
@@ -1203,13 +1203,13 @@ describe("DataSources/exportKml", function () {
Number(values[0]),
Number(values[1]),
Number(values[2]),
- cartographic2,
+ cartographic2
);
if (
Cartographic.equalsEpsilon(
cartographic1,
cartographic2,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
)
) {
return true;
diff --git a/packages/engine/Specs/Renderer/AutomaticUniformSpec.js b/packages/engine/Specs/Renderer/AutomaticUniformSpec.js
index b994a15a43af..f6381a39f9ef 100644
--- a/packages/engine/Specs/Renderer/AutomaticUniformSpec.js
+++ b/packages/engine/Specs/Renderer/AutomaticUniformSpec.js
@@ -41,13 +41,13 @@ describe(
position,
direction,
right,
- up,
+ up
) {
return {
viewMatrix: defaultValue(view, Matrix4.clone(Matrix4.IDENTITY)),
inverseViewMatrix: Matrix4.inverseTransformation(
defaultValue(view, Matrix4.clone(Matrix4.IDENTITY)),
- new Matrix4(),
+ new Matrix4()
),
frustum: {
near: 1.0,
@@ -58,11 +58,11 @@ describe(
right: 1.0,
projectionMatrix: defaultValue(
projection,
- Matrix4.clone(Matrix4.IDENTITY),
+ Matrix4.clone(Matrix4.IDENTITY)
),
infiniteProjectionMatrix: defaultValue(
infiniteProjection,
- Matrix4.clone(Matrix4.IDENTITY),
+ Matrix4.clone(Matrix4.IDENTITY)
),
computeCullingVolume: function () {
return undefined;
@@ -75,7 +75,7 @@ describe(
positionWC: defaultValue(position, Cartesian3.clone(Cartesian3.ZERO)),
directionWC: defaultValue(
direction,
- Cartesian3.clone(Cartesian3.UNIT_Z),
+ Cartesian3.clone(Cartesian3.UNIT_Z)
),
rightWC: defaultValue(right, Cartesian3.clone(Cartesian3.UNIT_X)),
upWC: defaultValue(up, Cartesian3.clone(Cartesian3.UNIT_Y)),
@@ -179,7 +179,7 @@ describe(
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
expect({
context: context,
@@ -213,7 +213,7 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
expect({
context: context,
@@ -244,10 +244,10 @@ describe(
13.0,
14.0,
15.0,
- 16.0,
- ),
- ),
- ),
+ 16.0
+ )
+ )
+ )
);
const fs =
@@ -286,10 +286,10 @@ describe(
13.0,
14.0,
15.0,
- 16.0,
- ),
- ),
- ),
+ 16.0
+ )
+ )
+ )
);
const fs =
@@ -328,10 +328,10 @@ describe(
13.0,
14.0,
15.0,
- 16.0,
- ),
- ),
- ),
+ 16.0
+ )
+ )
+ )
);
const fs =
@@ -369,10 +369,10 @@ describe(
13.0,
14.0,
15.0,
- 16.0,
- ),
- ),
- ),
+ 16.0
+ )
+ )
+ )
);
const fs =
@@ -410,10 +410,10 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
- ),
- ),
- ),
+ 1.0
+ )
+ )
+ )
);
const fs =
@@ -452,10 +452,10 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
- ),
- ),
- ),
+ 1.0
+ )
+ )
+ )
);
const fs =
@@ -494,10 +494,10 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
- ),
- ),
- ),
+ 1.0
+ )
+ )
+ )
);
const fs =
@@ -536,10 +536,10 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
- ),
- ),
- ),
+ 1.0
+ )
+ )
+ )
);
const fs =
@@ -579,10 +579,10 @@ describe(
13.0,
14.0,
15.0,
- 16.0,
- ),
- ),
- ),
+ 16.0
+ )
+ )
+ )
);
const fs =
@@ -622,10 +622,10 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
- ),
- ),
- ),
+ 1.0
+ )
+ )
+ )
);
const fs =
@@ -663,9 +663,9 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
- ),
- ),
+ 1.0
+ )
+ )
);
frameState.mode = SceneMode.SCENE2D;
@@ -707,9 +707,9 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
- ),
- ),
+ 1.0
+ )
+ )
);
const frustum = new OrthographicFrustum();
frustum.aspectRatio = 1.0;
@@ -757,10 +757,10 @@ describe(
13.0,
14.0,
15.0,
- 16.0,
- ),
- ),
- ),
+ 16.0
+ )
+ )
+ )
);
const fs =
@@ -799,10 +799,10 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
- ),
- ),
- ),
+ 1.0
+ )
+ )
+ )
);
const fs =
@@ -829,7 +829,7 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
expect({
context: context,
@@ -860,10 +860,10 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
- ),
- ),
- ),
+ 1.0
+ )
+ )
+ )
);
const fs =
@@ -890,7 +890,7 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
expect({
context: context,
@@ -921,10 +921,10 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
- ),
- ),
- ),
+ 1.0
+ )
+ )
+ )
);
const fs =
@@ -951,7 +951,7 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
expect({
context: context,
@@ -965,8 +965,8 @@ describe(
us.update(
createFrameState(
context,
- createMockCamera(Matrix4.clone(Matrix4.IDENTITY)),
- ),
+ createMockCamera(Matrix4.clone(Matrix4.IDENTITY))
+ )
);
const fs =
@@ -993,7 +993,7 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
expect({
context: context,
@@ -1007,8 +1007,8 @@ describe(
us.update(
createFrameState(
context,
- createMockCamera(Matrix4.clone(Matrix4.IDENTITY)),
- ),
+ createMockCamera(Matrix4.clone(Matrix4.IDENTITY))
+ )
);
const fs =
@@ -1035,7 +1035,7 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
expect({
context: context,
@@ -1066,7 +1066,7 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
),
new Matrix4(
1.0,
@@ -1084,10 +1084,10 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
- ),
- ),
- ),
+ 1.0
+ )
+ )
+ )
);
const fs =
@@ -1127,7 +1127,7 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
),
new Matrix4(
1.0,
@@ -1145,10 +1145,10 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
- ),
- ),
- ),
+ 1.0
+ )
+ )
+ )
);
const fs =
@@ -1188,7 +1188,7 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
),
new Matrix4(
1.0,
@@ -1206,10 +1206,10 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
- ),
- ),
- ),
+ 1.0
+ )
+ )
+ )
);
const fs =
@@ -1237,7 +1237,7 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
expect({
context: context,
@@ -1268,7 +1268,7 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
),
new Matrix4(
1.0,
@@ -1286,10 +1286,10 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
- ),
- ),
- ),
+ 1.0
+ )
+ )
+ )
);
const fs =
@@ -1317,7 +1317,7 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
expect({
context: context,
@@ -1348,7 +1348,7 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
),
new Matrix4(
1.0,
@@ -1366,10 +1366,10 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
- ),
- ),
- ),
+ 1.0
+ )
+ )
+ )
);
const fs =
@@ -1397,7 +1397,7 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
expect({
context: context,
@@ -1428,7 +1428,7 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
),
undefined,
new Matrix4(
@@ -1447,10 +1447,10 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
- ),
- ),
- ),
+ 1.0
+ )
+ )
+ )
);
const fs =
@@ -1478,7 +1478,7 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
expect({
context: context,
@@ -1512,7 +1512,7 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
expect({
context: context,
@@ -1546,7 +1546,7 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
expect({
context: context,
@@ -1580,7 +1580,7 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
expect({
context: context,
@@ -1614,7 +1614,7 @@ describe(
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
expect({
context: context,
@@ -1632,9 +1632,9 @@ describe(
undefined,
undefined,
undefined,
- new Cartesian3(-1000.0, 0.0, 100000.0),
- ),
- ),
+ new Cartesian3(-1000.0, 0.0, 100000.0)
+ )
+ )
);
const fs =
@@ -1795,8 +1795,8 @@ describe(
// Provide position and direction because the default position of (0, 0, 0)
// will lead to a divide by zero when updating fog below.
new Cartesian3(1.0, 0.0, 0.0),
- new Cartesian3(0.0, 1.0, 0.0),
- ),
+ new Cartesian3(0.0, 1.0, 0.0)
+ )
);
const fog = new Fog();
fog.density = 0.1;
@@ -1825,8 +1825,8 @@ describe(
// Provide position and direction because the default position of (0, 0, 0)
// will lead to a divide by zero when updating fog below
new Cartesian3(1.0, 0.0, 0.0),
- new Cartesian3(0.0, 1.0, 0.0),
- ),
+ new Cartesian3(0.0, 1.0, 0.0)
+ )
);
const fog = new Fog();
fog.minimumBrightness = 0.25;
@@ -2446,5 +2446,5 @@ describe(
}).contextToRender();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/BufferSpec.js b/packages/engine/Specs/Renderer/BufferSpec.js
index 9f96253ebf0e..666cdd8e3b1f 100644
--- a/packages/engine/Specs/Renderer/BufferSpec.js
+++ b/packages/engine/Specs/Renderer/BufferSpec.js
@@ -692,5 +692,5 @@ describe(
});
}
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/BuiltinFunctionsSpec.js b/packages/engine/Specs/Renderer/BuiltinFunctionsSpec.js
index 0f71d8f7b20d..c4457c832e13 100644
--- a/packages/engine/Specs/Renderer/BuiltinFunctionsSpec.js
+++ b/packages/engine/Specs/Renderer/BuiltinFunctionsSpec.js
@@ -525,5 +525,5 @@ describe(
}).contextToRender();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/ClearSpec.js b/packages/engine/Specs/Renderer/ClearSpec.js
index 2a6454ab8b3c..4d2744841050 100644
--- a/packages/engine/Specs/Renderer/ClearSpec.js
+++ b/packages/engine/Specs/Renderer/ClearSpec.js
@@ -117,7 +117,7 @@ describe(
expect(
context.readPixels({
width: -1,
- }),
+ })
).toEqual([0, 0, 0, 0]);
}).toThrowDeveloperError();
});
@@ -127,10 +127,10 @@ describe(
expect(
context.readPixels({
height: -1,
- }),
+ })
).toEqual([0, 0, 0, 0]);
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/ComputeCommandSpec.js b/packages/engine/Specs/Renderer/ComputeCommandSpec.js
index 51d001526e74..34dc9ec90312 100644
--- a/packages/engine/Specs/Renderer/ComputeCommandSpec.js
+++ b/packages/engine/Specs/Renderer/ComputeCommandSpec.js
@@ -158,5 +158,5 @@ describe(
expect(scene).notToRender([0, 0, 0, 255]);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/ContextSpec.js b/packages/engine/Specs/Renderer/ContextSpec.js
index 17a28952b240..7cb308cbcb8f 100644
--- a/packages/engine/Specs/Renderer/ContextSpec.js
+++ b/packages/engine/Specs/Renderer/ContextSpec.js
@@ -41,7 +41,7 @@ describe(
it("get maximumCombinedTextureImageUnits", function () {
expect(
- ContextLimits.maximumCombinedTextureImageUnits,
+ ContextLimits.maximumCombinedTextureImageUnits
).toBeGreaterThanOrEqual(8);
});
@@ -51,7 +51,7 @@ describe(
it("get maximumFragmentUniformVectors", function () {
expect(
- ContextLimits.maximumFragmentUniformVectors,
+ ContextLimits.maximumFragmentUniformVectors
).toBeGreaterThanOrEqual(16);
});
@@ -77,13 +77,13 @@ describe(
it("get maximumVertexTextureImageUnits", function () {
expect(
- ContextLimits.maximumVertexTextureImageUnits,
+ ContextLimits.maximumVertexTextureImageUnits
).toBeGreaterThanOrEqual(0);
});
it("get maximumVertexUniformVectors", function () {
expect(ContextLimits.maximumVertexUniformVectors).toBeGreaterThanOrEqual(
- 1,
+ 1
);
});
@@ -188,7 +188,7 @@ describe(
it("gets maximum texture filter anisotropy", function () {
if (context.textureFilterAnisotropic) {
expect(
- ContextLimits.maximumTextureFilterAnisotropy,
+ ContextLimits.maximumTextureFilterAnisotropy
).toBeGreaterThanOrEqual(2);
} else {
expect(ContextLimits.maximumTextureFilterAnisotropy).toEqual(1);
@@ -342,5 +342,5 @@ describe(
}
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/CubeMapSpec.js b/packages/engine/Specs/Renderer/CubeMapSpec.js
index 86a97c7c28a8..4c7ac6ccfeac 100644
--- a/packages/engine/Specs/Renderer/CubeMapSpec.js
+++ b/packages/engine/Specs/Renderer/CubeMapSpec.js
@@ -96,45 +96,45 @@ describe(
promises.push(
Resource.fetchImage("./Data/Images/Green.png").then(function (result) {
greenImage = result;
- }),
+ })
);
promises.push(
Resource.fetchImage("./Data/Images/Blue.png").then(function (result) {
blueImage = result;
- }),
+ })
);
promises.push(
- Resource.fetchImage("./Data/Images/BlueAlpha.png").then(
- function (result) {
- blueAlphaImage = result;
- },
- ),
+ Resource.fetchImage("./Data/Images/BlueAlpha.png").then(function (
+ result
+ ) {
+ blueAlphaImage = result;
+ })
);
promises.push(
- Resource.fetchImage("./Data/Images/BlueOverRed.png").then(
- function (result) {
- blueOverRedImage = result;
- },
- ),
+ Resource.fetchImage("./Data/Images/BlueOverRed.png").then(function (
+ result
+ ) {
+ blueOverRedImage = result;
+ })
);
promises.push(
- Resource.fetchImage("./Data/Images/Red16x16.png").then(
- function (result) {
- red16x16Image = result;
- },
- ),
+ Resource.fetchImage("./Data/Images/Red16x16.png").then(function (
+ result
+ ) {
+ red16x16Image = result;
+ })
);
promises.push(
Resource.fetchImage("./Data/Images/Gamma.png").then(function (result) {
gammaImage = result;
- }),
+ })
);
promises.push(
Resource.fetchImage("./Data/Images/CustomColorProfile.png").then(
function (result) {
customColorProfileImage = result;
- },
- ),
+ }
+ )
);
return Promise.all(promises);
@@ -173,22 +173,22 @@ describe(
expect(cubeMap.pixelDatatype).toEqual(PixelDatatype.UNSIGNED_BYTE);
expect(cubeMap.positiveX.pixelDatatype).toEqual(
- PixelDatatype.UNSIGNED_BYTE,
+ PixelDatatype.UNSIGNED_BYTE
);
expect(cubeMap.negativeX.pixelDatatype).toEqual(
- PixelDatatype.UNSIGNED_BYTE,
+ PixelDatatype.UNSIGNED_BYTE
);
expect(cubeMap.positiveY.pixelDatatype).toEqual(
- PixelDatatype.UNSIGNED_BYTE,
+ PixelDatatype.UNSIGNED_BYTE
);
expect(cubeMap.negativeY.pixelDatatype).toEqual(
- PixelDatatype.UNSIGNED_BYTE,
+ PixelDatatype.UNSIGNED_BYTE
);
expect(cubeMap.positiveZ.pixelDatatype).toEqual(
- PixelDatatype.UNSIGNED_BYTE,
+ PixelDatatype.UNSIGNED_BYTE
);
expect(cubeMap.negativeZ.pixelDatatype).toEqual(
- PixelDatatype.UNSIGNED_BYTE,
+ PixelDatatype.UNSIGNED_BYTE
);
});
@@ -445,7 +445,7 @@ describe(
level[faceName] = { width: 2, height: 2, arrayBufferView: colorData };
return level;
},
- {},
+ {}
);
cubeMap = new CubeMap({
@@ -464,7 +464,7 @@ describe(
level[faceName] = { width: 1, height: 1, arrayBufferView: colorData };
return level;
},
- {},
+ {}
);
cubeMap.loadMipmaps([level1]);
@@ -501,7 +501,7 @@ describe(
level[faceName] = { width: 2, height: 2, arrayBufferView: colorData };
return level;
},
- {},
+ {}
);
cubeMap = new CubeMap({
@@ -520,7 +520,7 @@ describe(
level[faceName] = { width: 1, height: 1, arrayBufferView: colorData };
return level;
},
- {},
+ {}
);
cubeMap.loadMipmaps([level1]);
@@ -1307,7 +1307,7 @@ describe(
// Allow for some leniency with the sizeInBytes approximation
expect(cubeMap.sizeInBytes).toEqualEpsilon(
(16 * 16 + 8 * 8 + 4 * 4 + 2 * 2 + 1) * 4 * 6,
- 10,
+ 10
);
});
@@ -1642,7 +1642,7 @@ describe(
0,
0,
0,
- cubeMap.height + 1,
+ cubeMap.height + 1
);
}).toThrowDeveloperError();
});
@@ -1718,5 +1718,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/DrawSpec.js b/packages/engine/Specs/Renderer/DrawSpec.js
index 3d7ab36a6c02..ea4a508eddc1 100644
--- a/packages/engine/Specs/Renderer/DrawSpec.js
+++ b/packages/engine/Specs/Renderer/DrawSpec.js
@@ -584,8 +584,22 @@ describe(
vertexBuffer: Buffer.createVertexBuffer({
context: context,
typedArray: new Float32Array([
- -1000, -1000, 0, 1, 1000, -1000, 0, 1, -1000, 1000, 0, 1, 1000,
- 1000, 0, 1,
+ -1000,
+ -1000,
+ 0,
+ 1,
+ 1000,
+ -1000,
+ 0,
+ 1,
+ -1000,
+ 1000,
+ 0,
+ 1,
+ 1000,
+ 1000,
+ 0,
+ 1,
]),
usage: BufferUsage.STATIC_DRAW,
}),
@@ -649,8 +663,22 @@ describe(
vertexBuffer: Buffer.createVertexBuffer({
context: context,
typedArray: new Float32Array([
- -1000, -1000, 0, 1, 1000, -1000, 0, 1, -1000, 1000, 0, 1, 1000,
- 1000, 0, 1,
+ -1000,
+ -1000,
+ 0,
+ 1,
+ 1000,
+ -1000,
+ 0,
+ 1,
+ -1000,
+ 1000,
+ 0,
+ 1,
+ 1000,
+ 1000,
+ 0,
+ 1,
]),
usage: BufferUsage.STATIC_DRAW,
}),
@@ -716,8 +744,22 @@ describe(
vertexBuffer: Buffer.createVertexBuffer({
context: context,
typedArray: new Float32Array([
- -1000, -1000, 0, 1, 1000, -1000, 0, 1, -1000, 1000, 0, 1, 1000,
- 1000, 0, 1,
+ -1000,
+ -1000,
+ 0,
+ 1,
+ 1000,
+ -1000,
+ 0,
+ 1,
+ -1000,
+ 1000,
+ 0,
+ 1,
+ 1000,
+ 1000,
+ 0,
+ 1,
]),
usage: BufferUsage.STATIC_DRAW,
}),
@@ -828,7 +870,14 @@ describe(
vertexBuffer: Buffer.createVertexBuffer({
context: context,
typedArray: new Float32Array([
- -1000, -1000, 0, 1, 1000, 1000, 0, 1,
+ -1000,
+ -1000,
+ 0,
+ 1,
+ 1000,
+ 1000,
+ 0,
+ 1,
]),
usage: BufferUsage.STATIC_DRAW,
}),
@@ -994,8 +1043,22 @@ describe(
vertexBuffer: Buffer.createVertexBuffer({
context: context,
typedArray: new Float32Array([
- -1000, -1000, 0, 1, 1000, -1000, 0, 1, -1000, 1000, 0, 1, 1000,
- 1000, 0, 1,
+ -1000,
+ -1000,
+ 0,
+ 1,
+ 1000,
+ -1000,
+ 0,
+ 1,
+ -1000,
+ 1000,
+ 0,
+ 1,
+ 1000,
+ 1000,
+ 0,
+ 1,
]),
usage: BufferUsage.STATIC_DRAW,
}),
@@ -1085,8 +1148,22 @@ describe(
vertexBuffer: Buffer.createVertexBuffer({
context: context,
typedArray: new Float32Array([
- -1000, -1000, 0, 1, 1000, -1000, 0, 1, -1000, 1000, 0, 1, 1000,
- 1000, 0, 1,
+ -1000,
+ -1000,
+ 0,
+ 1,
+ 1000,
+ -1000,
+ 0,
+ 1,
+ -1000,
+ 1000,
+ 0,
+ 1,
+ 1000,
+ 1000,
+ 0,
+ 1,
]),
usage: BufferUsage.STATIC_DRAW,
}),
@@ -1462,5 +1539,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/FramebufferManagerSpec.js b/packages/engine/Specs/Renderer/FramebufferManagerSpec.js
index de1d797048eb..12ddd6966f4d 100644
--- a/packages/engine/Specs/Renderer/FramebufferManagerSpec.js
+++ b/packages/engine/Specs/Renderer/FramebufferManagerSpec.js
@@ -256,7 +256,7 @@ describe(
expect(renderbuffer.width).toEqual(1);
expect(renderbuffer.height).toEqual(1);
expect(renderbuffer.format).toEqual(
- RenderbufferFormat.DEPTH_COMPONENT16,
+ RenderbufferFormat.DEPTH_COMPONENT16
);
}
});
@@ -521,5 +521,5 @@ describe(
expect(fbm.status).toEqual(fbm.framebuffer.status);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/FramebufferSpec.js b/packages/engine/Specs/Renderer/FramebufferSpec.js
index a963018ac362..bcfac7f68c22 100644
--- a/packages/engine/Specs/Renderer/FramebufferSpec.js
+++ b/packages/engine/Specs/Renderer/FramebufferSpec.js
@@ -292,11 +292,12 @@ describe(
}),
],
});
- renderColorTexture(
- framebuffer,
- new Color(0.0, 1.0, 0.0, 1.0),
- [0, 255, 0, 255],
- );
+ renderColorTexture(framebuffer, new Color(0.0, 1.0, 0.0, 1.0), [
+ 0,
+ 255,
+ 0,
+ 255,
+ ]);
});
it("draws to a floating-point color attachment", function () {
@@ -315,11 +316,12 @@ describe(
}),
],
});
- renderColorTexture(
- framebuffer,
- new Color(0.5, 1.5, 2.0, 1.0),
- [0.5, 1.5, 2.0, 1.0],
- );
+ renderColorTexture(framebuffer, new Color(0.5, 1.5, 2.0, 1.0), [
+ 0.5,
+ 1.5,
+ 2.0,
+ 1.0,
+ ]);
});
it("draws to a half floating-point color attachment", function () {
@@ -338,11 +340,12 @@ describe(
}),
],
});
- renderColorTexture(
- framebuffer,
- new Color(0.5, 1.5, 2.0, 1.0),
- [14336, 15872, 16384, 15360],
- );
+ renderColorTexture(framebuffer, new Color(0.5, 1.5, 2.0, 1.0), [
+ 14336,
+ 15872,
+ 16384,
+ 15360,
+ ]);
});
function renderDepthAttachment(framebuffer, texture) {
@@ -453,7 +456,7 @@ describe(
if (framebuffer.status === WebGLConstants.FRAMEBUFFER_COMPLETE) {
expect(
- renderDepthAttachment(framebuffer, framebuffer.depthTexture),
+ renderDepthAttachment(framebuffer, framebuffer.depthTexture)
).toEqualEpsilon([128, 128, 128, 255], 1);
}
}
@@ -481,7 +484,7 @@ describe(
if (framebuffer.status === WebGLConstants.FRAMEBUFFER_COMPLETE) {
expect(
- renderDepthAttachment(framebuffer, framebuffer.depthStencilTexture),
+ renderDepthAttachment(framebuffer, framebuffer.depthStencilTexture)
).toEqualEpsilon([128, 128, 128, 255], 1);
}
}
@@ -738,7 +741,7 @@ describe(
}),
});
expect(framebuffer.status).not.toEqual(
- WebGLConstants.FRAMEBUFFER_COMPLETE,
+ WebGLConstants.FRAMEBUFFER_COMPLETE
);
});
@@ -925,7 +928,7 @@ describe(
return new Framebuffer({
context: context,
colorRenderbuffers: new Array(
- ContextLimits.maximumColorAttachments + 1,
+ ContextLimits.maximumColorAttachments + 1
),
});
}).toThrowDeveloperError();
@@ -962,7 +965,7 @@ describe(
expect(function () {
framebuffer.getColorRenderbuffer(
- ContextLimits.maximumColorAttachments + 1,
+ ContextLimits.maximumColorAttachments + 1
);
}).toThrowDeveloperError();
});
@@ -1022,5 +1025,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/MultisampleFramebufferSpec.js b/packages/engine/Specs/Renderer/MultisampleFramebufferSpec.js
index 7393c123b173..faf90872bbe0 100644
--- a/packages/engine/Specs/Renderer/MultisampleFramebufferSpec.js
+++ b/packages/engine/Specs/Renderer/MultisampleFramebufferSpec.js
@@ -332,7 +332,7 @@ describe(
expect(renderAndBlitDepthAttachment(framebuffer)).toEqualEpsilon(
[128, 128, 128, 255],
- 1,
+ 1
);
});
@@ -381,5 +381,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/RenderStateSpec.js b/packages/engine/Specs/Renderer/RenderStateSpec.js
index afa5d42d1d41..4e757d3df986 100644
--- a/packages/engine/Specs/Renderer/RenderStateSpec.js
+++ b/packages/engine/Specs/Renderer/RenderStateSpec.js
@@ -108,16 +108,16 @@ describe(
expect(rs.polygonOffset.units).toEqual(defaultRS.polygonOffset.units);
expect(rs.scissorTest.enabled).toEqual(defaultRS.scissorTest.enabled);
expect(rs.scissorTest.rectangle.x).toEqual(
- defaultRS.scissorTest.rectangle.x,
+ defaultRS.scissorTest.rectangle.x
);
expect(rs.scissorTest.rectangle.y).toEqual(
- defaultRS.scissorTest.rectangle.y,
+ defaultRS.scissorTest.rectangle.y
);
expect(rs.scissorTest.rectangle.width).toEqual(
- defaultRS.scissorTest.rectangle.width,
+ defaultRS.scissorTest.rectangle.width
);
expect(rs.scissorTest.rectangle.height).toEqual(
- defaultRS.scissorTest.rectangle.height,
+ defaultRS.scissorTest.rectangle.height
);
expect(rs.depthRange.near).toEqual(defaultRS.depthRange.near);
expect(rs.depthRange.far).toEqual(defaultRS.depthRange.far);
@@ -136,49 +136,49 @@ describe(
expect(rs.blending.color.alpha).toEqual(defaultRS.blending.color.alpha);
expect(rs.blending.equationRgb).toEqual(defaultRS.blending.equationRgb);
expect(rs.blending.equationAlpha).toEqual(
- defaultRS.blending.equationAlpha,
+ defaultRS.blending.equationAlpha
);
expect(rs.blending.functionSourceRgb).toEqual(
- defaultRS.blending.functionSourceRgb,
+ defaultRS.blending.functionSourceRgb
);
expect(rs.blending.functionSourceAlpha).toEqual(
- defaultRS.blending.functionSourceAlpha,
+ defaultRS.blending.functionSourceAlpha
);
expect(rs.blending.functionDestinationRgb).toEqual(
- defaultRS.blending.functionDestinationRgb,
+ defaultRS.blending.functionDestinationRgb
);
expect(rs.blending.functionDestinationAlpha).toEqual(
- defaultRS.blending.functionDestinationAlpha,
+ defaultRS.blending.functionDestinationAlpha
);
expect(rs.stencilTest.enabled).toEqual(defaultRS.stencilTest.enabled);
expect(rs.stencilTest.frontFunction).toEqual(
- defaultRS.stencilTest.frontFunction,
+ defaultRS.stencilTest.frontFunction
);
expect(rs.stencilTest.backFunction).toEqual(
- defaultRS.stencilTest.backFunction,
+ defaultRS.stencilTest.backFunction
);
expect(rs.stencilTest.reference).toEqual(defaultRS.stencilTest.reference);
expect(rs.stencilTest.mask).toEqual(defaultRS.stencilTest.mask);
expect(rs.stencilTest.frontOperation.fail).toEqual(
- defaultRS.stencilTest.frontOperation.fail,
+ defaultRS.stencilTest.frontOperation.fail
);
expect(rs.stencilTest.frontOperation.zFail).toEqual(
- defaultRS.stencilTest.frontOperation.zFail,
+ defaultRS.stencilTest.frontOperation.zFail
);
expect(rs.stencilTest.frontOperation.zPass).toEqual(
- defaultRS.stencilTest.frontOperation.zPass,
+ defaultRS.stencilTest.frontOperation.zPass
);
expect(rs.stencilTest.backOperation.fail).toEqual(
- defaultRS.stencilTest.backOperation.fail,
+ defaultRS.stencilTest.backOperation.fail
);
expect(rs.stencilTest.backOperation.zFail).toEqual(
- defaultRS.stencilTest.backOperation.zFail,
+ defaultRS.stencilTest.backOperation.zFail
);
expect(rs.stencilTest.backOperation.zPass).toEqual(
- defaultRS.stencilTest.backOperation.zPass,
+ defaultRS.stencilTest.backOperation.zPass
);
expect(rs.sampleCoverage.enabled).toEqual(
- defaultRS.sampleCoverage.enabled,
+ defaultRS.sampleCoverage.enabled
);
expect(rs.sampleCoverage.value).toEqual(defaultRS.sampleCoverage.value);
expect(rs.sampleCoverage.invert).toEqual(defaultRS.sampleCoverage.invert);
@@ -274,10 +274,10 @@ describe(
expect(rs.scissorTest.rectangle.x).toEqual(r.scissorTest.rectangle.x);
expect(rs.scissorTest.rectangle.y).toEqual(r.scissorTest.rectangle.y);
expect(rs.scissorTest.rectangle.width).toEqual(
- r.scissorTest.rectangle.width,
+ r.scissorTest.rectangle.width
);
expect(rs.scissorTest.rectangle.height).toEqual(
- r.scissorTest.rectangle.height,
+ r.scissorTest.rectangle.height
);
expect(rs.depthRange.near).toEqual(r.depthRange.near);
expect(rs.depthRange.far).toEqual(r.depthRange.far);
@@ -297,16 +297,16 @@ describe(
expect(rs.blending.equationRgb).toEqual(r.blending.equationRgb);
expect(rs.blending.equationAlpha).toEqual(r.blending.equationAlpha);
expect(rs.blending.functionSourceRgb).toEqual(
- r.blending.functionSourceRgb,
+ r.blending.functionSourceRgb
);
expect(rs.blending.functionSourceAlpha).toEqual(
- r.blending.functionSourceAlpha,
+ r.blending.functionSourceAlpha
);
expect(rs.blending.functionDestinationRgb).toEqual(
- r.blending.functionDestinationRgb,
+ r.blending.functionDestinationRgb
);
expect(rs.blending.functionDestinationAlpha).toEqual(
- r.blending.functionDestinationAlpha,
+ r.blending.functionDestinationAlpha
);
expect(rs.stencilTest.enabled).toEqual(r.stencilTest.enabled);
expect(rs.stencilTest.frontFunction).toEqual(r.stencilTest.frontFunction);
@@ -314,22 +314,22 @@ describe(
expect(rs.stencilTest.reference).toEqual(r.stencilTest.reference);
expect(rs.stencilTest.mask).toEqual(r.stencilTest.mask);
expect(rs.stencilTest.frontOperation.fail).toEqual(
- r.stencilTest.frontOperation.fail,
+ r.stencilTest.frontOperation.fail
);
expect(rs.stencilTest.frontOperation.zFail).toEqual(
- r.stencilTest.frontOperation.zFail,
+ r.stencilTest.frontOperation.zFail
);
expect(rs.stencilTest.frontOperation.zPass).toEqual(
- r.stencilTest.frontOperation.zPass,
+ r.stencilTest.frontOperation.zPass
);
expect(rs.stencilTest.backOperation.fail).toEqual(
- r.stencilTest.backOperation.fail,
+ r.stencilTest.backOperation.fail
);
expect(rs.stencilTest.backOperation.zFail).toEqual(
- r.stencilTest.backOperation.zFail,
+ r.stencilTest.backOperation.zFail
);
expect(rs.stencilTest.backOperation.zPass).toEqual(
- r.stencilTest.backOperation.zPass,
+ r.stencilTest.backOperation.zPass
);
expect(rs.sampleCoverage.enabled).toEqual(r.sampleCoverage.enabled);
expect(rs.sampleCoverage.value).toEqual(r.sampleCoverage.value);
@@ -359,16 +359,16 @@ describe(
expect(rs.polygonOffset.units).toEqual(defaultRS.polygonOffset.units);
expect(rs.scissorTest.enabled).toEqual(defaultRS.scissorTest.enabled);
expect(rs.scissorTest.rectangle.x).toEqual(
- defaultRS.scissorTest.rectangle.x,
+ defaultRS.scissorTest.rectangle.x
);
expect(rs.scissorTest.rectangle.y).toEqual(
- defaultRS.scissorTest.rectangle.y,
+ defaultRS.scissorTest.rectangle.y
);
expect(rs.scissorTest.rectangle.width).toEqual(
- defaultRS.scissorTest.rectangle.width,
+ defaultRS.scissorTest.rectangle.width
);
expect(rs.scissorTest.rectangle.height).toEqual(
- defaultRS.scissorTest.rectangle.height,
+ defaultRS.scissorTest.rectangle.height
);
expect(rs.depthTest.enabled).toEqual(defaultRS.depthTest.enabled);
expect(rs.depthTest.func).toEqual(defaultRS.depthTest.func);
@@ -385,49 +385,49 @@ describe(
expect(rs.blending.color.alpha).toEqual(defaultRS.blending.color.alpha);
expect(rs.blending.equationRgb).toEqual(defaultRS.blending.equationRgb);
expect(rs.blending.equationAlpha).toEqual(
- defaultRS.blending.equationAlpha,
+ defaultRS.blending.equationAlpha
);
expect(rs.blending.functionSourceRgb).toEqual(
- defaultRS.blending.functionSourceRgb,
+ defaultRS.blending.functionSourceRgb
);
expect(rs.blending.functionSourceAlpha).toEqual(
- defaultRS.blending.functionSourceAlpha,
+ defaultRS.blending.functionSourceAlpha
);
expect(rs.blending.functionDestinationRgb).toEqual(
- defaultRS.blending.functionDestinationRgb,
+ defaultRS.blending.functionDestinationRgb
);
expect(rs.blending.functionDestinationAlpha).toEqual(
- defaultRS.blending.functionDestinationAlpha,
+ defaultRS.blending.functionDestinationAlpha
);
expect(rs.stencilTest.enabled).toEqual(defaultRS.stencilTest.enabled);
expect(rs.stencilTest.frontFunction).toEqual(
- defaultRS.stencilTest.frontFunction,
+ defaultRS.stencilTest.frontFunction
);
expect(rs.stencilTest.backFunction).toEqual(
- defaultRS.stencilTest.backFunction,
+ defaultRS.stencilTest.backFunction
);
expect(rs.stencilTest.reference).toEqual(defaultRS.stencilTest.reference);
expect(rs.stencilTest.mask).toEqual(defaultRS.stencilTest.mask);
expect(rs.stencilTest.frontOperation.fail).toEqual(
- defaultRS.stencilTest.frontOperation.fail,
+ defaultRS.stencilTest.frontOperation.fail
);
expect(rs.stencilTest.frontOperation.zFail).toEqual(
- defaultRS.stencilTest.frontOperation.zFail,
+ defaultRS.stencilTest.frontOperation.zFail
);
expect(rs.stencilTest.frontOperation.zPass).toEqual(
- defaultRS.stencilTest.frontOperation.zPass,
+ defaultRS.stencilTest.frontOperation.zPass
);
expect(rs.stencilTest.backOperation.fail).toEqual(
- defaultRS.stencilTest.backOperation.fail,
+ defaultRS.stencilTest.backOperation.fail
);
expect(rs.stencilTest.backOperation.zFail).toEqual(
- defaultRS.stencilTest.backOperation.zFail,
+ defaultRS.stencilTest.backOperation.zFail
);
expect(rs.stencilTest.backOperation.zPass).toEqual(
- defaultRS.stencilTest.backOperation.zPass,
+ defaultRS.stencilTest.backOperation.zPass
);
expect(rs.sampleCoverage.enabled).toEqual(
- defaultRS.sampleCoverage.enabled,
+ defaultRS.sampleCoverage.enabled
);
expect(rs.sampleCoverage.value).toEqual(defaultRS.sampleCoverage.value);
expect(rs.sampleCoverage.invert).toEqual(defaultRS.sampleCoverage.invert);
@@ -889,10 +889,10 @@ describe(
expect(rs.scissorTest.rectangle.x).toEqual(r.scissorTest.rectangle.x);
expect(rs.scissorTest.rectangle.y).toEqual(r.scissorTest.rectangle.y);
expect(rs.scissorTest.rectangle.width).toEqual(
- r.scissorTest.rectangle.width,
+ r.scissorTest.rectangle.width
);
expect(rs.scissorTest.rectangle.height).toEqual(
- r.scissorTest.rectangle.height,
+ r.scissorTest.rectangle.height
);
expect(rs.depthRange.near).toEqual(r.depthRange.near);
expect(rs.depthRange.far).toEqual(r.depthRange.far);
@@ -912,16 +912,16 @@ describe(
expect(rs.blending.equationRgb).toEqual(r.blending.equationRgb);
expect(rs.blending.equationAlpha).toEqual(r.blending.equationAlpha);
expect(rs.blending.functionSourceRgb).toEqual(
- r.blending.functionSourceRgb,
+ r.blending.functionSourceRgb
);
expect(rs.blending.functionSourceAlpha).toEqual(
- r.blending.functionSourceAlpha,
+ r.blending.functionSourceAlpha
);
expect(rs.blending.functionDestinationRgb).toEqual(
- r.blending.functionDestinationRgb,
+ r.blending.functionDestinationRgb
);
expect(rs.blending.functionDestinationAlpha).toEqual(
- r.blending.functionDestinationAlpha,
+ r.blending.functionDestinationAlpha
);
expect(rs.stencilTest.enabled).toEqual(r.stencilTest.enabled);
expect(rs.stencilTest.frontFunction).toEqual(r.stencilTest.frontFunction);
@@ -929,27 +929,27 @@ describe(
expect(rs.stencilTest.reference).toEqual(r.stencilTest.reference);
expect(rs.stencilTest.mask).toEqual(r.stencilTest.mask);
expect(rs.stencilTest.frontOperation.fail).toEqual(
- r.stencilTest.frontOperation.fail,
+ r.stencilTest.frontOperation.fail
);
expect(rs.stencilTest.frontOperation.zFail).toEqual(
- r.stencilTest.frontOperation.zFail,
+ r.stencilTest.frontOperation.zFail
);
expect(rs.stencilTest.frontOperation.zPass).toEqual(
- r.stencilTest.frontOperation.zPass,
+ r.stencilTest.frontOperation.zPass
);
expect(rs.stencilTest.backOperation.fail).toEqual(
- r.stencilTest.backOperation.fail,
+ r.stencilTest.backOperation.fail
);
expect(rs.stencilTest.backOperation.zFail).toEqual(
- r.stencilTest.backOperation.zFail,
+ r.stencilTest.backOperation.zFail
);
expect(rs.stencilTest.backOperation.zPass).toEqual(
- r.stencilTest.backOperation.zPass,
+ r.stencilTest.backOperation.zPass
);
expect(rs.sampleCoverage.enabled).toEqual(r.sampleCoverage.enabled);
expect(rs.sampleCoverage.value).toEqual(r.sampleCoverage.value);
expect(rs.sampleCoverage.invert).toEqual(r.sampleCoverage.invert);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/RenderbufferSpec.js b/packages/engine/Specs/Renderer/RenderbufferSpec.js
index 105a1768dbe0..83c001360641 100644
--- a/packages/engine/Specs/Renderer/RenderbufferSpec.js
+++ b/packages/engine/Specs/Renderer/RenderbufferSpec.js
@@ -118,5 +118,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/SamplerSpec.js b/packages/engine/Specs/Renderer/SamplerSpec.js
index 7ae117336e27..dc5ffaf741a4 100644
--- a/packages/engine/Specs/Renderer/SamplerSpec.js
+++ b/packages/engine/Specs/Renderer/SamplerSpec.js
@@ -24,10 +24,10 @@ describe(
expect(sampler.wrapS).toEqual(TextureWrap.CLAMP_TO_EDGE);
expect(sampler.wrapT).toEqual(TextureWrap.CLAMP_TO_EDGE);
expect(sampler.minificationFilter).toEqual(
- TextureMinificationFilter.LINEAR,
+ TextureMinificationFilter.LINEAR
);
expect(sampler.magnificationFilter).toEqual(
- TextureMinificationFilter.LINEAR,
+ TextureMinificationFilter.LINEAR
);
expect(sampler.maximumAnisotropy).toEqual(1.0);
});
@@ -72,5 +72,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/ShaderBuilderSpec.js b/packages/engine/Specs/Renderer/ShaderBuilderSpec.js
index 9e9fe00e91fb..8f83492a9fd1 100644
--- a/packages/engine/Specs/Renderer/ShaderBuilderSpec.js
+++ b/packages/engine/Specs/Renderer/ShaderBuilderSpec.js
@@ -16,7 +16,7 @@ describe(
function checkVertexShader(
shaderProgram,
expectedDefines,
- expectedSources,
+ expectedSources
) {
// the ShaderBuilder joins the generated lines with \n
// to avoid creating #line 0 at every line. We need to do the same here
@@ -31,7 +31,7 @@ describe(
function checkFragmentShader(
shaderProgram,
expectedDefines,
- expectedSources,
+ expectedSources
) {
// the ShaderBuilder joins the generated lines with \n
// to avoid creating #line 0 at every line. We need to do the same here
@@ -87,18 +87,18 @@ describe(
shaderBuilder.addDefine(
"USE_FRAGMENT_SHADING",
1,
- ShaderDestination.BOTH,
+ ShaderDestination.BOTH
);
const shaderProgram = shaderBuilder.buildShaderProgram(context);
checkVertexShader(
shaderProgram,
["POINT_SIZE 2", "USE_FRAGMENT_SHADING 1"],
- [],
+ []
);
checkFragmentShader(
shaderProgram,
["PI 3.1415", "USE_FRAGMENT_SHADING 1"],
- [],
+ []
);
});
@@ -116,7 +116,7 @@ describe(
return shaderBuilder.addStruct(
undefined,
"TestStruct",
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
}).toThrowDeveloperError();
});
@@ -127,7 +127,7 @@ describe(
return shaderBuilder.addStruct(
{},
"TestStruct",
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
}).toThrowDeveloperError();
});
@@ -138,7 +138,7 @@ describe(
return shaderBuilder.addStruct(
"testStruct",
undefined,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
}).toThrowDeveloperError();
});
@@ -149,7 +149,7 @@ describe(
return shaderBuilder.addStruct(
"testStruct",
{},
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
}).toThrowDeveloperError();
});
@@ -173,24 +173,24 @@ describe(
shaderBuilder.addStruct(
"structVS",
"TestStruct",
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
shaderBuilder.addStruct(
"structFS",
"TestStruct",
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
const shaderProgram = shaderBuilder.buildShaderProgram(context);
checkVertexShader(
shaderProgram,
[],
- ["struct TestStruct", "{", " float _empty;", "};"],
+ ["struct TestStruct", "{", " float _empty;", "};"]
);
checkFragmentShader(
shaderProgram,
[],
- ["struct TestStruct", "{", " float _empty;", "};"],
+ ["struct TestStruct", "{", " float _empty;", "};"]
);
});
@@ -199,7 +199,7 @@ describe(
shaderBuilder.addStruct(
"structVS",
"TestStruct",
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
expect(function () {
return shaderBuilder.addStructField(undefined, "vec3", "positionMC");
@@ -211,7 +211,7 @@ describe(
shaderBuilder.addStruct(
"structVS",
"TestStruct",
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
expect(function () {
return shaderBuilder.addStructField(-1, "vec3", "positionMC");
@@ -223,13 +223,13 @@ describe(
shaderBuilder.addStruct(
"structVS",
"TestStruct",
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
expect(function () {
return shaderBuilder.addStructField(
"structVS",
undefined,
- "positionMC",
+ "positionMC"
);
}).toThrowDeveloperError();
});
@@ -239,7 +239,7 @@ describe(
shaderBuilder.addStruct(
"structVS",
"TestStruct",
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
expect(function () {
return shaderBuilder.addStructField("structVS", -1, "positionMC");
@@ -251,7 +251,7 @@ describe(
shaderBuilder.addStruct(
"structVS",
"TestStruct",
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
expect(function () {
return shaderBuilder.addStructField("structVS", "vec3", undefined);
@@ -263,7 +263,7 @@ describe(
shaderBuilder.addStruct(
"structVS",
"TestStruct",
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
expect(function () {
return shaderBuilder.addStructField("structVS", "vec3", -1);
@@ -275,12 +275,12 @@ describe(
shaderBuilder.addStruct(
"structVS",
"TestStruct",
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
shaderBuilder.addStruct(
"structFS",
"TestStruct",
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addStructField("structVS", "vec3", "positionMC");
@@ -291,7 +291,7 @@ describe(
checkVertexShader(
shaderProgram,
[],
- ["struct TestStruct", "{", " vec3 positionMC;", "};"],
+ ["struct TestStruct", "{", " vec3 positionMC;", "};"]
);
checkFragmentShader(
shaderProgram,
@@ -302,7 +302,7 @@ describe(
" vec3 positionMC;",
" float temperature;",
"};",
- ],
+ ]
);
});
@@ -313,7 +313,7 @@ describe(
return shaderBuilder.addFunction(
undefined,
signature,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
}).toThrowDeveloperError();
});
@@ -324,7 +324,7 @@ describe(
return shaderBuilder.addFunction(
{},
signature,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
}).toThrowDeveloperError();
});
@@ -335,7 +335,7 @@ describe(
return shaderBuilder.addFunction(
"testFunction",
undefined,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
}).toThrowDeveloperError();
});
@@ -346,7 +346,7 @@ describe(
return shaderBuilder.addFunction(
"testFunction",
-1,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
}).toThrowDeveloperError();
});
@@ -370,12 +370,12 @@ describe(
shaderBuilder.addFunction(
"testFunctionVS",
signature,
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
shaderBuilder.addFunction(
"testFunctionFS",
signature,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
const shaderProgram = shaderBuilder.buildShaderProgram(context);
@@ -388,7 +388,7 @@ describe(
shaderBuilder.addFunction(
"testFunctionVS",
signature,
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
expect(function () {
return shaderBuilder.addFunctionLines(undefined, "return 1.0;");
@@ -400,7 +400,7 @@ describe(
shaderBuilder.addFunction(
"testFunctionVS",
signature,
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
expect(function () {
return shaderBuilder.addFunctionLines(-1, "return 1.0;");
@@ -412,7 +412,7 @@ describe(
shaderBuilder.addFunction(
"testFunctionVS",
signature,
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
expect(function () {
return shaderBuilder.addFunctionLines("testFunctionVS", undefined);
@@ -424,7 +424,7 @@ describe(
shaderBuilder.addFunction(
"testFunctionVS",
signature,
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
expect(function () {
return shaderBuilder.addFunctionLines("testFunctionVS", -1);
@@ -436,12 +436,12 @@ describe(
shaderBuilder.addFunction(
"testFunctionVS",
signature,
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
shaderBuilder.addFunction(
"testFunctionFS",
signature,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addFunctionLines("testFunctionVS", [
@@ -456,12 +456,12 @@ describe(
checkVertexShader(
shaderProgram,
[],
- [signature, "{", " v_color = vec3(0.0);", " return 1.0;", "}"],
+ [signature, "{", " v_color = vec3(0.0);", " return 1.0;", "}"]
);
checkFragmentShader(
shaderProgram,
[],
- [signature, "{", " return 1.0 - step(0.3, radius);", "}"],
+ [signature, "{", " return 1.0 - step(0.3, radius);", "}"]
);
});
@@ -470,12 +470,12 @@ describe(
shaderBuilder.addFunction(
"testFunctionVS",
signature,
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
shaderBuilder.addFunction(
"testFunctionFS",
signature,
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addFunctionLines("testFunctionVS", "return 1.0;");
@@ -485,12 +485,12 @@ describe(
checkVertexShader(
shaderProgram,
[],
- [signature, "{", " return 1.0;", "}"],
+ [signature, "{", " return 1.0;", "}"]
);
checkFragmentShader(
shaderProgram,
[],
- [signature, "{", " return 2.0;", "}"],
+ [signature, "{", " return 2.0;", "}"]
);
});
@@ -527,24 +527,24 @@ describe(
shaderBuilder.addUniform(
"vec3",
"u_gridDimensions",
- ShaderDestination.VERTEX,
+ ShaderDestination.VERTEX
);
shaderBuilder.addUniform(
"vec2",
"u_mousePosition",
- ShaderDestination.FRAGMENT,
+ ShaderDestination.FRAGMENT
);
shaderBuilder.addUniform("float", "u_time", ShaderDestination.BOTH);
const shaderProgram = shaderBuilder.buildShaderProgram(context);
checkVertexShader(
shaderProgram,
[],
- ["uniform vec3 u_gridDimensions;", "uniform float u_time;"],
+ ["uniform vec3 u_gridDimensions;", "uniform float u_time;"]
);
checkFragmentShader(
shaderProgram,
[],
- ["uniform vec2 u_mousePosition;", "uniform float u_time;"],
+ ["uniform vec2 u_mousePosition;", "uniform float u_time;"]
);
});
@@ -593,7 +593,7 @@ describe(
const normalLocation = shaderBuilder.addAttribute("vec3", "a_normal");
const positionLocation = shaderBuilder.setPositionAttribute(
"vec3",
- "a_position",
+ "a_position"
);
expect(positionLocation).toBe(0);
expect(normalLocation).toBe(1);
@@ -614,7 +614,7 @@ describe(
const shaderBuilder = new ShaderBuilder();
const positionLocation = shaderBuilder.setPositionAttribute(
"vec3",
- "a_position",
+ "a_position"
);
expect(positionLocation).toBe(0);
expect(function () {
@@ -724,10 +724,10 @@ describe(
const expectedVaryings = ["vec2 v_uv;"];
const expectedVertexVaryings = expectedVaryings.map(
- (varying) => `out ${varying}`,
+ (varying) => `out ${varying}`
);
const expectedFragmentVaryings = expectedVaryings.map(
- (varying) => `in ${varying}`,
+ (varying) => `in ${varying}`
);
const shaderProgram = shaderBuilder.buildShaderProgram(context);
@@ -837,24 +837,24 @@ describe(
const expectedVaryings = ["vec2 v_uv;"];
const expectedVertexVaryings = expectedVaryings.map(
- (varying) => `out ${varying}`,
+ (varying) => `out ${varying}`
);
const expectedFragmentVaryings = expectedVaryings.map(
- (varying) => `in ${varying}`,
+ (varying) => `in ${varying}`
);
const shaderProgram = shaderBuilder.buildShaderProgram(context);
checkVertexShader(
shaderProgram,
[],
- expectedAttributes.concat(expectedVertexVaryings, vertexLines),
+ expectedAttributes.concat(expectedVertexVaryings, vertexLines)
);
checkFragmentShader(
shaderProgram,
["BLUE_TINT 0.5"],
- expectedFragmentVaryings.concat(fragmentLines),
+ expectedFragmentVaryings.concat(fragmentLines)
);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/ShaderCacheSpec.js b/packages/engine/Specs/Renderer/ShaderCacheSpec.js
index 0636a743e4c9..3a71abfea11d 100644
--- a/packages/engine/Specs/Renderer/ShaderCacheSpec.js
+++ b/packages/engine/Specs/Renderer/ShaderCacheSpec.js
@@ -73,11 +73,11 @@ describe(
// only be called the first time a shader is created.
spyOn(
ShaderSource.prototype,
- "createCombinedVertexShader",
+ "createCombinedVertexShader"
).and.callThrough();
spyOn(
ShaderSource.prototype,
- "createCombinedFragmentShader",
+ "createCombinedFragmentShader"
).and.callThrough();
const cache = new ShaderCache(context);
@@ -101,10 +101,10 @@ describe(
expect(cache.numberOfShaders).toEqual(1);
expect(
- ShaderSource.prototype.createCombinedVertexShader,
+ ShaderSource.prototype.createCombinedVertexShader
).toHaveBeenCalledTimes(1);
expect(
- ShaderSource.prototype.createCombinedFragmentShader,
+ ShaderSource.prototype.createCombinedFragmentShader
).toHaveBeenCalledTimes(1);
sp.destroy();
@@ -138,11 +138,11 @@ describe(
// only be called the first time a shader is created.
spyOn(
ShaderSource.prototype,
- "createCombinedVertexShader",
+ "createCombinedVertexShader"
).and.callThrough();
spyOn(
ShaderSource.prototype,
- "createCombinedFragmentShader",
+ "createCombinedFragmentShader"
).and.callThrough();
const cache = new ShaderCache(context);
@@ -162,10 +162,10 @@ describe(
expect(cache.numberOfShaders).toEqual(1);
expect(
- ShaderSource.prototype.createCombinedVertexShader,
+ ShaderSource.prototype.createCombinedVertexShader
).toHaveBeenCalledTimes(1);
expect(
- ShaderSource.prototype.createCombinedFragmentShader,
+ ShaderSource.prototype.createCombinedFragmentShader
).toHaveBeenCalledTimes(1);
sp.destroy();
@@ -371,5 +371,5 @@ describe(
expect(cache.isDestroyed()).toEqual(false);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/ShaderDestinationSpec.js b/packages/engine/Specs/Renderer/ShaderDestinationSpec.js
index bb723aebd27e..b517d117eb15 100644
--- a/packages/engine/Specs/Renderer/ShaderDestinationSpec.js
+++ b/packages/engine/Specs/Renderer/ShaderDestinationSpec.js
@@ -9,13 +9,13 @@ describe("Renderer/ShaderDestination", function () {
it("includesVertexShader works", function () {
expect(
- ShaderDestination.includesVertexShader(ShaderDestination.VERTEX),
+ ShaderDestination.includesVertexShader(ShaderDestination.VERTEX)
).toBe(true);
expect(
- ShaderDestination.includesVertexShader(ShaderDestination.FRAGMENT),
+ ShaderDestination.includesVertexShader(ShaderDestination.FRAGMENT)
).toBe(false);
expect(ShaderDestination.includesVertexShader(ShaderDestination.BOTH)).toBe(
- true,
+ true
);
});
@@ -27,13 +27,13 @@ describe("Renderer/ShaderDestination", function () {
it("includesFragmentShader works", function () {
expect(
- ShaderDestination.includesFragmentShader(ShaderDestination.VERTEX),
+ ShaderDestination.includesFragmentShader(ShaderDestination.VERTEX)
).toBe(false);
expect(
- ShaderDestination.includesFragmentShader(ShaderDestination.FRAGMENT),
+ ShaderDestination.includesFragmentShader(ShaderDestination.FRAGMENT)
).toBe(true);
expect(
- ShaderDestination.includesFragmentShader(ShaderDestination.BOTH),
+ ShaderDestination.includesFragmentShader(ShaderDestination.BOTH)
).toBe(true);
});
});
diff --git a/packages/engine/Specs/Renderer/ShaderProgramSpec.js b/packages/engine/Specs/Renderer/ShaderProgramSpec.js
index 9d57cc1346de..d40ad7c34a05 100644
--- a/packages/engine/Specs/Renderer/ShaderProgramSpec.js
+++ b/packages/engine/Specs/Renderer/ShaderProgramSpec.js
@@ -566,5 +566,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/ShaderSourceSpec.js b/packages/engine/Specs/Renderer/ShaderSourceSpec.js
index 2645b15f5839..8a63340b072e 100644
--- a/packages/engine/Specs/Renderer/ShaderSourceSpec.js
+++ b/packages/engine/Specs/Renderer/ShaderSourceSpec.js
@@ -5,8 +5,7 @@ describe("Renderer/ShaderSource", function () {
webgl2: true,
};
- const fragColorDeclarationRegex =
- /layout\s*\(location\s*=\s*0\)\s*out\s+vec4\s+out_FragColor;/g;
+ const fragColorDeclarationRegex = /layout\s*\(location\s*=\s*0\)\s*out\s+vec4\s+out_FragColor;/g;
it("combines #defines", function () {
const source = new ShaderSource({
@@ -109,7 +108,7 @@ describe("Renderer/ShaderSource", function () {
});
expect(source.getCacheKey()).toBe(
- "A,B,C:in:false:void main() { out_FragColor = vec4(1.0); }",
+ "A,B,C:in:false:void main() { out_FragColor = vec4(1.0); }"
);
});
@@ -133,7 +132,7 @@ describe("Renderer/ShaderSource", function () {
});
expect(source.getCacheKey()).toBe(
- ":undefined:true:vec4 getColor() { return vec4(1.0, 0.0, 0.0, 1.0); }\nvoid main() { out_FragColor = getColor(); }",
+ ":undefined:true:vec4 getColor() { return vec4(1.0, 0.0, 0.0, 1.0); }\nvoid main() { out_FragColor = getColor(); }"
);
});
diff --git a/packages/engine/Specs/Renderer/TextureCacheSpec.js b/packages/engine/Specs/Renderer/TextureCacheSpec.js
index e116b448f8f0..162ae79b6118 100644
--- a/packages/engine/Specs/Renderer/TextureCacheSpec.js
+++ b/packages/engine/Specs/Renderer/TextureCacheSpec.js
@@ -121,5 +121,5 @@ describe(
expect(cache.isDestroyed()).toEqual(false);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/TextureSpec.js b/packages/engine/Specs/Renderer/TextureSpec.js
index 609a6a95da47..d4381eab941e 100644
--- a/packages/engine/Specs/Renderer/TextureSpec.js
+++ b/packages/engine/Specs/Renderer/TextureSpec.js
@@ -50,26 +50,26 @@ describe(
promises.push(
Resource.fetchImage("./Data/Images/Green.png").then(function (image) {
greenImage = image;
- }),
+ })
);
promises.push(
Resource.fetchImage("./Data/Images/Blue.png").then(function (image) {
blueImage = image;
- }),
+ })
);
promises.push(
- Resource.fetchImage("./Data/Images/BlueAlpha.png").then(
- function (image) {
- blueAlphaImage = image;
- },
- ),
+ Resource.fetchImage("./Data/Images/BlueAlpha.png").then(function (
+ image
+ ) {
+ blueAlphaImage = image;
+ })
);
promises.push(
- Resource.fetchImage("./Data/Images/BlueOverRed.png").then(
- function (image) {
- blueOverRedImage = image;
- },
- ),
+ Resource.fetchImage("./Data/Images/BlueOverRed.png").then(function (
+ image
+ ) {
+ blueOverRedImage = image;
+ })
);
// Load this image as an ImageBitmap
promises.push(
@@ -78,14 +78,14 @@ describe(
preferImageBitmap: true,
}).then(function (image) {
blueOverRedFlippedImage = image;
- }),
+ })
);
promises.push(
- Resource.fetchImage("./Data/Images/Red16x16.png").then(
- function (image) {
- red16x16Image = image;
- },
- ),
+ Resource.fetchImage("./Data/Images/Red16x16.png").then(function (
+ image
+ ) {
+ red16x16Image = image;
+ })
);
const resource = Resource.createIfNeeded("./Data/Images/Green4x4.ktx2");
@@ -96,14 +96,14 @@ describe(
return promise.then(function (result) {
greenKTX2Image = result;
});
- }),
+ })
);
if (context.supportsBasis) {
promises.push(
loadKTX2("./Data/Images/Green4x4_ETC1S.ktx2").then(function (image) {
greenBasisKTX2Image = image;
- }),
+ })
);
}
@@ -154,7 +154,7 @@ describe(
expect(texture.sizeInBytes).toEqual(
expectedWidth *
expectedHeight *
- PixelFormat.componentsLength(texture.pixelFormat),
+ PixelFormat.componentsLength(texture.pixelFormat)
);
command.color = Color.WHITE;
@@ -198,7 +198,7 @@ describe(
expect(texture.sizeInBytes).toEqual(
expectedWidth *
expectedHeight *
- PixelFormat.componentsLength(texture.pixelFormat),
+ PixelFormat.componentsLength(texture.pixelFormat)
);
// Clear to white
@@ -232,41 +232,41 @@ describe(
const topColor = new Color(0.0, 0.0, 1.0, 1.0);
let bottomColor = new Color(1.0, 0.0, 0.0, 1.0);
- return Resource.supportsImageBitmapOptions().then(
- function (supportsImageBitmapOptions) {
- if (supportsImageBitmapOptions) {
- // When imageBitmapOptions is supported, flipY on texture upload is ignored.
- bottomColor = topColor;
- }
+ return Resource.supportsImageBitmapOptions().then(function (
+ supportsImageBitmapOptions
+ ) {
+ if (supportsImageBitmapOptions) {
+ // When imageBitmapOptions is supported, flipY on texture upload is ignored.
+ bottomColor = topColor;
+ }
- texture = new Texture({
- context: context,
- source: blueOverRedFlippedImage,
- pixelFormat: PixelFormat.RGBA,
- flipY: false,
- });
+ texture = new Texture({
+ context: context,
+ source: blueOverRedFlippedImage,
+ pixelFormat: PixelFormat.RGBA,
+ flipY: false,
+ });
- expect({
- context: context,
- fragmentShader: fs,
- uniformMap: uniformMap,
- }).contextToRender(topColor.toBytes());
+ expect({
+ context: context,
+ fragmentShader: fs,
+ uniformMap: uniformMap,
+ }).contextToRender(topColor.toBytes());
- // Flip the texture.
- texture = new Texture({
- context: context,
- source: blueOverRedFlippedImage,
- pixelFormat: PixelFormat.RGBA,
- flipY: true,
- });
+ // Flip the texture.
+ texture = new Texture({
+ context: context,
+ source: blueOverRedFlippedImage,
+ pixelFormat: PixelFormat.RGBA,
+ flipY: true,
+ });
- expect({
- context: context,
- fragmentShader: fs,
- uniformMap: uniformMap,
- }).contextToRender(bottomColor.toBytes());
- },
- );
+ expect({
+ context: context,
+ fragmentShader: fs,
+ uniformMap: uniformMap,
+ }).contextToRender(bottomColor.toBytes());
+ });
});
it("draws the expected floating-point texture color", function () {
@@ -399,7 +399,14 @@ describe(
const color0 = new Color(0.2, 0.4, 0.6, 1.0);
const color1 = new Color(0.1, 0.3, 0.5, 1.0);
const floats = new Uint16Array([
- 12902, 13926, 14541, 15360, 11878, 13517, 14336, 15360,
+ 12902,
+ 13926,
+ 14541,
+ 15360,
+ 11878,
+ 13517,
+ 14336,
+ 15360,
]);
texture = new Texture({
@@ -776,7 +783,7 @@ describe(
texture.generateMipmap();
expect(texture.sizeInBytes).toEqualEpsilon(
(16 * 16 + 8 * 8 + 4 * 4 + 2 * 2 + 1) * 4,
- 1,
+ 1
);
expect({
@@ -869,7 +876,7 @@ describe(
height,
pixelFormat,
pixelDatatype,
- expectedSize,
+ expectedSize
) {
texture = new Texture({
context: context,
@@ -890,21 +897,21 @@ describe(
16,
PixelFormat.DEPTH_COMPONENT,
PixelDatatype.UNSIGNED_SHORT,
- 256 * 2,
+ 256 * 2
);
expectTextureByteSize(
16,
16,
PixelFormat.DEPTH_COMPONENT,
PixelDatatype.UNSIGNED_INT,
- 256 * 4,
+ 256 * 4
);
expectTextureByteSize(
16,
16,
PixelFormat.DEPTH_STENCIL,
PixelDatatype.UNSIGNED_INT_24_8,
- 256 * 4,
+ 256 * 4
);
}
@@ -914,35 +921,35 @@ describe(
16,
PixelFormat.ALPHA,
PixelDatatype.UNSIGNED_BYTE,
- 256,
+ 256
);
expectTextureByteSize(
16,
16,
PixelFormat.RGB,
PixelDatatype.UNSIGNED_BYTE,
- 256 * 3,
+ 256 * 3
);
expectTextureByteSize(
16,
16,
PixelFormat.RGBA,
PixelDatatype.UNSIGNED_BYTE,
- 256 * 4,
+ 256 * 4
);
expectTextureByteSize(
16,
16,
PixelFormat.LUMINANCE,
PixelDatatype.UNSIGNED_BYTE,
- 256,
+ 256
);
expectTextureByteSize(
16,
16,
PixelFormat.LUMINANCE_ALPHA,
PixelDatatype.UNSIGNED_BYTE,
- 256 * 2,
+ 256 * 2
);
});
@@ -1555,5 +1562,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/UniformSpec.js b/packages/engine/Specs/Renderer/UniformSpec.js
index aee94f158bae..a783e1a0bb38 100644
--- a/packages/engine/Specs/Renderer/UniformSpec.js
+++ b/packages/engine/Specs/Renderer/UniformSpec.js
@@ -369,7 +369,7 @@ describe(
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
);
},
};
@@ -798,7 +798,7 @@ describe(
13.0,
14.0,
15.0,
- 16.0,
+ 16.0
),
new Matrix4(
11.0,
@@ -816,7 +816,7 @@ describe(
113.0,
114.0,
115.0,
- 116.0,
+ 116.0
),
];
},
@@ -844,5 +844,5 @@ describe(
}).contextToRender();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/VertexArrayFacadeSpec.js b/packages/engine/Specs/Renderer/VertexArrayFacadeSpec.js
index 56e7f6fec589..4600ed72f465 100644
--- a/packages/engine/Specs/Renderer/VertexArrayFacadeSpec.js
+++ b/packages/engine/Specs/Renderer/VertexArrayFacadeSpec.js
@@ -31,7 +31,7 @@ describe(
usage: BufferUsage.STATIC_DRAW,
},
],
- 1,
+ 1
);
const writer = vaf.writers[positionIndex];
@@ -42,14 +42,14 @@ describe(
expect(vaf.va[0].va.getAttribute(0).vertexBuffer).toBeDefined();
expect(vaf.va[0].va.getAttribute(0).vertexBuffer.sizeInBytes).toEqual(
- 1 * 3 * 4,
+ 1 * 3 * 4
);
expect(vaf.va[0].va.getAttribute(0).vertexBuffer.usage).toEqual(
- BufferUsage.STATIC_DRAW,
+ BufferUsage.STATIC_DRAW
);
expect(vaf.va[0].va.getAttribute(0).componentsPerAttribute).toEqual(3);
expect(vaf.va[0].va.getAttribute(0).componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(vaf.va[0].va.getAttribute(0).offsetInBytes).toEqual(0);
expect(vaf.va[0].va.getAttribute(0).strideInBytes).toEqual(3 * 4);
@@ -67,7 +67,7 @@ describe(
usage: BufferUsage.STATIC_DRAW,
},
],
- 1,
+ 1
);
const writer = vaf.writers[positionIndex];
@@ -81,14 +81,14 @@ describe(
expect(vaf.va[0].va.getAttribute(0).vertexBuffer).toBeDefined();
expect(vaf.va[0].va.getAttribute(0).vertexBuffer.sizeInBytes).toEqual(
- 2 * 3 * 4,
+ 2 * 3 * 4
);
expect(vaf.va[0].va.getAttribute(0).vertexBuffer.usage).toEqual(
- BufferUsage.STATIC_DRAW,
+ BufferUsage.STATIC_DRAW
);
expect(vaf.va[0].va.getAttribute(0).componentsPerAttribute).toEqual(3);
expect(vaf.va[0].va.getAttribute(0).componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(vaf.va[0].va.getAttribute(0).offsetInBytes).toEqual(0);
expect(vaf.va[0].va.getAttribute(0).strideInBytes).toEqual(3 * 4);
@@ -113,7 +113,7 @@ describe(
usage: BufferUsage.STATIC_DRAW,
},
],
- 1,
+ 1
);
const positionWriter = vaf.writers[positionIndex];
@@ -129,29 +129,29 @@ describe(
// Position attribute
expect(vaf.va[0].va.getAttribute(0).vertexBuffer).toBeDefined();
expect(vaf.va[0].va.getAttribute(0).vertexBuffer.sizeInBytes).toEqual(
- 1 * (3 * 4 + 4 * 1),
+ 1 * (3 * 4 + 4 * 1)
);
expect(vaf.va[0].va.getAttribute(0).vertexBuffer.usage).toEqual(
- BufferUsage.STATIC_DRAW,
+ BufferUsage.STATIC_DRAW
);
expect(vaf.va[0].va.getAttribute(0).componentsPerAttribute).toEqual(3);
expect(vaf.va[0].va.getAttribute(0).componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(vaf.va[0].va.getAttribute(0).offsetInBytes).toEqual(0);
expect(vaf.va[0].va.getAttribute(0).strideInBytes).toEqual(3 * 4 + 4 * 1);
// Color attribute
expect(vaf.va[0].va.getAttribute(1).vertexBuffer).toEqual(
- vaf.va[0].va.getAttribute(0).vertexBuffer,
+ vaf.va[0].va.getAttribute(0).vertexBuffer
);
expect(vaf.va[0].va.getAttribute(1).componentsPerAttribute).toEqual(4);
expect(vaf.va[0].va.getAttribute(1).componentDatatype).toEqual(
- ComponentDatatype.UNSIGNED_BYTE,
+ ComponentDatatype.UNSIGNED_BYTE
);
expect(vaf.va[0].va.getAttribute(1).offsetInBytes).toEqual(3 * 4);
expect(vaf.va[0].va.getAttribute(1).strideInBytes).toEqual(
- vaf.va[0].va.getAttribute(0).strideInBytes,
+ vaf.va[0].va.getAttribute(0).strideInBytes
);
});
@@ -175,7 +175,7 @@ describe(
normalize: true,
},
],
- 1,
+ 1
);
const positionWriter = vaf.writers[positionIndex];
@@ -191,14 +191,14 @@ describe(
// Position attribute
expect(vaf.va[0].va.getAttribute(0).vertexBuffer).toBeDefined();
expect(vaf.va[0].va.getAttribute(0).vertexBuffer.sizeInBytes).toEqual(
- 1 * (3 * 4),
+ 1 * (3 * 4)
);
expect(vaf.va[0].va.getAttribute(0).vertexBuffer.usage).toEqual(
- BufferUsage.STATIC_DRAW,
+ BufferUsage.STATIC_DRAW
);
expect(vaf.va[0].va.getAttribute(0).componentsPerAttribute).toEqual(3);
expect(vaf.va[0].va.getAttribute(0).componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(vaf.va[0].va.getAttribute(0).offsetInBytes).toEqual(0);
expect(vaf.va[0].va.getAttribute(0).strideInBytes).toEqual(3 * 4);
@@ -206,14 +206,14 @@ describe(
// Texture coordinate attribute
expect(vaf.va[0].va.getAttribute(1).vertexBuffer).toBeDefined();
expect(vaf.va[0].va.getAttribute(1).vertexBuffer.sizeInBytes).toEqual(
- 1 * (2 * 2),
+ 1 * (2 * 2)
);
expect(vaf.va[0].va.getAttribute(1).vertexBuffer.usage).toEqual(
- BufferUsage.DYNAMIC_DRAW,
+ BufferUsage.DYNAMIC_DRAW
);
expect(vaf.va[0].va.getAttribute(1).componentsPerAttribute).toEqual(2);
expect(vaf.va[0].va.getAttribute(1).componentDatatype).toEqual(
- ComponentDatatype.UNSIGNED_SHORT,
+ ComponentDatatype.UNSIGNED_SHORT
);
expect(vaf.va[0].va.getAttribute(1).offsetInBytes).toEqual(0);
expect(vaf.va[0].va.getAttribute(1).strideInBytes).toEqual(2 * 2);
@@ -238,7 +238,7 @@ describe(
usage: BufferUsage.STREAM_DRAW,
},
],
- 2,
+ 2
);
const positionWriter = vaf.writers[positionIndex];
@@ -268,14 +268,14 @@ describe(
// Position attribute
expect(vaf.va[0].va.getAttribute(1).vertexBuffer).toBeDefined();
expect(vaf.va[0].va.getAttribute(1).vertexBuffer.sizeInBytes).toEqual(
- 2 * (3 * 4),
+ 2 * (3 * 4)
);
expect(vaf.va[0].va.getAttribute(1).vertexBuffer.usage).toEqual(
- BufferUsage.STATIC_DRAW,
+ BufferUsage.STATIC_DRAW
);
expect(vaf.va[0].va.getAttribute(1).componentsPerAttribute).toEqual(3);
expect(vaf.va[0].va.getAttribute(1).componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(vaf.va[0].va.getAttribute(1).offsetInBytes).toEqual(0);
expect(vaf.va[0].va.getAttribute(1).strideInBytes).toEqual(3 * 4);
@@ -283,14 +283,14 @@ describe(
// Temperature attribute
expect(vaf.va[0].va.getAttribute(0).vertexBuffer).toBeDefined();
expect(vaf.va[0].va.getAttribute(0).vertexBuffer.sizeInBytes).toEqual(
- 2 * 4,
+ 2 * 4
);
expect(vaf.va[0].va.getAttribute(0).vertexBuffer.usage).toEqual(
- BufferUsage.STREAM_DRAW,
+ BufferUsage.STREAM_DRAW
);
expect(vaf.va[0].va.getAttribute(0).componentsPerAttribute).toEqual(1);
expect(vaf.va[0].va.getAttribute(0).componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(vaf.va[0].va.getAttribute(0).offsetInBytes).toEqual(0);
expect(vaf.va[0].va.getAttribute(0).strideInBytes).toEqual(1 * 4);
@@ -308,7 +308,7 @@ describe(
usage: BufferUsage.STATIC_DRAW,
},
],
- 1,
+ 1
);
const writer = vaf.writers[positionIndex];
@@ -326,7 +326,7 @@ describe(
expect(vbBeforeResize.isDestroyed()).toBe(true);
expect(vaf.va[0].va.getAttribute(0).vertexBuffer).not.toBe(
- vbBeforeResize,
+ vbBeforeResize
);
});
@@ -342,7 +342,7 @@ describe(
usage: BufferUsage.STATIC_DRAW,
},
],
- 1,
+ 1
);
expect(vaf.isDestroyed()).toBe(false);
});
@@ -420,7 +420,7 @@ describe(
usage: BufferUsage.STATIC_DRAW,
},
],
- 10,
+ 10
);
expect(function () {
@@ -436,5 +436,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/VertexArrayFactorySpec.js b/packages/engine/Specs/Renderer/VertexArrayFactorySpec.js
index 579e735dd04b..d0042e076c39 100644
--- a/packages/engine/Specs/Renderer/VertexArrayFactorySpec.js
+++ b/packages/engine/Specs/Renderer/VertexArrayFactorySpec.js
@@ -82,16 +82,16 @@ describe(
const position = geometry.attributes.position;
expect(va.getAttribute(0).index).toEqual(0);
expect(va.getAttribute(0).componentDatatype).toEqual(
- position.componentDatatype,
+ position.componentDatatype
);
expect(va.getAttribute(0).componentsPerAttribute).toEqual(
- position.componentsPerAttribute,
+ position.componentsPerAttribute
);
expect(va.getAttribute(0).offsetInBytes).toEqual(0);
expect(va.getAttribute(0).strideInBytes).toEqual(0); // Tightly packed
expect(va.getAttribute(0).vertexBuffer.usage).toEqual(
- BufferUsage.DYNAMIC_DRAW,
+ BufferUsage.DYNAMIC_DRAW
); // Default
});
@@ -121,19 +121,19 @@ describe(
const position = geometry.attributes.position;
expect(va.getAttribute(0).index).toEqual(0);
expect(va.getAttribute(0).componentDatatype).toEqual(
- position.componentDatatype,
+ position.componentDatatype
);
expect(va.getAttribute(0).componentsPerAttribute).toEqual(
- position.componentsPerAttribute,
+ position.componentsPerAttribute
);
expect(va.getAttribute(0).offsetInBytes).toEqual(0);
expect(va.getAttribute(0).strideInBytes).toEqual(
ComponentDatatype.getSizeInBytes(position.componentDatatype) *
- position.componentsPerAttribute,
+ position.componentsPerAttribute
);
expect(va.getAttribute(0).vertexBuffer.usage).toEqual(
- BufferUsage.STATIC_DRAW,
+ BufferUsage.STATIC_DRAW
);
});
@@ -166,10 +166,10 @@ describe(
const position = geometry.attributes.customPosition;
expect(va.getAttribute(0).index).toEqual(0);
expect(va.getAttribute(0).componentDatatype).toEqual(
- position.componentDatatype,
+ position.componentDatatype
);
expect(va.getAttribute(0).componentsPerAttribute).toEqual(
- position.componentsPerAttribute,
+ position.componentsPerAttribute
);
expect(va.getAttribute(0).offsetInBytes).toEqual(0);
expect(va.getAttribute(0).strideInBytes).toEqual(0); // Tightly packed
@@ -177,16 +177,16 @@ describe(
const normal = geometry.attributes.customNormal;
expect(va.getAttribute(1).index).toEqual(1);
expect(va.getAttribute(1).componentDatatype).toEqual(
- normal.componentDatatype,
+ normal.componentDatatype
);
expect(va.getAttribute(1).componentsPerAttribute).toEqual(
- normal.componentsPerAttribute,
+ normal.componentsPerAttribute
);
expect(va.getAttribute(1).offsetInBytes).toEqual(0);
expect(va.getAttribute(1).strideInBytes).toEqual(0); // Tightly packed
expect(va.getAttribute(0).vertexBuffer).not.toBe(
- va.getAttribute(1).vertexBuffer,
+ va.getAttribute(1).vertexBuffer
);
});
@@ -227,29 +227,29 @@ describe(
expect(va.getAttribute(0).index).toEqual(0);
expect(va.getAttribute(0).componentDatatype).toEqual(
- position.componentDatatype,
+ position.componentDatatype
);
expect(va.getAttribute(0).componentsPerAttribute).toEqual(
- position.componentsPerAttribute,
+ position.componentsPerAttribute
);
expect(va.getAttribute(0).offsetInBytes).toEqual(0);
expect(va.getAttribute(0).strideInBytes).toEqual(expectedStride);
expect(va.getAttribute(1).index).toEqual(1);
expect(va.getAttribute(1).componentDatatype).toEqual(
- normal.componentDatatype,
+ normal.componentDatatype
);
expect(va.getAttribute(1).componentsPerAttribute).toEqual(
- normal.componentsPerAttribute,
+ normal.componentsPerAttribute
);
expect(va.getAttribute(1).offsetInBytes).toEqual(
ComponentDatatype.getSizeInBytes(position.componentDatatype) *
- position.componentsPerAttribute,
+ position.componentsPerAttribute
);
expect(va.getAttribute(1).strideInBytes).toEqual(expectedStride);
expect(va.getAttribute(0).vertexBuffer).toBe(
- va.getAttribute(1).vertexBuffer,
+ va.getAttribute(1).vertexBuffer
);
});
@@ -290,29 +290,29 @@ describe(
expect(va.getAttribute(0).index).toEqual(0);
expect(va.getAttribute(0).componentDatatype).toEqual(
- position.componentDatatype,
+ position.componentDatatype
);
expect(va.getAttribute(0).componentsPerAttribute).toEqual(
- position.componentsPerAttribute,
+ position.componentsPerAttribute
);
expect(va.getAttribute(0).offsetInBytes).toEqual(0);
expect(va.getAttribute(0).strideInBytes).toEqual(expectedStride);
expect(va.getAttribute(1).index).toEqual(1);
expect(va.getAttribute(1).componentDatatype).toEqual(
- colors.componentDatatype,
+ colors.componentDatatype
);
expect(va.getAttribute(1).componentsPerAttribute).toEqual(
- colors.componentsPerAttribute,
+ colors.componentsPerAttribute
);
expect(va.getAttribute(1).offsetInBytes).toEqual(
ComponentDatatype.getSizeInBytes(position.componentDatatype) *
- position.componentsPerAttribute,
+ position.componentsPerAttribute
);
expect(va.getAttribute(1).strideInBytes).toEqual(expectedStride);
expect(va.getAttribute(0).vertexBuffer).toBe(
- va.getAttribute(1).vertexBuffer,
+ va.getAttribute(1).vertexBuffer
);
});
@@ -338,8 +338,9 @@ describe(
primitiveType: PrimitiveType.POINTS,
});
- const attributeLocations =
- GeometryPipeline.createAttributeLocations(geometry);
+ const attributeLocations = GeometryPipeline.createAttributeLocations(
+ geometry
+ );
const va = VertexArray.fromGeometry({
context: context,
geometry: geometry,
@@ -408,8 +409,9 @@ describe(
primitiveType: PrimitiveType.POINTS,
});
- const attributeLocations =
- GeometryPipeline.createAttributeLocations(geometry);
+ const attributeLocations = GeometryPipeline.createAttributeLocations(
+ geometry
+ );
const va = VertexArray.fromGeometry({
context: context,
geometry: geometry,
@@ -492,8 +494,9 @@ describe(
primitiveType: PrimitiveType.POINTS,
});
- const attributeLocations =
- GeometryPipeline.createAttributeLocations(geometry);
+ const attributeLocations = GeometryPipeline.createAttributeLocations(
+ geometry
+ );
const va = VertexArray.fromGeometry({
context: context,
geometry: geometry,
@@ -568,8 +571,9 @@ describe(
primitiveType: PrimitiveType.POINTS,
});
- const attributeLocations =
- GeometryPipeline.createAttributeLocations(geometry);
+ const attributeLocations = GeometryPipeline.createAttributeLocations(
+ geometry
+ );
const va = VertexArray.fromGeometry({
context: context,
geometry: geometry,
@@ -672,7 +676,7 @@ describe(
expect(va.indexBuffer).toBeDefined();
expect(va.indexBuffer.usage).toEqual(BufferUsage.DYNAMIC_DRAW); // Default
expect(va.indexBuffer.indexDatatype).toEqual(
- IndexDatatype.UNSIGNED_SHORT,
+ IndexDatatype.UNSIGNED_SHORT
);
expect(va.indexBuffer.numberOfIndices).toEqual(geometry.indices.length);
});
@@ -732,5 +736,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/VertexArraySpec.js b/packages/engine/Specs/Renderer/VertexArraySpec.js
index bfc5834735e5..f9dd7f36f8dc 100644
--- a/packages/engine/Specs/Renderer/VertexArraySpec.js
+++ b/packages/engine/Specs/Renderer/VertexArraySpec.js
@@ -79,7 +79,7 @@ describe(
expect(va.getAttribute(0).vertexBuffer).toEqual(positionBuffer);
expect(va.getAttribute(0).componentsPerAttribute).toEqual(3);
expect(va.getAttribute(0).componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(va.getAttribute(0).normalize).toEqual(false);
expect(va.getAttribute(0).offsetInBytes).toEqual(0);
@@ -190,7 +190,7 @@ describe(
expect(va.getAttribute(0).vertexBuffer).toEqual(positionBuffer);
expect(va.getAttribute(0).componentsPerAttribute).toEqual(3);
expect(va.getAttribute(0).componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(va.getAttribute(0).normalize).toEqual(false);
expect(va.getAttribute(0).offsetInBytes).toEqual(0);
@@ -908,5 +908,5 @@ describe(
contextWithoutInstancing.destroyForSpecs();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Renderer/loadCubeMapSpec.js b/packages/engine/Specs/Renderer/loadCubeMapSpec.js
index 70ee6f6ad8cd..de41c7154dfa 100644
--- a/packages/engine/Specs/Renderer/loadCubeMapSpec.js
+++ b/packages/engine/Specs/Renderer/loadCubeMapSpec.js
@@ -292,5 +292,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/AppearanceSpec.js b/packages/engine/Specs/Scene/AppearanceSpec.js
index 43fb29cabc60..05cd5876c728 100644
--- a/packages/engine/Specs/Scene/AppearanceSpec.js
+++ b/packages/engine/Specs/Scene/AppearanceSpec.js
@@ -55,7 +55,7 @@ describe("Scene/Appearance", function () {
});
expect(appearance.getFragmentShaderSource().indexOf(fs)).toBeGreaterThan(
- -1,
+ -1
);
});
diff --git a/packages/engine/Specs/Scene/ArcGisMapServerImageryProviderSpec.js b/packages/engine/Specs/Scene/ArcGisMapServerImageryProviderSpec.js
index 94000fee5b82..61705dc67bfb 100644
--- a/packages/engine/Specs/Scene/ArcGisMapServerImageryProviderSpec.js
+++ b/packages/engine/Specs/Scene/ArcGisMapServerImageryProviderSpec.js
@@ -46,24 +46,22 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
});
function stubJSONCall(baseUrl, result, withProxy, token) {
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- deferred.resolve(JSON.stringify(result));
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ deferred.resolve(JSON.stringify(result));
+ });
}
it("conforms to ImageryProvider interface", function () {
expect(ArcGisMapServerImageryProvider).toConformToInterface(
- ImageryProvider,
+ ImageryProvider
);
});
@@ -102,9 +100,9 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
it("fromUrl throws if url is not provided", async function () {
await expectAsync(
- ArcGisMapServerImageryProvider.fromUrl(),
+ ArcGisMapServerImageryProvider.fromUrl()
).toBeRejectedWithDeveloperError(
- "url is required, actual value was undefined",
+ "url is required, actual value was undefined"
);
});
@@ -136,10 +134,10 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
const baseUrl = "//tiledArcGisMapServer.invalid/";
await expectAsync(
- ArcGisMapServerImageryProvider.fromUrl(baseUrl),
+ ArcGisMapServerImageryProvider.fromUrl(baseUrl)
).toBeRejectedWithError(
RuntimeError,
- "An error occurred while accessing //tiledArcGisMapServer.invalid/",
+ "An error occurred while accessing //tiledArcGisMapServer.invalid/"
);
});
@@ -182,10 +180,10 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
stubJSONCall(baseUrl, unsupportedWKIDResult);
await expectAsync(
- ArcGisMapServerImageryProvider.fromUrl(baseUrl),
+ ArcGisMapServerImageryProvider.fromUrl(baseUrl)
).toBeRejectedWithError(
RuntimeError,
- "An error occurred while accessing //tiledArcGisMapServer.invalid/: Tile spatial reference WKID 1234 is not supported.",
+ "An error occurred while accessing //tiledArcGisMapServer.invalid/: Tile spatial reference WKID 1234 is not supported."
);
});
@@ -237,10 +235,10 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
stubJSONCall(baseUrl, unsupportedFullExtentWKIDResult);
await expectAsync(
- ArcGisMapServerImageryProvider.fromUrl(baseUrl),
+ ArcGisMapServerImageryProvider.fromUrl(baseUrl)
).toBeRejectedWithError(
RuntimeError,
- "An error occurred while accessing //tiledArcGisMapServer.invalid/: fullExtent.spatialReference WKID 1234 is not supported.",
+ "An error occurred while accessing //tiledArcGisMapServer.invalid/: fullExtent.spatialReference WKID 1234 is not supported."
);
});
@@ -256,7 +254,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
expect(provider.tilingScheme).toBeInstanceOf(WebMercatorTilingScheme);
expect(provider.credit).toBeDefined();
expect(provider.tileDiscardPolicy).toBeInstanceOf(
- DiscardMissingTileImagePolicy,
+ DiscardMissingTileImagePolicy
);
expect(provider.rectangle).toEqual(new WebMercatorTilingScheme().rectangle);
expect(provider.usingPrecachedTiles).toEqual(true);
@@ -265,15 +263,15 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
it("fromBasemapType throws without style", async function () {
await expectAsync(
- ArcGisMapServerImageryProvider.fromBasemapType(),
+ ArcGisMapServerImageryProvider.fromBasemapType()
).toBeRejectedWithDeveloperError(
- "style is required, actual value was undefined",
+ "style is required, actual value was undefined"
);
});
it("fromBasemapType throws with unknown style", async function () {
await expectAsync(
- ArcGisMapServerImageryProvider.fromBasemapType("unknown"),
+ ArcGisMapServerImageryProvider.fromBasemapType("unknown")
).toBeRejectedWithDeveloperError("Unsupported basemap type: unknown");
});
@@ -284,7 +282,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
ArcGisBaseMapType.SATELLITE,
{
token: "myToken",
- },
+ }
);
expect(provider.url).toContain(expectedUrl);
@@ -297,16 +295,16 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
const expectedUrl = ArcGisMapService.defaultWorldImageryServer;
stubJSONCall(expectedUrl, webMercatorResult);
const provider = await ArcGisMapServerImageryProvider.fromBasemapType(
- ArcGisBaseMapType.SATELLITE,
+ ArcGisBaseMapType.SATELLITE
);
expect(provider.url).toContain(expectedUrl);
expect(provider.token).toBeDefined();
expect(provider.credit.html).toContain(
- "This application is using a default ArcGIS access token.",
+ "This application is using a default ArcGIS access token."
);
expect(provider.getTileCredits(0, 0, 0)[0].html).toEqual(
- "Test copyright text",
+ "Test copyright text"
);
});
@@ -325,7 +323,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
expect(provider.tilingScheme).toBeInstanceOf(WebMercatorTilingScheme);
expect(provider.credit).toBeDefined();
expect(provider.tileDiscardPolicy).toBeInstanceOf(
- DiscardMissingTileImagePolicy,
+ DiscardMissingTileImagePolicy
);
expect(provider.rectangle).toEqual(new WebMercatorTilingScheme().rectangle);
expect(provider.usingPrecachedTiles).toEqual(true);
@@ -334,14 +332,14 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
const url = request.url;
if (/^blob:/.test(url)) {
Resource._DefaultImplementations.createImage(
request,
crossOrigin,
- deferred,
+ deferred
);
} else {
expect(url).toEqual(getAbsoluteUri(`${baseUrl}tile/0/0/0`));
@@ -350,7 +348,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
}
};
@@ -362,7 +360,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
expect(url).toEqual(getAbsoluteUri(`${baseUrl}tile/0/0/0`));
@@ -373,7 +371,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -430,7 +428,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
expect(provider.tilingScheme).toBeInstanceOf(GeographicTilingScheme);
expect(provider.credit).toBeDefined();
expect(provider.tileDiscardPolicy).toBeInstanceOf(
- DiscardMissingTileImagePolicy,
+ DiscardMissingTileImagePolicy
);
expect(provider.rectangle).toEqual(new GeographicTilingScheme().rectangle);
expect(provider.usingPrecachedTiles).toEqual(true);
@@ -438,7 +436,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
const url = request.url;
if (/^blob:/.test(url) || supportsImageBitmapOptions) {
@@ -449,7 +447,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
deferred,
true,
false,
- true,
+ true
);
} else {
expect(url).toEqual(getAbsoluteUri(`${baseUrl}tile/0/0/0`));
@@ -458,7 +456,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
}
};
@@ -470,7 +468,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
expect(url).toEqual(getAbsoluteUri(`${baseUrl}tile/0/0/0`));
@@ -481,7 +479,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -502,7 +500,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
expect(provider.tilingScheme).toBeInstanceOf(GeographicTilingScheme);
expect(provider.credit).toBeDefined();
expect(provider.tileDiscardPolicy).toBeInstanceOf(
- DiscardMissingTileImagePolicy,
+ DiscardMissingTileImagePolicy
);
expect(provider.rectangle).toEqual(new GeographicTilingScheme().rectangle);
expect(provider.usingPrecachedTiles).toEqual(true);
@@ -533,7 +531,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
const uri = new Uri(request.url);
const params = queryToObject(uri.query());
@@ -542,7 +540,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
uriWithoutQuery.query("");
expect(uriWithoutQuery.toString()).toEqual(
- getAbsoluteUri(`${baseUrl}export`),
+ getAbsoluteUri(`${baseUrl}export`)
);
expect(params.f).toEqual("image");
@@ -556,7 +554,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
};
@@ -596,7 +594,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
copyrightText: "Test copyright text",
},
undefined,
- token,
+ token
);
const provider = await ArcGisMapServerImageryProvider.fromUrl(baseUrl, {
@@ -618,7 +616,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
expect(provider.credit).toBeDefined();
expect(provider.tileDiscardPolicy).toBeUndefined();
expect(provider.rectangle).toEqual(
- Rectangle.fromDegrees(1.0, 2.0, 3.0, 4.0),
+ Rectangle.fromDegrees(1.0, 2.0, 3.0, 4.0)
);
expect(provider.usingPrecachedTiles).toBe(false);
expect(provider.enablePickFeatures).toBe(false);
@@ -627,7 +625,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
const uri = new Uri(request.url);
const params = queryToObject(uri.query());
@@ -636,7 +634,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
uriWithoutQuery.query("");
expect(uriWithoutQuery.toString()).toEqual(
- getAbsoluteUri(`${baseUrl}export`),
+ getAbsoluteUri(`${baseUrl}export`)
);
expect(params.f).toEqual("image");
@@ -652,7 +650,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
};
@@ -674,7 +672,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
const expectedTileUrl = getAbsoluteUri(
`${baseUrl}tile/0/0/0?${objectToQuery({
token: token,
- })}`,
+ })}`
);
expect(provider.url).toEqual(baseUrl);
@@ -686,7 +684,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
expect(provider.tilingScheme).toBeInstanceOf(WebMercatorTilingScheme);
expect(provider.credit).toBeDefined();
expect(provider.tileDiscardPolicy).toBeInstanceOf(
- DiscardMissingTileImagePolicy,
+ DiscardMissingTileImagePolicy
);
expect(provider.rectangle).toEqual(new WebMercatorTilingScheme().rectangle);
expect(provider.usingPrecachedTiles).toEqual(true);
@@ -695,7 +693,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
const url = request.url;
if (/^blob:/.test(url) || supportsImageBitmapOptions) {
@@ -706,7 +704,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
deferred,
true,
false,
- true,
+ true
);
} else {
expect(url).toEqual(expectedTileUrl);
@@ -715,7 +713,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
}
};
@@ -727,7 +725,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
expect(url).toEqual(expectedTileUrl);
@@ -738,7 +736,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -799,16 +797,16 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
const projection = new WebMercatorProjection();
const sw = projection.unproject(
- new Cartesian2(1.1148026611962173e7, -6443518.758206591),
+ new Cartesian2(1.1148026611962173e7, -6443518.758206591)
);
const ne = projection.unproject(
- new Cartesian2(1.8830976498143446e7, -265936.19697360107),
+ new Cartesian2(1.8830976498143446e7, -265936.19697360107)
);
const rectangle = new Rectangle(
sw.longitude,
sw.latitude,
ne.longitude,
- ne.latitude,
+ ne.latitude
);
expect(provider.rectangle).toEqual(rectangle);
});
@@ -867,10 +865,10 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
expect(provider.rectangle.west).toBeGreaterThanOrEqual(-Math.PI);
expect(provider.rectangle.east).toBeLessThanOrEqual(Math.PI);
expect(provider.rectangle.south).toBeGreaterThanOrEqual(
- -WebMercatorProjection.MaximumLatitude,
+ -WebMercatorProjection.MaximumLatitude
);
expect(provider.rectangle.north).toBeLessThanOrEqual(
- WebMercatorProjection.MaximumLatitude,
+ WebMercatorProjection.MaximumLatitude
);
});
@@ -925,7 +923,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
expect(provider.url).toEqual(baseUrl);
expect(provider.rectangle).toEqual(
- Rectangle.fromDegrees(-123.4, -23.2, 100.7, 45.2),
+ Rectangle.fromDegrees(-123.4, -23.2, 100.7, 45.2)
);
});
@@ -977,10 +975,10 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
stubJSONCall(baseUrl, unknownSpatialReferenceResult);
await expectAsync(
- ArcGisMapServerImageryProvider.fromUrl(baseUrl),
+ ArcGisMapServerImageryProvider.fromUrl(baseUrl)
).toBeRejectedWithError(
RuntimeError,
- "An error occurred while accessing //tiledArcGisMapServer.invalid/: Tile spatial reference WKID 1234 is not supported.",
+ "An error occurred while accessing //tiledArcGisMapServer.invalid/: Tile spatial reference WKID 1234 is not supported."
);
});
@@ -991,7 +989,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
"made/up/map/server",
{
usePreCachedTilesIfAvailable: false,
- },
+ }
);
Resource._Implementations.loadWithXhr = function (
@@ -1001,7 +999,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
expect(url).toContain("identify");
Resource._DefaultImplementations.loadWithXhr(
@@ -1011,7 +1009,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
};
@@ -1023,8 +1021,8 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
expect(firstResult.description).toContain("Hummock Grasses");
expect(firstResult.position).toEqual(
new WebMercatorProjection().unproject(
- new Cartesian3(1.481682457042425e7, -2710890.117898505),
- ),
+ new Cartesian3(1.481682457042425e7, -2710890.117898505)
+ )
);
});
@@ -1034,7 +1032,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
"made/up/map/server",
{
usePreCachedTilesIfAvailable: false,
- },
+ }
);
Resource._Implementations.loadWithXhr = function (
@@ -1044,7 +1042,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
expect(url).toContain("identify");
Resource._DefaultImplementations.loadWithXhr(
@@ -1054,7 +1052,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
};
return provider
@@ -1066,7 +1064,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
expect(firstResult).toBeInstanceOf(ImageryLayerFeatureInfo);
expect(firstResult.description).toContain("Hummock Grasses");
expect(firstResult.position).toEqual(
- Cartographic.fromDegrees(123.45, -34.2),
+ Cartographic.fromDegrees(123.45, -34.2)
);
});
});
@@ -1078,7 +1076,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
{
usePreCachedTilesIfAvailable: false,
enablePickFeatures: false,
- },
+ }
);
expect(provider.pickFeatures(0, 0, 0, 0.5, 0.5)).toBeUndefined();
@@ -1091,7 +1089,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
{
usePreCachedTilesIfAvailable: false,
enablePickFeatures: true,
- },
+ }
);
provider.enablePickFeatures = false;
@@ -1105,7 +1103,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
{
usePreCachedTilesIfAvailable: false,
enablePickFeatures: false,
- },
+ }
);
provider.enablePickFeatures = true;
@@ -1117,7 +1115,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
expect(url).toContain("identify");
Resource._DefaultImplementations.loadWithXhr(
@@ -1127,7 +1125,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
};
@@ -1144,7 +1142,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
const uri = new Uri(url);
const query = queryToObject(uri.query());
@@ -1157,7 +1155,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
};
@@ -1166,7 +1164,7 @@ describe("Scene/ArcGisMapServerImageryProvider", function () {
{
usePreCachedTilesIfAvailable: false,
layers: "someLayer,anotherLayerYay",
- },
+ }
);
const pickResult = await provider.pickFeatures(0, 0, 0, 0.5, 0.5);
diff --git a/packages/engine/Specs/Scene/AttributeTypeSpec.js b/packages/engine/Specs/Scene/AttributeTypeSpec.js
index f442bf0bcc98..8055b2e8554e 100644
--- a/packages/engine/Specs/Scene/AttributeTypeSpec.js
+++ b/packages/engine/Specs/Scene/AttributeTypeSpec.js
@@ -59,7 +59,7 @@ describe("Scene/AttributeType", function () {
it("getAttributeLocationCount works", function () {
expect(AttributeType.getAttributeLocationCount(AttributeType.SCALAR)).toBe(
- 1,
+ 1
);
expect(AttributeType.getAttributeLocationCount(AttributeType.VEC2)).toBe(1);
expect(AttributeType.getAttributeLocationCount(AttributeType.VEC3)).toBe(1);
diff --git a/packages/engine/Specs/Scene/AxisSpec.js b/packages/engine/Specs/Scene/AxisSpec.js
index 5064e26a594c..f01d807ed0f4 100644
--- a/packages/engine/Specs/Scene/AxisSpec.js
+++ b/packages/engine/Specs/Scene/AxisSpec.js
@@ -5,7 +5,7 @@ describe("Scene/Axis", function () {
const transformed = Matrix4.multiplyByVector(
transformation,
upAxis,
- new Cartesian4(),
+ new Cartesian4()
);
Cartesian4.normalize(transformed, transformed);
expect(transformed).toEqualEpsilon(expected, CesiumMath.EPSILON1);
diff --git a/packages/engine/Specs/Scene/B3dmParserSpec.js b/packages/engine/Specs/Scene/B3dmParserSpec.js
index 47ca7363d9ca..b2b6c074256f 100644
--- a/packages/engine/Specs/Scene/B3dmParserSpec.js
+++ b/packages/engine/Specs/Scene/B3dmParserSpec.js
@@ -74,7 +74,7 @@ describe(
Cesium3DTilesTester.expectRenderTileset(scene, tileset);
const batchTable = tileset.root.content.batchTable;
expect(batchTable.featuresLength).toBe(10);
- },
+ }
);
});
@@ -85,7 +85,7 @@ describe(
Cesium3DTilesTester.expectRenderTileset(scene, tileset);
const batchTable = tileset.root.content.batchTable;
expect(batchTable.featuresLength).toBe(10);
- },
+ }
);
});
@@ -94,9 +94,9 @@ describe(
function (tileset) {
expect(B3dmParser._deprecationWarning).toHaveBeenCalled();
Cesium3DTilesTester.expectRenderTileset(scene, tileset);
- },
+ }
);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/BatchTableHierarchySpec.js b/packages/engine/Specs/Scene/BatchTableHierarchySpec.js
index 582e06e72873..1fdab934e6bf 100644
--- a/packages/engine/Specs/Scene/BatchTableHierarchySpec.js
+++ b/packages/engine/Specs/Scene/BatchTableHierarchySpec.js
@@ -290,7 +290,7 @@ describe("Scene/BatchTableHierarchy", function () {
});
expect(hierarchy.getProperty(0, "items")).toBe(1);
expect(hierarchy.getProperty(0, "coordinates")).toEqual(
- new Cartesian2(1, 0),
+ new Cartesian2(1, 0)
);
expect(hierarchy.getProperty(0, "boxCount")).toBe(1);
@@ -300,13 +300,13 @@ describe("Scene/BatchTableHierarchy", function () {
expect(hierarchy.getProperty(2, "items")).toBe(2);
expect(hierarchy.getProperty(2, "coordinates")).toEqual(
- new Cartesian2(1, 2),
+ new Cartesian2(1, 2)
);
expect(hierarchy.getProperty(2, "boxCount")).not.toBeDefined();
expect(hierarchy.getProperty(3, "items")).toBe(3);
expect(hierarchy.getProperty(3, "coordinates")).toEqual(
- new Cartesian2(3, 2),
+ new Cartesian2(3, 2)
);
expect(hierarchy.getProperty(3, "boxCount")).not.toBeDefined();
});
@@ -319,7 +319,7 @@ describe("Scene/BatchTableHierarchy", function () {
});
expect(hierarchy.getProperty(0, "items")).toBe(1);
expect(hierarchy.getProperty(0, "coordinates")).toEqual(
- new Cartesian2(1, 0),
+ new Cartesian2(1, 0)
);
expect(hierarchy.getProperty(0, "boxCount")).toBe(1);
@@ -329,13 +329,13 @@ describe("Scene/BatchTableHierarchy", function () {
expect(hierarchy.getProperty(2, "items")).toBe(2);
expect(hierarchy.getProperty(2, "coordinates")).toEqual(
- new Cartesian2(1, 2),
+ new Cartesian2(1, 2)
);
expect(hierarchy.getProperty(2, "boxCount")).not.toBeDefined();
expect(hierarchy.getProperty(3, "items")).toBe(3);
expect(hierarchy.getProperty(3, "coordinates")).toEqual(
- new Cartesian2(3, 2),
+ new Cartesian2(3, 2)
);
expect(hierarchy.getProperty(3, "boxCount")).not.toBeDefined();
});
@@ -380,7 +380,7 @@ describe("Scene/BatchTableHierarchy", function () {
expect(hierarchy.getProperty(0, "items")).toBe(5);
expect(hierarchy.getProperty(2, "coordinates")).toEqual(
- new Cartesian2(1, 2),
+ new Cartesian2(1, 2)
);
const position = new Cartesian2(5, 5);
expect(hierarchy.setProperty(2, "coordinates", position)).toBe(true);
@@ -399,7 +399,7 @@ describe("Scene/BatchTableHierarchy", function () {
expect(hierarchy.getProperty(0, "items")).toBe(5);
expect(hierarchy.getProperty(2, "coordinates")).toEqual(
- new Cartesian2(1, 2),
+ new Cartesian2(1, 2)
);
const position = new Cartesian2(5, 5);
expect(hierarchy.setProperty(2, "coordinates", position)).toBe(true);
diff --git a/packages/engine/Specs/Scene/BatchTableSpec.js b/packages/engine/Specs/Scene/BatchTableSpec.js
index a2ad34141e3a..ea765487e13c 100644
--- a/packages/engine/Specs/Scene/BatchTableSpec.js
+++ b/packages/engine/Specs/Scene/BatchTableSpec.js
@@ -141,7 +141,7 @@ describe(
1.23456e12,
-2.34567e30,
3.45678e-6,
- -4.56789e-10,
+ -4.56789e-10
);
for (i = 0; i < batchTable.numberOfInstances; ++i) {
@@ -161,7 +161,7 @@ describe(
0,
Number.MAX_VALUE,
Number.POSITIVE_INFINITY,
- Number.NEGATIVE_INFINITY,
+ Number.NEGATIVE_INFINITY
);
batchTable.setBatchedAttribute(3, 0, 0);
batchTable.setBatchedAttribute(3, 1, color);
@@ -241,7 +241,7 @@ describe(
expect(uniforms.batchTexture).toBeDefined();
expect(uniforms.batchTexture()).toBeInstanceOf(Texture);
expect(uniforms.batchTexture().pixelDatatype).toEqual(
- PixelDatatype.UNSIGNED_BYTE,
+ PixelDatatype.UNSIGNED_BYTE
);
expect(uniforms.batchTextureDimensions).toBeDefined();
expect(uniforms.batchTextureDimensions().x).toBeGreaterThan(0);
@@ -265,7 +265,7 @@ describe(
expect(uniforms.batchTexture).toBeDefined();
expect(uniforms.batchTexture()).toBeInstanceOf(Texture);
expect(uniforms.batchTexture().pixelDatatype).toEqual(
- PixelDatatype.FLOAT,
+ PixelDatatype.FLOAT
);
expect(uniforms.batchTextureDimensions).toBeDefined();
expect(uniforms.batchTextureDimensions().x).toBeGreaterThan(0);
@@ -278,11 +278,11 @@ describe(
if (scene.context.floatingPointTexture) {
expect(uniforms.batchTexture().pixelDatatype).toEqual(
- PixelDatatype.FLOAT,
+ PixelDatatype.FLOAT
);
} else {
expect(uniforms.batchTexture().pixelDatatype).toEqual(
- PixelDatatype.UNSIGNED_BYTE,
+ PixelDatatype.UNSIGNED_BYTE
);
}
});
@@ -293,10 +293,10 @@ describe(
const shader = "void main() { gl_Position = vec4(0.0); }";
const modifiedShader = batchTable.getVertexShaderCallback()(shader);
expect(
- modifiedShader.indexOf(batchTable.attributes[0].functionName),
+ modifiedShader.indexOf(batchTable.attributes[0].functionName)
).not.toEqual(-1);
expect(
- modifiedShader.indexOf(batchTable.attributes[1].functionName),
+ modifiedShader.indexOf(batchTable.attributes[1].functionName)
).not.toEqual(-1);
});
@@ -307,5 +307,5 @@ describe(
expect(batchTable.isDestroyed()).toEqual(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/BatchTextureSpec.js b/packages/engine/Specs/Scene/BatchTextureSpec.js
index c4524980fd3b..004580aebdf1 100644
--- a/packages/engine/Specs/Scene/BatchTextureSpec.js
+++ b/packages/engine/Specs/Scene/BatchTextureSpec.js
@@ -257,5 +257,5 @@ describe(
expect(batchTexture.getColor(0, result)).toEqual(Color.YELLOW);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/BillboardCollectionSpec.js b/packages/engine/Specs/Scene/BillboardCollectionSpec.js
index fb509661180d..5d1b2791bc85 100644
--- a/packages/engine/Specs/Scene/BillboardCollectionSpec.js
+++ b/packages/engine/Specs/Scene/BillboardCollectionSpec.js
@@ -47,26 +47,26 @@ describe(
camera = scene.camera;
return Promise.all([
- Resource.fetchImage("./Data/Images/Green2x2.png").then(
- function (result) {
- greenImage = result;
- },
- ),
- Resource.fetchImage("./Data/Images/Blue2x2.png").then(
- function (result) {
- blueImage = result;
- },
- ),
- Resource.fetchImage("./Data/Images/White2x2.png").then(
- function (result) {
- whiteImage = result;
- },
- ),
- Resource.fetchImage("./Data/Images/Blue10x10.png").then(
- function (result) {
- largeBlueImage = result;
- },
- ),
+ Resource.fetchImage("./Data/Images/Green2x2.png").then(function (
+ result
+ ) {
+ greenImage = result;
+ }),
+ Resource.fetchImage("./Data/Images/Blue2x2.png").then(function (
+ result
+ ) {
+ blueImage = result;
+ }),
+ Resource.fetchImage("./Data/Images/White2x2.png").then(function (
+ result
+ ) {
+ whiteImage = result;
+ }),
+ Resource.fetchImage("./Data/Images/Blue10x10.png").then(function (
+ result
+ ) {
+ largeBlueImage = result;
+ }),
]);
});
@@ -175,19 +175,19 @@ describe(
expect(b.rotation).toEqual(1.0);
expect(b.alignedAxis).toEqual(Cartesian3.UNIT_Z);
expect(b.scaleByDistance).toEqual(
- new NearFarScalar(1.0, 3.0, 1.0e6, 0.0),
+ new NearFarScalar(1.0, 3.0, 1.0e6, 0.0)
);
expect(b.translucencyByDistance).toEqual(
- new NearFarScalar(1.0, 1.0, 1.0e6, 0.0),
+ new NearFarScalar(1.0, 1.0, 1.0e6, 0.0)
);
expect(b.pixelOffsetScaleByDistance).toEqual(
- new NearFarScalar(1.0, 1.0, 1.0e6, 0.0),
+ new NearFarScalar(1.0, 1.0, 1.0e6, 0.0)
);
expect(b.width).toEqual(300.0);
expect(b.height).toEqual(200.0);
expect(b.sizeInMeters).toEqual(true);
expect(b.distanceDisplayCondition).toEqual(
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
expect(b.disableDepthTestDistance).toEqual(10.0);
expect(b.id).toEqual("id");
@@ -232,19 +232,19 @@ describe(
expect(b.rotation).toEqual(1.0);
expect(b.alignedAxis).toEqual(Cartesian3.UNIT_Z);
expect(b.scaleByDistance).toEqual(
- new NearFarScalar(1.0e6, 3.0, 1.0e8, 0.0),
+ new NearFarScalar(1.0e6, 3.0, 1.0e8, 0.0)
);
expect(b.translucencyByDistance).toEqual(
- new NearFarScalar(1.0e6, 1.0, 1.0e8, 0.0),
+ new NearFarScalar(1.0e6, 1.0, 1.0e8, 0.0)
);
expect(b.pixelOffsetScaleByDistance).toEqual(
- new NearFarScalar(1.0e6, 3.0, 1.0e8, 0.0),
+ new NearFarScalar(1.0e6, 3.0, 1.0e8, 0.0)
);
expect(b.width).toEqual(300.0);
expect(b.height).toEqual(200.0);
expect(b.sizeInMeters).toEqual(true);
expect(b.distanceDisplayCondition).toEqual(
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
expect(b.disableDepthTestDistance).toEqual(10.0);
expect(b.splitDirection).toEqual(SplitDirection.LEFT);
@@ -1578,7 +1578,7 @@ describe(
scene.renderForSpecs();
expect(b.computeScreenSpacePosition(scene)).toEqualEpsilon(
new Cartesian2(0.5, 0.5),
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
});
@@ -1592,7 +1592,7 @@ describe(
expect(actual).toEqual(result);
expect(result).toEqualEpsilon(
new Cartesian2(0.5, 0.5),
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
});
@@ -1604,7 +1604,7 @@ describe(
scene.renderForSpecs();
expect(b.computeScreenSpacePosition(scene)).toEqualEpsilon(
new Cartesian2(1, 1.0),
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
});
@@ -1616,7 +1616,7 @@ describe(
scene.renderForSpecs();
expect(b.computeScreenSpacePosition(scene)).toEqualEpsilon(
new Cartesian2(0.5, 0.5),
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
});
@@ -1629,7 +1629,7 @@ describe(
scene.renderForSpecs();
expect(b.computeScreenSpacePosition(scene)).toEqualEpsilon(
new Cartesian2(0.5, 0.5),
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
});
@@ -1642,7 +1642,7 @@ describe(
scene.renderForSpecs();
expect(b.computeScreenSpacePosition(scene)).toEqualEpsilon(
new Cartesian2(0.5, 0.5),
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
});
@@ -1707,7 +1707,7 @@ describe(
const bbox = Billboard.getScreenSpaceBoundingBox(
b,
Cartesian2.ZERO,
- result,
+ result
);
expect(bbox.x).toEqual(-halfWidth);
expect(bbox.y).toEqual(-halfHeight);
@@ -1907,11 +1907,11 @@ describe(
expected.center = new Cartesian3(
0.0,
expected.center.x,
- expected.center.y,
+ expected.center.y
);
expect(actual.center).toEqualEpsilon(
expected.center,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(actual.radius).toBeGreaterThanOrEqual(expected.radius);
});
@@ -1963,11 +1963,11 @@ describe(
expected.center = new Cartesian3(
0.0,
expected.center.x,
- expected.center.y,
+ expected.center.y
);
expect(actual.center).toEqualEpsilon(
expected.center,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(actual.radius).toBeGreaterThan(expected.radius);
});
@@ -2000,16 +2000,16 @@ describe(
const diff = Cartesian3.subtract(
actual.center,
camera.position,
- new Cartesian3(),
+ new Cartesian3()
);
const vectorProjection = Cartesian3.multiplyByScalar(
camera.direction,
Cartesian3.dot(diff, camera.direction),
- new Cartesian3(),
+ new Cartesian3()
);
const distance = Math.max(
0.0,
- Cartesian3.magnitude(vectorProjection) - bs.radius,
+ Cartesian3.magnitude(vectorProjection) - bs.radius
);
const pixelSize = camera.frustum.getPixelDimensions(
@@ -2017,7 +2017,7 @@ describe(
dimensions.y,
distance,
scene.pixelRatio,
- new Cartesian2(),
+ new Cartesian2()
);
bs.radius +=
pixelSize.y * 0.25 * Math.max(greenImage.width, greenImage.height) +
@@ -2434,7 +2434,7 @@ describe(
expect(scene.updateHeight).toHaveBeenCalledWith(
Cartographic.fromCartesian(position),
jasmine.any(Function),
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
});
@@ -2450,7 +2450,7 @@ describe(
expect(scene.updateHeight).toHaveBeenCalledWith(
Cartographic.fromCartesian(position),
jasmine.any(Function),
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
});
@@ -2466,7 +2466,7 @@ describe(
expect(scene.updateHeight).toHaveBeenCalledWith(
Cartographic.fromCartesian(position),
jasmine.any(Function),
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
b.heightReference = HeightReference.RELATIVE_TO_GROUND;
@@ -2474,7 +2474,7 @@ describe(
expect(scene.updateHeight).toHaveBeenCalledWith(
Cartographic.fromCartesian(position),
jasmine.any(Function),
- HeightReference.RELATIVE_TO_GROUND,
+ HeightReference.RELATIVE_TO_GROUND
);
});
@@ -2505,7 +2505,7 @@ describe(
expect(scene.updateHeight).toHaveBeenCalledWith(
Cartographic.fromCartesian(position),
jasmine.any(Function),
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
position = b.position = Cartesian3.fromDegrees(-73.0, 40.0);
@@ -2514,7 +2514,7 @@ describe(
expect(scene.updateHeight).toHaveBeenCalledWith(
Cartographic.fromCartesian(position),
jasmine.any(Function),
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
});
@@ -2526,7 +2526,7 @@ describe(
cartographic.height = height;
updateCallback(cartographic);
};
- },
+ }
);
const position = Cartesian3.fromDegrees(-72.0, 40.0);
@@ -2538,14 +2538,14 @@ describe(
expect(scene.updateHeight).toHaveBeenCalled();
let cartographic = scene.globe.ellipsoid.cartesianToCartographic(
- b._clampedPosition,
+ b._clampedPosition
);
expect(cartographic.height).toEqual(0.0);
invokeCallback(100.0);
cartographic = scene.globe.ellipsoid.cartesianToCartographic(
- b._clampedPosition,
+ b._clampedPosition
);
expect(cartographic.height).toEqualEpsilon(100.0, CesiumMath.EPSILON9);
@@ -2587,14 +2587,14 @@ describe(
expect(scene.updateHeight).toHaveBeenCalledWith(
Cartographic.fromCartesian(position),
jasmine.any(Function),
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
const terrainProvider = await CesiumTerrainProvider.fromUrl(
"made/up/url",
{
requestVertexNormals: true,
- },
+ }
);
scene.terrainProvider = terrainProvider;
@@ -2602,7 +2602,7 @@ describe(
expect(scene.updateHeight).toHaveBeenCalledWith(
Cartographic.fromCartesian(position),
jasmine.any(Function),
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
expect(removeCallback).toHaveBeenCalled();
});
@@ -2653,5 +2653,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/BingMapsImageryProviderSpec.js b/packages/engine/Specs/Scene/BingMapsImageryProviderSpec.js
index 3323376afa7d..8417fdd1e640 100644
--- a/packages/engine/Specs/Scene/BingMapsImageryProviderSpec.js
+++ b/packages/engine/Specs/Scene/BingMapsImageryProviderSpec.js
@@ -85,12 +85,12 @@ describe("Scene/BingMapsImageryProvider", function () {
function installFakeMetadataRequest(url, mapStyle, mapLayer, culture) {
const baseUri = new Uri(appendForwardSlash(url));
const expectedUri = new Uri(
- `REST/v1/Imagery/Metadata/${mapStyle}`,
+ `REST/v1/Imagery/Metadata/${mapStyle}`
).absoluteTo(baseUri);
Resource._Implementations.loadAndExecuteScript = function (
url,
- functionName,
+ functionName
) {
const uri = new Uri(url);
@@ -120,7 +120,7 @@ describe("Scene/BingMapsImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
const url = request.url;
if (/^blob:/.test(url) || supportsImageBitmapOptions) {
@@ -131,7 +131,7 @@ describe("Scene/BingMapsImageryProvider", function () {
deferred,
true,
false,
- true,
+ true
);
} else {
if (defined(expectedUrl)) {
@@ -153,7 +153,7 @@ describe("Scene/BingMapsImageryProvider", function () {
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
}
};
@@ -165,7 +165,7 @@ describe("Scene/BingMapsImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
if (defined(expectedUrl)) {
let uri = new Uri(url);
@@ -190,24 +190,24 @@ describe("Scene/BingMapsImageryProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
}
it("fromUrl throws if url is not provided", async function () {
await expectAsync(
- BingMapsImageryProvider.fromUrl(),
+ BingMapsImageryProvider.fromUrl()
).toBeRejectedWithDeveloperError(
- "url is required, actual value was undefined",
+ "url is required, actual value was undefined"
);
});
it("fromUrl throws if key is not provided", async function () {
await expectAsync(
- BingMapsImageryProvider.fromUrl("http://fake.fake.invalid/"),
+ BingMapsImageryProvider.fromUrl("http://fake.fake.invalid/")
).toBeRejectedWithDeveloperError(
- "options.key is required, actual value was undefined",
+ "options.key is required, actual value was undefined"
);
});
@@ -255,7 +255,7 @@ describe("Scene/BingMapsImageryProvider", function () {
// Because the style is different, a non-cached request should have happened
expect(provider3._imageUrlSubdomains).not.toBe(
- provider._imageUrlSubdomains,
+ provider._imageUrlSubdomains
);
});
@@ -336,10 +336,10 @@ describe("Scene/BingMapsImageryProvider", function () {
await expectAsync(
BingMapsImageryProvider.fromUrl(url, {
key: "",
- }),
+ })
).toBeRejectedWithError(
RuntimeError,
- new RegExp("An error occurred while accessing"),
+ new RegExp("An error occurred while accessing")
);
});
@@ -348,12 +348,12 @@ describe("Scene/BingMapsImageryProvider", function () {
const baseUri = new Uri(appendForwardSlash(url));
const expectedUri = new Uri(
- `REST/v1/Imagery/Metadata/${BingMapsStyle.AERIAL}`,
+ `REST/v1/Imagery/Metadata/${BingMapsStyle.AERIAL}`
).absoluteTo(baseUri);
Resource._Implementations.loadAndExecuteScript = function (
url,
- functionName,
+ functionName
) {
const uri = new Uri(url);
const query = queryToObject(uri.query());
@@ -366,7 +366,7 @@ describe("Scene/BingMapsImageryProvider", function () {
setTimeout(function () {
const response = createFakeBingMapsMetadataResponse(
- BingMapsStyle.AERIAL,
+ BingMapsStyle.AERIAL
);
response.resourceSets = [];
window[functionName](response);
@@ -377,10 +377,10 @@ describe("Scene/BingMapsImageryProvider", function () {
await expectAsync(
BingMapsImageryProvider.fromUrl(url, {
key: "",
- }),
+ })
).toBeRejectedWithError(
RuntimeError,
- new RegExp("metadata does not specify one resource in resourceSets"),
+ new RegExp("metadata does not specify one resource in resourceSets")
);
});
@@ -420,7 +420,7 @@ describe("Scene/BingMapsImageryProvider", function () {
expect(provider.maximumLevel).toEqual(20);
expect(provider.tilingScheme).toBeInstanceOf(WebMercatorTilingScheme);
expect(provider.tileDiscardPolicy).toBeInstanceOf(
- DiscardEmptyTileImagePolicy,
+ DiscardEmptyTileImagePolicy
);
expect(provider.rectangle).toEqual(new WebMercatorTilingScheme().rectangle);
expect(provider.credit).toBeInstanceOf(Object);
@@ -430,7 +430,7 @@ describe("Scene/BingMapsImageryProvider", function () {
{
g: "3031",
mkt: "",
- },
+ }
);
const image = await provider.requestImage(0, 0, 0);
@@ -458,7 +458,7 @@ describe("Scene/BingMapsImageryProvider", function () {
{
g: "3031",
mkt: "ja-jp",
- },
+ }
);
const image = await provider.requestImage(0, 0, 0);
@@ -494,7 +494,7 @@ describe("Scene/BingMapsImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
const url = request.url;
if (/^blob:/.test(url)) {
@@ -502,14 +502,14 @@ describe("Scene/BingMapsImageryProvider", function () {
Resource._DefaultImplementations.createImage(
request,
crossOrigin,
- deferred,
+ deferred
);
} else if (tries === 2) {
// Succeed after 2 tries
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
} else {
// fail
@@ -526,7 +526,7 @@ describe("Scene/BingMapsImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
if (tries === 2) {
// Succeed after 2 tries
@@ -536,7 +536,7 @@ describe("Scene/BingMapsImageryProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
} else {
// fail
diff --git a/packages/engine/Specs/Scene/BoundingVolumeSemanticsSpec.js b/packages/engine/Specs/Scene/BoundingVolumeSemanticsSpec.js
index 23858656f5f1..011b404611e9 100644
--- a/packages/engine/Specs/Scene/BoundingVolumeSemanticsSpec.js
+++ b/packages/engine/Specs/Scene/BoundingVolumeSemanticsSpec.js
@@ -98,14 +98,14 @@ describe("Scene/BoundingVolumeSemantics", function () {
it("throws without tileMetadata", function () {
expect(function () {
return BoundingVolumeSemantics.parseAllBoundingVolumeSemantics(
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
it("works if no semantics are present", function () {
expect(
- BoundingVolumeSemantics.parseAllBoundingVolumeSemantics(emptyMetadata),
+ BoundingVolumeSemantics.parseAllBoundingVolumeSemantics(emptyMetadata)
).toEqual({
tile: {
boundingVolume: undefined,
@@ -134,7 +134,7 @@ describe("Scene/BoundingVolumeSemantics", function () {
});
expect(
- BoundingVolumeSemantics.parseAllBoundingVolumeSemantics(tileMetadata),
+ BoundingVolumeSemantics.parseAllBoundingVolumeSemantics(tileMetadata)
).toEqual({
tile: {
boundingVolume: undefined,
@@ -161,7 +161,7 @@ describe("Scene/BoundingVolumeSemantics", function () {
});
expect(
- BoundingVolumeSemantics.parseAllBoundingVolumeSemantics(tileMetadata),
+ BoundingVolumeSemantics.parseAllBoundingVolumeSemantics(tileMetadata)
).toEqual({
tile: {
boundingVolume: {
@@ -193,7 +193,7 @@ describe("Scene/BoundingVolumeSemantics", function () {
},
});
expect(
- BoundingVolumeSemantics.parseAllBoundingVolumeSemantics(tileMetadata),
+ BoundingVolumeSemantics.parseAllBoundingVolumeSemantics(tileMetadata)
).toEqual({
tile: {
boundingVolume: {
@@ -218,7 +218,7 @@ describe("Scene/BoundingVolumeSemantics", function () {
expect(function () {
return BoundingVolumeSemantics.parseBoundingVolumeSemantic(
undefined,
- emptyMetadata,
+ emptyMetadata
);
}).toThrowDeveloperError();
});
@@ -227,7 +227,7 @@ describe("Scene/BoundingVolumeSemantics", function () {
expect(function () {
return BoundingVolumeSemantics.parseBoundingVolumeSemantic(
"TILESET",
- emptyMetadata,
+ emptyMetadata
);
}).toThrowDeveloperError();
});
@@ -236,17 +236,16 @@ describe("Scene/BoundingVolumeSemantics", function () {
expect(function () {
return BoundingVolumeSemantics.parseBoundingVolumeSemantic(
"TILE",
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
it("returns undefined if there are no bounding volume semantics", function () {
- const boundingVolume =
- BoundingVolumeSemantics.parseBoundingVolumeSemantic(
- "TILE",
- emptyMetadata,
- );
+ const boundingVolume = BoundingVolumeSemantics.parseBoundingVolumeSemantic(
+ "TILE",
+ emptyMetadata
+ );
expect(boundingVolume).not.toBeDefined();
});
@@ -259,11 +258,10 @@ describe("Scene/BoundingVolumeSemantics", function () {
},
},
});
- const boundingVolume =
- BoundingVolumeSemantics.parseBoundingVolumeSemantic(
- "TILE",
- tileMetadata,
- );
+ const boundingVolume = BoundingVolumeSemantics.parseBoundingVolumeSemantic(
+ "TILE",
+ tileMetadata
+ );
expect(boundingVolume).toEqual({
box: boundingBox,
});
@@ -278,11 +276,10 @@ describe("Scene/BoundingVolumeSemantics", function () {
},
},
});
- const boundingVolume =
- BoundingVolumeSemantics.parseBoundingVolumeSemantic(
- "CONTENT",
- tileMetadata,
- );
+ const boundingVolume = BoundingVolumeSemantics.parseBoundingVolumeSemantic(
+ "CONTENT",
+ tileMetadata
+ );
expect(boundingVolume).toEqual({
region: boundingRegion,
});
@@ -297,11 +294,10 @@ describe("Scene/BoundingVolumeSemantics", function () {
},
},
});
- const boundingVolume =
- BoundingVolumeSemantics.parseBoundingVolumeSemantic(
- "TILE",
- tileMetadata,
- );
+ const boundingVolume = BoundingVolumeSemantics.parseBoundingVolumeSemantic(
+ "TILE",
+ tileMetadata
+ );
expect(boundingVolume).toEqual({
sphere: boundingSphere,
});
@@ -322,7 +318,7 @@ describe("Scene/BoundingVolumeSemantics", function () {
// Box is handled before region
const box = BoundingVolumeSemantics.parseBoundingVolumeSemantic(
"TILE",
- tileMetadata,
+ tileMetadata
);
expect(box).toEqual({
box: boundingBox,
@@ -331,7 +327,7 @@ describe("Scene/BoundingVolumeSemantics", function () {
// region is handled before sphere
const region = BoundingVolumeSemantics.parseBoundingVolumeSemantic(
"CONTENT",
- tileMetadata,
+ tileMetadata
);
expect(region).toEqual({
region: boundingRegion,
@@ -344,7 +340,7 @@ describe("Scene/BoundingVolumeSemantics", function () {
expect(function () {
return BoundingVolumeSemantics._parseMinimumHeight(
undefined,
- emptyMetadata,
+ emptyMetadata
);
}).toThrowDeveloperError();
});
@@ -353,7 +349,7 @@ describe("Scene/BoundingVolumeSemantics", function () {
expect(function () {
return BoundingVolumeSemantics._parseMinimumHeight(
"TILESET",
- emptyMetadata,
+ emptyMetadata
);
}).toThrowDeveloperError();
});
@@ -367,7 +363,7 @@ describe("Scene/BoundingVolumeSemantics", function () {
it("returns undefined if minimum height not present", function () {
const height = BoundingVolumeSemantics._parseMinimumHeight(
"TILE",
- emptyMetadata,
+ emptyMetadata
);
expect(height).not.toBeDefined();
});
@@ -383,7 +379,7 @@ describe("Scene/BoundingVolumeSemantics", function () {
});
const height = BoundingVolumeSemantics._parseMinimumHeight(
"TILE",
- tileMetadata,
+ tileMetadata
);
expect(height).toBe(minimumHeight);
});
@@ -394,7 +390,7 @@ describe("Scene/BoundingVolumeSemantics", function () {
expect(function () {
return BoundingVolumeSemantics._parseMaximumHeight(
undefined,
- emptyMetadata,
+ emptyMetadata
);
}).toThrowDeveloperError();
});
@@ -403,7 +399,7 @@ describe("Scene/BoundingVolumeSemantics", function () {
expect(function () {
return BoundingVolumeSemantics._parseMaximumHeight(
"TILESET",
- emptyMetadata,
+ emptyMetadata
);
}).toThrowDeveloperError();
});
@@ -417,7 +413,7 @@ describe("Scene/BoundingVolumeSemantics", function () {
it("returns undefined if maximum height not present", function () {
const height = BoundingVolumeSemantics._parseMaximumHeight(
"TILE",
- emptyMetadata,
+ emptyMetadata
);
expect(height).not.toBeDefined();
});
@@ -433,7 +429,7 @@ describe("Scene/BoundingVolumeSemantics", function () {
});
const height = BoundingVolumeSemantics._parseMaximumHeight(
"CONTENT",
- tileMetadata,
+ tileMetadata
);
expect(height).toBe(maximumHeight);
});
diff --git a/packages/engine/Specs/Scene/BoxEmitterSpec.js b/packages/engine/Specs/Scene/BoxEmitterSpec.js
index 27cefe64bd94..c7b42a761a96 100644
--- a/packages/engine/Specs/Scene/BoxEmitterSpec.js
+++ b/packages/engine/Specs/Scene/BoxEmitterSpec.js
@@ -59,7 +59,7 @@ describe("Scene/BoxEmitter", function () {
expect(particle.position.y).toBeLessThanOrEqual(emitter.dimensions.y);
expect(particle.position.z).toBeLessThanOrEqual(emitter.dimensions.z);
expect(particle.velocity).toEqual(
- Cartesian3.normalize(particle.position, new Cartesian3()),
+ Cartesian3.normalize(particle.position, new Cartesian3())
);
}
});
diff --git a/packages/engine/Specs/Scene/BufferLoaderSpec.js b/packages/engine/Specs/Scene/BufferLoaderSpec.js
index 0dc2ac5f9409..884ab8e001e9 100644
--- a/packages/engine/Specs/Scene/BufferLoaderSpec.js
+++ b/packages/engine/Specs/Scene/BufferLoaderSpec.js
@@ -44,7 +44,7 @@ describe("Scene/BufferLoader", function () {
await expectAsync(bufferLoader.load()).toBeRejectedWithError(
RuntimeError,
- "Failed to load external buffer: https://example.com/external.bin\n404 Not Found",
+ "Failed to load external buffer: https://example.com/external.bin\n404 Not Found"
);
});
@@ -61,7 +61,7 @@ describe("Scene/BufferLoader", function () {
it("loads external buffer", async function () {
const fetchBuffer = spyOn(
Resource.prototype,
- "fetchArrayBuffer",
+ "fetchArrayBuffer"
).and.returnValue(Promise.resolve(arrayBuffer));
const bufferLoader = new BufferLoader({
@@ -76,7 +76,7 @@ describe("Scene/BufferLoader", function () {
it("destroys buffer", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
const bufferLoader = new BufferLoader({
@@ -97,7 +97,7 @@ describe("Scene/BufferLoader", function () {
it("handles asynchronous load after destroy", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
const bufferLoader = new BufferLoader({
@@ -116,7 +116,7 @@ describe("Scene/BufferLoader", function () {
it("handles asynchronous error after destroy", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.reject(new Error()),
+ Promise.reject(new Error())
);
const bufferLoader = new BufferLoader({
diff --git a/packages/engine/Specs/Scene/CameraEventAggregatorSpec.js b/packages/engine/Specs/Scene/CameraEventAggregatorSpec.js
index c418e12ef174..364c3b31e536 100644
--- a/packages/engine/Specs/Scene/CameraEventAggregatorSpec.js
+++ b/packages/engine/Specs/Scene/CameraEventAggregatorSpec.js
@@ -46,7 +46,7 @@ describe("Scene/CameraEventAggregator", function () {
canvas,
combine(options, {
pointerType: "mouse",
- }),
+ })
);
} else {
DomEventSimulator.fireMouseDown(canvas, options);
@@ -59,7 +59,7 @@ describe("Scene/CameraEventAggregator", function () {
canvas,
combine(options, {
pointerType: "mouse",
- }),
+ })
);
} else {
DomEventSimulator.fireMouseUp(canvas, options);
@@ -72,7 +72,7 @@ describe("Scene/CameraEventAggregator", function () {
canvas,
combine(options, {
pointerType: "mouse",
- }),
+ })
);
} else {
DomEventSimulator.fireMouseMove(canvas, options);
@@ -144,7 +144,7 @@ describe("Scene/CameraEventAggregator", function () {
moveMouse(MouseButtons.RIGHT, startPosition, endPosition, true);
movement = handler.getMovement(
CameraEventType.RIGHT_DRAG,
- KeyboardEventModifier.SHIFT,
+ KeyboardEventModifier.SHIFT
);
expect(movement).toBeDefined();
expect(movement.startPosition).toEqual(startPosition);
@@ -248,7 +248,7 @@ describe("Scene/CameraEventAggregator", function () {
it("getButtonPressTime", function () {
expect(
- handler.getButtonPressTime(CameraEventType.LEFT_DRAG),
+ handler.getButtonPressTime(CameraEventType.LEFT_DRAG)
).toBeUndefined();
const options = {
@@ -268,7 +268,7 @@ describe("Scene/CameraEventAggregator", function () {
it("getButtonReleaseTime", function () {
expect(
- handler.getButtonReleaseTime(CameraEventType.LEFT_DRAG),
+ handler.getButtonReleaseTime(CameraEventType.LEFT_DRAG)
).toBeUndefined();
const options = {
diff --git a/packages/engine/Specs/Scene/CameraFlightPathSpec.js b/packages/engine/Specs/Scene/CameraFlightPathSpec.js
index b4cd134bf356..a4573e7688ea 100644
--- a/packages/engine/Specs/Scene/CameraFlightPathSpec.js
+++ b/packages/engine/Specs/Scene/CameraFlightPathSpec.js
@@ -101,7 +101,7 @@ describe(
flight.update({ time: 0.0 });
expect(camera.position).toEqualEpsilon(
startPosition,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(camera.heading).toEqualEpsilon(startHeading, CesiumMath.EPSILON12);
expect(camera.pitch).toEqualEpsilon(startPitch, CesiumMath.EPSILON12);
@@ -136,7 +136,7 @@ describe(
flight.update({ time: 0.0 });
expect(camera.position).toEqualEpsilon(
startPosition,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
flight.update({ time: duration });
@@ -153,7 +153,7 @@ describe(
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
const startPosition = Cartesian3.clone(camera.position);
@@ -162,10 +162,10 @@ describe(
const destination = Cartesian3.add(
startPosition,
new Cartesian3(-6e5 * Math.PI, 6e5 * CesiumMath.PI_OVER_FOUR, 100.0),
- new Cartesian3(),
+ new Cartesian3()
);
const endPosition = projection.ellipsoid.cartographicToCartesian(
- projection.unproject(destination),
+ projection.unproject(destination)
);
const duration = 5.0;
@@ -177,7 +177,7 @@ describe(
flight.update({ time: 0.0 });
expect(camera.position).toEqualEpsilon(
startPosition,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
flight.update({ time: duration });
@@ -194,7 +194,7 @@ describe(
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
camera.frustum = createOrthographicFrustum();
@@ -205,10 +205,10 @@ describe(
const destination = Cartesian3.add(
startPosition,
new Cartesian3(-6e6 * Math.PI, 6e6 * CesiumMath.PI_OVER_FOUR, 100.0),
- new Cartesian3(),
+ new Cartesian3()
);
const endPosition = projection.ellipsoid.cartographicToCartesian(
- projection.unproject(destination),
+ projection.unproject(destination)
);
const duration = 5.0;
@@ -220,29 +220,29 @@ describe(
flight.update({ time: 0.0 });
expect(camera.position).toEqualEpsilon(
startPosition,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(camera.frustum.right - camera.frustum.left).toEqualEpsilon(
startHeight,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
flight.update({ time: duration });
expect(camera.position.x).toEqualEpsilon(
destination.x,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(camera.position.y).toEqualEpsilon(
destination.y,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(camera.position.z).toEqualEpsilon(
startPosition.z,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(camera.frustum.right - camera.frustum.left).toEqualEpsilon(
destination.z,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -253,7 +253,7 @@ describe(
const end = Cartesian3.multiplyByScalar(
Cartesian3.normalize(start, new Cartesian3()),
mag - 1000000.0,
- new Cartesian3(),
+ new Cartesian3()
);
const duration = 3.0;
@@ -314,7 +314,7 @@ describe(
flight.complete();
expect(scene.camera.position).toEqualEpsilon(
destination,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -328,7 +328,7 @@ describe(
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
camera.frustum = createOrthographicFrustum();
camera.update(scene.mode);
@@ -336,12 +336,12 @@ describe(
const destination = Cartesian3.clone(camera.position);
destination.z = Math.max(
frustum.right - frustum.left,
- frustum.top - frustum.bottom,
+ frustum.top - frustum.bottom
);
const projection = scene.mapProjection;
const endPosition = projection.ellipsoid.cartographicToCartesian(
- projection.unproject(destination),
+ projection.unproject(destination)
);
const flight = CameraFlightPath.createTween(scene, {
@@ -387,7 +387,7 @@ describe(
const projection = scene.mapProjection;
const endPosition = projection.ellipsoid.cartographicToCartesian(
- projection.unproject(camera.position),
+ projection.unproject(camera.position)
);
const flight = CameraFlightPath.createTween(scene, {
@@ -407,7 +407,7 @@ describe(
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
camera.frustum = createOrthographicFrustum();
@@ -419,10 +419,10 @@ describe(
const destination = Cartesian3.add(
startPosition,
new Cartesian3(-6e5 * Math.PI, 6e5 * CesiumMath.PI_OVER_FOUR, 100.0),
- new Cartesian3(),
+ new Cartesian3()
);
const endPosition = projection.ellipsoid.cartographicToCartesian(
- projection.unproject(destination),
+ projection.unproject(destination)
);
const flight = CameraFlightPath.createTween(scene, {
@@ -434,15 +434,15 @@ describe(
flight.complete();
expect(camera.position.x).toEqualEpsilon(
destination.x,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(camera.position.y).toEqualEpsilon(
destination.y,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(camera.frustum.right - camera.frustum.left).toEqualEpsilon(
destination.z,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -456,7 +456,7 @@ describe(
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
const startPosition = Cartesian3.clone(camera.position);
@@ -465,10 +465,10 @@ describe(
const destination = Cartesian3.add(
startPosition,
new Cartesian3(-6e6 * Math.PI, 6e6 * CesiumMath.PI_OVER_FOUR, 100.0),
- new Cartesian3(),
+ new Cartesian3()
);
const endPosition = projection.ellipsoid.cartographicToCartesian(
- projection.unproject(destination),
+ projection.unproject(destination)
);
const flight = CameraFlightPath.createTween(scene, {
@@ -603,7 +603,7 @@ describe(
flight.update({ time: duration / 2.0 });
expect(camera.pitch).toEqualEpsilon(
-CesiumMath.PI_OVER_TWO,
- CesiumMath.EPSILON4,
+ CesiumMath.EPSILON4
);
});
@@ -695,7 +695,7 @@ describe(
flight.update({ time: i });
maximumHeight = Math.max(
maximumHeight,
- camera.positionCartographic.height,
+ camera.positionCartographic.height
);
}
@@ -717,5 +717,5 @@ describe(
}
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/CameraSpec.js b/packages/engine/Specs/Scene/CameraSpec.js
index c56dccef6e45..6f90f345f173 100644
--- a/packages/engine/Specs/Scene/CameraSpec.js
+++ b/packages/engine/Specs/Scene/CameraSpec.js
@@ -110,7 +110,7 @@ describe("Scene/Camera", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const translation = new Matrix4(
1.0,
@@ -128,7 +128,7 @@ describe("Scene/Camera", function () {
0.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const expected = Matrix4.multiply(rotation, translation, new Matrix4());
expect(viewMatrix).toEqual(expected);
@@ -138,7 +138,7 @@ describe("Scene/Camera", function () {
const expected = Matrix4.inverse(camera.viewMatrix, new Matrix4());
expect(expected).toEqualEpsilon(
camera.inverseViewMatrix,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -160,12 +160,12 @@ describe("Scene/Camera", function () {
0.0,
0.0,
0.0,
- 1.0,
- ),
+ 1.0
+ )
);
const expected = Matrix4.inverseTransformation(
camera.transform,
- new Matrix4(),
+ new Matrix4()
);
expect(expected).toEqual(camera.inverseTransform);
});
@@ -174,42 +174,42 @@ describe("Scene/Camera", function () {
camera.direction = new Cartesian3(
-0.32297853365047874,
0.9461560708446421,
- 0.021761351171635013,
+ 0.021761351171635013
);
camera.up = new Cartesian3(
0.9327219113001013,
0.31839266745173644,
- -2.9874778345595487e-10,
+ -2.9874778345595487e-10
);
camera.right = new Cartesian3(
0.0069286549295528715,
-0.020297288960790985,
- 0.9853344956450351,
+ 0.9853344956450351
);
expect(Cartesian3.magnitude(camera.right)).not.toEqualEpsilon(
1.0,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(Cartesian3.magnitude(camera.up)).not.toEqualEpsilon(
1.0,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
// Trigger updateMembers which normalizes the axes
const viewMatrix = camera.viewMatrix;
expect(Cartesian3.magnitude(camera.right)).toEqualEpsilon(
1.0,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(Cartesian3.magnitude(camera.up)).toEqualEpsilon(
1.0,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
const inverseAffine = Matrix4.inverseTransformation(
viewMatrix,
- new Matrix4(),
+ new Matrix4()
);
const inverse = Matrix4.inverse(viewMatrix, new Matrix4());
expect(inverseAffine).toEqualEpsilon(inverse, CesiumMath.EPSILON8);
@@ -266,7 +266,7 @@ describe("Scene/Camera", function () {
const ellipsoid = Ellipsoid.WGS84;
const toFixedFrame = Transforms.eastNorthUpToFixedFrame(
camera.position,
- ellipsoid,
+ ellipsoid
);
const transform = Matrix4.getMatrix3(toFixedFrame, new Matrix3());
Matrix3.transpose(transform, transform);
@@ -274,7 +274,7 @@ describe("Scene/Camera", function () {
let right = Matrix3.multiplyByVector(
transform,
camera.right,
- new Cartesian3(),
+ new Cartesian3()
);
const heading =
CesiumMath.TWO_PI - CesiumMath.zeroToTwoPi(Math.atan2(right.y, right.x));
@@ -336,13 +336,13 @@ describe("Scene/Camera", function () {
camera.position = Cartesian3.fromDegrees(-72.0, 40.0, 100000.0);
camera.direction = Cartesian3.negate(
Cartesian3.normalize(camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
camera.up = Cartesian3.clone(Cartesian3.UNIT_Z);
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
const heading = camera.heading;
@@ -369,7 +369,7 @@ describe("Scene/Camera", function () {
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
const heading = camera.heading;
@@ -415,7 +415,7 @@ describe("Scene/Camera", function () {
expect(camera.positionCartographic).toEqual(positionCartographic);
expect(camera.heading).toEqualEpsilon(
CesiumMath.TWO_PI,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(camera.up.z).toBeGreaterThan(0.0);
});
@@ -431,13 +431,13 @@ describe("Scene/Camera", function () {
camera.position = Cartesian3.fromDegrees(0.0, 0.0, 100000.0);
camera.direction = Cartesian3.negate(
Cartesian3.normalize(camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
camera.up = Cartesian3.clone(Cartesian3.UNIT_Z);
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
const positionWC = Cartesian3.clone(camera.positionWC);
@@ -486,13 +486,13 @@ describe("Scene/Camera", function () {
camera.position = Cartesian3.fromDegrees(-72.0, 40.0, 100000.0);
camera.direction = Cartesian3.negate(
Cartesian3.normalize(camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
camera.up = Cartesian3.clone(Cartesian3.UNIT_Z);
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
const pitch = camera.pitch;
@@ -519,7 +519,7 @@ describe("Scene/Camera", function () {
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
const pitch = camera.pitch;
@@ -543,13 +543,13 @@ describe("Scene/Camera", function () {
camera.position = Cartesian3.fromDegrees(0.0, 0.0, 100000.0);
camera.direction = Cartesian3.negate(
Cartesian3.normalize(camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
camera.up = Cartesian3.clone(Cartesian3.UNIT_Z);
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
camera.look(camera.direction, CesiumMath.toRadians(45.0));
@@ -578,25 +578,25 @@ describe("Scene/Camera", function () {
Cartesian3.multiplyByScalar(
camera.position,
ellipsoid.maximumRadius + 100.0,
- camera.position,
+ camera.position
);
camera.direction = new Cartesian3(-1.0, 0.0, 1.0);
Cartesian3.normalize(camera.direction, camera.direction);
camera.right = Cartesian3.cross(
camera.direction,
Cartesian3.UNIT_Z,
- new Cartesian3(),
+ new Cartesian3()
);
Cartesian3.normalize(camera.right, camera.right);
camera.up = Cartesian3.cross(
camera.right,
camera.direction,
- new Cartesian3(),
+ new Cartesian3()
);
const toFixedFrame = Transforms.eastNorthUpToFixedFrame(
camera.position,
- ellipsoid,
+ ellipsoid
);
const transform = Matrix4.getMatrix3(toFixedFrame, new Matrix3());
Matrix3.transpose(transform, transform);
@@ -604,7 +604,7 @@ describe("Scene/Camera", function () {
let right = Matrix3.multiplyByVector(
transform,
camera.right,
- new Cartesian3(),
+ new Cartesian3()
);
const roll = CesiumMath.TWO_PI - Math.atan2(right.z, right.x);
@@ -646,7 +646,7 @@ describe("Scene/Camera", function () {
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
const roll = camera.roll;
@@ -675,12 +675,12 @@ describe("Scene/Camera", function () {
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
const roll = camera.roll;
const positionCartographic = Cartographic.clone(
- camera.positionCartographic,
+ camera.positionCartographic
);
const newRoll = CesiumMath.PI_OVER_FOUR;
@@ -745,17 +745,17 @@ describe("Scene/Camera", function () {
const cart = ellipsoid.cartesianToCartographic(cartesian);
expect(camera.positionCartographic).toEqualEpsilon(
cart,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(camera.direction).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(camera.up).toEqualEpsilon(Cartesian3.UNIT_Y, CesiumMath.EPSILON6);
expect(camera.right).toEqualEpsilon(Cartesian3.UNIT_X, CesiumMath.EPSILON6);
expect(frustum.right - frustum.left).toEqualEpsilon(
cart.height,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(frustum.top / frustum.right).toEqual(ratio);
});
@@ -775,11 +775,11 @@ describe("Scene/Camera", function () {
const cart = ellipsoid.cartesianToCartographic(cartesian);
expect(camera.positionCartographic).toEqualEpsilon(
cart,
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
expect(camera.direction).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(camera.up).toEqualEpsilon(Cartesian3.UNIT_Y, CesiumMath.EPSILON6);
expect(camera.right).toEqualEpsilon(Cartesian3.UNIT_X, CesiumMath.EPSILON6);
@@ -799,19 +799,19 @@ describe("Scene/Camera", function () {
expect(camera.positionCartographic).toEqualEpsilon(
ellipsoid.cartesianToCartographic(cartesian),
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(camera.direction).toEqualEpsilon(
Cartesian3.normalize(
Cartesian3.negate(camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(camera.up).toEqualEpsilon(Cartesian3.UNIT_Z, CesiumMath.EPSILON6);
expect(camera.right).toEqualEpsilon(
Cartesian3.cross(camera.direction, camera.up, new Cartesian3()),
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
});
@@ -835,11 +835,11 @@ describe("Scene/Camera", function () {
const cart = ellipsoid.cartesianToCartographic(cartesian);
expect(camera.positionCartographic).toEqualEpsilon(
cart,
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
expect(camera.direction).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(camera.up).toEqualEpsilon(Cartesian3.UNIT_Y, CesiumMath.EPSILON6);
expect(camera.right).toEqualEpsilon(Cartesian3.UNIT_X, CesiumMath.EPSILON6);
@@ -866,19 +866,19 @@ describe("Scene/Camera", function () {
const cart = ellipsoid.cartesianToCartographic(cartesian);
expect(camera.positionCartographic).toEqualEpsilon(
cart,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(camera.direction).toEqualEpsilon(
Cartesian3.normalize(
Cartesian3.negate(camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(camera.up).toEqualEpsilon(Cartesian3.UNIT_Z, CesiumMath.EPSILON6);
expect(camera.right).toEqualEpsilon(
Cartesian3.cross(camera.direction, camera.up, new Cartesian3()),
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(camera.frustum.width).toEqual(cart.height);
});
@@ -1056,11 +1056,11 @@ describe("Scene/Camera", function () {
0.0,
0.0,
0.0,
- 1.0,
- ),
+ 1.0
+ )
);
expect(camera.worldToCameraCoordinates(Cartesian4.UNIT_X)).toEqual(
- Cartesian4.UNIT_Z,
+ Cartesian4.UNIT_Z
);
});
@@ -1088,16 +1088,16 @@ describe("Scene/Camera", function () {
0.0,
0.0,
0.0,
- 1.0,
- ),
+ 1.0
+ )
);
const expected = Cartesian3.add(
Matrix4.getColumn(camera.inverseTransform, 3, new Cartesian4()),
Cartesian3.UNIT_Z,
- new Cartesian3(),
+ new Cartesian3()
);
expect(camera.worldToCameraCoordinatesPoint(Cartesian3.UNIT_X)).toEqual(
- expected,
+ expected
);
});
@@ -1125,11 +1125,11 @@ describe("Scene/Camera", function () {
0.0,
0.0,
0.0,
- 1.0,
- ),
+ 1.0
+ )
);
expect(camera.worldToCameraCoordinatesVector(Cartesian3.UNIT_X)).toEqual(
- Cartesian3.UNIT_Z,
+ Cartesian3.UNIT_Z
);
});
@@ -1157,11 +1157,11 @@ describe("Scene/Camera", function () {
0.0,
0.0,
0.0,
- 1.0,
- ),
+ 1.0
+ )
);
expect(camera.cameraToWorldCoordinates(Cartesian4.UNIT_Z)).toEqual(
- Cartesian4.UNIT_X,
+ Cartesian4.UNIT_X
);
});
@@ -1189,16 +1189,16 @@ describe("Scene/Camera", function () {
0.0,
0.0,
0.0,
- 1.0,
- ),
+ 1.0
+ )
);
const expected = Cartesian3.add(
Cartesian3.UNIT_X,
Matrix4.getColumn(camera.transform, 3, new Cartesian4()),
- new Cartesian3(),
+ new Cartesian3()
);
expect(camera.cameraToWorldCoordinatesPoint(Cartesian3.UNIT_Z)).toEqual(
- expected,
+ expected
);
});
@@ -1226,11 +1226,11 @@ describe("Scene/Camera", function () {
0.0,
0.0,
0.0,
- 1.0,
- ),
+ 1.0
+ )
);
expect(camera.cameraToWorldCoordinatesVector(Cartesian3.UNIT_Z)).toEqual(
- Cartesian3.UNIT_X,
+ Cartesian3.UNIT_X
);
});
@@ -1243,12 +1243,12 @@ describe("Scene/Camera", function () {
it("moves", function () {
const direction = Cartesian3.normalize(
new Cartesian3(1.0, 1.0, 0.0),
- new Cartesian3(),
+ new Cartesian3()
);
camera.move(direction, moveAmount);
expect(camera.position).toEqualEpsilon(
new Cartesian3(direction.x * moveAmount, direction.y * moveAmount, 1.0),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.up).toEqual(up);
expect(camera.direction).toEqual(dir);
@@ -1259,7 +1259,7 @@ describe("Scene/Camera", function () {
camera.moveUp(moveAmount);
expect(camera.position).toEqualEpsilon(
new Cartesian3(0.0, moveAmount, 1.0),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.up).toEqual(up);
expect(camera.direction).toEqual(dir);
@@ -1270,7 +1270,7 @@ describe("Scene/Camera", function () {
camera.moveDown(moveAmount);
expect(camera.position).toEqualEpsilon(
new Cartesian3(0.0, -moveAmount, 1.0),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.up).toEqual(up);
expect(camera.direction).toEqual(dir);
@@ -1281,7 +1281,7 @@ describe("Scene/Camera", function () {
camera.moveRight(moveAmount);
expect(camera.position).toEqual(
new Cartesian3(moveAmount, 0.0, 1.0),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.up).toEqual(up);
expect(camera.direction).toEqual(dir);
@@ -1292,7 +1292,7 @@ describe("Scene/Camera", function () {
camera.moveLeft(moveAmount);
expect(camera.position).toEqual(
new Cartesian3(-moveAmount, 0.0, 1.0),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.up).toEqual(up);
expect(camera.direction).toEqual(dir);
@@ -1303,7 +1303,7 @@ describe("Scene/Camera", function () {
camera.moveForward(moveAmount);
expect(camera.position).toEqual(
new Cartesian3(0.0, 0.0, 1.0 - moveAmount),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.up).toEqual(up);
expect(camera.direction).toEqual(dir);
@@ -1314,7 +1314,7 @@ describe("Scene/Camera", function () {
camera.moveBackward(moveAmount);
expect(camera.position).toEqual(
new Cartesian3(0.0, 0.0, 1.0 + moveAmount),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.up).toEqual(up);
expect(camera.direction).toEqual(dir);
@@ -1381,7 +1381,7 @@ describe("Scene/Camera", function () {
camera.update(SceneMode.SCENE2D);
const max = scene.mapProjection.project(
- new Cartographic(Math.PI, CesiumMath.toRadians(85.05112878)),
+ new Cartographic(Math.PI, CesiumMath.toRadians(85.05112878))
);
const factor = 1000.0;
const dx = max.x * factor;
@@ -1410,11 +1410,11 @@ describe("Scene/Camera", function () {
expect(camera.right).toEqual(right);
expect(camera.up).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_Y, new Cartesian3()),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.direction).toEqualEpsilon(
Cartesian3.UNIT_Z,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -1424,7 +1424,7 @@ describe("Scene/Camera", function () {
expect(camera.up).toEqualEpsilon(up, CesiumMath.EPSILON15);
expect(camera.direction).toEqualEpsilon(
Cartesian3.negate(right, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.right).toEqualEpsilon(dir, CesiumMath.EPSILON15);
});
@@ -1436,7 +1436,7 @@ describe("Scene/Camera", function () {
expect(camera.direction).toEqualEpsilon(right, CesiumMath.EPSILON15);
expect(camera.right).toEqualEpsilon(
Cartesian3.negate(dir, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -1447,7 +1447,7 @@ describe("Scene/Camera", function () {
expect(camera.direction).toEqualEpsilon(up, CesiumMath.EPSILON15);
expect(camera.up).toEqualEpsilon(
Cartesian3.negate(dir, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -1457,7 +1457,7 @@ describe("Scene/Camera", function () {
expect(camera.right).toEqualEpsilon(right, CesiumMath.EPSILON15);
expect(camera.direction).toEqualEpsilon(
Cartesian3.negate(up, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.up).toEqualEpsilon(dir, CesiumMath.EPSILON15);
});
@@ -1482,7 +1482,7 @@ describe("Scene/Camera", function () {
expect(camera.up).toEqualEpsilon(oldCamera.up, CesiumMath.EPSILON15);
expect(camera.direction).toEqualEpsilon(
oldCamera.direction,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.right).toEqualEpsilon(oldCamera.right, CesiumMath.EPSILON15);
});
@@ -1507,7 +1507,7 @@ describe("Scene/Camera", function () {
expect(camera.up).toEqualEpsilon(oldCamera.up, CesiumMath.EPSILON15);
expect(camera.direction).toEqualEpsilon(
oldCamera.direction,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.right).toEqualEpsilon(oldCamera.right, CesiumMath.EPSILON15);
});
@@ -1532,7 +1532,7 @@ describe("Scene/Camera", function () {
expect(camera.up).toEqualEpsilon(oldCamera.up, CesiumMath.EPSILON15);
expect(camera.direction).toEqualEpsilon(
oldCamera.direction,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.right).toEqualEpsilon(oldCamera.right, CesiumMath.EPSILON15);
});
@@ -1557,7 +1557,7 @@ describe("Scene/Camera", function () {
expect(camera.up).toEqualEpsilon(oldCamera.up, CesiumMath.EPSILON15);
expect(camera.direction).toEqualEpsilon(
oldCamera.direction,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.right).toEqualEpsilon(oldCamera.right, CesiumMath.EPSILON15);
});
@@ -1568,7 +1568,7 @@ describe("Scene/Camera", function () {
expect(camera.direction).toEqualEpsilon(dir, CesiumMath.EPSILON15);
expect(camera.up).toEqualEpsilon(
Cartesian3.negate(right, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.right).toEqualEpsilon(up, CesiumMath.EPSILON15);
});
@@ -1580,7 +1580,7 @@ describe("Scene/Camera", function () {
expect(camera.up).toEqualEpsilon(right, CesiumMath.EPSILON14);
expect(camera.right).toEqualEpsilon(
Cartesian3.negate(up, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -1594,13 +1594,13 @@ describe("Scene/Camera", function () {
camera.rotateUp(rotateAmount);
expect(camera.up).toEqualEpsilon(
Cartesian3.negate(dir, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.direction).toEqualEpsilon(up, CesiumMath.EPSILON15);
expect(camera.right).toEqualEpsilon(right, CesiumMath.EPSILON15);
expect(camera.position).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_Y, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -1609,13 +1609,13 @@ describe("Scene/Camera", function () {
camera.rotateUp(rotateAmount);
expect(camera.up).toEqualEpsilon(
Cartesian3.negate(dir, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.direction).toEqualEpsilon(up, CesiumMath.EPSILON15);
expect(camera.right).toEqualEpsilon(right, CesiumMath.EPSILON15);
expect(camera.position).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_Y, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -1625,20 +1625,20 @@ describe("Scene/Camera", function () {
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
camera.constrainedAxis = Cartesian3.UNIT_Y;
camera.rotateUp(rotateAmount);
expect(camera.up).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_Y, new Cartesian3()),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(camera.direction).toEqualEpsilon(right, CesiumMath.EPSILON15);
expect(camera.right).toEqualEpsilon(dir, CesiumMath.EPSILON15);
expect(camera.position).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_Y, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -1647,12 +1647,12 @@ describe("Scene/Camera", function () {
expect(camera.up).toEqualEpsilon(dir, CesiumMath.EPSILON15);
expect(camera.direction).toEqualEpsilon(
Cartesian3.negate(up, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.right).toEqualEpsilon(right, CesiumMath.EPSILON15);
expect(camera.position).toEqualEpsilon(
Cartesian3.UNIT_Y,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -1662,12 +1662,12 @@ describe("Scene/Camera", function () {
expect(camera.up).toEqualEpsilon(dir, CesiumMath.EPSILON15);
expect(camera.direction).toEqualEpsilon(
Cartesian3.negate(up, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.right).toEqualEpsilon(right, CesiumMath.EPSILON15);
expect(camera.position).toEqualEpsilon(
Cartesian3.UNIT_Y,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -1677,7 +1677,7 @@ describe("Scene/Camera", function () {
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
camera.constrainedAxis = Cartesian3.UNIT_Y;
@@ -1686,11 +1686,11 @@ describe("Scene/Camera", function () {
expect(camera.direction).toEqualEpsilon(right, CesiumMath.EPSILON15);
expect(camera.right).toEqualEpsilon(
Cartesian3.negate(dir, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.position).toEqualEpsilon(
Cartesian3.UNIT_Y,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -1700,11 +1700,11 @@ describe("Scene/Camera", function () {
expect(camera.direction).toEqualEpsilon(right, CesiumMath.EPSILON15);
expect(camera.right).toEqualEpsilon(
Cartesian3.negate(dir, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.position).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_X, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -1714,15 +1714,15 @@ describe("Scene/Camera", function () {
expect(camera.up).toEqualEpsilon(Cartesian3.UNIT_X, CesiumMath.EPSILON15);
expect(camera.direction).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.right).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_Y, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.position).toEqualEpsilon(
Cartesian3.UNIT_Z,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -1731,12 +1731,12 @@ describe("Scene/Camera", function () {
expect(camera.up).toEqualEpsilon(up, CesiumMath.EPSILON15);
expect(camera.direction).toEqualEpsilon(
Cartesian3.negate(right, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.right).toEqualEpsilon(dir, CesiumMath.EPSILON15);
expect(camera.position).toEqualEpsilon(
Cartesian3.UNIT_X,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -1745,19 +1745,19 @@ describe("Scene/Camera", function () {
camera.rotateRight(rotateAmount);
expect(camera.up).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_X, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.direction).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.right).toEqualEpsilon(
Cartesian3.UNIT_Y,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.position).toEqualEpsilon(
Cartesian3.UNIT_Z,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -1766,31 +1766,31 @@ describe("Scene/Camera", function () {
new Cartesian3(
Math.cos(CesiumMath.PI_OVER_FOUR),
Math.sin(CesiumMath.PI_OVER_FOUR),
- 0.0,
+ 0.0
),
- new Cartesian3(),
+ new Cartesian3()
);
const angle = CesiumMath.PI_OVER_TWO;
camera.rotate(axis, angle);
expect(camera.position).toEqualEpsilon(
new Cartesian3(-axis.x, axis.y, 0.0),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.direction).toEqualEpsilon(
Cartesian3.negate(
Cartesian3.normalize(camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.right).toEqualEpsilon(
Cartesian3.normalize(new Cartesian3(0.5, 0.5, axis.x), new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.up).toEqualEpsilon(
Cartesian3.cross(camera.right, camera.direction, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -1799,13 +1799,13 @@ describe("Scene/Camera", function () {
camera.rotateUp(Math.PI);
expect(camera.up).toEqualEpsilon(
Cartesian3.negate(dir, new Cartesian3()),
- CesiumMath.EPSILON4,
+ CesiumMath.EPSILON4
);
expect(camera.direction).toEqualEpsilon(up, CesiumMath.EPSILON4);
expect(camera.right).toEqualEpsilon(right, CesiumMath.EPSILON4);
expect(camera.position).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_Y, new Cartesian3()),
- CesiumMath.EPSILON4,
+ CesiumMath.EPSILON4
);
});
@@ -1898,7 +1898,7 @@ describe("Scene/Camera", function () {
camera.update(SceneMode.SCENE2D);
const max = scene.mapProjection.project(
- new Cartographic(Math.PI, CesiumMath.toRadians(85.05112878)),
+ new Cartographic(Math.PI, CesiumMath.toRadians(85.05112878))
);
const factor = 1000.0;
const dx = max.x * factor;
@@ -1924,7 +1924,7 @@ describe("Scene/Camera", function () {
camera.update(SceneMode.SCENE2D);
const max = scene.mapProjection.project(
- new Cartographic(Math.PI, CesiumMath.toRadians(85.05112878)),
+ new Cartographic(Math.PI, CesiumMath.toRadians(85.05112878))
);
const factor = 1000.0;
const dx = max.x * factor;
@@ -1938,7 +1938,7 @@ describe("Scene/Camera", function () {
camera.zoomIn(zoomAmount);
expect(camera.position).toEqualEpsilon(
new Cartesian3(0.0, 0.0, 1.0 - zoomAmount),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.up).toEqual(up);
expect(camera.direction).toEqual(dir);
@@ -1949,7 +1949,7 @@ describe("Scene/Camera", function () {
camera.zoomOut(zoomAmount);
expect(camera.position).toEqualEpsilon(
new Cartesian3(0.0, 0.0, 1.0 + zoomAmount),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.up).toEqual(up);
expect(camera.direction).toEqual(dir);
@@ -1975,35 +1975,35 @@ describe("Scene/Camera", function () {
expect(tempCamera.direction).toEqualEpsilon(
Cartesian3.negate(
Cartesian3.normalize(offset, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
expect(tempCamera.right).toEqualEpsilon(
Cartesian3.cross(
tempCamera.direction,
Cartesian3.UNIT_Z,
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
expect(tempCamera.up).toEqualEpsilon(
Cartesian3.cross(
tempCamera.right,
tempCamera.direction,
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
expect(1.0 - Cartesian3.magnitude(tempCamera.direction)).toBeLessThan(
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(1.0 - Cartesian3.magnitude(tempCamera.up)).toBeLessThan(
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(1.0 - Cartesian3.magnitude(tempCamera.right)).toBeLessThan(
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -2020,19 +2020,19 @@ describe("Scene/Camera", function () {
expect(Cartesian3.distance(tempCamera.position, target)).toEqualEpsilon(
range,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(tempCamera.heading).toEqualEpsilon(heading, CesiumMath.EPSILON6);
expect(tempCamera.pitch).toEqualEpsilon(pitch, CesiumMath.EPSILON6);
expect(1.0 - Cartesian3.magnitude(tempCamera.direction)).toBeLessThan(
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(1.0 - Cartesian3.magnitude(tempCamera.up)).toBeLessThan(
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(1.0 - Cartesian3.magnitude(tempCamera.right)).toBeLessThan(
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -2047,25 +2047,25 @@ describe("Scene/Camera", function () {
expect(tempCamera.direction).toEqualEpsilon(
Cartesian3.negate(
Cartesian3.normalize(offset, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
expect(tempCamera.right).toEqualEpsilon(
Cartesian3.cross(
tempCamera.direction,
Cartesian3.UNIT_Z,
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
expect(tempCamera.up).toEqualEpsilon(
Cartesian3.cross(
tempCamera.right,
tempCamera.direction,
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
});
@@ -2081,25 +2081,25 @@ describe("Scene/Camera", function () {
expect(tempCamera.direction).toEqualEpsilon(
Cartesian3.negate(
Cartesian3.normalize(offset, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
expect(tempCamera.right).toEqualEpsilon(
Cartesian3.cross(
tempCamera.direction,
Cartesian3.UNIT_Z,
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
expect(tempCamera.up).toEqualEpsilon(
Cartesian3.cross(
tempCamera.right,
tempCamera.direction,
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
});
@@ -2134,24 +2134,24 @@ describe("Scene/Camera", function () {
expect(Cartesian2.clone(tempCamera.position)).toEqual(Cartesian2.ZERO);
expect(tempCamera.direction).toEqual(
- Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
+ Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3())
);
expect(tempCamera.up).toEqualEpsilon(
Cartesian3.normalize(
Cartesian3.fromElements(-offset.x, -offset.y, 0.0),
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
expect(tempCamera.right).toEqualEpsilon(
Cartesian3.cross(tempCamera.direction, tempCamera.up, new Cartesian3()),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
expect(tempCamera.frustum.right).toEqual(
- Cartesian3.magnitude(offset) * 0.5,
+ Cartesian3.magnitude(offset) * 0.5
);
expect(tempCamera.frustum.left).toEqual(
- -Cartesian3.magnitude(offset) * 0.5,
+ -Cartesian3.magnitude(offset) * 0.5
);
});
@@ -2179,7 +2179,7 @@ describe("Scene/Camera", function () {
tempCamera.lookAtTransform(Matrix4.IDENTITY);
expect(tempCamera.direction).toEqual(
- Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
+ Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3())
);
expect(tempCamera.heading).toEqualEpsilon(heading, CesiumMath.EPSILON6);
expect(tempCamera.frustum.right).toEqual(range * 0.5);
@@ -2199,7 +2199,7 @@ describe("Scene/Camera", function () {
const offset = new Cartesian3(1.0, 1.0, 0.0);
const transform = Transforms.eastNorthUpToFixedFrame(
target,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
const tempCamera = Camera.clone(camera);
@@ -2209,35 +2209,35 @@ describe("Scene/Camera", function () {
expect(tempCamera.direction).toEqualEpsilon(
Cartesian3.negate(
Cartesian3.normalize(offset, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
expect(tempCamera.right).toEqualEpsilon(
Cartesian3.cross(
tempCamera.direction,
Cartesian3.UNIT_Z,
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
expect(tempCamera.up).toEqualEpsilon(
Cartesian3.cross(
tempCamera.right,
tempCamera.direction,
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
expect(1.0 - Cartesian3.magnitude(tempCamera.direction)).toBeLessThan(
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(1.0 - Cartesian3.magnitude(tempCamera.up)).toBeLessThan(
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(1.0 - Cartesian3.magnitude(tempCamera.right)).toBeLessThan(
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -2253,26 +2253,26 @@ describe("Scene/Camera", function () {
camera.position = ellipsoid.cartographicToCartesian(cartOrigin);
camera.direction = Cartesian3.negate(
Cartesian3.fromCartesian4(
- Matrix4.getColumn(transform, 2, new Cartesian4()),
+ Matrix4.getColumn(transform, 2, new Cartesian4())
),
- new Cartesian3(),
+ new Cartesian3()
);
camera.up = Cartesian3.fromCartesian4(
- Matrix4.getColumn(transform, 1, new Cartesian4(), new Matrix4()),
+ Matrix4.getColumn(transform, 1, new Cartesian4(), new Matrix4())
);
camera.right = Cartesian3.fromCartesian4(
- Matrix4.getColumn(transform, 0, new Cartesian4()),
+ Matrix4.getColumn(transform, 0, new Cartesian4())
);
camera.lookAtTransform(transform);
expect(camera.position).toEqualEpsilon(
new Cartesian3(0.0, 0.0, height),
- CesiumMath.EPSILON9,
+ CesiumMath.EPSILON9
);
expect(camera.direction).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- CesiumMath.EPSILON9,
+ CesiumMath.EPSILON9
);
expect(camera.up).toEqualEpsilon(Cartesian3.UNIT_Y, CesiumMath.EPSILON9);
expect(camera.right).toEqualEpsilon(Cartesian3.UNIT_X, CesiumMath.EPSILON9);
@@ -2288,26 +2288,26 @@ describe("Scene/Camera", function () {
const tempCamera = Camera.clone(camera);
tempCamera.lookAtTransform(
transform,
- new HeadingPitchRange(heading, pitch, range),
+ new HeadingPitchRange(heading, pitch, range)
);
tempCamera.lookAtTransform(Matrix4.IDENTITY);
expect(Cartesian3.distance(tempCamera.position, target)).toEqualEpsilon(
range,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(tempCamera.heading).toEqualEpsilon(heading, CesiumMath.EPSILON6);
expect(tempCamera.pitch).toEqualEpsilon(pitch, CesiumMath.EPSILON6);
expect(1.0 - Cartesian3.magnitude(tempCamera.direction)).toBeLessThan(
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(1.0 - Cartesian3.magnitude(tempCamera.up)).toBeLessThan(
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(1.0 - Cartesian3.magnitude(tempCamera.right)).toBeLessThan(
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -2331,31 +2331,31 @@ describe("Scene/Camera", function () {
tempCamera.update(SceneMode.SCENE2D);
const transform = Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(0.0, 0.0),
+ Cartesian3.fromDegrees(0.0, 0.0)
);
const offset = new Cartesian3(10000.0, 10000.0, 30000.0);
tempCamera.lookAtTransform(transform, offset);
expect(Cartesian2.clone(tempCamera.position)).toEqual(Cartesian2.ZERO);
expect(tempCamera.direction).toEqual(
- Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
+ Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3())
);
expect(tempCamera.up).toEqualEpsilon(
Cartesian3.normalize(
Cartesian3.fromElements(-offset.x, -offset.y, 0.0),
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
expect(tempCamera.right).toEqualEpsilon(
Cartesian3.cross(tempCamera.direction, tempCamera.up, new Cartesian3()),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
expect(tempCamera.frustum.right).toEqual(
- Cartesian3.magnitude(offset) * 0.5,
+ Cartesian3.magnitude(offset) * 0.5
);
expect(tempCamera.frustum.left).toEqual(
- -Cartesian3.magnitude(offset) * 0.5,
+ -Cartesian3.magnitude(offset) * 0.5
);
});
@@ -2380,14 +2380,14 @@ describe("Scene/Camera", function () {
tempCamera.lookAtTransform(
transform,
- new HeadingPitchRange(heading, pitch, range),
+ new HeadingPitchRange(heading, pitch, range)
);
expect(Cartesian2.clone(tempCamera.position)).toEqual(Cartesian2.ZERO);
tempCamera.lookAtTransform(Matrix4.IDENTITY);
expect(tempCamera.direction).toEqual(
- Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
+ Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3())
);
expect(tempCamera.heading).toEqualEpsilon(heading, CesiumMath.EPSILON6);
expect(tempCamera.frustum.right).toEqual(range * 0.5);
@@ -2399,7 +2399,7 @@ describe("Scene/Camera", function () {
const offset = new Cartesian3(1.0, 1.0, 0.0);
const transform = Transforms.eastNorthUpToFixedFrame(
target,
- Ellipsoid.UNIT_SPHERE,
+ Ellipsoid.UNIT_SPHERE
);
const tempCamera = Camera.clone(camera);
@@ -2414,39 +2414,39 @@ describe("Scene/Camera", function () {
expect(tempCamera.direction).toEqualEpsilon(
Cartesian3.negate(
Cartesian3.normalize(offset, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
expect(tempCamera.right).toEqualEpsilon(
Cartesian3.cross(
tempCamera.direction,
Cartesian3.UNIT_Z,
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
expect(tempCamera.up).toEqualEpsilon(
Cartesian3.cross(
tempCamera.right,
tempCamera.direction,
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON11,
+ CesiumMath.EPSILON11
);
expect(1.0 - Cartesian3.magnitude(tempCamera.direction)).toBeLessThan(
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(1.0 - Cartesian3.magnitude(tempCamera.up)).toBeLessThan(
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(1.0 - Cartesian3.magnitude(tempCamera.right)).toBeLessThan(
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(tempCamera.frustum.width).toEqual(
- Cartesian3.magnitude(tempCamera.position),
+ Cartesian3.magnitude(tempCamera.position)
);
});
@@ -2463,21 +2463,21 @@ describe("Scene/Camera", function () {
-Math.PI,
-CesiumMath.PI_OVER_TWO,
Math.PI,
- CesiumMath.PI_OVER_TWO,
+ CesiumMath.PI_OVER_TWO
);
camera.setView({ destination: rectangle });
expect(camera.position).toEqualEpsilon(
new Cartesian3(14680290.639204923, 0.0, 0.0),
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(camera.direction).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_X, new Cartesian3()),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.up).toEqualEpsilon(Cartesian3.UNIT_Z, CesiumMath.EPSILON10);
expect(camera.right).toEqualEpsilon(
Cartesian3.UNIT_Y,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -2486,32 +2486,32 @@ describe("Scene/Camera", function () {
CesiumMath.toRadians(21.25),
CesiumMath.toRadians(41.23),
CesiumMath.toRadians(21.51),
- CesiumMath.toRadians(41.38),
+ CesiumMath.toRadians(41.38)
);
camera.setView({ destination: rectangle });
expect(camera.position).toEqualEpsilon(
new Cartesian3(4481555.454147325, 1754498.0086281248, 4200627.581953675),
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(camera.direction).toEqualEpsilon(
new Cartesian3(
-0.6995046749050446,
-0.27385124912628594,
- -0.6600747708691498,
+ -0.6600747708691498
),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.up).toEqualEpsilon(
new Cartesian3(
-0.6146504879783901,
-0.2406314209863035,
- 0.7511999047271233,
+ 0.7511999047271233
),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.right).toEqualEpsilon(
new Cartesian3(-0.36455176232452213, 0.9311831251617939, 0),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -2520,32 +2520,32 @@ describe("Scene/Camera", function () {
CesiumMath.toRadians(90.0),
CesiumMath.toRadians(-50.0),
CesiumMath.toRadians(157.0),
- CesiumMath.toRadians(0.0),
+ CesiumMath.toRadians(0.0)
);
camera.setView({ destination: rectangle });
expect(camera.position).toEqualEpsilon(
new Cartesian3(-6017603.25625715, 9091606.78076493, -5075070.862292178),
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(camera.direction).toEqualEpsilon(
new Cartesian3(
0.49978034145251155,
-0.7550857289433265,
- 0.42434084442077485,
+ 0.42434084442077485
),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.up).toEqualEpsilon(
new Cartesian3(
-0.2342094064143758,
0.35385181388649406,
- 0.905502538790623,
+ 0.905502538790623
),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.right).toEqualEpsilon(
new Cartesian3(-0.8338858220671682, -0.5519369853120581, 0),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -2554,32 +2554,32 @@ describe("Scene/Camera", function () {
CesiumMath.toRadians(90.0),
CesiumMath.toRadians(-62.0),
CesiumMath.toRadians(174.0),
- CesiumMath.toRadians(-4.0),
+ CesiumMath.toRadians(-4.0)
);
camera.setView({ destination: rectangle });
expect(camera.position).toEqualEpsilon(
new Cartesian3(-7307919.685704952, 8116267.060310548, -7085995.891547672),
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(camera.direction).toEqualEpsilon(
new Cartesian3(
0.5602119862713765,
-0.6221784429103113,
- 0.5468605998017956,
+ 0.5468605998017956
),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.up).toEqualEpsilon(
new Cartesian3(
-0.3659211647391443,
0.40639662500016843,
- 0.8372236764356468,
+ 0.8372236764356468
),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.right).toEqualEpsilon(
new Cartesian3(-0.7431448254773944, -0.6691306063588581, 0),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -2588,21 +2588,21 @@ describe("Scene/Camera", function () {
0.1,
-CesiumMath.PI_OVER_TWO,
-0.1,
- CesiumMath.PI_OVER_TWO,
+ CesiumMath.PI_OVER_TWO
);
camera.setView({ destination: rectangle });
expect(camera.position).toEqualEpsilon(
new Cartesian3(-14680290.639204923, 0.0, 0.0),
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(camera.direction).toEqualEpsilon(
Cartesian3.UNIT_X,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.up).toEqualEpsilon(Cartesian3.UNIT_Z, CesiumMath.EPSILON10);
expect(camera.right).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_Y, new Cartesian3()),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -2620,11 +2620,11 @@ describe("Scene/Camera", function () {
-CesiumMath.PI_OVER_TWO,
-CesiumMath.PI_OVER_FOUR,
CesiumMath.PI_OVER_TWO,
- CesiumMath.PI_OVER_FOUR,
+ CesiumMath.PI_OVER_FOUR
);
const projection = new GeographicProjection();
const edge = projection.project(
- new Cartographic(CesiumMath.PI_OVER_TWO, CesiumMath.PI_OVER_FOUR),
+ new Cartographic(CesiumMath.PI_OVER_TWO, CesiumMath.PI_OVER_FOUR)
);
const expected = Math.max(edge.x, edge.y);
@@ -2654,11 +2654,11 @@ describe("Scene/Camera", function () {
-CesiumMath.PI_OVER_FOUR,
-CesiumMath.PI_OVER_TWO,
CesiumMath.PI_OVER_FOUR,
- CesiumMath.PI_OVER_TWO,
+ CesiumMath.PI_OVER_TWO
);
const projection = new GeographicProjection();
const edge = projection.project(
- new Cartographic(CesiumMath.PI_OVER_FOUR, CesiumMath.PI_OVER_TWO),
+ new Cartographic(CesiumMath.PI_OVER_FOUR, CesiumMath.PI_OVER_TWO)
);
const expected = Math.max(edge.x, edge.y);
@@ -2679,7 +2679,7 @@ describe("Scene/Camera", function () {
-CesiumMath.PI_OVER_TWO,
-CesiumMath.PI_OVER_TWO,
CesiumMath.PI_OVER_TWO,
- CesiumMath.PI_OVER_TWO,
+ CesiumMath.PI_OVER_TWO
);
const projection = new GeographicProjection();
camera._mode = SceneMode.COLUMBUS_VIEW;
@@ -2687,19 +2687,19 @@ describe("Scene/Camera", function () {
camera.setView({ destination: rectangle });
expect(camera.position).toEqualEpsilon(
new Cartesian3(0.0, 0.0, 23137321.67119748),
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(camera.direction).toEqualEpsilon(
new Cartesian3(0.0, 0.0, -1.0),
- CesiumMath.EPSILON2,
+ CesiumMath.EPSILON2
);
expect(camera.up).toEqualEpsilon(
new Cartesian3(0.0, 1.0, 0.0),
- CesiumMath.EPSILON2,
+ CesiumMath.EPSILON2
);
expect(camera.right).toEqualEpsilon(
new Cartesian3(1.0, 0.0, 0.0),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -2719,7 +2719,7 @@ describe("Scene/Camera", function () {
CesiumMath.toRadians(21.25),
CesiumMath.toRadians(41.23),
CesiumMath.toRadians(21.51),
- CesiumMath.toRadians(41.38),
+ CesiumMath.toRadians(41.38)
);
const projection = new GeographicProjection();
@@ -2729,27 +2729,27 @@ describe("Scene/Camera", function () {
expect(camera.position).toEqualEpsilon(
new Cartesian3(4489090.849577177, 1757448.0638960265, 4207738.07588144),
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(camera.direction).toEqualEpsilon(
new Cartesian3(
-0.6995012374560863,
-0.2738499033887593,
- -0.6600789719506079,
+ -0.6600789719506079
),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.up).toEqualEpsilon(
new Cartesian3(
-0.6146543999545513,
-0.2406329524979527,
- 0.7511962132416727,
+ 0.7511962132416727
),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.right).toEqualEpsilon(
new Cartesian3(-0.36455176232452197, 0.931183125161794, 0.0),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -2769,7 +2769,7 @@ describe("Scene/Camera", function () {
CesiumMath.toRadians(21.25),
CesiumMath.toRadians(41.23),
CesiumMath.toRadians(21.51),
- CesiumMath.toRadians(41.38),
+ CesiumMath.toRadians(41.38)
);
const projection = new GeographicProjection();
@@ -2779,16 +2779,16 @@ describe("Scene/Camera", function () {
expect(camera.position).toEqualEpsilon(
new Cartesian3(2380010.713160189, 4598051.567216165, 28943.06760625122),
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(camera.direction).toEqualEpsilon(
new Cartesian3(0.0, 0.0, -1.0),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.up).toEqualEpsilon(Cartesian3.UNIT_Y, CesiumMath.EPSILON10);
expect(camera.right).toEqualEpsilon(
Cartesian3.UNIT_X,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -2803,7 +2803,7 @@ describe("Scene/Camera", function () {
-Math.PI,
-CesiumMath.PI_OVER_TWO,
Math.PI,
- CesiumMath.PI_OVER_TWO,
+ CesiumMath.PI_OVER_TWO
);
const position = Cartesian3.clone(camera.position);
const direction = Cartesian3.clone(camera.direction);
@@ -2813,7 +2813,7 @@ describe("Scene/Camera", function () {
camera.getRectangleCameraCoordinates(rectangle, position);
expect(position).toEqualEpsilon(
new Cartesian3(14680290.639204923, 0.0, 0.0),
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(camera.direction).toEqual(direction);
expect(camera.up).toEqual(up);
@@ -2825,7 +2825,7 @@ describe("Scene/Camera", function () {
0.1,
-CesiumMath.PI_OVER_TWO,
-0.1,
- CesiumMath.PI_OVER_TWO,
+ CesiumMath.PI_OVER_TWO
);
let position = new Cartesian3();
const direction = Cartesian3.clone(camera.direction);
@@ -2835,7 +2835,7 @@ describe("Scene/Camera", function () {
position = camera.getRectangleCameraCoordinates(rectangle);
expect(position).toEqualEpsilon(
new Cartesian3(-14680290.639204923, 0.0, 0.0),
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(camera.direction).toEqual(direction);
expect(camera.up).toEqual(up);
@@ -2847,7 +2847,7 @@ describe("Scene/Camera", function () {
-CesiumMath.PI_OVER_FOUR,
-CesiumMath.PI_OVER_TWO,
CesiumMath.PI_OVER_FOUR,
- CesiumMath.PI_OVER_TWO,
+ CesiumMath.PI_OVER_TWO
);
const projection = new GeographicProjection();
const cam = new Camera(scene);
@@ -2878,7 +2878,7 @@ describe("Scene/Camera", function () {
-CesiumMath.PI_OVER_TWO,
-CesiumMath.PI_OVER_TWO,
CesiumMath.PI_OVER_TWO,
- CesiumMath.PI_OVER_TWO,
+ CesiumMath.PI_OVER_TWO
);
const projection = new GeographicProjection();
camera._mode = SceneMode.COLUMBUS_VIEW;
@@ -2889,7 +2889,7 @@ describe("Scene/Camera", function () {
camera.position = camera.getRectangleCameraCoordinates(rectangle);
expect(camera.position).toEqualEpsilon(
new Cartesian3(0.0, 0.0, 23137321.67119748),
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(camera.direction).toEqual(direction);
expect(camera.up).toEqual(up);
@@ -2901,7 +2901,7 @@ describe("Scene/Camera", function () {
-CesiumMath.PI_OVER_TWO,
-CesiumMath.PI_OVER_TWO,
CesiumMath.PI_OVER_TWO,
- CesiumMath.PI_OVER_TWO,
+ CesiumMath.PI_OVER_TWO
);
const projection = new GeographicProjection();
camera._mode = SceneMode.MORPHING;
@@ -2940,17 +2940,17 @@ describe("Scene/Camera", function () {
camera.position = Cartesian3.multiplyByScalar(
Cartesian3.UNIT_X,
2.0 * maxRadii,
- new Cartesian3(),
+ new Cartesian3()
);
camera.direction = Cartesian3.normalize(
Cartesian3.negate(camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
camera.up = Cartesian3.clone(Cartesian3.UNIT_Z);
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
const frustum = new PerspectiveFrustum();
@@ -2962,7 +2962,7 @@ describe("Scene/Camera", function () {
const windowCoord = new Cartesian2(
scene.canvas.clientWidth * 0.5,
- scene.canvas.clientHeight * 0.5,
+ scene.canvas.clientHeight * 0.5
);
let p = camera.pickEllipsoid(windowCoord, ellipsoid);
const c = ellipsoid.cartesianToCartographic(p);
@@ -2994,7 +2994,7 @@ describe("Scene/Camera", function () {
camera.position = new Cartesian3(0.0, 0.0, 2.0 * maxRadii);
camera.direction = Cartesian3.normalize(
Cartesian3.negate(camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
camera.up = Cartesian3.clone(Cartesian3.UNIT_Y);
@@ -3013,7 +3013,7 @@ describe("Scene/Camera", function () {
const windowCoord = new Cartesian2(
scene.canvas.clientWidth * 0.5,
- scene.canvas.clientHeight * 0.5,
+ scene.canvas.clientHeight * 0.5
);
const p = camera.pickEllipsoid(windowCoord);
const c = ellipsoid.cartesianToCartographic(p);
@@ -3028,7 +3028,7 @@ describe("Scene/Camera", function () {
camera.position = new Cartesian3(0.0, 0.0, 2.0 * maxRadii);
camera.direction = Cartesian3.normalize(
Cartesian3.negate(camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
camera.up = Cartesian3.clone(Cartesian3.UNIT_Y);
@@ -3047,7 +3047,7 @@ describe("Scene/Camera", function () {
const windowCoord = new Cartesian2(
scene.canvas.clientWidth * 0.5,
- scene.canvas.clientHeight * 0.5 + 1.0,
+ scene.canvas.clientHeight * 0.5 + 1.0
);
let p = camera.pickEllipsoid(windowCoord);
let c = ellipsoid.cartesianToCartographic(p);
@@ -3070,20 +3070,20 @@ describe("Scene/Camera", function () {
camera.position = Cartesian3.multiplyByScalar(
Cartesian3.normalize(new Cartesian3(0.0, -1.0, 1.0), new Cartesian3()),
5.0 * maxRadii,
- new Cartesian3(),
+ new Cartesian3()
);
camera.direction = Cartesian3.normalize(
Cartesian3.subtract(Cartesian3.ZERO, camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
camera.right = Cartesian3.normalize(
Cartesian3.cross(camera.direction, Cartesian3.UNIT_Z, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
camera.up = Cartesian3.cross(
camera.right,
camera.direction,
- new Cartesian3(),
+ new Cartesian3()
);
const frustum = new PerspectiveFrustum();
@@ -3097,7 +3097,7 @@ describe("Scene/Camera", function () {
const windowCoord = new Cartesian2(
scene.canvas.clientWidth * 0.5,
- scene.canvas.clientHeight * 0.5,
+ scene.canvas.clientHeight * 0.5
);
let p = camera.pickEllipsoid(windowCoord);
const c = ellipsoid.cartesianToCartographic(p);
@@ -3114,17 +3114,17 @@ describe("Scene/Camera", function () {
camera.position = Cartesian3.multiplyByScalar(
Cartesian3.UNIT_X,
2.0 * maxRadii,
- new Cartesian3(),
+ new Cartesian3()
);
camera.direction = Cartesian3.normalize(
Cartesian3.negate(camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
camera.up = Cartesian3.clone(Cartesian3.UNIT_Z);
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
const frustum = new PerspectiveFrustum();
@@ -3138,7 +3138,7 @@ describe("Scene/Camera", function () {
const windowCoord = new Cartesian2(
scene.canvas.clientWidth * 0.5,
- scene.canvas.clientHeight * 0.5,
+ scene.canvas.clientHeight * 0.5
);
const p = camera.pickEllipsoid(windowCoord);
expect(p).toBeUndefined();
@@ -3153,7 +3153,7 @@ describe("Scene/Camera", function () {
it("get pick ray returns undefined if the Scene is not fully rendered", function () {
const windowCoord = new Cartesian2(
scene.canvas.clientWidth / 2,
- scene.canvas.clientHeight,
+ scene.canvas.clientHeight
);
scene.canvas.clientWidth = 0;
@@ -3164,7 +3164,7 @@ describe("Scene/Camera", function () {
it("get pick ray perspective", function () {
const windowCoord = new Cartesian2(
scene.canvas.clientWidth / 2,
- scene.canvas.clientHeight,
+ scene.canvas.clientHeight
);
const ray = camera.getPickRay(windowCoord);
@@ -3172,12 +3172,12 @@ describe("Scene/Camera", function () {
camera.frustum.near * Math.tan(camera.frustum.fovy * 0.5);
const expectedDirection = Cartesian3.normalize(
new Cartesian3(0.0, -windowHeight, -1.0),
- new Cartesian3(),
+ new Cartesian3()
);
expect(ray.origin).toEqual(camera.position);
expect(ray.direction).toEqualEpsilon(
expectedDirection,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -3195,7 +3195,7 @@ describe("Scene/Camera", function () {
const windowCoord = new Cartesian2(
(3.0 / 5.0) * scene.canvas.clientWidth,
- (1.0 - 3.0 / 5.0) * scene.canvas.clientHeight,
+ (1.0 - 3.0 / 5.0) * scene.canvas.clientHeight
);
const ray = camera.getPickRay(windowCoord);
@@ -3203,7 +3203,7 @@ describe("Scene/Camera", function () {
const expectedPosition = new Cartesian3(
cameraPosition.z,
cameraPosition.x + 2.0,
- cameraPosition.y + 2.0,
+ cameraPosition.y + 2.0
);
expect(ray.origin).toEqualEpsilon(expectedPosition, CesiumMath.EPSILON14);
expect(ray.direction).toEqual(camera.directionWC);
@@ -3224,7 +3224,7 @@ describe("Scene/Camera", function () {
const windowCoord = new Cartesian2(
(3.0 / 5.0) * scene.canvas.clientWidth,
- (1.0 - 3.0 / 5.0) * scene.canvas.clientHeight,
+ (1.0 - 3.0 / 5.0) * scene.canvas.clientHeight
);
const ray = camera.getPickRay(windowCoord);
@@ -3232,7 +3232,7 @@ describe("Scene/Camera", function () {
const expectedPosition = new Cartesian3(
cameraPosition.x + 2.0,
cameraPosition.y + 2,
- cameraPosition.z,
+ cameraPosition.z
);
expect(ray.origin).toEqualEpsilon(expectedPosition, CesiumMath.EPSILON14);
expect(ray.direction).toEqual(camera.directionWC);
@@ -3253,7 +3253,7 @@ describe("Scene/Camera", function () {
const windowCoord = new Cartesian2(
(3.0 / 5.0) * scene.canvas.clientWidth,
- (1.0 - 3.0 / 5.0) * scene.canvas.clientHeight,
+ (1.0 - 3.0 / 5.0) * scene.canvas.clientHeight
);
const ray = camera.getPickRay(windowCoord);
@@ -3261,7 +3261,7 @@ describe("Scene/Camera", function () {
const expectedPosition = new Cartesian3(
cameraPosition.z,
cameraPosition.x + 2.0,
- cameraPosition.y + 2,
+ cameraPosition.y + 2
);
expect(ray.origin).toEqualEpsilon(expectedPosition, CesiumMath.EPSILON14);
expect(ray.direction).toEqual(camera.directionWC);
@@ -3295,7 +3295,7 @@ describe("Scene/Camera", function () {
it("gets magnitude in 3D", function () {
expect(camera.getMagnitude()).toEqual(
- Cartesian3.magnitude(camera.position),
+ Cartesian3.magnitude(camera.position)
);
});
@@ -3322,7 +3322,7 @@ describe("Scene/Camera", function () {
camera.update(SceneMode.SCENE2D);
const max = scene.mapProjection.project(
- new Cartographic(Math.PI, CesiumMath.PI_OVER_TWO),
+ new Cartographic(Math.PI, CesiumMath.PI_OVER_TWO)
);
const factor = 1000.0;
const dx = max.x * factor;
@@ -3345,13 +3345,13 @@ describe("Scene/Camera", function () {
camera.position = Cartesian3.multiplyByScalar(
Cartesian3.UNIT_Z,
maxRadii * 5.0,
- new Cartesian3(),
+ new Cartesian3()
);
camera.update(SceneMode.COLUMBUS_VIEW);
const max = scene.mapProjection.project(
- new Cartographic(Math.PI, CesiumMath.PI_OVER_TWO),
+ new Cartographic(Math.PI, CesiumMath.PI_OVER_TWO)
);
const factor = 1000.0;
const dx = max.x * factor;
@@ -3405,11 +3405,11 @@ describe("Scene/Camera", function () {
mercatorCamera.position = Cartesian3.multiplyByScalar(
Cartesian3.UNIT_Z,
maxRadii * 5.0,
- new Cartesian3(),
+ new Cartesian3()
);
const max = projection.project(
- new Cartographic(Math.PI, CesiumMath.PI_OVER_TWO),
+ new Cartographic(Math.PI, CesiumMath.PI_OVER_TWO)
);
const factor = 1000.0;
const dx = max.x * factor;
@@ -3428,11 +3428,11 @@ describe("Scene/Camera", function () {
expect(mercatorCamera.position.x).toEqualEpsilon(
max.x,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(mercatorCamera.position.y).toEqualEpsilon(
max.y,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
mercatorCamera.moveDown(dy);
@@ -3447,11 +3447,11 @@ describe("Scene/Camera", function () {
expect(mercatorCamera.position.x).toEqualEpsilon(
-max.x,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
expect(mercatorCamera.position.y).toEqualEpsilon(
-max.y,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
});
@@ -3500,7 +3500,7 @@ describe("Scene/Camera", function () {
expect(passedOptions.pitchAdjustHeight).toBe(options.pitchAdjustHeight);
expect(passedOptions.flyOverLongitude).toBe(options.flyOverLongitude);
expect(passedOptions.flyOverLongitudeWeight).toBe(
- options.flyOverLongitudeWeight,
+ options.flyOverLongitudeWeight
);
});
@@ -3617,25 +3617,25 @@ describe("Scene/Camera", function () {
new Cartesian3(
2515865.110478756,
-19109892.759980734,
- 13550929.353715947,
+ 13550929.353715947
),
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(camera.direction).toEqualEpsilon(
new Cartesian3(
-0.10654051334260287,
0.8092555423939248,
- -0.5777149696185906,
+ -0.5777149696185906
),
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(camera.up).toEqualEpsilon(
new Cartesian3(
-0.07540693517283716,
0.5727725379670786,
- 0.8162385765685121,
+ 0.8162385765685121
),
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
});
@@ -3649,11 +3649,11 @@ describe("Scene/Camera", function () {
camera.flyHome(0);
expect(camera.position).toEqualEpsilon(
new Cartesian3(-9183857.990445068, 3896182.1777645755, 1.0),
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(camera.direction).toEqualEpsilon(
new Cartesian3(0, 0, -1),
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(camera.up).toEqualEpsilon(Cartesian3.UNIT_Y, CesiumMath.EPSILON8);
});
@@ -3669,15 +3669,15 @@ describe("Scene/Camera", function () {
camera.flyHome(0);
expect(camera.position).toEqualEpsilon(
new Cartesian3(0, -22550119.620184112, 22550119.62018411),
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(camera.direction).toEqualEpsilon(
new Cartesian3(0, sq2Over2, -sq2Over2),
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(camera.up).toEqualEpsilon(
new Cartesian3(0, sq2Over2, sq2Over2),
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
});
@@ -3686,7 +3686,7 @@ describe("Scene/Camera", function () {
const sphere = new BoundingSphere(
Cartesian3.fromDegrees(-117.16, 32.71, 0.0),
- 10000.0,
+ 10000.0
);
camera.viewBoundingSphere(sphere);
camera._setTransform(Matrix4.IDENTITY);
@@ -3705,11 +3705,11 @@ describe("Scene/Camera", function () {
const sphere = new BoundingSphere(
Cartesian3.fromDegrees(-117.16, 32.71, 0.0),
- 10.0,
+ 10.0
);
camera.viewBoundingSphere(
sphere,
- new HeadingPitchRange(heading, pitch, range),
+ new HeadingPitchRange(heading, pitch, range)
);
camera._setTransform(Matrix4.IDENTITY);
@@ -3729,7 +3729,7 @@ describe("Scene/Camera", function () {
const sphere = new BoundingSphere(
Cartesian3.fromDegrees(-117.16, 32.71, 0.0),
- 10.0,
+ 10.0
);
camera.viewBoundingSphere(sphere, offset);
camera._setTransform(Matrix4.IDENTITY);
@@ -3753,7 +3753,7 @@ describe("Scene/Camera", function () {
const sphere = new BoundingSphere(
Cartesian3.fromDegrees(-117.16, 32.71, 0.0),
- 10000.0,
+ 10000.0
);
camera.viewBoundingSphere(sphere);
camera._setTransform(Matrix4.IDENTITY);
@@ -3778,7 +3778,7 @@ describe("Scene/Camera", function () {
const sphere = new BoundingSphere(
Cartesian3.fromDegrees(-117.16, 32.71, 0.0),
- 10000.0,
+ 10000.0
);
camera.viewBoundingSphere(sphere);
camera._setTransform(Matrix4.IDENTITY);
@@ -3813,7 +3813,7 @@ describe("Scene/Camera", function () {
const sphere = new BoundingSphere(
Cartesian3.fromDegrees(-117.16, 32.71, 0.0),
- 100000.0,
+ 100000.0
);
camera.flyToBoundingSphere(sphere);
@@ -3825,7 +3825,7 @@ describe("Scene/Camera", function () {
const sphere = new BoundingSphere(
Cartesian3.fromDegrees(-117.16, 32.71, 0.0),
- 10000.0,
+ 10000.0
);
camera.flyToBoundingSphere(sphere, {
duration: 0.0,
@@ -3843,7 +3843,7 @@ describe("Scene/Camera", function () {
const sphere = new BoundingSphere(
Cartesian3.fromDegrees(-117.16, 32.71, 0.0),
- 10.0,
+ 10.0
);
camera.flyToBoundingSphere(sphere, {
@@ -3861,7 +3861,7 @@ describe("Scene/Camera", function () {
const sphere = new BoundingSphere(
Cartesian3.fromDegrees(-117.16, 32.71, 0.0),
- 100000,
+ 100000
);
camera.flyToBoundingSphere(sphere, {
@@ -3880,7 +3880,7 @@ describe("Scene/Camera", function () {
const sphere = new BoundingSphere(
Cartesian3.fromDegrees(-117.16, 32.71, 0.0),
- 100000.0,
+ 100000.0
);
camera.flyToBoundingSphere(sphere, options);
@@ -3923,14 +3923,14 @@ describe("Scene/Camera", function () {
drawingBufferHeight,
distance,
scene.pixelRatio,
- new Cartesian2(),
+ new Cartesian2()
);
const expectedPixelSize = Math.max(pixelDimensions.x, pixelDimensions.y);
const pixelSize = camera.getPixelSize(
sphere,
drawingBufferWidth,
- drawingBufferHeight,
+ drawingBufferHeight
);
expect(pixelSize).toEqual(expectedPixelSize);
@@ -3975,14 +3975,14 @@ describe("Scene/Camera", function () {
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
const correctResult = new Rectangle(
-0.05789100547374969,
-0.04365869998457809,
0.05789100547374969,
- 0.04365869998457809,
+ 0.04365869998457809
);
const rect = camera.computeViewRectangle();
@@ -4000,14 +4000,14 @@ describe("Scene/Camera", function () {
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
const correctResult = new Rectangle(
-CesiumMath.PI,
1.4961779388065022,
CesiumMath.PI,
- CesiumMath.PI_OVER_TWO,
+ CesiumMath.PI_OVER_TWO
);
const rect = camera.computeViewRectangle();
@@ -4025,14 +4025,14 @@ describe("Scene/Camera", function () {
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
const correctResult = new Rectangle(
3.0837016481160435,
-0.04365869998457809,
-3.0837016481160435,
- 0.04365869998457809,
+ 0.04365869998457809
);
const rect = camera.computeViewRectangle();
@@ -4051,7 +4051,7 @@ describe("Scene/Camera", function () {
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
const rect = camera.computeViewRectangle();
@@ -4070,7 +4070,7 @@ describe("Scene/Camera", function () {
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
const rect = camera.computeViewRectangle();
@@ -4104,7 +4104,7 @@ describe("Scene/Camera", function () {
expect(
tweenSpy.calls
.mostRecent()
- .args[1].destination.equalsEpsilon(expectedDestination, 0.1),
+ .args[1].destination.equalsEpsilon(expectedDestination, 0.1)
).toBe(true);
});
@@ -4126,7 +4126,7 @@ describe("Scene/Camera", function () {
expect(
tweenSpy.calls
.mostRecent()
- .args[1].destination.equalsEpsilon(expectedDestination, 0.1),
+ .args[1].destination.equalsEpsilon(expectedDestination, 0.1)
).toBe(true);
});
@@ -4148,7 +4148,7 @@ describe("Scene/Camera", function () {
expect(
tweenSpy.calls
.mostRecent()
- .args[1].destination.equalsEpsilon(expectedDestination, 0.1),
+ .args[1].destination.equalsEpsilon(expectedDestination, 0.1)
).toBe(true);
});
@@ -4178,7 +4178,7 @@ describe("Scene/Camera", function () {
expect(camera.up).toEqualEpsilon(up, CesiumMath.EPSILON6);
expect(camera.position).toEqualEpsilon(
expectedDestination,
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
});
@@ -4199,7 +4199,7 @@ describe("Scene/Camera", function () {
expect(
tweenSpy.calls
.mostRecent()
- .args[1].destination.equalsEpsilon(expectedDestination, 0.1),
+ .args[1].destination.equalsEpsilon(expectedDestination, 0.1)
).toBe(true);
});
@@ -4220,7 +4220,7 @@ describe("Scene/Camera", function () {
expect(
tweenSpy.calls
.mostRecent()
- .args[1].destination.equalsEpsilon(expectedDestination, 0.1),
+ .args[1].destination.equalsEpsilon(expectedDestination, 0.1)
).toBe(true);
});
@@ -4240,7 +4240,7 @@ describe("Scene/Camera", function () {
expect(
tweenSpy.calls
.mostRecent()
- .args[1].destination.equalsEpsilon(expectedDestination, 0.1),
+ .args[1].destination.equalsEpsilon(expectedDestination, 0.1)
).toBe(true);
});
@@ -4298,15 +4298,15 @@ describe("Scene/Camera", function () {
camera.lookAtTransform(transform);
expect(Cartesian3.magnitude(camera.directionWC)).toEqualEpsilon(
1.0,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(Cartesian3.magnitude(camera.rightWC)).toEqualEpsilon(
1.0,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(Cartesian3.magnitude(camera.upWC)).toEqualEpsilon(
1.0,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -4320,7 +4320,7 @@ describe("Scene/Camera", function () {
camera._updateCameraChanged();
expect(camera.positionWCDeltaMagnitude).toEqualEpsilon(
moveAmount,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.positionWCDeltaMagnitudeLastFrame).toEqual(0);
@@ -4328,7 +4328,7 @@ describe("Scene/Camera", function () {
expect(camera.positionWCDeltaMagnitude).toEqual(0);
expect(camera.positionWCDeltaMagnitudeLastFrame).toEqualEpsilon(
moveAmount,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
});
diff --git a/packages/engine/Specs/Scene/Cesium3DTileBatchTableSpec.js b/packages/engine/Specs/Scene/Cesium3DTileBatchTableSpec.js
index 04b4f5370fc5..c892ab3bdd64 100644
--- a/packages/engine/Specs/Scene/Cesium3DTileBatchTableSpec.js
+++ b/packages/engine/Specs/Scene/Cesium3DTileBatchTableSpec.js
@@ -240,7 +240,7 @@ xdescribe(
const batchTable = new Cesium3DTileBatchTable(
mockTileset,
1,
- batchTableJson,
+ batchTableJson
);
expect(batchTable.hasProperty(0, "height")).toEqual(true);
expect(batchTable.hasProperty(0, "id")).toEqual(false);
@@ -279,7 +279,7 @@ xdescribe(
const batchTable = new Cesium3DTileBatchTable(
mockTileset,
1,
- batchTableJson,
+ batchTableJson
);
const results = [];
const names = batchTable.getPropertyIds(0, results);
@@ -357,7 +357,7 @@ xdescribe(
const batchTable = new Cesium3DTileBatchTable(
mockTileset,
2,
- batchTableJson,
+ batchTableJson
);
batchTable.setProperty(0, "height", 3.0);
@@ -375,7 +375,7 @@ xdescribe(
const batchTable = new Cesium3DTileBatchTable(
mockTileset,
2,
- batchTableJson,
+ batchTableJson
);
batchTable.setProperty(0, "info", { name: "building0_new", year: 2002 });
@@ -399,7 +399,7 @@ xdescribe(
const batchTable = new Cesium3DTileBatchTable(
mockTileset,
2,
- batchTableJson,
+ batchTableJson
);
batchTable.setProperty(0, "rooms", ["room1_new", "room2"]);
@@ -423,7 +423,7 @@ xdescribe(
mockTileset,
2,
batchTableJson,
- batchTableBinary,
+ batchTableBinary
);
}).toThrowError(RuntimeError);
});
@@ -441,7 +441,7 @@ xdescribe(
mockTileset,
2,
batchTableJson,
- batchTableBinary,
+ batchTableBinary
);
}).toThrowError(RuntimeError);
});
@@ -464,17 +464,78 @@ xdescribe(
const propertyVec2Binary = new Float32Array([2, 3, 4, 5]);
const propertyVec3Binary = new Int32Array([6, 7, 8, 9, 10, 11]);
const propertyVec4Binary = new Uint32Array([
- 12, 13, 14, 15, 16, 17, 18, 19,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
]);
const propertyMat2Binary = new Int16Array([
- 20, 21, 22, 23, 24, 25, 26, 27,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26,
+ 27,
]);
const propertyMat3Binary = new Uint16Array([
- 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
+ 28,
+ 29,
+ 30,
+ 31,
+ 32,
+ 33,
+ 34,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
]);
const propertyMat4Binary = new Uint8Array([
- 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ 46,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51,
+ 52,
+ 53,
+ 54,
+ 55,
+ 56,
+ 57,
+ 58,
+ 59,
+ 60,
+ 61,
+ 62,
+ 63,
+ 64,
+ 65,
+ 66,
+ 67,
+ 68,
+ 69,
+ 70,
+ 71,
+ 72,
+ 73,
+ 74,
+ 75,
+ 76,
+ 77,
]);
const buffers = [
@@ -529,24 +590,24 @@ xdescribe(
mockTileset,
2,
batchTableJson,
- batchTableBinary,
+ batchTableBinary
);
expect(batchTable.getProperty(1, "propertyScalar")).toEqual(1);
expect(batchTable.getProperty(1, "propertyVec2")).toEqual(
- new Cartesian2(4, 5),
+ new Cartesian2(4, 5)
);
expect(batchTable.getProperty(1, "propertyVec3")).toEqual(
- new Cartesian3(9, 10, 11),
+ new Cartesian3(9, 10, 11)
);
expect(batchTable.getProperty(1, "propertyVec4")).toEqual(
- new Cartesian4(16, 17, 18, 19),
+ new Cartesian4(16, 17, 18, 19)
);
expect(batchTable.getProperty(1, "propertyMat2")).toEqual(
- new Matrix2(24, 26, 25, 27),
+ new Matrix2(24, 26, 25, 27)
); // Constructor is row-major, data is column major
expect(batchTable.getProperty(1, "propertyMat3")).toEqual(
- new Matrix3(37, 40, 43, 38, 41, 44, 39, 42, 45),
+ new Matrix3(37, 40, 43, 38, 41, 44, 39, 42, 45)
); // Constructor is row-major, data is column major
expect(batchTable.getProperty(1, "propertyMat4")).toEqual(
new Matrix4(
@@ -565,8 +626,8 @@ xdescribe(
65,
69,
73,
- 77,
- ),
+ 77
+ )
); // Constructor is row-major, data is column major
batchTable.setProperty(1, "propertyScalar", 2);
@@ -577,7 +638,7 @@ xdescribe(
batchTable.setProperty(
1,
"propertyMat3",
- new Matrix3(38, 41, 44, 39, 42, 45, 40, 43, 46),
+ new Matrix3(38, 41, 44, 39, 42, 45, 40, 43, 46)
);
batchTable.setProperty(
1,
@@ -598,25 +659,25 @@ xdescribe(
66,
70,
74,
- 78,
- ),
+ 78
+ )
);
expect(batchTable.getProperty(1, "propertyScalar")).toEqual(2);
expect(batchTable.getProperty(1, "propertyVec2")).toEqual(
- new Cartesian2(5, 6),
+ new Cartesian2(5, 6)
);
expect(batchTable.getProperty(1, "propertyVec3")).toEqual(
- new Cartesian3(10, 11, 12),
+ new Cartesian3(10, 11, 12)
);
expect(batchTable.getProperty(1, "propertyVec4")).toEqual(
- new Cartesian4(17, 18, 19, 20),
+ new Cartesian4(17, 18, 19, 20)
);
expect(batchTable.getProperty(1, "propertyMat2")).toEqual(
- new Matrix2(25, 27, 26, 28),
+ new Matrix2(25, 27, 26, 28)
);
expect(batchTable.getProperty(1, "propertyMat3")).toEqual(
- new Matrix3(38, 41, 44, 39, 42, 45, 40, 43, 46),
+ new Matrix3(38, 41, 44, 39, 42, 45, 40, 43, 46)
);
expect(batchTable.getProperty(1, "propertyMat4")).toEqual(
new Matrix4(
@@ -635,8 +696,8 @@ xdescribe(
66,
70,
74,
- 78,
- ),
+ 78
+ )
);
});
@@ -663,7 +724,7 @@ xdescribe(
});
Cesium3DTilesTester.expectRenderTileset(scene, tileset);
- },
+ }
);
});
@@ -675,7 +736,7 @@ xdescribe(
expect(content.getFeature(2).getProperty("id")).toBeUndefined();
Cesium3DTilesTester.expectRenderTileset(scene, tileset);
- },
+ }
);
});
@@ -690,9 +751,8 @@ xdescribe(
Cesium3DTilesTester.expectRenderTileset(scene, tileset);
// Re-enable VTF
- ContextLimits._maximumVertexTextureImageUnits =
- maximumVertexTextureImageUnits;
- },
+ ContextLimits._maximumVertexTextureImageUnits = maximumVertexTextureImageUnits;
+ }
);
});
@@ -705,13 +765,13 @@ xdescribe(
function (tileset) {
const content = tileset.root.content;
expect(content.featuresLength).toBeGreaterThan(
- ContextLimits._maximumTextureSize,
+ ContextLimits._maximumTextureSize
);
Cesium3DTilesTester.expectRenderTileset(scene, tileset);
// Reset maximum texture size
ContextLimits._maximumTextureSize = maximumTextureSize;
- },
+ }
);
});
@@ -724,7 +784,7 @@ xdescribe(
expect(result).toBeDefined();
expect(result.primitive).toBe(tileset);
});
- },
+ }
);
});
@@ -762,7 +822,7 @@ xdescribe(
return Cesium3DTilesTester.loadTileset(scene, withoutBatchTableUrl).then(
function (tileset) {
expectRenderTranslucent(tileset);
- },
+ }
);
});
@@ -775,9 +835,8 @@ xdescribe(
function (tileset) {
expectRenderTranslucent(tileset);
// Re-enable VTF
- ContextLimits._maximumVertexTextureImageUnits =
- maximumVertexTextureImageUnits;
- },
+ ContextLimits._maximumVertexTextureImageUnits = maximumVertexTextureImageUnits;
+ }
);
});
@@ -1054,21 +1113,21 @@ xdescribe(
}
function checkBatchTableHierarchy(url, multipleParents) {
- return Cesium3DTilesTester.loadTileset(scene, url).then(
- function (tileset) {
- checkHierarchyStyling(tileset);
- checkHierarchyProperties(tileset, multipleParents);
- },
- );
+ return Cesium3DTilesTester.loadTileset(scene, url).then(function (
+ tileset
+ ) {
+ checkHierarchyStyling(tileset);
+ checkHierarchyProperties(tileset, multipleParents);
+ });
}
function checkBatchTableHierarchyNoParents(url) {
- return Cesium3DTilesTester.loadTileset(scene, url).then(
- function (tileset) {
- checkHierarchyStylingNoParents(tileset);
- checkHierarchyPropertiesNoParents(tileset);
- },
- );
+ return Cesium3DTilesTester.loadTileset(scene, url).then(function (
+ tileset
+ ) {
+ checkHierarchyStylingNoParents(tileset);
+ checkHierarchyPropertiesNoParents(tileset);
+ });
}
it("renders tileset with batch table hierarchy extension", function () {
@@ -1082,7 +1141,7 @@ xdescribe(
it("renders tileset with batch table hierarchy with multiple parent classes", function () {
return checkBatchTableHierarchy(
batchTableHierarchyMultipleParentsUrl,
- true,
+ true
);
});
@@ -1098,7 +1157,7 @@ xdescribe(
return checkBatchTableHierarchy(batchTableHierarchyLegacyUrl, false).then(
function (tileset) {
expect(Cesium3DTileBatchTable._deprecationWarning).toHaveBeenCalled();
- },
+ }
);
});
@@ -1113,7 +1172,7 @@ xdescribe(
scene.pickForSpecs();
const batchTextureSize = batchTable._batchTexture.byteLength;
expect(batchTable.batchTableByteLength).toBe(batchTextureSize);
- },
+ }
);
});
@@ -1128,28 +1187,28 @@ xdescribe(
scene.pickForSpecs();
const batchTextureSize = batchTable._batchTexture.byteLength;
expect(batchTable.batchTableByteLength).toBe(batchTextureSize);
- },
+ }
);
});
it("computes batchTableByteLength for binary batch table", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- withBatchTableBinaryUrl,
+ withBatchTableBinaryUrl
).then(function (tileset) {
const content = tileset.root.content;
const batchTable = content.batchTable;
const binaryPropertiesByteLength =
batchTable._binaryPropertiesByteLength;
expect(batchTable.batchTableByteLength).toBe(
- binaryPropertiesByteLength,
+ binaryPropertiesByteLength
);
// The batch texture isn't created until the first pick pass
scene.pickForSpecs();
const batchTextureSize = batchTable._batchTexture.byteLength;
expect(batchTable.batchTableByteLength).toBe(
- binaryPropertiesByteLength + batchTextureSize,
+ binaryPropertiesByteLength + batchTextureSize
);
});
});
@@ -1157,7 +1216,7 @@ xdescribe(
it("computes batchTableByteLength with a batch table hierarchy", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- batchTableHierarchyUrl,
+ batchTableHierarchyUrl
).then(function (tileset) {
const content = tileset.root.content;
const batchTable = content.batchTable;
@@ -1168,7 +1227,7 @@ xdescribe(
scene.pickForSpecs();
const batchTextureSize = batchTable._batchTexture.byteLength;
expect(batchTable.batchTableByteLength).toBe(
- hierarchySize + batchTextureSize,
+ hierarchySize + batchTextureSize
);
});
});
@@ -1181,9 +1240,9 @@ xdescribe(
expect(batchTable.isDestroyed()).toEqual(false);
scene.primitives.remove(tileset);
expect(batchTable.isDestroyed()).toEqual(true);
- },
+ }
);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Cesium3DTileFeatureSpec.js b/packages/engine/Specs/Scene/Cesium3DTileFeatureSpec.js
index 2f45ed8cf0d3..aca4a2fe7a86 100644
--- a/packages/engine/Specs/Scene/Cesium3DTileFeatureSpec.js
+++ b/packages/engine/Specs/Scene/Cesium3DTileFeatureSpec.js
@@ -37,34 +37,34 @@ describe(
-0.01,
-0.01,
0.01,
- 0.01,
+ 0.01
);
const ellipsoid = Ellipsoid.WGS84;
scene.camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(tilesetRectangle)),
- new Cartesian3(0.0, 0.0, 0.01),
+ new Cartesian3(0.0, 0.0, 0.01)
);
return Cesium3DTilesTester.loadTileset(
scene,
vectorPolylinesWithBatchIds,
{
vectorKeepDecodedPositions: true,
- },
+ }
).then(function (tileset) {
const feature = tileset.root.children[0].content.getFeature(0);
const polylinePositions = feature.polylinePositions;
expect(polylinePositions.length).toBe(60);
expect(polylinePositions[0]).toEqualEpsilon(
6378136.806372941,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polylinePositions[1]).toEqualEpsilon(
-1113.194885441724,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polylinePositions[2]).toEqualEpsilon(
1105.675261474196,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
});
@@ -104,7 +104,7 @@ describe(
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithMetadataUrl,
+ tilesetWithMetadataUrl
).then(function (result) {
tileset = result;
});
@@ -134,14 +134,14 @@ describe(
it("getPropertyInherited returns content property by semantic", function () {
const feature = new Cesium3DTileFeature(childContents["ll.b3dm"], 0);
expect(feature.getPropertyInherited("HIGHLIGHT_COLOR")).toEqual(
- new Cartesian4(255, 0, 0, 1.0),
+ new Cartesian4(255, 0, 0, 1.0)
);
});
it("getPropertyInherited returns content property", function () {
const feature = new Cesium3DTileFeature(childContents["ll.b3dm"], 0);
expect(feature.getPropertyInherited("HIGHLIGHT_COLOR")).toEqual(
- new Cartesian4(255, 0, 0, 1.0),
+ new Cartesian4(255, 0, 0, 1.0)
);
expect(feature.getPropertyInherited("triangleCount")).toBe(15000);
});
@@ -149,14 +149,14 @@ describe(
it("getPropertyInherited returns tile property by semantic", function () {
const feature = new Cesium3DTileFeature(childContents["ll.b3dm"], 0);
expect(feature.getPropertyInherited("COLOR")).toEqual(
- new Cartesian4(255, 255, 0, 1.0),
+ new Cartesian4(255, 255, 0, 1.0)
);
});
it("getPropertyInherited returns tile property", function () {
const feature = new Cesium3DTileFeature(childContents["ll.b3dm"], 0);
expect(feature.getPropertyInherited("color")).toEqual(
- new Cartesian4(255, 255, 0, 1.0),
+ new Cartesian4(255, 255, 0, 1.0)
);
expect(feature.getPropertyInherited("population")).toBe(50);
});
@@ -164,7 +164,7 @@ describe(
it("getPropertyInherited returns default value", function () {
const feature = new Cesium3DTileFeature(childContents["ll.b3dm"], 0);
expect(feature.getPropertyInherited("defaultColor")).toEqual(
- new Cartesian4(255, 255, 255, 255),
+ new Cartesian4(255, 255, 255, 255)
);
});
@@ -173,7 +173,7 @@ describe(
expect(feature.getPropertyInherited("averageTemperature")).toEqual(24);
feature = new Cesium3DTileFeature(childContents["ur.b3dm"], 0);
expect(
- feature.getPropertyInherited("averageTemperature"),
+ feature.getPropertyInherited("averageTemperature")
).not.toBeDefined();
});
@@ -196,7 +196,7 @@ describe(
it("getPropertyInherited returns tileset property by semantic", function () {
const feature = new Cesium3DTileFeature(parentContent, 0);
expect(feature.getPropertyInherited("DATE_ISO_8601")).toBe(
- "2021-04-07",
+ "2021-04-07"
);
expect(feature.getPropertyInherited("AUTHOR")).toBe("Cesium");
});
@@ -207,8 +207,8 @@ describe(
new Cartesian3(
-1.3196816996258511,
0.6988767486400521,
- 45.78600543644279,
- ),
+ 45.78600543644279
+ )
);
expect(feature.getPropertyInherited("date")).toBe("2021-04-07");
expect(feature.getPropertyInherited("author")).toBe("Cesium");
@@ -220,7 +220,7 @@ describe(
// content metadata is more specific than tile metadata so this returns
// red not cyan
expect(feature.getPropertyInherited("highlightColor")).toEqual(
- new Cartesian4(255, 0, 0, 1.0),
+ new Cartesian4(255, 0, 0, 1.0)
);
// content metadata is more specific than tileset metadata so this returns
@@ -230,7 +230,7 @@ describe(
// tile metadata is more specific than tileset metadata so this returns
// yellow not magenta
expect(feature.getPropertyInherited("color")).toEqual(
- new Cartesian4(255, 255, 0, 1.0),
+ new Cartesian4(255, 255, 0, 1.0)
);
// group metadata is more specific than tileset metadata, so this returns
@@ -254,7 +254,7 @@ describe(
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithMetadataExtensionUrl,
+ tilesetWithMetadataExtensionUrl
).then(function (result) {
tileset = result;
});
@@ -284,14 +284,14 @@ describe(
it("getPropertyInherited returns content property by semantic", function () {
const feature = new Cesium3DTileFeature(childContents["ll.b3dm"], 0);
expect(feature.getPropertyInherited("HIGHLIGHT_COLOR")).toEqual(
- new Cartesian4(255, 0, 0, 1.0),
+ new Cartesian4(255, 0, 0, 1.0)
);
});
it("getPropertyInherited returns content property", function () {
const feature = new Cesium3DTileFeature(childContents["ll.b3dm"], 0);
expect(feature.getPropertyInherited("HIGHLIGHT_COLOR")).toEqual(
- new Cartesian4(255, 0, 0, 1.0),
+ new Cartesian4(255, 0, 0, 1.0)
);
expect(feature.getPropertyInherited("triangleCount")).toBe(15000);
});
@@ -299,14 +299,14 @@ describe(
it("getPropertyInherited returns tile property by semantic", function () {
const feature = new Cesium3DTileFeature(childContents["ll.b3dm"], 0);
expect(feature.getPropertyInherited("COLOR")).toEqual(
- new Cartesian4(255, 255, 0, 1.0),
+ new Cartesian4(255, 255, 0, 1.0)
);
});
it("getPropertyInherited returns tile property", function () {
const feature = new Cesium3DTileFeature(childContents["ll.b3dm"], 0);
expect(feature.getPropertyInherited("color")).toEqual(
- new Cartesian4(255, 255, 0, 1.0),
+ new Cartesian4(255, 255, 0, 1.0)
);
expect(feature.getPropertyInherited("population")).toBe(50);
});
@@ -314,7 +314,7 @@ describe(
it("getPropertyInherited returns default value", function () {
const feature = new Cesium3DTileFeature(childContents["ll.b3dm"], 0);
expect(feature.getPropertyInherited("defaultColor")).toEqual(
- new Cartesian4(255, 255, 255, 255),
+ new Cartesian4(255, 255, 255, 255)
);
});
@@ -337,7 +337,7 @@ describe(
it("getPropertyInherited returns tileset property by semantic", function () {
const feature = new Cesium3DTileFeature(parentContent, 0);
expect(feature.getPropertyInherited("DATE_ISO_8601")).toBe(
- "2021-04-07",
+ "2021-04-07"
);
expect(feature.getPropertyInherited("AUTHOR")).toBe("Cesium");
});
@@ -348,8 +348,8 @@ describe(
new Cartesian3(
-1.3196816996258511,
0.6988767486400521,
- 45.78600543644279,
- ),
+ 45.78600543644279
+ )
);
expect(feature.getPropertyInherited("date")).toBe("2021-04-07");
expect(feature.getPropertyInherited("author")).toBe("Cesium");
@@ -361,7 +361,7 @@ describe(
// content metadata is more specific than tile metadata so this returns
// red not cyan
expect(feature.getPropertyInherited("highlightColor")).toEqual(
- new Cartesian4(255, 0, 0, 1.0),
+ new Cartesian4(255, 0, 0, 1.0)
);
// content metadata is more specific than tileset metadata so this returns
@@ -371,7 +371,7 @@ describe(
// tile metadata is more specific than tileset metadata so this returns
// yellow not magenta
expect(feature.getPropertyInherited("color")).toEqual(
- new Cartesian4(255, 255, 0, 1.0),
+ new Cartesian4(255, 255, 0, 1.0)
);
// group metadata is more specific than tileset metadata, so this returns
@@ -392,13 +392,13 @@ describe(
const center = Cartesian3.fromRadians(
centerLongitude,
- centerLatitude,
+ centerLatitude
);
scene.camera.lookAt(center, new HeadingPitchRange(0.0, -1.57, 15.0));
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithSubtreeMetadataUrl,
+ tilesetWithSubtreeMetadataUrl
).then(function (result) {
tilesetWithSubtree = result;
});
@@ -436,7 +436,7 @@ describe(
it("getPropertyInherited returns subtree property by semantic at child level", function () {
const feature = new Cesium3DTileFeature(
subtreeChildContents["content/1/0/0.b3dm"],
- 0,
+ 0
);
expect(feature.getPropertyInherited("AUTHOR")).toEqual("Cesium");
});
@@ -444,7 +444,7 @@ describe(
it("getPropertyInherited returns subtree property at root level", function () {
const feature = new Cesium3DTileFeature(
subtreeChildContents["content/1/0/0.b3dm"],
- 0,
+ 0
);
expect(feature.getPropertyInherited("author")).toEqual("Cesium");
expect(feature.getPropertyInherited("credits")).toEqual([
@@ -463,7 +463,7 @@ describe(
it("getPropertyInherited returns tile property that is shared by subtree at child level", function () {
const childFeature = new Cesium3DTileFeature(
subtreeChildContents["content/1/0/0.b3dm"],
- 0,
+ 0
);
const rootFeature = new Cesium3DTileFeature(subtreeRootContent, 0);
@@ -489,12 +489,12 @@ describe(
const center = Cartesian3.fromRadians(
centerLongitude,
- centerLatitude,
+ centerLatitude
);
scene.camera.lookAt(center, new HeadingPitchRange(0.0, -1.57, 15.0));
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithImplicitContentMetadataUrl,
+ tilesetWithImplicitContentMetadataUrl
).then(function (result) {
tilesetWithImplicitContentMetadata = result;
});
@@ -518,13 +518,13 @@ describe(
const rootFeature = new Cesium3DTileFeature(subtreeRootContent, 0);
const childFeature = new Cesium3DTileFeature(
subtreeChildContents["content/1/0/0.b3dm"],
- 0,
+ 0
);
expect(rootFeature.getPropertyInherited("_BUILDING_HEIGHT")).toEqual(
- 10,
+ 10
);
expect(childFeature.getPropertyInherited("_BUILDING_HEIGHT")).toEqual(
- 20,
+ 20
);
});
@@ -532,45 +532,45 @@ describe(
const rootFeature = new Cesium3DTileFeature(subtreeRootContent, 0);
expect(rootFeature.getPropertyInherited("height")).toEqual(10);
expect(rootFeature.getPropertyInherited("color")).toEqual(
- new Cartesian3(255, 255, 255),
+ new Cartesian3(255, 255, 255)
);
});
it("getPropertyInherited returns content property by semantic for different contents", function () {
const childFeature = new Cesium3DTileFeature(
subtreeChildContents["content/1/0/0.b3dm"],
- 0,
+ 0
);
const secondChildFeature = new Cesium3DTileFeature(
subtreeChildContents["content/1/1/1.b3dm"],
- 0,
+ 0
);
expect(childFeature.getPropertyInherited("_BUILDING_HEIGHT")).toEqual(
- 20,
+ 20
);
expect(
- secondChildFeature.getPropertyInherited("_BUILDING_HEIGHT"),
+ secondChildFeature.getPropertyInherited("_BUILDING_HEIGHT")
).toEqual(40);
});
it("getPropertyInherited returns content property for different contents", function () {
const childFeature = new Cesium3DTileFeature(
subtreeChildContents["content/1/0/0.b3dm"],
- 0,
+ 0
);
const secondChildFeature = new Cesium3DTileFeature(
subtreeChildContents["content/1/1/1.b3dm"],
- 0,
+ 0
);
expect(childFeature.getPropertyInherited("height")).toEqual(20);
expect(secondChildFeature.getPropertyInherited("height")).toEqual(40);
expect(childFeature.getPropertyInherited("color")).toEqual(
- new Cartesian3(255, 0, 0),
+ new Cartesian3(255, 0, 0)
);
expect(secondChildFeature.getPropertyInherited("color")).toEqual(
- new Cartesian3(0, 0, 255),
+ new Cartesian3(0, 0, 255)
);
});
@@ -582,5 +582,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Cesium3DTileFeatureTableSpec.js b/packages/engine/Specs/Scene/Cesium3DTileFeatureTableSpec.js
index cb814fb32fc9..20bf100afb6e 100644
--- a/packages/engine/Specs/Scene/Cesium3DTileFeatureTableSpec.js
+++ b/packages/engine/Specs/Scene/Cesium3DTileFeatureTableSpec.js
@@ -11,7 +11,7 @@ describe("Scene/Cesium3DTileFeatureTable", function () {
const all = featureTable.getGlobalProperty(
"TEST",
- ComponentDatatype.UNSIGNED_BYTE,
+ ComponentDatatype.UNSIGNED_BYTE
);
expect(all).toEqual([0, 1, 2, 3, 4, 5]);
const feature = featureTable.getProperty(
@@ -19,13 +19,13 @@ describe("Scene/Cesium3DTileFeatureTable", function () {
ComponentDatatype.UNSIGNED_BYTE,
2,
1,
- new Array(2),
+ new Array(2)
);
expect(feature).toEqual([2, 3]);
const properties = featureTable.getPropertyArray(
"TEST",
ComponentDatatype.UNSIGNED_BYTE,
- 2,
+ 2
);
expect(properties).toEqual([0, 1, 2, 3, 4, 5]);
});
@@ -37,7 +37,7 @@ describe("Scene/Cesium3DTileFeatureTable", function () {
byteOffset: 4,
},
},
- new Uint8Array([0, 0, 0, 0, 0, 1, 2, 3, 4, 5]),
+ new Uint8Array([0, 0, 0, 0, 0, 1, 2, 3, 4, 5])
);
featureTable.featuresLength = 3;
@@ -46,7 +46,7 @@ describe("Scene/Cesium3DTileFeatureTable", function () {
const all = featureTable.getGlobalProperty(
"TEST",
ComponentDatatype.UNSIGNED_BYTE,
- 6,
+ 6
);
expect(all).toEqual([0, 1, 2, 3, 4, 5]);
const feature = featureTable.getProperty(
@@ -54,13 +54,13 @@ describe("Scene/Cesium3DTileFeatureTable", function () {
ComponentDatatype.UNSIGNED_BYTE,
2,
1,
- new Array(2),
+ new Array(2)
);
expect(feature).toEqual([2, 3]);
const properties = featureTable.getPropertyArray(
"TEST",
ComponentDatatype.UNSIGNED_BYTE,
- 2,
+ 2
);
expect(properties).toEqual([0, 1, 2, 3, 4, 5]);
});
diff --git a/packages/engine/Specs/Scene/Cesium3DTileSpec.js b/packages/engine/Specs/Scene/Cesium3DTileSpec.js
index 48f036cef4d8..cb5270986461 100644
--- a/packages/engine/Specs/Scene/Cesium3DTileSpec.js
+++ b/packages/engine/Specs/Scene/Cesium3DTileSpec.js
@@ -135,12 +135,12 @@ describe(
const transformCenter = Cartesian3.fromRadians(
longitude,
latitude,
- height,
+ height
);
const hpr = new HeadingPitchRoll();
const transformMatrix = Transforms.headingPitchRollToFixedFrame(
transformCenter,
- hpr,
+ hpr
);
return Matrix4.pack(transformMatrix, new Array(16));
}
@@ -150,7 +150,7 @@ describe(
mockTileset,
"/some_url",
tileWithBoundingSphere,
- undefined,
+ undefined
);
expect(tile.isDestroyed()).toEqual(false);
tile.destroy();
@@ -165,7 +165,7 @@ describe(
mockTileset,
"/some_url",
tileWithoutBoundingVolume,
- undefined,
+ undefined
);
}).toThrowError(RuntimeError);
});
@@ -178,7 +178,7 @@ describe(
mockTileset,
"/some_url",
tileWithoutBoundingVolume,
- undefined,
+ undefined
);
}).toThrowError(RuntimeError);
});
@@ -191,7 +191,7 @@ describe(
mockTileset,
"/some_url",
header,
- undefined,
+ undefined
);
expect(tile.refine).toBe(Cesium3DTileRefine.REPLACE);
expect(Cesium3DTile._deprecationWarning).toHaveBeenCalled();
@@ -204,7 +204,7 @@ describe(
mockTileset,
"/some_url",
header,
- undefined,
+ undefined
);
expect(tile.content).toBeDefined();
expect(tile.content).toBeInstanceOf(Empty3DTileContent);
@@ -221,13 +221,13 @@ describe(
mockTileset,
"/some_url",
tileWithBoundingSphere,
- undefined,
+ undefined
);
const child = new Cesium3DTile(
mockTileset,
"/some_url",
geometricErrorMissing,
- parent,
+ parent
);
expect(child.geometricError).toBe(parent.geometricError);
expect(child.geometricError).toBe(1);
@@ -236,7 +236,7 @@ describe(
mockTileset,
"/some_url",
geometricErrorMissing,
- undefined,
+ undefined
);
expect(tile.geometricError).toBe(mockTileset._geometricError);
expect(tile.geometricError).toBe(2);
@@ -250,7 +250,7 @@ describe(
mockTileset,
"/some_url",
tileWithBoundingSphere,
- undefined,
+ undefined
);
expect(tile.boundingVolume).toBeDefined();
expect(tile.contentBoundingVolume).toBe(tile.boundingVolume);
@@ -261,13 +261,13 @@ describe(
mockTileset,
"/some_url",
tileWithBoundingSphere,
- undefined,
+ undefined
);
const radius = tileWithBoundingSphere.boundingVolume.sphere[3];
expect(tile.boundingVolume).toBeDefined();
expect(tile.boundingVolume.boundingVolume.radius).toEqual(radius);
expect(tile.boundingVolume.boundingVolume.center).toEqual(
- Cartesian3.ZERO,
+ Cartesian3.ZERO
);
});
@@ -276,16 +276,16 @@ describe(
mockTileset,
"/some_url",
tileWithContentBoundingSphere,
- undefined,
+ undefined
);
const radius =
tileWithContentBoundingSphere.content.boundingVolume.sphere[3];
expect(tile.contentBoundingVolume).toBeDefined();
expect(tile.contentBoundingVolume.boundingVolume.radius).toEqual(
- radius,
+ radius
);
expect(tile.contentBoundingVolume.boundingVolume.center).toEqual(
- new Cartesian3(0.0, 0.0, 1.0),
+ new Cartesian3(0.0, 0.0, 1.0)
);
});
@@ -298,7 +298,7 @@ describe(
mockTileset,
"/some_url",
tileWithBoundingRegion,
- undefined,
+ undefined
);
const tbr = new TileBoundingRegion({
rectangle: rectangle,
@@ -316,7 +316,7 @@ describe(
mockTileset,
"/some_url",
tileWithContentBoundingRegion,
- undefined,
+ undefined
);
expect(tile.contentBoundingVolume).toBeDefined();
const tbb = new TileBoundingRegion({
@@ -333,7 +333,7 @@ describe(
mockTileset,
"/some_url",
tileWithBoundingBox,
- undefined,
+ undefined
);
expect(tile.boundingVolume).toBeDefined();
const center = new Cartesian3(box[0], box[1], box[2]);
@@ -345,7 +345,7 @@ describe(
it("does not crash for bounding box with 0 volume", function () {
// Create a copy of the tile with bounding box.
const tileWithBoundingBox0Volume = JSON.parse(
- JSON.stringify(tileWithBoundingBox),
+ JSON.stringify(tileWithBoundingBox)
);
// Generate all the combinations of missing axes.
const boxes = [];
@@ -379,7 +379,7 @@ describe(
mockTileset,
"/some_url",
tileWithBoundingBox0Volume,
- undefined,
+ undefined
);
expect(tile.boundingVolume).toBeDefined();
const center = new Cartesian3(box[0], box[1], box[2]);
@@ -395,7 +395,7 @@ describe(
mockTileset,
"/some_url",
tileWithContentBoundingBox,
- undefined,
+ undefined
);
expect(tile.contentBoundingVolume).toBeDefined();
const center = new Cartesian3(box[0], box[1], box[2]);
@@ -411,7 +411,7 @@ describe(
mockTileset,
"/some_url",
header,
- undefined,
+ undefined
);
const boundingSphere = tile.boundingVolume.boundingVolume;
const contentBoundingSphere = tile.contentBoundingVolume.boundingVolume;
@@ -419,17 +419,17 @@ describe(
const boundingVolumeCenter = Cartesian3.fromRadians(
centerLongitude,
centerLatitude,
- 1.0,
+ 1.0
);
expect(boundingSphere.center).toEqualEpsilon(
boundingVolumeCenter,
- CesiumMath.EPSILON4,
+ CesiumMath.EPSILON4
);
expect(boundingSphere.radius).toEqual(5.0); // No change
expect(contentBoundingSphere.center).toEqualEpsilon(
boundingVolumeCenter,
- CesiumMath.EPSILON4,
+ CesiumMath.EPSILON4
);
expect(contentBoundingSphere.radius).toEqual(5.0); // No change
});
@@ -441,7 +441,7 @@ describe(
mockTileset,
"/some_url",
header,
- undefined,
+ undefined
);
const boundingBox = tile.boundingVolume.boundingVolume;
const contentBoundingBox = tile.contentBoundingVolume.boundingVolume;
@@ -449,15 +449,15 @@ describe(
const boundingVolumeCenter = Cartesian3.fromRadians(
centerLongitude,
centerLatitude,
- 1.0,
+ 1.0
);
expect(boundingBox.center).toEqualEpsilon(
boundingVolumeCenter,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(contentBoundingBox.center).toEqualEpsilon(
boundingVolumeCenter,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -468,7 +468,7 @@ describe(
mockTileset,
"/some_url",
header,
- undefined,
+ undefined
);
const boundingRegion = tile.boundingVolume;
const contentBoundingRegion = tile.contentBoundingVolume;
@@ -486,17 +486,17 @@ describe(
mockTileset,
"/some_url",
header,
- undefined,
+ undefined
);
const requestVolume = tile._viewerRequestVolume.boundingVolume;
const requestVolumeCenter = Cartesian3.fromRadians(
centerLongitude,
centerLatitude,
- 1.0,
+ 1.0
);
expect(requestVolume.center).toEqualEpsilon(
requestVolumeCenter,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -510,18 +510,18 @@ describe(
mockTileset,
"/some_url",
header,
- undefined,
+ undefined
);
const boundingSphere = tile.boundingVolume.boundingVolume;
// Check the original transform
const boundingVolumeCenter = Cartesian3.fromRadians(
centerLongitude,
- centerLatitude,
+ centerLatitude
);
expect(boundingSphere.center).toEqualEpsilon(
boundingVolumeCenter,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
// Change the transform
@@ -534,7 +534,7 @@ describe(
const newCenter = Cartesian3.fromRadians(newLongitude, newLatitude);
expect(boundingSphere.center).toEqualEpsilon(
newCenter,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -594,20 +594,28 @@ describe(
mockTileset,
"/some_url",
header,
- undefined,
+ undefined
);
const boundingBox = tile.boundingVolume.boundingVolume;
const boundingVolumeCenter = Cartesian3.fromRadians(0.0, 0.0, 101.0);
expect(boundingBox.center).toEqualEpsilon(
boundingVolumeCenter,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
const boundingVolumeHalfAxes = Matrix3.fromArray([
- 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 2.0, 0.0, 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 2.0,
+ 0.0,
+ 0.0,
]);
expect(boundingBox.halfAxes).toEqualEpsilon(
boundingVolumeHalfAxes,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
scene.verticalExaggeration = 2.0;
@@ -617,15 +625,23 @@ describe(
const exaggeratedCenter = Cartesian3.fromRadians(0.0, 0.0, 202.0);
expect(boundingBox.center).toEqualEpsilon(
exaggeratedCenter,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
// Note orientation flip due to re-computing the box after exaggeration
const exaggeratedHalfAxes = Matrix3.fromArray([
- 4.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0,
+ 4.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
]);
expect(boundingBox.halfAxes).toEqualEpsilon(
exaggeratedHalfAxes,
- CesiumMath.EPSILON4,
+ CesiumMath.EPSILON4
);
});
@@ -634,24 +650,24 @@ describe(
mockTileset,
"/some_url",
tileWithBoundingRegion,
- undefined,
+ undefined
);
const tileBoundingRegion = tile.boundingVolume;
expect(tileBoundingRegion.minimumHeight).toEqualEpsilon(
-34.0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(tileBoundingRegion.maximumHeight).toEqualEpsilon(
-30.0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
const rectangle = Rectangle.pack(
tileBoundingRegion.rectangle,
- new Array(4),
+ new Array(4)
);
expect(rectangle).toEqualEpsilon(
[-1.2, -1.2, 0.0, 0.0],
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
scene.verticalExaggeration = 2.0;
@@ -661,19 +677,19 @@ describe(
expect(tileBoundingRegion.minimumHeight).toEqualEpsilon(
-34.0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(tileBoundingRegion.maximumHeight).toEqualEpsilon(
-26.0,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
const exaggeratedRectangle = Rectangle.pack(
tileBoundingRegion.rectangle,
- new Array(4),
+ new Array(4)
);
expect(exaggeratedRectangle).toEqualEpsilon(
[-1.2, -1.2, 0.0, 0.0],
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -682,24 +698,24 @@ describe(
header.transform = getTileTransform(
centerLongitude,
centerLatitude,
- 100.0,
+ 100.0
);
const tile = new Cesium3DTile(
mockTileset,
"/some_url",
header,
- undefined,
+ undefined
);
const boundingSphere = tile.boundingVolume.boundingVolume;
const boundingVolumeCenter = Cartesian3.fromRadians(
centerLongitude,
centerLatitude,
- 100.0,
+ 100.0
);
expect(boundingSphere.center).toEqualEpsilon(
boundingVolumeCenter,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(boundingSphere.radius).toEqualEpsilon(5.0, CesiumMath.EPSILON7);
@@ -710,11 +726,11 @@ describe(
const exaggeratedCenter = Cartesian3.fromRadians(
centerLongitude,
centerLatitude,
- 200.0,
+ 200.0
);
expect(boundingSphere.center).toEqualEpsilon(
exaggeratedCenter,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(boundingSphere.radius).toEqualEpsilon(10.0, CesiumMath.EPSILON7);
});
@@ -736,10 +752,10 @@ describe(
mockTileset,
"/some_url",
tileWithBoundingRegion,
- undefined,
+ undefined
);
const passOptions = Cesium3DTilePass.getPassOptions(
- Cesium3DTilePass.RENDER,
+ Cesium3DTilePass.RENDER
);
tile.update(mockTileset, scene.frameState, passOptions);
expect(tile._debugBoundingVolume).toBeDefined();
@@ -750,10 +766,10 @@ describe(
mockTileset,
"/some_url",
tileWithBoundingBox,
- undefined,
+ undefined
);
const passOptions = Cesium3DTilePass.getPassOptions(
- Cesium3DTilePass.RENDER,
+ Cesium3DTilePass.RENDER
);
tile.update(mockTileset, scene.frameState, passOptions);
expect(tile._debugBoundingVolume).toBeDefined();
@@ -764,10 +780,10 @@ describe(
mockTileset,
"/some_url",
tileWithBoundingSphere,
- undefined,
+ undefined
);
const passOptions = Cesium3DTilePass.getPassOptions(
- Cesium3DTilePass.RENDER,
+ Cesium3DTilePass.RENDER
);
tile.update(mockTileset, scene.frameState, passOptions);
expect(tile._debugBoundingVolume).toBeDefined();
@@ -778,10 +794,10 @@ describe(
mockTileset,
"/some_url",
tileWithViewerRequestVolume,
- undefined,
+ undefined
);
const passOptions = Cesium3DTilePass.getPassOptions(
- Cesium3DTilePass.RENDER,
+ Cesium3DTilePass.RENDER
);
tile.update(mockTileset, scene.frameState, passOptions);
expect(tile._debugViewerRequestVolume).toBeDefined();
@@ -793,7 +809,7 @@ describe(
mockTileset,
"/some_url",
tileWithBoundingSphere,
- undefined,
+ undefined
);
tile1._priorityHolder = tile1;
tile1._foveatedFactor = 0.0;
@@ -805,7 +821,7 @@ describe(
mockTileset,
"/some_url",
tileWithBoundingSphere,
- undefined,
+ undefined
);
tile2._priorityHolder = tile1;
tile2._foveatedFactor = 1.0; // foveatedFactor (when considered for priority in certain modes) is actually 0 since its linked up to tile1
@@ -834,15 +850,15 @@ describe(
CesiumMath.equalsEpsilon(
tile1._priority,
tile1ExpectedPriority,
- CesiumMath.EPSILON2,
- ),
+ CesiumMath.EPSILON2
+ )
).toBe(true);
expect(
CesiumMath.equalsEpsilon(
tile2._priority,
tile2ExpectedPriority,
- CesiumMath.EPSILON2,
- ),
+ CesiumMath.EPSILON2
+ )
).toBe(true);
// Penalty for not being a progressive resolution
@@ -864,7 +880,7 @@ describe(
const header = clone(tileWithContentBoundingSphere, true);
header.transform = Matrix4.pack(
Matrix4.fromUniformScale(2.0),
- new Array(16),
+ new Array(16)
);
const mockTilesetScaled = clone(mockTileset, true);
@@ -873,7 +889,7 @@ describe(
mockTilesetScaled,
"/some_url",
header,
- undefined,
+ undefined
);
expect(tile._geometricError).toBe(1);
@@ -882,5 +898,5 @@ describe(
expect(mockTilesetScaled._scaledGeometricError).toBe(4);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Cesium3DTileStyleSpec.js b/packages/engine/Specs/Scene/Cesium3DTileStyleSpec.js
index d762d34bfbad..957d4d261457 100644
--- a/packages/engine/Specs/Scene/Cesium3DTileStyleSpec.js
+++ b/packages/engine/Specs/Scene/Cesium3DTileStyleSpec.js
@@ -97,7 +97,7 @@ describe("Scene/Cesium3DTileStyle", function () {
expect(style.pointOutlineWidth).toEqual(new Expression("5.0"));
expect(style.labelColor).toEqual(new Expression("color('yellow')"));
expect(style.labelOutlineColor).toEqual(
- new Expression("color('orange')"),
+ new Expression("color('orange')")
);
expect(style.labelOutlineWidth).toEqual(new Expression("6.0"));
expect(style.font).toEqual(new Expression("'24px Helvetica'"));
@@ -107,13 +107,13 @@ describe("Scene/Cesium3DTileStyle", function () {
expect(style.backgroundPadding).toEqual(new Expression("vec2(1.0, 2.0)"));
expect(style.backgroundEnabled).toEqual(new Expression("true"));
expect(style.scaleByDistance).toEqual(
- new Expression("vec4(1.0, 2.0, 3.0, 4.0)"),
+ new Expression("vec4(1.0, 2.0, 3.0, 4.0)")
);
expect(style.translucencyByDistance).toEqual(
- new Expression("vec4(5.0, 6.0, 7.0, 8.0)"),
+ new Expression("vec4(5.0, 6.0, 7.0, 8.0)")
);
expect(style.distanceDisplayCondition).toEqual(
- new Expression("vec2(3.0, 4.0)"),
+ new Expression("vec2(3.0, 4.0)")
);
expect(style.heightOffset).toEqual(new Expression("10.0"));
expect(style.anchorLineEnabled).toEqual(new Expression("true"));
@@ -131,7 +131,7 @@ describe("Scene/Cesium3DTileStyle", function () {
return Cesium3DTileStyle.fromUrl(
new Resource({
url: styleUrl,
- }),
+ })
).then(function (style) {
expect(style.style).toEqual({
color: "color('red')",
@@ -168,7 +168,7 @@ describe("Scene/Cesium3DTileStyle", function () {
expect(style.pointOutlineWidth).toEqual(new Expression("5.0"));
expect(style.labelColor).toEqual(new Expression("color('yellow')"));
expect(style.labelOutlineColor).toEqual(
- new Expression("color('orange')"),
+ new Expression("color('orange')")
);
expect(style.labelOutlineWidth).toEqual(new Expression("6.0"));
expect(style.font).toEqual(new Expression("'24px Helvetica'"));
@@ -178,13 +178,13 @@ describe("Scene/Cesium3DTileStyle", function () {
expect(style.backgroundPadding).toEqual(new Expression("vec2(1.0, 2.0)"));
expect(style.backgroundEnabled).toEqual(new Expression("true"));
expect(style.scaleByDistance).toEqual(
- new Expression("vec4(1.0, 2.0, 3.0, 4.0)"),
+ new Expression("vec4(1.0, 2.0, 3.0, 4.0)")
);
expect(style.translucencyByDistance).toEqual(
- new Expression("vec4(5.0, 6.0, 7.0, 8.0)"),
+ new Expression("vec4(5.0, 6.0, 7.0, 8.0)")
);
expect(style.distanceDisplayCondition).toEqual(
- new Expression("vec2(3.0, 4.0)"),
+ new Expression("vec2(3.0, 4.0)")
);
expect(style.heightOffset).toEqual(new Expression("10.0"));
expect(style.anchorLineEnabled).toEqual(new Expression("true"));
@@ -279,7 +279,7 @@ describe("Scene/Cesium3DTileStyle", function () {
const style = new Cesium3DTileStyle({ defines: defines });
style.show = "${height} * ${showFactor} >= 1000";
expect(style.show).toEqual(
- new Expression("${height} * ${showFactor} >= 1000", defines),
+ new Expression("${height} * ${showFactor} >= 1000", defines)
);
style.show = false;
@@ -349,8 +349,8 @@ describe("Scene/Cesium3DTileStyle", function () {
expect(style.color).toEqual(
new Expression(
- '(${height} * 10 >= 1000) ? rgba(0.0, 0.0, 1.0, 0.5) : color("blue")',
- ),
+ '(${height} * 10 >= 1000) ? rgba(0.0, 0.0, 1.0, 0.5) : color("blue")'
+ )
);
});
@@ -417,7 +417,7 @@ describe("Scene/Cesium3DTileStyle", function () {
const style = new Cesium3DTileStyle({ defines: defines });
style.color = 'color("${targetColor}")';
expect(style.color).toEqual(
- new Expression('color("${targetColor}")', defines),
+ new Expression('color("${targetColor}")', defines)
);
const jsonExp = {
@@ -545,7 +545,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.pointSize = "${targetPointSize} + 1.0";
expect(style.pointSize).toEqual(
- new Expression("${targetPointSize} + 1.0", defines),
+ new Expression("${targetPointSize} + 1.0", defines)
);
const jsonExp = {
@@ -599,7 +599,7 @@ describe("Scene/Cesium3DTileStyle", function () {
pointOutlineColor: "rgba(30, 30, 30, 0.5)",
});
expect(style.pointOutlineColor).toEqual(
- new Expression("rgba(30, 30, 30, 0.5)"),
+ new Expression("rgba(30, 30, 30, 0.5)")
);
style = new Cesium3DTileStyle({
@@ -608,8 +608,8 @@ describe("Scene/Cesium3DTileStyle", function () {
});
expect(style.pointOutlineColor).toEqual(
new Expression(
- '(${height} * 10 >= 1000) ? rgba(0.0, 0.0, 1.0, 0.5) : color("blue")',
- ),
+ '(${height} * 10 >= 1000) ? rgba(0.0, 0.0, 1.0, 0.5) : color("blue")'
+ )
);
});
@@ -684,7 +684,7 @@ describe("Scene/Cesium3DTileStyle", function () {
const style = new Cesium3DTileStyle({ defines: defines });
style.pointOutlineColor = 'color("${targetColor}")';
expect(style.pointOutlineColor).toEqual(
- new Expression('color("${targetColor}")', defines),
+ new Expression('color("${targetColor}")', defines)
);
const jsonExp = {
@@ -696,7 +696,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.pointOutlineColor = jsonExp;
expect(style.pointOutlineColor).toEqual(
- new ConditionsExpression(jsonExp, defines),
+ new ConditionsExpression(jsonExp, defines)
);
});
@@ -817,7 +817,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.pointOutlineWidth = "${targetPointSize} + 1.0";
expect(style.pointOutlineWidth).toEqual(
- new Expression("${targetPointSize} + 1.0", defines),
+ new Expression("${targetPointSize} + 1.0", defines)
);
const jsonExp = {
@@ -829,7 +829,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.pointOutlineWidth = jsonExp;
expect(style.pointOutlineWidth).toEqual(
- new ConditionsExpression(jsonExp, defines),
+ new ConditionsExpression(jsonExp, defines)
);
});
@@ -880,8 +880,8 @@ describe("Scene/Cesium3DTileStyle", function () {
});
expect(style.labelColor).toEqual(
new Expression(
- '(${height} * 10 >= 1000) ? rgba(0.0, 0.0, 1.0, 0.5) : color("blue")',
- ),
+ '(${height} * 10 >= 1000) ? rgba(0.0, 0.0, 1.0, 0.5) : color("blue")'
+ )
);
});
@@ -955,7 +955,7 @@ describe("Scene/Cesium3DTileStyle", function () {
const style = new Cesium3DTileStyle({ defines: defines });
style.labelColor = 'color("${targetColor}")';
expect(style.labelColor).toEqual(
- new Expression('color("${targetColor}")', defines),
+ new Expression('color("${targetColor}")', defines)
);
const jsonExp = {
@@ -967,7 +967,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.labelColor = jsonExp;
expect(style.labelColor).toEqual(
- new ConditionsExpression(jsonExp, defines),
+ new ConditionsExpression(jsonExp, defines)
);
});
@@ -1008,7 +1008,7 @@ describe("Scene/Cesium3DTileStyle", function () {
labelOutlineColor: "rgba(30, 30, 30, 0.5)",
});
expect(style.labelOutlineColor).toEqual(
- new Expression("rgba(30, 30, 30, 0.5)"),
+ new Expression("rgba(30, 30, 30, 0.5)")
);
style = new Cesium3DTileStyle({
@@ -1017,8 +1017,8 @@ describe("Scene/Cesium3DTileStyle", function () {
});
expect(style.labelOutlineColor).toEqual(
new Expression(
- '(${height} * 10 >= 1000) ? rgba(0.0, 0.0, 1.0, 0.5) : color("blue")',
- ),
+ '(${height} * 10 >= 1000) ? rgba(0.0, 0.0, 1.0, 0.5) : color("blue")'
+ )
);
});
@@ -1093,7 +1093,7 @@ describe("Scene/Cesium3DTileStyle", function () {
const style = new Cesium3DTileStyle({ defines: defines });
style.labelOutlineColor = 'color("${targetColor}")';
expect(style.labelOutlineColor).toEqual(
- new Expression('color("${targetColor}")', defines),
+ new Expression('color("${targetColor}")', defines)
);
const jsonExp = {
@@ -1105,7 +1105,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.labelOutlineColor = jsonExp;
expect(style.labelOutlineColor).toEqual(
- new ConditionsExpression(jsonExp, defines),
+ new ConditionsExpression(jsonExp, defines)
);
});
@@ -1225,7 +1225,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.labelOutlineWidth = "${targetLabelSize} + 1.0";
expect(style.labelOutlineWidth).toEqual(
- new Expression("${targetLabelSize} + 1.0", defines),
+ new Expression("${targetLabelSize} + 1.0", defines)
);
const jsonExp = {
@@ -1237,7 +1237,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.labelOutlineWidth = jsonExp;
expect(style.labelOutlineWidth).toEqual(
- new ConditionsExpression(jsonExp, defines),
+ new ConditionsExpression(jsonExp, defines)
);
});
@@ -1484,7 +1484,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.labelStyle = "${targetLabelStyle}";
expect(style.labelStyle).toEqual(
- new Expression("${targetLabelStyle}", defines),
+ new Expression("${targetLabelStyle}", defines)
);
const jsonExp = {
@@ -1496,7 +1496,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.labelStyle = jsonExp;
expect(style.labelStyle).toEqual(
- new ConditionsExpression(jsonExp, defines),
+ new ConditionsExpression(jsonExp, defines)
);
});
@@ -1673,7 +1673,7 @@ describe("Scene/Cesium3DTileStyle", function () {
backgroundColor: "rgba(30, 30, 30, 0.5)",
});
expect(style.backgroundColor).toEqual(
- new Expression("rgba(30, 30, 30, 0.5)"),
+ new Expression("rgba(30, 30, 30, 0.5)")
);
style = new Cesium3DTileStyle({
@@ -1682,8 +1682,8 @@ describe("Scene/Cesium3DTileStyle", function () {
});
expect(style.backgroundColor).toEqual(
new Expression(
- '(${height} * 10 >= 1000) ? rgba(0.0, 0.0, 1.0, 0.5) : color("blue")',
- ),
+ '(${height} * 10 >= 1000) ? rgba(0.0, 0.0, 1.0, 0.5) : color("blue")'
+ )
);
});
@@ -1758,7 +1758,7 @@ describe("Scene/Cesium3DTileStyle", function () {
const style = new Cesium3DTileStyle({ defines: defines });
style.backgroundColor = 'color("${targetColor}")';
expect(style.backgroundColor).toEqual(
- new Expression('color("${targetColor}")', defines),
+ new Expression('color("${targetColor}")', defines)
);
const jsonExp = {
@@ -1770,7 +1770,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.backgroundColor = jsonExp;
expect(style.backgroundColor).toEqual(
- new ConditionsExpression(jsonExp, defines),
+ new ConditionsExpression(jsonExp, defines)
);
});
@@ -1818,8 +1818,8 @@ describe("Scene/Cesium3DTileStyle", function () {
});
expect(style.backgroundPadding).toEqual(
new Expression(
- "(${height} * 10 >= 1000) ? vec2(1.0, 2.0) : vec2(3.0, 4.0)",
- ),
+ "(${height} * 10 >= 1000) ? vec2(1.0, 2.0) : vec2(3.0, 4.0)"
+ )
);
});
@@ -1891,7 +1891,7 @@ describe("Scene/Cesium3DTileStyle", function () {
const style = new Cesium3DTileStyle({ defines: defines });
style.backgroundPadding = 'vec2("${targetPadding}")';
expect(style.backgroundPadding).toEqual(
- new Expression('vec2("${targetPadding}")', defines),
+ new Expression('vec2("${targetPadding}")', defines)
);
const jsonExp = {
@@ -1903,7 +1903,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.backgroundPadding = jsonExp;
expect(style.backgroundPadding).toEqual(
- new ConditionsExpression(jsonExp, defines),
+ new ConditionsExpression(jsonExp, defines)
);
});
@@ -1949,7 +1949,7 @@ describe("Scene/Cesium3DTileStyle", function () {
backgroundEnabled: "${height} * 10 >= 1000",
});
expect(style.backgroundEnabled).toEqual(
- new Expression("${height} * 10 >= 1000"),
+ new Expression("${height} * 10 >= 1000")
);
style = new Cesium3DTileStyle({
@@ -2025,7 +2025,7 @@ describe("Scene/Cesium3DTileStyle", function () {
const style = new Cesium3DTileStyle({ defines: defines });
style.backgroundEnabled = "${height} * ${backgroundFactor} >= 1000";
expect(style.backgroundEnabled).toEqual(
- new Expression("${height} * ${backgroundFactor} >= 1000", defines),
+ new Expression("${height} * ${backgroundFactor} >= 1000", defines)
);
style.backgroundEnabled = false;
@@ -2040,7 +2040,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.backgroundEnabled = jsonExp;
expect(style.backgroundEnabled).toEqual(
- new ConditionsExpression(jsonExp, defines),
+ new ConditionsExpression(jsonExp, defines)
);
style.backgroundEnabled = undefined;
@@ -2054,7 +2054,7 @@ describe("Scene/Cesium3DTileStyle", function () {
const style = new Cesium3DTileStyle({ defines: defines });
style.backgroundEnabled = "${height} * ${backgroundFactor} >= 1000";
expect(style.style.backgroundEnabled).toEqual(
- "${height} * ${backgroundFactor} >= 1000",
+ "${height} * ${backgroundFactor} >= 1000"
);
style.backgroundEnabled = false;
@@ -2088,7 +2088,7 @@ describe("Scene/Cesium3DTileStyle", function () {
});
expect(style.scaleByDistance).toEqual(
- new Expression("vec4(1.0, 2.0, 3.0, 4.0)"),
+ new Expression("vec4(1.0, 2.0, 3.0, 4.0)")
);
style = new Cesium3DTileStyle({
@@ -2096,7 +2096,7 @@ describe("Scene/Cesium3DTileStyle", function () {
});
expect(style.scaleByDistance).toEqual(
- new Expression("vec4(5.0, 6.0, 7.0, 8.0)"),
+ new Expression("vec4(5.0, 6.0, 7.0, 8.0)")
);
style = new Cesium3DTileStyle({
@@ -2105,8 +2105,8 @@ describe("Scene/Cesium3DTileStyle", function () {
});
expect(style.scaleByDistance).toEqual(
new Expression(
- "(${height} * 10 >= 1000) ? vec4(1.0, 2.0, 3.0, 4.0) : vec4(5.0, 6.0, 7.0, 8.0)",
- ),
+ "(${height} * 10 >= 1000) ? vec4(1.0, 2.0, 3.0, 4.0) : vec4(5.0, 6.0, 7.0, 8.0)"
+ )
);
});
@@ -2179,7 +2179,7 @@ describe("Scene/Cesium3DTileStyle", function () {
const style = new Cesium3DTileStyle({ defines: defines });
style.scaleByDistance = 'vec4("${targetScale}")';
expect(style.scaleByDistance).toEqual(
- new Expression('vec4("${targetScale}")', defines),
+ new Expression('vec4("${targetScale}")', defines)
);
const jsonExp = {
@@ -2191,7 +2191,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.scaleByDistance = jsonExp;
expect(style.scaleByDistance).toEqual(
- new ConditionsExpression(jsonExp, defines),
+ new ConditionsExpression(jsonExp, defines)
);
});
@@ -2227,14 +2227,14 @@ describe("Scene/Cesium3DTileStyle", function () {
distanceDisplayCondition: "vec4(1.0, 2.0, 3.0, 4.0)",
});
expect(style.distanceDisplayCondition).toEqual(
- new Expression("vec4(1.0, 2.0, 3.0, 4.0)"),
+ new Expression("vec4(1.0, 2.0, 3.0, 4.0)")
);
style = new Cesium3DTileStyle({
distanceDisplayCondition: "vec4(5.0, 6.0, 7.0, 8.0)",
});
expect(style.distanceDisplayCondition).toEqual(
- new Expression("vec4(5.0, 6.0, 7.0, 8.0)"),
+ new Expression("vec4(5.0, 6.0, 7.0, 8.0)")
);
style = new Cesium3DTileStyle({
@@ -2243,8 +2243,8 @@ describe("Scene/Cesium3DTileStyle", function () {
});
expect(style.distanceDisplayCondition).toEqual(
new Expression(
- "(${height} * 10 >= 1000) ? vec4(1.0, 2.0, 3.0, 4.0) : vec4(5.0, 6.0, 7.0, 8.0)",
- ),
+ "(${height} * 10 >= 1000) ? vec4(1.0, 2.0, 3.0, 4.0) : vec4(5.0, 6.0, 7.0, 8.0)"
+ )
);
});
@@ -2260,7 +2260,7 @@ describe("Scene/Cesium3DTileStyle", function () {
distanceDisplayCondition: jsonExp,
});
expect(style.distanceDisplayCondition).toEqual(
- new ConditionsExpression(jsonExp),
+ new ConditionsExpression(jsonExp)
);
});
@@ -2288,7 +2288,7 @@ describe("Scene/Cesium3DTileStyle", function () {
const style = new Cesium3DTileStyle();
style.distanceDisplayCondition = new Expression("vec4(5.0, 6.0, 7.0, 8.0)");
expect(style.style.distanceDisplayCondition).toEqual(
- "vec4(5.0, 6.0, 7.0, 8.0)",
+ "vec4(5.0, 6.0, 7.0, 8.0)"
);
const jsonExp = {
@@ -2320,7 +2320,7 @@ describe("Scene/Cesium3DTileStyle", function () {
const style = new Cesium3DTileStyle({ defines: defines });
style.distanceDisplayCondition = 'vec4("${targetTranslucency}")';
expect(style.distanceDisplayCondition).toEqual(
- new Expression('vec4("${targetTranslucency}")', defines),
+ new Expression('vec4("${targetTranslucency}")', defines)
);
const jsonExp = {
@@ -2332,7 +2332,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.distanceDisplayCondition = jsonExp;
expect(style.distanceDisplayCondition).toEqual(
- new ConditionsExpression(jsonExp, defines),
+ new ConditionsExpression(jsonExp, defines)
);
});
@@ -2343,7 +2343,7 @@ describe("Scene/Cesium3DTileStyle", function () {
const style = new Cesium3DTileStyle({ defines: defines });
style.distanceDisplayCondition = 'vec4("${targetTranslucency}")';
expect(style.style.distanceDisplayCondition).toEqual(
- 'vec4("${targetTranslucency}")',
+ 'vec4("${targetTranslucency}")'
);
const jsonExp = {
@@ -2456,7 +2456,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.heightOffset = "${targetHeight} + 1.0";
expect(style.heightOffset).toEqual(
- new Expression("${targetHeight} + 1.0", defines),
+ new Expression("${targetHeight} + 1.0", defines)
);
const jsonExp = {
@@ -2468,7 +2468,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.heightOffset = jsonExp;
expect(style.heightOffset).toEqual(
- new ConditionsExpression(jsonExp, defines),
+ new ConditionsExpression(jsonExp, defines)
);
});
@@ -2514,7 +2514,7 @@ describe("Scene/Cesium3DTileStyle", function () {
anchorLineEnabled: "${height} * 10 >= 1000",
});
expect(style.anchorLineEnabled).toEqual(
- new Expression("${height} * 10 >= 1000"),
+ new Expression("${height} * 10 >= 1000")
);
style = new Cesium3DTileStyle({
@@ -2590,7 +2590,7 @@ describe("Scene/Cesium3DTileStyle", function () {
const style = new Cesium3DTileStyle({ defines: defines });
style.anchorLineEnabled = "${height} * ${anchorFactor} >= 1000";
expect(style.anchorLineEnabled).toEqual(
- new Expression("${height} * ${anchorFactor} >= 1000", defines),
+ new Expression("${height} * ${anchorFactor} >= 1000", defines)
);
style.anchorLineEnabled = false;
@@ -2605,7 +2605,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.anchorLineEnabled = jsonExp;
expect(style.anchorLineEnabled).toEqual(
- new ConditionsExpression(jsonExp, defines),
+ new ConditionsExpression(jsonExp, defines)
);
style.anchorLineEnabled = undefined;
@@ -2619,7 +2619,7 @@ describe("Scene/Cesium3DTileStyle", function () {
const style = new Cesium3DTileStyle({ defines: defines });
style.anchorLineEnabled = "${height} * ${anchorFactor} >= 1000";
expect(style.style.anchorLineEnabled).toEqual(
- "${height} * ${anchorFactor} >= 1000",
+ "${height} * ${anchorFactor} >= 1000"
);
style.anchorLineEnabled = false;
@@ -2657,7 +2657,7 @@ describe("Scene/Cesium3DTileStyle", function () {
anchorLineColor: "rgba(30, 30, 30, 0.5)",
});
expect(style.anchorLineColor).toEqual(
- new Expression("rgba(30, 30, 30, 0.5)"),
+ new Expression("rgba(30, 30, 30, 0.5)")
);
style = new Cesium3DTileStyle({
@@ -2666,8 +2666,8 @@ describe("Scene/Cesium3DTileStyle", function () {
});
expect(style.anchorLineColor).toEqual(
new Expression(
- '(${height} * 10 >= 1000) ? rgba(0.0, 0.0, 1.0, 0.5) : color("blue")',
- ),
+ '(${height} * 10 >= 1000) ? rgba(0.0, 0.0, 1.0, 0.5) : color("blue")'
+ )
);
});
@@ -2742,7 +2742,7 @@ describe("Scene/Cesium3DTileStyle", function () {
const style = new Cesium3DTileStyle({ defines: defines });
style.anchorLineColor = 'color("${targetColor}")';
expect(style.anchorLineColor).toEqual(
- new Expression('color("${targetColor}")', defines),
+ new Expression('color("${targetColor}")', defines)
);
const jsonExp = {
@@ -2754,7 +2754,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.anchorLineColor = jsonExp;
expect(style.anchorLineColor).toEqual(
- new ConditionsExpression(jsonExp, defines),
+ new ConditionsExpression(jsonExp, defines)
);
});
@@ -2928,7 +2928,7 @@ describe("Scene/Cesium3DTileStyle", function () {
disableDepthTestDistance: "${height} / 10",
});
expect(style.disableDepthTestDistance).toEqual(
- new Expression("${height} / 10"),
+ new Expression("${height} / 10")
);
style = new Cesium3DTileStyle({
@@ -2949,7 +2949,7 @@ describe("Scene/Cesium3DTileStyle", function () {
disableDepthTestDistance: jsonExp,
});
expect(style.disableDepthTestDistance).toEqual(
- new ConditionsExpression(jsonExp),
+ new ConditionsExpression(jsonExp)
);
});
@@ -3013,7 +3013,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.disableDepthTestDistance = "${targetDistance} + 1.0";
expect(style.disableDepthTestDistance).toEqual(
- new Expression("${targetDistance} + 1.0", defines),
+ new Expression("${targetDistance} + 1.0", defines)
);
const jsonExp = {
@@ -3025,7 +3025,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.disableDepthTestDistance = jsonExp;
expect(style.disableDepthTestDistance).toEqual(
- new ConditionsExpression(jsonExp, defines),
+ new ConditionsExpression(jsonExp, defines)
);
});
@@ -3118,7 +3118,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.horizontalOrigin = "${targetOrigin}";
expect(style.horizontalOrigin).toEqual(
- new Expression("${targetOrigin}", defines),
+ new Expression("${targetOrigin}", defines)
);
const jsonExp = {
@@ -3130,7 +3130,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.horizontalOrigin = jsonExp;
expect(style.horizontalOrigin).toEqual(
- new ConditionsExpression(jsonExp, defines),
+ new ConditionsExpression(jsonExp, defines)
);
});
@@ -3244,7 +3244,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.verticalOrigin = "${targetOrigin}";
expect(style.verticalOrigin).toEqual(
- new Expression("${targetOrigin}", defines),
+ new Expression("${targetOrigin}", defines)
);
const jsonExp = {
@@ -3256,7 +3256,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.verticalOrigin = jsonExp;
expect(style.verticalOrigin).toEqual(
- new ConditionsExpression(jsonExp, defines),
+ new ConditionsExpression(jsonExp, defines)
);
});
@@ -3308,7 +3308,7 @@ describe("Scene/Cesium3DTileStyle", function () {
labelHorizontalOrigin: jsonExp,
});
expect(style.labelHorizontalOrigin).toEqual(
- new ConditionsExpression(jsonExp),
+ new ConditionsExpression(jsonExp)
);
});
@@ -3372,7 +3372,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.labelHorizontalOrigin = "${targetOrigin}";
expect(style.labelHorizontalOrigin).toEqual(
- new Expression("${targetOrigin}", defines),
+ new Expression("${targetOrigin}", defines)
);
const jsonExp = {
@@ -3384,7 +3384,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.labelHorizontalOrigin = jsonExp;
expect(style.labelHorizontalOrigin).toEqual(
- new ConditionsExpression(jsonExp, defines),
+ new ConditionsExpression(jsonExp, defines)
);
});
@@ -3436,7 +3436,7 @@ describe("Scene/Cesium3DTileStyle", function () {
labelVerticalOrigin: jsonExp,
});
expect(style.labelVerticalOrigin).toEqual(
- new ConditionsExpression(jsonExp),
+ new ConditionsExpression(jsonExp)
);
});
@@ -3501,7 +3501,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.labelVerticalOrigin = "${targetOrigin}";
expect(style.labelVerticalOrigin).toEqual(
- new Expression("${targetOrigin}", defines),
+ new Expression("${targetOrigin}", defines)
);
const jsonExp = {
@@ -3513,7 +3513,7 @@ describe("Scene/Cesium3DTileStyle", function () {
style.labelVerticalOrigin = jsonExp;
expect(style.labelVerticalOrigin).toEqual(
- new ConditionsExpression(jsonExp, defines),
+ new ConditionsExpression(jsonExp, defines)
);
});
@@ -3554,7 +3554,7 @@ describe("Scene/Cesium3DTileStyle", function () {
},
});
expect(style.meta.featureColor.evaluateColor(feature1)).toEqual(
- Color.fromBytes(38, 255, 82),
+ Color.fromBytes(38, 255, 82)
);
expect(style.meta.volume.evaluate(feature1)).toEqual(20 * 20 * 100);
});
@@ -3631,10 +3631,10 @@ describe("Scene/Cesium3DTileStyle", function () {
color: "rgba(${red}, ${green}, ${blue}, (${volume} > 100 ? 0.5 : 1.0))",
});
expect(style.color.evaluateColor(feature1)).toEqual(
- new Color(38 / 255, 255 / 255, 82 / 255, 0.5),
+ new Color(38 / 255, 255 / 255, 82 / 255, 0.5)
);
expect(style.color.evaluateColor(feature2)).toEqual(
- new Color(255 / 255, 30 / 255, 30 / 255, 1.0),
+ new Color(255 / 255, 30 / 255, 30 / 255, 1.0)
);
});
@@ -3734,10 +3734,10 @@ describe("Scene/Cesium3DTileStyle", function () {
expect(style.pointSize.evaluate(feature1)).toEqual(114);
expect(style.pointSize.evaluate(feature2)).toEqual(44);
expect(style.meta.description.evaluate(feature1)).toEqual(
- "Half height is 50",
+ "Half height is 50"
);
expect(style.meta.description.evaluate(feature2)).toEqual(
- "Half height is 19",
+ "Half height is 19"
);
});
@@ -3750,7 +3750,7 @@ describe("Scene/Cesium3DTileStyle", function () {
const pointSizeFunction = style.getPointSizeShaderFunction(
"getPointSize",
{},
- {},
+ {}
);
expect(colorFunction).toBeUndefined();
expect(showFunction).toBeUndefined();
diff --git a/packages/engine/Specs/Scene/Cesium3DTilesVoxelProviderSpec.js b/packages/engine/Specs/Scene/Cesium3DTilesVoxelProviderSpec.js
index 49f5ff44fdbc..214de3d8d101 100644
--- a/packages/engine/Specs/Scene/Cesium3DTilesVoxelProviderSpec.js
+++ b/packages/engine/Specs/Scene/Cesium3DTilesVoxelProviderSpec.js
@@ -28,7 +28,7 @@ describe("Scene/Cesium3DTilesVoxelProvider", function () {
expect(provider.globalTransform).toEqual(Matrix4.IDENTITY);
expect(provider.shapeTransform).toEqualEpsilon(
Matrix4.fromScale(Ellipsoid.WGS84.radii),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(provider.shape).toEqual(VoxelShapeType.ELLIPSOID);
expect(provider.minBounds).toEqual(new Cartesian3(0.0, 0.0, -1.0));
diff --git a/packages/engine/Specs/Scene/Cesium3DTilesetBaseTraversalSpec.js b/packages/engine/Specs/Scene/Cesium3DTilesetBaseTraversalSpec.js
index ceb616fb9c1d..3c4782ee83c0 100644
--- a/packages/engine/Specs/Scene/Cesium3DTilesetBaseTraversalSpec.js
+++ b/packages/engine/Specs/Scene/Cesium3DTilesetBaseTraversalSpec.js
@@ -6,7 +6,7 @@ import {
describe("Scene/Cesium3DTilesetBaseTraversal", function () {
it("conforms to Cesium3DTilesetTraversal interface", function () {
expect(Cesium3DTilesetBaseTraversal).toConformToInterface(
- Cesium3DTilesetTraversal,
+ Cesium3DTilesetTraversal
);
});
});
diff --git a/packages/engine/Specs/Scene/Cesium3DTilesetHeatmapSpec.js b/packages/engine/Specs/Scene/Cesium3DTilesetHeatmapSpec.js
index 57815219fe30..eb34b52e2cde 100644
--- a/packages/engine/Specs/Scene/Cesium3DTilesetHeatmapSpec.js
+++ b/packages/engine/Specs/Scene/Cesium3DTilesetHeatmapSpec.js
@@ -40,7 +40,7 @@ describe("Scene/Cesium3DTilesetHeatmap", function () {
const diff = new Color(
Math.abs(expectedColor.red - tileColor.red),
Math.abs(expectedColor.green - tileColor.green),
- Math.abs(expectedColor.blue - tileColor.blue),
+ Math.abs(expectedColor.blue - tileColor.blue)
);
const threshold = 0.11;
@@ -71,13 +71,13 @@ describe("Scene/Cesium3DTilesetHeatmap", function () {
JulianDate.addSeconds(
referenceMinimumJulianDate,
10,
- referenceMaximumJulianDate,
+ referenceMaximumJulianDate
);
heatmap.setReferenceMinimumMaximum(
referenceMinimumJulianDate,
referenceMaximumJulianDate,
- tilePropertyName,
+ tilePropertyName
); // User wants to colorize to a fixed reference.
const referenceMinimum = heatmap._referenceMinimum[tilePropertyName];
const referenceMaximum = heatmap._referenceMaximum[tilePropertyName];
@@ -99,7 +99,7 @@ describe("Scene/Cesium3DTilesetHeatmap", function () {
mockTileset,
"/some_url",
tileWithBoundingSphere,
- undefined,
+ undefined
);
tile._contentState = Cesium3DTileContentState.READY;
tile.hasEmptyContent = false;
diff --git a/packages/engine/Specs/Scene/Cesium3DTilesetMostDetailedTraversalSpec.js b/packages/engine/Specs/Scene/Cesium3DTilesetMostDetailedTraversalSpec.js
index bf41868f39dd..364c9369df1a 100644
--- a/packages/engine/Specs/Scene/Cesium3DTilesetMostDetailedTraversalSpec.js
+++ b/packages/engine/Specs/Scene/Cesium3DTilesetMostDetailedTraversalSpec.js
@@ -6,7 +6,7 @@ import {
describe("Scene/Cesium3DTilesetMostDetailedTraversal", function () {
it("conforms to Cesium3DTilesetTraversal interface", function () {
expect(Cesium3DTilesetMostDetailedTraversal).toConformToInterface(
- Cesium3DTilesetTraversal,
+ Cesium3DTilesetTraversal
);
});
});
diff --git a/packages/engine/Specs/Scene/Cesium3DTilesetSkipTraversalSpec.js b/packages/engine/Specs/Scene/Cesium3DTilesetSkipTraversalSpec.js
index 414a52880562..bb1418cebfcf 100644
--- a/packages/engine/Specs/Scene/Cesium3DTilesetSkipTraversalSpec.js
+++ b/packages/engine/Specs/Scene/Cesium3DTilesetSkipTraversalSpec.js
@@ -6,7 +6,7 @@ import {
describe("Scene/Cesium3DTilesetSkipTraversal", function () {
it("conforms to Cesium3DTilesetTraversal interface", function () {
expect(Cesium3DTilesetSkipTraversal).toConformToInterface(
- Cesium3DTilesetTraversal,
+ Cesium3DTilesetTraversal
);
});
});
diff --git a/packages/engine/Specs/Scene/Cesium3DTilesetSpec.js b/packages/engine/Specs/Scene/Cesium3DTilesetSpec.js
index 1377623b5161..0419ed73eb27 100644
--- a/packages/engine/Specs/Scene/Cesium3DTilesetSpec.js
+++ b/packages/engine/Specs/Scene/Cesium3DTilesetSpec.js
@@ -241,7 +241,7 @@ describe(
const center = Cartesian3.fromRadians(
centerLongitude,
centerLatitude,
- 100,
+ 100
);
scene.camera.lookAt(center, new HeadingPitchRange(0.0, 1.57, 10.0));
}
@@ -277,15 +277,15 @@ describe(
const uri = `data:text/plain;base64,${btoa(JSON.stringify(tilesetJson))}`;
await expectAsync(Cesium3DTileset.loadJson(uri)).toBeResolvedTo(
- tilesetJson,
+ tilesetJson
);
});
it("fromUrl throws without url", async function () {
await expectAsync(
- Cesium3DTileset.fromUrl(),
+ Cesium3DTileset.fromUrl()
).toBeRejectedWithDeveloperError(
- "url is required, actual value was undefined",
+ "url is required, actual value was undefined"
);
});
@@ -299,7 +299,7 @@ describe(
const uri = `data:text/plain;base64,${btoa(JSON.stringify(tilesetJson))}`;
await expectAsync(Cesium3DTileset.fromUrl(uri)).toBeRejectedWithError(
RuntimeError,
- "The tileset must be 3D Tiles version 0.0, 1.0, or 1.1",
+ "The tileset must be 3D Tiles version 0.0, 1.0, or 1.1"
);
});
@@ -315,7 +315,7 @@ describe(
const uri = `data:text/plain;base64,${btoa(JSON.stringify(tilesetJson))}`;
await expectAsync(Cesium3DTileset.fromUrl(uri)).toBeRejectedWithError(
RuntimeError,
- "Unsupported 3D Tiles Extension: unsupported_extension",
+ "Unsupported 3D Tiles Extension: unsupported_extension"
);
});
@@ -347,53 +347,53 @@ describe(
it("fromIonAssetId throws without assetId", async function () {
await expectAsync(
- Cesium3DTileset.fromIonAssetId(),
+ Cesium3DTileset.fromIonAssetId()
).toBeRejectedWithDeveloperError(
- "assetId is required, actual value was undefined",
+ "assetId is required, actual value was undefined"
);
});
it("loads tileset JSON file", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- const asset = tileset.asset;
- expect(asset).toBeDefined();
- expect(asset.version).toEqual("1.0");
- expect(asset.tilesetVersion).toEqual("1.2.3");
-
- const properties = tileset.properties;
- expect(properties).toBeDefined();
- expect(properties.id).toBeDefined();
- expect(properties.id.minimum).toEqual(0);
- expect(properties.id.maximum).toEqual(9);
-
- expect(tileset._geometricError).toEqual(240.0);
- expect(tileset.root).toBeDefined();
- expect(tileset.resource.url).toEqual(tilesetUrl);
- },
- );
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ const asset = tileset.asset;
+ expect(asset).toBeDefined();
+ expect(asset.version).toEqual("1.0");
+ expect(asset.tilesetVersion).toEqual("1.2.3");
+
+ const properties = tileset.properties;
+ expect(properties).toBeDefined();
+ expect(properties.id).toBeDefined();
+ expect(properties.id.minimum).toEqual(0);
+ expect(properties.id.maximum).toEqual(9);
+
+ expect(tileset._geometricError).toEqual(240.0);
+ expect(tileset.root).toBeDefined();
+ expect(tileset.resource.url).toEqual(tilesetUrl);
+ });
});
it("loads tileset with extras", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- expect(tileset.extras).toEqual({ name: "Sample Tileset" });
- expect(tileset.root.extras).toBeUndefined();
-
- const length = tileset.root.children.length;
- let taggedChildren = 0;
- for (let i = 0; i < length; ++i) {
- if (defined(tileset.root.children[i].extras)) {
- expect(tileset.root.children[i].extras).toEqual({
- id: "Special Tile",
- });
- ++taggedChildren;
- }
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ expect(tileset.extras).toEqual({ name: "Sample Tileset" });
+ expect(tileset.root.extras).toBeUndefined();
+
+ const length = tileset.root.children.length;
+ let taggedChildren = 0;
+ for (let i = 0; i < length; ++i) {
+ if (defined(tileset.root.children[i].extras)) {
+ expect(tileset.root.children[i].extras).toEqual({
+ id: "Special Tile",
+ });
+ ++taggedChildren;
}
+ }
- expect(taggedChildren).toEqual(1);
- },
- );
+ expect(taggedChildren).toEqual(1);
+ });
});
it("gets root tile", async function () {
@@ -404,27 +404,27 @@ describe(
it("hasExtension returns true if the tileset JSON file uses the specified extension", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- withBatchTableHierarchyUrl,
+ withBatchTableHierarchyUrl
).then(function (tileset) {
expect(tileset.hasExtension("3DTILES_batch_table_hierarchy")).toBe(
- true,
+ true
);
expect(tileset.hasExtension("3DTILES_nonexistant_extension")).toBe(
- false,
+ false
);
});
});
it("passes version in query string to tiles", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- expect(tileset.root.content._resource.url).toEqual(
- getAbsoluteUri(
- tilesetUrl.replace("tileset.json", "parent.b3dm?v=1.2.3"),
- ),
- );
- },
- );
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ expect(tileset.root.content._resource.url).toEqual(
+ getAbsoluteUri(
+ tilesetUrl.replace("tileset.json", "parent.b3dm?v=1.2.3")
+ )
+ );
+ });
});
it("passes version in query string to all external resources", function () {
@@ -435,7 +435,7 @@ describe(
const queryParamsWithVersion = "?a=1&b=boy&v=1.2.3";
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithExternalResourcesUrl + queryParams,
+ tilesetWithExternalResourcesUrl + queryParams
).then(function (tileset) {
const calls = Resource._Implementations.loadWithXhr.calls.all();
const callsLength = calls.length;
@@ -466,7 +466,7 @@ describe(
// Start spying after the tileset json has been loaded
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(invalidMagicBuffer),
+ Promise.resolve(invalidMagicBuffer)
);
scene.renderForSpecs(); // Request root
@@ -479,7 +479,7 @@ describe(
expect(failedSpy).toHaveBeenCalledWith(
jasmine.objectContaining({
message: "Invalid tile content.",
- }),
+ })
);
expect(root.contentFailed).toBeTrue();
});
@@ -507,7 +507,7 @@ describe(
expect(failedSpy).toHaveBeenCalledWith(
jasmine.objectContaining({
message: "404",
- }),
+ })
);
const statistics = tileset.statistics;
expect(statistics.numberOfAttemptedRequests).toBe(0);
@@ -529,8 +529,8 @@ describe(
Promise.resolve(
Cesium3DTilesTester.generateBatchedTileBuffer({
version: 0, // Invalid version
- }),
- ),
+ })
+ )
);
scene.renderForSpecs(); // Request root
const root = tileset.root;
@@ -543,7 +543,7 @@ describe(
jasmine.objectContaining({
message:
"Only Batched 3D Model version 1 is supported. Version 0 is not.",
- }),
+ })
);
const statistics = tileset.statistics;
expect(statistics.numberOfAttemptedRequests).toBe(0);
@@ -553,35 +553,35 @@ describe(
});
it("renders tileset", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- const statistics = tileset._statistics;
- expect(statistics.visited).toEqual(5);
- expect(statistics.numberOfCommands).toEqual(5);
- },
- );
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ const statistics = tileset._statistics;
+ expect(statistics.visited).toEqual(5);
+ expect(statistics.numberOfCommands).toEqual(5);
+ });
});
function checkAnimation(url) {
- return Cesium3DTilesTester.loadTileset(scene, url).then(
- function (tileset) {
- const renderOptions = {
- scene: scene,
- time: new JulianDate(271.828),
- };
+ return Cesium3DTilesTester.loadTileset(scene, url).then(function (
+ tileset
+ ) {
+ const renderOptions = {
+ scene: scene,
+ time: new JulianDate(271.828),
+ };
+ expect(renderOptions).toRenderAndCall(function (rgba) {
+ const commandList = scene.frameState.commandList;
+ const modelMatrix1 = Matrix4.clone(commandList[0].modelMatrix);
+ // Check that the scene changes after .5 seconds. (it animates)
+ renderOptions.time.secondsOfDay += 0.5;
expect(renderOptions).toRenderAndCall(function (rgba) {
- const commandList = scene.frameState.commandList;
- const modelMatrix1 = Matrix4.clone(commandList[0].modelMatrix);
- // Check that the scene changes after .5 seconds. (it animates)
- renderOptions.time.secondsOfDay += 0.5;
- expect(renderOptions).toRenderAndCall(function (rgba) {
- const modelMatrix2 = Matrix4.clone(commandList[0].modelMatrix);
- expect(modelMatrix1).not.toEqual(modelMatrix2);
- });
+ const modelMatrix2 = Matrix4.clone(commandList[0].modelMatrix);
+ expect(modelMatrix1).not.toEqual(modelMatrix2);
});
- },
- );
+ });
+ });
}
it("animates instanced tileset", function () {
return checkAnimation(instancedAnimationUrl);
@@ -592,15 +592,15 @@ describe(
});
it("renders tileset in CV", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- scene.morphToColumbusView(0.0);
- scene.renderForSpecs();
- const statistics = tileset._statistics;
- expect(statistics.visited).toEqual(5);
- expect(statistics.numberOfCommands).toEqual(5);
- },
- );
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ scene.morphToColumbusView(0.0);
+ scene.renderForSpecs();
+ const statistics = tileset._statistics;
+ expect(statistics.visited).toEqual(5);
+ expect(statistics.numberOfCommands).toEqual(5);
+ });
});
it("renders tileset in CV with projectTo2D option", function () {
@@ -616,16 +616,16 @@ describe(
});
it("renders tileset in 2D", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- scene.morphTo2D(0.0);
- tileset.maximumScreenSpaceError = 3;
- scene.renderForSpecs();
- const statistics = tileset._statistics;
- expect(statistics.visited).toEqual(5);
- expect(statistics.numberOfCommands).toEqual(5);
- },
- );
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ scene.morphTo2D(0.0);
+ tileset.maximumScreenSpaceError = 3;
+ scene.renderForSpecs();
+ const statistics = tileset._statistics;
+ expect(statistics.visited).toEqual(5);
+ expect(statistics.numberOfCommands).toEqual(5);
+ });
});
it("renders tileset in 2D with projectTo2D option", function () {
@@ -642,16 +642,16 @@ describe(
});
it("does not render during morph", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- const commandList = scene.frameState.commandList;
- scene.renderForSpecs();
- expect(commandList.length).toBeGreaterThan(0);
- scene.morphToColumbusView(1.0);
- scene.renderForSpecs();
- expect(commandList.length).toBe(0);
- },
- );
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ const commandList = scene.frameState.commandList;
+ scene.renderForSpecs();
+ expect(commandList.length).toBeGreaterThan(0);
+ scene.morphToColumbusView(1.0);
+ scene.renderForSpecs();
+ expect(commandList.length).toBe(0);
+ });
});
it("renders tileset with empty root tile", function () {
@@ -660,7 +660,7 @@ describe(
const statistics = tileset._statistics;
expect(statistics.visited).toEqual(5);
expect(statistics.numberOfCommands).toEqual(4); // Empty tile doesn't issue a command
- },
+ }
);
});
@@ -668,7 +668,7 @@ describe(
const center = Cartesian3.fromRadians(
centerLongitude,
centerLatitude,
- 10.0,
+ 10.0
);
// 3 different views of the sides of the colored cube.
@@ -696,7 +696,7 @@ describe(
return Cesium3DTilesTester.loadTileset(
scene,
tilesetEastNorthUpUrl,
- tilesetOptions,
+ tilesetOptions
).then(function (tileset) {
// The east (+x) face of the cube is red
scene.camera.lookAt(center, viewEast);
@@ -781,7 +781,7 @@ describe(
expect(statistics.numberOfPointsSelected).toEqual(0);
expect(statistics.numberOfPointsLoaded).toEqual(0);
expect(statistics.numberOfTrianglesSelected).toEqual(0);
- },
+ }
);
}
@@ -802,7 +802,7 @@ describe(
it("verify instanced features statistics", async function () {
const tileset = await Cesium3DTileset.fromUrl(
instancedRedMaterialUrl,
- options,
+ options
);
scene.primitives.add(tileset);
@@ -819,7 +819,7 @@ describe(
it("verify tileset of tilesets features statistics", async function () {
const tileset = await Cesium3DTileset.fromUrl(
tilesetOfTilesetsUrl,
- options,
+ options
);
scene.primitives.add(tileset);
@@ -838,7 +838,7 @@ describe(
it("verify triangle statistics", async function () {
const tileset = await Cesium3DTileset.fromUrl(
tilesetEmptyRootUrl,
- options,
+ options
);
scene.primitives.add(tileset);
@@ -850,7 +850,7 @@ describe(
const tileset = await Cesium3DTileset.fromUrl(
pointCloudBatchedUrl,
- options,
+ options
);
scene.primitives.add(tileset);
@@ -869,38 +869,37 @@ describe(
viewNothing();
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- const statistics = tileset._statistics;
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ const statistics = tileset._statistics;
- // No tiles loaded
- expect(statistics.geometryByteLength).toEqual(0);
- expect(statistics.texturesByteLength).toEqual(0);
- expect(statistics.batchTableByteLength).toEqual(0);
+ // No tiles loaded
+ expect(statistics.geometryByteLength).toEqual(0);
+ expect(statistics.texturesByteLength).toEqual(0);
+ expect(statistics.batchTableByteLength).toEqual(0);
- viewRootOnly();
- return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset).then(
- function () {
- // Root tile loaded
- expect(statistics.geometryByteLength).toEqual(
- singleTileGeometryMemory,
- );
- expect(statistics.texturesByteLength).toEqual(
- singleTileTextureMemory,
- );
- expect(statistics.batchTableByteLength).toEqual(0);
+ viewRootOnly();
+ return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset).then(
+ function () {
+ // Root tile loaded
+ expect(statistics.geometryByteLength).toEqual(
+ singleTileGeometryMemory
+ );
+ expect(statistics.texturesByteLength).toEqual(
+ singleTileTextureMemory
+ );
+ expect(statistics.batchTableByteLength).toEqual(0);
- viewAllTiles();
- return Cesium3DTilesTester.waitForTilesLoaded(
- scene,
- tileset,
- ).then(function () {
+ viewAllTiles();
+ return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset).then(
+ function () {
// All tiles loaded
expect(statistics.geometryByteLength).toEqual(
- singleTileGeometryMemory * tilesLength,
+ singleTileGeometryMemory * tilesLength
);
expect(statistics.texturesByteLength).toEqual(
- singleTileTextureMemory * tilesLength,
+ singleTileTextureMemory * tilesLength
);
expect(statistics.batchTableByteLength).toEqual(0);
@@ -908,40 +907,40 @@ describe(
tileset.root.content.getFeature(0).color = Color.RED;
scene.renderForSpecs();
expect(statistics.geometryByteLength).toEqual(
- singleTileGeometryMemory * tilesLength,
+ singleTileGeometryMemory * tilesLength
);
expect(statistics.texturesByteLength).toEqual(
- singleTileTextureMemory * tilesLength,
+ singleTileTextureMemory * tilesLength
);
expect(statistics.batchTableByteLength).toEqual(
- singleTileBatchTextureMemory,
+ singleTileBatchTextureMemory
);
// All tiles picked, the texture memory is now higher
scene.pickForSpecs();
expect(statistics.geometryByteLength).toEqual(
- singleTileGeometryMemory * tilesLength,
+ singleTileGeometryMemory * tilesLength
);
expect(statistics.texturesByteLength).toEqual(
- singleTileTextureMemory * tilesLength,
+ singleTileTextureMemory * tilesLength
);
expect(statistics.batchTableByteLength).toEqual(
singleTileBatchTextureMemory +
- singleTilePickTextureMemory * tilesLength,
+ singleTilePickTextureMemory * tilesLength
);
// Tiles are still in memory when zoomed out
viewNothing();
scene.renderForSpecs();
expect(statistics.geometryByteLength).toEqual(
- singleTileGeometryMemory * tilesLength,
+ singleTileGeometryMemory * tilesLength
);
expect(statistics.texturesByteLength).toEqual(
- singleTileTextureMemory * tilesLength,
+ singleTileTextureMemory * tilesLength
);
expect(statistics.batchTableByteLength).toEqual(
singleTileBatchTextureMemory +
- singleTilePickTextureMemory * tilesLength,
+ singleTilePickTextureMemory * tilesLength
);
// Trim loaded tiles, expect the memory statistics to be 0
@@ -950,11 +949,11 @@ describe(
expect(statistics.geometryByteLength).toEqual(0);
expect(statistics.texturesByteLength).toEqual(0);
expect(statistics.batchTableByteLength).toEqual(0);
- });
- },
- );
- },
- );
+ }
+ );
+ }
+ );
+ });
});
it("verify memory usage statistics for shared resources", function () {
@@ -977,7 +976,7 @@ describe(
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithExternalResourcesUrl,
+ tilesetWithExternalResourcesUrl
).then(function (tileset) {
// Contents are not aware of whether their resources are shared by
// other contents, so check ResourceCache.
@@ -988,75 +987,75 @@ describe(
});
it("does not process tileset when screen space error is not met", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- const statistics = tileset._statistics;
- expect(statistics.visited).toEqual(5);
- expect(statistics.numberOfCommands).toEqual(5);
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ const statistics = tileset._statistics;
+ expect(statistics.visited).toEqual(5);
+ expect(statistics.numberOfCommands).toEqual(5);
- // Set zoom far enough away to not meet sse
- viewNothing();
- scene.renderForSpecs();
- expect(statistics.visited).toEqual(0);
- expect(statistics.numberOfCommands).toEqual(0);
- },
- );
+ // Set zoom far enough away to not meet sse
+ viewNothing();
+ scene.renderForSpecs();
+ expect(statistics.visited).toEqual(0);
+ expect(statistics.numberOfCommands).toEqual(0);
+ });
});
it("does not select tiles when outside of view frustum", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- const statistics = tileset._statistics;
- expect(statistics.visited).toEqual(5);
- expect(statistics.numberOfCommands).toEqual(5);
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ const statistics = tileset._statistics;
+ expect(statistics.visited).toEqual(5);
+ expect(statistics.numberOfCommands).toEqual(5);
- viewSky();
+ viewSky();
- scene.renderForSpecs();
- expect(statistics.visited).toEqual(0);
- expect(statistics.numberOfCommands).toEqual(0);
- expect(
- tileset.root.visibility(
- scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
- ).toEqual(CullingVolume.MASK_OUTSIDE);
- },
- );
+ scene.renderForSpecs();
+ expect(statistics.visited).toEqual(0);
+ expect(statistics.numberOfCommands).toEqual(0);
+ expect(
+ tileset.root.visibility(
+ scene.frameState,
+ CullingVolume.MASK_INDETERMINATE
+ )
+ ).toEqual(CullingVolume.MASK_OUTSIDE);
+ });
});
it("does not load additive tiles that are out of view", function () {
viewBottomLeft();
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- const statistics = tileset._statistics;
- expect(statistics.numberOfTilesWithContentReady).toEqual(2);
- },
- );
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ const statistics = tileset._statistics;
+ expect(statistics.numberOfTilesWithContentReady).toEqual(2);
+ });
});
it("culls with content box", function () {
// Root tile has a content box that is half the extents of its box
// Expect to cull root tile and three child tiles
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- const statistics = tileset._statistics;
- expect(statistics.visited).toEqual(5);
- expect(statistics.numberOfCommands).toEqual(5);
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ const statistics = tileset._statistics;
+ expect(statistics.visited).toEqual(5);
+ expect(statistics.numberOfCommands).toEqual(5);
- viewBottomLeft();
- scene.renderForSpecs();
- expect(statistics.visited).toEqual(2); // Visits root, but does not render it
- expect(statistics.numberOfCommands).toEqual(1);
- expect(tileset._selectedTiles[0]).not.toBe(tileset.root);
+ viewBottomLeft();
+ scene.renderForSpecs();
+ expect(statistics.visited).toEqual(2); // Visits root, but does not render it
+ expect(statistics.numberOfCommands).toEqual(1);
+ expect(tileset._selectedTiles[0]).not.toBe(tileset.root);
- // Set contents box to undefined, and now root won't be culled
- tileset.root._contentBoundingVolume = undefined;
- scene.renderForSpecs();
- expect(statistics.visited).toEqual(2);
- expect(statistics.numberOfCommands).toEqual(2);
- },
- );
+ // Set contents box to undefined, and now root won't be culled
+ tileset.root._contentBoundingVolume = undefined;
+ scene.renderForSpecs();
+ expect(statistics.visited).toEqual(2);
+ expect(statistics.numberOfCommands).toEqual(2);
+ });
});
function findTileByUri(tiles, uri) {
@@ -1074,32 +1073,32 @@ describe(
}
it("selects children in front to back order", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- // After moving the camera left by 1.0 and down by 0.5, the distance from the camera should be in the order:
- // 1. lower left
- // 2. upper left
- // 3. lower right
- // 4. upper right
-
- scene.camera.moveLeft(1.0);
- scene.camera.moveDown(0.5);
- scene.renderForSpecs();
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ // After moving the camera left by 1.0 and down by 0.5, the distance from the camera should be in the order:
+ // 1. lower left
+ // 2. upper left
+ // 3. lower right
+ // 4. upper right
+
+ scene.camera.moveLeft(1.0);
+ scene.camera.moveDown(0.5);
+ scene.renderForSpecs();
- const root = tileset.root;
- const llTile = findTileByUri(root.children, "ll.b3dm");
- const lrTile = findTileByUri(root.children, "lr.b3dm");
- const urTile = findTileByUri(root.children, "ur.b3dm");
- const ulTile = findTileByUri(root.children, "ul.b3dm");
-
- const selectedTiles = tileset._selectedTiles;
- expect(selectedTiles[0]).toBe(root);
- expect(selectedTiles[1]).toBe(llTile);
- expect(selectedTiles[2]).toBe(ulTile);
- expect(selectedTiles[3]).toBe(lrTile);
- expect(selectedTiles[4]).toBe(urTile);
- },
- );
+ const root = tileset.root;
+ const llTile = findTileByUri(root.children, "ll.b3dm");
+ const lrTile = findTileByUri(root.children, "lr.b3dm");
+ const urTile = findTileByUri(root.children, "ur.b3dm");
+ const ulTile = findTileByUri(root.children, "ul.b3dm");
+
+ const selectedTiles = tileset._selectedTiles;
+ expect(selectedTiles[0]).toBe(root);
+ expect(selectedTiles[1]).toBe(llTile);
+ expect(selectedTiles[2]).toBe(ulTile);
+ expect(selectedTiles[3]).toBe(lrTile);
+ expect(selectedTiles[4]).toBe(urTile);
+ });
});
async function testDynamicScreenSpaceError(url, distance) {
@@ -1167,7 +1166,7 @@ describe(
const tileset = await Cesium3DTilesTester.loadTileset(
scene,
withTransformBoxUrl,
- options,
+ options
);
// Make sure the values match the constructor, not hard-coded defaults
@@ -1191,50 +1190,50 @@ describe(
it("additive refinement - selects root when sse is met", function () {
viewRootOnly();
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- // Meets screen space error, only root tile is rendered
- const statistics = tileset._statistics;
- expect(statistics.visited).toEqual(1);
- expect(statistics.numberOfCommands).toEqual(1);
- return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
- },
- );
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ // Meets screen space error, only root tile is rendered
+ const statistics = tileset._statistics;
+ expect(statistics.visited).toEqual(1);
+ expect(statistics.numberOfCommands).toEqual(1);
+ return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
+ });
});
it("additive refinement - selects all tiles when sse is not met", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- // Does not meet screen space error, all tiles are visible
- const statistics = tileset._statistics;
- expect(statistics.visited).toEqual(5);
- expect(statistics.numberOfCommands).toEqual(5);
- return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
- },
- );
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ // Does not meet screen space error, all tiles are visible
+ const statistics = tileset._statistics;
+ expect(statistics.visited).toEqual(5);
+ expect(statistics.numberOfCommands).toEqual(5);
+ return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
+ });
});
it("additive refinement - use parent's geometric error on child's box for early refinement", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- const statistics = tileset._statistics;
- expect(statistics.visited).toEqual(5);
- expect(statistics.numberOfCommands).toEqual(5);
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ const statistics = tileset._statistics;
+ expect(statistics.visited).toEqual(5);
+ expect(statistics.numberOfCommands).toEqual(5);
- // Both right tiles don't meet the SSE anymore
- scene.camera.moveLeft(50.0);
- scene.renderForSpecs();
- expect(statistics.visited).toEqual(3);
- expect(statistics.numberOfCommands).toEqual(3);
- return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
- },
- );
+ // Both right tiles don't meet the SSE anymore
+ scene.camera.moveLeft(50.0);
+ scene.renderForSpecs();
+ expect(statistics.visited).toEqual(3);
+ expect(statistics.numberOfCommands).toEqual(3);
+ return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
+ });
});
it("additive refinement - selects tile when inside viewer request volume", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithViewerRequestVolumeUrl,
+ tilesetWithViewerRequestVolumeUrl
).then(function (tileset) {
const statistics = tileset._statistics;
// Force root tile to always not meet SSE since this is just checking the request volume
@@ -1255,58 +1254,58 @@ describe(
it("replacement refinement - selects root when sse is met", function () {
viewRootOnly();
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- tileset.root.refine = Cesium3DTileRefine.REPLACE;
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ tileset.root.refine = Cesium3DTileRefine.REPLACE;
- // Meets screen space error, only root tile is rendered
- scene.renderForSpecs();
+ // Meets screen space error, only root tile is rendered
+ scene.renderForSpecs();
- const statistics = tileset._statistics;
- expect(statistics.visited).toEqual(1);
- expect(statistics.numberOfCommands).toEqual(1);
- return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
- },
- );
+ const statistics = tileset._statistics;
+ expect(statistics.visited).toEqual(1);
+ expect(statistics.numberOfCommands).toEqual(1);
+ return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
+ });
});
it("replacement refinement - selects children when sse is not met", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- tileset.root.refine = Cesium3DTileRefine.REPLACE;
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ tileset.root.refine = Cesium3DTileRefine.REPLACE;
- // Does not meet screen space error, child tiles replace root tile
- scene.renderForSpecs();
+ // Does not meet screen space error, child tiles replace root tile
+ scene.renderForSpecs();
- const statistics = tileset._statistics;
- expect(statistics.visited).toEqual(5); // Visits root, but does not render it
- expect(statistics.numberOfCommands).toEqual(4);
- return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
- },
- );
+ const statistics = tileset._statistics;
+ expect(statistics.visited).toEqual(5); // Visits root, but does not render it
+ expect(statistics.numberOfCommands).toEqual(4);
+ return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
+ });
});
it("replacement refinement - selects root when sse is not met and children are not ready", function () {
viewRootOnly();
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- const root = tileset.root;
- root.refine = Cesium3DTileRefine.REPLACE;
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ const root = tileset.root;
+ root.refine = Cesium3DTileRefine.REPLACE;
- // Set zoom to start loading child tiles
- viewAllTiles();
- scene.renderForSpecs();
+ // Set zoom to start loading child tiles
+ viewAllTiles();
+ scene.renderForSpecs();
- const statistics = tileset._statistics;
- // LOD skipping visits all visible
- expect(statistics.visited).toEqual(5);
- // no stencil clear command because only the root tile
- expect(statistics.numberOfCommands).toEqual(1);
- expect(statistics.numberOfPendingRequests).toEqual(4);
- expect(numberOfChildrenWithoutContent(root)).toEqual(4);
- return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
- },
- );
+ const statistics = tileset._statistics;
+ // LOD skipping visits all visible
+ expect(statistics.visited).toEqual(5);
+ // no stencil clear command because only the root tile
+ expect(statistics.numberOfCommands).toEqual(1);
+ expect(statistics.numberOfPendingRequests).toEqual(4);
+ expect(numberOfChildrenWithoutContent(root)).toEqual(4);
+ return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
+ });
});
it("replacement refinement - selects tile when inside viewer request volume", function () {
@@ -1315,7 +1314,7 @@ describe(
tilesetWithViewerRequestVolumeUrl,
{
skipLevelOfDetail: false,
- },
+ }
).then(function (tileset) {
const statistics = tileset._statistics;
@@ -1349,7 +1348,7 @@ describe(
viewRootOnly();
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetReplacement1Url,
+ tilesetReplacement1Url
).then(function (tileset) {
tileset.skipLevelOfDetail = false;
viewAllTiles();
@@ -1366,7 +1365,7 @@ describe(
function () {
scene.renderForSpecs();
expect(statistics.numberOfCommands).toEqual(4); // Render children
- },
+ }
);
});
});
@@ -1383,7 +1382,7 @@ describe(
viewRootOnly();
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetReplacement2Url,
+ tilesetReplacement2Url
).then(function (tileset) {
tileset.skipLevelOfDetail = false;
const statistics = tileset._statistics;
@@ -1397,9 +1396,9 @@ describe(
return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset).then(
function () {
expect(statistics.numberOfCommands).toEqual(2); // Renders two content tiles
- },
+ }
);
- },
+ }
);
});
});
@@ -1416,7 +1415,7 @@ describe(
viewRootOnly();
const tileset = await Cesium3DTilesTester.loadTileset(
scene,
- tilesetReplacement3Url,
+ tilesetReplacement3Url
);
tileset.skipLevelOfDetail = false;
const statistics = tileset._statistics;
@@ -1456,14 +1455,14 @@ describe(
});
});
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- tileset.skipLevelOfDetail = false;
- const statistics = tileset._statistics;
- scene.renderForSpecs();
- expect(statistics.numberOfCommands).toEqual(3);
- },
- );
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ tileset.skipLevelOfDetail = false;
+ const statistics = tileset._statistics;
+ scene.renderForSpecs();
+ expect(statistics.numberOfCommands).toEqual(3);
+ });
});
it("replacement and additive refinement", function () {
@@ -1476,7 +1475,7 @@ describe(
const statistics = tileset._statistics;
expect(statistics.visited).toEqual(7);
expect(statistics.numberOfCommands).toEqual(6);
- },
+ }
);
});
@@ -1484,12 +1483,12 @@ describe(
it("does not select visible tiles with invisible children", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetReplacementWithViewerRequestVolumeUrl,
+ tilesetReplacementWithViewerRequestVolumeUrl
).then(function (tileset) {
const center = Cartesian3.fromRadians(
centerLongitude,
centerLatitude,
- 22.0,
+ 22.0
);
scene.camera.lookAt(center, new HeadingPitchRange(0.0, 1.57, 1.0));
@@ -1501,33 +1500,33 @@ describe(
expect(
childRoot.visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).not.toEqual(CullingVolume.MASK_OUTSIDE);
expect(
childRoot.children[0].visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).toEqual(CullingVolume.MASK_OUTSIDE);
expect(
childRoot.children[1].visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).toEqual(CullingVolume.MASK_OUTSIDE);
expect(
childRoot.children[2].visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).toEqual(CullingVolume.MASK_OUTSIDE);
expect(
childRoot.children[3].visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).toEqual(CullingVolume.MASK_OUTSIDE);
expect(tileset._selectedTiles.length).toEqual(0);
@@ -1538,12 +1537,12 @@ describe(
it("does not select external tileset whose root has invisible children", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetOfTilesetsUrl,
+ tilesetOfTilesetsUrl
).then(function (tileset) {
const center = Cartesian3.fromRadians(
centerLongitude,
centerLatitude,
- 50.0,
+ 50.0
);
scene.camera.lookAt(center, new HeadingPitchRange(0.0, 1.57, 1.0));
const root = tileset.root;
@@ -1556,7 +1555,7 @@ describe(
expect(root._visible).toBe(false);
expect(externalRoot._visible).toBe(false);
expect(tileset.statistics.numberOfTilesCulledWithChildrenUnion).toBe(
- 1,
+ 1
);
});
});
@@ -1564,7 +1563,7 @@ describe(
it("does not select visible tiles not meeting SSE with visible children", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetReplacementWithViewerRequestVolumeUrl,
+ tilesetReplacementWithViewerRequestVolumeUrl
).then(function (tileset) {
const root = tileset.root;
const childRoot = root.children[0];
@@ -1575,33 +1574,33 @@ describe(
expect(
childRoot.visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).not.toEqual(CullingVolume.MASK_OUTSIDE);
expect(
childRoot.children[0].visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).not.toEqual(CullingVolume.MASK_OUTSIDE);
expect(
childRoot.children[1].visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).not.toEqual(CullingVolume.MASK_OUTSIDE);
expect(
childRoot.children[2].visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).not.toEqual(CullingVolume.MASK_OUTSIDE);
expect(
childRoot.children[3].visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).not.toEqual(CullingVolume.MASK_OUTSIDE);
expect(isSelected(tileset, childRoot)).toBe(false);
@@ -1611,7 +1610,7 @@ describe(
it("does select visible tiles meeting SSE with visible children", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetReplacementWithViewerRequestVolumeUrl,
+ tilesetReplacementWithViewerRequestVolumeUrl
).then(function (tileset) {
const root = tileset.root;
const childRoot = root.children[0];
@@ -1624,37 +1623,37 @@ describe(
expect(
childRoot.visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).not.toEqual(CullingVolume.MASK_OUTSIDE);
expect(
childRoot.children[0].visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).not.toEqual(CullingVolume.MASK_OUTSIDE);
expect(
childRoot.children[1].visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).not.toEqual(CullingVolume.MASK_OUTSIDE);
expect(
childRoot.children[2].visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).not.toEqual(CullingVolume.MASK_OUTSIDE);
expect(
childRoot.children[3].visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).not.toEqual(CullingVolume.MASK_OUTSIDE);
expect(isSelected(tileset, childRoot)).toBe(true);
- },
+ }
);
});
});
@@ -1666,7 +1665,7 @@ describe(
tilesetReplacementWithViewerRequestVolumeUrl,
{
cullWithChildrenBounds: false,
- },
+ }
).then(function (tileset) {
const root = tileset.root;
const childRoot = root.children[0];
@@ -1674,33 +1673,33 @@ describe(
expect(
childRoot.visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).not.toEqual(CullingVolume.MASK_OUTSIDE);
expect(
childRoot.children[0].visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).not.toEqual(CullingVolume.MASK_OUTSIDE);
expect(
childRoot.children[1].visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).not.toEqual(CullingVolume.MASK_OUTSIDE);
expect(
childRoot.children[2].visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).not.toEqual(CullingVolume.MASK_OUTSIDE);
expect(
childRoot.children[3].visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).not.toEqual(CullingVolume.MASK_OUTSIDE);
expect(tileset._selectedTiles.length).toEqual(1);
@@ -1711,7 +1710,7 @@ describe(
it("does select visible tiles with visible children passing request volumes", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetReplacementWithViewerRequestVolumeUrl,
+ tilesetReplacementWithViewerRequestVolumeUrl
).then(function (tileset) {
const root = tileset.root;
const childRoot = root.children[0];
@@ -1723,33 +1722,33 @@ describe(
expect(
childRoot.visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).not.toEqual(CullingVolume.MASK_OUTSIDE);
expect(
childRoot.children[0].visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).not.toEqual(CullingVolume.MASK_OUTSIDE);
expect(
childRoot.children[1].visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).not.toEqual(CullingVolume.MASK_OUTSIDE);
expect(
childRoot.children[2].visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).not.toEqual(CullingVolume.MASK_OUTSIDE);
expect(
childRoot.children[3].visibility(
scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
+ CullingVolume.MASK_INDETERMINATE
+ )
).not.toEqual(CullingVolume.MASK_OUTSIDE);
expect(tileset._selectedTiles.length).toEqual(1);
@@ -1759,7 +1758,7 @@ describe(
scene.renderForSpecs();
expect(tileset._selectedTiles.length).toEqual(4);
expect(isSelected(tileset, childRoot)).toBe(false);
- },
+ }
);
});
});
@@ -1771,7 +1770,7 @@ describe(
const tileset = await Cesium3DTilesTester.loadTileset(
scene,
- tilesetOfTilesetsUrl,
+ tilesetOfTilesetsUrl
);
// Root points to an external tileset JSON file and has no children until it is requested
const root = tileset.root;
@@ -1794,7 +1793,7 @@ describe(
const subtreeRoot = root.children[0];
expect(root.refine).toEqual(subtreeRoot.refine);
expect(root.contentBoundingVolume.boundingVolume).toEqual(
- subtreeRoot.contentBoundingVolume.boundingVolume,
+ subtreeRoot.contentBoundingVolume.boundingVolume
);
// Check that subtree root has 4 children
@@ -1813,11 +1812,11 @@ describe(
let expectedUrl = `Data/Cesium3DTiles/Tilesets/TilesetOfTilesets/tileset.json?${queryParams}`;
const tileset = await Cesium3DTilesTester.loadTileset(
scene,
- `${tilesetOfTilesetsUrl}?${queryParams}`,
+ `${tilesetOfTilesetsUrl}?${queryParams}`
);
//Make sure tileset JSON file was requested with query parameters
expect(Resource._Implementations.loadWithXhr.calls.argsFor(0)[0]).toEqual(
- expectedUrl,
+ expectedUrl
);
Resource._Implementations.loadWithXhr.calls.reset();
@@ -1832,10 +1831,10 @@ describe(
});
//Make sure tileset2.json was requested with query parameters and does not use parent tilesetVersion
expectedUrl = getAbsoluteUri(
- `Data/Cesium3DTiles/Tilesets/TilesetOfTilesets/tileset2.json?v=1.2.3&${queryParams}`,
+ `Data/Cesium3DTiles/Tilesets/TilesetOfTilesets/tileset2.json?v=1.2.3&${queryParams}`
);
expect(Resource._Implementations.loadWithXhr.calls.argsFor(0)[0]).toEqual(
- expectedUrl,
+ expectedUrl
);
});
@@ -1845,7 +1844,7 @@ describe(
const statistics = tileset._statistics;
expect(statistics.visited).toEqual(7); // Visits two tiles with tileset content, five tiles with b3dm content
expect(statistics.numberOfCommands).toEqual(5); // Render the five tiles with b3dm content
- },
+ }
);
});
@@ -1856,7 +1855,7 @@ describe(
const statistics = tileset._statistics;
expect(statistics.visited).toEqual(2); // Visits external tileset tile, and external tileset root
expect(statistics.numberOfCommands).toEqual(1); // Renders external tileset root
- },
+ }
);
});
@@ -1874,50 +1873,50 @@ describe(
Cesium3DTilesTester.expectRender(scene, tileset, function (rgba) {
expect(rgba).not.toEqual(color);
});
- },
+ }
);
});
it("debugFreezeFrame", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- viewRootOnly();
- scene.renderForSpecs();
- const statistics = tileset._statistics;
- expect(statistics.visited).toEqual(1);
- expect(statistics.numberOfCommands).toEqual(1);
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ viewRootOnly();
+ scene.renderForSpecs();
+ const statistics = tileset._statistics;
+ expect(statistics.visited).toEqual(1);
+ expect(statistics.numberOfCommands).toEqual(1);
- tileset.debugFreezeFrame = true;
- viewAllTiles();
- scene.renderForSpecs();
- expect(statistics.visited).toEqual(0); // selectTiles returns early, so no tiles are visited
- expect(statistics.numberOfCommands).toEqual(1); // root tile is still in selectedTiles list
- },
- );
+ tileset.debugFreezeFrame = true;
+ viewAllTiles();
+ scene.renderForSpecs();
+ expect(statistics.visited).toEqual(0); // selectTiles returns early, so no tiles are visited
+ expect(statistics.numberOfCommands).toEqual(1); // root tile is still in selectedTiles list
+ });
});
function checkDebugColorizeTiles(url) {
CesiumMath.setRandomNumberSeed(0);
- return Cesium3DTilesTester.loadTileset(scene, url).then(
- function (tileset) {
- // Get initial color
- let color;
- Cesium3DTilesTester.expectRender(scene, tileset, function (rgba) {
- color = rgba;
- });
+ return Cesium3DTilesTester.loadTileset(scene, url).then(function (
+ tileset
+ ) {
+ // Get initial color
+ let color;
+ Cesium3DTilesTester.expectRender(scene, tileset, function (rgba) {
+ color = rgba;
+ });
- // Check for debug color
- tileset.debugColorizeTiles = true;
- Cesium3DTilesTester.expectRender(scene, tileset, function (rgba) {
- expect(rgba).not.toEqual(color);
- });
+ // Check for debug color
+ tileset.debugColorizeTiles = true;
+ Cesium3DTilesTester.expectRender(scene, tileset, function (rgba) {
+ expect(rgba).not.toEqual(color);
+ });
- tileset.debugColorizeTiles = false;
- Cesium3DTilesTester.expectRender(scene, tileset, function (rgba) {
- expect(rgba).toEqual(color);
- });
- },
- );
+ tileset.debugColorizeTiles = false;
+ Cesium3DTilesTester.expectRender(scene, tileset, function (rgba) {
+ expect(rgba).toEqual(color);
+ });
+ });
}
it("debugColorizeTiles for b3dm with batch table", function () {
@@ -1981,43 +1980,43 @@ describe(
});
it("debugShowBoundingVolume", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- viewRootOnly();
- tileset.debugShowBoundingVolume = true;
- scene.renderForSpecs();
- const statistics = tileset._statistics;
- expect(statistics.visited).toEqual(1);
- expect(statistics.numberOfCommands).toEqual(2); // Tile command + bounding volume command
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ viewRootOnly();
+ tileset.debugShowBoundingVolume = true;
+ scene.renderForSpecs();
+ const statistics = tileset._statistics;
+ expect(statistics.visited).toEqual(1);
+ expect(statistics.numberOfCommands).toEqual(2); // Tile command + bounding volume command
- tileset.debugShowBoundingVolume = false;
- scene.renderForSpecs();
- expect(statistics.numberOfCommands).toEqual(1);
- },
- );
+ tileset.debugShowBoundingVolume = false;
+ scene.renderForSpecs();
+ expect(statistics.numberOfCommands).toEqual(1);
+ });
});
it("debugShowContentBoundingVolume", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- viewRootOnly();
- tileset.debugShowContentBoundingVolume = true;
- scene.renderForSpecs();
- const statistics = tileset._statistics;
- expect(statistics.visited).toEqual(1);
- expect(statistics.numberOfCommands).toEqual(2); // Tile command + bounding volume command
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ viewRootOnly();
+ tileset.debugShowContentBoundingVolume = true;
+ scene.renderForSpecs();
+ const statistics = tileset._statistics;
+ expect(statistics.visited).toEqual(1);
+ expect(statistics.numberOfCommands).toEqual(2); // Tile command + bounding volume command
- tileset.debugShowContentBoundingVolume = false;
- scene.renderForSpecs();
- expect(statistics.numberOfCommands).toEqual(1);
- },
- );
+ tileset.debugShowContentBoundingVolume = false;
+ scene.renderForSpecs();
+ expect(statistics.numberOfCommands).toEqual(1);
+ });
});
it("debugShowViewerRequestVolume", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithViewerRequestVolumeUrl,
+ tilesetWithViewerRequestVolumeUrl
).then(function (tileset) {
tileset.debugShowViewerRequestVolume = true;
scene.renderForSpecs();
@@ -2033,42 +2032,42 @@ describe(
it("show tile debug labels with regions", function () {
// tilesetUrl has bounding regions
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- tileset.debugShowGeometricError = true;
- scene.renderForSpecs();
- expect(tileset._tileDebugLabels).toBeDefined();
- expect(tileset._tileDebugLabels.length).toEqual(5);
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ tileset.debugShowGeometricError = true;
+ scene.renderForSpecs();
+ expect(tileset._tileDebugLabels).toBeDefined();
+ expect(tileset._tileDebugLabels.length).toEqual(5);
- const root = tileset.root;
- expect(tileset._tileDebugLabels._labels[0].text).toEqual(
- `Geometric error: ${root.geometricError}`,
- );
- expect(tileset._tileDebugLabels._labels[1].text).toEqual(
- `Geometric error: ${root.children[0].geometricError}`,
- );
- expect(tileset._tileDebugLabels._labels[2].text).toEqual(
- `Geometric error: ${root.children[1].geometricError}`,
- );
- expect(tileset._tileDebugLabels._labels[3].text).toEqual(
- `Geometric error: ${root.children[2].geometricError}`,
- );
- expect(tileset._tileDebugLabels._labels[4].text).toEqual(
- `Geometric error: ${root.children[3].geometricError}`,
- );
+ const root = tileset.root;
+ expect(tileset._tileDebugLabels._labels[0].text).toEqual(
+ `Geometric error: ${root.geometricError}`
+ );
+ expect(tileset._tileDebugLabels._labels[1].text).toEqual(
+ `Geometric error: ${root.children[0].geometricError}`
+ );
+ expect(tileset._tileDebugLabels._labels[2].text).toEqual(
+ `Geometric error: ${root.children[1].geometricError}`
+ );
+ expect(tileset._tileDebugLabels._labels[3].text).toEqual(
+ `Geometric error: ${root.children[2].geometricError}`
+ );
+ expect(tileset._tileDebugLabels._labels[4].text).toEqual(
+ `Geometric error: ${root.children[3].geometricError}`
+ );
- tileset.debugShowGeometricError = false;
- scene.renderForSpecs();
- expect(tileset._tileDebugLabels).not.toBeDefined();
- },
- );
+ tileset.debugShowGeometricError = false;
+ scene.renderForSpecs();
+ expect(tileset._tileDebugLabels).not.toBeDefined();
+ });
});
it("show tile debug labels with boxes", function () {
// tilesetWithTransformsUrl has bounding boxes
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithTransformsUrl,
+ tilesetWithTransformsUrl
).then(function (tileset) {
tileset.debugShowGeometricError = true;
scene.renderForSpecs();
@@ -2077,10 +2076,10 @@ describe(
const root = tileset.root;
expect(tileset._tileDebugLabels._labels[0].text).toEqual(
- `Geometric error: ${root.geometricError}`,
+ `Geometric error: ${root.geometricError}`
);
expect(tileset._tileDebugLabels._labels[1].text).toEqual(
- `Geometric error: ${root.children[0].geometricError}`,
+ `Geometric error: ${root.children[0].geometricError}`
);
tileset.debugShowGeometricError = false;
@@ -2093,7 +2092,7 @@ describe(
// tilesetWithViewerRequestVolumeUrl has bounding sphere
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithViewerRequestVolumeUrl,
+ tilesetWithViewerRequestVolumeUrl
).then(function (tileset) {
tileset.debugShowGeometricError = true;
scene.renderForSpecs();
@@ -2104,7 +2103,7 @@ describe(
for (let i = 0; i < length; ++i) {
expect(tileset._tileDebugLabels._labels[i].text).toEqual(
- `Geometric error: ${tileset._selectedTiles[i].geometricError}`,
+ `Geometric error: ${tileset._selectedTiles[i].geometricError}`
);
}
@@ -2116,133 +2115,133 @@ describe(
it("show tile debug labels with rendering statistics", function () {
// tilesetUrl has bounding regions
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- tileset.debugShowRenderingStatistics = true;
- viewRootOnly();
- scene.renderForSpecs();
- expect(tileset._tileDebugLabels).toBeDefined();
- expect(tileset._tileDebugLabels.length).toEqual(1);
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ tileset.debugShowRenderingStatistics = true;
+ viewRootOnly();
+ scene.renderForSpecs();
+ expect(tileset._tileDebugLabels).toBeDefined();
+ expect(tileset._tileDebugLabels.length).toEqual(1);
- const content = tileset.root.content;
- const expected =
- `Commands: ${tileset.root.commandsLength}\n` +
- `Triangles: ${content.trianglesLength}\n` +
- `Features: ${content.featuresLength}`;
+ const content = tileset.root.content;
+ const expected =
+ `Commands: ${tileset.root.commandsLength}\n` +
+ `Triangles: ${content.trianglesLength}\n` +
+ `Features: ${content.featuresLength}`;
- expect(tileset._tileDebugLabels._labels[0].text).toEqual(expected);
+ expect(tileset._tileDebugLabels._labels[0].text).toEqual(expected);
- tileset.debugShowRenderingStatistics = false;
- scene.renderForSpecs();
- expect(tileset._tileDebugLabels).not.toBeDefined();
- },
- );
+ tileset.debugShowRenderingStatistics = false;
+ scene.renderForSpecs();
+ expect(tileset._tileDebugLabels).not.toBeDefined();
+ });
});
it("show tile debug labels with memory usage", function () {
// tilesetUrl has bounding regions
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- tileset.debugShowMemoryUsage = true;
- viewRootOnly();
- scene.renderForSpecs();
- expect(tileset._tileDebugLabels).toBeDefined();
- expect(tileset._tileDebugLabels.length).toEqual(1);
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ tileset.debugShowMemoryUsage = true;
+ viewRootOnly();
+ scene.renderForSpecs();
+ expect(tileset._tileDebugLabels).toBeDefined();
+ expect(tileset._tileDebugLabels.length).toEqual(1);
- const expected =
- "Texture Memory: 0\n" +
- `Geometry Memory: ${(0.007).toLocaleString()}`;
+ const expected =
+ "Texture Memory: 0\n" +
+ `Geometry Memory: ${(0.007).toLocaleString()}`;
- expect(tileset._tileDebugLabels._labels[0].text).toEqual(expected);
+ expect(tileset._tileDebugLabels._labels[0].text).toEqual(expected);
- tileset.debugShowMemoryUsage = false;
- scene.renderForSpecs();
- expect(tileset._tileDebugLabels).not.toBeDefined();
- },
- );
+ tileset.debugShowMemoryUsage = false;
+ scene.renderForSpecs();
+ expect(tileset._tileDebugLabels).not.toBeDefined();
+ });
});
it("show tile debug labels with all statistics", function () {
// tilesetUrl has bounding regions
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- tileset.debugShowGeometricError = true;
- tileset.debugShowRenderingStatistics = true;
- tileset.debugShowMemoryUsage = true;
- tileset.debugShowUrl = true;
- viewRootOnly();
- scene.renderForSpecs();
- expect(tileset._tileDebugLabels).toBeDefined();
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ tileset.debugShowGeometricError = true;
+ tileset.debugShowRenderingStatistics = true;
+ tileset.debugShowMemoryUsage = true;
+ tileset.debugShowUrl = true;
+ viewRootOnly();
+ scene.renderForSpecs();
+ expect(tileset._tileDebugLabels).toBeDefined();
- const expected =
- "Geometric error: 70\n" +
- "Commands: 1\n" +
- "Triangles: 120\n" +
- "Features: 10\n" +
- "Texture Memory: 0\n" +
- `Geometry Memory: ${(0.007).toLocaleString()}\n` +
- "Url: parent.b3dm";
- expect(tileset._tileDebugLabels._labels[0].text).toEqual(expected);
+ const expected =
+ "Geometric error: 70\n" +
+ "Commands: 1\n" +
+ "Triangles: 120\n" +
+ "Features: 10\n" +
+ "Texture Memory: 0\n" +
+ `Geometry Memory: ${(0.007).toLocaleString()}\n` +
+ "Url: parent.b3dm";
+ expect(tileset._tileDebugLabels._labels[0].text).toEqual(expected);
- tileset.debugShowGeometricError = false;
- tileset.debugShowRenderingStatistics = false;
- tileset.debugShowMemoryUsage = false;
- tileset.debugShowUrl = false;
- scene.renderForSpecs();
- expect(tileset._tileDebugLabels).not.toBeDefined();
- },
- );
+ tileset.debugShowGeometricError = false;
+ tileset.debugShowRenderingStatistics = false;
+ tileset.debugShowMemoryUsage = false;
+ tileset.debugShowUrl = false;
+ scene.renderForSpecs();
+ expect(tileset._tileDebugLabels).not.toBeDefined();
+ });
});
it("show only picked tile debug label with all stats", function () {
// tilesetUrl has bounding regions
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- tileset.debugShowGeometricError = true;
- tileset.debugShowRenderingStatistics = true;
- tileset.debugShowMemoryUsage = true;
- tileset.debugShowUrl = true;
- tileset.debugPickedTileLabelOnly = true;
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ tileset.debugShowGeometricError = true;
+ tileset.debugShowRenderingStatistics = true;
+ tileset.debugShowMemoryUsage = true;
+ tileset.debugShowUrl = true;
+ tileset.debugPickedTileLabelOnly = true;
- const scratchPosition = new Cartesian3(1.0, 1.0, 1.0);
- tileset.debugPickedTile = tileset.root;
- tileset.debugPickPosition = scratchPosition;
+ const scratchPosition = new Cartesian3(1.0, 1.0, 1.0);
+ tileset.debugPickedTile = tileset.root;
+ tileset.debugPickPosition = scratchPosition;
- scene.renderForSpecs();
- expect(tileset._tileDebugLabels).toBeDefined();
+ scene.renderForSpecs();
+ expect(tileset._tileDebugLabels).toBeDefined();
- const expected =
- "Geometric error: 70\n" +
- "Commands: 1\n" +
- "Triangles: 120\n" +
- "Features: 10\n" +
- "Texture Memory: 0\n" +
- `Geometry Memory: ${(0.007).toLocaleString()}\n` +
- "Url: parent.b3dm";
- expect(tileset._tileDebugLabels.get(0).text).toEqual(expected);
- expect(tileset._tileDebugLabels.get(0).position).toEqual(
- scratchPosition,
- );
+ const expected =
+ "Geometric error: 70\n" +
+ "Commands: 1\n" +
+ "Triangles: 120\n" +
+ "Features: 10\n" +
+ "Texture Memory: 0\n" +
+ `Geometry Memory: ${(0.007).toLocaleString()}\n` +
+ "Url: parent.b3dm";
+ expect(tileset._tileDebugLabels.get(0).text).toEqual(expected);
+ expect(tileset._tileDebugLabels.get(0).position).toEqual(
+ scratchPosition
+ );
- tileset.debugPickedTile = undefined;
- scene.renderForSpecs();
- expect(tileset._tileDebugLabels.length).toEqual(0);
- },
- );
+ tileset.debugPickedTile = undefined;
+ scene.renderForSpecs();
+ expect(tileset._tileDebugLabels.length).toEqual(0);
+ });
});
it("does not request tiles when picking", function () {
viewNothing();
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- viewRootOnly();
- scene.pickForSpecs();
- expect(tileset._statistics.numberOfPendingRequests).toEqual(0);
- scene.renderForSpecs();
- expect(tileset._statistics.numberOfPendingRequests).toEqual(1);
- return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
- },
- );
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ viewRootOnly();
+ scene.pickForSpecs();
+ expect(tileset._statistics.numberOfPendingRequests).toEqual(0);
+ scene.renderForSpecs();
+ expect(tileset._statistics.numberOfPendingRequests).toEqual(1);
+ return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
+ });
});
it("does not process tiles when picking", async function () {
@@ -2298,18 +2297,18 @@ describe(
const spyUpdate = jasmine.createSpy("listener");
viewNothing();
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- tileset.loadProgress.addEventListener(spyUpdate);
- viewRootOnly();
- return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset).then(
- function () {
- expect(spyUpdate.calls.count()).toEqual(3);
- expect(spyUpdate.calls.allArgs()).toEqual(results);
- },
- );
- },
- );
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ tileset.loadProgress.addEventListener(spyUpdate);
+ viewRootOnly();
+ return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset).then(
+ function () {
+ expect(spyUpdate.calls.count()).toEqual(3);
+ expect(spyUpdate.calls.allArgs()).toEqual(results);
+ }
+ );
+ });
});
it("tilesLoaded", async function () {
@@ -2334,66 +2333,63 @@ describe(
await Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
viewAllTiles();
- await Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
- expect(spyUpdate1.calls.count()).toEqual(2);
- expect(spyUpdate2.calls.count()).toEqual(1);
- });
-
- it("tile visible event is raised", function () {
- viewRootOnly();
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- const spyUpdate = jasmine.createSpy("listener");
- tileset.tileVisible.addEventListener(spyUpdate);
- scene.renderForSpecs();
- expect(
- tileset.root.visibility(
- scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
- ).not.toEqual(CullingVolume.MASK_OUTSIDE);
- expect(spyUpdate.calls.count()).toEqual(1);
- expect(spyUpdate.calls.argsFor(0)[0]).toBe(tileset.root);
- return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
- },
- );
+ await Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
+ expect(spyUpdate1.calls.count()).toEqual(2);
+ expect(spyUpdate2.calls.count()).toEqual(1);
+ });
+
+ it("tile visible event is raised", function () {
+ viewRootOnly();
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ const spyUpdate = jasmine.createSpy("listener");
+ tileset.tileVisible.addEventListener(spyUpdate);
+ scene.renderForSpecs();
+ expect(
+ tileset.root.visibility(
+ scene.frameState,
+ CullingVolume.MASK_INDETERMINATE
+ )
+ ).not.toEqual(CullingVolume.MASK_OUTSIDE);
+ expect(spyUpdate.calls.count()).toEqual(1);
+ expect(spyUpdate.calls.argsFor(0)[0]).toBe(tileset.root);
+ return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
+ });
});
it("tile load event is raised", function () {
viewNothing();
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- const spyUpdate = jasmine.createSpy("listener");
- tileset.tileLoad.addEventListener(spyUpdate);
- tileset.cacheBytes = 0;
- viewRootOnly();
- return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset).then(
- function () {
- // Root is loaded
- expect(spyUpdate.calls.count()).toEqual(1);
- expect(spyUpdate.calls.argsFor(0)[0]).toBe(tileset.root);
- spyUpdate.calls.reset();
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ const spyUpdate = jasmine.createSpy("listener");
+ tileset.tileLoad.addEventListener(spyUpdate);
+ tileset.cacheBytes = 0;
+ viewRootOnly();
+ return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset).then(
+ function () {
+ // Root is loaded
+ expect(spyUpdate.calls.count()).toEqual(1);
+ expect(spyUpdate.calls.argsFor(0)[0]).toBe(tileset.root);
+ spyUpdate.calls.reset();
- // Unload from cache
- viewNothing();
- scene.renderForSpecs();
- expect(tileset.statistics.numberOfTilesWithContentReady).toEqual(
- 0,
- );
+ // Unload from cache
+ viewNothing();
+ scene.renderForSpecs();
+ expect(tileset.statistics.numberOfTilesWithContentReady).toEqual(0);
- // Look at root again
- viewRootOnly();
- return Cesium3DTilesTester.waitForTilesLoaded(
- scene,
- tileset,
- ).then(function () {
+ // Look at root again
+ viewRootOnly();
+ return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset).then(
+ function () {
expect(spyUpdate.calls.count()).toEqual(1);
expect(spyUpdate.calls.argsFor(0)[0]).toBe(tileset.root);
- });
- },
- );
- },
- );
+ }
+ );
+ }
+ );
+ });
});
it("tile failed event is raised", function () {
@@ -2409,10 +2405,10 @@ describe(
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
deferred.reject("404");
- },
+ }
);
tileset.tileFailed.addEventListener(spyUpdate);
tileset.cacheBytes = 0;
@@ -2439,18 +2435,18 @@ describe(
const ray = scene.camera.getPickRay(
new Cartesian2(
scene.drawingBufferWidth / 2.0,
- scene.drawingBufferHeight / 2.0,
- ),
+ scene.drawingBufferHeight / 2.0
+ )
);
const expected = new Cartesian3(
1215026.8094312553,
-4736367.339076743,
- 4081652.238842398,
+ 4081652.238842398
);
expect(tileset.pick(ray, scene.frameState)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -2460,7 +2456,7 @@ describe(
tilesetOfTilesetsUrl,
{
enablePick: !scene.frameState.context.webgl2,
- },
+ }
);
viewRootOnly();
scene.renderForSpecs();
@@ -2468,18 +2464,18 @@ describe(
const ray = scene.camera.getPickRay(
new Cartesian2(
scene.drawingBufferWidth / 2.0,
- scene.drawingBufferHeight / 2.0,
- ),
+ scene.drawingBufferHeight / 2.0
+ )
);
const expected = new Cartesian3(
1215026.8094312553,
-4736367.339076743,
- 4081652.238842398,
+ 4081652.238842398
);
expect(tileset.pick(ray, scene.frameState)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -2489,7 +2485,7 @@ describe(
instancedUrl,
{
enablePick: !scene.frameState.context.webgl2,
- },
+ }
);
viewInstances();
scene.renderForSpecs();
@@ -2497,18 +2493,18 @@ describe(
const ray = scene.camera.getPickRay(
new Cartesian2(
scene.drawingBufferWidth / 2.0,
- scene.drawingBufferHeight / 2.0,
- ),
+ scene.drawingBufferHeight / 2.0
+ )
);
const expected = new Cartesian3(
1215015.7820120894,
-4736324.352446682,
- 4081615.004915994,
+ 4081615.004915994
);
expect(tileset.pick(ray, scene.frameState)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -2518,7 +2514,7 @@ describe(
translucentUrl,
{
enablePick: !scene.frameState.context.webgl2,
- },
+ }
);
viewAllTiles();
scene.renderForSpecs();
@@ -2526,18 +2522,18 @@ describe(
const ray = scene.camera.getPickRay(
new Cartesian2(
scene.drawingBufferWidth / 2.0,
- scene.drawingBufferHeight / 2.0,
- ),
+ scene.drawingBufferHeight / 2.0
+ )
);
const expected = new Cartesian3(
1215013.1035421563,
-4736313.911345786,
- 4081605.96109977,
+ 4081605.96109977
);
expect(tileset.pick(ray, scene.frameState)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -2547,7 +2543,7 @@ describe(
tilesetWithTransformsUrl,
{
enablePick: !scene.frameState.context.webgl2,
- },
+ }
);
viewAllTiles();
scene.renderForSpecs();
@@ -2555,18 +2551,18 @@ describe(
const ray = scene.camera.getPickRay(
new Cartesian2(
scene.drawingBufferWidth / 2.0,
- scene.drawingBufferHeight / 2.0,
- ),
+ scene.drawingBufferHeight / 2.0
+ )
);
const expected = new Cartesian3(
1215013.1035421563,
-4736313.911345786,
- 4081605.96109977,
+ 4081605.96109977
);
expect(tileset.pick(ray, scene.frameState)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -2576,7 +2572,7 @@ describe(
pointCloudUrl,
{
enablePick: !scene.frameState.context.webgl2,
- },
+ }
);
viewAllTiles();
scene.renderForSpecs();
@@ -2584,8 +2580,8 @@ describe(
const ray = scene.camera.getPickRay(
new Cartesian2(
scene.drawingBufferWidth / 2.0,
- scene.drawingBufferHeight / 2.0,
- ),
+ scene.drawingBufferHeight / 2.0
+ )
);
expect(tileset.pick(ray, scene.frameState)).toBeUndefined();
@@ -2600,7 +2596,7 @@ describe(
scene.renderForSpecs();
const center = Ellipsoid.WGS84.cartesianToCartographic(
- tileset.boundingSphere.center,
+ tileset.boundingSphere.center
);
const height = tileset.getHeight(center, scene);
expect(height).toEqualEpsilon(78.1558019795064, CesiumMath.EPSILON8);
@@ -2616,35 +2612,35 @@ describe(
scene.renderForSpecs();
const center = Ellipsoid.WGS84.cartesianToCartographic(
- tileset.boundingSphere.center,
+ tileset.boundingSphere.center
);
const height = tileset.getHeight(center, scene);
expect(height).toEqualEpsilon(156.31161477299992, CesiumMath.EPSILON8);
});
it("destroys", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- const root = tileset.root;
- expect(tileset.isDestroyed()).toEqual(false);
- scene.primitives.remove(tileset);
- expect(tileset.isDestroyed()).toEqual(true);
-
- // Check that all tiles are destroyed
- expect(root.isDestroyed()).toEqual(true);
- expect(root.children[0].isDestroyed()).toEqual(true);
- expect(root.children[1].isDestroyed()).toEqual(true);
- expect(root.children[2].isDestroyed()).toEqual(true);
- expect(root.children[3].isDestroyed()).toEqual(true);
- },
- );
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ const root = tileset.root;
+ expect(tileset.isDestroyed()).toEqual(false);
+ scene.primitives.remove(tileset);
+ expect(tileset.isDestroyed()).toEqual(true);
+
+ // Check that all tiles are destroyed
+ expect(root.isDestroyed()).toEqual(true);
+ expect(root.children[0].isDestroyed()).toEqual(true);
+ expect(root.children[1].isDestroyed()).toEqual(true);
+ expect(root.children[2].isDestroyed()).toEqual(true);
+ expect(root.children[3].isDestroyed()).toEqual(true);
+ });
});
it("destroys before external tileset JSON file finishes loading", async function () {
viewNothing();
const tileset = await Cesium3DTilesTester.loadTileset(
scene,
- tilesetOfTilesetsUrl,
+ tilesetOfTilesetsUrl
);
const root = tileset.root;
@@ -2695,7 +2691,7 @@ describe(
ibl.imageBasedLightingFactor = new Cartesian2(0.0, 0.0);
expect(renderOptions).notToRender(rgba);
});
- },
+ }
);
});
@@ -2716,7 +2712,7 @@ describe(
expect(renderOptions).notToRender(rgba2);
});
});
- },
+ }
);
});
@@ -2725,23 +2721,23 @@ describe(
scene: scene,
time: new JulianDate(2457522.154792),
};
- return Cesium3DTilesTester.loadTileset(scene, url).then(
- function (tileset) {
- scene.camera.setView(setViewOptions);
- // In the glTF and glb tests, the back-face of the model is black,
- // so the background color is set to a different color to distinguish
- // between the results.
- scene.backgroundColor = new Color(0.0, 0.0, 1.0, 1.0);
- expect(renderOptions).toRenderAndCall(function (rgba) {
- expect(rgba).toEqual([0, 0, 255, 255]);
- tileset.backFaceCulling = false;
- expect(renderOptions).toRenderAndCall(function (rgba2) {
- expect(rgba2).not.toEqual(rgba);
- });
+ return Cesium3DTilesTester.loadTileset(scene, url).then(function (
+ tileset
+ ) {
+ scene.camera.setView(setViewOptions);
+ // In the glTF and glb tests, the back-face of the model is black,
+ // so the background color is set to a different color to distinguish
+ // between the results.
+ scene.backgroundColor = new Color(0.0, 0.0, 1.0, 1.0);
+ expect(renderOptions).toRenderAndCall(function (rgba) {
+ expect(rgba).toEqual([0, 0, 255, 255]);
+ tileset.backFaceCulling = false;
+ expect(renderOptions).toRenderAndCall(function (rgba2) {
+ expect(rgba2).not.toEqual(rgba);
});
- scene.backgroundColor = new Color(0.0, 0.0, 0.0, 1.0);
- },
- );
+ });
+ scene.backgroundColor = new Color(0.0, 0.0, 0.0, 1.0);
+ });
}
it("renders b3dm tileset when back-face culling is disabled", function () {
@@ -2749,12 +2745,12 @@ describe(
destination: new Cartesian3(
1215012.6853779217,
-4736313.101374343,
- 4081603.4657718465,
+ 4081603.4657718465
),
orientation: new HeadingPitchRoll(
6.283185307179584,
-0.49999825387267993,
- 6.283185307179586,
+ 6.283185307179586
),
endTransform: Matrix4.IDENTITY,
};
@@ -2767,12 +2763,12 @@ describe(
destination: new Cartesian3(
1215012.6853779217,
-4736313.101374343,
- 4081603.4657718465,
+ 4081603.4657718465
),
orientation: new HeadingPitchRoll(
6.283185307179584,
-0.49999825387267993,
- 6.283185307179586,
+ 6.283185307179586
),
endTransform: Matrix4.IDENTITY,
};
@@ -2785,12 +2781,12 @@ describe(
destination: new Cartesian3(
1215012.6853779217,
-4736313.101374343,
- 4081603.4657718465,
+ 4081603.4657718465
),
orientation: new HeadingPitchRoll(
6.283185307179584,
-0.49999825387267993,
- 6.283185307179586,
+ 6.283185307179586
),
endTransform: Matrix4.IDENTITY,
};
@@ -2803,12 +2799,12 @@ describe(
destination: new Cartesian3(
1215015.8599828142,
-4736324.65638894,
- 4081609.967056947,
+ 4081609.967056947
),
orientation: new HeadingPitchRoll(
6.283185307179585,
-0.5000006393986758,
- 6.283185307179586,
+ 6.283185307179586
),
endTransform: Matrix4.IDENTITY,
};
@@ -2830,7 +2826,7 @@ describe(
expect(scene).toRender([0, 0, 0, 255]);
tileset.style = new Cesium3DTileStyle({ show: "true" });
expect(scene).notToRender([0, 0, 0, 255]);
- },
+ }
);
});
@@ -2847,7 +2843,7 @@ describe(
tileset.style = new Cesium3DTileStyle({ show: "true" });
expect(scene).notToRender([0, 0, 0, 255]);
- },
+ }
);
});
@@ -2864,7 +2860,7 @@ describe(
// ${id} < 10 will always evaluate to true
tileset.style = new Cesium3DTileStyle({ show: "${id} < 200 / 2" });
expect(scene).notToRender([0, 0, 0, 255]);
- },
+ }
);
});
@@ -2878,7 +2874,7 @@ describe(
tileset.style = new Cesium3DTileStyle({ show: "true" });
expect(scene).notToRender([0, 0, 0, 255]);
- },
+ }
);
});
@@ -2896,7 +2892,7 @@ describe(
tileset.style = new Cesium3DTileStyle({ show: "true" });
expect(scene).notToRender([0, 0, 0, 255]);
- },
+ }
);
});
@@ -2914,7 +2910,7 @@ describe(
tileset.style = new Cesium3DTileStyle({ show: "true" });
expect(scene).notToRender([0, 0, 0, 255]);
- },
+ }
);
});
@@ -2955,7 +2951,7 @@ describe(
return Cesium3DTilesTester.loadTileset(scene, withoutBatchTableUrl).then(
function (tileset) {
return expectColorStyle(tileset);
- },
+ }
);
});
@@ -2963,14 +2959,14 @@ describe(
return Cesium3DTilesTester.loadTileset(scene, translucentUrl).then(
function (tileset) {
return expectColorStyle(tileset);
- },
+ }
);
});
it("applies color style to a tileset with translucent and opaque tiles", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- translucentOpaqueMixUrl,
+ translucentOpaqueMixUrl
).then(function (tileset) {
return expectColorStyle(tileset);
});
@@ -2980,7 +2976,7 @@ describe(
return Cesium3DTilesTester.loadTileset(scene, noBatchIdsUrl).then(
function (tileset) {
return expectColorStyle(tileset);
- },
+ }
);
});
@@ -2989,7 +2985,7 @@ describe(
function (tileset) {
viewGltfContent();
return expectColorStyle(tileset);
- },
+ }
);
});
@@ -2998,7 +2994,7 @@ describe(
function (tileset) {
viewGltfContent();
return expectColorStyle(tileset);
- },
+ }
);
});
@@ -3028,7 +3024,7 @@ describe(
feature.setProperty("id", feature.getProperty("id") - 10);
}
expect(scene).notToRender([0, 0, 0, 255]);
- },
+ }
);
});
@@ -3065,7 +3061,7 @@ describe(
expect(feature.show).toBe(false);
viewAllTiles();
expect(feature.show).toBe(false);
- },
+ }
);
});
@@ -3078,14 +3074,14 @@ describe(
scene.renderForSpecs();
expect(
tileset._statisticsPerPass[Cesium3DTilePass.RENDER]
- .numberOfTilesStyled,
+ .numberOfTilesStyled
).toBe(1);
scene.pickForSpecs();
expect(
tileset._statisticsPerPass[Cesium3DTilePass.PICK]
- .numberOfTilesStyled,
+ .numberOfTilesStyled
).toBe(0);
- },
+ }
);
});
@@ -3116,7 +3112,7 @@ describe(
expect(rgba[2]).toEqual(0);
expect(rgba[3]).toEqual(255);
});
- },
+ }
);
});
@@ -3156,7 +3152,7 @@ describe(
expect(rgba[2]).toBeGreaterThan(0);
expect(rgba[3]).toEqual(255);
});
- },
+ }
);
});
@@ -3173,7 +3169,7 @@ describe(
scene.renderForSpecs();
expect(tileset.root.content.getFeature(0).color).toEqual(Color.WHITE);
expect(tileset.root.content.getFeature(1).color).toEqual(Color.BLACK);
- },
+ }
);
});
@@ -3199,7 +3195,7 @@ describe(
scene.renderForSpecs();
expect(tileset.root.content.getFeature(0).show).toBe(true);
expect(tileset.root.content.getFeature(1).show).toBe(false);
- },
+ }
);
});
@@ -3216,7 +3212,7 @@ describe(
expect(rgba[3]).toEqual(255);
});
});
- },
+ }
);
});
@@ -3243,7 +3239,7 @@ describe(
style.show._value = true;
tileset.makeStyleDirty();
expect(scene).notToRender([0, 0, 0, 255]);
- },
+ }
);
});
@@ -3270,7 +3266,7 @@ describe(
expect(rgba[2]).toBe(0);
expect(rgba[3]).toEqual(255);
});
- },
+ }
);
});
@@ -3291,7 +3287,7 @@ describe(
scene.renderForSpecs();
expect(statistics.numberOfTilesStyled).toBe(0);
- },
+ }
);
});
@@ -3313,7 +3309,7 @@ describe(
tileset.style = style;
scene.renderForSpecs();
expect(statistics.numberOfTilesStyled).toBe(0);
- },
+ }
);
});
@@ -3504,8 +3500,7 @@ describe(
ContextLimits._maximumVertexTextureImageUnits = 0;
return testColorBlendMode(colorsUrl).then(function () {
// Re-enable VTF
- ContextLimits._maximumVertexTextureImageUnits =
- maximumVertexTextureImageUnits;
+ ContextLimits._maximumVertexTextureImageUnits = maximumVertexTextureImageUnits;
});
});
@@ -3526,136 +3521,134 @@ describe(
// Cache replacement tests
it("Unload all cached tiles not required to meet SSE using cacheBytes", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- tileset.cacheBytes = 0;
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ tileset.cacheBytes = 0;
- // Render parent and four children (using additive refinement)
- viewAllTiles();
- scene.renderForSpecs();
+ // Render parent and four children (using additive refinement)
+ viewAllTiles();
+ scene.renderForSpecs();
- const statistics = tileset._statistics;
- expect(statistics.numberOfCommands).toEqual(5);
- expect(statistics.numberOfTilesWithContentReady).toEqual(5); // Five loaded tiles
- expect(tileset.totalMemoryUsageInBytes).toEqual(37200); // Specific to this tileset
+ const statistics = tileset._statistics;
+ expect(statistics.numberOfCommands).toEqual(5);
+ expect(statistics.numberOfTilesWithContentReady).toEqual(5); // Five loaded tiles
+ expect(tileset.totalMemoryUsageInBytes).toEqual(37200); // Specific to this tileset
- // Zoom out so only root tile is needed to meet SSE. This unloads
- // the four children since the maximum memory usage is zero.
- viewRootOnly();
- scene.renderForSpecs();
+ // Zoom out so only root tile is needed to meet SSE. This unloads
+ // the four children since the maximum memory usage is zero.
+ viewRootOnly();
+ scene.renderForSpecs();
- expect(statistics.numberOfCommands).toEqual(1);
- expect(statistics.numberOfTilesWithContentReady).toEqual(1);
- expect(tileset.totalMemoryUsageInBytes).toEqual(7440); // Specific to this tileset
+ expect(statistics.numberOfCommands).toEqual(1);
+ expect(statistics.numberOfTilesWithContentReady).toEqual(1);
+ expect(tileset.totalMemoryUsageInBytes).toEqual(7440); // Specific to this tileset
- // Zoom back in so all four children are re-requested.
- viewAllTiles();
+ // Zoom back in so all four children are re-requested.
+ viewAllTiles();
- return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset).then(
- function () {
- expect(statistics.numberOfCommands).toEqual(5);
- expect(statistics.numberOfTilesWithContentReady).toEqual(5); // Five loaded tiles
- expect(tileset.totalMemoryUsageInBytes).toEqual(37200); // Specific to this tileset
- },
- );
- },
- );
+ return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset).then(
+ function () {
+ expect(statistics.numberOfCommands).toEqual(5);
+ expect(statistics.numberOfTilesWithContentReady).toEqual(5); // Five loaded tiles
+ expect(tileset.totalMemoryUsageInBytes).toEqual(37200); // Specific to this tileset
+ }
+ );
+ });
});
it("Unload some cached tiles not required to meet SSE using cacheBytes", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- tileset.cacheBytes = 0.025 * 1024 * 1024; // Just enough memory to allow 3 tiles to remain
- // Render parent and four children (using additive refinement)
- viewAllTiles();
- scene.renderForSpecs();
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ tileset.cacheBytes = 0.025 * 1024 * 1024; // Just enough memory to allow 3 tiles to remain
+ // Render parent and four children (using additive refinement)
+ viewAllTiles();
+ scene.renderForSpecs();
- const statistics = tileset._statistics;
- expect(statistics.numberOfCommands).toEqual(5);
- expect(statistics.numberOfTilesWithContentReady).toEqual(5); // Five loaded tiles
+ const statistics = tileset._statistics;
+ expect(statistics.numberOfCommands).toEqual(5);
+ expect(statistics.numberOfTilesWithContentReady).toEqual(5); // Five loaded tiles
- // Zoom out so only root tile is needed to meet SSE. This unloads
- // two of the four children so three tiles are still loaded (the
- // root and two children) since the maximum memory usage is sufficient.
- viewRootOnly();
- scene.renderForSpecs();
+ // Zoom out so only root tile is needed to meet SSE. This unloads
+ // two of the four children so three tiles are still loaded (the
+ // root and two children) since the maximum memory usage is sufficient.
+ viewRootOnly();
+ scene.renderForSpecs();
- expect(statistics.numberOfCommands).toEqual(1);
- expect(statistics.numberOfTilesWithContentReady).toEqual(3);
+ expect(statistics.numberOfCommands).toEqual(1);
+ expect(statistics.numberOfTilesWithContentReady).toEqual(3);
- // Zoom back in so the two children are re-requested.
- viewAllTiles();
+ // Zoom back in so the two children are re-requested.
+ viewAllTiles();
- return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset).then(
- function () {
- expect(statistics.numberOfCommands).toEqual(5);
- expect(statistics.numberOfTilesWithContentReady).toEqual(5); // Five loaded tiles
- },
- );
- },
- );
+ return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset).then(
+ function () {
+ expect(statistics.numberOfCommands).toEqual(5);
+ expect(statistics.numberOfTilesWithContentReady).toEqual(5); // Five loaded tiles
+ }
+ );
+ });
});
it("Restrict tileset memory usage with maximumCacheOverflowBytes", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- tileset.cacheBytes = 0.025 * 1024 * 1024; // Just enough memory to allow 3 tiles to remain
- tileset.maximumCacheOverflowBytes = 0;
- expect(tileset.memoryAdjustedScreenSpaceError).toEqual(16);
-
- // Zoom out so only root tile is needed to meet SSE.
- viewRootOnly();
- scene.renderForSpecs();
- const statistics = tileset._statistics;
- expect(statistics.numberOfCommands).toEqual(1);
- expect(statistics.numberOfTilesWithContentReady).toEqual(3);
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ tileset.cacheBytes = 0.025 * 1024 * 1024; // Just enough memory to allow 3 tiles to remain
+ tileset.maximumCacheOverflowBytes = 0;
+ expect(tileset.memoryAdjustedScreenSpaceError).toEqual(16);
+
+ // Zoom out so only root tile is needed to meet SSE.
+ viewRootOnly();
+ scene.renderForSpecs();
+ const statistics = tileset._statistics;
+ expect(statistics.numberOfCommands).toEqual(1);
+ expect(statistics.numberOfTilesWithContentReady).toEqual(3);
- // Zoom back in and attempt to render all tiles
- viewAllTiles();
+ // Zoom back in and attempt to render all tiles
+ viewAllTiles();
- return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset).then(
- function () {
- // Only 3 tiles should have been actually loaded
- expect(statistics.numberOfCommands).toEqual(3);
- expect(statistics.numberOfTilesWithContentReady).toEqual(3); // Three loaded tiles
- // SSE should have been adjusted higher
- expect(tileset.memoryAdjustedScreenSpaceError).toBeGreaterThan(
- 16,
- );
- },
- );
- },
- );
+ return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset).then(
+ function () {
+ // Only 3 tiles should have been actually loaded
+ expect(statistics.numberOfCommands).toEqual(3);
+ expect(statistics.numberOfTilesWithContentReady).toEqual(3); // Three loaded tiles
+ // SSE should have been adjusted higher
+ expect(tileset.memoryAdjustedScreenSpaceError).toBeGreaterThan(16);
+ }
+ );
+ });
});
it("Unloads cached tiles outside of the view frustum using cacheBytes", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- tileset.cacheBytes = 0;
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ tileset.cacheBytes = 0;
- scene.renderForSpecs();
- const statistics = tileset._statistics;
- expect(statistics.numberOfCommands).toEqual(5);
- expect(statistics.numberOfTilesWithContentReady).toEqual(5);
+ scene.renderForSpecs();
+ const statistics = tileset._statistics;
+ expect(statistics.numberOfCommands).toEqual(5);
+ expect(statistics.numberOfTilesWithContentReady).toEqual(5);
- viewSky();
+ viewSky();
- // All tiles are unloaded
- scene.renderForSpecs();
- expect(statistics.numberOfCommands).toEqual(0);
- expect(statistics.numberOfTilesWithContentReady).toEqual(0);
+ // All tiles are unloaded
+ scene.renderForSpecs();
+ expect(statistics.numberOfCommands).toEqual(0);
+ expect(statistics.numberOfTilesWithContentReady).toEqual(0);
- // Reset camera so all tiles are reloaded
- viewAllTiles();
+ // Reset camera so all tiles are reloaded
+ viewAllTiles();
- return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset).then(
- function () {
- expect(statistics.numberOfCommands).toEqual(5);
- expect(statistics.numberOfTilesWithContentReady).toEqual(5);
- },
- );
- },
- );
+ return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset).then(
+ function () {
+ expect(statistics.numberOfCommands).toEqual(5);
+ expect(statistics.numberOfTilesWithContentReady).toEqual(5);
+ }
+ );
+ });
});
it("Unloads cached tiles in a tileset with external tileset JSON file using cacheBytes", function () {
@@ -3689,9 +3682,9 @@ describe(
expect(statistics.numberOfTilesWithContentReady).toEqual(5);
expect(cacheList.length - 1).toEqual(5);
- },
+ }
);
- },
+ }
);
});
@@ -3720,9 +3713,9 @@ describe(
function () {
expect(statistics.numberOfCommands).toEqual(4);
expect(statistics.numberOfTilesWithContentReady).toEqual(4);
- },
+ }
);
- },
+ }
);
});
@@ -3735,7 +3728,7 @@ describe(
//
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetReplacement1Url,
+ tilesetReplacement1Url
).then(function (tileset) {
tileset.cacheBytes = 0; // Only root needs to be visible
@@ -3762,74 +3755,74 @@ describe(
function () {
expect(statistics.numberOfCommands).toEqual(4);
expect(statistics.numberOfTilesWithContentReady).toEqual(5);
- },
+ }
);
});
});
it("Explicitly unloads cached tiles with trimLoadedTiles", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- tileset.cacheBytes = 0.05 * 1024 * 1024;
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ tileset.cacheBytes = 0.05 * 1024 * 1024;
- // Render parent and four children (using additive refinement)
- viewAllTiles();
- scene.renderForSpecs();
+ // Render parent and four children (using additive refinement)
+ viewAllTiles();
+ scene.renderForSpecs();
- const statistics = tileset._statistics;
- expect(statistics.numberOfCommands).toEqual(5);
- expect(statistics.numberOfTilesWithContentReady).toEqual(5); // Five loaded tiles
+ const statistics = tileset._statistics;
+ expect(statistics.numberOfCommands).toEqual(5);
+ expect(statistics.numberOfTilesWithContentReady).toEqual(5); // Five loaded tiles
- // Zoom out so only root tile is needed to meet SSE. The children
- // are not unloaded since max number of loaded tiles is five.
- viewRootOnly();
- scene.renderForSpecs();
+ // Zoom out so only root tile is needed to meet SSE. The children
+ // are not unloaded since max number of loaded tiles is five.
+ viewRootOnly();
+ scene.renderForSpecs();
- expect(statistics.numberOfCommands).toEqual(1);
- expect(statistics.numberOfTilesWithContentReady).toEqual(5);
+ expect(statistics.numberOfCommands).toEqual(1);
+ expect(statistics.numberOfTilesWithContentReady).toEqual(5);
- tileset.trimLoadedTiles();
- scene.renderForSpecs();
+ tileset.trimLoadedTiles();
+ scene.renderForSpecs();
- expect(statistics.numberOfCommands).toEqual(1);
- expect(statistics.numberOfTilesWithContentReady).toEqual(1);
- },
- );
+ expect(statistics.numberOfCommands).toEqual(1);
+ expect(statistics.numberOfTilesWithContentReady).toEqual(1);
+ });
});
it("tileUnload event is raised", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- tileset.cacheBytes = 0;
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ tileset.cacheBytes = 0;
- // Render parent and four children (using additive refinement)
- viewAllTiles();
- scene.renderForSpecs();
+ // Render parent and four children (using additive refinement)
+ viewAllTiles();
+ scene.renderForSpecs();
- const statistics = tileset._statistics;
- expect(statistics.numberOfCommands).toEqual(5);
- expect(statistics.numberOfTilesWithContentReady).toEqual(5); // Five loaded tiles
+ const statistics = tileset._statistics;
+ expect(statistics.numberOfCommands).toEqual(5);
+ expect(statistics.numberOfTilesWithContentReady).toEqual(5); // Five loaded tiles
- // Zoom out so only root tile is needed to meet SSE. All the
- // children are unloaded since max number of loaded tiles is one.
- viewRootOnly();
- const spyUpdate = jasmine.createSpy("listener");
- tileset.tileUnload.addEventListener(spyUpdate);
- scene.renderForSpecs();
+ // Zoom out so only root tile is needed to meet SSE. All the
+ // children are unloaded since max number of loaded tiles is one.
+ viewRootOnly();
+ const spyUpdate = jasmine.createSpy("listener");
+ tileset.tileUnload.addEventListener(spyUpdate);
+ scene.renderForSpecs();
- expect(
- tileset.root.visibility(
- scene.frameState,
- CullingVolume.MASK_INDETERMINATE,
- ),
- ).not.toEqual(CullingVolume.MASK_OUTSIDE);
- expect(spyUpdate.calls.count()).toEqual(4);
- expect(spyUpdate.calls.argsFor(0)[0]).toBe(tileset.root.children[0]);
- expect(spyUpdate.calls.argsFor(1)[0]).toBe(tileset.root.children[1]);
- expect(spyUpdate.calls.argsFor(2)[0]).toBe(tileset.root.children[2]);
- expect(spyUpdate.calls.argsFor(3)[0]).toBe(tileset.root.children[3]);
- },
- );
+ expect(
+ tileset.root.visibility(
+ scene.frameState,
+ CullingVolume.MASK_INDETERMINATE
+ )
+ ).not.toEqual(CullingVolume.MASK_OUTSIDE);
+ expect(spyUpdate.calls.count()).toEqual(4);
+ expect(spyUpdate.calls.argsFor(0)[0]).toBe(tileset.root.children[0]);
+ expect(spyUpdate.calls.argsFor(1)[0]).toBe(tileset.root.children[1]);
+ expect(spyUpdate.calls.argsFor(2)[0]).toBe(tileset.root.children[2]);
+ expect(spyUpdate.calls.argsFor(3)[0]).toBe(tileset.root.children[3]);
+ });
});
it("cacheBytes throws when negative", async function () {
@@ -3861,7 +3854,7 @@ describe(
const totalCommands = b3dmCommands + i3dmCommands;
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithTransformsUrl,
+ tilesetWithTransformsUrl
).then(function (tileset) {
const statistics = tileset._statistics;
const root = tileset.root;
@@ -3872,7 +3865,7 @@ describe(
let computedTransform = Matrix4.multiply(
rootTransform,
childTransform,
- new Matrix4(),
+ new Matrix4()
);
expect(statistics.numberOfCommands).toBe(totalCommands);
@@ -3881,20 +3874,20 @@ describe(
// Set the tileset's modelMatrix
const tilesetTransform = Matrix4.fromTranslation(
- new Cartesian3(0.0, 1.0, 0.0),
+ new Cartesian3(0.0, 1.0, 0.0)
);
tileset.modelMatrix = tilesetTransform;
computedTransform = Matrix4.multiply(
tilesetTransform,
computedTransform,
- computedTransform,
+ computedTransform
);
scene.renderForSpecs();
expect(child.computedTransform).toEqual(computedTransform);
// Set the modelMatrix somewhere off screen
tileset.modelMatrix = Matrix4.fromTranslation(
- new Cartesian3(0.0, 100000.0, 0.0),
+ new Cartesian3(0.0, 100000.0, 0.0)
);
scene.renderForSpecs();
expect(statistics.numberOfCommands).toBe(0);
@@ -3906,7 +3899,7 @@ describe(
// Do the same steps for a tile transform
child.transform = Matrix4.fromTranslation(
- new Cartesian3(0.0, 100000.0, 0.0),
+ new Cartesian3(0.0, 100000.0, 0.0)
);
scene.renderForSpecs();
expect(statistics.numberOfCommands).toBe(1);
@@ -3925,7 +3918,7 @@ describe(
return Cesium3DTilesTester.loadTileset(
scene,
tilesetUrl,
- skipLevelOfDetailOptions,
+ skipLevelOfDetailOptions
).then(function (tileset) {
viewAllTiles();
scene.renderForSpecs();
@@ -3938,7 +3931,7 @@ describe(
function (tileset) {
expect(statistics.numberOfTilesWithContentReady).toEqual(5);
expect(tileset.hasMixedContent).toBe(false);
- },
+ }
);
});
});
@@ -3947,7 +3940,7 @@ describe(
return Cesium3DTilesTester.loadTileset(
scene,
tilesetReplacement3Url,
- skipLevelOfDetailOptions,
+ skipLevelOfDetailOptions
).then(function (tileset) {
const statistics = tileset._statistics;
@@ -3961,7 +3954,7 @@ describe(
expect(tileset.hasMixedContent).toBe(true);
expect(statistics.numberOfTilesWithContentReady).toEqual(2);
expect(
- tileset.root.children[0].children[0].children[3]._selectionDepth,
+ tileset.root.children[0].children[0].children[3]._selectionDepth
).toEqual(1);
expect(tileset.root._selectionDepth).toEqual(0);
@@ -3969,7 +3962,7 @@ describe(
function (tileset) {
expect(statistics.numberOfTilesWithContentReady).toEqual(5);
expect(tileset.hasMixedContent).toBe(false);
- },
+ }
);
});
});
@@ -3978,7 +3971,7 @@ describe(
return Cesium3DTilesTester.loadTileset(
scene,
tilesetReplacement3Url,
- skipLevelOfDetailOptions,
+ skipLevelOfDetailOptions
).then(function (tileset) {
tileset.root.children[0].children[0].children[0].unloadContent();
tileset.root.children[0].children[0].children[1].unloadContent();
@@ -3997,7 +3990,7 @@ describe(
return Cesium3DTilesTester.loadTileset(
scene,
tilesetReplacement3Url,
- skipLevelOfDetailOptions,
+ skipLevelOfDetailOptions
).then(function (tileset) {
const statistics = tileset._statistics;
const root = tileset.root;
@@ -4014,10 +4007,10 @@ describe(
expect(isSelected(tileset, root)).toBe(true);
expect(root._finalResolution).toBe(false);
expect(
- isSelected(tileset, root.children[0].children[0].children[3]),
+ isSelected(tileset, root.children[0].children[0].children[3])
).toBe(true);
expect(root.children[0].children[0].children[3]._finalResolution).toBe(
- true,
+ true
);
expect(tileset.hasMixedContent).toBe(true);
@@ -4035,7 +4028,7 @@ describe(
return Cesium3DTilesTester.loadTileset(
scene,
tilesetReplacement3Url,
- skipLevelOfDetailOptions,
+ skipLevelOfDetailOptions
).then(function (tileset) {
const statistics = tileset._statistics;
const root = tileset.root;
@@ -4052,16 +4045,16 @@ describe(
expect(isSelected(tileset, root)).toBe(true);
expect(root._finalResolution).toBe(true);
expect(
- isSelected(tileset, root.children[0].children[0].children[0]),
+ isSelected(tileset, root.children[0].children[0].children[0])
).toBe(false);
expect(
- isSelected(tileset, root.children[0].children[0].children[1]),
+ isSelected(tileset, root.children[0].children[0].children[1])
).toBe(false);
expect(
- isSelected(tileset, root.children[0].children[0].children[2]),
+ isSelected(tileset, root.children[0].children[0].children[2])
).toBe(false);
expect(
- isSelected(tileset, root.children[0].children[0].children[3]),
+ isSelected(tileset, root.children[0].children[0].children[3])
).toBe(false);
expect(tileset.hasMixedContent).toBe(false);
@@ -4085,11 +4078,11 @@ describe(
return Cesium3DTilesTester.loadTileset(
scene,
tilesetReplacement3Url,
- skipLevelOfDetailOptions,
+ skipLevelOfDetailOptions
).then(function (tileset) {
const statistics = tileset._statistics;
expect(statistics.numberOfCommands).toEqual(
- tileset._selectedTiles.length,
+ tileset._selectedTiles.length
);
const commandList = scene.frameState.commandList;
@@ -4116,7 +4109,7 @@ describe(
return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset).then(
function (tileset) {
expect(statistics.numberOfTilesWithContentReady).toBe(5);
- },
+ }
);
});
});
@@ -4146,9 +4139,9 @@ describe(
function (tileset) {
expect(!isSelected(tileset, child));
expect(isSelected(tileset, root));
- },
+ }
);
- },
+ }
);
});
});
@@ -4157,7 +4150,7 @@ describe(
return Cesium3DTilesTester.loadTileset(
scene,
tilesetOfTilesetsUrl,
- skipLevelOfDetailOptions,
+ skipLevelOfDetailOptions
).then(function (tileset) {
const statistics = tileset._statistics;
const parent = tileset.root.children[0];
@@ -4188,7 +4181,7 @@ describe(
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
batchedColorsB3dmUrl,
@@ -4197,9 +4190,9 @@ describe(
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
- },
+ }
);
const tile = tileset.root;
const statistics = tileset._statistics;
@@ -4211,10 +4204,10 @@ describe(
const expireDate = JulianDate.addSeconds(
JulianDate.now(),
5.0,
- new JulianDate(),
+ new JulianDate()
);
expect(
- JulianDate.secondsDifference(tile.expireDate, expireDate),
+ JulianDate.secondsDifference(tile.expireDate, expireDate)
).toEqualEpsilon(0.0, CesiumMath.EPSILON1);
expect(tile.expireDuration).toBe(5.0);
expect(tile.contentExpired).toBe(false);
@@ -4230,7 +4223,7 @@ describe(
tile.expireDate = JulianDate.addSeconds(
JulianDate.now(),
-1.0,
- new JulianDate(),
+ new JulianDate()
);
// Stays in the expired state until the request goes through
@@ -4256,8 +4249,8 @@ describe(
expect(tile._expiredContent).toBeDefined(); // Still holds onto expired content until the content state is READY
// Check that url contains a query param with the timestamp
- const url =
- Resource._Implementations.loadWithXhr.calls.first().args[0];
+ const url = Resource._Implementations.loadWithXhr.calls.first()
+ .args[0];
expect(url.indexOf("expired=") >= 0).toBe(true);
// statistics are still the same
@@ -4281,7 +4274,7 @@ describe(
return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
});
- },
+ }
);
});
@@ -4296,35 +4289,33 @@ describe(
it("tile with tileset content expires", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetSubtreeExpirationUrl,
+ tilesetSubtreeExpirationUrl
).then(async function (tileset) {
// Intercept the request and load a subtree with one less child. Still want to make an actual request to simulate
// real use cases instead of immediately returning a pre-created array buffer.
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ const newDeferred = defer();
+ Resource._DefaultImplementations.loadWithXhr(
+ tilesetSubtreeUrl,
responseType,
method,
data,
headers,
- deferred,
- overrideMimeType,
- ) {
- const newDeferred = defer();
- Resource._DefaultImplementations.loadWithXhr(
- tilesetSubtreeUrl,
- responseType,
- method,
- data,
- headers,
- newDeferred,
- overrideMimeType,
- );
- newDeferred.promise.then(function (arrayBuffer) {
- deferred.resolve(modifySubtreeBuffer(arrayBuffer));
- });
- },
- );
+ newDeferred,
+ overrideMimeType
+ );
+ newDeferred.promise.then(function (arrayBuffer) {
+ deferred.resolve(modifySubtreeBuffer(arrayBuffer));
+ });
+ });
const subtreeRoot = tileset.root.children[0];
const subtreeChildren = subtreeRoot.children[0].children;
@@ -4340,7 +4331,7 @@ describe(
subtreeRoot.expireDate = JulianDate.addSeconds(
JulianDate.now(),
-1.0,
- new JulianDate(),
+ new JulianDate()
);
// Listen to tile unload events
@@ -4376,7 +4367,7 @@ describe(
it("tile expires and request fails", async function () {
const tileset = await Cesium3DTilesTester.loadTileset(
scene,
- batchedExpirationUrl,
+ batchedExpirationUrl
);
spyOn(Resource.prototype, "fetchArrayBuffer").and.callFake(() => {
return Promise.reject(new Error("404"));
@@ -4388,7 +4379,7 @@ describe(
tile.expireDate = JulianDate.addSeconds(
JulianDate.now(),
-1.0,
- new JulianDate(),
+ new JulianDate()
);
const failedSpy = jasmine.createSpy("listenerSpy");
@@ -4405,48 +4396,48 @@ describe(
expect(failedSpy).toHaveBeenCalledWith(
jasmine.objectContaining({
message: "404",
- }),
+ })
);
expect(statistics.numberOfCommands).toBe(0);
expect(statistics.numberOfTilesTotal).toBe(1);
});
it("tile expiration date", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- const tile = tileset.root;
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ const tile = tileset.root;
- // Trigger expiration to happen next frame
- tile.expireDate = JulianDate.addSeconds(
- JulianDate.now(),
- -1.0,
- new JulianDate(),
- );
+ // Trigger expiration to happen next frame
+ tile.expireDate = JulianDate.addSeconds(
+ JulianDate.now(),
+ -1.0,
+ new JulianDate()
+ );
- // Stays in the expired state until the request goes through
- const originalMaxmimumRequests = RequestScheduler.maximumRequests;
- RequestScheduler.maximumRequests = 0; // Artificially limit Request Scheduler so the request won't go through
- scene.renderForSpecs();
- RequestScheduler.maximumRequests = originalMaxmimumRequests;
+ // Stays in the expired state until the request goes through
+ const originalMaxmimumRequests = RequestScheduler.maximumRequests;
+ RequestScheduler.maximumRequests = 0; // Artificially limit Request Scheduler so the request won't go through
+ scene.renderForSpecs();
+ RequestScheduler.maximumRequests = originalMaxmimumRequests;
- expect(tile.contentExpired).toBe(true);
+ expect(tile.contentExpired).toBe(true);
- return pollToPromise(function () {
- scene.renderForSpecs();
- return tile.contentReady;
- }).then(function () {
- scene.renderForSpecs();
- expect(tile._expiredContent).toBeUndefined();
- expect(tile.expireDate).toBeUndefined();
- });
- },
- );
+ return pollToPromise(function () {
+ scene.renderForSpecs();
+ return tile.contentReady;
+ }).then(function () {
+ scene.renderForSpecs();
+ expect(tile._expiredContent).toBeUndefined();
+ expect(tile.expireDate).toBeUndefined();
+ });
+ });
});
it("supports content data URIs", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetUrlWithContentUri,
+ tilesetUrlWithContentUri
).then(function (tileset) {
const statistics = tileset._statistics;
expect(statistics.visited).toEqual(1);
@@ -4455,25 +4446,25 @@ describe(
});
it("destroys attached ClippingPlaneCollections and ClippingPlaneCollections that have been detached", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- const clippingPlaneCollection1 = new ClippingPlaneCollection({
- planes: [new ClippingPlane(Cartesian3.UNIT_Z, -100000000.0)],
- });
- expect(clippingPlaneCollection1.owner).not.toBeDefined();
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ const clippingPlaneCollection1 = new ClippingPlaneCollection({
+ planes: [new ClippingPlane(Cartesian3.UNIT_Z, -100000000.0)],
+ });
+ expect(clippingPlaneCollection1.owner).not.toBeDefined();
- tileset.clippingPlanes = clippingPlaneCollection1;
- const clippingPlaneCollection2 = new ClippingPlaneCollection({
- planes: [new ClippingPlane(Cartesian3.UNIT_Z, -100000000.0)],
- });
+ tileset.clippingPlanes = clippingPlaneCollection1;
+ const clippingPlaneCollection2 = new ClippingPlaneCollection({
+ planes: [new ClippingPlane(Cartesian3.UNIT_Z, -100000000.0)],
+ });
- tileset.clippingPlanes = clippingPlaneCollection2;
- expect(clippingPlaneCollection1.isDestroyed()).toBe(true);
+ tileset.clippingPlanes = clippingPlaneCollection2;
+ expect(clippingPlaneCollection1.isDestroyed()).toBe(true);
- scene.primitives.remove(tileset);
- expect(clippingPlaneCollection2.isDestroyed()).toBe(true);
- },
- );
+ scene.primitives.remove(tileset);
+ expect(clippingPlaneCollection2.isDestroyed()).toBe(true);
+ });
});
it("throws a DeveloperError when given a ClippingPlaneCollection attached to another Tileset", function () {
@@ -4495,110 +4486,110 @@ describe(
});
it("clipping planes cull hidden tiles", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- let visibility = tileset.root.visibility(
- scene.frameState,
- CullingVolume.MASK_INSIDE,
- );
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ let visibility = tileset.root.visibility(
+ scene.frameState,
+ CullingVolume.MASK_INSIDE
+ );
- expect(visibility).not.toBe(CullingVolume.MASK_OUTSIDE);
+ expect(visibility).not.toBe(CullingVolume.MASK_OUTSIDE);
- const plane = new ClippingPlane(Cartesian3.UNIT_Z, -100000000.0);
- tileset.clippingPlanes = new ClippingPlaneCollection({
- planes: [plane],
- });
+ const plane = new ClippingPlane(Cartesian3.UNIT_Z, -100000000.0);
+ tileset.clippingPlanes = new ClippingPlaneCollection({
+ planes: [plane],
+ });
- visibility = tileset.root.visibility(
- scene.frameState,
- CullingVolume.MASK_INSIDE,
- );
+ visibility = tileset.root.visibility(
+ scene.frameState,
+ CullingVolume.MASK_INSIDE
+ );
- expect(visibility).toBe(CullingVolume.MASK_OUTSIDE);
+ expect(visibility).toBe(CullingVolume.MASK_OUTSIDE);
- plane.distance = 0.0;
- visibility = tileset.root.visibility(
- scene.frameState,
- CullingVolume.MASK_INSIDE,
- );
+ plane.distance = 0.0;
+ visibility = tileset.root.visibility(
+ scene.frameState,
+ CullingVolume.MASK_INSIDE
+ );
- expect(visibility).not.toBe(CullingVolume.MASK_OUTSIDE);
- },
- );
+ expect(visibility).not.toBe(CullingVolume.MASK_OUTSIDE);
+ });
});
it("clipping planes cull hidden content", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- let visibility = tileset.root.contentVisibility(scene.frameState);
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ let visibility = tileset.root.contentVisibility(scene.frameState);
- expect(visibility).not.toBe(Intersect.OUTSIDE);
+ expect(visibility).not.toBe(Intersect.OUTSIDE);
- const plane = new ClippingPlane(Cartesian3.UNIT_Z, -100000000.0);
- tileset.clippingPlanes = new ClippingPlaneCollection({
- planes: [plane],
- });
+ const plane = new ClippingPlane(Cartesian3.UNIT_Z, -100000000.0);
+ tileset.clippingPlanes = new ClippingPlaneCollection({
+ planes: [plane],
+ });
- visibility = tileset.root.contentVisibility(scene.frameState);
+ visibility = tileset.root.contentVisibility(scene.frameState);
- expect(visibility).toBe(Intersect.OUTSIDE);
+ expect(visibility).toBe(Intersect.OUTSIDE);
- plane.distance = 0.0;
- visibility = tileset.root.contentVisibility(scene.frameState);
+ plane.distance = 0.0;
+ visibility = tileset.root.contentVisibility(scene.frameState);
- expect(visibility).not.toBe(Intersect.OUTSIDE);
- },
- );
+ expect(visibility).not.toBe(Intersect.OUTSIDE);
+ });
});
it("clipping planes cull tiles completely inside clipping region", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- const statistics = tileset._statistics;
- const root = tileset.root;
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ const statistics = tileset._statistics;
+ const root = tileset.root;
- scene.renderForSpecs();
+ scene.renderForSpecs();
- expect(statistics.numberOfCommands).toEqual(5);
+ expect(statistics.numberOfCommands).toEqual(5);
- tileset.update(scene.frameState);
+ tileset.update(scene.frameState);
- const radius = 287.0736139905632;
+ const radius = 287.0736139905632;
- const plane = new ClippingPlane(Cartesian3.UNIT_X, radius);
- tileset.clippingPlanes = new ClippingPlaneCollection({
- planes: [plane],
- });
+ const plane = new ClippingPlane(Cartesian3.UNIT_X, radius);
+ tileset.clippingPlanes = new ClippingPlaneCollection({
+ planes: [plane],
+ });
- tileset.update(scene.frameState);
- scene.renderForSpecs();
+ tileset.update(scene.frameState);
+ scene.renderForSpecs();
- expect(statistics.numberOfCommands).toEqual(5);
- expect(root._isClipped).toBe(false);
+ expect(statistics.numberOfCommands).toEqual(5);
+ expect(root._isClipped).toBe(false);
- plane.distance = -1;
+ plane.distance = -1;
- tileset.update(scene.frameState);
- scene.renderForSpecs();
+ tileset.update(scene.frameState);
+ scene.renderForSpecs();
- expect(statistics.numberOfCommands).toEqual(3);
- expect(root._isClipped).toBe(true);
+ expect(statistics.numberOfCommands).toEqual(3);
+ expect(root._isClipped).toBe(true);
- plane.distance = -radius;
+ plane.distance = -radius;
- tileset.update(scene.frameState);
- scene.renderForSpecs();
+ tileset.update(scene.frameState);
+ scene.renderForSpecs();
- expect(statistics.numberOfCommands).toEqual(0);
- expect(root._isClipped).toBe(true);
- },
- );
+ expect(statistics.numberOfCommands).toEqual(0);
+ expect(root._isClipped).toBe(true);
+ });
});
it("clipping planes cull tiles completely inside clipping region for i3dm", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithExternalResourcesUrl,
+ tilesetWithExternalResourcesUrl
).then(function (tileset) {
const statistics = tileset._statistics;
const root = tileset.root;
@@ -4648,7 +4639,7 @@ describe(
let offsetMatrix = tileset.clippingPlanesOriginMatrix;
expect(
- Matrix4.equals(offsetMatrix, tileset.root.computedTransform),
+ Matrix4.equals(offsetMatrix, tileset.root.computedTransform)
).toBe(true);
return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
@@ -4657,23 +4648,23 @@ describe(
// so we want to apply east-north-up as our best guess.
offsetMatrix = tileset.clippingPlanesOriginMatrix;
expect(
- Matrix4.equals(offsetMatrix, tileset.root.computedTransform),
+ Matrix4.equals(offsetMatrix, tileset.root.computedTransform)
).toBe(false);
// But they have the same translation.
const clippingPlanesOrigin = Matrix4.getTranslation(
offsetMatrix,
- new Cartesian3(),
+ new Cartesian3()
);
expect(
Cartesian3.equals(
tileset.root.boundingSphere.center,
- clippingPlanesOrigin,
- ),
+ clippingPlanesOrigin
+ )
).toBe(true);
- },
+ }
);
- },
+ }
);
});
@@ -4682,41 +4673,48 @@ describe(
function (tileset) {
let offsetMatrix = Matrix4.clone(
tileset.clippingPlanesOriginMatrix,
- new Matrix4(),
+ new Matrix4()
);
let boundingSphereEastNorthUp = Transforms.eastNorthUpToFixedFrame(
- tileset.root.boundingSphere.center,
+ tileset.root.boundingSphere.center
);
expect(Matrix4.equals(offsetMatrix, boundingSphereEastNorthUp)).toBe(
- true,
+ true
);
// Changing the model matrix should change the clipping planes matrix
tileset.modelMatrix = Matrix4.fromTranslation(
- new Cartesian3(100, 0, 0),
+ new Cartesian3(100, 0, 0)
);
scene.renderForSpecs();
expect(
- Matrix4.equals(offsetMatrix, tileset.clippingPlanesOriginMatrix),
+ Matrix4.equals(offsetMatrix, tileset.clippingPlanesOriginMatrix)
).toBe(false);
boundingSphereEastNorthUp = Transforms.eastNorthUpToFixedFrame(
- tileset.root.boundingSphere.center,
+ tileset.root.boundingSphere.center
);
offsetMatrix = tileset.clippingPlanesOriginMatrix;
expect(offsetMatrix).toEqualEpsilon(
boundingSphereEastNorthUp,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
- },
+ }
);
});
describe("clippingPolygons", () => {
const positions = Cartesian3.fromRadiansArray([
- -1.3194369277314022, 0.6988062530900625, -1.31941, 0.69879,
- -1.3193955980204217, 0.6988091578771254, -1.3193931220959367,
- 0.698743632490865, -1.3194358224045408, 0.6987471965556998,
+ -1.3194369277314022,
+ 0.6988062530900625,
+ -1.31941,
+ 0.69879,
+ -1.3193955980204217,
+ 0.6988091578771254,
+ -1.3193931220959367,
+ 0.698743632490865,
+ -1.3194358224045408,
+ 0.6987471965556998,
]);
let polygon;
@@ -4727,7 +4725,7 @@ describe(
it("destroys attached ClippingPolygonCollections and ClippingPolygonCollections that have been detached", async function () {
const tileset = await Cesium3DTilesTester.loadTileset(
scene,
- tilesetUrl,
+ tilesetUrl
);
const collectionA = new ClippingPolygonCollection({
polygons: [polygon],
@@ -4749,12 +4747,12 @@ describe(
it("throws a DeveloperError when given a ClippingPolygonCollection attached to another tileset", async function () {
const tilesetA = await Cesium3DTilesTester.loadTileset(
scene,
- tilesetUrl,
+ tilesetUrl
);
const tilesetB = await Cesium3DTilesTester.loadTileset(
scene,
- tilesetUrl,
+ tilesetUrl
);
const collection = new ClippingPolygonCollection({
@@ -4774,7 +4772,7 @@ describe(
const tileset = await Cesium3DTilesTester.loadTileset(
scene,
- tilesetUrl,
+ tilesetUrl
);
let visibility = tileset.root.contentVisibility(scene.frameState);
@@ -4799,13 +4797,13 @@ describe(
});
it("throws if pointCloudShading is set to undefined", function () {
- return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(
- function (tileset) {
- expect(function () {
- tileset.pointCloudShading = undefined;
- }).toThrowDeveloperError();
- },
- );
+ return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function (
+ tileset
+ ) {
+ expect(function () {
+ tileset.pointCloudShading = undefined;
+ }).toThrowDeveloperError();
+ });
});
describe("updateForPass", function () {
@@ -4815,7 +4813,7 @@ describe(
const passCullingVolume = passCamera.frustum.computeCullingVolume(
passCamera.positionWC,
passCamera.directionWC,
- passCamera.upWC,
+ passCamera.upWC
);
viewNothing(); // Main camera views nothing, pass camera views all tiles
@@ -4830,7 +4828,7 @@ describe(
expect(tileset.statistics.selected).toBe(0);
tileset.updateForPass(scene.frameState, preloadFlightPassState);
expect(tileset._requestedTiles.length).toBe(5);
- },
+ }
);
});
@@ -4848,7 +4846,7 @@ describe(
function (tileset) {
tileset.updateForPass(scene.frameState, renderPassState);
expect(passCommandList.length).toBe(5);
- },
+ }
);
});
@@ -4917,7 +4915,7 @@ describe(
const centerCartographic = new Cartographic(
-1.3196799798348215,
0.6988740001506679,
- 2.4683731133709323,
+ 2.4683731133709323
);
const cartographics = [centerCartographic];
@@ -4926,7 +4924,7 @@ describe(
return sampleHeightMostDetailed(cartographics).then(function () {
expect(centerCartographic.height).toEqualEpsilon(
2.47,
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
const statisticsMostDetailedPick =
tileset._statisticsPerPass[Cesium3DTilePass.MOST_DETAILED_PICK];
@@ -4934,14 +4932,14 @@ describe(
tileset._statisticsPerPass[Cesium3DTilePass.RENDER];
expect(statisticsMostDetailedPick.numberOfCommands).toBe(1);
expect(
- statisticsMostDetailedPick.numberOfTilesWithContentReady,
+ statisticsMostDetailedPick.numberOfTilesWithContentReady
).toBe(1);
expect(statisticsMostDetailedPick.selected).toBe(1);
expect(statisticsMostDetailedPick.visited).toBeGreaterThan(1);
expect(statisticsMostDetailedPick.numberOfTilesTotal).toBe(21);
expect(statisticsRender.selected).toBe(0);
});
- },
+ }
);
});
@@ -4956,7 +4954,7 @@ describe(
const centerCartographic = new Cartographic(
-1.3196799798348215,
0.6988740001506679,
- 2.4683731133709323,
+ 2.4683731133709323
);
const cartographics = [centerCartographic];
@@ -4965,7 +4963,7 @@ describe(
return sampleHeightMostDetailed(cartographics).then(function () {
expect(centerCartographic.height).toEqualEpsilon(
2.47,
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
const statisticsMostDetailedPick =
tileset._statisticsPerPass[Cesium3DTilePass.MOST_DETAILED_PICK];
@@ -4973,14 +4971,14 @@ describe(
tileset._statisticsPerPass[Cesium3DTilePass.RENDER];
expect(statisticsMostDetailedPick.numberOfCommands).toBe(1);
expect(
- statisticsMostDetailedPick.numberOfTilesWithContentReady,
+ statisticsMostDetailedPick.numberOfTilesWithContentReady
).toBeGreaterThan(1);
expect(statisticsMostDetailedPick.selected).toBe(1);
expect(statisticsMostDetailedPick.visited).toBeGreaterThan(1);
expect(statisticsMostDetailedPick.numberOfTilesTotal).toBe(21);
expect(statisticsRender.selected).toBeGreaterThan(0);
});
- },
+ }
);
});
@@ -5002,7 +5000,7 @@ describe(
const offcenterCartographic = new Cartographic(
-1.3196754112739246,
0.6988705057695633,
- 2.467395745774971,
+ 2.467395745774971
);
const cartographics = [offcenterCartographic];
@@ -5013,17 +5011,17 @@ describe(
tileset._statisticsPerPass[Cesium3DTilePass.MOST_DETAILED_PICK];
expect(offcenterCartographic.height).toEqualEpsilon(
7.407,
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
expect(statistics.numberOfCommands).toBe(3); // One for each level of the tree
expect(
- statistics.numberOfTilesWithContentReady,
+ statistics.numberOfTilesWithContentReady
).toBeGreaterThanOrEqual(3);
expect(statistics.selected).toBe(3);
expect(statistics.visited).toBeGreaterThan(3);
expect(statistics.numberOfTilesTotal).toBe(21);
});
- },
+ }
);
});
@@ -5048,16 +5046,16 @@ describe(
return drillPickFromRayMostDetailed(ray).then(function (results) {
expect(results.length).toBe(3);
expect(
- results[0].object.content.url.indexOf("0_0_0.b3dm") > -1,
+ results[0].object.content.url.indexOf("0_0_0.b3dm") > -1
).toBe(true);
expect(
- results[1].object.content.url.indexOf("1_1_1.b3dm") > -1,
+ results[1].object.content.url.indexOf("1_1_1.b3dm") > -1
).toBe(true);
expect(
- results[2].object.content.url.indexOf("2_4_4.b3dm") > -1,
+ results[2].object.content.url.indexOf("2_4_4.b3dm") > -1
).toBe(true);
});
- },
+ }
);
});
@@ -5069,7 +5067,7 @@ describe(
const centerCartographic = new Cartographic(
-1.3196799798348215,
0.6988740001506679,
- 2.4683731133709323,
+ 2.4683731133709323
);
const cartographics = [centerCartographic];
return Cesium3DTilesTester.loadTileset(scene, tilesetUniform).then(
@@ -5078,10 +5076,10 @@ describe(
return sampleHeightMostDetailed(cartographics).then(function () {
expect(centerCartographic.height).toEqualEpsilon(
2.47,
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
});
- },
+ }
);
});
@@ -5094,15 +5092,15 @@ describe(
const centerCartographic = new Cartographic(
-1.3196799798348215,
- 0.6988740001506679,
+ 0.6988740001506679
);
const offcenterCartographic = new Cartographic(
-1.3196754112739246,
- 0.6988705057695633,
+ 0.6988705057695633
);
const missCartographic = new Cartographic(
-1.3196096042084076,
- 0.6988703290845706,
+ 0.6988703290845706
);
const cartographics = [
centerCartographic,
@@ -5115,11 +5113,11 @@ describe(
return sampleHeightMostDetailed(cartographics).then(function () {
expect(centerCartographic.height).toEqualEpsilon(
2.47,
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
expect(offcenterCartographic.height).toEqualEpsilon(
2.47,
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
expect(missCartographic.height).toBeUndefined();
@@ -5127,7 +5125,7 @@ describe(
tileset._statisticsPerPass[Cesium3DTilePass.MOST_DETAILED_PICK];
expect(statistics.numberOfTilesWithContentReady).toBe(2);
});
- },
+ }
);
});
});
@@ -5164,7 +5162,7 @@ describe(
allCancelled = allCancelled && tile._request.cancelled;
}
expect(allCancelled).toBe(true);
- },
+ }
);
});
@@ -5194,7 +5192,7 @@ describe(
expect(lastPriority).not.toEqual(requestedTilesInFlight[0]._priority); // Not all the same value
return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
- },
+ }
);
});
@@ -5220,7 +5218,7 @@ describe(
expect(requestedTilesInFlight[0].priorityDeferred).toBe(true);
return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
- },
+ }
);
});
@@ -5248,12 +5246,12 @@ describe(
return tileset._requestedTilesInFlight.length !== 0;
}).then(function () {
expect(tileset._requestedTilesInFlight[0].priorityDeferred).toBe(
- true,
+ true
);
return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
});
- },
+ }
);
});
@@ -5261,12 +5259,11 @@ describe(
// Flight destination
viewAllTiles();
scene.preloadFlightCamera = Camera.clone(scene.camera);
- scene.preloadFlightCullingVolume =
- scene.camera.frustum.computeCullingVolume(
- scene.camera.positionWC,
- scene.camera.directionWC,
- scene.camera.upWC,
- );
+ scene.preloadFlightCullingVolume = scene.camera.frustum.computeCullingVolume(
+ scene.camera.positionWC,
+ scene.camera.directionWC,
+ scene.camera.upWC
+ );
// Reset view
viewNothing();
@@ -5279,7 +5276,7 @@ describe(
scene.renderForSpecs();
expect(tileset._requestedTilesInFlight.length).toBeGreaterThan(0);
return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
- },
+ }
);
});
@@ -5291,7 +5288,7 @@ describe(
viewAllTiles();
scene.renderForSpecs();
expect(tileset._requestedTilesInFlight.length).toEqual(0); // Big camera delta so no fetches should occur.
- },
+ }
);
});
@@ -5305,7 +5302,7 @@ describe(
scene.renderForSpecs();
expect(tileset._requestedTilesInFlight.length).toEqual(2);
return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset);
- },
+ }
);
});
@@ -5323,14 +5320,14 @@ describe(
scene.renderForSpecs();
expect(tileset.statistics.selected).toBe(selectedLength);
expect(tileset.statistics.numberOfPendingRequests).toBe(0);
- },
+ }
);
});
it("displays copyrights for all glTF content", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- gltfContentWithCopyrightUrl,
+ gltfContentWithCopyrightUrl
).then(function (tileset) {
setZoom(10.0);
scene.renderForSpecs();
@@ -5360,7 +5357,7 @@ describe(
it("displays copyrights only for glTF content in view", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- gltfContentWithCopyrightUrl,
+ gltfContentWithCopyrightUrl
).then(function (tileset) {
const creditDisplay = scene.frameState.creditDisplay;
const credits = creditDisplay._currentFrameCredits.lightboxCredits;
@@ -5378,10 +5375,10 @@ describe(
scene.renderForSpecs();
expect(credits.values.length).toEqual(2);
expect(credits.values[0].credit.html).toEqual(
- "Lower Right Copyright 1",
+ "Lower Right Copyright 1"
);
expect(credits.values[1].credit.html).toEqual(
- "Lower Right Copyright 2",
+ "Lower Right Copyright 2"
);
setZoom(10.0);
@@ -5403,7 +5400,7 @@ describe(
it("displays copyrights for glTF content in sorted order", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- gltfContentWithRepeatedCopyrightsUrl,
+ gltfContentWithRepeatedCopyrightsUrl
).then(function (tileset) {
setZoom(10.0);
scene.renderForSpecs();
@@ -5441,7 +5438,7 @@ describe(
return Cesium3DTilesTester.loadTileset(
scene,
gltfContentWithCopyrightUrl,
- options,
+ options
).then(function (tileset) {
setZoom(10.0);
scene.renderForSpecs();
@@ -5474,7 +5471,7 @@ describe(
return Cesium3DTilesTester.loadTileset(
scene,
gltfContentWithCopyrightUrl,
- options,
+ options
).then(function (tileset) {
setZoom(10.0);
scene.renderForSpecs();
@@ -5545,14 +5542,14 @@ describe(
expect(statistics.visited).toEqual(6);
// the implicit placeholder tile is not rendered
expect(statistics.numberOfCommands).toEqual(5);
- },
+ }
);
});
it("renders tileset with JSON subtree file", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- implicitTilesetWithJsonUrl,
+ implicitTilesetWithJsonUrl
).then(function (tileset) {
const statistics = tileset._statistics;
// root + implicit placeholder + 4 child tiles
@@ -5570,8 +5567,8 @@ describe(
expect(
endsWith(
implicitTile._contentResource.url,
- "subtrees/0/0/0/0.subtree",
- ),
+ "subtrees/0/0/0/0.subtree"
+ )
).toEqual(true);
expect(implicitTile.implicitTileset).toBeDefined();
expect(implicitTile.implicitCoordinates).toBeDefined();
@@ -5579,7 +5576,7 @@ describe(
expect(implicitTile.implicitCoordinates.x).toEqual(0);
expect(implicitTile.implicitCoordinates.y).toEqual(0);
expect(implicitTile.implicitCoordinates.z).toEqual(0);
- },
+ }
);
});
@@ -5592,15 +5589,15 @@ describe(
expect(
endsWith(
implicitTile._contentResource.url,
- "subtrees/0/0/0.subtree",
- ),
+ "subtrees/0/0/0.subtree"
+ )
).toEqual(true);
expect(implicitTile.implicitTileset).toBeDefined();
expect(implicitTile.implicitCoordinates).toBeDefined();
expect(implicitTile.implicitCoordinates.level).toEqual(0);
expect(implicitTile.implicitCoordinates.x).toEqual(0);
expect(implicitTile.implicitCoordinates.y).toEqual(0);
- },
+ }
);
});
@@ -5627,7 +5624,7 @@ describe(
tileset.debugShowUrl = false;
scene.renderForSpecs();
expect(tileset._tileDebugLabels).not.toBeDefined();
- },
+ }
);
});
});
@@ -5645,7 +5642,7 @@ describe(
it("renders tileset (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- implicitTilesetLegacyUrl,
+ implicitTilesetLegacyUrl
).then(function (tileset) {
const statistics = tileset._statistics;
// root + implicit placeholder + 4 child tiles
@@ -5658,7 +5655,7 @@ describe(
it("renders tileset with JSON subtree file (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- implicitTilesetWithJsonLegacyUrl,
+ implicitTilesetWithJsonLegacyUrl
).then(function (tileset) {
const statistics = tileset._statistics;
// root + implicit placeholder + 4 child tiles
@@ -5672,14 +5669,14 @@ describe(
viewNothing();
return Cesium3DTilesTester.loadTileset(
scene,
- implicitRootLegacyUrl,
+ implicitRootLegacyUrl
).then(function (tileset) {
const implicitTile = tileset.root;
expect(
endsWith(
implicitTile._contentResource.url,
- "subtrees/0/0/0/0.subtree",
- ),
+ "subtrees/0/0/0/0.subtree"
+ )
).toEqual(true);
expect(implicitTile.implicitTileset).toBeDefined();
expect(implicitTile.implicitCoordinates).toBeDefined();
@@ -5694,15 +5691,15 @@ describe(
viewNothing();
return Cesium3DTilesTester.loadTileset(
scene,
- implicitChildLegacyUrl,
+ implicitChildLegacyUrl
).then(function (tileset) {
const parentTile = tileset.root;
const implicitTile = parentTile.children[0];
expect(
endsWith(
implicitTile._contentResource.url,
- "subtrees/0/0/0.subtree",
- ),
+ "subtrees/0/0/0.subtree"
+ )
).toEqual(true);
expect(implicitTile.implicitTileset).toBeDefined();
expect(implicitTile.implicitCoordinates).toBeDefined();
@@ -5715,7 +5712,7 @@ describe(
it("debugShowUrl works for implicit tiling (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- implicitTilesetLegacyUrl,
+ implicitTilesetLegacyUrl
).then(function (tileset) {
tileset.debugShowUrl = true;
scene.renderForSpecs();
@@ -5755,7 +5752,7 @@ describe(
expect(statistics.numberOfPendingRequests).toBe(0);
expect(statistics.numberOfTilesProcessing).toBe(0);
expect(statistics.numberOfTilesWithContentReady).toBe(1);
- },
+ }
);
});
@@ -5822,9 +5819,8 @@ describe(
expect(statistics.numberOfTilesProcessing).toBe(0);
expect(statistics.numberOfTilesWithContentReady).toBe(0);
- RequestScheduler.maximumRequestsPerServer =
- oldMaximumRequestsPerServer;
- },
+ RequestScheduler.maximumRequestsPerServer = oldMaximumRequestsPerServer;
+ }
);
});
@@ -5832,7 +5828,7 @@ describe(
viewNothing();
const tileset = await Cesium3DTilesTester.loadTileset(
scene,
- multipleContentsUrl,
+ multipleContentsUrl
);
let callCount = 0;
tileset.tileFailed.addEventListener(function (event) {
@@ -5877,7 +5873,7 @@ describe(
it("verify multiple content statistics", async function () {
const tileset = await Cesium3DTileset.fromUrl(
multipleContentsUrl,
- options,
+ options
);
scene.primitives.add(tileset);
@@ -5927,9 +5923,9 @@ describe(
for (let i = 0; i < expected.length; i++) {
expect(endsWith(uris[i], expected[i])).toBe(true);
}
- },
+ }
);
- },
+ }
);
});
@@ -5959,7 +5955,7 @@ describe(
errorCount++;
expect(endsWith(event.url, ".json")).toBe(true);
expect(event.message).toEqual(
- "External tilesets are disallowed inside multiple contents",
+ "External tilesets are disallowed inside multiple contents"
);
});
scene.primitives.add(tileset);
@@ -5997,7 +5993,7 @@ describe(
tileset.debugShowUrl = false;
scene.renderForSpecs();
expect(tileset._tileDebugLabels).not.toBeDefined();
- },
+ }
);
});
@@ -6012,14 +6008,14 @@ describe(
const statistics = tileset._statistics;
expect(statistics.visited).toEqual(1);
expect(statistics.numberOfCommands).toEqual(totalCommands);
- },
+ }
);
});
it("renders implicit tileset with multiple contents", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- implicitMultipleContentsUrl,
+ implicitMultipleContentsUrl
).then(function (tileset) {
scene.renderForSpecs();
const statistics = tileset._statistics;
@@ -6046,7 +6042,7 @@ describe(
it("request statistics are updated correctly on success (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- multipleContentsLegacyUrl,
+ multipleContentsLegacyUrl
).then(function (tileset) {
const statistics = tileset.statistics;
expect(statistics.numberOfAttemptedRequests).toBe(0);
@@ -6074,7 +6070,7 @@ describe(
viewNothing();
const tileset = await Cesium3DTilesTester.loadTileset(
scene,
- multipleContentsLegacyUrl,
+ multipleContentsLegacyUrl
);
viewAllTiles();
scene.renderForSpecs();
@@ -6108,7 +6104,7 @@ describe(
viewNothing();
return Cesium3DTilesTester.loadTileset(
scene,
- multipleContentsLegacyUrl,
+ multipleContentsLegacyUrl
).then(function (tileset) {
const oldMaximumRequestsPerServer =
RequestScheduler.maximumRequestsPerServer;
@@ -6123,8 +6119,7 @@ describe(
expect(statistics.numberOfTilesProcessing).toBe(0);
expect(statistics.numberOfTilesWithContentReady).toBe(0);
- RequestScheduler.maximumRequestsPerServer =
- oldMaximumRequestsPerServer;
+ RequestScheduler.maximumRequestsPerServer = oldMaximumRequestsPerServer;
});
});
@@ -6132,7 +6127,7 @@ describe(
viewNothing();
const tileset = await Cesium3DTilesTester.loadTileset(
scene,
- multipleContentsLegacyUrl,
+ multipleContentsLegacyUrl
);
let callCount = 0;
tileset.tileFailed.addEventListener(function (event) {
@@ -6176,7 +6171,7 @@ describe(
it("verify multiple content statistics (legacy)", async function () {
const tileset = await Cesium3DTileset.fromUrl(
multipleContentsLegacyUrl,
- options,
+ options
);
scene.primitives.add(tileset);
@@ -6210,7 +6205,7 @@ describe(
viewNothing();
return Cesium3DTilesTester.loadTileset(
scene,
- multipleContentsLegacyUrl,
+ multipleContentsLegacyUrl
).then(function (tileset) {
tileset.tileFailed.addEventListener(function (event) {
uris.push(event.url);
@@ -6230,7 +6225,7 @@ describe(
for (let i = 0; i < expected.length; i++) {
expect(endsWith(uris[i], expected[i])).toBe(true);
}
- },
+ }
);
});
});
@@ -6268,14 +6263,14 @@ describe(
viewNothing();
return Cesium3DTilesTester.loadTileset(
scene,
- multipleContentsLegacyUrl,
+ multipleContentsLegacyUrl
).then(function (tileset) {
let errorCount = 0;
tileset.tileFailed.addEventListener(function (event) {
errorCount++;
expect(endsWith(event.url, ".json")).toBe(true);
expect(event.message).toEqual(
- "External tilesets are disallowed inside multiple contents",
+ "External tilesets are disallowed inside multiple contents"
);
});
@@ -6285,7 +6280,7 @@ describe(
return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset).then(
function () {
expect(errorCount).toBe(2);
- },
+ }
);
});
});
@@ -6297,7 +6292,7 @@ describe(
it("debugShowUrl lists each URI (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- multipleContentsLegacyUrl,
+ multipleContentsLegacyUrl
).then(function (tileset) {
tileset.debugShowUrl = true;
scene.renderForSpecs();
@@ -6320,7 +6315,7 @@ describe(
const totalCommands = b3dmCommands + i3dmCommands;
return Cesium3DTilesTester.loadTileset(
scene,
- multipleContentsLegacyUrl,
+ multipleContentsLegacyUrl
).then(function (tileset) {
const statistics = tileset._statistics;
expect(statistics.visited).toEqual(1);
@@ -6336,7 +6331,7 @@ describe(
const totalCommands = b3dmCommands + i3dmCommands;
return Cesium3DTilesTester.loadTileset(
scene,
- multipleContentsLegacyWithContentUrl,
+ multipleContentsLegacyWithContentUrl
).then(function (tileset) {
const statistics = tileset._statistics;
expect(statistics.visited).toEqual(1);
@@ -6347,7 +6342,7 @@ describe(
it("renders implicit tileset with multiple contents (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- implicitMultipleContentsLegacyUrl,
+ implicitMultipleContentsLegacyUrl
).then(function (tileset) {
const statistics = tileset._statistics;
// implicit placeholder + transcoded root + 4 child tiles
@@ -6360,7 +6355,7 @@ describe(
it("renders implicit tileset with multiple contents (legacy with 'content')", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- implicitMultipleContentsLegacyWithContentUrl,
+ implicitMultipleContentsLegacyWithContentUrl
).then(function (tileset) {
const statistics = tileset._statistics;
// implicit placeholder + transcoded root + 4 child tiles
@@ -6375,7 +6370,9 @@ describe(
author: "Cesium",
date: "2021-03-23",
centerCartographic: [
- -1.3196816996258511, 0.6988767486400521, 45.78600543644279,
+ -1.3196816996258511,
+ 0.6988767486400521,
+ 45.78600543644279,
],
tileCount: 5,
};
@@ -6387,7 +6384,7 @@ describe(
it("featureIdLabel sets from string", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithFeatureIdsUrl,
+ tilesetWithFeatureIdsUrl
).then(function (tileset) {
expect(tileset.featureIdLabel).toBe("featureId_0");
tileset.featureIdLabel = "buildings";
@@ -6398,7 +6395,7 @@ describe(
it("featureIdLabel sets from integer", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithFeatureIdsUrl,
+ tilesetWithFeatureIdsUrl
).then(function (tileset) {
expect(tileset.featureIdLabel).toBe("featureId_0");
tileset.featureIdLabel = 1;
@@ -6409,7 +6406,7 @@ describe(
it("instanceFeatureIdLabel sets from string", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithFeatureIdsUrl,
+ tilesetWithFeatureIdsUrl
).then(function (tileset) {
expect(tileset.instanceFeatureIdLabel).toBe("instanceFeatureId_0");
tileset.instanceFeatureIdLabel = "perInstance";
@@ -6420,7 +6417,7 @@ describe(
it("instanceFeatureIdLabel sets from integer", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithFeatureIdsUrl,
+ tilesetWithFeatureIdsUrl
).then(function (tileset) {
expect(tileset.instanceFeatureIdLabel).toBe("instanceFeatureId_0");
tileset.instanceFeatureIdLabel = 1;
@@ -6461,25 +6458,25 @@ describe(
return tilesetMetadata.getProperty("name");
}).toThrowDeveloperError();
expect(tilesetMetadata.getProperty("author")).toBe(
- tilesetProperties.author,
+ tilesetProperties.author
);
expect(tilesetMetadata.getPropertyBySemantic("DATE_ISO_8601")).toBe(
- tilesetProperties.date,
+ tilesetProperties.date
);
expect(tilesetMetadata.getProperty("centerCartographic")).toEqual(
- Cartesian3.unpack(tilesetProperties.centerCartographic),
+ Cartesian3.unpack(tilesetProperties.centerCartographic)
);
expect(tilesetMetadata.getProperty("tileCount")).toBe(
- tilesetProperties.tileCount,
+ tilesetProperties.tileCount
);
- },
+ }
);
});
it("loads group metadata", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithGroupMetadataUrl,
+ tilesetWithGroupMetadataUrl
).then(function (tileset) {
const metadata = tileset.metadataExtension;
expect(metadata).toBeDefined();
@@ -6505,7 +6502,7 @@ describe(
it("can access group metadata through contents", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithGroupMetadataUrl,
+ tilesetWithGroupMetadataUrl
).then(function (tileset) {
const metadata = tileset.metadataExtension;
const commercialDistrict = metadata.groups[1];
@@ -6540,14 +6537,14 @@ describe(
const classes = schema.classes;
expect(classes.tileset).toBeDefined();
- },
+ }
);
});
it("loads metadata with external schema", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithExternalSchemaUrl,
+ tilesetWithExternalSchemaUrl
).then(function (tileset) {
const schema = tileset.schema;
expect(schema).toBeDefined();
@@ -6560,7 +6557,7 @@ describe(
it("loads explicit tileset with tile metadata", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithExplicitTileMetadataUrl,
+ tilesetWithExplicitTileMetadataUrl
).then(function (tileset) {
const expected = {
"parent.b3dm": {
@@ -6598,12 +6595,12 @@ describe(
const metadata = tile.metadata;
expect(metadata.getProperty("color")).toEqual(expectedValues.color);
expect(metadata.getProperty("population")).toEqual(
- expectedValues.population,
+ expectedValues.population
);
// 25 can't be represented exactly when quantized as a UINT16
expect(metadata.getProperty("areaPercentage")).toEqualEpsilon(
expectedValues.areaPercentage,
- CesiumMath.EPSILON2,
+ CesiumMath.EPSILON2
);
});
});
@@ -6614,7 +6611,7 @@ describe(
// one tile is removed
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithImplicitTileMetadataUrl,
+ tilesetWithImplicitTileMetadataUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
@@ -6657,10 +6654,10 @@ describe(
expect(metadata.getProperty("color")).not.toBeDefined();
} else {
expect(metadata.getProperty("quadrant")).toBe(
- expectedQuadrants[index],
+ expectedQuadrants[index]
);
expect(metadata.getProperty("color")).toEqual(
- expectedColors[index],
+ expectedColors[index]
);
}
}
@@ -6671,7 +6668,7 @@ describe(
spyOn(findTileMetadata, "_oneTimeWarning");
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithoutRootSchemaTileMetadataUrl,
+ tilesetWithoutRootSchemaTileMetadataUrl
).then(function (tileset) {
expect(findTileMetadata._oneTimeWarning).toHaveBeenCalledTimes(5);
@@ -6687,7 +6684,7 @@ describe(
it("loads explicit tileset with content metadata", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithExplicitContentMetadataUrl,
+ tilesetWithExplicitContentMetadataUrl
).then(function (tileset) {
const expected = {
"parent.b3dm": {
@@ -6720,10 +6717,10 @@ describe(
const expectedValues = expected[uri];
const metadata = content.metadata;
expect(metadata.getProperty("highlightColor")).toEqual(
- expectedValues.highlightColor,
+ expectedValues.highlightColor
);
expect(metadata.getProperty("author")).toEqual(
- expectedValues.author,
+ expectedValues.author
);
});
});
@@ -6734,7 +6731,7 @@ describe(
// one tile is removed
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithImplicitContentMetadataUrl,
+ tilesetWithImplicitContentMetadataUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
@@ -6776,10 +6773,10 @@ describe(
expect(metadata.getProperty("color")).not.toBeDefined();
} else {
expect(metadata.getProperty("height")).toBe(
- expectedHeights[index],
+ expectedHeights[index]
);
expect(metadata.getProperty("color")).toEqual(
- expectedColors[index],
+ expectedColors[index]
);
}
}
@@ -6790,7 +6787,7 @@ describe(
spyOn(findContentMetadata, "_oneTimeWarning");
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithoutRootSchemaContentMetadataUrl,
+ tilesetWithoutRootSchemaContentMetadataUrl
).then(function (tileset) {
expect(findContentMetadata._oneTimeWarning).toHaveBeenCalledTimes(5);
@@ -6807,33 +6804,33 @@ describe(
it("loads explicit tileset with multiple contents with metadata", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithExplicitMultipleContentsMetadataUrl,
+ tilesetWithExplicitMultipleContentsMetadataUrl
).then(function (tileset) {
const content = tileset.root.content;
const batchedContent = content.innerContents[0];
const batchedContentMetadata = batchedContent.metadata;
expect(batchedContentMetadata.getProperty("highlightColor")).toEqual(
- new Cartesian3(0, 0, 255),
+ new Cartesian3(0, 0, 255)
);
expect(batchedContentMetadata.getProperty("author")).toEqual(
- "Cesium",
+ "Cesium"
);
expect(batchedContentMetadata.hasProperty("numberOfInstances")).toBe(
- false,
+ false
);
const instancedContent = content.innerContents[1];
const instancedContentMetadata = instancedContent.metadata;
expect(
- instancedContentMetadata.getProperty("numberOfInstances"),
+ instancedContentMetadata.getProperty("numberOfInstances")
).toEqual(50);
expect(instancedContentMetadata.getProperty("author")).toEqual(
- "Sample Author",
+ "Sample Author"
);
expect(instancedContentMetadata.hasProperty("highlightColor")).toBe(
- false,
+ false
);
});
});
@@ -6843,7 +6840,7 @@ describe(
// one tile is removed
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithImplicitMultipleContentsMetadataUrl,
+ tilesetWithImplicitMultipleContentsMetadataUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
@@ -6896,10 +6893,10 @@ describe(
}
expect(buildingMetadata.getProperty("height")).toBe(
- expectedHeights[index],
+ expectedHeights[index]
);
expect(buildingMetadata.getProperty("color")).toEqual(
- expectedColors[index],
+ expectedColors[index]
);
if (i === 0) {
@@ -6909,7 +6906,7 @@ describe(
const treeContent = tile.content.innerContents[1];
const treeMetadata = treeContent.metadata;
expect(treeMetadata.getProperty("age")).toEqual(
- expectedAges[index - 1],
+ expectedAges[index - 1]
);
}
});
@@ -6939,7 +6936,7 @@ describe(
it("loads tileset metadata (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetMetadataLegacyUrl,
+ tilesetMetadataLegacyUrl
).then(function (tileset) {
const metadata = tileset.metadataExtension;
expect(metadata).toBeDefined();
@@ -6949,16 +6946,16 @@ describe(
return tilesetMetadata.getProperty("name");
}).toThrowDeveloperError();
expect(tilesetMetadata.getProperty("author")).toBe(
- tilesetProperties.author,
+ tilesetProperties.author
);
expect(tilesetMetadata.getPropertyBySemantic("DATE_ISO_8601")).toBe(
- tilesetProperties.date,
+ tilesetProperties.date
);
expect(tilesetMetadata.getProperty("centerCartographic")).toEqual(
- Cartesian3.unpack(tilesetProperties.centerCartographic),
+ Cartesian3.unpack(tilesetProperties.centerCartographic)
);
expect(tilesetMetadata.getProperty("tileCount")).toBe(
- tilesetProperties.tileCount,
+ tilesetProperties.tileCount
);
});
});
@@ -6966,7 +6963,7 @@ describe(
it("loads group metadata (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithGroupMetadataLegacyUrl,
+ tilesetWithGroupMetadataLegacyUrl
).then(function (tileset) {
const metadata = tileset.metadataExtension;
expect(metadata).toBeDefined();
@@ -6997,7 +6994,7 @@ describe(
it("can access group metadata through contents (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithGroupMetadataLegacyUrl,
+ tilesetWithGroupMetadataLegacyUrl
).then(function (tileset) {
const metadata = tileset.metadataExtension;
const commercialDistrict = metadata.groups[0];
@@ -7027,7 +7024,7 @@ describe(
it("loads metadata with embedded schema (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetMetadataLegacyUrl,
+ tilesetMetadataLegacyUrl
).then(function (tileset) {
const schema = tileset.schema;
expect(schema).toBeDefined();
@@ -7040,7 +7037,7 @@ describe(
it("loads metadata with external schema and extension (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithExternalSchemaLegacyUrl,
+ tilesetWithExternalSchemaLegacyUrl
).then(function (tileset) {
const schema = tileset.schema;
expect(schema).toBeDefined();
@@ -7053,7 +7050,7 @@ describe(
it("loads explicit tileset with tile metadata (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithExplicitTileMetadataLegacyUrl,
+ tilesetWithExplicitTileMetadataLegacyUrl
).then(function (tileset) {
const expected = {
"parent.b3dm": {
@@ -7091,12 +7088,12 @@ describe(
const metadata = tile.metadata;
expect(metadata.getProperty("color")).toEqual(expectedValues.color);
expect(metadata.getProperty("population")).toEqual(
- expectedValues.population,
+ expectedValues.population
);
// 25 can't be represented exactly when quantized as a UINT16
expect(metadata.getProperty("areaPercentage")).toEqualEpsilon(
expectedValues.areaPercentage,
- CesiumMath.EPSILON2,
+ CesiumMath.EPSILON2
);
});
});
@@ -7107,7 +7104,7 @@ describe(
// one tile is removed
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithImplicitTileMetadataLegacyUrl,
+ tilesetWithImplicitTileMetadataLegacyUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
@@ -7150,10 +7147,10 @@ describe(
expect(metadata.getProperty("color")).not.toBeDefined();
} else {
expect(metadata.getProperty("quadrant")).toBe(
- expectedQuadrants[index],
+ expectedQuadrants[index]
);
expect(metadata.getProperty("color")).toEqual(
- expectedColors[index],
+ expectedColors[index]
);
}
}
@@ -7163,7 +7160,7 @@ describe(
it("loads explicit tileset with content metadata (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithExplicitContentMetadataLegacyUrl,
+ tilesetWithExplicitContentMetadataLegacyUrl
).then(function (tileset) {
const expected = {
"parent.b3dm": {
@@ -7196,10 +7193,10 @@ describe(
const expectedValues = expected[uri];
const metadata = content.metadata;
expect(metadata.getProperty("highlightColor")).toEqual(
- expectedValues.highlightColor,
+ expectedValues.highlightColor
);
expect(metadata.getProperty("author")).toEqual(
- expectedValues.author,
+ expectedValues.author
);
});
});
@@ -7210,7 +7207,7 @@ describe(
// one tile is removed
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithImplicitContentMetadataLegacyUrl,
+ tilesetWithImplicitContentMetadataLegacyUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
@@ -7252,10 +7249,10 @@ describe(
expect(metadata.getProperty("color")).not.toBeDefined();
} else {
expect(metadata.getProperty("height")).toBe(
- expectedHeights[index],
+ expectedHeights[index]
);
expect(metadata.getProperty("color")).toEqual(
- expectedColors[index],
+ expectedColors[index]
);
}
}
@@ -7265,33 +7262,33 @@ describe(
it("loads explicit tileset with multiple contents with metadata (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithExplicitMultipleContentsMetadataLegacyUrl,
+ tilesetWithExplicitMultipleContentsMetadataLegacyUrl
).then(function (tileset) {
const content = tileset.root.content;
const batchedContent = content.innerContents[0];
const batchedContentMetadata = batchedContent.metadata;
expect(batchedContentMetadata.getProperty("highlightColor")).toEqual(
- new Cartesian3(0, 0, 255),
+ new Cartesian3(0, 0, 255)
);
expect(batchedContentMetadata.getProperty("author")).toEqual(
- "Cesium",
+ "Cesium"
);
expect(batchedContentMetadata.hasProperty("numberOfInstances")).toBe(
- false,
+ false
);
const instancedContent = content.innerContents[1];
const instancedContentMetadata = instancedContent.metadata;
expect(
- instancedContentMetadata.getProperty("numberOfInstances"),
+ instancedContentMetadata.getProperty("numberOfInstances")
).toEqual(50);
expect(instancedContentMetadata.getProperty("author")).toEqual(
- "Sample Author",
+ "Sample Author"
);
expect(instancedContentMetadata.hasProperty("highlightColor")).toBe(
- false,
+ false
);
});
});
@@ -7301,7 +7298,7 @@ describe(
// one tile is removed
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetWithImplicitMultipleContentsMetadataLegacyUrl,
+ tilesetWithImplicitMultipleContentsMetadataLegacyUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
@@ -7354,10 +7351,10 @@ describe(
}
expect(buildingMetadata.getProperty("height")).toBe(
- expectedHeights[index],
+ expectedHeights[index]
);
expect(buildingMetadata.getProperty("color")).toEqual(
- expectedColors[index],
+ expectedColors[index]
);
if (i === 0) {
@@ -7367,12 +7364,12 @@ describe(
const treeContent = tile.content.innerContents[1];
const treeMetadata = treeContent.metadata;
expect(treeMetadata.getProperty("age")).toEqual(
- expectedAges[index - 1],
+ expectedAges[index - 1]
);
}
});
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/CircleEmitterSpec.js b/packages/engine/Specs/Scene/CircleEmitterSpec.js
index b556efb86b64..a5ea6957b880 100644
--- a/packages/engine/Specs/Scene/CircleEmitterSpec.js
+++ b/packages/engine/Specs/Scene/CircleEmitterSpec.js
@@ -48,7 +48,7 @@ describe("Scene/CircleEmitter", function () {
for (let i = 0; i < 1000; ++i) {
emitter.emit(particle);
expect(Cartesian3.magnitude(particle.position)).toBeLessThanOrEqual(
- emitter.radius,
+ emitter.radius
);
expect(particle.position.z).toEqual(0.0);
expect(particle.velocity).toEqual(Cartesian3.UNIT_Z);
diff --git a/packages/engine/Specs/Scene/ClassificationPrimitiveSpec.js b/packages/engine/Specs/Scene/ClassificationPrimitiveSpec.js
index 858abb93b31a..903c4effd0fb 100644
--- a/packages/engine/Specs/Scene/ClassificationPrimitiveSpec.js
+++ b/packages/engine/Specs/Scene/ClassificationPrimitiveSpec.js
@@ -55,7 +55,7 @@ describe(
});
}
const depthColorAttribute = ColorGeometryInstanceAttribute.fromColor(
- new Color(0.0, 0.0, 1.0, 1.0),
+ new Color(0.0, 0.0, 1.0, 1.0)
);
depthColor = depthColorAttribute.value;
return new Primitive({
@@ -117,7 +117,7 @@ describe(
reusableGlobePrimitive = createPrimitive(rectangle, Pass.GLOBE);
reusableTilesetPrimitive = createPrimitive(
rectangle,
- Pass.CESIUM_3D_TILE,
+ Pass.CESIUM_3D_TILE
);
});
@@ -134,7 +134,7 @@ describe(
globePrimitive = new MockPrimitive(reusableGlobePrimitive, Pass.GLOBE);
tilesetPrimitive = new MockPrimitive(
reusableTilesetPrimitive,
- Pass.CESIUM_3D_TILE,
+ Pass.CESIUM_3D_TILE
);
const center = Rectangle.center(rectangle);
@@ -144,7 +144,7 @@ describe(
const dimensions = new Cartesian3(1000000.0, 1000000.0, 1000000.0);
const boxColorAttribute = ColorGeometryInstanceAttribute.fromColor(
- new Color(1.0, 1.0, 0.0, 1.0),
+ new Color(1.0, 1.0, 0.0, 1.0)
);
boxColor = boxColorAttribute.value;
boxInstance = new GeometryInstance({
@@ -291,7 +291,7 @@ describe(
primitive = scene.primitives.add(
new ClassificationPrimitive({
geometryInstances: boxInstance,
- }),
+ })
);
primitive.show = false;
@@ -438,7 +438,7 @@ describe(
const dimensions = new Cartesian3(500000.0, 1000000.0, 1000000.0);
const boxColorAttribute = ColorGeometryInstanceAttribute.fromColor(
- new Color(0.0, 1.0, 1.0, 1.0),
+ new Color(0.0, 1.0, 1.0, 1.0)
);
const boxInstance1 = new GeometryInstance({
geometry: BoxGeometry.fromDimensions({
@@ -492,14 +492,13 @@ describe(
const invertedColor = new Array(4);
invertedColor[0] = Color.floatToByte(
- Color.byteToFloat(depthColor[0]) * scene.invertClassificationColor.red,
+ Color.byteToFloat(depthColor[0]) * scene.invertClassificationColor.red
);
invertedColor[1] = Color.floatToByte(
- Color.byteToFloat(depthColor[1]) *
- scene.invertClassificationColor.green,
+ Color.byteToFloat(depthColor[1]) * scene.invertClassificationColor.green
);
invertedColor[2] = Color.floatToByte(
- Color.byteToFloat(depthColor[2]) * scene.invertClassificationColor.blue,
+ Color.byteToFloat(depthColor[2]) * scene.invertClassificationColor.blue
);
invertedColor[3] = 255;
@@ -540,17 +539,17 @@ describe(
invertedColor[0] = Color.floatToByte(
Color.byteToFloat(depthColor[0]) *
scene.invertClassificationColor.red *
- scene.invertClassificationColor.alpha,
+ scene.invertClassificationColor.alpha
);
invertedColor[1] = Color.floatToByte(
Color.byteToFloat(depthColor[1]) *
scene.invertClassificationColor.green *
- scene.invertClassificationColor.alpha,
+ scene.invertClassificationColor.alpha
);
invertedColor[2] = Color.floatToByte(
Color.byteToFloat(depthColor[2]) *
scene.invertClassificationColor.blue *
- scene.invertClassificationColor.alpha,
+ scene.invertClassificationColor.alpha
);
invertedColor[3] = 255;
@@ -846,7 +845,7 @@ describe(
const dimensions = new Cartesian3(500000.0, 1000000.0, 1000000.0);
const boxColorAttribute = ColorGeometryInstanceAttribute.fromColor(
- new Color(0.0, 1.0, 1.0, 1.0),
+ new Color(0.0, 1.0, 1.0, 1.0)
);
const boxInstance1 = new GeometryInstance({
geometry: BoxGeometry.fromDimensions({
@@ -856,7 +855,7 @@ describe(
id: "box1",
attributes: {
color: ColorGeometryInstanceAttribute.fromColor(
- new Color(0.0, 1.0, 1.0, 1.0),
+ new Color(0.0, 1.0, 1.0, 1.0)
),
},
});
@@ -873,7 +872,7 @@ describe(
id: "box2",
attributes: {
color: ColorGeometryInstanceAttribute.fromColor(
- new Color(1.0, 0.0, 1.0, 1.0),
+ new Color(1.0, 0.0, 1.0, 1.0)
),
},
});
@@ -913,7 +912,7 @@ describe(
const dimensions = new Cartesian3(500000.0, 1000000.0, 1000000.0);
const boxColorAttribute = ColorGeometryInstanceAttribute.fromColor(
- new Color(0.0, 1.0, 1.0, 1.0),
+ new Color(0.0, 1.0, 1.0, 1.0)
);
const boxInstance1 = new GeometryInstance({
geometry: BoxGeometry.fromDimensions({
@@ -923,7 +922,7 @@ describe(
id: "box1",
attributes: {
color: ColorGeometryInstanceAttribute.fromColor(
- new Color(0.0, 1.0, 1.0, 1.0),
+ new Color(0.0, 1.0, 1.0, 1.0)
),
},
});
@@ -989,7 +988,7 @@ describe(
});
const boxColorAttribute = ColorGeometryInstanceAttribute.fromColor(
- new Color(0.0, 1.0, 1.0, 1.0),
+ new Color(0.0, 1.0, 1.0, 1.0)
);
expect(function () {
@@ -1126,7 +1125,7 @@ describe(
verifyClassificationPrimitiveRender(primitive, boxColor);
expect(
- primitive.getGeometryInstanceAttributes("unknown"),
+ primitive.getGeometryInstanceAttributes("unknown")
).not.toBeDefined();
});
@@ -1182,5 +1181,5 @@ describe(
scene.primitives.destroyPrimitives = true;
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/ClippingPlaneCollectionSpec.js b/packages/engine/Specs/Scene/ClippingPlaneCollectionSpec.js
index 958eaf3bd4ce..2fb563e969d6 100644
--- a/packages/engine/Specs/Scene/ClippingPlaneCollectionSpec.js
+++ b/packages/engine/Specs/Scene/ClippingPlaneCollectionSpec.js
@@ -33,7 +33,7 @@ describe("Scene/ClippingPlaneCollection", function () {
// expect pixel1 to be the normal
const normal = AttributeCompression.octDecodeFromCartesian4(
pixel1,
- new Cartesian3(),
+ new Cartesian3()
);
// expect pixel2 to be the distance
@@ -110,10 +110,10 @@ describe("Scene/ClippingPlaneCollection", function () {
expect(clippingPlanes.contains(planes[0])).toBe(true);
expect(
- clippingPlanes.contains(new ClippingPlane(Cartesian3.UNIT_Y, 2.0)),
+ clippingPlanes.contains(new ClippingPlane(Cartesian3.UNIT_Y, 2.0))
).toBe(true);
expect(
- clippingPlanes.contains(new ClippingPlane(Cartesian3.UNIT_Z, 3.0)),
+ clippingPlanes.contains(new ClippingPlane(Cartesian3.UNIT_Z, 3.0))
).toBe(false);
});
@@ -202,10 +202,10 @@ describe("Scene/ClippingPlaneCollection", function () {
expect(sampler.wrapS).toEqual(TextureWrap.CLAMP_TO_EDGE);
expect(sampler.wrapT).toEqual(TextureWrap.CLAMP_TO_EDGE);
expect(sampler.minificationFilter).toEqual(
- TextureMinificationFilter.NEAREST,
+ TextureMinificationFilter.NEAREST
);
expect(sampler.magnificationFilter).toEqual(
- TextureMinificationFilter.NEAREST,
+ TextureMinificationFilter.NEAREST
);
clippingPlanes.destroy();
@@ -241,21 +241,19 @@ describe("Scene/ClippingPlaneCollection", function () {
let rgba;
const gl = scene.frameState.context._gl;
- spyOn(gl, "texImage2D").and.callFake(
- function (
- target,
- level,
- xoffset,
- yoffset,
- width,
- height,
- format,
- type,
- arrayBufferView,
- ) {
- rgba = arrayBufferView;
- },
- );
+ spyOn(gl, "texImage2D").and.callFake(function (
+ target,
+ level,
+ xoffset,
+ yoffset,
+ width,
+ height,
+ format,
+ type,
+ arrayBufferView
+ ) {
+ rgba = arrayBufferView;
+ });
clippingPlanes.update(scene.frameState);
expect(rgba).toBeDefined();
@@ -277,29 +275,29 @@ describe("Scene/ClippingPlaneCollection", function () {
Cartesian3.equalsEpsilon(
plane1.normal,
planes[0].normal,
- CesiumMath.EPSILON3,
- ),
+ CesiumMath.EPSILON3
+ )
).toEqual(true);
expect(
Cartesian3.equalsEpsilon(
plane2.normal,
planes[1].normal,
- CesiumMath.EPSILON3,
- ),
+ CesiumMath.EPSILON3
+ )
).toEqual(true);
expect(
CesiumMath.equalsEpsilon(
plane1.distance,
planes[0].distance,
- CesiumMath.EPSILON3,
- ),
+ CesiumMath.EPSILON3
+ )
).toEqual(true);
expect(
CesiumMath.equalsEpsilon(
plane2.distance,
planes[1].distance,
- CesiumMath.EPSILON3,
- ),
+ CesiumMath.EPSILON3
+ )
).toEqual(true);
clippingPlanes.destroy();
@@ -363,22 +361,20 @@ describe("Scene/ClippingPlaneCollection", function () {
const gl = scene.frameState.context._gl;
let copyWidth;
let copyHeight;
- spyOn(gl, "texSubImage2D").and.callFake(
- function (
- target,
- level,
- xoffset,
- yoffset,
- width,
- height,
- format,
- type,
- arrayBufferView,
- ) {
- copyWidth = width;
- copyHeight = height;
- },
- );
+ spyOn(gl, "texSubImage2D").and.callFake(function (
+ target,
+ level,
+ xoffset,
+ yoffset,
+ width,
+ height,
+ format,
+ type,
+ arrayBufferView
+ ) {
+ copyWidth = width;
+ copyHeight = height;
+ });
clippingPlanes = new ClippingPlaneCollection({
planes: planes,
@@ -451,10 +447,10 @@ describe("Scene/ClippingPlaneCollection", function () {
expect(sampler.wrapS).toEqual(TextureWrap.CLAMP_TO_EDGE);
expect(sampler.wrapT).toEqual(TextureWrap.CLAMP_TO_EDGE);
expect(sampler.minificationFilter).toEqual(
- TextureMinificationFilter.NEAREST,
+ TextureMinificationFilter.NEAREST
);
expect(sampler.magnificationFilter).toEqual(
- TextureMinificationFilter.NEAREST,
+ TextureMinificationFilter.NEAREST
);
clippingPlanes.destroy();
@@ -503,21 +499,19 @@ describe("Scene/ClippingPlaneCollection", function () {
let rgba;
const gl = scene.frameState.context._gl;
- spyOn(gl, "texImage2D").and.callFake(
- function (
- target,
- level,
- xoffset,
- yoffset,
- width,
- height,
- format,
- type,
- arrayBufferView,
- ) {
- rgba = arrayBufferView;
- },
- );
+ spyOn(gl, "texImage2D").and.callFake(function (
+ target,
+ level,
+ xoffset,
+ yoffset,
+ width,
+ height,
+ format,
+ type,
+ arrayBufferView
+ ) {
+ rgba = arrayBufferView;
+ });
clippingPlanes.update(scene.frameState);
expect(rgba).toBeDefined();
@@ -534,29 +528,29 @@ describe("Scene/ClippingPlaneCollection", function () {
Cartesian3.equalsEpsilon(
plane1.normal,
planes[0].normal,
- CesiumMath.EPSILON3,
- ),
+ CesiumMath.EPSILON3
+ )
).toEqual(true);
expect(
Cartesian3.equalsEpsilon(
plane2.normal,
planes[1].normal,
- CesiumMath.EPSILON3,
- ),
+ CesiumMath.EPSILON3
+ )
).toEqual(true);
expect(
CesiumMath.equalsEpsilon(
plane1.distance,
planes[0].distance,
- CesiumMath.EPSILON3,
- ),
+ CesiumMath.EPSILON3
+ )
).toEqual(true);
expect(
CesiumMath.equalsEpsilon(
plane2.distance,
planes[1].distance,
- CesiumMath.EPSILON3,
- ),
+ CesiumMath.EPSILON3
+ )
).toEqual(true);
clippingPlanes.destroy();
@@ -633,22 +627,20 @@ describe("Scene/ClippingPlaneCollection", function () {
const gl = scene.frameState.context._gl;
let copyWidth;
let copyHeight;
- spyOn(gl, "texSubImage2D").and.callFake(
- function (
- target,
- level,
- xoffset,
- yoffset,
- width,
- height,
- format,
- type,
- arrayBufferView,
- ) {
- copyWidth = width;
- copyHeight = height;
- },
- );
+ spyOn(gl, "texSubImage2D").and.callFake(function (
+ target,
+ level,
+ xoffset,
+ yoffset,
+ width,
+ height,
+ format,
+ type,
+ arrayBufferView
+ ) {
+ copyWidth = width;
+ copyHeight = height;
+ });
clippingPlanes = new ClippingPlaneCollection({
planes: planes,
@@ -733,7 +725,7 @@ describe("Scene/ClippingPlaneCollection", function () {
ClippingPlaneCollection.setOwner(
clippingPlanes1,
clippedObject1,
- "clippingPlanes",
+ "clippingPlanes"
);
expect(clippedObject1.clippingPlanes).toBe(clippingPlanes1);
expect(clippingPlanes1._owner).toBe(clippedObject1);
@@ -749,7 +741,7 @@ describe("Scene/ClippingPlaneCollection", function () {
ClippingPlaneCollection.setOwner(
clippingPlanes2,
clippedObject1,
- "clippingPlanes",
+ "clippingPlanes"
);
expect(clippingPlanes1.isDestroyed()).toBe(true);
@@ -757,7 +749,7 @@ describe("Scene/ClippingPlaneCollection", function () {
ClippingPlaneCollection.setOwner(
clippingPlanes2,
clippedObject1,
- "clippingPlanes",
+ "clippingPlanes"
);
expect(clippingPlanes2.isDestroyed()).toBe(false);
@@ -766,7 +758,7 @@ describe("Scene/ClippingPlaneCollection", function () {
ClippingPlaneCollection.setOwner(
clippingPlanes2,
clippedObject2,
- "clippingPlanes",
+ "clippingPlanes"
);
}).toThrowDeveloperError();
});
@@ -780,35 +772,40 @@ describe("Scene/ClippingPlaneCollection", function () {
clippingPlanes.unionClippingRegions = true;
expect(clippingPlanes._testIntersection).not.toBe(
- originalIntersectFunction,
+ originalIntersectFunction
);
});
it("computes intersections with bounding volumes when clipping regions are combined with an intersect operation", function () {
clippingPlanes = new ClippingPlaneCollection();
- let intersect =
- clippingPlanes.computeIntersectionWithBoundingVolume(boundingVolume);
+ let intersect = clippingPlanes.computeIntersectionWithBoundingVolume(
+ boundingVolume
+ );
expect(intersect).toEqual(Intersect.INSIDE);
clippingPlanes.add(new ClippingPlane(Cartesian3.UNIT_X, -2.0));
- intersect =
- clippingPlanes.computeIntersectionWithBoundingVolume(boundingVolume);
+ intersect = clippingPlanes.computeIntersectionWithBoundingVolume(
+ boundingVolume
+ );
expect(intersect).toEqual(Intersect.OUTSIDE);
clippingPlanes.add(new ClippingPlane(Cartesian3.UNIT_Y, 0.0));
- intersect =
- clippingPlanes.computeIntersectionWithBoundingVolume(boundingVolume);
+ intersect = clippingPlanes.computeIntersectionWithBoundingVolume(
+ boundingVolume
+ );
expect(intersect).toEqual(Intersect.INTERSECTING);
clippingPlanes.add(new ClippingPlane(Cartesian3.UNIT_Z, 1.0));
- intersect =
- clippingPlanes.computeIntersectionWithBoundingVolume(boundingVolume);
+ intersect = clippingPlanes.computeIntersectionWithBoundingVolume(
+ boundingVolume
+ );
expect(intersect).toEqual(Intersect.INSIDE);
clippingPlanes.add(new ClippingPlane(Cartesian3.UNIT_Z, 0.0));
- intersect =
- clippingPlanes.computeIntersectionWithBoundingVolume(boundingVolume);
+ intersect = clippingPlanes.computeIntersectionWithBoundingVolume(
+ boundingVolume
+ );
expect(intersect).toEqual(Intersect.INSIDE);
});
@@ -817,29 +814,34 @@ describe("Scene/ClippingPlaneCollection", function () {
unionClippingRegions: true,
});
- let intersect =
- clippingPlanes.computeIntersectionWithBoundingVolume(boundingVolume);
+ let intersect = clippingPlanes.computeIntersectionWithBoundingVolume(
+ boundingVolume
+ );
expect(intersect).toEqual(Intersect.INSIDE);
clippingPlanes.add(new ClippingPlane(Cartesian3.UNIT_Z, 1.0));
- intersect =
- clippingPlanes.computeIntersectionWithBoundingVolume(boundingVolume);
+ intersect = clippingPlanes.computeIntersectionWithBoundingVolume(
+ boundingVolume
+ );
expect(intersect).toEqual(Intersect.INSIDE);
const temp = new ClippingPlane(Cartesian3.UNIT_Y, -2.0);
clippingPlanes.add(temp);
- intersect =
- clippingPlanes.computeIntersectionWithBoundingVolume(boundingVolume);
+ intersect = clippingPlanes.computeIntersectionWithBoundingVolume(
+ boundingVolume
+ );
expect(intersect).toEqual(Intersect.OUTSIDE);
clippingPlanes.add(new ClippingPlane(Cartesian3.UNIT_X, 0.0));
- intersect =
- clippingPlanes.computeIntersectionWithBoundingVolume(boundingVolume);
+ intersect = clippingPlanes.computeIntersectionWithBoundingVolume(
+ boundingVolume
+ );
expect(intersect).toEqual(Intersect.OUTSIDE);
clippingPlanes.remove(temp);
- intersect =
- clippingPlanes.computeIntersectionWithBoundingVolume(boundingVolume);
+ intersect = clippingPlanes.computeIntersectionWithBoundingVolume(
+ boundingVolume
+ );
expect(intersect).toEqual(Intersect.INTERSECTING);
});
@@ -848,14 +850,14 @@ describe("Scene/ClippingPlaneCollection", function () {
let intersect = clippingPlanes.computeIntersectionWithBoundingVolume(
boundingVolume,
- transform,
+ transform
);
expect(intersect).toEqual(Intersect.INSIDE);
clippingPlanes.add(new ClippingPlane(Cartesian3.UNIT_X, -1.0));
intersect = clippingPlanes.computeIntersectionWithBoundingVolume(
boundingVolume,
- transform,
+ transform
);
expect(intersect).not.toEqual(Intersect.INSIDE);
});
@@ -892,7 +894,7 @@ describe("Scene/ClippingPlaneCollection", function () {
const predictedResolution = ClippingPlaneCollection.getTextureResolution(
clippingPlanes,
scene.frameState.context,
- new Cartesian2(),
+ new Cartesian2()
);
expect(predictedResolution.x).toEqual(4);
@@ -902,7 +904,7 @@ describe("Scene/ClippingPlaneCollection", function () {
const actualResolution = ClippingPlaneCollection.getTextureResolution(
clippingPlanes,
scene.frameState.context,
- new Cartesian2(),
+ new Cartesian2()
);
expect(predictedResolution.x).toEqual(actualResolution.x);
diff --git a/packages/engine/Specs/Scene/ClippingPlaneSpec.js b/packages/engine/Specs/Scene/ClippingPlaneSpec.js
index 658d1e1e88f5..fae79735ef87 100644
--- a/packages/engine/Specs/Scene/ClippingPlaneSpec.js
+++ b/packages/engine/Specs/Scene/ClippingPlaneSpec.js
@@ -65,17 +65,17 @@ describe("Scene/ClippingPlane", function () {
const clippingPlane = new ClippingPlane(Cartesian3.UNIT_X, 1.0);
let cloneClippingPlane = ClippingPlane.clone(clippingPlane);
expect(
- Cartesian3.equals(clippingPlane.normal, cloneClippingPlane.normal),
+ Cartesian3.equals(clippingPlane.normal, cloneClippingPlane.normal)
).toBe(true);
expect(clippingPlane.distance).toEqual(cloneClippingPlane.distance);
const scratchClippingPlane = new ClippingPlane(Cartesian3.UNIT_Y, 0.0);
cloneClippingPlane = ClippingPlane.clone(
clippingPlane,
- scratchClippingPlane,
+ scratchClippingPlane
);
expect(
- Cartesian3.equals(clippingPlane.normal, cloneClippingPlane.normal),
+ Cartesian3.equals(clippingPlane.normal, cloneClippingPlane.normal)
).toBe(true);
expect(clippingPlane.distance).toEqual(cloneClippingPlane.distance);
expect(cloneClippingPlane).toBe(scratchClippingPlane);
@@ -90,14 +90,14 @@ describe("Scene/ClippingPlane", function () {
transform = Matrix4.multiplyByMatrix3(
transform,
Matrix3.fromRotationY(Math.PI),
- transform,
+ transform
);
const transformedPlane = Plane.transform(clippingPlane, transform);
expect(transformedPlane.distance).toEqual(clippingPlane.distance * 2.0);
expect(transformedPlane.normal.x).toEqualEpsilon(
-clippingPlane.normal.x,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(transformedPlane.normal.y).toEqual(clippingPlane.normal.y);
expect(transformedPlane.normal.z).toEqual(-clippingPlane.normal.z);
diff --git a/packages/engine/Specs/Scene/ClippingPolygonCollectionSpec.js b/packages/engine/Specs/Scene/ClippingPolygonCollectionSpec.js
index 2e13ecb1804d..9ea882abc1f2 100644
--- a/packages/engine/Specs/Scene/ClippingPolygonCollectionSpec.js
+++ b/packages/engine/Specs/Scene/ClippingPolygonCollectionSpec.js
@@ -18,13 +18,24 @@ import createScene from "../../../../Specs/createScene.js";
describe("Scene/ClippingPolygonCollection", function () {
const positions = Cartesian3.fromRadiansArray([
- -1.3194369277314022, 0.6988062530900625, -1.31941, 0.69879,
- -1.3193955980204217, 0.6988091578771254, -1.3193931220959367,
- 0.698743632490865, -1.3194358224045408, 0.6987471965556998,
+ -1.3194369277314022,
+ 0.6988062530900625,
+ -1.31941,
+ 0.69879,
+ -1.3193955980204217,
+ 0.6988091578771254,
+ -1.3193931220959367,
+ 0.698743632490865,
+ -1.3194358224045408,
+ 0.6987471965556998,
]);
const positionsB = Cartesian3.fromRadiansArray([
- -1.3194369277314022, 0.6988062530900625, -1.31941, 0.69879,
- -1.3193931220959367, 0.698743632490865,
+ -1.3194369277314022,
+ 0.6988062530900625,
+ -1.31941,
+ 0.69879,
+ -1.3193931220959367,
+ 0.698743632490865,
]);
it("default constructor", function () {
@@ -165,7 +176,7 @@ describe("Scene/ClippingPolygonCollection", function () {
expect(() => {
polygons.update(scene.frameState);
}).toThrowError(
- "ClippingPolygonCollections are only supported for WebGL 2.",
+ "ClippingPolygonCollections are only supported for WebGL 2."
);
scene.destroyForSpecs();
@@ -247,19 +258,19 @@ describe("Scene/ClippingPolygonCollection", function () {
expect(arrayBufferView[1]).toBe(0); // extents index
expect(arrayBufferView[2]).toEqualEpsilon(
0.6969271302223206,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
); // first position in spherical coordinates
expect(arrayBufferView[3]).toEqualEpsilon(
-1.3191630840301514,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(arrayBufferView[10]).toEqualEpsilon(
0.6968677043914795,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
); // last position in spherical coordinates
expect(arrayBufferView[11]).toEqualEpsilon(
-1.3191620111465454,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(arrayBufferView[12]).toBe(0); // padding
@@ -289,19 +300,19 @@ describe("Scene/ClippingPolygonCollection", function () {
expect(arrayBufferView).toBeDefined();
expect(arrayBufferView[0]).toEqualEpsilon(
0.6958641409873962,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
); // south
expect(arrayBufferView[1]).toEqualEpsilon(
-1.3201631307601929,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
); // west
expect(arrayBufferView[2]).toEqualEpsilon(
484.0434265136719,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
); // 1 / (north - south)
expect(arrayBufferView[3]).toEqualEpsilon(
489.4261779785156,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
); // 1 / (east - west)
expect(arrayBufferView[4]).toBe(0); // padding
expect(arrayBufferView[5]).toBe(0); // padding
@@ -341,19 +352,19 @@ describe("Scene/ClippingPolygonCollection", function () {
expect(arrayBufferView).toBeDefined();
expect(arrayBufferView[0]).toEqualEpsilon(
0.6958641409873962,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
); // south
expect(arrayBufferView[1]).toEqualEpsilon(
-1.3201631307601929,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
); // west
expect(arrayBufferView[2]).toEqualEpsilon(
484.0434265136719,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
); // north - south
expect(arrayBufferView[3]).toEqualEpsilon(
489.4261779785156,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
); // east - west
expect(arrayBufferView[4]).toBe(0); // padding
expect(arrayBufferView[5]).toBe(0); // padding
@@ -436,11 +447,10 @@ describe("Scene/ClippingPolygonCollection", function () {
// Set this to the minimum possible value so texture sizes can be consistently tested
ContextLimits._maximumTextureSize = 64;
- const result =
- ClippingPolygonCollection.getClippingDistanceTextureResolution(
- polygons,
- new Cartesian2(),
- );
+ const result = ClippingPolygonCollection.getClippingDistanceTextureResolution(
+ polygons,
+ new Cartesian2()
+ );
expect(result.x).toBe(64);
expect(result.y).toBe(64);
@@ -457,11 +467,10 @@ describe("Scene/ClippingPolygonCollection", function () {
// Set this to the minimum possible value so texture sizes can be consistently tested
ContextLimits._maximumTextureSize = 64;
- const result =
- ClippingPolygonCollection.getClippingExtentsTextureResolution(
- polygons,
- new Cartesian2(),
- );
+ const result = ClippingPolygonCollection.getClippingExtentsTextureResolution(
+ polygons,
+ new Cartesian2()
+ );
expect(result.x).toBe(1);
expect(result.y).toBe(2);
@@ -475,8 +484,9 @@ describe("Scene/ClippingPolygonCollection", function () {
rectangle: Rectangle.fromCartesianArray(positions),
});
- let intersect =
- polygons.computeIntersectionWithBoundingVolume(boundingVolume);
+ let intersect = polygons.computeIntersectionWithBoundingVolume(
+ boundingVolume
+ );
expect(intersect).toEqual(Intersect.OUTSIDE);
polygons.add(new ClippingPolygon({ positions }));
@@ -486,7 +496,7 @@ describe("Scene/ClippingPolygonCollection", function () {
const boundingSphere = BoundingSphere.fromPoints(positions);
boundingVolume = new TileBoundingSphere(
boundingSphere.center,
- boundingSphere.radius,
+ boundingSphere.radius
);
intersect = polygons.computeIntersectionWithBoundingVolume(boundingVolume);
expect(intersect).toEqual(Intersect.INTERSECTING);
@@ -505,8 +515,9 @@ describe("Scene/ClippingPolygonCollection", function () {
rectangle: Rectangle.fromCartesianArray(positions),
});
- let intersect =
- polygons.computeIntersectionWithBoundingVolume(boundingVolume);
+ let intersect = polygons.computeIntersectionWithBoundingVolume(
+ boundingVolume
+ );
expect(intersect).toEqual(Intersect.INSIDE);
polygons.add(new ClippingPolygon({ positions }));
@@ -516,7 +527,7 @@ describe("Scene/ClippingPolygonCollection", function () {
const boundingSphere = BoundingSphere.fromPoints(positions);
boundingVolume = new TileBoundingSphere(
boundingSphere.center,
- boundingSphere.radius,
+ boundingSphere.radius
);
intersect = polygons.computeIntersectionWithBoundingVolume(boundingVolume);
expect(intersect).toEqual(Intersect.INTERSECTING);
diff --git a/packages/engine/Specs/Scene/ClippingPolygonSpec.js b/packages/engine/Specs/Scene/ClippingPolygonSpec.js
index 22c6e4abb56d..2519e35cb006 100644
--- a/packages/engine/Specs/Scene/ClippingPolygonSpec.js
+++ b/packages/engine/Specs/Scene/ClippingPolygonSpec.js
@@ -9,9 +9,16 @@ import {
describe("Scene/ClippingPolygon", function () {
it("constructs", function () {
const positions = Cartesian3.fromRadiansArray([
- -1.3194369277314022, 0.6988062530900625, -1.31941, 0.69879,
- -1.3193955980204217, 0.6988091578771254, -1.3193931220959367,
- 0.698743632490865, -1.3194358224045408, 0.6987471965556998,
+ -1.3194369277314022,
+ 0.6988062530900625,
+ -1.31941,
+ 0.69879,
+ -1.3193955980204217,
+ 0.6988091578771254,
+ -1.3193931220959367,
+ 0.698743632490865,
+ -1.3194358224045408,
+ 0.6987471965556998,
]);
const polygon = new ClippingPolygon({
@@ -30,7 +37,10 @@ describe("Scene/ClippingPolygon", function () {
}).toThrowDeveloperError();
const positions = Cartesian3.fromRadiansArray([
- -1.3194369277314022, 0.6988062530900625, -1.31941, 0.69879,
+ -1.3194369277314022,
+ 0.6988062530900625,
+ -1.31941,
+ 0.69879,
]);
expect(() => {
@@ -43,9 +53,16 @@ describe("Scene/ClippingPolygon", function () {
it("clones", function () {
const positions = Cartesian3.fromRadiansArray([
- -1.3194369277314022, 0.6988062530900625, -1.31941, 0.69879,
- -1.3193955980204217, 0.6988091578771254, -1.3193931220959367,
- 0.698743632490865, -1.3194358224045408, 0.6987471965556998,
+ -1.3194369277314022,
+ 0.6988062530900625,
+ -1.31941,
+ 0.69879,
+ -1.3193955980204217,
+ 0.6988091578771254,
+ -1.3193931220959367,
+ 0.698743632490865,
+ -1.3194358224045408,
+ 0.6987471965556998,
]);
const polygon = new ClippingPolygon({
@@ -74,9 +91,16 @@ describe("Scene/ClippingPolygon", function () {
it("equals verifies equality", function () {
const positions = Cartesian3.fromRadiansArray([
- -1.3194369277314022, 0.6988062530900625, -1.31941, 0.69879,
- -1.3193955980204217, 0.6988091578771254, -1.3193931220959367,
- 0.698743632490865, -1.3194358224045408, 0.6987471965556998,
+ -1.3194369277314022,
+ 0.6988062530900625,
+ -1.31941,
+ 0.69879,
+ -1.3193955980204217,
+ 0.6988091578771254,
+ -1.3193931220959367,
+ 0.698743632490865,
+ -1.3194358224045408,
+ 0.6987471965556998,
]);
const polygonA = new ClippingPolygon({
@@ -93,9 +117,16 @@ describe("Scene/ClippingPolygon", function () {
polygonB = new ClippingPolygon({
ellipsoid: Ellipsoid.MOON,
positions: Cartesian3.fromRadiansArray([
- -1.3194369277314022, 0.6988062530900625, -1.31941, 0.69879,
- -1.3193955980204217, 0.6988091578771254, -1.3193931220959367,
- 0.698743632490865, -1.3194358224045408, 0.6987471965556998,
+ -1.3194369277314022,
+ 0.6988062530900625,
+ -1.31941,
+ 0.69879,
+ -1.3193955980204217,
+ 0.6988091578771254,
+ -1.3193931220959367,
+ 0.698743632490865,
+ -1.3194358224045408,
+ 0.6987471965556998,
]),
});
@@ -111,9 +142,16 @@ describe("Scene/ClippingPolygon", function () {
it("equals throws without arguments", function () {
const positions = Cartesian3.fromRadiansArray([
- -1.3194369277314022, 0.6988062530900625, -1.31941, 0.69879,
- -1.3193955980204217, 0.6988091578771254, -1.3193931220959367,
- 0.698743632490865, -1.3194358224045408, 0.6987471965556998,
+ -1.3194369277314022,
+ 0.6988062530900625,
+ -1.31941,
+ 0.69879,
+ -1.3193955980204217,
+ 0.6988091578771254,
+ -1.3193931220959367,
+ 0.698743632490865,
+ -1.3194358224045408,
+ 0.6987471965556998,
]);
const polygon = new ClippingPolygon({
@@ -130,9 +168,16 @@ describe("Scene/ClippingPolygon", function () {
it("computeRectangle returns rectangle enclosing the polygon", function () {
const positions = Cartesian3.fromRadiansArray([
- -1.3194369277314022, 0.6988062530900625, -1.31941, 0.69879,
- -1.3193955980204217, 0.6988091578771254, -1.3193931220959367,
- 0.698743632490865, -1.3194358224045408, 0.6987471965556998,
+ -1.3194369277314022,
+ 0.6988062530900625,
+ -1.31941,
+ 0.69879,
+ -1.3193955980204217,
+ 0.6988091578771254,
+ -1.3193931220959367,
+ 0.698743632490865,
+ -1.3194358224045408,
+ 0.6987471965556998,
]);
const polygon = new ClippingPolygon({
@@ -143,27 +188,34 @@ describe("Scene/ClippingPolygon", function () {
expect(result).toBeInstanceOf(Rectangle);
expect(result.west).toEqualEpsilon(
-1.3194369277314024,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(result.south).toEqualEpsilon(
0.6987436324908647,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(result.east).toEqualEpsilon(
-1.3193931220959367,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(result.north).toEqualEpsilon(
0.6988091578771254,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
it("computeRectangle uses result parameter", function () {
const positions = Cartesian3.fromRadiansArray([
- -1.3194369277314022, 0.6988062530900625, -1.31941, 0.69879,
- -1.3193955980204217, 0.6988091578771254, -1.3193931220959367,
- 0.698743632490865, -1.3194358224045408, 0.6987471965556998,
+ -1.3194369277314022,
+ 0.6988062530900625,
+ -1.31941,
+ 0.69879,
+ -1.3193955980204217,
+ 0.6988091578771254,
+ -1.3193931220959367,
+ 0.698743632490865,
+ -1.3194358224045408,
+ 0.6987471965556998,
]);
const polygon = new ClippingPolygon({
@@ -175,27 +227,34 @@ describe("Scene/ClippingPolygon", function () {
expect(returnedValue).toBe(result);
expect(result.west).toEqualEpsilon(
-1.3194369277314024,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(result.south).toEqualEpsilon(
0.6987436324908647,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(result.east).toEqualEpsilon(
-1.3193931220959367,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(result.north).toEqualEpsilon(
0.6988091578771254,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
it("computeSphericalExtents returns rectangle enclosing the polygon defined in spherical coordinates", function () {
const positions = Cartesian3.fromRadiansArray([
- -1.3194369277314022, 0.6988062530900625, -1.31941, 0.69879,
- -1.3193955980204217, 0.6988091578771254, -1.3193931220959367,
- 0.698743632490865, -1.3194358224045408, 0.6987471965556998,
+ -1.3194369277314022,
+ 0.6988062530900625,
+ -1.31941,
+ 0.69879,
+ -1.3193955980204217,
+ 0.6988091578771254,
+ -1.3193931220959367,
+ 0.698743632490865,
+ -1.3194358224045408,
+ 0.6987471965556998,
]);
const polygon = new ClippingPolygon({
@@ -206,27 +265,34 @@ describe("Scene/ClippingPolygon", function () {
expect(result).toBeInstanceOf(Rectangle);
expect(result.west).toEqualEpsilon(
-1.3191630776640944,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(result.south).toEqualEpsilon(
0.6968641167123716,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(result.east).toEqualEpsilon(
-1.3191198686316543,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(result.north).toEqualEpsilon(
0.6969300470954187,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
it("computeSphericalExtents uses result parameter", function () {
const positions = Cartesian3.fromRadiansArray([
- -1.3194369277314022, 0.6988062530900625, -1.31941, 0.69879,
- -1.3193955980204217, 0.6988091578771254, -1.3193931220959367,
- 0.698743632490865, -1.3194358224045408, 0.6987471965556998,
+ -1.3194369277314022,
+ 0.6988062530900625,
+ -1.31941,
+ 0.69879,
+ -1.3193955980204217,
+ 0.6988091578771254,
+ -1.3193931220959367,
+ 0.698743632490865,
+ -1.3194358224045408,
+ 0.6987471965556998,
]);
const polygon = new ClippingPolygon({
@@ -238,19 +304,19 @@ describe("Scene/ClippingPolygon", function () {
expect(returnedValue).toBe(result);
expect(result.west).toEqualEpsilon(
-1.3191630776640944,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(result.south).toEqualEpsilon(
0.6968641167123716,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(result.east).toEqualEpsilon(
-1.3191198686316543,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(result.north).toEqualEpsilon(
0.6969300470954187,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
});
diff --git a/packages/engine/Specs/Scene/CloudCollectionSpec.js b/packages/engine/Specs/Scene/CloudCollectionSpec.js
index 47ec8db78506..a8283482baaa 100644
--- a/packages/engine/Specs/Scene/CloudCollectionSpec.js
+++ b/packages/engine/Specs/Scene/CloudCollectionSpec.js
@@ -641,5 +641,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Composite3DTileContentSpec.js b/packages/engine/Specs/Scene/Composite3DTileContentSpec.js
index 42a7f7830e60..2dcea78122bc 100644
--- a/packages/engine/Specs/Scene/Composite3DTileContentSpec.js
+++ b/packages/engine/Specs/Scene/Composite3DTileContentSpec.js
@@ -90,10 +90,10 @@ describe(
version: 2,
});
await expectAsync(
- Cesium3DTilesTester.createContentForMockTile(arrayBuffer, "cmpt"),
+ Cesium3DTilesTester.createContentForMockTile(arrayBuffer, "cmpt")
).toBeRejectedWithError(
RuntimeError,
- "Only Composite Tile version 1 is supported. Version 2 is not.",
+ "Only Composite Tile version 1 is supported. Version 2 is not."
);
});
@@ -106,17 +106,17 @@ describe(
],
});
await expectAsync(
- Cesium3DTilesTester.createContentForMockTile(arrayBuffer, "cmpt"),
+ Cesium3DTilesTester.createContentForMockTile(arrayBuffer, "cmpt")
).toBeRejectedWithError(
RuntimeError,
- "Unknown tile content type, xxxx, inside Composite tile",
+ "Unknown tile content type, xxxx, inside Composite tile"
);
});
it("becomes ready", async function () {
const tileset = await Cesium3DTilesTester.loadTileset(
scene,
- compositeUrl,
+ compositeUrl
);
expect(tileset.root.contentReady).toBeTrue();
expect(tileset.root.content).toBeDefined();
@@ -134,25 +134,25 @@ describe(
});
await expectAsync(
- Cesium3DTilesTester.createContentForMockTile(arrayBuffer, "cmpt"),
+ Cesium3DTilesTester.createContentForMockTile(arrayBuffer, "cmpt")
).toBeRejectedWithError(RuntimeError);
});
it("renders composite", function () {
return Cesium3DTilesTester.loadTileset(scene, compositeUrl).then(
- expectRenderComposite,
+ expectRenderComposite
);
});
it("renders composite of composite", function () {
return Cesium3DTilesTester.loadTileset(scene, compositeOfComposite).then(
- expectRenderComposite,
+ expectRenderComposite
);
});
it("renders multiple instanced tilesets", function () {
return Cesium3DTilesTester.loadTileset(scene, compositeOfInstanced).then(
- expectRenderComposite,
+ expectRenderComposite
);
});
@@ -240,7 +240,7 @@ describe(
for (let i = 0; i < innerContents.length; i++) {
expect(innerContents[i].group.metadata).toBe(groupMetadata);
}
- },
+ }
);
});
@@ -255,7 +255,7 @@ describe(
for (let i = 0; i < innerContents.length; i++) {
expect(innerContents[i].metadata).toBe(explicitMetadata);
}
- },
+ }
);
});
@@ -270,10 +270,10 @@ describe(
for (let i = 0; i < innerContents.length; i++) {
expect(innerContents[i].metadata).toBe(implicitMetadata);
}
- },
+ }
);
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/ConditionsExpressionSpec.js b/packages/engine/Specs/Scene/ConditionsExpressionSpec.js
index 133d6df1e7e6..43daf10cf2c8 100644
--- a/packages/engine/Specs/Scene/ConditionsExpressionSpec.js
+++ b/packages/engine/Specs/Scene/ConditionsExpressionSpec.js
@@ -62,7 +62,7 @@ describe("Scene/ConditionsExpression", function () {
const expression = new ConditionsExpression(
jsonExpWithDefines,
defines,
- result,
+ result
);
const value = expression.evaluate(new MockFeature(101), result);
expect(value).toEqual(new Cartesian4(0.0, 0.0, 1.0, 1.0));
@@ -74,7 +74,7 @@ describe("Scene/ConditionsExpression", function () {
const expression = new ConditionsExpression(
jsonExpWithDefines,
defines,
- result,
+ result
);
const value = expression.evaluate(new MockFeature(101), result);
expect(value).toEqual(Color.BLUE);
@@ -108,7 +108,7 @@ describe("Scene/ConditionsExpression", function () {
"getColor()",
variableSubstitutionMap,
{},
- "vec4",
+ "vec4"
);
const expected =
"vec4 getColor()\n" +
@@ -136,7 +136,7 @@ describe("Scene/ConditionsExpression", function () {
"getColor",
{},
{},
- "vec4",
+ "vec4"
);
expect(shaderFunction).toBeUndefined();
});
diff --git a/packages/engine/Specs/Scene/ConeEmitterSpec.js b/packages/engine/Specs/Scene/ConeEmitterSpec.js
index 9ae972485fc9..f3f94dd75adb 100644
--- a/packages/engine/Specs/Scene/ConeEmitterSpec.js
+++ b/packages/engine/Specs/Scene/ConeEmitterSpec.js
@@ -38,7 +38,7 @@ describe("Scene/ConeEmitter", function () {
expect(particle.position).toEqual(Cartesian3.ZERO);
expect(Cartesian3.magnitude(particle.velocity)).toEqualEpsilon(
1.0,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
// acos(dot(unit v, unit z)) <= angle
diff --git a/packages/engine/Specs/Scene/ContentMetadataSpec.js b/packages/engine/Specs/Scene/ContentMetadataSpec.js
index a08f776bf528..29b05222f003 100644
--- a/packages/engine/Specs/Scene/ContentMetadataSpec.js
+++ b/packages/engine/Specs/Scene/ContentMetadataSpec.js
@@ -147,23 +147,27 @@ describe("Scene/ContentMetadata", function () {
it("getPropertyBySemantic returns the property value", function () {
expect(contentMetadata.getPropertyBySemantic("COLOR")).toEqual([
- 255, 125, 0,
+ 255,
+ 125,
+ 0,
]);
});
it("setPropertyBySemantic sets property value", function () {
expect(contentMetadata.getPropertyBySemantic("COLOR")).toEqual([
- 255, 125, 0,
+ 255,
+ 125,
+ 0,
]);
expect(contentMetadata.setPropertyBySemantic("COLOR", [0, 0, 0])).toBe(
- true,
+ true
);
expect(contentMetadata.getPropertyBySemantic("COLOR")).toEqual([0, 0, 0]);
});
it("setPropertyBySemantic returns false if the semantic doesn't exist", function () {
expect(contentMetadata.setPropertyBySemantic("AUTHOR", "Test Author")).toBe(
- false,
+ false
);
});
});
diff --git a/packages/engine/Specs/Scene/CreditDisplaySpec.js b/packages/engine/Specs/Scene/CreditDisplaySpec.js
index ad5698092150..d194b9abbef7 100644
--- a/packages/engine/Specs/Scene/CreditDisplaySpec.js
+++ b/packages/engine/Specs/Scene/CreditDisplaySpec.js
@@ -112,7 +112,7 @@ describe("Scene/CreditDisplay", function () {
creditDisplay = new CreditDisplay(container);
const credit = new Credit(
'CesiumJS.org ',
- true,
+ true
);
beginFrame(creditDisplay);
creditDisplay.addCreditToNextFrame(credit);
@@ -512,10 +512,10 @@ describe("Scene/CreditDisplay", function () {
const lightboxCreditList = creditDisplay._creditList;
expect(lightboxCreditList.childNodes.length).toEqual(2);
expect(lightboxCreditList.childNodes[0].childNodes[0]).toEqual(
- credit1.element,
+ credit1.element
);
expect(lightboxCreditList.childNodes[1].childNodes[0]).toEqual(
- credit2.element,
+ credit2.element
);
// Show credits on screen again
@@ -607,10 +607,10 @@ describe("Scene/CreditDisplay", function () {
const container2 = document.createElement("div");
const creditDisplay2 = new CreditDisplay(container2);
expect(creditDisplay._currentCesiumCredit).toEqual(
- creditDisplay2._currentCesiumCredit,
+ creditDisplay2._currentCesiumCredit
);
expect(creditDisplay._currentCesiumCredit).not.toBe(
- creditDisplay2._currentCesiumCredit,
+ creditDisplay2._currentCesiumCredit
);
});
}
diff --git a/packages/engine/Specs/Scene/DebugAppearanceSpec.js b/packages/engine/Specs/Scene/DebugAppearanceSpec.js
index 4301b7025c18..a83ed298e4d6 100644
--- a/packages/engine/Specs/Scene/DebugAppearanceSpec.js
+++ b/packages/engine/Specs/Scene/DebugAppearanceSpec.js
@@ -71,7 +71,7 @@ describe(
expect(a.attributeName).toEqual("normal");
expect(a.glslDatatype).toEqual("vec3");
expect(a.renderState).toEqual(
- Appearance.getDefaultRenderState(false, false),
+ Appearance.getDefaultRenderState(false, false)
);
expect(a.translucent).toEqual(false);
expect(a.closed).toEqual(false);
@@ -94,7 +94,7 @@ describe(
expect(a.attributeName).toEqual("st");
expect(a.glslDatatype).toEqual("vec2");
expect(a.renderState).toEqual(
- Appearance.getDefaultRenderState(false, false),
+ Appearance.getDefaultRenderState(false, false)
);
expect(a.translucent).toEqual(false);
expect(a.closed).toEqual(false);
@@ -118,7 +118,7 @@ describe(
expect(a.attributeName).toEqual("rotation");
expect(a.glslDatatype).toEqual("float");
expect(a.renderState).toEqual(
- Appearance.getDefaultRenderState(false, false),
+ Appearance.getDefaultRenderState(false, false)
);
expect(a.translucent).toEqual(false);
expect(a.closed).toEqual(false);
@@ -142,7 +142,7 @@ describe(
expect(a.attributeName).toEqual("str");
expect(a.glslDatatype).toEqual("vec3");
expect(a.renderState).toEqual(
- Appearance.getDefaultRenderState(false, false),
+ Appearance.getDefaultRenderState(false, false)
);
expect(a.translucent).toEqual(false);
expect(a.closed).toEqual(false);
@@ -161,14 +161,14 @@ describe(
expect(a.fragmentShaderSource).toBeDefined();
expect(a.fragmentShaderSource.indexOf("v_quaternion")).toBeGreaterThan(
- -1,
+ -1
);
expect(a.material).not.toBeDefined();
expect(a.attributeName).toEqual("quaternion");
expect(a.glslDatatype).toEqual("vec4");
expect(a.renderState).toEqual(
- Appearance.getDefaultRenderState(false, false),
+ Appearance.getDefaultRenderState(false, false)
);
expect(a.translucent).toEqual(false);
expect(a.closed).toEqual(false);
@@ -369,5 +369,5 @@ describe(
expect(scene).notToRender([0, 0, 0, 255]);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/DebugCameraPrimitiveSpec.js b/packages/engine/Specs/Scene/DebugCameraPrimitiveSpec.js
index 824066d4887a..0b84e009b4aa 100644
--- a/packages/engine/Specs/Scene/DebugCameraPrimitiveSpec.js
+++ b/packages/engine/Specs/Scene/DebugCameraPrimitiveSpec.js
@@ -21,7 +21,7 @@ describe(
scene.camera.position = new Cartesian3(0.0, 0.0, 0.0);
scene.camera.direction = Cartesian3.negate(
Cartesian3.UNIT_X,
- new Cartesian3(),
+ new Cartesian3()
);
scene.camera.up = Cartesian3.clone(Cartesian3.UNIT_Z);
scene.camera.frustum.near = 1.0;
@@ -73,7 +73,7 @@ describe(
scene.primitives.add(
new DebugCameraPrimitive({
camera: camera,
- }),
+ })
);
expect(scene).notToRender([0, 0, 0, 255]);
});
@@ -83,7 +83,7 @@ describe(
new DebugCameraPrimitive({
camera: camera,
show: false,
- }),
+ })
);
expect(scene).toRender([0, 0, 0, 255]);
});
@@ -92,7 +92,7 @@ describe(
const p = scene.primitives.add(
new DebugCameraPrimitive({
camera: camera,
- }),
+ })
);
scene.renderForSpecs();
const primitive = p._outlinePrimitives[0];
@@ -105,7 +105,7 @@ describe(
new DebugCameraPrimitive({
camera: camera,
updateOnChange: false,
- }),
+ })
);
scene.renderForSpecs();
const primitive = p._primitive;
@@ -118,7 +118,7 @@ describe(
new DebugCameraPrimitive({
camera: camera,
id: "id",
- }),
+ })
);
expect(scene).toPickAndCall(function (result) {
@@ -131,12 +131,12 @@ describe(
const p = scene.primitives.add(
new DebugCameraPrimitive({
camera: camera,
- }),
+ })
);
expect(p.isDestroyed()).toEqual(false);
scene.primitives.remove(p);
expect(p.isDestroyed()).toEqual(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/DebugModelMatrixPrimitiveSpec.js b/packages/engine/Specs/Scene/DebugModelMatrixPrimitiveSpec.js
index 1ad701b090cd..a48d463439a1 100644
--- a/packages/engine/Specs/Scene/DebugModelMatrixPrimitiveSpec.js
+++ b/packages/engine/Specs/Scene/DebugModelMatrixPrimitiveSpec.js
@@ -62,7 +62,7 @@ describe(
scene.primitives.add(
new DebugModelMatrixPrimitive({
show: false,
- }),
+ })
);
expect(scene).toRender([0, 0, 0, 255]);
});
@@ -71,7 +71,7 @@ describe(
const p = scene.primitives.add(
new DebugModelMatrixPrimitive({
id: "id",
- }),
+ })
);
expect(scene).toPickAndCall(function (result) {
@@ -87,5 +87,5 @@ describe(
expect(p.isDestroyed()).toEqual(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/DeviceOrientationCameraControllerSpec.js b/packages/engine/Specs/Scene/DeviceOrientationCameraControllerSpec.js
index c74612efa46b..af76fa49b6d3 100644
--- a/packages/engine/Specs/Scene/DeviceOrientationCameraControllerSpec.js
+++ b/packages/engine/Specs/Scene/DeviceOrientationCameraControllerSpec.js
@@ -67,12 +67,12 @@ describe("Scene/DeviceOrientationCameraController", function () {
expect(camera.position).toEqual(position);
expect(camera.direction).toEqualEpsilon(
Cartesian3.UNIT_Y,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(camera.up).toEqualEpsilon(up, CesiumMath.EPSILON14);
expect(camera.right).toEqualEpsilon(
Cartesian3.UNIT_X,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -89,7 +89,7 @@ describe("Scene/DeviceOrientationCameraController", function () {
expect(camera.up).toEqualEpsilon(Cartesian3.UNIT_Y, CesiumMath.EPSILON14);
expect(camera.right).toEqualEpsilon(
Cartesian3.UNIT_Z,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -104,7 +104,7 @@ describe("Scene/DeviceOrientationCameraController", function () {
expect(camera.position).toEqual(position);
expect(camera.direction).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(camera.up).toEqualEpsilon(Cartesian3.UNIT_X, CesiumMath.EPSILON14);
expect(camera.right).toEqualEpsilon(right, CesiumMath.EPSILON14);
diff --git a/packages/engine/Specs/Scene/DiscardEmptyTileImagePolicySpec.js b/packages/engine/Specs/Scene/DiscardEmptyTileImagePolicySpec.js
index 6da45e7870a3..d7e9ec1607d0 100644
--- a/packages/engine/Specs/Scene/DiscardEmptyTileImagePolicySpec.js
+++ b/packages/engine/Specs/Scene/DiscardEmptyTileImagePolicySpec.js
@@ -20,7 +20,7 @@ describe("Scene/DiscardEmptyTileImagePolicy", function () {
promises.push(
pollToPromise(function () {
return policy.isReady();
- }),
+ })
);
return Promise.all(promises, function (results) {
@@ -39,7 +39,7 @@ describe("Scene/DiscardEmptyTileImagePolicy", function () {
promises.push(
pollToPromise(function () {
return policy.isReady();
- }),
+ })
);
return Promise.all(promises, function (results) {
diff --git a/packages/engine/Specs/Scene/DiscardMissingTileImagePolicySpec.js b/packages/engine/Specs/Scene/DiscardMissingTileImagePolicySpec.js
index 804d5826e59b..a10642594831 100644
--- a/packages/engine/Specs/Scene/DiscardMissingTileImagePolicySpec.js
+++ b/packages/engine/Specs/Scene/DiscardMissingTileImagePolicySpec.js
@@ -46,25 +46,27 @@ describe("Scene/DiscardMissingTileImagePolicy", function () {
const missingImageUrl = "http://some.host.invalid/missingImage.png";
spyOn(Resource, "createImageBitmapFromBlob").and.callThrough();
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const url = request.url;
- if (/^blob:/.test(url)) {
- Resource._DefaultImplementations.createImage(
- request,
- crossOrigin,
- deferred,
- );
- } else {
- expect(url).toEqual(missingImageUrl);
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- }
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const url = request.url;
+ if (/^blob:/.test(url)) {
+ Resource._DefaultImplementations.createImage(
+ request,
+ crossOrigin,
+ deferred
+ );
+ } else {
+ expect(url).toEqual(missingImageUrl);
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ }
+ });
Resource._Implementations.loadWithXhr = function (
url,
@@ -73,7 +75,7 @@ describe("Scene/DiscardMissingTileImagePolicy", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
expect(url).toEqual(missingImageUrl);
return Resource._DefaultImplementations.loadWithXhr(
@@ -82,7 +84,7 @@ describe("Scene/DiscardMissingTileImagePolicy", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -119,7 +121,7 @@ describe("Scene/DiscardMissingTileImagePolicy", function () {
promises.push(
pollToPromise(function () {
return policy.isReady();
- }),
+ })
);
return Promise.all(promises, function (results) {
@@ -145,7 +147,7 @@ describe("Scene/DiscardMissingTileImagePolicy", function () {
promises.push(
pollToPromise(function () {
return policy.isReady();
- }),
+ })
);
return Promise.all(promises, function (results) {
@@ -169,7 +171,7 @@ describe("Scene/DiscardMissingTileImagePolicy", function () {
promises.push(
pollToPromise(function () {
return policy.isReady();
- }),
+ })
);
return Promise.all(promises, function (results) {
diff --git a/packages/engine/Specs/Scene/DynamicAtmosphereLightingTypeSpec.js b/packages/engine/Specs/Scene/DynamicAtmosphereLightingTypeSpec.js
index 7f1f4a555bca..71c1802eeca8 100644
--- a/packages/engine/Specs/Scene/DynamicAtmosphereLightingTypeSpec.js
+++ b/packages/engine/Specs/Scene/DynamicAtmosphereLightingTypeSpec.js
@@ -13,19 +13,19 @@ describe("Scene/DynamicAtmosphereLightingType", function () {
const globe = mockGlobe();
expect(DynamicAtmosphereLightingType.fromGlobeFlags(globe)).toBe(
- DynamicAtmosphereLightingType.NONE,
+ DynamicAtmosphereLightingType.NONE
);
globe.enableLighting = true;
expect(DynamicAtmosphereLightingType.fromGlobeFlags(globe)).toBe(
- DynamicAtmosphereLightingType.NONE,
+ DynamicAtmosphereLightingType.NONE
);
globe.enableLighting = false;
globe.dynamicAtmosphereLighting = true;
expect(DynamicAtmosphereLightingType.fromGlobeFlags(globe)).toBe(
- DynamicAtmosphereLightingType.NONE,
+ DynamicAtmosphereLightingType.NONE
);
});
@@ -36,12 +36,12 @@ describe("Scene/DynamicAtmosphereLightingType", function () {
globe.dynamicAtmosphereLightingFromSun = true;
expect(DynamicAtmosphereLightingType.fromGlobeFlags(globe)).toBe(
- DynamicAtmosphereLightingType.SUNLIGHT,
+ DynamicAtmosphereLightingType.SUNLIGHT
);
globe.dynamicAtmosphereLightingFromSun = false;
expect(DynamicAtmosphereLightingType.fromGlobeFlags(globe)).toBe(
- DynamicAtmosphereLightingType.SCENE_LIGHT,
+ DynamicAtmosphereLightingType.SCENE_LIGHT
);
});
});
diff --git a/packages/engine/Specs/Scene/EllipsoidPrimitiveSpec.js b/packages/engine/Specs/Scene/EllipsoidPrimitiveSpec.js
index 0452391632c9..c2b7e4092bfc 100644
--- a/packages/engine/Specs/Scene/EllipsoidPrimitiveSpec.js
+++ b/packages/engine/Specs/Scene/EllipsoidPrimitiveSpec.js
@@ -81,7 +81,7 @@ describe(
it("renders with a custom modelMatrix", function () {
ellipsoid.radii = new Cartesian3(0.1, 0.1, 0.1);
ellipsoid.modelMatrix = Matrix4.fromScale(
- new Cartesian3(10.0, 10.0, 10.0),
+ new Cartesian3(10.0, 10.0, 10.0)
);
expect(scene).toRender([0, 0, 0, 255]);
@@ -119,7 +119,7 @@ describe(
new EllipsoidPrimitive({
radii: new Cartesian3(1.0, 1.0, 1.0),
debugShowBoundingVolume: true,
- }),
+ })
);
const camera = scene.camera;
@@ -199,5 +199,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/EllipsoidSurfaceAppearanceSpec.js b/packages/engine/Specs/Scene/EllipsoidSurfaceAppearanceSpec.js
index 4d0f915cb398..b03e26ec9477 100644
--- a/packages/engine/Specs/Scene/EllipsoidSurfaceAppearanceSpec.js
+++ b/packages/engine/Specs/Scene/EllipsoidSurfaceAppearanceSpec.js
@@ -47,7 +47,7 @@ describe(
expect(a.vertexShaderSource).toBeDefined();
expect(a.fragmentShaderSource).toBeDefined();
expect(a.renderState).toEqual(
- Appearance.getDefaultRenderState(true, true),
+ Appearance.getDefaultRenderState(true, true)
);
expect(a.vertexFormat).toEqual(EllipsoidSurfaceAppearance.VERTEX_FORMAT);
expect(a.flat).toEqual(false);
@@ -78,5 +78,5 @@ describe(
expect(scene).notToRender([0, 0, 0, 255]);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/ExpressionSpec.js b/packages/engine/Specs/Scene/ExpressionSpec.js
index f5bfda1ca5d3..c1f1d8c9d7be 100644
--- a/packages/engine/Specs/Scene/ExpressionSpec.js
+++ b/packages/engine/Specs/Scene/ExpressionSpec.js
@@ -115,7 +115,7 @@ describe("Scene/Expression", function () {
expect(expression.evaluate(feature)).toEqual("");
expression = new Expression(
- "abs(-${height}) + max(${height}, ${width}) + clamp(${height}, 0, 2)",
+ "abs(-${height}) + max(${height}, ${width}) + clamp(${height}, 0, 2)"
);
expect(expression.evaluate(feature)).toEqual(22);
@@ -360,82 +360,82 @@ describe("Scene/Expression", function () {
it("evaluates literal color", function () {
let expression = new Expression("color('#ffffff')");
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(Color.WHITE),
+ Cartesian4.fromColor(Color.WHITE)
);
expression = new Expression("color('#00FFFF')");
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(Color.CYAN),
+ Cartesian4.fromColor(Color.CYAN)
);
expression = new Expression("color('#fff')");
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(Color.WHITE),
+ Cartesian4.fromColor(Color.WHITE)
);
expression = new Expression("color('#0FF')");
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(Color.CYAN),
+ Cartesian4.fromColor(Color.CYAN)
);
expression = new Expression("color('white')");
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(Color.WHITE),
+ Cartesian4.fromColor(Color.WHITE)
);
expression = new Expression("color('cyan')");
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(Color.CYAN),
+ Cartesian4.fromColor(Color.CYAN)
);
expression = new Expression("color('white', 0.5)");
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(Color.fromAlpha(Color.WHITE, 0.5)),
+ Cartesian4.fromColor(Color.fromAlpha(Color.WHITE, 0.5))
);
expression = new Expression("rgb(255, 255, 255)");
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(Color.WHITE),
+ Cartesian4.fromColor(Color.WHITE)
);
expression = new Expression("rgb(100, 255, 190)");
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(Color.fromBytes(100, 255, 190)),
+ Cartesian4.fromColor(Color.fromBytes(100, 255, 190))
);
expression = new Expression("hsl(0, 0, 1)");
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(Color.WHITE),
+ Cartesian4.fromColor(Color.WHITE)
);
expression = new Expression("hsl(1.0, 0.6, 0.7)");
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(Color.fromHsl(1.0, 0.6, 0.7)),
+ Cartesian4.fromColor(Color.fromHsl(1.0, 0.6, 0.7))
);
expression = new Expression("rgba(255, 255, 255, 0.5)");
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(Color.fromAlpha(Color.WHITE, 0.5)),
+ Cartesian4.fromColor(Color.fromAlpha(Color.WHITE, 0.5))
);
expression = new Expression("rgba(100, 255, 190, 0.25)");
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(Color.fromBytes(100, 255, 190, 0.25 * 255)),
+ Cartesian4.fromColor(Color.fromBytes(100, 255, 190, 0.25 * 255))
);
expression = new Expression("hsla(0, 0, 1, 0.5)");
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(new Color(1.0, 1.0, 1.0, 0.5)),
+ Cartesian4.fromColor(new Color(1.0, 1.0, 1.0, 0.5))
);
expression = new Expression("hsla(1.0, 0.6, 0.7, 0.75)");
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(Color.fromHsl(1.0, 0.6, 0.7, 0.75)),
+ Cartesian4.fromColor(Color.fromHsl(1.0, 0.6, 0.7, 0.75))
);
expression = new Expression("color()");
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(Color.WHITE),
+ Cartesian4.fromColor(Color.WHITE)
);
});
@@ -456,7 +456,7 @@ describe("Scene/Expression", function () {
expression = new Expression("color('white', 0.5)");
expect(expression.evaluate(undefined, color)).toEqual(
- new Color(1.0, 1.0, 1.0, 0.5),
+ new Color(1.0, 1.0, 1.0, 0.5)
);
expect(color).toEqual(new Color(1.0, 1.0, 1.0, 0.5));
@@ -470,13 +470,13 @@ describe("Scene/Expression", function () {
expression = new Expression("rgba(255, 0, 255, 0.5)");
expect(expression.evaluate(undefined, color)).toEqual(
- new Color(1.0, 0, 1.0, 0.5),
+ new Color(1.0, 0, 1.0, 0.5)
);
expect(color).toEqual(new Color(1.0, 0, 1.0, 0.5));
expression = new Expression("hsla(0, 0, 1, 0.5)");
expect(expression.evaluate(undefined, color)).toEqual(
- new Color(1.0, 1.0, 1.0, 0.5),
+ new Color(1.0, 1.0, 1.0, 0.5)
);
expect(color).toEqual(new Color(1.0, 1.0, 1.0, 0.5));
@@ -494,17 +494,17 @@ describe("Scene/Expression", function () {
let expression = new Expression("color(${hex6})");
expect(expression.evaluate(feature)).toEqual(
- Cartesian4.fromColor(Color.WHITE),
+ Cartesian4.fromColor(Color.WHITE)
);
expression = new Expression("color(${hex3})");
expect(expression.evaluate(feature)).toEqual(
- Cartesian4.fromColor(Color.WHITE),
+ Cartesian4.fromColor(Color.WHITE)
);
expression = new Expression("color(${keyword})");
expect(expression.evaluate(feature)).toEqual(
- Cartesian4.fromColor(Color.WHITE),
+ Cartesian4.fromColor(Color.WHITE)
);
expression = new Expression("color(${keyword}, ${alpha} + 0.6)");
@@ -522,12 +522,12 @@ describe("Scene/Expression", function () {
let expression = new Expression("rgb(${red}, ${green}, ${blue})");
expect(expression.evaluate(feature)).toEqual(
- Cartesian4.fromColor(Color.fromBytes(100, 200, 255)),
+ Cartesian4.fromColor(Color.fromBytes(100, 200, 255))
);
expression = new Expression("rgb(${red}/2, ${green}/2, ${blue})");
expect(expression.evaluate(feature)).toEqual(
- Cartesian4.fromColor(Color.fromBytes(50, 100, 255)),
+ Cartesian4.fromColor(Color.fromBytes(50, 100, 255))
);
});
@@ -539,12 +539,12 @@ describe("Scene/Expression", function () {
let expression = new Expression("hsl(${h}, ${s}, ${l})");
expect(expression.evaluate(feature)).toEqual(
- Cartesian4.fromColor(Color.WHITE),
+ Cartesian4.fromColor(Color.WHITE)
);
expression = new Expression("hsl(${h} + 0.2, ${s} + 1.0, ${l} - 0.5)");
expect(expression.evaluate(feature)).toEqual(
- Cartesian4.fromColor(Color.fromHsl(0.2, 1.0, 0.5)),
+ Cartesian4.fromColor(Color.fromHsl(0.2, 1.0, 0.5))
);
});
@@ -557,14 +557,14 @@ describe("Scene/Expression", function () {
let expression = new Expression("rgba(${red}, ${green}, ${blue}, ${a})");
expect(expression.evaluate(feature)).toEqual(
- Cartesian4.fromColor(Color.fromBytes(100, 200, 255, 0.3 * 255)),
+ Cartesian4.fromColor(Color.fromBytes(100, 200, 255, 0.3 * 255))
);
expression = new Expression(
- "rgba(${red}/2, ${green}/2, ${blue}, ${a} * 2)",
+ "rgba(${red}/2, ${green}/2, ${blue}, ${a} * 2)"
);
expect(expression.evaluate(feature)).toEqual(
- Cartesian4.fromColor(Color.fromBytes(50, 100, 255, 0.6 * 255)),
+ Cartesian4.fromColor(Color.fromBytes(50, 100, 255, 0.6 * 255))
);
});
@@ -577,14 +577,14 @@ describe("Scene/Expression", function () {
let expression = new Expression("hsla(${h}, ${s}, ${l}, ${a})");
expect(expression.evaluate(feature)).toEqual(
- Cartesian4.fromColor(Color.WHITE),
+ Cartesian4.fromColor(Color.WHITE)
);
expression = new Expression(
- "hsla(${h} + 0.2, ${s} + 1.0, ${l} - 0.5, ${a} / 4)",
+ "hsla(${h} + 0.2, ${s} + 1.0, ${l} - 0.5, ${a} / 4)"
);
expect(expression.evaluate(feature)).toEqual(
- Cartesian4.fromColor(Color.fromHsl(0.2, 1.0, 0.5, 0.25)),
+ Cartesian4.fromColor(Color.fromHsl(0.2, 1.0, 0.5, 0.25))
);
});
@@ -596,17 +596,17 @@ describe("Scene/Expression", function () {
feature.addProperty("alpha", 0.5);
let expression = new Expression(
- "rgba(${red}, ${green}, ${blue}, ${alpha})",
+ "rgba(${red}, ${green}, ${blue}, ${alpha})"
);
expect(expression.evaluate(feature)).toEqual(
- Cartesian4.fromColor(Color.fromBytes(100, 200, 255, 0.5 * 255)),
+ Cartesian4.fromColor(Color.fromBytes(100, 200, 255, 0.5 * 255))
);
expression = new Expression(
- "rgba(${red}/2, ${green}/2, ${blue}, ${alpha} + 0.1)",
+ "rgba(${red}/2, ${green}/2, ${blue}, ${alpha} + 0.1)"
);
expect(expression.evaluate(feature)).toEqual(
- Cartesian4.fromColor(Color.fromBytes(50, 100, 255, 0.6 * 255)),
+ Cartesian4.fromColor(Color.fromBytes(50, 100, 255, 0.6 * 255))
);
});
@@ -742,32 +742,32 @@ describe("Scene/Expression", function () {
it("evaluates vec3", function () {
let expression = new Expression("vec3(2.0)");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(2.0, 2.0, 2.0),
+ new Cartesian3(2.0, 2.0, 2.0)
);
expression = new Expression("vec3(3.0, 4.0, 5.0)");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(3.0, 4.0, 5.0),
+ new Cartesian3(3.0, 4.0, 5.0)
);
expression = new Expression("vec3(vec2(3.0, 4.0), 5.0)");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(3.0, 4.0, 5.0),
+ new Cartesian3(3.0, 4.0, 5.0)
);
expression = new Expression("vec3(3.0, vec2(4.0, 5.0))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(3.0, 4.0, 5.0),
+ new Cartesian3(3.0, 4.0, 5.0)
);
expression = new Expression("vec3(vec3(3.0, 4.0, 5.0))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(3.0, 4.0, 5.0),
+ new Cartesian3(3.0, 4.0, 5.0)
);
expression = new Expression("vec3(vec4(3.0, 4.0, 5.0, 6.0))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(3.0, 4.0, 5.0),
+ new Cartesian3(3.0, 4.0, 5.0)
);
});
@@ -808,42 +808,42 @@ describe("Scene/Expression", function () {
it("evaluates vec4", function () {
let expression = new Expression("vec4(2.0)");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(2.0, 2.0, 2.0, 2.0),
+ new Cartesian4(2.0, 2.0, 2.0, 2.0)
);
expression = new Expression("vec4(3.0, 4.0, 5.0, 6.0)");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(3.0, 4.0, 5.0, 6.0),
+ new Cartesian4(3.0, 4.0, 5.0, 6.0)
);
expression = new Expression("vec4(vec2(3.0, 4.0), 5.0, 6.0)");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(3.0, 4.0, 5.0, 6.0),
+ new Cartesian4(3.0, 4.0, 5.0, 6.0)
);
expression = new Expression("vec4(3.0, vec2(4.0, 5.0), 6.0)");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(3.0, 4.0, 5.0, 6.0),
+ new Cartesian4(3.0, 4.0, 5.0, 6.0)
);
expression = new Expression("vec4(3.0, 4.0, vec2(5.0, 6.0))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(3.0, 4.0, 5.0, 6.0),
+ new Cartesian4(3.0, 4.0, 5.0, 6.0)
);
expression = new Expression("vec4(vec3(3.0, 4.0, 5.0), 6.0)");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(3.0, 4.0, 5.0, 6.0),
+ new Cartesian4(3.0, 4.0, 5.0, 6.0)
);
expression = new Expression("vec4(3.0, vec3(4.0, 5.0, 6.0))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(3.0, 4.0, 5.0, 6.0),
+ new Cartesian4(3.0, 4.0, 5.0, 6.0)
);
expression = new Expression("vec4(vec4(3.0, 4.0, 5.0, 6.0))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(3.0, 4.0, 5.0, 6.0),
+ new Cartesian4(3.0, 4.0, 5.0, 6.0)
);
});
@@ -889,19 +889,19 @@ describe("Scene/Expression", function () {
feature.addProperty("scale", 1);
const expression = new Expression(
- "vec4(${height}, ${width}, ${depth}, ${scale})",
+ "vec4(${height}, ${width}, ${depth}, ${scale})"
);
expect(expression.evaluate(feature)).toEqual(
- new Cartesian4(2.0, 4.0, 3.0, 1.0),
+ new Cartesian4(2.0, 4.0, 3.0, 1.0)
);
});
it("evaluates expression with multiple nested vectors", function () {
const expression = new Expression(
- "vec4(vec2(1, 2)[vec3(6, 1, 5).y], 2, vec4(1.0).w, 5)",
+ "vec4(vec2(1, 2)[vec3(6, 1, 5).y], 2, vec4(1.0).w, 5)"
);
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(2.0, 2.0, 1.0, 5.0),
+ new Cartesian4(2.0, 2.0, 1.0, 5.0)
);
});
@@ -1396,53 +1396,53 @@ describe("Scene/Expression", function () {
it("evaluates color operations", function () {
let expression = new Expression("+rgba(255, 0, 0, 1.0)");
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(Color.RED),
+ Cartesian4.fromColor(Color.RED)
);
expression = new Expression("rgba(255, 0, 0, 0.5) + rgba(0, 0, 255, 0.5)");
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(Color.MAGENTA),
+ Cartesian4.fromColor(Color.MAGENTA)
);
expression = new Expression("rgba(0, 255, 255, 1.0) - rgba(0, 255, 0, 0)");
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(Color.BLUE),
+ Cartesian4.fromColor(Color.BLUE)
);
expression = new Expression(
- "rgba(255, 255, 255, 1.0) * rgba(255, 0, 0, 1.0)",
+ "rgba(255, 255, 255, 1.0) * rgba(255, 0, 0, 1.0)"
);
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(Color.RED),
+ Cartesian4.fromColor(Color.RED)
);
expression = new Expression("rgba(255, 255, 0, 1.0) * 1.0");
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(Color.YELLOW),
+ Cartesian4.fromColor(Color.YELLOW)
);
expression = new Expression("1 * rgba(255, 255, 0, 1.0)");
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(Color.YELLOW),
+ Cartesian4.fromColor(Color.YELLOW)
);
expression = new Expression(
- "rgba(255, 255, 255, 1.0) / rgba(255, 255, 255, 1.0)",
+ "rgba(255, 255, 255, 1.0) / rgba(255, 255, 255, 1.0)"
);
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(Color.WHITE),
+ Cartesian4.fromColor(Color.WHITE)
);
expression = new Expression("rgba(255, 255, 255, 1.0) / 2");
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(new Color(0.5, 0.5, 0.5, 0.5)),
+ Cartesian4.fromColor(new Color(0.5, 0.5, 0.5, 0.5))
);
expression = new Expression(
- "rgba(255, 255, 255, 1.0) % rgba(255, 255, 255, 1.0)",
+ "rgba(255, 255, 255, 1.0) % rgba(255, 255, 255, 1.0)"
);
expect(expression.evaluate(undefined)).toEqual(
- Cartesian4.fromColor(new Color(0, 0, 0, 0)),
+ Cartesian4.fromColor(new Color(0, 0, 0, 0))
);
expression = new Expression("color('green') === color('green')");
@@ -1470,7 +1470,7 @@ describe("Scene/Expression", function () {
expression = new Expression("-vec4(1, 2, 3, 4)");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(-1, -2, -3, -4),
+ new Cartesian4(-1, -2, -3, -4)
);
expression = new Expression("vec2(1, 2) + vec2(3, 4)");
@@ -1490,7 +1490,7 @@ describe("Scene/Expression", function () {
expression = new Expression("vec4(1, 2, 3, 4) - vec4(3, 4, 5, 6)");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(-2, -2, -2, -2),
+ new Cartesian4(-2, -2, -2, -2)
);
expression = new Expression("vec2(1, 2) * vec2(3, 4)");
@@ -1513,7 +1513,7 @@ describe("Scene/Expression", function () {
expression = new Expression("vec4(1, 2, 3, 4) * vec4(3, 4, 5, 6)");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(3, 8, 15, 24),
+ new Cartesian4(3, 8, 15, 24)
);
expression = new Expression("vec4(1, 2, 3, 4) * 3.0");
@@ -1530,22 +1530,22 @@ describe("Scene/Expression", function () {
expression = new Expression("vec3(1, 2, 3) / vec3(2, 5, 3)");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(0.5, 0.4, 1.0),
+ new Cartesian3(0.5, 0.4, 1.0)
);
expression = new Expression("vec3(1, 2, 3) / 2.0");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(0.5, 1.0, 1.5),
+ new Cartesian3(0.5, 1.0, 1.5)
);
expression = new Expression("vec4(1, 2, 3, 4) / vec4(2, 5, 3, 2)");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(0.5, 0.4, 1.0, 2.0),
+ new Cartesian4(0.5, 0.4, 1.0, 2.0)
);
expression = new Expression("vec4(1, 2, 3, 4) / 2.0");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(0.5, 1.0, 1.5, 2.0),
+ new Cartesian4(0.5, 1.0, 1.5, 2.0)
);
expression = new Expression("vec2(2, 3) % vec2(3, 3)");
@@ -1732,12 +1732,12 @@ describe("Scene/Expression", function () {
expression = new Expression("abs(vec3(-1.0, 1.0, 0.0))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(1.0, 1.0, 0.0),
+ new Cartesian3(1.0, 1.0, 0.0)
);
expression = new Expression("abs(vec4(-1.0, 1.0, 0.0, -1.2))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(1.0, 1.0, 0.0, 1.2),
+ new Cartesian4(1.0, 1.0, 0.0, 1.2)
);
});
@@ -1758,19 +1758,19 @@ describe("Scene/Expression", function () {
expression = new Expression("cos(vec2(0, Math.PI))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian2(1.0, -1.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expression = new Expression("cos(vec3(0, Math.PI, -Math.PI))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian3(1.0, -1.0, -1.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expression = new Expression("cos(vec4(0, Math.PI, -Math.PI, 0))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian4(1.0, -1.0, -1.0, 1.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -1791,19 +1791,19 @@ describe("Scene/Expression", function () {
expression = new Expression("sin(vec2(0, Math.PI/2))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian2(0.0, 1.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expression = new Expression("sin(vec3(0, Math.PI/2, -Math.PI/2))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian3(0.0, 1.0, -1.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expression = new Expression("sin(vec4(0, Math.PI/2, -Math.PI/2, 0))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian4(0.0, 1.0, -1.0, 0.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -1824,19 +1824,19 @@ describe("Scene/Expression", function () {
expression = new Expression("tan(vec2(0, Math.PI/4))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian2(0.0, 1.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expression = new Expression("tan(vec3(0, Math.PI/4, Math.PI))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian3(0.0, 1.0, 0.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expression = new Expression("tan(vec4(0, Math.PI/4, Math.PI, -Math.PI/4))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian4(0.0, 1.0, 0.0, -1.0),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -1857,13 +1857,13 @@ describe("Scene/Expression", function () {
expression = new Expression("acos(vec2(1, 0))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian2(0.0, CesiumMath.PI_OVER_TWO),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expression = new Expression("acos(vec3(1, 0, 1))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian3(0.0, CesiumMath.PI_OVER_TWO, 0.0, CesiumMath.PI_OVER_TWO),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expression = new Expression("acos(vec4(1, 0, 1, 0))");
@@ -1873,9 +1873,9 @@ describe("Scene/Expression", function () {
CesiumMath.PI_OVER_TWO,
0.0,
CesiumMath.PI_OVER_TWO,
- 0.0,
+ 0.0
),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -1896,13 +1896,13 @@ describe("Scene/Expression", function () {
expression = new Expression("asin(vec2(0, 1))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian2(0.0, CesiumMath.PI_OVER_TWO),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expression = new Expression("asin(vec3(0, 1, 0))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian3(0.0, CesiumMath.PI_OVER_TWO, 0.0, CesiumMath.PI_OVER_TWO),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expression = new Expression("asin(vec4(0, 1, 0, 1))");
@@ -1912,9 +1912,9 @@ describe("Scene/Expression", function () {
CesiumMath.PI_OVER_TWO,
0.0,
CesiumMath.PI_OVER_TWO,
- 0.0,
+ 0.0
),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -1935,7 +1935,7 @@ describe("Scene/Expression", function () {
expression = new Expression("atan(vec2(0, 1))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian2(0.0, CesiumMath.PI_OVER_FOUR),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expression = new Expression("atan(vec3(0, 1, 0))");
@@ -1944,9 +1944,9 @@ describe("Scene/Expression", function () {
0.0,
CesiumMath.PI_OVER_FOUR,
0.0,
- CesiumMath.PI_OVER_FOUR,
+ CesiumMath.PI_OVER_FOUR
),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expression = new Expression("atan(vec4(0, 1, 0, 1))");
@@ -1956,9 +1956,9 @@ describe("Scene/Expression", function () {
CesiumMath.PI_OVER_FOUR,
0.0,
CesiumMath.PI_OVER_FOUR,
- 0.0,
+ 0.0
),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -1976,19 +1976,19 @@ describe("Scene/Expression", function () {
let expression = new Expression("radians(180)");
expect(expression.evaluate(undefined)).toEqualEpsilon(
Math.PI,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expression = new Expression("radians(vec2(180, 90))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian2(Math.PI, CesiumMath.PI_OVER_TWO),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expression = new Expression("radians(vec3(180, 90, 180))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian3(Math.PI, CesiumMath.PI_OVER_TWO, Math.PI),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expression = new Expression("radians(vec4(180, 90, 180, 90))");
@@ -1997,9 +1997,9 @@ describe("Scene/Expression", function () {
Math.PI,
CesiumMath.PI_OVER_TWO,
Math.PI,
- CesiumMath.PI_OVER_TWO,
+ CesiumMath.PI_OVER_TWO
),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -2017,29 +2017,29 @@ describe("Scene/Expression", function () {
let expression = new Expression("degrees(2 * Math.PI)");
expect(expression.evaluate(undefined)).toEqualEpsilon(
360,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expression = new Expression("degrees(vec2(2 * Math.PI, Math.PI))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian2(360, 180),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expression = new Expression(
- "degrees(vec3(2 * Math.PI, Math.PI, 2 * Math.PI))",
+ "degrees(vec3(2 * Math.PI, Math.PI, 2 * Math.PI))"
);
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian3(360, 180, 360),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expression = new Expression(
- "degrees(vec4(2 * Math.PI, Math.PI, 2 * Math.PI, Math.PI))",
+ "degrees(vec4(2 * Math.PI, Math.PI, 2 * Math.PI, Math.PI))"
);
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian4(360, 180, 360, 180),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -2068,12 +2068,12 @@ describe("Scene/Expression", function () {
expression = new Expression("sqrt(vec3(1.0, 4.0, 9.0))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(1.0, 2.0, 3.0),
+ new Cartesian3(1.0, 2.0, 3.0)
);
expression = new Expression("sqrt(vec4(1.0, 4.0, 9.0, 16.0))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(1.0, 2.0, 3.0, 4.0),
+ new Cartesian4(1.0, 2.0, 3.0, 4.0)
);
});
@@ -2102,12 +2102,12 @@ describe("Scene/Expression", function () {
expression = new Expression("sign(vec3(5.0, -5.0, 0.0))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(1.0, -1.0, 0.0),
+ new Cartesian3(1.0, -1.0, 0.0)
);
expression = new Expression("sign(vec4(5.0, -5.0, 0.0, 1.0))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(1.0, -1.0, 0.0, 1.0),
+ new Cartesian4(1.0, -1.0, 0.0, 1.0)
);
});
@@ -2136,12 +2136,12 @@ describe("Scene/Expression", function () {
expression = new Expression("floor(vec3(5.5, -1.2, 0.0))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(5.0, -2.0, 0.0),
+ new Cartesian3(5.0, -2.0, 0.0)
);
expression = new Expression("floor(vec4(5.5, -1.2, 0.0, -2.9))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(5.0, -2.0, 0.0, -3.0),
+ new Cartesian4(5.0, -2.0, 0.0, -3.0)
);
});
@@ -2170,12 +2170,12 @@ describe("Scene/Expression", function () {
expression = new Expression("ceil(vec3(5.5, -1.2, 0.0))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(6.0, -1.0, 0.0),
+ new Cartesian3(6.0, -1.0, 0.0)
);
expression = new Expression("ceil(vec4(5.5, -1.2, 0.0, -2.9))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(6.0, -1.0, 0.0, -2.0),
+ new Cartesian4(6.0, -1.0, 0.0, -2.0)
);
});
@@ -2204,12 +2204,12 @@ describe("Scene/Expression", function () {
expression = new Expression("round(vec3(5.5, -1.2, 0.0))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(6.0, -1.0, 0.0),
+ new Cartesian3(6.0, -1.0, 0.0)
);
expression = new Expression("round(vec4(5.5, -1.2, 0.0, -2.9))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(6.0, -1.0, 0.0, -3.0),
+ new Cartesian4(6.0, -1.0, 0.0, -3.0)
);
});
@@ -2227,31 +2227,31 @@ describe("Scene/Expression", function () {
let expression = new Expression("exp(1.0)");
expect(expression.evaluate(undefined)).toEqualEpsilon(
Math.E,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expression = new Expression("exp(0.0)");
expect(expression.evaluate(undefined)).toEqualEpsilon(
1.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expression = new Expression("exp(vec2(1.0, 0.0))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian2(Math.E, 1.0),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expression = new Expression("exp(vec3(1.0, 0.0, 1.0))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian3(Math.E, 1.0, Math.E),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expression = new Expression("exp(vec4(1.0, 0.0, 1.0, 0.0))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian4(Math.E, 1.0, Math.E, 1.0),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -2280,12 +2280,12 @@ describe("Scene/Expression", function () {
expression = new Expression("exp2(vec3(1.0, 0.0, 2.0))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(2.0, 1.0, 4.0),
+ new Cartesian3(2.0, 1.0, 4.0)
);
expression = new Expression("exp2(vec4(1.0, 0.0, 2.0, 3.0))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(2.0, 1.0, 4.0, 8.0),
+ new Cartesian4(2.0, 1.0, 4.0, 8.0)
);
});
@@ -2306,7 +2306,7 @@ describe("Scene/Expression", function () {
expression = new Expression("log(10.0)");
expect(expression.evaluate(undefined)).toEqualEpsilon(
2.302585092994046,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expression = new Expression("log(vec2(1.0, Math.E))");
@@ -2314,12 +2314,12 @@ describe("Scene/Expression", function () {
expression = new Expression("log(vec3(1.0, Math.E, 1.0))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(0.0, 1.0, 0.0),
+ new Cartesian3(0.0, 1.0, 0.0)
);
expression = new Expression("log(vec4(1.0, Math.E, 1.0, Math.E))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(0.0, 1.0, 0.0, 1.0),
+ new Cartesian4(0.0, 1.0, 0.0, 1.0)
);
});
@@ -2348,13 +2348,13 @@ describe("Scene/Expression", function () {
expression = new Expression("log2(vec3(1.0, 2.0, 4.0))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(0.0, 1.0, 2.0),
+ new Cartesian3(0.0, 1.0, 2.0)
);
expression = new Expression("log2(vec4(1.0, 2.0, 4.0, 8.0))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian4(0.0, 1.0, 2.0, 3.0),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -2383,12 +2383,12 @@ describe("Scene/Expression", function () {
expression = new Expression("fract(vec3(1.0, 2.25, -2.25))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(0.0, 0.25, 0.75),
+ new Cartesian3(0.0, 0.25, 0.75)
);
expression = new Expression("fract(vec4(1.0, 2.25, -2.25, 1.0))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(0.0, 0.25, 0.75, 0.0),
+ new Cartesian4(0.0, 0.25, 0.75, 0.0)
);
});
@@ -2437,14 +2437,14 @@ describe("Scene/Expression", function () {
let length = Math.sqrt(2 * 2 + 3 * 3 + 4 * 4);
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian3(2.0 / length, 3.0 / length, -4.0 / length),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expression = new Expression("normalize(vec4(-2.0, 3.0, -4.0, 5.0))");
length = Math.sqrt(2 * 2 + 3 * 3 + 4 * 4 + 5 * 5);
expect(expression.evaluate(undefined)).toEqual(
new Cartesian4(-2.0 / length, 3.0 / length, -4.0 / length, 5.0 / length),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -2469,27 +2469,27 @@ describe("Scene/Expression", function () {
expect(expression.evaluate(undefined)).toEqual(75.0);
expression = new Expression(
- "clamp(vec2(50.0,50.0), vec2(0.0,75.0), 100.0)",
+ "clamp(vec2(50.0,50.0), vec2(0.0,75.0), 100.0)"
);
expect(expression.evaluate(undefined)).toEqual(new Cartesian2(50.0, 75.0));
expression = new Expression(
- "clamp(vec2(50.0,50.0), vec2(0.0,75.0), vec2(25.0,100.0))",
+ "clamp(vec2(50.0,50.0), vec2(0.0,75.0), vec2(25.0,100.0))"
);
expect(expression.evaluate(undefined)).toEqual(new Cartesian2(25.0, 75.0));
expression = new Expression(
- "clamp(vec3(50.0, 50.0, 50.0), vec3(0.0, 0.0, 75.0), vec3(100.0, 25.0, 100.0))",
+ "clamp(vec3(50.0, 50.0, 50.0), vec3(0.0, 0.0, 75.0), vec3(100.0, 25.0, 100.0))"
);
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(50.0, 25.0, 75.0),
+ new Cartesian3(50.0, 25.0, 75.0)
);
expression = new Expression(
- "clamp(vec4(50.0, 50.0, 50.0, 100.0), vec4(0.0, 0.0, 75.0, 75.0), vec4(100.0, 25.0, 100.0, 85.0))",
+ "clamp(vec4(50.0, 50.0, 50.0, 100.0), vec4(0.0, 0.0, 75.0, 75.0), vec4(100.0, 25.0, 100.0, 85.0))"
);
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(50.0, 25.0, 75.0, 85.0),
+ new Cartesian4(50.0, 25.0, 75.0, 85.0)
);
});
@@ -2536,22 +2536,22 @@ describe("Scene/Expression", function () {
expect(expression.evaluate(undefined)).toEqual(new Cartesian2(1.0, 2.0));
expression = new Expression(
- "mix(vec2(0.0,1.0), vec2(2.0,3.0), vec2(0.5,4.0))",
+ "mix(vec2(0.0,1.0), vec2(2.0,3.0), vec2(0.5,4.0))"
);
expect(expression.evaluate(undefined)).toEqual(new Cartesian2(1.0, 9.0));
expression = new Expression(
- "mix(vec3(0.0,1.0,2.0), vec3(2.0,3.0,4.0), vec3(0.5,4.0,5.0))",
+ "mix(vec3(0.0,1.0,2.0), vec3(2.0,3.0,4.0), vec3(0.5,4.0,5.0))"
);
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(1.0, 9.0, 12.0),
+ new Cartesian3(1.0, 9.0, 12.0)
);
expression = new Expression(
- "mix(vec4(0.0,1.0,2.0,1.5), vec4(2.0,3.0,4.0,2.5), vec4(0.5,4.0,5.0,3.5))",
+ "mix(vec4(0.0,1.0,2.0,1.5), vec4(2.0,3.0,4.0,2.5), vec4(0.5,4.0,5.0,3.5))"
);
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(1.0, 9.0, 12.0, 5.0),
+ new Cartesian4(1.0, 9.0, 12.0, 5.0)
);
});
@@ -2594,31 +2594,31 @@ describe("Scene/Expression", function () {
let expression = new Expression("atan2(0,1)");
expect(expression.evaluate(undefined)).toEqualEpsilon(
0.0,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expression = new Expression("atan2(1,0)");
expect(expression.evaluate(undefined)).toEqualEpsilon(
0.5 * Math.PI,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expression = new Expression("atan2(vec2(0,1),vec2(1,0))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian2(0.0, 0.5 * Math.PI),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expression = new Expression("atan2(vec3(0,1,0.5),vec3(1,0,0.5))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian3(0.0, 0.5 * Math.PI, 0.25 * Math.PI),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expression = new Expression("atan2(vec4(0,1,0.5,1),vec4(1,0,0.5,0))");
expect(expression.evaluate(undefined)).toEqualEpsilon(
new Cartesian4(0.0, 0.5 * Math.PI, 0.25 * Math.PI, 0.5 * Math.PI),
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
});
@@ -2661,12 +2661,12 @@ describe("Scene/Expression", function () {
expression = new Expression("pow(vec3(5,4,3),vec3(0,2,3))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(1.0, 16.0, 27.0),
+ new Cartesian3(1.0, 16.0, 27.0)
);
expression = new Expression("pow(vec4(5,4,3,2),vec4(0,2,3,5))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(1.0, 16.0, 27.0, 32.0),
+ new Cartesian4(1.0, 16.0, 27.0, 32.0)
);
});
@@ -2712,12 +2712,12 @@ describe("Scene/Expression", function () {
expression = new Expression("min(vec3(-1,2,1),vec3(0,1,2))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(-1.0, 1.0, 1.0),
+ new Cartesian3(-1.0, 1.0, 1.0)
);
expression = new Expression("min(vec4(-1,2,1,4),vec4(0,1,2,3))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(-1.0, 1.0, 1.0, 3.0),
+ new Cartesian4(-1.0, 1.0, 1.0, 3.0)
);
});
@@ -2761,7 +2761,7 @@ describe("Scene/Expression", function () {
expression = new Expression("max(vec4(-1,2,1,4),vec4(0,1,2,3))");
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian4(0, 2.0, 2.0, 4.0),
+ new Cartesian4(0, 2.0, 2.0, 4.0)
);
});
@@ -2795,12 +2795,12 @@ describe("Scene/Expression", function () {
expect(expression.evaluate(undefined)).toEqual(1.0);
expression = new Expression(
- "distance(vec3(3.0, 2.0, 1.0), vec3(1.0, 0.0, 0.0))",
+ "distance(vec3(3.0, 2.0, 1.0), vec3(1.0, 0.0, 0.0))"
);
expect(expression.evaluate(undefined)).toEqual(3.0);
expression = new Expression(
- "distance(vec4(5.0, 5.0, 5.0, 5.0), vec4(0.0, 0.0, 0.0, 0.0))",
+ "distance(vec4(5.0, 5.0, 5.0, 5.0), vec4(0.0, 0.0, 0.0, 0.0))"
);
expect(expression.evaluate(undefined)).toEqual(10.0);
});
@@ -2822,7 +2822,7 @@ describe("Scene/Expression", function () {
expect(function () {
return new Expression(
- "distance(vec4(5.0, 2.0, 3.0, 1.0), vec3(4.0, 4.0, 4.0))",
+ "distance(vec4(5.0, 2.0, 3.0, 1.0), vec3(4.0, 4.0, 4.0))"
).evaluate(undefined);
}).toThrowError(RuntimeError);
});
@@ -2835,12 +2835,12 @@ describe("Scene/Expression", function () {
expect(expression.evaluate(undefined)).toEqual(4.0);
expression = new Expression(
- "dot(vec3(1.0, 2.0, 3.0), vec3(2.0, 2.0, 1.0))",
+ "dot(vec3(1.0, 2.0, 3.0), vec3(2.0, 2.0, 1.0))"
);
expect(expression.evaluate(undefined)).toEqual(9.0);
expression = new Expression(
- "dot(vec4(5.0, 5.0, 2.0, 3.0), vec4(1.0, 2.0, 1.0, 1.0))",
+ "dot(vec4(5.0, 5.0, 2.0, 3.0), vec4(1.0, 2.0, 1.0, 1.0))"
);
expect(expression.evaluate(undefined)).toEqual(20.0);
});
@@ -2862,31 +2862,31 @@ describe("Scene/Expression", function () {
expect(function () {
return new Expression(
- "dot(vec4(5.0, 2.0, 3.0, 1.0), vec3(4.0, 4.0, 4.0))",
+ "dot(vec4(5.0, 2.0, 3.0, 1.0), vec3(4.0, 4.0, 4.0))"
).evaluate(undefined);
}).toThrowError(RuntimeError);
});
it("evaluates the cross function", function () {
let expression = new Expression(
- "cross(vec3(1.0, 1.0, 1.0), vec3(2.0, 2.0, 2.0))",
+ "cross(vec3(1.0, 1.0, 1.0), vec3(2.0, 2.0, 2.0))"
);
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(0.0, 0.0, 0.0),
+ new Cartesian3(0.0, 0.0, 0.0)
);
expression = new Expression(
- "cross(vec3(-1.0, -1.0, -1.0), vec3(0.0, -2.0, -5.0))",
+ "cross(vec3(-1.0, -1.0, -1.0), vec3(0.0, -2.0, -5.0))"
);
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(3.0, -5.0, 2.0),
+ new Cartesian3(3.0, -5.0, 2.0)
);
expression = new Expression(
- "cross(vec3(5.0, -2.0, 1.0), vec3(-2.0, -6.0, -8.0))",
+ "cross(vec3(5.0, -2.0, 1.0), vec3(-2.0, -6.0, -8.0))"
);
expect(expression.evaluate(undefined)).toEqual(
- new Cartesian3(22.0, 38.0, -34.0),
+ new Cartesian3(22.0, 38.0, -34.0)
);
});
@@ -2897,7 +2897,7 @@ describe("Scene/Expression", function () {
expect(function () {
return new Expression(
- "cross(vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0), vec3(2.0, 2.0, 2.0))",
+ "cross(vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0), vec3(2.0, 2.0, 2.0))"
);
}).toThrowError(RuntimeError);
});
@@ -2905,13 +2905,13 @@ describe("Scene/Expression", function () {
it("throws if cross function does not take vec3 arguments", function () {
expect(function () {
return new Expression("cross(vec2(1.0, 2.0), vec2(3.0, 2.0)").evaluate(
- undefined,
+ undefined
);
}).toThrowError(RuntimeError);
expect(function () {
return new Expression(
- "cross(vec4(5.0, 2.0, 3.0, 1.0), vec3(4.0, 4.0, 4.0))",
+ "cross(vec4(5.0, 2.0, 3.0, 1.0), vec3(4.0, 4.0, 4.0))"
).evaluate(undefined);
}).toThrowError(RuntimeError);
});
@@ -2924,7 +2924,7 @@ describe("Scene/Expression", function () {
expect(expression.evaluate(undefined)).toEqual("second");
expression = new Expression(
- "(!(1 + 2 > 3)) ? (2 > 1 ? 1 + 1 : 0) : (2 > 1 ? -1 + -1 : 0)",
+ "(!(1 + 2 > 3)) ? (2 > 1 ? 1 + 1 : 0) : (2 > 1 ? -1 + -1 : 0)"
);
expect(expression.evaluate(undefined)).toEqual(2);
});
@@ -3092,13 +3092,13 @@ describe("Scene/Expression", function () {
let expression = new Expression('regExp("a")');
expect(expression.evaluate(undefined)).toEqual(/a/);
expect(expression._runtimeAst._type).toEqual(
- ExpressionNodeType.LITERAL_REGEX,
+ ExpressionNodeType.LITERAL_REGEX
);
expression = new Expression('regExp("\\w")');
expect(expression.evaluate(undefined)).toEqual(/\w/);
expect(expression._runtimeAst._type).toEqual(
- ExpressionNodeType.LITERAL_REGEX,
+ ExpressionNodeType.LITERAL_REGEX
);
expression = new Expression("regExp(1 + 1)");
@@ -3108,13 +3108,13 @@ describe("Scene/Expression", function () {
expression = new Expression("regExp(true)");
expect(expression.evaluate(undefined)).toEqual(/true/);
expect(expression._runtimeAst._type).toEqual(
- ExpressionNodeType.LITERAL_REGEX,
+ ExpressionNodeType.LITERAL_REGEX
);
expression = new Expression("regExp()");
expect(expression.evaluate(undefined)).toEqual(/(?:)/);
expect(expression._runtimeAst._type).toEqual(
- ExpressionNodeType.LITERAL_REGEX,
+ ExpressionNodeType.LITERAL_REGEX
);
expression = new Expression("regExp(${pattern})");
@@ -3126,7 +3126,7 @@ describe("Scene/Expression", function () {
let expression = new Expression('regExp("a", "i")');
expect(expression.evaluate(undefined)).toEqual(/a/i);
expect(expression._runtimeAst._type).toEqual(
- ExpressionNodeType.LITERAL_REGEX,
+ ExpressionNodeType.LITERAL_REGEX
);
expression = new Expression('regExp("a", "m" + "g")');
@@ -3167,7 +3167,7 @@ describe("Scene/Expression", function () {
expect(expression.evaluate(undefined)).toEqual(false);
expression = new Expression(
- 'regExp("quick\\s(brown).+?(jumps)", "ig").test("The Quick Brown Fox Jumps Over The Lazy Dog")',
+ 'regExp("quick\\s(brown).+?(jumps)", "ig").test("The Quick Brown Fox Jumps Over The Lazy Dog")'
);
expect(expression.evaluate(undefined)).toEqual(true);
@@ -3205,12 +3205,12 @@ describe("Scene/Expression", function () {
expect(expression.evaluate(undefined)).toEqual(null);
expression = new Expression(
- 'regExp("quick\\s(b.*n).+?(jumps)", "ig").exec("The Quick Brown Fox Jumps Over The Lazy Dog")',
+ 'regExp("quick\\s(b.*n).+?(jumps)", "ig").exec("The Quick Brown Fox Jumps Over The Lazy Dog")'
);
expect(expression.evaluate(undefined)).toEqual("Brown");
expression = new Expression(
- 'regExp("(" + ${property} + ")").exec(${property})',
+ 'regExp("(" + ${property} + ")").exec(${property})'
);
expect(expression.evaluate(feature)).toEqual("abc");
@@ -3247,7 +3247,7 @@ describe("Scene/Expression", function () {
expect(expression.evaluate(undefined)).toEqual(false);
expression = new Expression(
- 'regExp("quick\\s(brown).+?(jumps)", "ig") =~ "The Quick Brown Fox Jumps Over The Lazy Dog"',
+ 'regExp("quick\\s(brown).+?(jumps)", "ig") =~ "The Quick Brown Fox Jumps Over The Lazy Dog"'
);
expect(expression.evaluate(undefined)).toEqual(true);
@@ -3292,7 +3292,7 @@ describe("Scene/Expression", function () {
expect(expression.evaluate(undefined)).toEqual(true);
expression = new Expression(
- 'regExp("quick\\s(brown).+?(jumps)", "ig") !~ "The Quick Brown Fox Jumps Over The Lazy Dog"',
+ 'regExp("quick\\s(brown).+?(jumps)", "ig") !~ "The Quick Brown Fox Jumps Over The Lazy Dog"'
);
expect(expression.evaluate(undefined)).toEqual(false);
@@ -3378,7 +3378,7 @@ describe("Scene/Expression", function () {
expect(expression.evaluate(undefined)).toEqual([1, 2, 3]);
expression = new Expression(
- '[1+2, "hello", 2 < 3, color("blue"), ${property}]',
+ '[1+2, "hello", 2 < 3, color("blue"), ${property}]'
);
expect(expression.evaluate(feature)).toEqual([
3,
@@ -3422,7 +3422,7 @@ describe("Scene/Expression", function () {
"getShow()",
{},
{},
- "bool",
+ "bool"
);
const expected = "bool getShow()\n" + "{\n" + " return true;\n" + "}\n";
expect(shaderFunction).toEqual(expected);
@@ -3435,7 +3435,7 @@ describe("Scene/Expression", function () {
};
const shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- {},
+ {}
);
const expected = "a_property";
expect(shaderExpression).toEqual(expected);
@@ -3448,7 +3448,7 @@ describe("Scene/Expression", function () {
};
const shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- {},
+ {}
);
const expected = "a_property";
expect(shaderExpression).toEqual(expected);
@@ -3461,7 +3461,7 @@ describe("Scene/Expression", function () {
};
const shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- {},
+ {}
);
const expected = "a_property";
expect(shaderExpression).toEqual(expected);
@@ -3613,7 +3613,7 @@ describe("Scene/Expression", function () {
let expression = new Expression("${property[0]}");
let shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- {},
+ {}
);
let expected = "property[0]";
expect(shaderExpression).toEqual(expected);
@@ -3621,7 +3621,7 @@ describe("Scene/Expression", function () {
expression = new Expression("${property[4 / 2]}");
shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- {},
+ {}
);
expected = "property[int((4.0 / 2.0))]";
expect(shaderExpression).toEqual(expected);
@@ -3688,7 +3688,7 @@ describe("Scene/Expression", function () {
let expression = new Expression("color()");
let shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- shaderState,
+ shaderState
);
let expected = "vec4(1.0)";
expect(shaderExpression).toEqual(expected);
@@ -3698,7 +3698,7 @@ describe("Scene/Expression", function () {
expression = new Expression('color("red")');
shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- shaderState,
+ shaderState
);
expected = "vec4(vec3(1.0, 0.0, 0.0), 1.0)";
expect(shaderExpression).toEqual(expected);
@@ -3708,7 +3708,7 @@ describe("Scene/Expression", function () {
expression = new Expression('color("#FFF")');
shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- shaderState,
+ shaderState
);
expected = "vec4(vec3(1.0, 1.0, 1.0), 1.0)";
expect(shaderExpression).toEqual(expected);
@@ -3718,7 +3718,7 @@ describe("Scene/Expression", function () {
expression = new Expression('color("#FF0000")');
shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- shaderState,
+ shaderState
);
expected = "vec4(vec3(1.0, 0.0, 0.0), 1.0)";
expect(shaderExpression).toEqual(expected);
@@ -3728,7 +3728,7 @@ describe("Scene/Expression", function () {
expression = new Expression('color("rgb(255, 0, 0)")');
shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- shaderState,
+ shaderState
);
expected = "vec4(vec3(1.0, 0.0, 0.0), 1.0)";
expect(shaderExpression).toEqual(expected);
@@ -3738,7 +3738,7 @@ describe("Scene/Expression", function () {
expression = new Expression('color("red", 0.5)');
shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- shaderState,
+ shaderState
);
expected = "vec4(vec3(1.0, 0.0, 0.0), 0.5)";
expect(shaderExpression).toEqual(expected);
@@ -3748,7 +3748,7 @@ describe("Scene/Expression", function () {
expression = new Expression("rgb(255, 0, 0)");
shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- shaderState,
+ shaderState
);
expected = "vec4(1.0, 0.0, 0.0, 1.0)";
expect(shaderExpression).toEqual(expected);
@@ -3758,7 +3758,7 @@ describe("Scene/Expression", function () {
expression = new Expression("rgb(255, ${property}, 0)");
shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- shaderState,
+ shaderState
);
expected = "vec4(255.0 / 255.0, property / 255.0, 0.0 / 255.0, 1.0)";
expect(shaderExpression).toEqual(expected);
@@ -3768,7 +3768,7 @@ describe("Scene/Expression", function () {
expression = new Expression("rgba(255, 0, 0, 0.5)");
shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- shaderState,
+ shaderState
);
expected = "vec4(1.0, 0.0, 0.0, 0.5)";
expect(shaderExpression).toEqual(expected);
@@ -3778,7 +3778,7 @@ describe("Scene/Expression", function () {
expression = new Expression("rgba(255, ${property}, 0, 0.5)");
shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- shaderState,
+ shaderState
);
expected = "vec4(255.0 / 255.0, property / 255.0, 0.0 / 255.0, 0.5)";
expect(shaderExpression).toEqual(expected);
@@ -3788,7 +3788,7 @@ describe("Scene/Expression", function () {
expression = new Expression("hsl(1.0, 0.5, 0.5)");
shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- shaderState,
+ shaderState
);
expected = "vec4(0.75, 0.25, 0.25, 1.0)";
expect(shaderExpression).toEqual(expected);
@@ -3798,7 +3798,7 @@ describe("Scene/Expression", function () {
expression = new Expression("hsla(1.0, 0.5, 0.5, 0.5)");
shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- shaderState,
+ shaderState
);
expected = "vec4(0.75, 0.25, 0.25, 0.5)";
expect(shaderExpression).toEqual(expected);
@@ -3808,7 +3808,7 @@ describe("Scene/Expression", function () {
expression = new Expression("hsl(1.0, ${property}, 0.5)");
shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- shaderState,
+ shaderState
);
expected = "vec4(czm_HSLToRGB(vec3(1.0, property, 0.5)), 1.0)";
expect(shaderExpression).toEqual(expected);
@@ -3818,7 +3818,7 @@ describe("Scene/Expression", function () {
expression = new Expression("hsla(1.0, ${property}, 0.5, 0.5)");
shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- shaderState,
+ shaderState
);
expected = "vec4(czm_HSLToRGB(vec3(1.0, property, 0.5)), 0.5)";
expect(shaderExpression).toEqual(expected);
@@ -3828,7 +3828,7 @@ describe("Scene/Expression", function () {
it("gets shader expression for color components", function () {
// .r, .g, .b, .a
let expression = new Expression(
- "color().r + color().g + color().b + color().a",
+ "color().r + color().g + color().b + color().a"
);
let shaderExpression = expression.getShaderExpression({}, {});
const expected =
@@ -3837,14 +3837,14 @@ describe("Scene/Expression", function () {
// .x, .y, .z, .w
expression = new Expression(
- "color().x + color().y + color().z + color().w",
+ "color().x + color().y + color().z + color().w"
);
shaderExpression = expression.getShaderExpression({}, {});
expect(shaderExpression).toEqual(expected);
// [0], [1], [2], [3]
expression = new Expression(
- "color()[0] + color()[1] + color()[2] + color()[3]",
+ "color()[0] + color()[1] + color()[2] + color()[3]"
);
shaderExpression = expression.getShaderExpression({}, {});
expect(shaderExpression).toEqual(expected);
@@ -3858,30 +3858,30 @@ describe("Scene/Expression", function () {
let expression = new Expression("vec4(1, 2, 3, 4)");
let shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- {},
+ {}
);
expect(shaderExpression).toEqual("vec4(1.0, 2.0, 3.0, 4.0)");
expression = new Expression("vec4(1) + vec4(2)");
shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- {},
+ {}
);
expect(shaderExpression).toEqual("(vec4(1.0) + vec4(2.0))");
expression = new Expression("vec4(1, ${property}, vec2(1, 2).x, 0)");
shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- {},
+ {}
);
expect(shaderExpression).toEqual(
- "vec4(1.0, property, vec2(1.0, 2.0)[0], 0.0)",
+ "vec4(1.0, property, vec2(1.0, 2.0)[0], 0.0)"
);
expression = new Expression("vec4(vec3(2), 1.0)");
shaderExpression = expression.getShaderExpression(
variableSubstitutionMap,
- {},
+ {}
);
expect(shaderExpression).toEqual("vec4(vec3(2.0), 1.0)");
});
@@ -3889,7 +3889,7 @@ describe("Scene/Expression", function () {
it("gets shader expression for vector components", function () {
// .x, .y, .z, .w
let expression = new Expression(
- "vec4(1).x + vec4(1).y + vec4(1).z + vec4(1).w",
+ "vec4(1).x + vec4(1).y + vec4(1).z + vec4(1).w"
);
let shaderExpression = expression.getShaderExpression({}, {});
const expected =
@@ -3898,7 +3898,7 @@ describe("Scene/Expression", function () {
// [0], [1], [2], [3]
expression = new Expression(
- "vec4(1)[0] + vec4(1)[1] + vec4(1)[2] + vec4(1)[3]",
+ "vec4(1)[0] + vec4(1)[1] + vec4(1)[2] + vec4(1)[3]"
);
shaderExpression = expression.getShaderExpression({}, {});
expect(shaderExpression).toEqual(expected);
@@ -4102,7 +4102,7 @@ describe("Scene/Expression", function () {
it("gets shader expression for cross", function () {
const expression = new Expression(
- "cross(vec3(1.0, 1.0, 1.0), vec3(2.0, 2.0, 2.0))",
+ "cross(vec3(1.0, 1.0, 1.0), vec3(2.0, 2.0, 2.0))"
);
const shaderExpression = expression.getShaderExpression({}, {});
const expected = "cross(vec3(1.0, 1.0, 1.0), vec3(2.0, 2.0, 2.0))";
@@ -4139,7 +4139,7 @@ describe("Scene/Expression", function () {
it("gets variables", function () {
const expression = new Expression(
- '${feature["w"]} + ${feature.x} + ${y} + ${y} + "${z}"',
+ '${feature["w"]} + ${feature.x} + ${y} + ${y} + "${z}"'
);
const variables = expression.getVariables();
expect(variables.sort()).toEqual(["w", "x", "y", "z"]);
diff --git a/packages/engine/Specs/Scene/FrameRateMonitorSpec.js b/packages/engine/Specs/Scene/FrameRateMonitorSpec.js
index 3de2f8a5b8d9..aee28edae5e0 100644
--- a/packages/engine/Specs/Scene/FrameRateMonitorSpec.js
+++ b/packages/engine/Specs/Scene/FrameRateMonitorSpec.js
@@ -252,5 +252,5 @@ describe(
expect(nominalListener).toHaveBeenCalled();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Geometry3DTileContentSpec.js b/packages/engine/Specs/Scene/Geometry3DTileContentSpec.js
index 6516c9ee6ed3..344dca690ce5 100644
--- a/packages/engine/Specs/Scene/Geometry3DTileContentSpec.js
+++ b/packages/engine/Specs/Scene/Geometry3DTileContentSpec.js
@@ -106,7 +106,7 @@ describe(
});
}
const depthColorAttribute = ColorGeometryInstanceAttribute.fromColor(
- new Color(1.0, 0.0, 0.0, 1.0),
+ new Color(1.0, 0.0, 0.0, 1.0)
);
depthColor = depthColorAttribute.value;
return new Primitive({
@@ -165,7 +165,7 @@ describe(
reusableGlobePrimitive = createPrimitive(rectangle, Pass.GLOBE);
reusableTilesetPrimitive = createPrimitive(
rectangle,
- Pass.CESIUM_3D_TILE,
+ Pass.CESIUM_3D_TILE
);
});
@@ -180,11 +180,11 @@ describe(
globePrimitive = new MockPrimitive(reusableGlobePrimitive, Pass.GLOBE);
tilesetPrimitive = new MockPrimitive(
reusableTilesetPrimitive,
- Pass.CESIUM_3D_TILE,
+ Pass.CESIUM_3D_TILE
);
scene.camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(tilesetRectangle)),
- new Cartesian3(0.0, 0.0, 0.01),
+ new Cartesian3(0.0, 0.0, 0.01)
);
});
@@ -233,45 +233,45 @@ describe(
tilesetRectangle.west,
center.latitude,
center.longitude,
- tilesetRectangle.north,
+ tilesetRectangle.north
);
const urRect = new Rectangle(
center.longitude,
center.longitude,
tilesetRectangle.east,
- tilesetRectangle.north,
+ tilesetRectangle.north
);
const llRect = new Rectangle(
tilesetRectangle.west,
tilesetRectangle.south,
center.longitude,
- center.latitude,
+ center.latitude
);
const lrRect = new Rectangle(
center.longitude,
tilesetRectangle.south,
tilesetRectangle.east,
- center.latitude,
+ center.latitude
);
scene.camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expectPick(scene);
scene.camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expectPick(scene);
scene.camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expectPick(scene);
scene.camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expectPick(scene);
}
@@ -282,45 +282,45 @@ describe(
tilesetRectangle.west,
center.latitude,
center.longitude,
- tilesetRectangle.north,
+ tilesetRectangle.north
);
const urRect = new Rectangle(
center.longitude,
center.longitude,
tilesetRectangle.east,
- tilesetRectangle.north,
+ tilesetRectangle.north
);
const llRect = new Rectangle(
tilesetRectangle.west,
tilesetRectangle.south,
center.longitude,
- center.latitude,
+ center.latitude
);
const lrRect = new Rectangle(
center.longitude,
tilesetRectangle.south,
tilesetRectangle.east,
- center.latitude,
+ center.latitude
);
scene.camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(color);
scene.camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(color);
scene.camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(color);
scene.camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(color);
}
@@ -429,7 +429,7 @@ describe(
scene.primitives.add(globePrimitive);
return Cesium3DTilesTester.loadTileset(
scene,
- geometryBoxesBatchedChildren,
+ geometryBoxesBatchedChildren
)
.then(function (tileset) {
return verifyRender(tileset, scene);
@@ -454,7 +454,7 @@ describe(
scene.primitives.add(globePrimitive);
return Cesium3DTilesTester.loadTileset(
scene,
- geometryBoxesBatchedChildrenWithBatchTable,
+ geometryBoxesBatchedChildrenWithBatchTable
)
.then(function (tileset) {
return verifyRender(tileset, scene);
@@ -490,7 +490,7 @@ describe(
scene.primitives.add(globePrimitive);
return Cesium3DTilesTester.loadTileset(
scene,
- geometryCylindersBatchedChildren,
+ geometryCylindersBatchedChildren
)
.then(function (tileset) {
return verifyRender(tileset, scene);
@@ -504,7 +504,7 @@ describe(
scene.primitives.add(globePrimitive);
return Cesium3DTilesTester.loadTileset(
scene,
- geometryCylindersWithBatchTable,
+ geometryCylindersWithBatchTable
)
.then(function (tileset) {
return verifyRender(tileset, scene);
@@ -518,7 +518,7 @@ describe(
scene.primitives.add(globePrimitive);
return Cesium3DTilesTester.loadTileset(
scene,
- geometryCylindersBatchedChildrenWithBatchTable,
+ geometryCylindersBatchedChildrenWithBatchTable
)
.then(function (tileset) {
return verifyRender(tileset, scene);
@@ -532,7 +532,7 @@ describe(
scene.primitives.add(globePrimitive);
return Cesium3DTilesTester.loadTileset(
scene,
- geometryCylindersWithBatchIds,
+ geometryCylindersWithBatchIds
)
.then(function (tileset) {
return verifyRender(tileset, scene);
@@ -557,7 +557,7 @@ describe(
scene.primitives.add(globePrimitive);
return Cesium3DTilesTester.loadTileset(
scene,
- geometryEllipsoidsBatchedChildren,
+ geometryEllipsoidsBatchedChildren
)
.then(function (tileset) {
return verifyRender(tileset, scene);
@@ -571,7 +571,7 @@ describe(
scene.primitives.add(globePrimitive);
return Cesium3DTilesTester.loadTileset(
scene,
- geometryEllipsoidsWithBatchTable,
+ geometryEllipsoidsWithBatchTable
)
.then(function (tileset) {
return verifyRender(tileset, scene);
@@ -585,7 +585,7 @@ describe(
scene.primitives.add(globePrimitive);
return Cesium3DTilesTester.loadTileset(
scene,
- geometryEllipsoidsBatchedChildrenWithBatchTable,
+ geometryEllipsoidsBatchedChildrenWithBatchTable
)
.then(function (tileset) {
return verifyRender(tileset, scene);
@@ -599,7 +599,7 @@ describe(
scene.primitives.add(globePrimitive);
return Cesium3DTilesTester.loadTileset(
scene,
- geometryEllipsoidsWithBatchIds,
+ geometryEllipsoidsWithBatchIds
)
.then(function (tileset) {
return verifyRender(tileset, scene);
@@ -624,7 +624,7 @@ describe(
scene.primitives.add(globePrimitive);
return Cesium3DTilesTester.loadTileset(
scene,
- geometrySpheresBatchedChildren,
+ geometrySpheresBatchedChildren
)
.then(function (tileset) {
return verifyRender(tileset, scene);
@@ -638,7 +638,7 @@ describe(
scene.primitives.add(globePrimitive);
return Cesium3DTilesTester.loadTileset(
scene,
- geometrySpheresWithBatchTable,
+ geometrySpheresWithBatchTable
)
.then(function (tileset) {
return verifyRender(tileset, scene);
@@ -652,7 +652,7 @@ describe(
scene.primitives.add(globePrimitive);
return Cesium3DTilesTester.loadTileset(
scene,
- geometrySpheresBatchedChildrenWithBatchTable,
+ geometrySpheresBatchedChildrenWithBatchTable
)
.then(function (tileset) {
return verifyRender(tileset, scene);
@@ -710,7 +710,7 @@ describe(
scene.primitives.add(globePrimitive);
return Cesium3DTilesTester.loadTileset(
scene,
- geometryAllBatchedChildrenWithBatchTable,
+ geometryAllBatchedChildrenWithBatchTable
)
.then(function (tileset) {
return verifyRender(tileset, scene);
@@ -741,30 +741,30 @@ describe(
tilesetRectangle.west,
center.latitude,
center.longitude,
- tilesetRectangle.north,
+ tilesetRectangle.north
);
const urRect = new Rectangle(
center.longitude,
center.longitude,
tilesetRectangle.east,
- tilesetRectangle.north,
+ tilesetRectangle.north
);
const llRect = new Rectangle(
tilesetRectangle.west,
tilesetRectangle.south,
center.longitude,
- center.latitude,
+ center.latitude
);
const lrRect = new Rectangle(
center.longitude,
tilesetRectangle.south,
tilesetRectangle.east,
- center.latitude,
+ center.latitude
);
scene.camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRenderAndCall(function (rgba) {
expect(rgba).not.toEqual([0, 0, 0, 255]);
@@ -772,7 +772,7 @@ describe(
});
scene.camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRenderAndCall(function (rgba) {
expect(rgba).not.toEqual([0, 0, 0, 255]);
@@ -780,7 +780,7 @@ describe(
});
scene.camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRenderAndCall(function (rgba) {
expect(rgba).not.toEqual([0, 0, 0, 255]);
@@ -788,7 +788,7 @@ describe(
});
scene.camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRenderAndCall(function (rgba) {
expect(rgba).not.toEqual([0, 0, 0, 255]);
@@ -800,7 +800,7 @@ describe(
it("can get features and properties", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- geometryBoxesWithBatchTable,
+ geometryBoxesWithBatchTable
).then(function (tileset) {
const content = tileset.root.content;
expect(content.featuresLength).toBe(1);
@@ -813,7 +813,7 @@ describe(
it("throws when calling getFeature with invalid index", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- geometryBoxesWithBatchTable,
+ geometryBoxesWithBatchTable
).then(function (tileset) {
const content = tileset.root.content;
expect(function () {
@@ -833,10 +833,10 @@ describe(
version: 2,
});
await expectAsync(
- Cesium3DTilesTester.createContentForMockTile(arrayBuffer, "geom"),
+ Cesium3DTilesTester.createContentForMockTile(arrayBuffer, "geom")
).toBeRejectedWithError(
RuntimeError,
- "Only Geometry tile version 1 is supported. Version 2 is not.",
+ "Only Geometry tile version 1 is supported. Version 2 is not."
);
});
@@ -845,10 +845,10 @@ describe(
defineFeatureTable: false,
});
await expectAsync(
- Cesium3DTilesTester.createContentForMockTile(arrayBuffer, "geom"),
+ Cesium3DTilesTester.createContentForMockTile(arrayBuffer, "geom")
).toBeRejectedWithError(
RuntimeError,
- "Feature table must have a byte length greater than zero",
+ "Feature table must have a byte length greater than zero"
);
});
@@ -863,17 +863,17 @@ describe(
ellipsoidBatchIds: [2],
});
await expectAsync(
- Cesium3DTilesTester.createContentForMockTile(arrayBuffer, "geom"),
+ Cesium3DTilesTester.createContentForMockTile(arrayBuffer, "geom")
).toBeRejectedWithError(
RuntimeError,
- "If one group of batch ids is defined, then all batch ids must be defined",
+ "If one group of batch ids is defined, then all batch ids must be defined"
);
});
it("destroys", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- geometryBoxesWithBatchTable,
+ geometryBoxesWithBatchTable
).then(function (tileset) {
expect(tileset.isDestroyed()).toEqual(false);
scene.primitives.remove(tileset);
@@ -948,7 +948,7 @@ describe(
metadata: groupMetadata,
});
expect(content.group.metadata).toBe(groupMetadata);
- },
+ }
);
});
@@ -958,10 +958,10 @@ describe(
const content = tileset.root.content;
content.metadata = contentMetadata;
expect(content.metadata).toBe(contentMetadata);
- },
+ }
);
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/GeometryRenderingSpec.js b/packages/engine/Specs/Scene/GeometryRenderingSpec.js
index 8afb4f78b93f..316131be6ef1 100644
--- a/packages/engine/Specs/Scene/GeometryRenderingSpec.js
+++ b/packages/engine/Specs/Scene/GeometryRenderingSpec.js
@@ -232,10 +232,10 @@ describe(
}),
modelMatrix: Matrix4.multiplyByTranslation(
Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(-75.59777, 40.03883),
+ Cartesian3.fromDegrees(-75.59777, 40.03883)
),
new Cartesian3(0.0, 0.0, 100000.0),
- new Matrix4(),
+ new Matrix4()
),
id: "box",
attributes: {
@@ -245,7 +245,7 @@ describe(
geometry = BoxGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
});
@@ -269,7 +269,7 @@ describe(
return renderAsync(instance);
});
},
- "WebGL",
+ "WebGL"
);
describe(
@@ -283,10 +283,10 @@ describe(
}),
modelMatrix: Matrix4.multiplyByTranslation(
Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(-75.59777, 40.03883),
+ Cartesian3.fromDegrees(-75.59777, 40.03883)
),
new Cartesian3(0.0, 0.0, 100000.0),
- new Matrix4(),
+ new Matrix4()
),
id: "plane",
attributes: {
@@ -296,7 +296,7 @@ describe(
geometry = PlaneGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
});
@@ -320,7 +320,7 @@ describe(
return renderAsync(instance);
});
},
- "WebGL",
+ "WebGL"
);
describe(
@@ -343,7 +343,7 @@ describe(
geometry = CircleGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
});
@@ -367,7 +367,7 @@ describe(
return renderAsync(instance);
});
},
- "WebGL",
+ "WebGL"
);
describe("CoplanarPolygonGeometry", function () {
@@ -376,8 +376,18 @@ describe(
instance = new GeometryInstance({
geometry: CoplanarPolygonGeometry.fromPositions({
positions: Cartesian3.fromDegreesArrayHeights([
- 71.0, -10.0, 0.0, 70.0, 0.0, 20000.0, 69.0, 0.0, 20000.0, 68.0,
- -10.0, 0.0,
+ 71.0,
+ -10.0,
+ 0.0,
+ 70.0,
+ 0.0,
+ 20000.0,
+ 69.0,
+ 0.0,
+ 20000.0,
+ 68.0,
+ -10.0,
+ 0.0,
]),
vertexFormat: PerInstanceColorAppearance.FLAT_VERTEX_FORMAT,
}),
@@ -387,14 +397,14 @@ describe(
Math.random(),
Math.random(),
Math.random(),
- 0.5,
+ 0.5
),
},
});
geometry = CoplanarPolygonGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
});
@@ -435,27 +445,27 @@ describe(
modelMatrix: Matrix4.multiplyByUniformScale(
Matrix4.multiplyByTranslation(
Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(-90.0, 45.0),
+ Cartesian3.fromDegrees(-90.0, 45.0)
),
new Cartesian3(0.0, 0.0, 500000.0),
- new Matrix4(),
+ new Matrix4()
),
90000.0,
- new Matrix4(),
+ new Matrix4()
),
attributes: {
color: new ColorGeometryInstanceAttribute(
Math.random(),
Math.random(),
Math.random(),
- 0.5,
+ 0.5
),
},
});
geometry = CylinderGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
});
@@ -479,7 +489,7 @@ describe(
return renderAsync(instance);
});
},
- "WebGL",
+ "WebGL"
);
describe(
@@ -503,7 +513,7 @@ describe(
geometry = EllipseGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
});
@@ -545,7 +555,7 @@ describe(
geometry = EllipseGeometry.createGeometry(rotated.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
render3D(rotated);
});
@@ -568,12 +578,12 @@ describe(
geometry = EllipseGeometry.createGeometry(atHeight.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
render3D(atHeight);
});
},
- "WebGL",
+ "WebGL"
);
describe(
@@ -603,7 +613,7 @@ describe(
geometry = EllipseGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
});
@@ -632,14 +642,14 @@ describe(
const height = (extrudedHeight - geometryHeight) * 0.5;
const transform = Matrix4.multiplyByTranslation(
Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphere.center,
+ geometry.boundingSphere.center
),
new Cartesian3(0.0, 0.0, height),
- new Matrix4(),
+ new Matrix4()
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphere.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphere.radius)
);
scene.camera.rotateDown(CesiumMath.PI);
}
@@ -649,18 +659,18 @@ describe(
it("renders wall", function () {
function afterView() {
const transform = Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphere.center,
+ geometry.boundingSphere.center
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphere.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphere.radius)
);
scene.camera.rotateDown(CesiumMath.PI_OVER_TWO);
}
render3D(instance, afterView);
});
},
- "WebGL",
+ "WebGL"
);
describe(
@@ -675,10 +685,10 @@ describe(
}),
modelMatrix: Matrix4.multiplyByTranslation(
Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(-100, 20),
+ Cartesian3.fromDegrees(-100, 20)
),
new Cartesian3(0.0, 0.0, 1000000.0),
- new Matrix4(),
+ new Matrix4()
),
id: "ellipsoid",
attributes: {
@@ -688,7 +698,7 @@ describe(
geometry = EllipsoidGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
});
@@ -712,7 +722,7 @@ describe(
return renderAsync(instance);
});
},
- "WebGL",
+ "WebGL"
);
describe(
@@ -727,10 +737,10 @@ describe(
}),
modelMatrix: Matrix4.multiplyByTranslation(
Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(-100, 20),
+ Cartesian3.fromDegrees(-100, 20)
),
new Cartesian3(0.0, 0.0, 1000000.0),
- new Matrix4(),
+ new Matrix4()
),
id: "sphere",
attributes: {
@@ -740,7 +750,7 @@ describe(
geometry = SphereGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
});
@@ -764,7 +774,7 @@ describe(
return renderAsync(instance);
});
},
- "WebGL",
+ "WebGL"
);
describe(
@@ -788,7 +798,7 @@ describe(
geometry = RectangleGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
});
@@ -827,7 +837,7 @@ describe(
geometry = RectangleGeometry.createGeometry(rotated.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
render3D(rotated);
});
@@ -847,7 +857,7 @@ describe(
geometry = RectangleGeometry.createGeometry(rotated.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
render3D(rotated, undefined, appearance);
});
@@ -867,12 +877,12 @@ describe(
geometry = RectangleGeometry.createGeometry(atHeight.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
render3D(atHeight);
});
},
- "WebGL",
+ "WebGL"
);
describe(
@@ -902,7 +912,7 @@ describe(
geometry = RectangleGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
});
@@ -929,11 +939,11 @@ describe(
it("renders bottom", function () {
function afterView() {
const transform = Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphereWC.center,
+ geometry.boundingSphereWC.center
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius)
);
scene.camera.rotateDown(CesiumMath.PI);
}
@@ -943,11 +953,11 @@ describe(
it("renders north wall", function () {
function afterView() {
const transform = Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphereWC.center,
+ geometry.boundingSphereWC.center
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius)
);
scene.camera.rotateDown(-CesiumMath.PI_OVER_TWO);
}
@@ -957,11 +967,11 @@ describe(
it("renders south wall", function () {
function afterView() {
const transform = Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphereWC.center,
+ geometry.boundingSphereWC.center
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius)
);
scene.camera.rotateDown(CesiumMath.PI_OVER_TWO);
}
@@ -971,11 +981,11 @@ describe(
it("renders west wall", function () {
function afterView() {
const transform = Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphereWC.center,
+ geometry.boundingSphereWC.center
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius)
);
scene.camera.rotateRight(-CesiumMath.PI_OVER_TWO);
}
@@ -985,18 +995,18 @@ describe(
it("renders east wall", function () {
function afterView() {
const transform = Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphereWC.center,
+ geometry.boundingSphereWC.center
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius)
);
scene.camera.rotateRight(CesiumMath.PI_OVER_TWO);
}
render3D(instance, afterView);
});
},
- "WebGL",
+ "WebGL"
);
describe(
@@ -1009,7 +1019,14 @@ describe(
vertexFormat: PerInstanceColorAppearance.FLAT_VERTEX_FORMAT,
ellipsoid: ellipsoid,
positions: Cartesian3.fromDegreesArray([
- 0.0, 45.0, 10.0, 45.0, 10.0, 55.0, 0.0, 55.0,
+ 0.0,
+ 45.0,
+ 10.0,
+ 45.0,
+ 10.0,
+ 55.0,
+ 0.0,
+ 55.0,
]),
}),
id: "polygon",
@@ -1020,7 +1037,7 @@ describe(
geometry = PolygonGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
});
@@ -1050,7 +1067,14 @@ describe(
vertexFormat: PerInstanceColorAppearance.FLAT_VERTEX_FORMAT,
ellipsoid: ellipsoid,
positions: Cartesian3.fromDegreesArray([
- 0.0, 45.0, 10.0, 45.0, 10.0, 55.0, 0.0, 55.0,
+ 0.0,
+ 45.0,
+ 10.0,
+ 45.0,
+ 10.0,
+ 55.0,
+ 0.0,
+ 55.0,
]),
height: 3000000.0,
}),
@@ -1062,7 +1086,7 @@ describe(
geometry = PolygonGeometry.createGeometry(atHeight.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- atHeight.modelMatrix,
+ atHeight.modelMatrix
);
render3D(atHeight);
});
@@ -1073,17 +1097,38 @@ describe(
vertexFormat: PerInstanceColorAppearance.FLAT_VERTEX_FORMAT,
polygonHierarchy: {
positions: Cartesian3.fromDegreesArray([
- -109.0, 30.0, -95.0, 30.0, -95.0, 40.0, -109.0, 40.0,
+ -109.0,
+ 30.0,
+ -95.0,
+ 30.0,
+ -95.0,
+ 40.0,
+ -109.0,
+ 40.0,
]),
holes: [
{
positions: Cartesian3.fromDegreesArray([
- -107.0, 31.0, -107.0, 39.0, -97.0, 39.0, -97.0, 31.0,
+ -107.0,
+ 31.0,
+ -107.0,
+ 39.0,
+ -97.0,
+ 39.0,
+ -97.0,
+ 31.0,
]),
holes: [
{
positions: Cartesian3.fromDegreesArray([
- -106.5, 31.5, -97.5, 31.5, -97.5, 38.5, -106.5, 38.5,
+ -106.5,
+ 31.5,
+ -97.5,
+ 31.5,
+ -97.5,
+ 38.5,
+ -106.5,
+ 38.5,
]),
},
],
@@ -1099,12 +1144,12 @@ describe(
geometry = PolygonGeometry.createGeometry(hierarchy.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- hierarchy.modelMatrix,
+ hierarchy.modelMatrix
);
render3D(hierarchy);
});
},
- "WebGL",
+ "WebGL"
);
describe(
@@ -1123,7 +1168,14 @@ describe(
vertexFormat: PerInstanceColorAppearance.FLAT_VERTEX_FORMAT,
ellipsoid: ellipsoid,
positions: Cartesian3.fromDegreesArray([
- -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0,
+ -1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ 1.0,
+ -1.0,
+ 1.0,
]),
height: geometryHeight,
extrudedHeight: extrudedHeight,
@@ -1136,7 +1188,7 @@ describe(
geometry = PolygonGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
});
@@ -1165,14 +1217,14 @@ describe(
const height = (extrudedHeight - geometryHeight) * 0.5;
const transform = Matrix4.multiplyByTranslation(
Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphere.center,
+ geometry.boundingSphere.center
),
new Cartesian3(0.0, 0.0, height),
- new Matrix4(),
+ new Matrix4()
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphere.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphere.radius)
);
scene.camera.rotateDown(CesiumMath.PI);
}
@@ -1182,11 +1234,11 @@ describe(
it("renders wall 1", function () {
function afterView() {
const transform = Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphere.center,
+ geometry.boundingSphere.center
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphere.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphere.radius)
);
scene.camera.rotateUp(CesiumMath.PI_OVER_TWO);
}
@@ -1196,11 +1248,11 @@ describe(
it("renders wall 2", function () {
function afterView() {
const transform = Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphere.center,
+ geometry.boundingSphere.center
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphere.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphere.radius)
);
scene.camera.rotateDown(-CesiumMath.PI_OVER_TWO);
}
@@ -1210,11 +1262,11 @@ describe(
it("renders wall 3", function () {
function afterView() {
const transform = Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphere.center,
+ geometry.boundingSphere.center
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphere.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphere.radius)
);
scene.camera.rotateRight(-CesiumMath.PI_OVER_TWO);
}
@@ -1224,11 +1276,11 @@ describe(
it("renders wall 4", function () {
function afterView() {
const transform = Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphere.center,
+ geometry.boundingSphere.center
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphere.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphere.radius)
);
scene.camera.rotateRight(CesiumMath.PI_OVER_TWO);
}
@@ -1241,8 +1293,18 @@ describe(
vertexFormat: PerInstanceColorAppearance.VERTEX_FORMAT,
ellipsoid: ellipsoid,
positions: Cartesian3.fromDegreesArrayHeights([
- -108.0, -25.0, 500000, -100.0, -25.0, 500000, -100.0, -30.0,
- 500000, -108.0, -30.0, 500000,
+ -108.0,
+ -25.0,
+ 500000,
+ -100.0,
+ -25.0,
+ 500000,
+ -100.0,
+ -30.0,
+ 500000,
+ -108.0,
+ -30.0,
+ 500000,
]),
perPositionHeight: true,
extrudedHeight: 0,
@@ -1255,16 +1317,16 @@ describe(
geometry = PolygonGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
function afterView() {
const transform = Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphereWC.center,
+ geometry.boundingSphereWC.center
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius)
);
scene.camera.rotateDown(-CesiumMath.PI_OVER_TWO);
scene.camera.moveForward(geometry.boundingSphereWC.radius * 0.75);
@@ -1272,7 +1334,7 @@ describe(
render3D(instance, afterView);
});
},
- "WebGL",
+ "WebGL"
);
describe(
@@ -1305,23 +1367,23 @@ describe(
geometry = WallGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
afterView3D = function () {
const transform = Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphereWC.center,
+ geometry.boundingSphereWC.center
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius)
);
scene.camera.rotateDown(-CesiumMath.PI_OVER_TWO);
};
afterViewCV = function () {
const transform = Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphereWC.center,
+ geometry.boundingSphereWC.center
);
Matrix4.clone(transform, scene.camera._transform);
scene.camera.rotateDown(-CesiumMath.PI_OVER_TWO);
@@ -1348,7 +1410,7 @@ describe(
return renderAsync(instance, afterView3D);
});
},
- "WebGL",
+ "WebGL"
);
describe(
@@ -1376,7 +1438,7 @@ describe(
geometry = CorridorGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
});
@@ -1417,12 +1479,12 @@ describe(
geometry = CorridorGeometry.createGeometry(atHeight.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- atHeight.modelMatrix,
+ atHeight.modelMatrix
);
render3D(atHeight);
});
},
- "WebGL",
+ "WebGL"
);
describe(
@@ -1455,7 +1517,7 @@ describe(
geometry = CorridorGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
});
@@ -1484,14 +1546,14 @@ describe(
const height = (extrudedHeight - geometryHeight) * 0.5;
const transform = Matrix4.multiplyByTranslation(
Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphereWC.center,
+ geometry.boundingSphereWC.center
),
new Cartesian3(0.0, 0.0, height),
- new Matrix4(),
+ new Matrix4()
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius)
);
scene.camera.rotateDown(CesiumMath.PI);
}
@@ -1501,11 +1563,11 @@ describe(
it("renders north wall", function () {
function afterView() {
const transform = Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphereWC.center,
+ geometry.boundingSphereWC.center
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius)
);
scene.camera.rotateDown(-CesiumMath.PI_OVER_TWO);
}
@@ -1515,11 +1577,11 @@ describe(
it("renders south wall", function () {
function afterView() {
const transform = Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphereWC.center,
+ geometry.boundingSphereWC.center
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius)
);
scene.camera.rotateDown(CesiumMath.PI_OVER_TWO);
}
@@ -1529,11 +1591,11 @@ describe(
it("renders west wall", function () {
function afterView() {
const transform = Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphereWC.center,
+ geometry.boundingSphereWC.center
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius)
);
scene.camera.rotateRight(-CesiumMath.PI_OVER_TWO);
}
@@ -1543,18 +1605,18 @@ describe(
it("renders east wall", function () {
function afterView() {
const transform = Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphereWC.center,
+ geometry.boundingSphereWC.center
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius)
);
scene.camera.rotateRight(CesiumMath.PI_OVER_TWO);
}
render3D(instance, afterView);
});
},
- "WebGL",
+ "WebGL"
);
describe(
@@ -1590,7 +1652,7 @@ describe(
geometry = PolylineVolumeGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
});
@@ -1619,14 +1681,14 @@ describe(
const height = geometryHeight * 0.5;
const transform = Matrix4.multiplyByTranslation(
Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphereWC.center,
+ geometry.boundingSphereWC.center
),
new Cartesian3(0.0, 0.0, height),
- new Matrix4(),
+ new Matrix4()
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius)
);
scene.camera.rotateDown(CesiumMath.PI);
}
@@ -1636,11 +1698,11 @@ describe(
it("renders north wall", function () {
function afterView() {
const transform = Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphereWC.center,
+ geometry.boundingSphereWC.center
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius)
);
scene.camera.rotateDown(-CesiumMath.PI_OVER_TWO);
}
@@ -1650,11 +1712,11 @@ describe(
it("renders south wall", function () {
function afterView() {
const transform = Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphereWC.center,
+ geometry.boundingSphereWC.center
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius)
);
scene.camera.rotateDown(CesiumMath.PI_OVER_TWO);
}
@@ -1664,11 +1726,11 @@ describe(
it("renders west wall", function () {
function afterView() {
const transform = Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphereWC.center,
+ geometry.boundingSphereWC.center
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius)
);
scene.camera.rotateRight(-CesiumMath.PI_OVER_TWO);
}
@@ -1678,18 +1740,18 @@ describe(
it("renders east wall", function () {
function afterView() {
const transform = Transforms.eastNorthUpToFixedFrame(
- geometry.boundingSphereWC.center,
+ geometry.boundingSphereWC.center
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius),
+ new Cartesian3(0.0, 0.0, geometry.boundingSphereWC.radius)
);
scene.camera.rotateRight(CesiumMath.PI_OVER_TWO);
}
render3D(instance, afterView);
});
},
- "WebGL",
+ "WebGL"
);
describe(
@@ -1709,7 +1771,7 @@ describe(
geometry = SimplePolylineGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
});
@@ -1747,7 +1809,7 @@ describe(
geometry = SimplePolylineGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
render3D(instance);
});
@@ -1767,12 +1829,12 @@ describe(
geometry = SimplePolylineGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
render3D(instance);
});
},
- "WebGL",
+ "WebGL"
);
describe(
@@ -1799,7 +1861,7 @@ describe(
geometry = PolylineGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
});
@@ -1839,7 +1901,7 @@ describe(
geometry = PolylineGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
render3D(instance, undefined, appearance);
});
@@ -1861,12 +1923,12 @@ describe(
geometry = PolylineGeometry.createGeometry(instance.geometry);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
render3D(instance, undefined, appearance);
});
},
- "WebGL",
+ "WebGL"
);
describe("Custom geometry", function () {
@@ -1882,8 +1944,18 @@ describe(
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- 1000000.0, 0.0, 0.0, 1000000.0, 1000000.0, 0.0, 1000000.0,
- 0.0, 1000000.0, 1000000.0, 1000000.0, 1000000.0,
+ 1000000.0,
+ 0.0,
+ 0.0,
+ 1000000.0,
+ 1000000.0,
+ 0.0,
+ 1000000.0,
+ 0.0,
+ 1000000.0,
+ 1000000.0,
+ 1000000.0,
+ 1000000.0,
]),
}),
},
@@ -1892,10 +1964,10 @@ describe(
}),
modelMatrix: Matrix4.multiplyByTranslation(
Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(0, 0),
+ Cartesian3.fromDegrees(0, 0)
),
new Cartesian3(0.0, 0.0, 10000.0),
- new Matrix4(),
+ new Matrix4()
),
id: "customWithIndices",
attributes: {
@@ -1904,11 +1976,11 @@ describe(
});
geometry = instance.geometry;
geometry.boundingSphere = BoundingSphere.fromVertices(
- instance.geometry.attributes.position.values,
+ instance.geometry.attributes.position.values
);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
});
@@ -1928,7 +2000,7 @@ describe(
pickGeometry(instance);
});
},
- "WebGL",
+ "WebGL"
);
describe(
@@ -1943,9 +2015,24 @@ describe(
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: new Float64Array([
- 1000000.0, 0.0, 0.0, 1000000.0, 1000000.0, 0.0, 1000000.0,
- 0.0, 1000000.0, 1000000.0, 0.0, 1000000.0, 1000000.0,
- 1000000.0, 0.0, 1000000.0, 1000000.0, 1000000.0,
+ 1000000.0,
+ 0.0,
+ 0.0,
+ 1000000.0,
+ 1000000.0,
+ 0.0,
+ 1000000.0,
+ 0.0,
+ 1000000.0,
+ 1000000.0,
+ 0.0,
+ 1000000.0,
+ 1000000.0,
+ 1000000.0,
+ 0.0,
+ 1000000.0,
+ 1000000.0,
+ 1000000.0,
]),
}),
},
@@ -1953,10 +2040,10 @@ describe(
}),
modelMatrix: Matrix4.multiplyByTranslation(
Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(0, 0),
+ Cartesian3.fromDegrees(0, 0)
),
new Cartesian3(0.0, 0.0, 10000.0),
- new Matrix4(),
+ new Matrix4()
),
id: "customWithoutIndices",
attributes: {
@@ -1965,11 +2052,11 @@ describe(
});
geometry = instance.geometry;
geometry.boundingSphere = BoundingSphere.fromVertices(
- instance.geometry.attributes.position.values,
+ instance.geometry.attributes.position.values
);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
});
@@ -1989,7 +2076,7 @@ describe(
pickGeometry(instance);
});
},
- "WebGL",
+ "WebGL"
);
describe(
@@ -2004,8 +2091,18 @@ describe(
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: [
- 1000000.0, 0.0, 0.0, 1000000.0, 1000000.0, 0.0, 1000000.0,
- 0.0, 1000000.0, 1000000.0, 1000000.0, 1000000.0,
+ 1000000.0,
+ 0.0,
+ 0.0,
+ 1000000.0,
+ 1000000.0,
+ 0.0,
+ 1000000.0,
+ 0.0,
+ 1000000.0,
+ 1000000.0,
+ 1000000.0,
+ 1000000.0,
],
}),
},
@@ -2014,10 +2111,10 @@ describe(
}),
modelMatrix: Matrix4.multiplyByTranslation(
Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(0, 0),
+ Cartesian3.fromDegrees(0, 0)
),
new Cartesian3(0.0, 0.0, 10000.0),
- new Matrix4(),
+ new Matrix4()
),
id: "customWithIndices",
attributes: {
@@ -2026,11 +2123,11 @@ describe(
});
geometry = instance.geometry;
geometry.boundingSphere = BoundingSphere.fromVertices(
- instance.geometry.attributes.position.values,
+ instance.geometry.attributes.position.values
);
geometry.boundingSphereWC = BoundingSphere.transform(
geometry.boundingSphere,
- instance.modelMatrix,
+ instance.modelMatrix
);
});
@@ -2050,9 +2147,9 @@ describe(
pickGeometry(instance);
});
},
- "WebGL",
+ "WebGL"
);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/GlobeSpec.js b/packages/engine/Specs/Scene/GlobeSpec.js
index 4a4d25f4ce25..af2863a7a40f 100644
--- a/packages/engine/Specs/Scene/GlobeSpec.js
+++ b/packages/engine/Specs/Scene/GlobeSpec.js
@@ -48,7 +48,7 @@ describe(
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
if (url.indexOf("layer.json") >= 0) {
Resource._DefaultImplementations.loadWithXhr(
@@ -57,7 +57,7 @@ describe(
method,
data,
headers,
- deferred,
+ deferred
);
} else {
return oldLoad(
@@ -67,7 +67,7 @@ describe(
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
}
};
@@ -75,7 +75,7 @@ describe(
function returnVertexNormalTileJson() {
return returnTileJson(
- "Data/CesiumTerrainTileJson/VertexNormals.tile.json",
+ "Data/CesiumTerrainTileJson/VertexNormals.tile.json"
);
}
@@ -98,7 +98,7 @@ describe(
const layerCollection = globe.imageryLayers;
layerCollection.removeAll();
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
layerCollection.addImageryProvider(provider);
@@ -121,7 +121,7 @@ describe(
const layerCollection = globe.imageryLayers;
layerCollection.removeAll();
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
layerCollection.addImageryProvider(provider);
@@ -145,7 +145,7 @@ describe(
const layerCollection = globe.imageryLayers;
layerCollection.removeAll();
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
layerCollection.addImageryProvider(provider);
@@ -167,7 +167,7 @@ describe(
const layerCollection = globe.imageryLayers;
layerCollection.removeAll();
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
layerCollection.addImageryProvider(provider);
@@ -193,7 +193,7 @@ describe(
const layerCollection = globe.imageryLayers;
layerCollection.removeAll();
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
const layer = layerCollection.addImageryProvider(provider);
layerCollection.addImageryProvider(provider);
@@ -232,7 +232,7 @@ describe(
"made/up/url",
{
requestVertexNormals: true,
- },
+ }
);
const spyListener = jasmine.createSpy("listener");
@@ -268,7 +268,7 @@ describe(
"made/up/url",
{
requestVertexNormals: true,
- },
+ }
);
globe.terrainProvider = terrainProvider;
@@ -286,7 +286,7 @@ describe(
const layerCollection = globe.imageryLayers;
layerCollection.removeAll();
const imageryProvider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
layerCollection.addImageryProvider(imageryProvider);
Resource._Implementations.loadWithXhr = function (
@@ -296,7 +296,7 @@ describe(
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/CesiumTerrainTileJson/tile.vertexnormals.terrain",
@@ -304,7 +304,7 @@ describe(
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -314,7 +314,7 @@ describe(
"made/up/url",
{
requestVertexNormals: true,
- },
+ }
);
globe.terrainProvider = terrainProvider;
@@ -339,7 +339,7 @@ describe(
const layerCollection = globe.imageryLayers;
layerCollection.removeAll();
const imageryProvider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
layerCollection.addImageryProvider(imageryProvider);
Resource._Implementations.loadWithXhr = function (
@@ -349,7 +349,7 @@ describe(
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/CesiumTerrainTileJson/tile.vertexnormals.terrain",
@@ -357,7 +357,7 @@ describe(
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -367,7 +367,7 @@ describe(
"made/up/url",
{
requestVertexNormals: true,
- },
+ }
);
globe.terrainProvider = terrainProvider;
@@ -395,7 +395,7 @@ describe(
const layerCollection = globe.imageryLayers;
layerCollection.removeAll();
const imageryProvider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
layerCollection.addImageryProvider(imageryProvider);
Resource._Implementations.loadWithXhr = function (
@@ -405,7 +405,7 @@ describe(
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/CesiumTerrainTileJson/tile.vertexnormals.terrain",
@@ -413,7 +413,7 @@ describe(
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -423,7 +423,7 @@ describe(
"made/up/url",
{
requestVertexNormals: true,
- },
+ }
);
globe.terrainProvider = terrainProvider;
@@ -445,7 +445,7 @@ describe(
const layerCollection = globe.imageryLayers;
layerCollection.removeAll();
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Blue.png",
+ "Data/Images/Blue.png"
);
layerCollection.addImageryProvider(provider);
@@ -467,7 +467,7 @@ describe(
const layerCollection = globe.imageryLayers;
layerCollection.removeAll();
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Blue.png",
+ "Data/Images/Blue.png"
);
layerCollection.addImageryProvider(provider);
@@ -489,7 +489,7 @@ describe(
const layerCollection = globe.imageryLayers;
layerCollection.removeAll();
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Blue.png",
+ "Data/Images/Blue.png"
);
layerCollection.addImageryProvider(provider);
@@ -541,7 +541,7 @@ describe(
command = scene.frameState.commandList[0];
expect(command.count).toBeLessThan(indexCount);
expect(command.count).toBe(
- command.owner.data.renderedMesh.indexCountWithoutSkirts,
+ command.owner.data.renderedMesh.indexCountWithoutSkirts
);
});
});
@@ -557,12 +557,12 @@ describe(
destination: new Cartesian3(
-524251.65918537375,
-5316355.5357514685,
- 3400179.253223899,
+ 3400179.253223899
),
orientation: new HeadingPitchRoll(
0.22779127099032603,
-0.7030060668670961,
- 0.0024147223687949193,
+ 0.0024147223687949193
),
});
@@ -583,19 +583,19 @@ describe(
radius * 0.25,
0.0,
radius * 2.0,
- 1.0,
+ 1.0
);
scene.camera.setView({
destination: new Cartesian3(
-524251.65918537375,
-5316355.5357514685,
- 3400179.253223899,
+ 3400179.253223899
),
orientation: new HeadingPitchRoll(
0.24245689061958142,
-0.445653254172905,
- 0.0024147223687949193,
+ 0.0024147223687949193
),
});
@@ -613,10 +613,10 @@ describe(
1.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/GlobeSurfaceTileProviderSpec.js b/packages/engine/Specs/Scene/GlobeSurfaceTileProviderSpec.js
index a108ae40c1e0..b591e61c10c6 100644
--- a/packages/engine/Specs/Scene/GlobeSurfaceTileProviderSpec.js
+++ b/packages/engine/Specs/Scene/GlobeSurfaceTileProviderSpec.js
@@ -47,7 +47,7 @@ describe(
quadtreePrimitive,
minimumTiles,
maximumTiles,
- callback,
+ callback
) {
let tileCount = 0;
quadtreePrimitive.forEachRenderedTile(function (tile) {
@@ -113,7 +113,7 @@ describe(
it("conforms to QuadtreeTileProvider interface", function () {
expect(GlobeSurfaceTileProvider).toConformToInterface(
- QuadtreeTileProvider,
+ QuadtreeTileProvider
);
});
@@ -138,7 +138,7 @@ describe(
});
}
expect(
- constructWithoutImageryLayerCollection,
+ constructWithoutImageryLayerCollection
).toThrowDeveloperError();
});
@@ -150,11 +150,11 @@ describe(
});
}
expect(
- constructWithoutImageryLayerCollection,
+ constructWithoutImageryLayerCollection
).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
describe(
@@ -162,202 +162,181 @@ describe(
function () {
it("removing a layer removes it from all tiles", async function () {
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
const layer = scene.imageryLayers.addImageryProvider(provider);
await updateUntilDone(scene.globe);
// All tiles should have one or more associated images.
- forEachRenderedTile(
- scene.globe._surface,
- 1,
- undefined,
- function (tile) {
- expect(tile.data.imagery.length).toBeGreaterThan(0);
- for (let i = 0; i < tile.data.imagery.length; ++i) {
- const imagery = defaultValue(
- tile.data.imagery[i].readyImagery,
- tile.data.imagery[i].loadingImagery,
- );
- expect(imagery.imageryLayer).toEqual(layer);
- }
- },
- );
+ forEachRenderedTile(scene.globe._surface, 1, undefined, function (
+ tile
+ ) {
+ expect(tile.data.imagery.length).toBeGreaterThan(0);
+ for (let i = 0; i < tile.data.imagery.length; ++i) {
+ const imagery = defaultValue(
+ tile.data.imagery[i].readyImagery,
+ tile.data.imagery[i].loadingImagery
+ );
+ expect(imagery.imageryLayer).toEqual(layer);
+ }
+ });
scene.imageryLayers.remove(layer);
// All associated images should be gone.
- forEachRenderedTile(
- scene.globe._surface,
- 1,
- undefined,
- function (tile) {
- expect(tile.data.imagery.length).toEqual(0);
- },
- );
+ forEachRenderedTile(scene.globe._surface, 1, undefined, function (
+ tile
+ ) {
+ expect(tile.data.imagery.length).toEqual(0);
+ });
});
it("adding a layer adds it to all tiles after update", async function () {
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
scene.imageryLayers.addImageryProvider(provider);
await updateUntilDone(scene.globe);
const provider2 = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Green4x4.png",
+ "Data/Images/Green4x4.png"
);
// Add another layer
const layer2 = scene.imageryLayers.addImageryProvider(provider2);
await updateUntilDone(scene.globe);
// All tiles should have one or more associated images.
- forEachRenderedTile(
- scene.globe._surface,
- 1,
- undefined,
- function (tile) {
- expect(tile.data.imagery.length).toBeGreaterThan(0);
- let hasImageFromLayer2 = false;
- for (let i = 0; i < tile.data.imagery.length; ++i) {
- let imageryTile = tile.data.imagery[i].readyImagery;
- if (!defined(imageryTile)) {
- imageryTile = tile.data.imagery[i].loadingImagery;
- }
- if (imageryTile.imageryLayer === layer2) {
- hasImageFromLayer2 = true;
- }
+ forEachRenderedTile(scene.globe._surface, 1, undefined, function (
+ tile
+ ) {
+ expect(tile.data.imagery.length).toBeGreaterThan(0);
+ let hasImageFromLayer2 = false;
+ for (let i = 0; i < tile.data.imagery.length; ++i) {
+ let imageryTile = tile.data.imagery[i].readyImagery;
+ if (!defined(imageryTile)) {
+ imageryTile = tile.data.imagery[i].loadingImagery;
}
- expect(hasImageFromLayer2).toEqual(true);
- },
- );
+ if (imageryTile.imageryLayer === layer2) {
+ hasImageFromLayer2 = true;
+ }
+ }
+ expect(hasImageFromLayer2).toEqual(true);
+ });
});
it("moving a layer moves the corresponding TileImagery instances on every tile", async function () {
const provider1 = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
const layer1 = scene.imageryLayers.addImageryProvider(provider1);
const provider2 = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Green4x4.png",
+ "Data/Images/Green4x4.png"
);
const layer2 = scene.imageryLayers.addImageryProvider(provider2);
await updateUntilDone(scene.globe);
- forEachRenderedTile(
- scene.globe._surface,
- 1,
- undefined,
- function (tile) {
- expect(tile.data.imagery.length).toBeGreaterThan(0);
- let indexOfFirstLayer1 = tile.data.imagery.length;
- let indexOfLastLayer1 = -1;
- let indexOfFirstLayer2 = tile.data.imagery.length;
- for (let i = 0; i < tile.data.imagery.length; ++i) {
- const imagery = defaultValue(
- tile.data.imagery[i].readyImagery,
- tile.data.imagery[i].loadingImagery,
- );
- if (imagery.imageryLayer === layer1) {
- indexOfFirstLayer1 = Math.min(indexOfFirstLayer1, i);
- indexOfLastLayer1 = i;
- } else {
- expect(imagery.imageryLayer).toEqual(layer2);
- indexOfFirstLayer2 = Math.min(indexOfFirstLayer2, i);
- }
+ forEachRenderedTile(scene.globe._surface, 1, undefined, function (
+ tile
+ ) {
+ expect(tile.data.imagery.length).toBeGreaterThan(0);
+ let indexOfFirstLayer1 = tile.data.imagery.length;
+ let indexOfLastLayer1 = -1;
+ let indexOfFirstLayer2 = tile.data.imagery.length;
+ for (let i = 0; i < tile.data.imagery.length; ++i) {
+ const imagery = defaultValue(
+ tile.data.imagery[i].readyImagery,
+ tile.data.imagery[i].loadingImagery
+ );
+ if (imagery.imageryLayer === layer1) {
+ indexOfFirstLayer1 = Math.min(indexOfFirstLayer1, i);
+ indexOfLastLayer1 = i;
+ } else {
+ expect(imagery.imageryLayer).toEqual(layer2);
+ indexOfFirstLayer2 = Math.min(indexOfFirstLayer2, i);
}
- expect(indexOfFirstLayer1).toBeLessThan(indexOfFirstLayer2);
- expect(indexOfLastLayer1).toBeLessThan(indexOfFirstLayer2);
- },
- );
+ }
+ expect(indexOfFirstLayer1).toBeLessThan(indexOfFirstLayer2);
+ expect(indexOfLastLayer1).toBeLessThan(indexOfFirstLayer2);
+ });
scene.imageryLayers.raiseToTop(layer1);
await updateUntilDone(scene.globe);
- forEachRenderedTile(
- scene.globe._surface,
- 1,
- undefined,
- function (tile) {
- expect(tile.data.imagery.length).toBeGreaterThan(0);
- let indexOfFirstLayer2 = tile.data.imagery.length;
- let indexOfLastLayer2 = -1;
- let indexOfFirstLayer1 = tile.data.imagery.length;
- for (let i = 0; i < tile.data.imagery.length; ++i) {
- if (tile.data.imagery[i].readyImagery.imageryLayer === layer2) {
- indexOfFirstLayer2 = Math.min(indexOfFirstLayer2, i);
- indexOfLastLayer2 = i;
- } else {
- expect(
- tile.data.imagery[i].readyImagery.imageryLayer,
- ).toEqual(layer1);
- indexOfFirstLayer1 = Math.min(indexOfFirstLayer1, i);
- }
+ forEachRenderedTile(scene.globe._surface, 1, undefined, function (
+ tile
+ ) {
+ expect(tile.data.imagery.length).toBeGreaterThan(0);
+ let indexOfFirstLayer2 = tile.data.imagery.length;
+ let indexOfLastLayer2 = -1;
+ let indexOfFirstLayer1 = tile.data.imagery.length;
+ for (let i = 0; i < tile.data.imagery.length; ++i) {
+ if (tile.data.imagery[i].readyImagery.imageryLayer === layer2) {
+ indexOfFirstLayer2 = Math.min(indexOfFirstLayer2, i);
+ indexOfLastLayer2 = i;
+ } else {
+ expect(tile.data.imagery[i].readyImagery.imageryLayer).toEqual(
+ layer1
+ );
+ indexOfFirstLayer1 = Math.min(indexOfFirstLayer1, i);
}
- expect(indexOfFirstLayer2).toBeLessThan(indexOfFirstLayer1);
- expect(indexOfLastLayer2).toBeLessThan(indexOfFirstLayer1);
- },
- );
+ }
+ expect(indexOfFirstLayer2).toBeLessThan(indexOfFirstLayer1);
+ expect(indexOfLastLayer2).toBeLessThan(indexOfFirstLayer1);
+ });
});
it("adding a layer creates its skeletons only once", async function () {
const provider1 = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
scene.imageryLayers.addImageryProvider(provider1);
await updateUntilDone(scene.globe);
// Add another layer
const provider2 = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Green4x4.png",
+ "Data/Images/Green4x4.png"
);
const layer2 = scene.imageryLayers.addImageryProvider(provider2);
await updateUntilDone(scene.globe);
// All tiles should have one or more associated images.
- forEachRenderedTile(
- scene.globe._surface,
- 1,
- undefined,
- function (tile) {
- expect(tile.data.imagery.length).toBeGreaterThan(0);
- let tilesFromLayer2 = 0;
- for (let i = 0; i < tile.data.imagery.length; ++i) {
- let imageryTile = tile.data.imagery[i].readyImagery;
- if (!defined(imageryTile)) {
- imageryTile = tile.data.imagery[i].loadingImagery;
- }
- if (imageryTile.imageryLayer === layer2) {
- ++tilesFromLayer2;
- }
+ forEachRenderedTile(scene.globe._surface, 1, undefined, function (
+ tile
+ ) {
+ expect(tile.data.imagery.length).toBeGreaterThan(0);
+ let tilesFromLayer2 = 0;
+ for (let i = 0; i < tile.data.imagery.length; ++i) {
+ let imageryTile = tile.data.imagery[i].readyImagery;
+ if (!defined(imageryTile)) {
+ imageryTile = tile.data.imagery[i].loadingImagery;
}
- expect(tilesFromLayer2).toBe(1);
- },
- );
+ if (imageryTile.imageryLayer === layer2) {
+ ++tilesFromLayer2;
+ }
+ }
+ expect(tilesFromLayer2).toBe(1);
+ });
});
it("calling _reload adds a callback per layer per tile", async function () {
const provider1 = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
const layer1 = scene.imageryLayers.addImageryProvider(provider1);
const provider2 = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Green4x4.png",
+ "Data/Images/Green4x4.png"
);
const layer2 = scene.imageryLayers.addImageryProvider(provider2);
await updateUntilDone(scene.globe);
// Verify that each tile has 2 imagery objects and no loaded callbacks
- forEachRenderedTile(
- scene.globe._surface,
- 1,
- undefined,
- function (tile) {
- expect(tile.data.imagery.length).toBe(2);
- expect(Object.keys(tile._loadedCallbacks).length).toBe(0);
- },
- );
+ forEachRenderedTile(scene.globe._surface, 1, undefined, function (
+ tile
+ ) {
+ expect(tile.data.imagery.length).toBe(2);
+ expect(Object.keys(tile._loadedCallbacks).length).toBe(0);
+ });
// Reload each layer
layer1._imageryProvider._reload();
@@ -369,43 +348,37 @@ describe(
// Verify that each tile has 4 imagery objects (the old imagery and the reloaded imagery for each layer)
// and also has 2 callbacks so the old imagery will be removed once loaded.
- forEachRenderedTile(
- scene.globe._surface,
- 1,
- undefined,
- function (tile) {
- expect(tile.data.imagery.length).toBe(4);
- expect(Object.keys(tile._loadedCallbacks).length).toBe(2);
- },
- );
+ forEachRenderedTile(scene.globe._surface, 1, undefined, function (
+ tile
+ ) {
+ expect(tile.data.imagery.length).toBe(4);
+ expect(Object.keys(tile._loadedCallbacks).length).toBe(2);
+ });
await updateUntilDone(scene.globe);
// Verify the old imagery was removed and the callbacks are no longer there
- forEachRenderedTile(
- scene.globe._surface,
- 1,
- undefined,
- function (tile) {
- expect(tile.data.imagery.length).toBe(2);
- expect(Object.keys(tile._loadedCallbacks).length).toBe(0);
- },
- );
+ forEachRenderedTile(scene.globe._surface, 1, undefined, function (
+ tile
+ ) {
+ expect(tile.data.imagery.length).toBe(2);
+ expect(Object.keys(tile._loadedCallbacks).length).toBe(0);
+ });
});
},
- "WebGL",
+ "WebGL"
);
it("renders in 2D geographic", async function () {
expect(scene).toRender([0, 0, 0, 255]);
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
scene.imageryLayers.addImageryProvider(provider);
switchViewMode(
SceneMode.SCENE2D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
await updateUntilDone(scene.globe);
@@ -416,13 +389,13 @@ describe(
expect(scene).toRender([0, 0, 0, 255]);
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
scene.imageryLayers.addImageryProvider(provider);
switchViewMode(
SceneMode.SCENE2D,
- new WebMercatorProjection(Ellipsoid.WGS84),
+ new WebMercatorProjection(Ellipsoid.WGS84)
);
await updateUntilDone(scene.globe);
@@ -433,13 +406,13 @@ describe(
expect(scene).toRender([0, 0, 0, 255]);
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
scene.imageryLayers.addImageryProvider(provider);
switchViewMode(
SceneMode.COLUMBUS_VIEW,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
await updateUntilDone(scene.globe);
@@ -450,13 +423,13 @@ describe(
expect(scene).toRender([0, 0, 0, 255]);
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
scene.imageryLayers.addImageryProvider(provider);
switchViewMode(
SceneMode.COLUMBUS_VIEW,
- new WebMercatorProjection(Ellipsoid.WGS84),
+ new WebMercatorProjection(Ellipsoid.WGS84)
);
await updateUntilDone(scene.globe);
@@ -467,13 +440,13 @@ describe(
expect(scene).toRender([0, 0, 0, 255]);
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
scene.imageryLayers.addImageryProvider(provider);
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
await updateUntilDone(scene.globe);
@@ -484,13 +457,13 @@ describe(
expect(scene).toRender([0, 0, 0, 255]);
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
scene.imageryLayers.addImageryProvider(provider);
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
await updateUntilDone(scene.globe);
@@ -503,20 +476,20 @@ describe(
expect(scene).toRenderAndCall((rgba) => (renderedRed = rgba[0]));
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
const layer = scene.imageryLayers.addImageryProvider(provider);
await updateUntilDone(scene.globe);
expect(scene).toRenderAndCall((rgba) =>
- expect(rgba[0]).toBeGreaterThan(renderedRed),
+ expect(rgba[0]).toBeGreaterThan(renderedRed)
);
layer.show = false;
await updateUntilDone(scene.globe);
expect(scene).toRenderAndCall((rgba) =>
- expect(rgba[0]).toEqual(renderedRed),
+ expect(rgba[0]).toEqual(renderedRed)
);
});
@@ -528,7 +501,7 @@ describe(
"Data/Images/Red16x16.png",
{
credit: imageryCredit,
- },
+ }
);
const layer = scene.imageryLayers.addImageryProvider(provider);
@@ -537,13 +510,13 @@ describe(
const creditDisplay = scene.frameState.creditDisplay;
creditDisplay.showLightbox();
expect(
- creditDisplay._currentFrameCredits.lightboxCredits.values,
+ creditDisplay._currentFrameCredits.lightboxCredits.values
).toContain(new CreditDisplayElement(imageryCredit));
layer.show = false;
await updateUntilDone(scene.globe);
expect(
- creditDisplay._currentFrameCredits.lightboxCredits.values,
+ creditDisplay._currentFrameCredits.lightboxCredits.values
).not.toContain(new CreditDisplayElement(imageryCredit));
creditDisplay.hideLightbox();
@@ -553,14 +526,14 @@ describe(
it("culls tiles in full fog", async function () {
expect(scene).toRender([0, 0, 0, 255]);
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
scene.imageryLayers.addImageryProvider(provider);
const oldFog = scene.fog;
scene.fog = new Fog();
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
scene.camera.lookUp(1.2); // Horizon-view
@@ -579,14 +552,14 @@ describe(
it("culls tiles but does not render fog visuals when renderable is false", async function () {
expect(scene).toRender([0, 0, 0, 255]);
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
scene.imageryLayers.addImageryProvider(provider);
const oldFog = scene.fog;
scene.fog = new Fog();
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
scene.camera.lookUp(1.2); // Horizon-view
@@ -613,14 +586,14 @@ describe(
it("culls tiles because of increased SSE", async function () {
expect(scene).toRender([0, 0, 0, 255]);
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
scene.imageryLayers.addImageryProvider(provider);
const oldFog = scene.fog;
scene.fog = new Fog();
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
scene.camera.lookUp(1.2); // Horizon-view
@@ -650,7 +623,7 @@ describe(
scene.fog.enabled = false;
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
return updateUntilDone(scene.globe).then(function () {
@@ -660,12 +633,12 @@ describe(
it("renders in 3D and then Columbus View", async function () {
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
scene.imageryLayers.addImageryProvider(provider);
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
await updateUntilDone(scene.globe);
@@ -673,7 +646,7 @@ describe(
switchViewMode(
SceneMode.COLUMBUS_VIEW,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
await updateUntilDone(scene.globe);
@@ -691,7 +664,7 @@ describe(
scene.imageryLayers.addImageryProvider(providerWithInvalidRootTiles);
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
return updateUntilDone(scene.globe).then(function () {
@@ -703,7 +676,7 @@ describe(
expect(scene).toRender([0, 0, 0, 255]);
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
const layer = scene.imageryLayers.addImageryProvider(provider);
@@ -719,7 +692,7 @@ describe(
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
await updateUntilDone(scene.globe);
@@ -756,14 +729,14 @@ describe(
expect(scene).toRender([0, 0, 0, 255]);
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
const layer = scene.imageryLayers.addImageryProvider(provider);
layer.cutoutRectangle = cameraDestination;
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
let baseColor;
@@ -785,13 +758,13 @@ describe(
expect(scene).toRender([0, 0, 0, 255]);
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
const layer = scene.imageryLayers.addImageryProvider(provider);
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
let layerColor;
@@ -829,7 +802,7 @@ describe(
it("skips layer with uniform alpha value of zero", async function () {
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
const layer = scene.imageryLayers.addImageryProvider(provider);
@@ -837,7 +810,7 @@ describe(
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
await updateUntilDone(scene.globe);
@@ -864,7 +837,7 @@ describe(
it("can render more imagery layers than the available texture units", async function () {
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
for (let i = 0; i < ContextLimits.maximumTextureImageUnits + 1; ++i) {
scene.imageryLayers.addImageryProvider(provider);
@@ -872,7 +845,7 @@ describe(
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
await updateUntilDone(scene.globe);
@@ -896,12 +869,12 @@ describe(
// The first draw command for each tile should use a non-alpha-blending render state.
expect(command.renderState.blending).not.toEqual(
- renderStateWithAlphaBlending.blending,
+ renderStateWithAlphaBlending.blending
);
} else {
// Successive draw commands per tile should alpha blend.
expect(command.renderState.blending).toEqual(
- renderStateWithAlphaBlending.blending,
+ renderStateWithAlphaBlending.blending
);
expect(command.uniformMap.u_initialColor().w).toEqual(0.0);
}
@@ -929,7 +902,7 @@ describe(
"Data/Images/Red16x16.png",
{
credit: imageryCredit,
- },
+ }
);
scene.imageryLayers.addImageryProvider(provider);
@@ -943,7 +916,7 @@ describe(
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
if (defined(url.match(/\/\d+\/\d+\/\d+\.terrain/))) {
Resource._DefaultImplementations.loadWithXhr(
@@ -952,7 +925,7 @@ describe(
method,
data,
headers,
- deferred,
+ deferred
);
return;
}
@@ -964,24 +937,24 @@ describe(
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
};
scene.terrainProvider = await CesiumTerrainProvider.fromUrl(
"Data/CesiumTerrainTileJson/QuantizedMesh.tile.json",
{
credit: terrainCredit,
- },
+ }
);
await updateUntilDone(scene.globe);
const creditDisplay = scene.frameState.creditDisplay;
creditDisplay.showLightbox();
expect(
- creditDisplay._currentFrameCredits.lightboxCredits.values,
+ creditDisplay._currentFrameCredits.lightboxCredits.values
).toContain(new CreditDisplayElement(imageryCredit));
expect(
- creditDisplay._currentFrameCredits.lightboxCredits.values,
+ creditDisplay._currentFrameCredits.lightboxCredits.values
).toContain(new CreditDisplayElement(terrainCredit));
creditDisplay.hideLightbox();
});
@@ -996,8 +969,7 @@ describe(
expect(replacementQueue.count).toBeGreaterThan(0);
const oldTile = replacementQueue.head;
- surface.tileProvider.terrainProvider =
- new EllipsoidTerrainProvider();
+ surface.tileProvider.terrainProvider = new EllipsoidTerrainProvider();
scene.renderForSpecs();
@@ -1048,7 +1020,7 @@ describe(
expect(levelZeroTiles[1]).toBe(levelZero1);
});
},
- "WebGL",
+ "WebGL"
);
it("renders back side of globe when camera is near the poles", function () {
@@ -1056,27 +1028,27 @@ describe(
camera.position = new Cartesian3(
2909078.1077849553,
-38935053.40234136,
- -63252400.94628872,
+ -63252400.94628872
);
camera.direction = new Cartesian3(
-0.03928753135806185,
0.44884096070717633,
- 0.8927476025569903,
+ 0.8927476025569903
);
camera.up = new Cartesian3(
0.00002847975895320034,
-0.8934368803055558,
- 0.4491887577613425,
+ 0.4491887577613425
);
camera.right = new Cartesian3(
0.99922794650124,
0.017672942642764363,
- 0.03508814656908402,
+ 0.03508814656908402
);
scene.cullingVolume = camera.frustum.computeCullingVolume(
camera.position,
camera.direction,
- camera.up,
+ camera.up
);
return updateUntilDone(scene.globe).then(function () {
@@ -1096,7 +1068,7 @@ describe(
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
return updateUntilDone(scene.globe).then(function () {
@@ -1128,7 +1100,7 @@ describe(
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
return updateUntilDone(scene.globe).then(function () {
@@ -1162,7 +1134,7 @@ describe(
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
return updateUntilDone(scene.globe).then(function () {
@@ -1196,7 +1168,7 @@ describe(
const globe = scene.globe;
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
return updateUntilDone(globe).then(function () {
@@ -1212,7 +1184,7 @@ describe(
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
return updateUntilDone(globe).then(function () {
@@ -1231,7 +1203,7 @@ describe(
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
return updateUntilDone(globe).then(function () {
@@ -1250,7 +1222,7 @@ describe(
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
return updateUntilDone(globe).then(function () {
@@ -1280,7 +1252,7 @@ describe(
const model = scene.primitives.add(
await Model.fromGltfAsync({
url: "./Data/Models/glTF-2.0/BoxTextured/glTF/BoxTextured.gltf",
- }),
+ })
);
model.clippingPlanes = clippingPlanes;
const globe = scene.globe;
@@ -1292,9 +1264,16 @@ describe(
describe("clippingPolygons", () => {
const positions = Cartesian3.fromRadiansArray([
- -1.3194369277314022, 0.6988062530900625, -1.31941, 0.69879,
- -1.3193955980204217, 0.6988091578771254, -1.3193931220959367,
- 0.698743632490865, -1.3194358224045408, 0.6987471965556998,
+ -1.3194369277314022,
+ 0.6988062530900625,
+ -1.31941,
+ 0.69879,
+ -1.3193955980204217,
+ 0.6988091578771254,
+ -1.3193931220959367,
+ 0.698743632490865,
+ -1.3194358224045408,
+ 0.6987471965556998,
]);
let polygon;
@@ -1311,7 +1290,7 @@ describe(
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
await updateUntilDone(scene.globe);
@@ -1345,7 +1324,7 @@ describe(
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
await updateUntilDone(scene.globe);
@@ -1358,9 +1337,14 @@ describe(
});
const positionsB = Cartesian3.fromDegreesArray([
- 153.033834435422932, -27.569622925766826, 153.033836082527984,
- -27.569616899897252, 153.033905701988772, -27.569628939963906,
- 153.033999779170614, -27.569639093357882,
+ 153.033834435422932,
+ -27.569622925766826,
+ 153.033836082527984,
+ -27.569616899897252,
+ 153.033905701988772,
+ -27.569628939963906,
+ 153.033999779170614,
+ -27.569639093357882,
]);
scene.globe.clippingPolygons = new ClippingPolygonCollection({
@@ -1389,7 +1373,7 @@ describe(
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
await updateUntilDone(globe);
@@ -1410,7 +1394,7 @@ describe(
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
await updateUntilDone(globe);
@@ -1431,7 +1415,7 @@ describe(
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
await updateUntilDone(globe);
@@ -1459,7 +1443,7 @@ describe(
const model = scene.primitives.add(
await Model.fromGltfAsync({
url: "./Data/Models/glTF-2.0/BoxTextured/glTF/BoxTextured.gltf",
- }),
+ })
);
model.clippingPolygons = collection;
const globe = scene.globe;
@@ -1474,7 +1458,7 @@ describe(
expect(scene).toRender([0, 0, 0, 255]);
switchViewMode(
SceneMode.COLUMBUS_VIEW,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
let result;
return updateUntilDone(scene.globe)
@@ -1488,7 +1472,7 @@ describe(
-2,
-2,
-1,
- -1,
+ -1
);
expect(scene).notToRender(result);
scene.camera.setView({
@@ -1504,14 +1488,14 @@ describe(
it("cartographicLimitRectangle defaults to Rectangle.MAX_VALUE", function () {
scene.globe.cartographicLimitRectangle = undefined;
expect(
- scene.globe.cartographicLimitRectangle.equals(Rectangle.MAX_VALUE),
+ scene.globe.cartographicLimitRectangle.equals(Rectangle.MAX_VALUE)
).toBe(true);
});
it("cartographicLimitRectangle culls tiles outside the region", function () {
switchViewMode(
SceneMode.COLUMBUS_VIEW,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
let unculledCommandCount;
return updateUntilDone(scene.globe)
@@ -1521,13 +1505,13 @@ describe(
-2,
-2,
-1,
- -1,
+ -1
);
return updateUntilDone(scene.globe);
})
.then(function () {
expect(unculledCommandCount).toBeGreaterThan(
- scene.frameState.commandList.length,
+ scene.frameState.commandList.length
);
});
});
@@ -1535,7 +1519,7 @@ describe(
it("cartographicLimitRectangle may cross the antimeridian", function () {
switchViewMode(
SceneMode.SCENE2D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
let unculledCommandCount;
return updateUntilDone(scene.globe)
@@ -1545,13 +1529,13 @@ describe(
179,
-2,
-179,
- -1,
+ -1
);
return updateUntilDone(scene.globe);
})
.then(function () {
expect(unculledCommandCount).toBeGreaterThan(
- scene.frameState.commandList.length,
+ scene.frameState.commandList.length
);
});
});
@@ -1559,14 +1543,14 @@ describe(
it("disables skirts and enables back face culling when camera is underground", function () {
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
return updateUntilDone(scene.globe)
.then(function () {
const command = scene.frameState.commandList[0];
expect(command.count).toBe(
- command.owner.data.renderedMesh.indices.length,
+ command.owner.data.renderedMesh.indices.length
); // Has skirts
expect(command.renderState.cull.enabled).toBe(true); // Has back face culling
@@ -1575,12 +1559,12 @@ describe(
destination: new Cartesian3(
-746658.0557573901,
-5644191.0002196245,
- 2863585.099969967,
+ 2863585.099969967
),
orientation: new HeadingPitchRoll(
0.3019699121236403,
0.07316306869231592,
- 0.0007089903642230055,
+ 0.0007089903642230055
),
});
return updateUntilDone(scene.globe);
@@ -1588,7 +1572,7 @@ describe(
.then(function () {
const command = scene.frameState.commandList[0];
expect(command.count).toBe(
- command.owner.data.renderedMesh.indexCountWithoutSkirts,
+ command.owner.data.renderedMesh.indexCountWithoutSkirts
); // No skirts
expect(command.renderState.cull.enabled).toBe(false); // No back face culling
});
@@ -1597,7 +1581,7 @@ describe(
it("Detects change in vertical exaggeration", function () {
switchViewMode(
SceneMode.SCENE3D,
- new GeographicProjection(Ellipsoid.WGS84),
+ new GeographicProjection(Ellipsoid.WGS84)
);
scene.camera.flyHome(0.0);
@@ -1605,58 +1589,48 @@ describe(
scene.verticalExaggerationRelativeHeight = 0.0;
return updateUntilDone(scene.globe).then(function () {
- forEachRenderedTile(
- scene.globe._surface,
- 1,
- undefined,
- function (tile) {
- const surfaceTile = tile.data;
- const encoding = surfaceTile.mesh.encoding;
- const boundingSphere =
- surfaceTile.tileBoundingRegion.boundingSphere;
- expect(encoding.exaggeration).toEqual(1.0);
- expect(encoding.hasGeodeticSurfaceNormals).toEqual(false);
- expect(boundingSphere.radius).toBeLessThan(7000000.0);
- },
- );
+ forEachRenderedTile(scene.globe._surface, 1, undefined, function (
+ tile
+ ) {
+ const surfaceTile = tile.data;
+ const encoding = surfaceTile.mesh.encoding;
+ const boundingSphere = surfaceTile.tileBoundingRegion.boundingSphere;
+ expect(encoding.exaggeration).toEqual(1.0);
+ expect(encoding.hasGeodeticSurfaceNormals).toEqual(false);
+ expect(boundingSphere.radius).toBeLessThan(7000000.0);
+ });
scene.verticalExaggeration = 2.0;
scene.verticalExaggerationRelativeHeight = -1000000.0;
return updateUntilDone(scene.globe).then(function () {
- forEachRenderedTile(
- scene.globe._surface,
- 1,
- undefined,
- function (tile) {
- const surfaceTile = tile.data;
- const encoding = surfaceTile.mesh.encoding;
- const boundingSphere =
- surfaceTile.tileBoundingRegion.boundingSphere;
- expect(encoding.exaggeration).toEqual(2.0);
- expect(encoding.hasGeodeticSurfaceNormals).toEqual(true);
- expect(boundingSphere.radius).toBeGreaterThan(7000000.0);
- },
- );
+ forEachRenderedTile(scene.globe._surface, 1, undefined, function (
+ tile
+ ) {
+ const surfaceTile = tile.data;
+ const encoding = surfaceTile.mesh.encoding;
+ const boundingSphere =
+ surfaceTile.tileBoundingRegion.boundingSphere;
+ expect(encoding.exaggeration).toEqual(2.0);
+ expect(encoding.hasGeodeticSurfaceNormals).toEqual(true);
+ expect(boundingSphere.radius).toBeGreaterThan(7000000.0);
+ });
scene.verticalExaggeration = 1.0;
scene.verticalExaggerationRelativeHeight = 0.0;
return updateUntilDone(scene.globe).then(function () {
- forEachRenderedTile(
- scene.globe._surface,
- 1,
- undefined,
- function (tile) {
- const surfaceTile = tile.data;
- const encoding = surfaceTile.mesh.encoding;
- const boundingSphere =
- surfaceTile.tileBoundingRegion.boundingSphere;
- expect(encoding.exaggeration).toEqual(1.0);
- expect(encoding.hasGeodeticSurfaceNormals).toEqual(false);
- expect(boundingSphere.radius).toBeLessThan(7000000.0);
- },
- );
+ forEachRenderedTile(scene.globe._surface, 1, undefined, function (
+ tile
+ ) {
+ const surfaceTile = tile.data;
+ const encoding = surfaceTile.mesh.encoding;
+ const boundingSphere =
+ surfaceTile.tileBoundingRegion.boundingSphere;
+ expect(encoding.exaggeration).toEqual(1.0);
+ expect(encoding.hasGeodeticSurfaceNormals).toEqual(false);
+ expect(boundingSphere.radius).toBeLessThan(7000000.0);
+ });
});
});
});
@@ -1671,7 +1645,7 @@ describe(
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
if (defined(url.match(/\/\d+\/\d+\/\d+\.terrain/))) {
Resource._DefaultImplementations.loadWithXhr(
@@ -1680,7 +1654,7 @@ describe(
method,
data,
headers,
- deferred,
+ deferred
);
return;
}
@@ -1692,14 +1666,14 @@ describe(
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
};
scene.terrainProvider = await CesiumTerrainProvider.fromUrl(
"Data/CesiumTerrainTileJson/QuantizedMesh.tile.json",
{
requestWaterMask: true,
- },
+ }
);
scene.globe.showWaterEffect = false;
@@ -1708,5 +1682,5 @@ describe(
expect(scene.globe._surface.tileProvider.hasWaterMask).toBeTrue();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/GlobeSurfaceTileSpec.js b/packages/engine/Specs/Scene/GlobeSurfaceTileSpec.js
index 3f9f2cf6c013..10a31d4201da 100644
--- a/packages/engine/Specs/Scene/GlobeSurfaceTileSpec.js
+++ b/packages/engine/Specs/Scene/GlobeSurfaceTileSpec.js
@@ -45,7 +45,7 @@ describe("Scene/GlobeSurfaceTile", function () {
processor = new TerrainTileProcessor(
frameState,
mockTerrain,
- imageryLayerCollection,
+ imageryLayerCollection
);
});
@@ -72,10 +72,10 @@ describe("Scene/GlobeSurfaceTile", function () {
return processor.process([rootTile.southwestChild]).then(function () {
expect(rootTile.southwestChild.state).toBe(
- QuadtreeTileLoadState.LOADING,
+ QuadtreeTileLoadState.LOADING
);
expect(rootTile.southwestChild.data.terrainState).toBe(
- TerrainState.UNLOADED,
+ TerrainState.UNLOADED
);
});
});
@@ -85,10 +85,10 @@ describe("Scene/GlobeSurfaceTile", function () {
return processor.process([rootTile.southwestChild]).then(function () {
expect(rootTile.southwestChild.state).toBe(
- QuadtreeTileLoadState.LOADING,
+ QuadtreeTileLoadState.LOADING
);
expect(rootTile.southwestChild.data.terrainState).toBe(
- TerrainState.FAILED,
+ TerrainState.FAILED
);
});
});
@@ -135,7 +135,7 @@ describe("Scene/GlobeSurfaceTile", function () {
expect(TileProviderError.reportError.calls.count()).toBe(1);
// Test that message argument is defined.
expect(TileProviderError.reportError.calls.argsFor(0)[3]).toContain(
- "RuntimeError: requestTileGeometry failed as requested.",
+ "RuntimeError: requestTileGeometry failed as requested."
);
});
});
@@ -151,10 +151,10 @@ describe("Scene/GlobeSurfaceTile", function () {
.process([rootTile, rootTile.southwestChild])
.then(function () {
expect(rootTile.data.terrainData.wasCreatedByUpsampling()).toBe(
- false,
+ false
);
expect(
- rootTile.southwestChild.data.terrainData.wasCreatedByUpsampling(),
+ rootTile.southwestChild.data.terrainData.wasCreatedByUpsampling()
).toBe(true);
});
});
@@ -196,7 +196,7 @@ describe("Scene/GlobeSurfaceTile", function () {
expect(rootTile.state).toBe(QuadtreeTileLoadState.DONE);
expect(rootTile.upsampledFromParent).toBe(false);
expect(rootTile.southwestChild.state).toBe(
- QuadtreeTileLoadState.DONE,
+ QuadtreeTileLoadState.DONE
);
expect(rootTile.southwestChild.upsampledFromParent).toBe(true);
});
@@ -224,7 +224,7 @@ describe("Scene/GlobeSurfaceTile", function () {
expect(rootTile.state).toBe(QuadtreeTileLoadState.DONE);
expect(rootTile.upsampledFromParent).toBe(false);
expect(rootTile.southwestChild.state).toBe(
- QuadtreeTileLoadState.DONE,
+ QuadtreeTileLoadState.DONE
);
expect(rootTile.southwestChild.upsampledFromParent).toBe(false);
});
@@ -252,7 +252,7 @@ describe("Scene/GlobeSurfaceTile", function () {
expect(rootTile.state).toBe(QuadtreeTileLoadState.DONE);
expect(rootTile.upsampledFromParent).toBe(false);
expect(rootTile.southwestChild.state).toBe(
- QuadtreeTileLoadState.DONE,
+ QuadtreeTileLoadState.DONE
);
expect(rootTile.southwestChild.upsampledFromParent).toBe(false);
});
@@ -290,7 +290,7 @@ describe("Scene/GlobeSurfaceTile", function () {
.process([rootTile, rootTile.southwestChild])
.then(function () {
expect(rootTile.data.waterMaskTexture).toBe(
- rootTile.southwestChild.data.waterMaskTexture,
+ rootTile.southwestChild.data.waterMaskTexture
);
});
});
@@ -316,7 +316,7 @@ describe("Scene/GlobeSurfaceTile", function () {
.then(function () {
expect(rootTile.southwestChild.data.waterMaskTexture).toBeDefined();
expect(
- rootTile.southwestChild.data.waterMaskTranslationAndScale,
+ rootTile.southwestChild.data.waterMaskTranslationAndScale
).toEqual(new Cartesian4(0.0, 0.0, 0.5, 0.5));
});
});
@@ -356,17 +356,18 @@ describe("Scene/GlobeSurfaceTile", function () {
new Cartesian3(
-5052039.459789615,
2561172.040315167,
- -2936276.999965875,
+ -2936276.999965875
),
new Cartesian3(
0.5036332963145244,
0.6648033332898124,
- 0.5517155343926082,
- ),
+ 0.5517155343926082
+ )
);
const pickResult = tile.data.pick(ray, undefined, undefined, true);
- const cartographic =
- Ellipsoid.WGS84.cartesianToCartographic(pickResult);
+ const cartographic = Ellipsoid.WGS84.cartesianToCartographic(
+ pickResult
+ );
expect(cartographic.height).toBeGreaterThan(-500.0);
});
@@ -395,7 +396,7 @@ describe("Scene/GlobeSurfaceTile", function () {
ray,
undefined,
undefined,
- cullBackFaces,
+ cullBackFaces
);
expect(pickResult.x).toBeGreaterThan(0.0);
});
@@ -424,13 +425,13 @@ describe("Scene/GlobeSurfaceTile", function () {
ray,
undefined,
undefined,
- cullBackFaces,
+ cullBackFaces
);
expect(pickResult.x).toBeGreaterThan(0.0);
});
});
},
- "WebGL",
+ "WebGL"
);
describe("eligibleForUnloading", function () {
diff --git a/packages/engine/Specs/Scene/GlobeTranslucencyFramebufferSpec.js b/packages/engine/Specs/Scene/GlobeTranslucencyFramebufferSpec.js
index 8ce1b8ad8502..97b58d8bef0f 100644
--- a/packages/engine/Specs/Scene/GlobeTranslucencyFramebufferSpec.js
+++ b/packages/engine/Specs/Scene/GlobeTranslucencyFramebufferSpec.js
@@ -54,7 +54,7 @@ describe("Scene/GlobeTranslucencyFramebuffer", function () {
globeTranslucency.packedDepthFramebuffer;
expect(globeTranslucency._clearCommand.framebuffer).toBe(firstFramebuffer);
expect(globeTranslucency._packedDepthCommand.framebuffer).toBe(
- firstPackedDepthFramebuffer,
+ firstPackedDepthFramebuffer
);
viewport.width = 50;
@@ -62,10 +62,10 @@ describe("Scene/GlobeTranslucencyFramebuffer", function () {
expect(firstColorTexture.isDestroyed()).toBe(true);
expect(globeTranslucency._colorTexture).not.toBe(firstColorTexture);
expect(globeTranslucency._clearCommand.framebuffer).not.toBe(
- firstFramebuffer,
+ firstFramebuffer
);
expect(globeTranslucency._packedDepthCommand.framebuffer).not.toBe(
- firstPackedDepthFramebuffer,
+ firstPackedDepthFramebuffer
);
});
@@ -89,7 +89,7 @@ describe("Scene/GlobeTranslucencyFramebuffer", function () {
expect(firstColorTexture.isDestroyed()).toBe(true);
expect(globeTranslucency.classificationTexture).not.toBe(firstColorTexture);
expect(globeTranslucency.classificationTexture.pixelDatatype).toBe(
- expectedPixelDatatype,
+ expectedPixelDatatype
);
});
diff --git a/packages/engine/Specs/Scene/GlobeTranslucencyStateSpec.js b/packages/engine/Specs/Scene/GlobeTranslucencyStateSpec.js
index 540d2507e52d..c5a55ddcb988 100644
--- a/packages/engine/Specs/Scene/GlobeTranslucencyStateSpec.js
+++ b/packages/engine/Specs/Scene/GlobeTranslucencyStateSpec.js
@@ -130,7 +130,7 @@ describe("Scene/GlobeTranslucencyState", function () {
0.0,
0.5,
1.0,
- 0.75,
+ 0.75
);
state.update(scene);
expect(frontFaceAlphaByDistance.nearValue).toBe(0.25);
@@ -630,16 +630,16 @@ describe("Scene/GlobeTranslucencyState", function () {
executeCommand,
framebuffer,
scene,
- passState,
+ passState
);
expect(executeCommand).toHaveBeenCalledWith(
command.derivedCommands.globeTranslucency.opaqueBackFaceCommand,
scene,
- passState,
+ passState
);
expect(
- GlobeTranslucencyFramebuffer.prototype.clearClassification,
+ GlobeTranslucencyFramebuffer.prototype.clearClassification
).toHaveBeenCalled();
});
@@ -655,7 +655,7 @@ describe("Scene/GlobeTranslucencyState", function () {
executeCommand,
framebuffer,
scene,
- passState,
+ passState
);
expect(executeCommand).not.toHaveBeenCalled();
@@ -684,8 +684,9 @@ describe("Scene/GlobeTranslucencyState", function () {
const frustumCommands = new FrustumCommands();
frustumCommands.commands[Pass.GLOBE] = globeCommands;
frustumCommands.indices[Pass.GLOBE] = globeCommands.length;
- frustumCommands.commands[Pass.TERRAIN_CLASSIFICATION] =
- classificationCommands;
+ frustumCommands.commands[
+ Pass.TERRAIN_CLASSIFICATION
+ ] = classificationCommands;
frustumCommands.indices[Pass.TERRAIN_CLASSIFICATION] =
classificationCommands.length;
@@ -694,23 +695,23 @@ describe("Scene/GlobeTranslucencyState", function () {
executeCommand,
framebuffer,
scene,
- passState,
+ passState
);
expect(executeCommand).toHaveBeenCalledWith(
classificationCommand,
scene,
- passState,
+ passState
);
expect(executeCommand).toHaveBeenCalledWith(
command.derivedCommands.globeTranslucency.depthOnlyFrontFaceCommand,
scene,
- passState,
+ passState
);
if (context.depthTexture) {
expect(
- GlobeTranslucencyFramebuffer.prototype.packDepth,
+ GlobeTranslucencyFramebuffer.prototype.packDepth
).toHaveBeenCalled();
}
});
diff --git a/packages/engine/Specs/Scene/GltfBufferViewLoaderSpec.js b/packages/engine/Specs/Scene/GltfBufferViewLoaderSpec.js
index 072d77c113f4..97fb9610212e 100644
--- a/packages/engine/Specs/Scene/GltfBufferViewLoaderSpec.js
+++ b/packages/engine/Specs/Scene/GltfBufferViewLoaderSpec.js
@@ -92,7 +92,7 @@ describe("Scene/GltfBufferViewLoader", function () {
const meshoptPositionBufferBase64 =
"oAUZJkCZgAQAAAU/P8D/fn1+fX59fn1+fX7ADAAAfX4FAAhISEgAAAAFAAzMzH1+fX59zAAAAH59BQhAmYBmZgAABQzA/8B9fn1+fX59//8AAH59fn1+fX59AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8//z8AAA==";
const meshoptPositionTypedArray = getTypedArrayFromBase64(
- meshoptPositionBufferBase64,
+ meshoptPositionBufferBase64
);
const bufferTypedArray = new Uint8Array([1, 3, 7, 15, 31, 63, 127, 255]);
@@ -169,7 +169,7 @@ describe("Scene/GltfBufferViewLoader", function () {
it("load throws if buffer fails to load", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.callFake(() =>
- Promise.reject(new Error("404 Not Found")),
+ Promise.reject(new Error("404 Not Found"))
);
const bufferViewLoader = new GltfBufferViewLoader({
@@ -182,7 +182,7 @@ describe("Scene/GltfBufferViewLoader", function () {
await expectAsync(bufferViewLoader.load()).toBeRejectedWithError(
RuntimeError,
- "Failed to load buffer view\nFailed to load external buffer: https://example.com/external.bin\n404 Not Found",
+ "Failed to load buffer view\nFailed to load external buffer: https://example.com/external.bin\n404 Not Found"
);
});
@@ -210,7 +210,7 @@ describe("Scene/GltfBufferViewLoader", function () {
it("loads buffer view for external buffer", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(bufferArrayBuffer),
+ Promise.resolve(bufferArrayBuffer)
);
const bufferViewLoader = new GltfBufferViewLoader({
@@ -228,12 +228,12 @@ describe("Scene/GltfBufferViewLoader", function () {
it("destroys buffer view", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(bufferArrayBuffer),
+ Promise.resolve(bufferArrayBuffer)
);
const unloadBuffer = spyOn(
BufferLoader.prototype,
- "unload",
+ "unload"
).and.callThrough();
const bufferViewLoader = new GltfBufferViewLoader({
@@ -278,14 +278,14 @@ describe("Scene/GltfBufferViewLoader", function () {
await bufferViewLoader.load();
const decodedPositionBase64 = getBase64FromTypedArray(
- bufferViewLoader.typedArray,
+ bufferViewLoader.typedArray
);
expect(decodedPositionBase64).toEqual(fallbackPositionBufferBase64);
});
it("handles asynchronous load after destroy", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(bufferArrayBuffer),
+ Promise.resolve(bufferArrayBuffer)
);
const bufferViewLoader = new GltfBufferViewLoader({
@@ -308,7 +308,7 @@ describe("Scene/GltfBufferViewLoader", function () {
it("handles asynchronous error after destroy", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.callFake(() =>
- Promise.reject(new Error()),
+ Promise.reject(new Error())
);
const bufferViewLoader = new GltfBufferViewLoader({
diff --git a/packages/engine/Specs/Scene/GltfBuilder.js b/packages/engine/Specs/Scene/GltfBuilder.js
index adb10f2f1d89..7819df4ae663 100644
--- a/packages/engine/Specs/Scene/GltfBuilder.js
+++ b/packages/engine/Specs/Scene/GltfBuilder.js
@@ -96,10 +96,11 @@ GltfBuilder.prototype.toGltf = function () {
const byteLength = bufferBuilder.viewBuilders.reduce(function (
byteLength,
- viewBuilder,
+ viewBuilder
) {
return byteLength + viewBuilder.bufferView.byteLength;
- }, 0);
+ },
+ 0);
const buffer = new ArrayBuffer(byteLength);
let nextStart = 0;
@@ -342,8 +343,9 @@ GltfBufferBuilder.prototype.indexBuffer = function (name) {
function GltfBufferViewBuilder(bufferBuilder, bufferViewIndex, componentType) {
this.bufferBuilder = bufferBuilder;
this.bufferViewIndex = bufferViewIndex;
- this.bufferView =
- this.bufferBuilder.gltfBuilder.gltf.bufferViews[this.bufferViewIndex];
+ this.bufferView = this.bufferBuilder.gltfBuilder.gltf.bufferViews[
+ this.bufferViewIndex
+ ];
this.componentType = componentType;
this.elementStride = 0;
this.nextOffset = 0;
diff --git a/packages/engine/Specs/Scene/GltfDracoLoaderSpec.js b/packages/engine/Specs/Scene/GltfDracoLoaderSpec.js
index d6aada9505b2..4d99a8c995f4 100644
--- a/packages/engine/Specs/Scene/GltfDracoLoaderSpec.js
+++ b/packages/engine/Specs/Scene/GltfDracoLoaderSpec.js
@@ -215,13 +215,13 @@ describe(
await expectAsync(dracoLoader.load()).toBeRejectedWithError(
RuntimeError,
- "Failed to load Draco\nFailed to load buffer view\nFailed to load external buffer: https://example.com/external.bin\n404 Not Found",
+ "Failed to load Draco\nFailed to load buffer view\nFailed to load external buffer: https://example.com/external.bin\n404 Not Found"
);
});
it("process throws if draco decoding fails", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(bufferArrayBuffer),
+ Promise.resolve(bufferArrayBuffer)
);
spyOn(DracoLoader, "decodeBufferView").and.callFake(function () {
@@ -240,17 +240,17 @@ describe(
await dracoLoader.load();
await expectAsync(
- waitForLoaderProcess(dracoLoader, scene),
+ waitForLoaderProcess(dracoLoader, scene)
).toBeRejectedWithError(
RuntimeError,
- "Failed to load Draco\nDraco decode failed",
+ "Failed to load Draco\nDraco decode failed"
);
expect(() => loaderProcess(dracoLoader, scene)).not.toThrowError();
});
it("loads draco", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(bufferArrayBuffer),
+ Promise.resolve(bufferArrayBuffer)
);
// Simulate decodeBufferView not being ready for a few frames
@@ -276,25 +276,25 @@ describe(
expect(() => loaderProcess(dracoLoader, scene)).not.toThrowError();
expect(dracoLoader.decodedData.indices).toBe(
- decodeDracoResults.indexArray,
+ decodeDracoResults.indexArray
);
expect(dracoLoader.decodedData.vertexAttributes).toBe(
- decodeDracoResults.attributeData,
+ decodeDracoResults.attributeData
);
});
it("destroys draco loader", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(bufferArrayBuffer),
+ Promise.resolve(bufferArrayBuffer)
);
spyOn(DracoLoader, "decodeBufferView").and.returnValue(
- Promise.resolve(decodeDracoResults),
+ Promise.resolve(decodeDracoResults)
);
const unloadBufferView = spyOn(
GltfBufferViewLoader.prototype,
- "unload",
+ "unload"
).and.callThrough();
const dracoLoader = new GltfDracoLoader({
@@ -328,7 +328,7 @@ describe(
});
spyOn(DracoLoader, "decodeBufferView").and.returnValue(
- Promise.resolve(decodeDracoResults),
+ Promise.resolve(decodeDracoResults)
);
const dracoLoader = new GltfDracoLoader({
@@ -377,7 +377,7 @@ describe(
const decodeBufferView = spyOn(
DracoLoader,
- "decodeBufferView",
+ "decodeBufferView"
).and.callFake(function () {
return new Promise(function (resolve, reject) {
if (rejectPromise) {
@@ -406,5 +406,5 @@ describe(
return resolveDracoAfterDestroy(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/GltfImageLoaderSpec.js b/packages/engine/Specs/Scene/GltfImageLoaderSpec.js
index 81cfcd325559..ef1310a09c14 100644
--- a/packages/engine/Specs/Scene/GltfImageLoaderSpec.js
+++ b/packages/engine/Specs/Scene/GltfImageLoaderSpec.js
@@ -20,18 +20,18 @@ describe(
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=";
const pngBuffer = dataUriToBuffer(
- "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=",
+ "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII="
);
const jpgBuffer = dataUriToBuffer(
- "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAEBAREA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k",
+ "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAEBAREA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k"
);
const webpBuffer = dataUriToBuffer(
- "data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",
+ "data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"
);
const gifBuffer = dataUriToBuffer(
- "data:image/gif;base64,R0lGODdhBAAEAIAAAP///////ywAAAAABAAEAAACBISPCQUAOw==",
+ "data:image/gif;base64,R0lGODdhBAAEAIAAAP///////ywAAAAABAAEAAACBISPCQUAOw=="
);
let ktx2BasisBuffer;
@@ -186,13 +186,13 @@ describe(
await expectAsync(imageLoader.load()).toBeRejectedWithError(
RuntimeError,
- "Failed to load embedded image\nFailed to load buffer view\nFailed to load external buffer: https://example.com/external.bin\n404 Not Found",
+ "Failed to load embedded image\nFailed to load buffer view\nFailed to load external buffer: https://example.com/external.bin\n404 Not Found"
);
});
it("load throws if image format is not recognized", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(gifBuffer),
+ Promise.resolve(gifBuffer)
);
const imageLoader = new GltfImageLoader({
@@ -205,7 +205,7 @@ describe(
await expectAsync(imageLoader.load()).toBeRejectedWithError(
RuntimeError,
- "Failed to load embedded image\nImage format is not recognized",
+ "Failed to load embedded image\nImage format is not recognized"
);
});
@@ -225,13 +225,13 @@ describe(
await expectAsync(imageLoader.load()).toBeRejectedWithError(
RuntimeError,
- "Failed to load image: image.png\n404 Not Found",
+ "Failed to load image: image.png\n404 Not Found"
);
});
async function loadsFromBufferView(imageBuffer) {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(imageBuffer),
+ Promise.resolve(imageBuffer)
);
const imageLoader = new GltfImageLoader({
@@ -272,7 +272,7 @@ describe(
}
spyOn(BufferLoader, "_fetchArrayBuffer").and.returnValue(
- Promise.resolve(ktx2BasisBuffer),
+ Promise.resolve(ktx2BasisBuffer)
);
const imageLoader = new GltfImageLoader({
@@ -297,7 +297,7 @@ describe(
}
spyOn(BufferLoader, "_fetchArrayBuffer").and.returnValue(
- Promise.resolve(ktx2BasisMipmapBuffer),
+ Promise.resolve(ktx2BasisMipmapBuffer)
);
const imageLoader = new GltfImageLoader({
@@ -318,7 +318,7 @@ describe(
it("loads from uri", async function () {
spyOn(Resource.prototype, "fetchImage").and.returnValue(
- Promise.resolve(image),
+ Promise.resolve(image)
);
const imageLoader = new GltfImageLoader({
@@ -377,12 +377,12 @@ describe(
it("destroys image loader", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(pngBuffer),
+ Promise.resolve(pngBuffer)
);
const unloadBufferView = spyOn(
GltfBufferViewLoader.prototype,
- "unload",
+ "unload"
).and.callThrough();
const imageLoader = new GltfImageLoader({
@@ -415,7 +415,7 @@ describe(
} else {
resolve(pngBuffer);
}
- }),
+ })
);
const imageLoader = new GltfImageLoader({
@@ -447,7 +447,7 @@ describe(
async function resolveImageFromTypedArrayAfterDestroy(rejectPromise) {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(pngBuffer),
+ Promise.resolve(pngBuffer)
);
spyOn(GltfImageLoader, "_loadImageFromTypedArray").and.callFake(
@@ -458,7 +458,7 @@ describe(
} else {
resolve(image);
}
- }),
+ })
);
const imageLoader = new GltfImageLoader({
@@ -496,7 +496,7 @@ describe(
} else {
resolve(image);
}
- }),
+ })
);
const imageLoader = new GltfImageLoader({
@@ -526,5 +526,5 @@ describe(
return resolveUriAfterDestroy(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/GltfIndexBufferLoaderSpec.js b/packages/engine/Specs/Scene/GltfIndexBufferLoaderSpec.js
index 18baacf9f881..ecd36f1209d8 100644
--- a/packages/engine/Specs/Scene/GltfIndexBufferLoaderSpec.js
+++ b/packages/engine/Specs/Scene/GltfIndexBufferLoaderSpec.js
@@ -20,7 +20,14 @@ describe(
"Scene/GltfIndexBufferLoader",
function () {
const dracoBufferTypedArray = new Uint8Array([
- 1, 3, 7, 15, 31, 63, 127, 255,
+ 1,
+ 3,
+ 7,
+ 15,
+ 31,
+ 63,
+ 127,
+ 255,
]);
const dracoArrayBuffer = dracoBufferTypedArray.buffer;
@@ -344,7 +351,7 @@ describe(
it("load throws if buffer view fails to load", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.callFake(() =>
- Promise.reject(new Error("404 Not Found")),
+ Promise.reject(new Error("404 Not Found"))
);
const indexBufferLoader = new GltfIndexBufferLoader({
@@ -358,13 +365,13 @@ describe(
await expectAsync(indexBufferLoader.load()).toBeRejectedWithError(
RuntimeError,
- "Failed to load index buffer\nFailed to load buffer view\nFailed to load external buffer: https://example.com/external.bin\n404 Not Found",
+ "Failed to load index buffer\nFailed to load buffer view\nFailed to load external buffer: https://example.com/external.bin\n404 Not Found"
);
});
it("process throws if draco fails to load", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(dracoArrayBuffer),
+ Promise.resolve(dracoArrayBuffer)
);
spyOn(DracoLoader, "decodeBufferView").and.callFake(function () {
@@ -384,16 +391,16 @@ describe(
await indexBufferLoader.load();
await expectAsync(
- waitForLoaderProcess(indexBufferLoader, scene),
+ waitForLoaderProcess(indexBufferLoader, scene)
).toBeRejectedWithError(
RuntimeError,
- "Failed to load index buffer\nFailed to load Draco\nDraco decode failed",
+ "Failed to load index buffer\nFailed to load Draco\nDraco decode failed"
);
});
it("loads from accessor into buffer", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
// Simulate JobScheduler not being ready for a few frames
@@ -401,14 +408,15 @@ describe(
let processCallsCount = 0;
const jobScheduler = scene.frameState.jobScheduler;
const originalJobSchedulerExecute = jobScheduler.execute;
- spyOn(JobScheduler.prototype, "execute").and.callFake(
- function (job, jobType) {
- if (processCallsCount++ >= processCallsTotal) {
- return originalJobSchedulerExecute.call(jobScheduler, job, jobType);
- }
- return false;
- },
- );
+ spyOn(JobScheduler.prototype, "execute").and.callFake(function (
+ job,
+ jobType
+ ) {
+ if (processCallsCount++ >= processCallsTotal) {
+ return originalJobSchedulerExecute.call(jobScheduler, job, jobType);
+ }
+ return false;
+ });
const indexBufferLoader = new GltfIndexBufferLoader({
resourceCache: ResourceCache,
@@ -424,17 +432,17 @@ describe(
expect(() => loaderProcess(indexBufferLoader, scene)).not.toThrow();
expect(indexBufferLoader.buffer.sizeInBytes).toBe(
- indicesUint16.byteLength,
+ indicesUint16.byteLength
);
expect(indexBufferLoader.typedArray).toBeUndefined();
expect(ResourceCache.statistics.geometryByteLength).toBe(
- indexBufferLoader.buffer.sizeInBytes,
+ indexBufferLoader.buffer.sizeInBytes
);
});
it("loads from accessor as typed array", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
spyOn(Buffer, "createIndexBuffer").and.callThrough();
@@ -452,18 +460,18 @@ describe(
await waitForLoaderProcess(indexBufferLoader, scene);
expect(indexBufferLoader.typedArray.byteLength).toBe(
- indicesUint16.byteLength,
+ indicesUint16.byteLength
);
expect(indexBufferLoader.buffer).toBeUndefined();
expect(Buffer.createIndexBuffer.calls.count()).toBe(0);
expect(ResourceCache.statistics.geometryByteLength).toBe(
- indexBufferLoader.typedArray.byteLength,
+ indexBufferLoader.typedArray.byteLength
);
});
it("loads from accessor as buffer and typed array", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
const indexBufferLoader = new GltfIndexBufferLoader({
@@ -480,19 +488,19 @@ describe(
await waitForLoaderProcess(indexBufferLoader, scene);
expect(indexBufferLoader.buffer.sizeInBytes).toBe(
- indicesUint16.byteLength,
+ indicesUint16.byteLength
);
expect(indexBufferLoader.typedArray.byteLength).toBe(
- indicesUint16.byteLength,
+ indicesUint16.byteLength
);
expect(ResourceCache.statistics.geometryByteLength).toBe(
- 2 * indexBufferLoader.typedArray.byteLength,
+ 2 * indexBufferLoader.typedArray.byteLength
);
});
it("creates index buffer synchronously", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
const indexBufferLoader = new GltfIndexBufferLoader({
@@ -509,13 +517,13 @@ describe(
await waitForLoaderProcess(indexBufferLoader, scene);
expect(indexBufferLoader.buffer.sizeInBytes).toBe(
- indicesUint16.byteLength,
+ indicesUint16.byteLength
);
});
async function loadIndices(accessorId, expectedByteLength) {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
const indexBufferLoader = new GltfIndexBufferLoader({
@@ -551,7 +559,7 @@ describe(
it("loads from draco", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
// Simulate decodeBufferView not being ready for a few frames
@@ -579,20 +587,20 @@ describe(
expect(() => loaderProcess(indexBufferLoader, scene)).not.toThrow();
expect(indexBufferLoader.buffer.sizeInBytes).toBe(
- decodedIndices.byteLength,
+ decodedIndices.byteLength
);
expect(ResourceCache.statistics.geometryByteLength).toBe(
- indexBufferLoader.buffer.sizeInBytes,
+ indexBufferLoader.buffer.sizeInBytes
);
});
it("uses the decoded data's type instead of the accessor component type", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
spyOn(DracoLoader, "decodeBufferView").and.returnValue(
- Promise.resolve(decodeDracoResults),
+ Promise.resolve(decodeDracoResults)
);
const clonedGltf = clone(gltfDraco, true);
@@ -617,17 +625,17 @@ describe(
it("destroys index buffer loaded from buffer view", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
const unloadBufferView = spyOn(
GltfBufferViewLoader.prototype,
- "unload",
+ "unload"
).and.callThrough();
const destroyIndexBuffer = spyOn(
Buffer.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
const indexBufferLoader = new GltfIndexBufferLoader({
@@ -655,21 +663,21 @@ describe(
it("destroys index buffer loaded from draco", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
spyOn(DracoLoader, "decodeBufferView").and.returnValue(
- Promise.resolve(decodeDracoResults),
+ Promise.resolve(decodeDracoResults)
);
const unloadDraco = spyOn(
GltfDracoLoader.prototype,
- "unload",
+ "unload"
).and.callThrough();
const destroyIndexBuffer = spyOn(
Buffer.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
const indexBufferLoader = new GltfIndexBufferLoader({
@@ -709,7 +717,7 @@ describe(
spyOn(Resource.prototype, "fetchArrayBuffer").and.callFake(() =>
rejectPromise
? Promise.reject(new Error())
- : Promise.resolve(arrayBuffer),
+ : Promise.resolve(arrayBuffer)
);
expect(indexBufferLoader.buffer).not.toBeDefined();
@@ -752,7 +760,7 @@ describe(
const decodeBufferView = spyOn(
DracoLoader,
- "decodeBufferView",
+ "decodeBufferView"
).and.callFake(function () {
return new Promise(function (resolve, reject) {
if (rejectPromise) {
@@ -767,7 +775,7 @@ describe(
await indexBufferLoader.load(); // Destroy is called in mock function above
await expectAsync(
- waitForLoaderProcess(indexBufferLoader, scene),
+ waitForLoaderProcess(indexBufferLoader, scene)
).toBeResolved();
expect(decodeBufferView).toHaveBeenCalled(); // Make sure the decode actually starts
@@ -783,5 +791,5 @@ describe(
return resolveDracoAfterDestroy(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/GltfJsonLoaderSpec.js b/packages/engine/Specs/Scene/GltfJsonLoaderSpec.js
index 1978618855ae..84549d70126b 100644
--- a/packages/engine/Specs/Scene/GltfJsonLoaderSpec.js
+++ b/packages/engine/Specs/Scene/GltfJsonLoaderSpec.js
@@ -594,7 +594,7 @@ describe("Scene/GltfJsonLoader", function () {
await expectAsync(gltfJsonLoader.load()).toBeRejectedWithError(
RuntimeError,
- "Failed to load glTF: https://example.com/model.glb\n404 Not Found",
+ "Failed to load glTF: https://example.com/model.glb\n404 Not Found"
);
});
@@ -605,11 +605,11 @@ describe("Scene/GltfJsonLoader", function () {
}).buffer;
spyOn(GltfJsonLoader.prototype, "_fetchGltf").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(new Float32Array([0.0, 0.0, 0.0]).buffer),
+ Promise.resolve(new Float32Array([0.0, 0.0, 0.0]).buffer)
);
const gltfJsonLoader = new GltfJsonLoader({
@@ -620,7 +620,7 @@ describe("Scene/GltfJsonLoader", function () {
await expectAsync(gltfJsonLoader.load()).toBeRejectedWithError(
RuntimeError,
- "Failed to load glTF: https://example.com/model.glb\nUnsupported glTF Extension: NOT_supported_extension",
+ "Failed to load glTF: https://example.com/model.glb\nUnsupported glTF Extension: NOT_supported_extension"
);
});
@@ -628,7 +628,7 @@ describe("Scene/GltfJsonLoader", function () {
const arrayBuffer = generateJsonBuffer(gltf1).buffer;
spyOn(GltfJsonLoader.prototype, "_fetchGltf").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
spyOn(Resource.prototype, "fetchArrayBuffer").and.callFake(function () {
@@ -644,7 +644,7 @@ describe("Scene/GltfJsonLoader", function () {
await expectAsync(gltfJsonLoader.load()).toBeRejectedWithError(
RuntimeError,
- "Failed to load glTF: https://example.com/model.glb\nFailed to load external buffer: https://example.com/external.bin\n404 Not Found",
+ "Failed to load glTF: https://example.com/model.glb\nFailed to load external buffer: https://example.com/external.bin\n404 Not Found"
);
});
@@ -665,7 +665,7 @@ describe("Scene/GltfJsonLoader", function () {
await expectAsync(gltfJsonLoader.load()).toBeRejectedWithError(
RuntimeError,
- "Failed to load glTF: https://example.com/model.glb\nFailed to load external buffer: https://example.com/external.bin\n404 Not Found",
+ "Failed to load glTF: https://example.com/model.glb\nFailed to load external buffer: https://example.com/external.bin\n404 Not Found"
);
});
@@ -673,11 +673,11 @@ describe("Scene/GltfJsonLoader", function () {
const arrayBuffer = generateJsonBuffer(gltf1).buffer;
spyOn(GltfJsonLoader.prototype, "_fetchGltf").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(new Float32Array([0.0, 0.0, 0.0]).buffer),
+ Promise.resolve(new Float32Array([0.0, 0.0, 0.0]).buffer)
);
const gltfJsonLoader = new GltfJsonLoader({
@@ -696,11 +696,11 @@ describe("Scene/GltfJsonLoader", function () {
const arrayBuffer = generateJsonBuffer(gltf1MaterialsCommon).buffer;
spyOn(GltfJsonLoader.prototype, "_fetchGltf").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(new Float32Array([0.0, 0.0, 0.0]).buffer),
+ Promise.resolve(new Float32Array([0.0, 0.0, 0.0]).buffer)
);
const gltfJsonLoader = new GltfJsonLoader({
@@ -734,7 +734,7 @@ describe("Scene/GltfJsonLoader", function () {
const arrayBuffer = createGlb1(gltf1Binary).buffer;
spyOn(GltfJsonLoader.prototype, "_fetchGltf").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
const gltfJsonLoader = new GltfJsonLoader({
@@ -761,7 +761,7 @@ describe("Scene/GltfJsonLoader", function () {
const arrayBuffer = generateJsonBuffer(gltf1DataUri).buffer;
spyOn(GltfJsonLoader.prototype, "_fetchGltf").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
const gltfJsonLoader = new GltfJsonLoader({
@@ -779,11 +779,11 @@ describe("Scene/GltfJsonLoader", function () {
const arrayBuffer = generateJsonBuffer(gltf2).buffer;
spyOn(GltfJsonLoader.prototype, "_fetchGltf").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(new Float32Array([0.0, 0.0, 0.0]).buffer),
+ Promise.resolve(new Float32Array([0.0, 0.0, 0.0]).buffer)
);
const gltfJsonLoader = new GltfJsonLoader({
@@ -802,11 +802,11 @@ describe("Scene/GltfJsonLoader", function () {
const arrayBuffer = generateJsonBuffer(gltf2TechniquesWebgl).buffer;
spyOn(GltfJsonLoader.prototype, "_fetchGltf").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(new Float32Array([0.0, 0.0, 0.0]).buffer),
+ Promise.resolve(new Float32Array([0.0, 0.0, 0.0]).buffer)
);
const gltfJsonLoader = new GltfJsonLoader({
@@ -830,7 +830,7 @@ describe("Scene/GltfJsonLoader", function () {
const arrayBuffer = createGlb2(gltf2Binary).buffer;
spyOn(GltfJsonLoader.prototype, "_fetchGltf").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
const gltfJsonLoader = new GltfJsonLoader({
@@ -856,7 +856,7 @@ describe("Scene/GltfJsonLoader", function () {
const arrayBuffer = generateJsonBuffer(gltf2DataUri).buffer;
spyOn(GltfJsonLoader.prototype, "_fetchGltf").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
const gltfJsonLoader = new GltfJsonLoader({
@@ -897,7 +897,7 @@ describe("Scene/GltfJsonLoader", function () {
const gltf = clone(gltf2, true);
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(new Float32Array([0.0, 0.0, 0.0]).buffer),
+ Promise.resolve(new Float32Array([0.0, 0.0, 0.0]).buffer)
);
const gltfJsonLoader = new GltfJsonLoader({
@@ -920,12 +920,12 @@ describe("Scene/GltfJsonLoader", function () {
const arrayBuffer = createGlb2(gltf2Binary).buffer;
spyOn(GltfJsonLoader.prototype, "_fetchGltf").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
const unloadBuffer = spyOn(
BufferLoader.prototype,
- "unload",
+ "unload"
).and.callThrough();
const gltfJsonLoader = new GltfJsonLoader({
@@ -949,9 +949,7 @@ describe("Scene/GltfJsonLoader", function () {
async function resolvesGltfAfterDestroy(rejectPromise) {
const arrayBuffer = generateJsonBuffer(gltf2).buffer;
spyOn(GltfJsonLoader.prototype, "_fetchGltf").and.callFake(() =>
- rejectPromise
- ? Promise.reject(new Error())
- : Promise.resolve(arrayBuffer),
+ rejectPromise ? Promise.reject(new Error()) : Promise.resolve(arrayBuffer)
);
const gltfJsonLoader = new GltfJsonLoader({
@@ -979,7 +977,7 @@ describe("Scene/GltfJsonLoader", function () {
async function resolvesProcessedGltfAfterDestroy(rejectPromise) {
spyOn(GltfJsonLoader.prototype, "_fetchGltf").and.returnValue(
- Promise.resolve(generateJsonBuffer(gltf2).buffer),
+ Promise.resolve(generateJsonBuffer(gltf2).buffer)
);
const buffer = new Float32Array([0.0, 0.0, 0.0]).buffer;
diff --git a/packages/engine/Specs/Scene/GltfLoaderSpec.js b/packages/engine/Specs/Scene/GltfLoaderSpec.js
index 8a6bae03d5c7..cfcab67f19d3 100644
--- a/packages/engine/Specs/Scene/GltfLoaderSpec.js
+++ b/packages/engine/Specs/Scene/GltfLoaderSpec.js
@@ -163,7 +163,7 @@ describe(
it("load throws if glTF JSON fails to load", async function () {
const error = new Error("404 Not Found");
spyOn(GltfJsonLoader.prototype, "_fetchGltf").and.returnValue(
- Promise.reject(error),
+ Promise.reject(error)
);
const gltfResource = new Resource({
@@ -178,7 +178,7 @@ describe(
await expectAsync(gltfLoader.load()).toBeRejectedWithError(
RuntimeError,
- "Failed to load glTF\nFailed to load glTF: https://example.com/model.glb\n404 Not Found",
+ "Failed to load glTF\nFailed to load glTF: https://example.com/model.glb\n404 Not Found"
);
});
@@ -230,7 +230,7 @@ describe(
gltf = modifyFunction(gltf);
spyOn(GltfJsonLoader.prototype, "_fetchGltf").and.returnValue(
- Promise.resolve(generateJsonBuffer(gltf).buffer),
+ Promise.resolve(generateJsonBuffer(gltf).buffer)
);
const gltfLoader = new GltfLoader(getOptions(gltfPath, options));
@@ -294,11 +294,11 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const normalAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.NORMAL,
+ VertexAttributeSemantic.NORMAL
);
expect(positionAttribute.buffer).toBeDefined();
@@ -325,16 +325,16 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const normalAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.NORMAL,
+ VertexAttributeSemantic.NORMAL
);
const texcoordAttribute = getAttribute(
attributes,
VertexAttributeSemantic.TEXCOORD,
- 0,
+ 0
);
const indices = primitive.indices;
@@ -370,11 +370,11 @@ describe(
expect(positionAttribute.name).toBe("POSITION");
expect(positionAttribute.semantic).toBe(
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
expect(positionAttribute.setIndex).toBeUndefined();
expect(positionAttribute.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(positionAttribute.type).toBe(AttributeType.VEC3);
expect(positionAttribute.normalized).toBe(false);
@@ -406,11 +406,11 @@ describe(
expect(texcoordAttribute.name).toBe("TEXCOORD_0");
expect(texcoordAttribute.semantic).toBe(
- VertexAttributeSemantic.TEXCOORD,
+ VertexAttributeSemantic.TEXCOORD
);
expect(texcoordAttribute.setIndex).toBe(0);
expect(texcoordAttribute.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(texcoordAttribute.type).toBe(AttributeType.VEC2);
expect(texcoordAttribute.normalized).toBe(false);
@@ -436,7 +436,7 @@ describe(
expect(texcoordAttribute.buffer.sizeInBytes).toBe(192);
expect(metallicRoughness.baseColorFactor).toEqual(
- new Cartesian4(1.0, 1.0, 1.0, 1.0),
+ new Cartesian4(1.0, 1.0, 1.0, 1.0)
);
expect(metallicRoughness.metallicFactor).toBe(0.0);
expect(metallicRoughness.roughnessFactor).toBe(1.0);
@@ -448,10 +448,10 @@ describe(
expect(sampler.wrapS).toBe(TextureWrap.REPEAT);
expect(sampler.wrapT).toBe(TextureWrap.REPEAT);
expect(sampler.magnificationFilter).toBe(
- TextureMagnificationFilter.LINEAR,
+ TextureMagnificationFilter.LINEAR
);
expect(sampler.minificationFilter).toBe(
- TextureMinificationFilter.NEAREST_MIPMAP_LINEAR,
+ TextureMinificationFilter.NEAREST_MIPMAP_LINEAR
);
expect(nodes.length).toBe(2);
@@ -488,7 +488,7 @@ describe(
const metallicRoughness = material.metallicRoughness;
expect(metallicRoughness.baseColorTexture).toBeUndefined();
- },
+ }
);
});
@@ -511,10 +511,10 @@ describe(
expect(sampler.wrapS).toBe(TextureWrap.REPEAT);
expect(sampler.wrapT).toBe(TextureWrap.REPEAT);
expect(sampler.magnificationFilter).toBe(
- TextureMagnificationFilter.LINEAR,
+ TextureMagnificationFilter.LINEAR
);
expect(sampler.minificationFilter).toBe(
- TextureMinificationFilter.LINEAR,
+ TextureMinificationFilter.LINEAR
);
});
}
@@ -543,21 +543,21 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const normalAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.NORMAL,
+ VertexAttributeSemantic.NORMAL
);
const texcoordAttribute = getAttribute(
attributes,
VertexAttributeSemantic.TEXCOORD,
- 0,
+ 0
);
const colorAttribute = getAttribute(
attributes,
VertexAttributeSemantic.COLOR,
- 0,
+ 0
);
expect(positionAttribute.buffer).toBeDefined();
@@ -602,7 +602,7 @@ describe(
return loadModifiedGltfAndTest(
boxVertexColors,
undefined,
- modifyGltf,
+ modifyGltf
).then(function (gltfLoader) {
const components = gltfLoader.components;
const scene = components.scene;
@@ -612,21 +612,21 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const normalAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.NORMAL,
+ VertexAttributeSemantic.NORMAL
);
const texcoordAttribute = getAttribute(
attributes,
VertexAttributeSemantic.TEXCOORD,
- 0,
+ 0
);
const colorAttribute = getAttribute(
attributes,
VertexAttributeSemantic.COLOR,
- 0,
+ 0
);
expect(positionAttribute.buffer).toBeDefined();
@@ -648,18 +648,18 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const morphTargets = primitive.morphTargets;
const morphTarget0 = morphTargets[0];
const morphTarget1 = morphTargets[1];
const morphPositions0 = getAttribute(
morphTarget0.attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const morphPositions1 = getAttribute(
morphTarget1.attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
expect(morphPositions0.name).toBe("POSITION");
@@ -715,7 +715,7 @@ describe(
const scene = components.scene;
const rootNode = scene.nodes[0];
expect(rootNode.morphWeights).toEqual([0.0, 0.0]);
- },
+ }
);
});
@@ -730,17 +730,17 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const jointsAttribute = getAttribute(
attributes,
VertexAttributeSemantic.JOINTS,
- 0,
+ 0
);
const weightsAttribute = getAttribute(
attributes,
VertexAttributeSemantic.WEIGHTS,
- 0,
+ 0
);
expect(positionAttribute.buffer).toBeDefined();
@@ -751,7 +751,7 @@ describe(
expect(jointsAttribute.semantic).toBe(VertexAttributeSemantic.JOINTS);
expect(jointsAttribute.setIndex).toBe(0);
expect(jointsAttribute.componentDatatype).toBe(
- ComponentDatatype.UNSIGNED_SHORT,
+ ComponentDatatype.UNSIGNED_SHORT
);
expect(jointsAttribute.type).toBe(AttributeType.VEC4);
expect(jointsAttribute.normalized).toBe(false);
@@ -769,7 +769,7 @@ describe(
expect(weightsAttribute.semantic).toBe(VertexAttributeSemantic.WEIGHTS);
expect(weightsAttribute.setIndex).toBe(0);
expect(weightsAttribute.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(weightsAttribute.type).toBe(AttributeType.VEC4);
expect(weightsAttribute.normalized).toBe(false);
@@ -824,7 +824,7 @@ describe(
Matrix4.IDENTITY,
Matrix4.IDENTITY,
]);
- },
+ }
);
});
@@ -838,7 +838,7 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
expect(positionAttribute.buffer).toBeDefined();
@@ -866,8 +866,8 @@ describe(
Quaternion.equalsEpsilon(
sampler.output[i],
expectedOutput[i],
- CesiumMath.EPSILON3,
- ),
+ CesiumMath.EPSILON3
+ )
).toBe(true);
}
@@ -876,7 +876,7 @@ describe(
expect(channel.sampler).toBe(sampler);
expect(channel.target.node).toBe(rootNode);
expect(channel.target.path).toEqual(
- ModelComponents.AnimatedPropertyType.ROTATION,
+ ModelComponents.AnimatedPropertyType.ROTATION
);
});
});
@@ -891,7 +891,7 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
expect(positionAttribute.buffer).toBeDefined();
@@ -911,7 +911,7 @@ describe(
expect(channel.sampler).toBe(sampler);
expect(channel.target.node).toBe(rootNode);
expect(channel.target.path).toEqual(
- ModelComponents.AnimatedPropertyType.WEIGHTS,
+ ModelComponents.AnimatedPropertyType.WEIGHTS
);
});
});
@@ -935,7 +935,7 @@ describe(
expect(channel.sampler).toBe(sampler);
expect(channel.target.node).toBe(nodes[0]);
expect(channel.target.path).toEqual(
- ModelComponents.AnimatedPropertyType.SCALE,
+ ModelComponents.AnimatedPropertyType.SCALE
);
const cubicSplineRotation = animations[4];
@@ -952,7 +952,7 @@ describe(
expect(channel.sampler).toBe(sampler);
expect(channel.target.node).toBe(nodes[6]);
expect(channel.target.path).toEqual(
- ModelComponents.AnimatedPropertyType.ROTATION,
+ ModelComponents.AnimatedPropertyType.ROTATION
);
const linearTranslation = animations[8];
@@ -968,7 +968,7 @@ describe(
expect(channel.sampler).toBe(sampler);
expect(channel.target.node).toBe(nodes[10]);
expect(channel.target.path).toEqual(
- ModelComponents.AnimatedPropertyType.TRANSLATION,
+ ModelComponents.AnimatedPropertyType.TRANSLATION
);
});
});
@@ -982,13 +982,13 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
expect(positionAttribute).toBeDefined();
expect(primitive.indices).toBeDefined();
expect(primitive.indices.indexDatatype).toBe(
- IndexDatatype.UNSIGNED_SHORT,
+ IndexDatatype.UNSIGNED_SHORT
);
expect(primitive.indices.count).toBe(3);
expect(primitive.indices.buffer).toBeDefined();
@@ -1011,12 +1011,12 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
expect(positionAttribute).toBeDefined();
expect(primitive.indices).toBeUndefined();
- },
+ }
);
});
@@ -1029,7 +1029,7 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
expect(positionAttribute).toBeDefined();
@@ -1048,20 +1048,20 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const normalAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.NORMAL,
+ VertexAttributeSemantic.NORMAL
);
const tangentAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.TANGENT,
+ VertexAttributeSemantic.TANGENT
);
const texcoordAttribute = getAttribute(
attributes,
VertexAttributeSemantic.TEXCOORD,
- 0,
+ 0
);
expect(positionAttribute).toBeDefined();
@@ -1071,7 +1071,7 @@ describe(
expect(metallicRoughness.baseColorTexture.texture).toBeDefined();
expect(
- metallicRoughness.metallicRoughnessTexture.texture,
+ metallicRoughness.metallicRoughnessTexture.texture
).toBeDefined();
expect(material.normalTexture.texture).toBeDefined();
expect(material.doubleSided).toBe(true);
@@ -1106,25 +1106,25 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const normalAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.NORMAL,
+ VertexAttributeSemantic.NORMAL
);
const tangentAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.TANGENT,
+ VertexAttributeSemantic.TANGENT
);
const texcoordAttribute0 = getAttribute(
attributes,
VertexAttributeSemantic.TEXCOORD,
- 0,
+ 0
);
const texcoordAttribute1 = getAttribute(
attributes,
VertexAttributeSemantic.TEXCOORD,
- 1,
+ 1
);
expect(positionAttribute).toBeDefined();
@@ -1154,7 +1154,7 @@ describe(
const featureIdTexture = primitive.featureIds[0];
expect(featureIdTexture).toBeInstanceOf(
- ModelComponents.FeatureIdTexture,
+ ModelComponents.FeatureIdTexture
);
expect(featureIdTexture.featureCount).toEqual(256);
expect(featureIdTexture.nullFeatureId).not.toBeDefined();
@@ -1166,7 +1166,7 @@ describe(
expect(featureIdTexture.textureReader.texture.width).toBe(256);
expect(featureIdTexture.textureReader.texture.height).toBe(256);
expect(featureIdTexture.textureReader.texture.sampler).toBe(
- Sampler.NEAREST,
+ Sampler.NEAREST
);
const classDefinition = structuralMetadata.schema.classes.landCover;
@@ -1175,7 +1175,7 @@ describe(
expect(properties.name.componentType).not.toBeDefined();
expect(properties.color.type).toBe(MetadataType.VEC3);
expect(properties.color.componentType).toBe(
- MetadataComponentType.UINT8,
+ MetadataComponentType.UINT8
);
const propertyTable = structuralMetadata.getPropertyTable(0);
@@ -1185,18 +1185,19 @@ describe(
expect(propertyTable.class).toBe(classDefinition);
expect(propertyTable.getProperty(0, "name")).toBe("Grassland");
expect(propertyTable.getProperty(0, "color")).toEqual(
- new Cartesian3(118, 163, 11),
+ new Cartesian3(118, 163, 11)
);
expect(propertyTable.getProperty(255, "name")).toBe("Building");
expect(propertyTable.getProperty(255, "color")).toEqual(
- new Cartesian3(194, 194, 194),
+ new Cartesian3(194, 194, 194)
);
const propertyTexture = structuralMetadata.getPropertyTexture(0);
expect(propertyTexture.id).toEqual(0);
expect(propertyTexture.name).toEqual("Vegetation");
- const vegetationProperty =
- propertyTexture.getProperty("vegetationDensity");
+ const vegetationProperty = propertyTexture.getProperty(
+ "vegetationDensity"
+ );
expect(vegetationProperty.textureReader.texture.width).toBe(256);
expect(vegetationProperty.textureReader.texture.height).toBe(256);
@@ -1219,7 +1220,7 @@ describe(
const featureIdTexture = primitive.featureIds[0];
expect(featureIdTexture).toBeInstanceOf(
- ModelComponents.FeatureIdTexture,
+ ModelComponents.FeatureIdTexture
);
expect(featureIdTexture.featureCount).toEqual(256);
expect(featureIdTexture.nullFeatureId).not.toBeDefined();
@@ -1231,7 +1232,7 @@ describe(
expect(featureIdTexture.textureReader.texture.width).toBe(256);
expect(featureIdTexture.textureReader.texture.height).toBe(256);
expect(featureIdTexture.textureReader.texture.sampler).toBe(
- Sampler.NEAREST,
+ Sampler.NEAREST
);
const classDefinition = structuralMetadata.schema.classes.landCover;
@@ -1240,7 +1241,7 @@ describe(
expect(properties.name.componentType).not.toBeDefined();
expect(properties.color.type).toBe(MetadataType.SCALAR);
expect(properties.color.componentType).toBe(
- MetadataComponentType.UINT8,
+ MetadataComponentType.UINT8
);
expect(properties.color.arrayLength).toBe(3);
@@ -1252,13 +1253,16 @@ describe(
expect(propertyTable.getProperty(0, "color")).toEqual([118, 163, 11]);
expect(propertyTable.getProperty(255, "name")).toBe("Building");
expect(propertyTable.getProperty(255, "color")).toEqual([
- 194, 194, 194,
+ 194,
+ 194,
+ 194,
]);
const propertyTexture = structuralMetadata.getPropertyTexture(0);
expect(propertyTexture.id).toEqual("vegetationTexture");
- const vegetationProperty =
- propertyTexture.getProperty("vegetationDensity");
+ const vegetationProperty = propertyTexture.getProperty(
+ "vegetationDensity"
+ );
expect(vegetationProperty.textureReader.texture.width).toBe(256);
expect(vegetationProperty.textureReader.texture.height).toBe(256);
@@ -1282,7 +1286,7 @@ describe(
let featureIdTexture = primitive.featureIds[0];
expect(featureIdTexture).toBeInstanceOf(
- ModelComponents.FeatureIdTexture,
+ ModelComponents.FeatureIdTexture
);
expect(featureIdTexture.featureCount).toEqual(1048576);
expect(featureIdTexture.nullFeatureId).not.toBeDefined();
@@ -1298,7 +1302,7 @@ describe(
featureIdTexture = primitive.featureIds[1];
expect(featureIdTexture).toBeInstanceOf(
- ModelComponents.FeatureIdTexture,
+ ModelComponents.FeatureIdTexture
);
expect(featureIdTexture.featureCount).toEqual(1048576);
expect(featureIdTexture.nullFeatureId).not.toBeDefined();
@@ -1312,7 +1316,7 @@ describe(
featureIdTexture = primitive.featureIds[2];
expect(featureIdTexture).toBeInstanceOf(
- ModelComponents.FeatureIdTexture,
+ ModelComponents.FeatureIdTexture
);
expect(featureIdTexture.featureCount).toEqual(256);
expect(featureIdTexture.nullFeatureId).not.toBeDefined();
@@ -1325,7 +1329,7 @@ describe(
featureIdTexture = primitive.featureIds[3];
expect(featureIdTexture).toBeInstanceOf(
- ModelComponents.FeatureIdTexture,
+ ModelComponents.FeatureIdTexture
);
expect(featureIdTexture.featureCount).toEqual(65536);
expect(featureIdTexture.nullFeatureId).not.toBeDefined();
@@ -1338,7 +1342,7 @@ describe(
featureIdTexture = primitive.featureIds[4];
expect(featureIdTexture).toBeInstanceOf(
- ModelComponents.FeatureIdTexture,
+ ModelComponents.FeatureIdTexture
);
expect(featureIdTexture.featureCount).toEqual(65536);
expect(featureIdTexture.nullFeatureId).not.toBeDefined();
@@ -1351,7 +1355,7 @@ describe(
featureIdTexture = primitive.featureIds[5];
expect(featureIdTexture).toBeInstanceOf(
- ModelComponents.FeatureIdTexture,
+ ModelComponents.FeatureIdTexture
);
expect(featureIdTexture.featureCount).toEqual(1048576);
expect(featureIdTexture.nullFeatureId).not.toBeDefined();
@@ -1364,7 +1368,7 @@ describe(
featureIdTexture = primitive.featureIds[6];
expect(featureIdTexture).toBeInstanceOf(
- ModelComponents.FeatureIdTexture,
+ ModelComponents.FeatureIdTexture
);
expect(featureIdTexture.featureCount).toEqual(255);
expect(featureIdTexture.nullFeatureId).toBe(10);
@@ -1387,16 +1391,16 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const normalAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.NORMAL,
+ VertexAttributeSemantic.NORMAL
);
const featureIdAttribute = getAttribute(
attributes,
VertexAttributeSemantic.FEATURE_ID,
- 0,
+ 0
);
const structuralMetadata = components.structuralMetadata;
@@ -1405,11 +1409,11 @@ describe(
expect(featureIdAttribute.name).toBe("_FEATURE_ID_0");
expect(featureIdAttribute.semantic).toBe(
- VertexAttributeSemantic.FEATURE_ID,
+ VertexAttributeSemantic.FEATURE_ID
);
expect(featureIdAttribute.setIndex).toBe(0);
expect(featureIdAttribute.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(featureIdAttribute.type).toBe(AttributeType.SCALAR);
expect(featureIdAttribute.normalized).toBe(false);
@@ -1429,7 +1433,7 @@ describe(
// feature ID via accessor
const featureIdAccessor = primitive.featureIds[0];
expect(featureIdAccessor).toBeInstanceOf(
- ModelComponents.FeatureIdAttribute,
+ ModelComponents.FeatureIdAttribute
);
expect(featureIdAccessor.featureCount).toEqual(10);
expect(featureIdAccessor.nullFeatureId).not.toBeDefined();
@@ -1441,7 +1445,7 @@ describe(
// Default feature ID
const featureIdDefault = primitive.featureIds[1];
expect(featureIdDefault).toBeInstanceOf(
- ModelComponents.FeatureIdImplicitRange,
+ ModelComponents.FeatureIdImplicitRange
);
expect(featureIdDefault.featureCount).toEqual(5);
expect(featureIdDefault.nullFeatureId).not.toBeDefined();
@@ -1455,7 +1459,7 @@ describe(
const classDefinition = structuralMetadata.schema.classes.building;
const properties = classDefinition.properties;
expect(properties.height.componentType).toBe(
- MetadataComponentType.FLOAT32,
+ MetadataComponentType.FLOAT32
);
expect(properties.id.componentType).toBe(MetadataComponentType.INT32);
@@ -1498,7 +1502,7 @@ describe(
for (let i = 0; i < 10; i++) {
const temperature = propertyTable.getProperty(
i,
- "temperatureCelsius",
+ "temperatureCelsius"
);
expect(temperature).toBeGreaterThanOrEqual(18);
expect(temperature).toBeLessThanOrEqual(24);
@@ -1516,16 +1520,16 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const normalAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.NORMAL,
+ VertexAttributeSemantic.NORMAL
);
const featureIdAttribute = getAttribute(
attributes,
VertexAttributeSemantic.FEATURE_ID,
- 0,
+ 0
);
const structuralMetadata = components.structuralMetadata;
@@ -1534,11 +1538,11 @@ describe(
expect(featureIdAttribute.name).toBe("_FEATURE_ID_0");
expect(featureIdAttribute.semantic).toBe(
- VertexAttributeSemantic.FEATURE_ID,
+ VertexAttributeSemantic.FEATURE_ID
);
expect(featureIdAttribute.setIndex).toBe(0);
expect(featureIdAttribute.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(featureIdAttribute.type).toBe(AttributeType.SCALAR);
expect(featureIdAttribute.normalized).toBe(false);
@@ -1558,7 +1562,7 @@ describe(
// feature ID via accessor
const featureIdAccessor = primitive.featureIds[0];
expect(featureIdAccessor).toBeInstanceOf(
- ModelComponents.FeatureIdAttribute,
+ ModelComponents.FeatureIdAttribute
);
expect(featureIdAccessor.featureCount).toEqual(10);
expect(featureIdAccessor.nullFeatureId).not.toBeDefined();
@@ -1570,7 +1574,7 @@ describe(
// feature ID range
const featureIdDefault = primitive.featureIds[1];
expect(featureIdDefault).toBeInstanceOf(
- ModelComponents.FeatureIdImplicitRange,
+ ModelComponents.FeatureIdImplicitRange
);
expect(featureIdDefault.featureCount).toEqual(10);
expect(featureIdDefault.nullFeatureId).not.toBeDefined();
@@ -1584,7 +1588,7 @@ describe(
const classDefinition = structuralMetadata.schema.classes.building;
const properties = classDefinition.properties;
expect(properties.height.componentType).toBe(
- MetadataComponentType.FLOAT32,
+ MetadataComponentType.FLOAT32
);
expect(properties.id.componentType).toBe(MetadataComponentType.INT32);
@@ -1617,12 +1621,12 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const featureIdAttribute = getAttribute(
attributes,
VertexAttributeSemantic.FEATURE_ID,
- 0,
+ 0
);
const structuralMetadata = components.structuralMetadata;
@@ -1636,7 +1640,7 @@ describe(
const featureIdAttributeMapping0 = primitive.featureIds[0];
expect(featureIdAttributeMapping0).toBeInstanceOf(
- ModelComponents.FeatureIdImplicitRange,
+ ModelComponents.FeatureIdImplicitRange
);
expect(featureIdAttributeMapping0.featureCount).toEqual(1000);
expect(featureIdAttributeMapping0.nullFeatureId).not.toBeDefined();
@@ -1648,7 +1652,7 @@ describe(
const featureIdAttributeMapping1 = primitive.featureIds[1];
expect(featureIdAttributeMapping1).toBeInstanceOf(
- ModelComponents.FeatureIdAttribute,
+ ModelComponents.FeatureIdAttribute
);
expect(featureIdAttributeMapping1.featureCount).toEqual(3);
expect(featureIdAttributeMapping1.nullFeatureId).not.toBeDefined();
@@ -1660,14 +1664,14 @@ describe(
const weatherClass = structuralMetadata.schema.classes.weather;
const weatherProperties = weatherClass.properties;
expect(weatherProperties.airTemperature.componentType).toBe(
- MetadataComponentType.FLOAT32,
+ MetadataComponentType.FLOAT32
);
expect(weatherProperties.airPressure.componentType).toBe(
- MetadataComponentType.FLOAT32,
+ MetadataComponentType.FLOAT32
);
expect(weatherProperties.windVelocity.type).toBe(MetadataType.VEC3);
expect(weatherProperties.windVelocity.componentType).toBe(
- MetadataComponentType.FLOAT32,
+ MetadataComponentType.FLOAT32
);
const townClass = structuralMetadata.schema.classes.town;
@@ -1676,7 +1680,7 @@ describe(
expect(townProperties.name.componentCount).not.toBeDefined();
expect(townProperties.population.type).toBe(MetadataType.SCALAR);
expect(townProperties.population.componentType).toBe(
- MetadataComponentType.UINT16,
+ MetadataComponentType.UINT16
);
const weatherTable = structuralMetadata.getPropertyTable(1);
@@ -1685,22 +1689,22 @@ describe(
expect(weatherTable.count).toBe(1000);
expect(weatherTable.class).toBe(weatherClass);
expect(weatherTable.getProperty(0, "airTemperature")).toBe(
- 22.120203018188477,
+ 22.120203018188477
);
expect(weatherTable.getProperty(0, "airPressure")).toBe(
- 1.170711874961853,
+ 1.170711874961853
);
expect(weatherTable.getProperty(0, "windVelocity")).toEqual(
- new Cartesian3(1, 0.2964223027229309, 0.23619766533374786),
+ new Cartesian3(1, 0.2964223027229309, 0.23619766533374786)
);
expect(weatherTable.getProperty(999, "airTemperature")).toBe(
- 24.308320999145508,
+ 24.308320999145508
);
expect(weatherTable.getProperty(999, "airPressure")).toBe(
- 1.1136815547943115,
+ 1.1136815547943115
);
expect(weatherTable.getProperty(999, "windVelocity")).toEqual(
- new Cartesian3(1, 0.07490774989128113, 0.0022833053953945637),
+ new Cartesian3(1, 0.07490774989128113, 0.0022833053953945637)
);
const townTable = structuralMetadata.getPropertyTable(0);
@@ -1726,12 +1730,12 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const featureIdAttribute = getAttribute(
attributes,
VertexAttributeSemantic.FEATURE_ID,
- 0,
+ 0
);
const structuralMetadata = components.structuralMetadata;
@@ -1745,7 +1749,7 @@ describe(
const featureIdAttributeMapping0 = primitive.featureIds[0];
expect(featureIdAttributeMapping0).toBeInstanceOf(
- ModelComponents.FeatureIdImplicitRange,
+ ModelComponents.FeatureIdImplicitRange
);
expect(featureIdAttributeMapping0.featureCount).toEqual(1000);
expect(featureIdAttributeMapping0.nullFeatureId).not.toBeDefined();
@@ -1757,7 +1761,7 @@ describe(
const featureIdAttributeMapping1 = primitive.featureIds[1];
expect(featureIdAttributeMapping1).toBeInstanceOf(
- ModelComponents.FeatureIdAttribute,
+ ModelComponents.FeatureIdAttribute
);
expect(featureIdAttributeMapping1.featureCount).toEqual(3);
expect(featureIdAttributeMapping1.nullFeatureId).not.toBeDefined();
@@ -1769,14 +1773,14 @@ describe(
const weatherClass = structuralMetadata.schema.classes.weather;
const weatherProperties = weatherClass.properties;
expect(weatherProperties.airTemperature.componentType).toBe(
- MetadataComponentType.FLOAT32,
+ MetadataComponentType.FLOAT32
);
expect(weatherProperties.airPressure.componentType).toBe(
- MetadataComponentType.FLOAT32,
+ MetadataComponentType.FLOAT32
);
expect(weatherProperties.windVelocity.type).toBe(MetadataType.SCALAR);
expect(weatherProperties.windVelocity.componentType).toBe(
- MetadataComponentType.FLOAT32,
+ MetadataComponentType.FLOAT32
);
expect(weatherProperties.windVelocity.arrayLength).toBe(3);
@@ -1786,7 +1790,7 @@ describe(
expect(townProperties.name.componentType).not.toBeDefined();
expect(townProperties.population.type).toBe(MetadataType.SCALAR);
expect(townProperties.population.componentType).toBe(
- MetadataComponentType.UINT16,
+ MetadataComponentType.UINT16
);
const weatherTable = structuralMetadata.getPropertyTable(1);
@@ -1794,22 +1798,26 @@ describe(
expect(weatherTable.count).toBe(1000);
expect(weatherTable.class).toBe(weatherClass);
expect(weatherTable.getProperty(0, "airTemperature")).toBe(
- 22.120203018188477,
+ 22.120203018188477
);
expect(weatherTable.getProperty(0, "airPressure")).toBe(
- 1.170711874961853,
+ 1.170711874961853
);
expect(weatherTable.getProperty(0, "windVelocity")).toEqual([
- 1, 0.2964223027229309, 0.23619766533374786,
+ 1,
+ 0.2964223027229309,
+ 0.23619766533374786,
]);
expect(weatherTable.getProperty(999, "airTemperature")).toBe(
- 24.308320999145508,
+ 24.308320999145508
);
expect(weatherTable.getProperty(999, "airPressure")).toBe(
- 1.1136815547943115,
+ 1.1136815547943115
);
expect(weatherTable.getProperty(999, "windVelocity")).toEqual([
- 1, 0.07490774989128113, 0.0022833053953945637,
+ 1,
+ 0.07490774989128113,
+ 0.0022833053953945637,
]);
const townTable = structuralMetadata.getPropertyTable(0);
@@ -1826,128 +1834,130 @@ describe(
});
it("loads PointCloudWithPropertyAttributes", function () {
- return loadGltf(pointCloudWithPropertyAttributes).then(
- function (gltfLoader) {
- const components = gltfLoader.components;
- const scene = components.scene;
- const rootNode = scene.nodes[0];
- const primitive = rootNode.primitives[0];
- const attributes = primitive.attributes;
- const positionAttribute = getAttribute(
- attributes,
- VertexAttributeSemantic.POSITION,
- );
- const color0Attribute = getAttribute(
- attributes,
- VertexAttributeSemantic.COLOR,
- 0,
- );
- // custom attributes don't have a VertexAttributeSemantic
- const circleTAttribute = getAttributeByName(attributes, "_CIRCLE_T");
- const featureId0Attribute = getAttribute(
- attributes,
- VertexAttributeSemantic.FEATURE_ID,
- 0,
- );
- const featureId1Attribute = getAttribute(
- attributes,
- VertexAttributeSemantic.FEATURE_ID,
- 1,
- );
- const structuralMetadata = components.structuralMetadata;
+ return loadGltf(pointCloudWithPropertyAttributes).then(function (
+ gltfLoader
+ ) {
+ const components = gltfLoader.components;
+ const scene = components.scene;
+ const rootNode = scene.nodes[0];
+ const primitive = rootNode.primitives[0];
+ const attributes = primitive.attributes;
+ const positionAttribute = getAttribute(
+ attributes,
+ VertexAttributeSemantic.POSITION
+ );
+ const color0Attribute = getAttribute(
+ attributes,
+ VertexAttributeSemantic.COLOR,
+ 0
+ );
+ // custom attributes don't have a VertexAttributeSemantic
+ const circleTAttribute = getAttributeByName(attributes, "_CIRCLE_T");
+ const featureId0Attribute = getAttribute(
+ attributes,
+ VertexAttributeSemantic.FEATURE_ID,
+ 0
+ );
+ const featureId1Attribute = getAttribute(
+ attributes,
+ VertexAttributeSemantic.FEATURE_ID,
+ 1
+ );
+ const structuralMetadata = components.structuralMetadata;
- expect(primitive.primitiveType).toBe(PrimitiveType.POINTS);
+ expect(primitive.primitiveType).toBe(PrimitiveType.POINTS);
- expect(positionAttribute).toBeDefined();
- expect(color0Attribute).toBeDefined();
- expect(circleTAttribute).toBeDefined();
- expect(featureId0Attribute).toBeDefined();
- expect(featureId1Attribute).toBeDefined();
-
- expect(primitive.featureIds.length).toBe(2);
- expect(primitive.propertyTextureIds.length).toBe(0);
- expect(primitive.propertyAttributeIds).toEqual([0]);
-
- const featureIdAttribute0 = primitive.featureIds[0];
- expect(featureIdAttribute0).toBeInstanceOf(
- ModelComponents.FeatureIdAttribute,
- );
- expect(featureIdAttribute0.featureCount).toEqual(30);
- expect(featureIdAttribute0.nullFeatureId).not.toBeDefined();
- expect(featureIdAttribute0.propertyTableId).not.toBeDefined();
- expect(featureIdAttribute0.setIndex).toBe(0);
- expect(featureIdAttribute0.label).toBe("iteration");
- expect(featureIdAttribute0.positionalLabel).toBe("featureId_0");
-
- const featureIdAttribute1 = primitive.featureIds[1];
- expect(featureIdAttribute1).toBeInstanceOf(
- ModelComponents.FeatureIdAttribute,
- );
- expect(featureIdAttribute1.featureCount).toEqual(20);
- expect(featureIdAttribute1.nullFeatureId).not.toBeDefined();
- expect(featureIdAttribute1.propertyTableId).not.toBeDefined();
- expect(featureIdAttribute1.setIndex).toBe(1);
- expect(featureIdAttribute1.label).toBe("pointId");
- expect(featureIdAttribute1.positionalLabel).toBe("featureId_1");
-
- const torusClass = structuralMetadata.schema.classes.torus;
- const torusProperties = torusClass.properties;
- const circleT = torusProperties.circleT;
- expect(circleT.type).toBe(MetadataType.SCALAR);
- expect(circleT.componentType).toBe(MetadataComponentType.FLOAT32);
-
- const iteration = torusProperties.iteration;
- expect(iteration.type).toBe(MetadataType.SCALAR);
- expect(iteration.componentType).toBe(MetadataComponentType.FLOAT32);
-
- const pointId = torusProperties.pointId;
- expect(pointId.type).toBe(MetadataType.SCALAR);
- expect(pointId.componentType).toBe(MetadataComponentType.FLOAT32);
-
- const propertyAttribute = structuralMetadata.getPropertyAttribute(0);
- expect(propertyAttribute.id).toBe(0);
- expect(propertyAttribute.name).not.toBeDefined();
- expect(propertyAttribute.class).toBe(torusClass);
- expect(propertyAttribute.getProperty("circleT").attribute).toBe(
- "_CIRCLE_T",
- );
- expect(propertyAttribute.getProperty("iteration").attribute).toBe(
- "_FEATURE_ID_0",
- );
- expect(propertyAttribute.getProperty("pointId").attribute).toBe(
- "_FEATURE_ID_1",
- );
+ expect(positionAttribute).toBeDefined();
+ expect(color0Attribute).toBeDefined();
+ expect(circleTAttribute).toBeDefined();
+ expect(featureId0Attribute).toBeDefined();
+ expect(featureId1Attribute).toBeDefined();
- // A few more properties were added to test offset/scale
- const toroidalNormalized =
- propertyAttribute.getProperty("toroidalNormalized");
- expect(toroidalNormalized.attribute).toBe("_FEATURE_ID_0");
- expect(toroidalNormalized.hasValueTransform).toBe(true);
- expect(toroidalNormalized.offset).toBe(0);
- expect(toroidalNormalized.scale).toBe(0.034482758620689655);
-
- const poloidalNormalized =
- propertyAttribute.getProperty("poloidalNormalized");
- expect(poloidalNormalized.attribute).toBe("_FEATURE_ID_1");
- expect(poloidalNormalized.hasValueTransform).toBe(true);
- expect(poloidalNormalized.offset).toBe(0);
- expect(poloidalNormalized.scale).toBe(0.05263157894736842);
-
- // These two properties have offset/scale in both the class definition
- // and the property attribute. The latter should be used.
- const toroidalAngle = propertyAttribute.getProperty("toroidalAngle");
- expect(toroidalAngle.attribute).toBe("_FEATURE_ID_0");
- expect(toroidalAngle.hasValueTransform).toBe(true);
- expect(toroidalAngle.offset).toBe(0);
- expect(toroidalAngle.scale).toBe(0.21666156231653746);
-
- const poloidalAngle = propertyAttribute.getProperty("poloidalAngle");
- expect(poloidalAngle.attribute).toBe("_FEATURE_ID_1");
- expect(poloidalAngle.hasValueTransform).toBe(true);
- expect(poloidalAngle.offset).toBe(-3.141592653589793);
- expect(poloidalAngle.scale).toBe(0.3306939635357677);
- },
- );
+ expect(primitive.featureIds.length).toBe(2);
+ expect(primitive.propertyTextureIds.length).toBe(0);
+ expect(primitive.propertyAttributeIds).toEqual([0]);
+
+ const featureIdAttribute0 = primitive.featureIds[0];
+ expect(featureIdAttribute0).toBeInstanceOf(
+ ModelComponents.FeatureIdAttribute
+ );
+ expect(featureIdAttribute0.featureCount).toEqual(30);
+ expect(featureIdAttribute0.nullFeatureId).not.toBeDefined();
+ expect(featureIdAttribute0.propertyTableId).not.toBeDefined();
+ expect(featureIdAttribute0.setIndex).toBe(0);
+ expect(featureIdAttribute0.label).toBe("iteration");
+ expect(featureIdAttribute0.positionalLabel).toBe("featureId_0");
+
+ const featureIdAttribute1 = primitive.featureIds[1];
+ expect(featureIdAttribute1).toBeInstanceOf(
+ ModelComponents.FeatureIdAttribute
+ );
+ expect(featureIdAttribute1.featureCount).toEqual(20);
+ expect(featureIdAttribute1.nullFeatureId).not.toBeDefined();
+ expect(featureIdAttribute1.propertyTableId).not.toBeDefined();
+ expect(featureIdAttribute1.setIndex).toBe(1);
+ expect(featureIdAttribute1.label).toBe("pointId");
+ expect(featureIdAttribute1.positionalLabel).toBe("featureId_1");
+
+ const torusClass = structuralMetadata.schema.classes.torus;
+ const torusProperties = torusClass.properties;
+ const circleT = torusProperties.circleT;
+ expect(circleT.type).toBe(MetadataType.SCALAR);
+ expect(circleT.componentType).toBe(MetadataComponentType.FLOAT32);
+
+ const iteration = torusProperties.iteration;
+ expect(iteration.type).toBe(MetadataType.SCALAR);
+ expect(iteration.componentType).toBe(MetadataComponentType.FLOAT32);
+
+ const pointId = torusProperties.pointId;
+ expect(pointId.type).toBe(MetadataType.SCALAR);
+ expect(pointId.componentType).toBe(MetadataComponentType.FLOAT32);
+
+ const propertyAttribute = structuralMetadata.getPropertyAttribute(0);
+ expect(propertyAttribute.id).toBe(0);
+ expect(propertyAttribute.name).not.toBeDefined();
+ expect(propertyAttribute.class).toBe(torusClass);
+ expect(propertyAttribute.getProperty("circleT").attribute).toBe(
+ "_CIRCLE_T"
+ );
+ expect(propertyAttribute.getProperty("iteration").attribute).toBe(
+ "_FEATURE_ID_0"
+ );
+ expect(propertyAttribute.getProperty("pointId").attribute).toBe(
+ "_FEATURE_ID_1"
+ );
+
+ // A few more properties were added to test offset/scale
+ const toroidalNormalized = propertyAttribute.getProperty(
+ "toroidalNormalized"
+ );
+ expect(toroidalNormalized.attribute).toBe("_FEATURE_ID_0");
+ expect(toroidalNormalized.hasValueTransform).toBe(true);
+ expect(toroidalNormalized.offset).toBe(0);
+ expect(toroidalNormalized.scale).toBe(0.034482758620689655);
+
+ const poloidalNormalized = propertyAttribute.getProperty(
+ "poloidalNormalized"
+ );
+ expect(poloidalNormalized.attribute).toBe("_FEATURE_ID_1");
+ expect(poloidalNormalized.hasValueTransform).toBe(true);
+ expect(poloidalNormalized.offset).toBe(0);
+ expect(poloidalNormalized.scale).toBe(0.05263157894736842);
+
+ // These two properties have offset/scale in both the class definition
+ // and the property attribute. The latter should be used.
+ const toroidalAngle = propertyAttribute.getProperty("toroidalAngle");
+ expect(toroidalAngle.attribute).toBe("_FEATURE_ID_0");
+ expect(toroidalAngle.hasValueTransform).toBe(true);
+ expect(toroidalAngle.offset).toBe(0);
+ expect(toroidalAngle.scale).toBe(0.21666156231653746);
+
+ const poloidalAngle = propertyAttribute.getProperty("poloidalAngle");
+ expect(poloidalAngle.attribute).toBe("_FEATURE_ID_1");
+ expect(poloidalAngle.hasValueTransform).toBe(true);
+ expect(poloidalAngle.offset).toBe(-3.141592653589793);
+ expect(poloidalAngle.scale).toBe(0.3306939635357677);
+ });
});
it("loads BoxTexturedWithPropertyAttributes", function () {
@@ -1961,24 +1971,24 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const normalAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.NORMAL,
+ VertexAttributeSemantic.NORMAL
);
const texcoordAttribute = getAttribute(
attributes,
VertexAttributeSemantic.TEXCOORD,
- 0,
+ 0
);
const warpMatrixAttribute = getAttributeByName(
attributes,
- "_WARP_MATRIX",
+ "_WARP_MATRIX"
);
const temperaturesAttribute = getAttributeByName(
attributes,
- "_TEMPERATURES",
+ "_TEMPERATURES"
);
const indices = primitive.indices;
@@ -1990,11 +2000,11 @@ describe(
expect(positionAttribute.name).toBe("POSITION");
expect(positionAttribute.semantic).toBe(
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
expect(positionAttribute.setIndex).toBeUndefined();
expect(positionAttribute.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(positionAttribute.type).toBe(AttributeType.VEC3);
expect(positionAttribute.normalized).toBe(false);
@@ -2026,11 +2036,11 @@ describe(
expect(texcoordAttribute.name).toBe("TEXCOORD_0");
expect(texcoordAttribute.semantic).toBe(
- VertexAttributeSemantic.TEXCOORD,
+ VertexAttributeSemantic.TEXCOORD
);
expect(texcoordAttribute.setIndex).toBe(0);
expect(texcoordAttribute.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(texcoordAttribute.type).toBe(AttributeType.VEC2);
expect(texcoordAttribute.normalized).toBe(false);
@@ -2048,7 +2058,7 @@ describe(
expect(warpMatrixAttribute.semantic).toBeUndefined();
expect(warpMatrixAttribute.setIndex).toBeUndefined();
expect(warpMatrixAttribute.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(warpMatrixAttribute.type).toBe(AttributeType.MAT2);
expect(warpMatrixAttribute.normalized).toBe(false);
@@ -2066,7 +2076,7 @@ describe(
expect(temperaturesAttribute.semantic).toBeUndefined();
expect(temperaturesAttribute.setIndex).toBeUndefined();
expect(temperaturesAttribute.componentDatatype).toBe(
- ComponentDatatype.UNSIGNED_SHORT,
+ ComponentDatatype.UNSIGNED_SHORT
);
expect(temperaturesAttribute.type).toBe(AttributeType.VEC2);
expect(temperaturesAttribute.normalized).toBe(true);
@@ -2092,7 +2102,7 @@ describe(
expect(texcoordAttribute.buffer.sizeInBytes).toBe(192);
expect(metallicRoughness.baseColorFactor).toEqual(
- new Cartesian4(1.0, 1.0, 1.0, 1.0),
+ new Cartesian4(1.0, 1.0, 1.0, 1.0)
);
expect(metallicRoughness.metallicFactor).toBe(0.0);
expect(metallicRoughness.roughnessFactor).toBe(1.0);
@@ -2104,10 +2114,10 @@ describe(
expect(sampler.wrapS).toBe(TextureWrap.REPEAT);
expect(sampler.wrapT).toBe(TextureWrap.REPEAT);
expect(sampler.magnificationFilter).toBe(
- TextureMagnificationFilter.LINEAR,
+ TextureMagnificationFilter.LINEAR
);
expect(sampler.minificationFilter).toBe(
- TextureMinificationFilter.NEAREST_MIPMAP_LINEAR,
+ TextureMinificationFilter.NEAREST_MIPMAP_LINEAR
);
expect(nodes.length).toBe(2);
@@ -2120,7 +2130,7 @@ describe(
const warpMatrixProperty = boxProperties.warpMatrix;
expect(warpMatrixProperty.type).toBe(MetadataType.MAT2);
expect(warpMatrixProperty.componentType).toBe(
- MetadataComponentType.FLOAT32,
+ MetadataComponentType.FLOAT32
);
expect(warpMatrixProperty.hasValueTransform).toBe(false);
@@ -2128,18 +2138,21 @@ describe(
boxProperties.transformedWarpMatrix;
expect(transformedWarpMatrixProperty.type).toBe(MetadataType.MAT2);
expect(transformedWarpMatrixProperty.componentType).toBe(
- MetadataComponentType.FLOAT32,
+ MetadataComponentType.FLOAT32
);
expect(transformedWarpMatrixProperty.hasValueTransform).toBe(true);
expect(transformedWarpMatrixProperty.offset).toEqual([
- 0.5, 0.5, 0.5, 0.5,
+ 0.5,
+ 0.5,
+ 0.5,
+ 0.5,
]);
expect(transformedWarpMatrixProperty.scale).toEqual([2, 2, 2, 2]);
const temperaturesProperty = boxProperties.temperatures;
expect(temperaturesProperty.type).toBe(MetadataType.VEC2);
expect(temperaturesProperty.componentType).toBe(
- MetadataComponentType.UINT16,
+ MetadataComponentType.UINT16
);
expect(temperaturesProperty.normalized).toBe(true);
expect(temperaturesProperty.hasValueTransform).toBe(true);
@@ -2156,12 +2169,12 @@ describe(
expect(warpMatrix.hasValueTransform).toBe(false);
const transformedWarpMatrix = propertyAttribute.getProperty(
- "transformedWarpMatrix",
+ "transformedWarpMatrix"
);
expect(transformedWarpMatrix.attribute).toBe("_WARP_MATRIX");
expect(transformedWarpMatrix.hasValueTransform).toBe(true);
expect(transformedWarpMatrix.offset).toEqual(
- new Matrix2(0.5, 0.5, 0.5, 0.5),
+ new Matrix2(0.5, 0.5, 0.5, 0.5)
);
expect(transformedWarpMatrix.scale).toEqual(new Matrix2(2, 2, 2, 2));
@@ -2191,7 +2204,7 @@ describe(
const interleaved = defaultValue(options.interleaved, false);
const instancingDisabled = defaultValue(
options.instancingDisabled,
- false,
+ false
);
const components = loader.components;
@@ -2201,40 +2214,40 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const normalAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.NORMAL,
+ VertexAttributeSemantic.NORMAL
);
const instances = rootNode.instances;
const instancedAttributes = instances.attributes;
const translationAttribute = getAttribute(
instancedAttributes,
- InstanceAttributeSemantic.TRANSLATION,
+ InstanceAttributeSemantic.TRANSLATION
);
const rotationAttribute = getAttribute(
instancedAttributes,
- InstanceAttributeSemantic.ROTATION,
+ InstanceAttributeSemantic.ROTATION
);
const scaleAttribute = getAttribute(
instancedAttributes,
- InstanceAttributeSemantic.SCALE,
+ InstanceAttributeSemantic.SCALE
);
const featureIdAttribute = getAttribute(
instancedAttributes,
InstanceAttributeSemantic.FEATURE_ID,
- 0,
+ 0
);
expect(positionAttribute).toBeDefined();
expect(normalAttribute).toBeDefined();
expect(translationAttribute.semantic).toBe(
- InstanceAttributeSemantic.TRANSLATION,
+ InstanceAttributeSemantic.TRANSLATION
);
expect(translationAttribute.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(translationAttribute.type).toBe(AttributeType.VEC3);
expect(translationAttribute.normalized).toBe(false);
@@ -2244,17 +2257,17 @@ describe(
expect(translationAttribute.constant).toEqual(Cartesian3.ZERO);
expect(translationAttribute.quantization).toBeUndefined();
expect(translationAttribute.typedArray).toEqual(
- new Float32Array([-2, 2, 0, -2, -2, 0, 2, -2, 0, 2, 2, 0]),
+ new Float32Array([-2, 2, 0, -2, -2, 0, 2, -2, 0, 2, 2, 0])
);
expect(translationAttribute.buffer).toBeUndefined();
expect(translationAttribute.byteOffset).toBe(0);
expect(translationAttribute.byteStride).toBeUndefined();
expect(rotationAttribute.semantic).toBe(
- InstanceAttributeSemantic.ROTATION,
+ InstanceAttributeSemantic.ROTATION
);
expect(rotationAttribute.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(rotationAttribute.type).toBe(AttributeType.VEC4);
expect(rotationAttribute.normalized).toBe(false);
@@ -2270,7 +2283,7 @@ describe(
0.3535534143447876, 0.3535534143447876, 0.1464466005563736, 0.8535534143447876,
0.46193981170654297, 0.19134169816970825, 0.46193981170654297, 0.7325378060340881,
0.5319756865501404, 0.022260000929236412, 0.43967971205711365, 0.7233173847198486,
- ]),
+ ])
);
expect(rotationAttribute.buffer).toBeUndefined();
expect(rotationAttribute.byteOffset).toBe(0);
@@ -2292,7 +2305,7 @@ describe(
1, 1, 0.5,
0.75, 0.20000000298023224, 0.5,
0.800000011920929, 0.6000000238418579, 0.8999999761581421,
- ]),
+ ])
);
expect(scaleAttribute.buffer).toBeUndefined();
expect(scaleAttribute.byteOffset).toBe(0);
@@ -2300,7 +2313,7 @@ describe(
expect(featureIdAttribute.setIndex).toBe(0);
expect(featureIdAttribute.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(featureIdAttribute.type).toBe(AttributeType.SCALAR);
expect(featureIdAttribute.normalized).toBe(false);
@@ -2313,7 +2326,7 @@ describe(
// if instancing is disabled.
if (instancingDisabled) {
expect(featureIdAttribute.typedArray).toEqual(
- new Float32Array([0, 0, 1, 1]),
+ new Float32Array([0, 0, 1, 1])
);
expect(featureIdAttribute.buffer).toBeUndefined();
} else {
@@ -2345,7 +2358,7 @@ describe(
const featureIdAttributeMapping0 = instances.featureIds[0];
expect(featureIdAttributeMapping0).toBeInstanceOf(
- ModelComponents.FeatureIdImplicitRange,
+ ModelComponents.FeatureIdImplicitRange
);
expect(featureIdAttributeMapping0.featureCount).toEqual(4);
expect(featureIdAttributeMapping0.nullFeatureId).not.toBeDefined();
@@ -2354,12 +2367,12 @@ describe(
expect(featureIdAttributeMapping0.repeat).toBe(1);
expect(featureIdAttributeMapping0.label).toBe("perInstance");
expect(featureIdAttributeMapping0.positionalLabel).toBe(
- "instanceFeatureId_0",
+ "instanceFeatureId_0"
);
const featureIdAttributeMapping1 = instances.featureIds[1];
expect(featureIdAttributeMapping1).toBeInstanceOf(
- ModelComponents.FeatureIdAttribute,
+ ModelComponents.FeatureIdAttribute
);
expect(featureIdAttributeMapping1.featureCount).toEqual(2);
expect(featureIdAttributeMapping1.nullFeatureId).not.toBeDefined();
@@ -2367,7 +2380,7 @@ describe(
expect(featureIdAttributeMapping1.setIndex).toBe(0);
expect(featureIdAttributeMapping1.label).toBe("section");
expect(featureIdAttributeMapping1.positionalLabel).toBe(
- "instanceFeatureId_1",
+ "instanceFeatureId_1"
);
const boxClass = structuralMetadata.schema.classes.box;
@@ -2375,7 +2388,7 @@ describe(
expect(boxProperties.name.type).toBe(MetadataType.STRING);
expect(boxProperties.name.componentType).not.toBeDefined();
expect(boxProperties.volume.componentType).toBe(
- MetadataComponentType.FLOAT32,
+ MetadataComponentType.FLOAT32
);
const sectionClass = structuralMetadata.schema.classes.section;
@@ -2384,7 +2397,7 @@ describe(
expect(sectionProperties.name.componentType).not.toBeDefined();
expect(sectionProperties.id.type).toBe(MetadataType.SCALAR);
expect(sectionProperties.id.componentType).toBe(
- MetadataComponentType.UINT16,
+ MetadataComponentType.UINT16
);
const boxTable = structuralMetadata.getPropertyTable(0);
@@ -2423,7 +2436,7 @@ describe(
const featureIdAttributeMapping0 = instances.featureIds[0];
expect(featureIdAttributeMapping0).toBeInstanceOf(
- ModelComponents.FeatureIdImplicitRange,
+ ModelComponents.FeatureIdImplicitRange
);
expect(featureIdAttributeMapping0.featureCount).toEqual(4);
expect(featureIdAttributeMapping0.nullFeatureId).not.toBeDefined();
@@ -2432,12 +2445,12 @@ describe(
expect(featureIdAttributeMapping0.repeat).toBe(1);
expect(featureIdAttributeMapping0.label).not.toBeDefined();
expect(featureIdAttributeMapping0.positionalLabel).toBe(
- "instanceFeatureId_0",
+ "instanceFeatureId_0"
);
const featureIdAttributeMapping1 = instances.featureIds[1];
expect(featureIdAttributeMapping1).toBeInstanceOf(
- ModelComponents.FeatureIdAttribute,
+ ModelComponents.FeatureIdAttribute
);
expect(featureIdAttributeMapping1.featureCount).toEqual(2);
expect(featureIdAttributeMapping1.nullFeatureId).not.toBeDefined();
@@ -2445,7 +2458,7 @@ describe(
expect(featureIdAttributeMapping1.setIndex).toBe(0);
expect(featureIdAttributeMapping1.label).not.toBeDefined();
expect(featureIdAttributeMapping1.positionalLabel).toBe(
- "instanceFeatureId_1",
+ "instanceFeatureId_1"
);
const boxClass = structuralMetadata.schema.classes.box;
@@ -2453,7 +2466,7 @@ describe(
expect(boxProperties.name.type).toBe(MetadataType.STRING);
expect(boxProperties.name.componentType).not.toBeDefined();
expect(boxProperties.volume.componentType).toBe(
- MetadataComponentType.FLOAT32,
+ MetadataComponentType.FLOAT32
);
const sectionClass = structuralMetadata.schema.classes.section;
@@ -2462,7 +2475,7 @@ describe(
expect(sectionProperties.name.componentType).not.toBeDefined();
expect(sectionProperties.id.type).toBe(MetadataType.SCALAR);
expect(sectionProperties.id.componentType).toBe(
- MetadataComponentType.UINT16,
+ MetadataComponentType.UINT16
);
const boxTable = structuralMetadata.getPropertyTable(0);
@@ -2524,7 +2537,7 @@ describe(
return loadModifiedGltfAndTest(
boxInstanced,
undefined,
- modifyGltf,
+ modifyGltf
).then(function (gltfLoader) {
const components = gltfLoader.components;
const scene = components.scene;
@@ -2534,7 +2547,7 @@ describe(
const featureIdAttribute = getAttribute(
instancedAttributes,
InstanceAttributeSemantic.FEATURE_ID,
- 0,
+ 0
);
expect(featureIdAttribute.buffer).toBeUndefined();
@@ -2555,21 +2568,21 @@ describe(
const options = {
scene: sceneWithNoInstancing,
};
- return loadGltf(boxInstancedInterleaved, options).then(
- function (gltfLoader) {
- verifyBoxInstancedAttributes(gltfLoader, {
- interleaved: true,
- instancingDisabled: true,
- });
- },
- );
+ return loadGltf(boxInstancedInterleaved, options).then(function (
+ gltfLoader
+ ) {
+ verifyBoxInstancedAttributes(gltfLoader, {
+ interleaved: true,
+ instancingDisabled: true,
+ });
+ });
});
function verifyBoxInstancedTranslation(
loader,
expectMinMax,
expectBufferDefined,
- expectTypedArrayDefined,
+ expectTypedArrayDefined
) {
const components = loader.components;
const scene = components.scene;
@@ -2578,27 +2591,27 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const normalAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.NORMAL,
+ VertexAttributeSemantic.NORMAL
);
const instances = rootNode.instances;
const instancedAttributes = instances.attributes;
const translationAttribute = getAttribute(
instancedAttributes,
- InstanceAttributeSemantic.TRANSLATION,
+ InstanceAttributeSemantic.TRANSLATION
);
expect(positionAttribute).toBeDefined();
expect(normalAttribute).toBeDefined();
expect(translationAttribute.semantic).toBe(
- InstanceAttributeSemantic.TRANSLATION,
+ InstanceAttributeSemantic.TRANSLATION
);
expect(translationAttribute.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(translationAttribute.type).toBe(AttributeType.VEC3);
expect(translationAttribute.normalized).toBe(false);
@@ -2617,7 +2630,7 @@ describe(
if (expectTypedArrayDefined) {
expect(translationAttribute.typedArray).toEqual(
- new Float32Array([-2, 2, 0, -2, -2, 0, 2, -2, 0, 2, 2, 0]),
+ new Float32Array([-2, 2, 0, -2, -2, 0, 2, -2, 0, 2, 2, 0])
);
} else {
expect(translationAttribute.typedArray).toBeUndefined();
@@ -2648,7 +2661,7 @@ describe(
gltfLoader,
expectMinMax,
expectBufferDefined,
- expectTypedArrayDefined,
+ expectTypedArrayDefined
);
});
});
@@ -2657,39 +2670,39 @@ describe(
const options = {
scene: sceneWithNoInstancing,
};
- return loadGltf(boxInstancedTranslation, options).then(
- function (gltfLoader) {
- const expectMinMax = false;
- const expectBufferDefined = false;
- const expectTypedArrayDefined = true;
-
- verifyBoxInstancedTranslation(
- gltfLoader,
- expectMinMax,
- expectBufferDefined,
- expectTypedArrayDefined,
- );
- },
- );
+ return loadGltf(boxInstancedTranslation, options).then(function (
+ gltfLoader
+ ) {
+ const expectMinMax = false;
+ const expectBufferDefined = false;
+ const expectTypedArrayDefined = true;
+
+ verifyBoxInstancedTranslation(
+ gltfLoader,
+ expectMinMax,
+ expectBufferDefined,
+ expectTypedArrayDefined
+ );
+ });
});
it("loads BoxInstancedTranslationWithMinMax", function () {
- return loadGltf(boxInstancedTranslationMinMax).then(
- function (gltfLoader) {
- // The translation accessor does have a min/max, so it only needs to
- // load the buffer.
- const expectMinMax = true;
- const expectBufferDefined = true;
- const expectTypedArrayDefined = false;
-
- verifyBoxInstancedTranslation(
- gltfLoader,
- expectMinMax,
- expectBufferDefined,
- expectTypedArrayDefined,
- );
- },
- );
+ return loadGltf(boxInstancedTranslationMinMax).then(function (
+ gltfLoader
+ ) {
+ // The translation accessor does have a min/max, so it only needs to
+ // load the buffer.
+ const expectMinMax = true;
+ const expectBufferDefined = true;
+ const expectTypedArrayDefined = false;
+
+ verifyBoxInstancedTranslation(
+ gltfLoader,
+ expectMinMax,
+ expectBufferDefined,
+ expectTypedArrayDefined
+ );
+ });
});
});
@@ -2703,16 +2716,16 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const normalAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.NORMAL,
+ VertexAttributeSemantic.NORMAL
);
const texcoordAttribute = getAttribute(
attributes,
VertexAttributeSemantic.TEXCOORD,
- 0,
+ 0
);
const positionQuantization = positionAttribute.quantization;
const normalQuantization = normalAttribute.quantization;
@@ -2722,11 +2735,11 @@ describe(
expect(positionAttribute.name).toBe("POSITION");
expect(positionAttribute.semantic).toBe(
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
expect(positionAttribute.setIndex).toBeUndefined();
expect(positionAttribute.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(positionAttribute.type).toBe(AttributeType.VEC3);
expect(positionAttribute.normalized).toBe(false);
@@ -2735,15 +2748,15 @@ describe(
new Cartesian3(
-69.37933953401223,
9.848530453475558,
- -61.40903695222513,
- ),
+ -61.40903695222513
+ )
);
expect(positionAttribute.max).toEqual(
new Cartesian3(
96.26074059602396,
164.09024489374352,
- 54.029730459044615,
- ),
+ 54.029730459044615
+ )
);
expect(positionAttribute.constant).toEqual(Cartesian3.ZERO);
expect(positionAttribute.typedArray).toBeUndefined();
@@ -2752,24 +2765,24 @@ describe(
expect(positionAttribute.byteStride).toBeUndefined();
expect(positionQuantization.octEncoded).toBe(false);
expect(positionQuantization.normalizationRange).toEqual(
- new Cartesian3(2047, 2047, 2047),
+ new Cartesian3(2047, 2047, 2047)
);
expect(positionQuantization.quantizedVolumeOffset).toEqual(
new Cartesian3(
-69.29850006103516,
9.929369926452637,
- -61.32819747924805,
- ),
+ -61.32819747924805
+ )
);
expect(positionQuantization.quantizedVolumeDimensions).toEqual(
new Cartesian3(
165.4783935546875,
165.4783935546875,
- 165.4783935546875,
- ),
+ 165.4783935546875
+ )
);
expect(positionQuantization.componentDatatype).toBe(
- ComponentDatatype.UNSIGNED_SHORT,
+ ComponentDatatype.UNSIGNED_SHORT
);
expect(positionQuantization.type).toBe(AttributeType.VEC3);
@@ -2784,15 +2797,15 @@ describe(
new Cartesian3(
-1.0069254898557476,
-1.0078414940366558,
- -1.007673468543034,
- ),
+ -1.007673468543034
+ )
);
expect(normalAttribute.max).toEqual(
new Cartesian3(
1.0083384775647932,
1.007422473383885,
- 1.0075904988775068,
- ),
+ 1.0075904988775068
+ )
);
expect(normalAttribute.constant).toEqual(Cartesian3.ZERO);
expect(normalAttribute.typedArray).toBeUndefined();
@@ -2804,26 +2817,26 @@ describe(
expect(normalQuantization.quantizedVolumeOffset).toBeUndefined();
expect(normalQuantization.quantizedVolumeDimensions).toBeUndefined();
expect(normalQuantization.componentDatatype).toBe(
- ComponentDatatype.UNSIGNED_BYTE,
+ ComponentDatatype.UNSIGNED_BYTE
);
expect(normalQuantization.type).toBe(AttributeType.VEC2);
expect(texcoordAttribute.name).toBe("TEXCOORD_0");
expect(texcoordAttribute.semantic).toBe(
- VertexAttributeSemantic.TEXCOORD,
+ VertexAttributeSemantic.TEXCOORD
);
expect(texcoordAttribute.setIndex).toBe(0);
expect(texcoordAttribute.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(texcoordAttribute.type).toBe(AttributeType.VEC2);
expect(texcoordAttribute.normalized).toBe(false);
expect(texcoordAttribute.count).toBe(2399);
expect(texcoordAttribute.min).toEqual(
- new Cartesian2(0.025470511450678954, 0.019024537339121947),
+ new Cartesian2(0.025470511450678954, 0.019024537339121947)
);
expect(texcoordAttribute.max).toEqual(
- new Cartesian2(0.9846059706495423, 0.9809754626608782),
+ new Cartesian2(0.9846059706495423, 0.9809754626608782)
);
expect(texcoordAttribute.constant).toEqual(Cartesian2.ZERO);
expect(texcoordAttribute.typedArray).toBeUndefined();
@@ -2832,16 +2845,16 @@ describe(
expect(texcoordAttribute.byteStride).toBeUndefined();
expect(texcoordQuantization.octEncoded).toBe(false);
expect(texcoordQuantization.normalizationRange).toEqual(
- new Cartesian2(1023, 1023),
+ new Cartesian2(1023, 1023)
);
expect(texcoordQuantization.quantizedVolumeOffset).toEqual(
- new Cartesian2(0.026409000158309937, 0.01996302604675293),
+ new Cartesian2(0.026409000158309937, 0.01996302604675293)
);
expect(texcoordQuantization.quantizedVolumeDimensions).toEqual(
- new Cartesian2(0.9600739479064941, 0.9600739479064941),
+ new Cartesian2(0.9600739479064941, 0.9600739479064941)
);
expect(texcoordQuantization.componentDatatype).toBe(
- ComponentDatatype.UNSIGNED_SHORT,
+ ComponentDatatype.UNSIGNED_SHORT
);
expect(texcoordQuantization.type).toBe(AttributeType.VEC2);
@@ -2868,16 +2881,16 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const normalAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.NORMAL,
+ VertexAttributeSemantic.NORMAL
);
const texcoordAttribute = getAttribute(
attributes,
VertexAttributeSemantic.TEXCOORD,
- 0,
+ 0
);
expect(positionAttribute.quantization).toBeDefined();
@@ -2904,14 +2917,14 @@ describe(
expect(material.emissiveTexture.texture.width).toBe(256);
expect(specularGlossiness.diffuseTexture.texture.width).toBe(256);
expect(specularGlossiness.specularGlossinessTexture.texture.width).toBe(
- 256,
+ 256
);
expect(specularGlossiness.diffuseFactor).toEqual(
- new Cartesian4(1.0, 1.0, 1.0, 1.0),
+ new Cartesian4(1.0, 1.0, 1.0, 1.0)
);
expect(specularGlossiness.specularFactor).toEqual(
- new Cartesian3(1.0, 1.0, 1.0),
+ new Cartesian3(1.0, 1.0, 1.0)
);
expect(specularGlossiness.glossinessFactor).toBe(0.5);
@@ -2981,7 +2994,7 @@ describe(
const uniformScaleStage = stages[6];
expect(uniformScaleStage.name).toEqual("Size");
expect(uniformScaleStage.type).toEqual(
- ArticulationStageType.UNIFORMSCALE,
+ ArticulationStageType.UNIFORMSCALE
);
expect(uniformScaleStage.minimumValue).toEqual(0.0);
expect(uniformScaleStage.maximumValue).toEqual(1.0);
@@ -3014,7 +3027,7 @@ describe(
return loadGltf(boxCesiumRtc).then(function (gltfLoader) {
const components = gltfLoader.components;
const expectedTransform = Matrix4.fromTranslation(
- new Cartesian3(6378137, 0, 0),
+ new Cartesian3(6378137, 0, 0)
);
expect(components.transform).toEqual(expectedTransform);
});
@@ -3028,11 +3041,11 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const normalAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.NORMAL,
+ VertexAttributeSemantic.NORMAL
);
expect(positionAttribute.buffer).toBeDefined();
@@ -3045,7 +3058,7 @@ describe(
const dequantizedValue = 127 / 255.0;
expect(positionAttribute.min).toEqual(new Cartesian3(0.0, 0.0, 0.0));
expect(positionAttribute.max).toEqual(
- new Cartesian3(dequantizedValue, dequantizedValue, dequantizedValue),
+ new Cartesian3(dequantizedValue, dequantizedValue, dequantizedValue)
);
expect(normalAttribute.buffer).toBeDefined();
@@ -3064,25 +3077,25 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const normalAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.NORMAL,
+ VertexAttributeSemantic.NORMAL
);
const scalarAttribute = getAttributeByName(attributes, "_SCALAR_TEST");
const positionQuantization = positionAttribute.quantization;
expect(positionQuantization).toBeDefined();
expect(positionQuantization.quantizedVolumeOffset).toEqual(
- new Cartesian3(-0.5, -0.5, -0.5),
+ new Cartesian3(-0.5, -0.5, -0.5)
);
expect(positionQuantization.quantizedVolumeStepSize).toEqual(
new Cartesian3(
0.000015259021896696422,
0.000015259021896696422,
- 0.000015259021896696422,
- ),
+ 0.000015259021896696422
+ )
);
expect(positionAttribute.min).toEqual(new Cartesian3(-0.5, -0.5, -0.5));
expect(positionAttribute.max).toEqual(new Cartesian3(0.5, 0.5, 0.5));
@@ -3090,14 +3103,14 @@ describe(
const normalQuantization = normalAttribute.quantization;
expect(normalQuantization).toBeDefined();
expect(normalQuantization.quantizedVolumeOffset).toEqual(
- new Cartesian3(-1.0, -1.0, -1.0),
+ new Cartesian3(-1.0, -1.0, -1.0)
);
expect(normalQuantization.quantizedVolumeStepSize).toEqual(
new Cartesian3(
0.000030518043793392844,
0.000030518043793392844,
- 0.000030518043793392844,
- ),
+ 0.000030518043793392844
+ )
);
const scalarQuantization = scalarAttribute.quantization;
@@ -3118,13 +3131,13 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
expect(positionAttribute).toBeDefined();
expect(primitive.indices).toBeDefined();
expect(primitive.indices.indexDatatype).toBe(
- IndexDatatype.UNSIGNED_SHORT,
+ IndexDatatype.UNSIGNED_SHORT
);
expect(primitive.indices.count).toBe(3);
expect(primitive.indices.buffer).toBeDefined();
@@ -3148,14 +3161,14 @@ describe(
gltfLoaders[0].destroy();
gltfLoaders[1].destroy();
- },
+ }
);
});
it("releases glTF JSON after parse", function () {
const destroyGltfJsonLoader = spyOn(
GltfJsonLoader.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
const options = {
@@ -3170,7 +3183,7 @@ describe(
it("releases glTF JSON after unload", function () {
const destroyGltfJsonLoader = spyOn(
GltfJsonLoader.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
const options = {
@@ -3187,7 +3200,7 @@ describe(
it("creates GPU resources asynchronously", function () {
const jobSchedulerExecute = spyOn(
JobScheduler.prototype,
- "execute",
+ "execute"
).and.callThrough();
const options = {
@@ -3202,7 +3215,7 @@ describe(
it("creates GPU resources synchronously", function () {
const jobSchedulerExecute = spyOn(
JobScheduler.prototype,
- "execute",
+ "execute"
).and.callThrough();
const options = {
@@ -3258,22 +3271,22 @@ describe(
it("destroys glTF loader", function () {
const destroyStructuralMetadataLoader = spyOn(
GltfStructuralMetadataLoader.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
const destroyVertexBufferLoader = spyOn(
GltfVertexBufferLoader.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
const destroyIndexBufferLoader = spyOn(
GltfIndexBufferLoader.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
const destroyTextureLoader = spyOn(
GltfTextureLoader.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
return loadGltf(microcosm).then(function (gltfLoader) {
@@ -3299,17 +3312,17 @@ describe(
const destroyVertexBufferLoader = spyOn(
GltfVertexBufferLoader.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
const destroyIndexBufferLoader = spyOn(
GltfIndexBufferLoader.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
const destroyTextureLoader = spyOn(
GltfTextureLoader.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
const options = {
@@ -3321,10 +3334,10 @@ describe(
await gltfLoader.load();
await expectAsync(
- waitForLoaderProcess(gltfLoader, scene),
+ waitForLoaderProcess(gltfLoader, scene)
).toBeRejectedWithError(
RuntimeError,
- "Failed to load glTF\nFailed to load texture\nFailed to load image: CesiumLogoFlat.png\n404 Not Found",
+ "Failed to load glTF\nFailed to load texture\nFailed to load image: CesiumLogoFlat.png\n404 Not Found"
);
expect(destroyVertexBufferLoader.calls.count()).toBe(2);
@@ -3348,7 +3361,7 @@ describe(
}
});
spyOn(GltfJsonLoader.prototype, "_fetchGltf").and.returnValue(
- fetchPromise,
+ fetchPromise
);
const gltfUri = "https://example.com/model.glb";
@@ -3407,13 +3420,13 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
expect(positionAttribute).toBeDefined();
expect(primitive.indices).toBeDefined();
expect(primitive.indices.indexDatatype).toBe(
- IndexDatatype.UNSIGNED_SHORT,
+ IndexDatatype.UNSIGNED_SHORT
);
expect(primitive.indices.count).toBe(3);
expect(primitive.indices.typedArray).toBeDefined();
@@ -3436,13 +3449,13 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
expect(positionAttribute).toBeDefined();
expect(primitive.indices).toBeDefined();
expect(primitive.indices.indexDatatype).toBe(
- IndexDatatype.UNSIGNED_SHORT,
+ IndexDatatype.UNSIGNED_SHORT
);
expect(primitive.indices.count).toBe(3);
expect(primitive.indices.typedArray).not.toBeDefined();
@@ -3468,11 +3481,11 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const normalAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.NORMAL,
+ VertexAttributeSemantic.NORMAL
);
expect(positionAttribute.buffer).toBeUndefined();
@@ -3497,50 +3510,50 @@ describe(
loadAttributesAsTypedArray: true,
};
- return loadGltf(boxInstancedTranslationMinMax, options).then(
- function (gltfLoader) {
- const components = gltfLoader.components;
- const scene = components.scene;
- const rootNode = scene.nodes[0];
- const primitive = rootNode.primitives[0];
- const attributes = primitive.attributes;
- const positionAttribute = getAttribute(
- attributes,
- VertexAttributeSemantic.POSITION,
- );
- const normalAttribute = getAttribute(
- attributes,
- VertexAttributeSemantic.NORMAL,
- );
- const instances = rootNode.instances;
- const instancedAttributes = instances.attributes;
- const translationAttribute = getAttribute(
- instancedAttributes,
- InstanceAttributeSemantic.TRANSLATION,
- );
-
- expect(positionAttribute).toBeDefined();
- expect(normalAttribute).toBeDefined();
-
- expect(translationAttribute.semantic).toBe(
- InstanceAttributeSemantic.TRANSLATION,
- );
- expect(translationAttribute.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
- );
- expect(translationAttribute.type).toBe(AttributeType.VEC3);
- expect(translationAttribute.normalized).toBe(false);
- expect(translationAttribute.count).toBe(4);
- expect(translationAttribute.min).toEqual(new Cartesian3(-2, -2, 0));
- expect(translationAttribute.max).toEqual(new Cartesian3(2, 2, 0));
- expect(translationAttribute.constant).toEqual(Cartesian3.ZERO);
- expect(translationAttribute.quantization).toBeUndefined();
- expect(translationAttribute.typedArray).toBeDefined();
- expect(translationAttribute.buffer).toBeUndefined();
- expect(translationAttribute.byteOffset).toBe(0);
- expect(translationAttribute.byteStride).toBeUndefined();
- },
- );
+ return loadGltf(boxInstancedTranslationMinMax, options).then(function (
+ gltfLoader
+ ) {
+ const components = gltfLoader.components;
+ const scene = components.scene;
+ const rootNode = scene.nodes[0];
+ const primitive = rootNode.primitives[0];
+ const attributes = primitive.attributes;
+ const positionAttribute = getAttribute(
+ attributes,
+ VertexAttributeSemantic.POSITION
+ );
+ const normalAttribute = getAttribute(
+ attributes,
+ VertexAttributeSemantic.NORMAL
+ );
+ const instances = rootNode.instances;
+ const instancedAttributes = instances.attributes;
+ const translationAttribute = getAttribute(
+ instancedAttributes,
+ InstanceAttributeSemantic.TRANSLATION
+ );
+
+ expect(positionAttribute).toBeDefined();
+ expect(normalAttribute).toBeDefined();
+
+ expect(translationAttribute.semantic).toBe(
+ InstanceAttributeSemantic.TRANSLATION
+ );
+ expect(translationAttribute.componentDatatype).toBe(
+ ComponentDatatype.FLOAT
+ );
+ expect(translationAttribute.type).toBe(AttributeType.VEC3);
+ expect(translationAttribute.normalized).toBe(false);
+ expect(translationAttribute.count).toBe(4);
+ expect(translationAttribute.min).toEqual(new Cartesian3(-2, -2, 0));
+ expect(translationAttribute.max).toEqual(new Cartesian3(2, 2, 0));
+ expect(translationAttribute.constant).toEqual(Cartesian3.ZERO);
+ expect(translationAttribute.quantization).toBeUndefined();
+ expect(translationAttribute.typedArray).toBeDefined();
+ expect(translationAttribute.buffer).toBeUndefined();
+ expect(translationAttribute.byteOffset).toBe(0);
+ expect(translationAttribute.byteStride).toBeUndefined();
+ });
});
});
@@ -3559,11 +3572,11 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const normalAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.NORMAL,
+ VertexAttributeSemantic.NORMAL
);
expect(positionAttribute.buffer).toBeDefined();
@@ -3597,7 +3610,7 @@ describe(
// attribute to be loaded as a typed array.
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
expect(positionAttribute.buffer).toBeDefined();
expect(positionAttribute.typedArray).toBeUndefined();
@@ -3621,21 +3634,21 @@ describe(
const instancedAttributes = instances.attributes;
const translationAttribute = getAttribute(
instancedAttributes,
- InstanceAttributeSemantic.TRANSLATION,
+ InstanceAttributeSemantic.TRANSLATION
);
expect(translationAttribute.typedArray).toBeDefined();
expect(translationAttribute.buffer).toBeUndefined();
const rotationAttribute = getAttribute(
instancedAttributes,
- InstanceAttributeSemantic.ROTATION,
+ InstanceAttributeSemantic.ROTATION
);
expect(rotationAttribute.typedArray).toBeDefined();
expect(rotationAttribute.buffer).toBeUndefined();
const scaleAttribute = getAttribute(
instancedAttributes,
- InstanceAttributeSemantic.SCALE,
+ InstanceAttributeSemantic.SCALE
);
expect(scaleAttribute.typedArray).toBeDefined();
expect(scaleAttribute.buffer).toBeUndefined();
@@ -3643,7 +3656,7 @@ describe(
const featureIdAttribute = getAttribute(
instancedAttributes,
InstanceAttributeSemantic.FEATURE_ID,
- 0,
+ 0
);
expect(featureIdAttribute.typedArray).toBeUndefined();
expect(featureIdAttribute.buffer).toBeDefined();
@@ -3655,51 +3668,51 @@ describe(
loadAttributesFor2D: true,
};
- return loadGltf(boxInstancedTranslation, options).then(
- function (gltfLoader) {
- // Since the translation attribute has no min / max readily defined,
- // it will load in as a typed array in addition to a buffer in order
- // to find these bounds at runtime.
- const components = gltfLoader.components;
- const scene = components.scene;
- const rootNode = scene.nodes[0];
- const primitive = rootNode.primitives[0];
- const attributes = primitive.attributes;
- const positionAttribute = getAttribute(
- attributes,
- VertexAttributeSemantic.POSITION,
- );
- const normalAttribute = getAttribute(
- attributes,
- VertexAttributeSemantic.NORMAL,
- );
- const instances = rootNode.instances;
- const instancedAttributes = instances.attributes;
- const translationAttribute = getAttribute(
- instancedAttributes,
- InstanceAttributeSemantic.TRANSLATION,
- );
-
- expect(positionAttribute).toBeDefined();
- expect(normalAttribute).toBeDefined();
-
- expect(translationAttribute.semantic).toBe(
- InstanceAttributeSemantic.TRANSLATION,
- );
- expect(translationAttribute.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
- );
- expect(translationAttribute.type).toBe(AttributeType.VEC3);
- expect(translationAttribute.normalized).toBe(false);
- expect(translationAttribute.count).toBe(4);
- expect(translationAttribute.constant).toEqual(Cartesian3.ZERO);
- expect(translationAttribute.quantization).toBeUndefined();
- expect(translationAttribute.typedArray).toBeDefined();
- expect(translationAttribute.buffer).toBeDefined();
- expect(translationAttribute.byteOffset).toBe(0);
- expect(translationAttribute.byteStride).toBe(12);
- },
- );
+ return loadGltf(boxInstancedTranslation, options).then(function (
+ gltfLoader
+ ) {
+ // Since the translation attribute has no min / max readily defined,
+ // it will load in as a typed array in addition to a buffer in order
+ // to find these bounds at runtime.
+ const components = gltfLoader.components;
+ const scene = components.scene;
+ const rootNode = scene.nodes[0];
+ const primitive = rootNode.primitives[0];
+ const attributes = primitive.attributes;
+ const positionAttribute = getAttribute(
+ attributes,
+ VertexAttributeSemantic.POSITION
+ );
+ const normalAttribute = getAttribute(
+ attributes,
+ VertexAttributeSemantic.NORMAL
+ );
+ const instances = rootNode.instances;
+ const instancedAttributes = instances.attributes;
+ const translationAttribute = getAttribute(
+ instancedAttributes,
+ InstanceAttributeSemantic.TRANSLATION
+ );
+
+ expect(positionAttribute).toBeDefined();
+ expect(normalAttribute).toBeDefined();
+
+ expect(translationAttribute.semantic).toBe(
+ InstanceAttributeSemantic.TRANSLATION
+ );
+ expect(translationAttribute.componentDatatype).toBe(
+ ComponentDatatype.FLOAT
+ );
+ expect(translationAttribute.type).toBe(AttributeType.VEC3);
+ expect(translationAttribute.normalized).toBe(false);
+ expect(translationAttribute.count).toBe(4);
+ expect(translationAttribute.constant).toEqual(Cartesian3.ZERO);
+ expect(translationAttribute.quantization).toBeUndefined();
+ expect(translationAttribute.typedArray).toBeDefined();
+ expect(translationAttribute.buffer).toBeDefined();
+ expect(translationAttribute.byteOffset).toBe(0);
+ expect(translationAttribute.byteStride).toBe(12);
+ });
});
it("loads instanced translation with min/max as buffer and typed array for 2D", function () {
@@ -3707,52 +3720,52 @@ describe(
loadAttributesFor2D: true,
};
- return loadGltf(boxInstancedTranslationMinMax, options).then(
- function (gltfLoader) {
- // Typed arrays are necessary for 2D projection, so this should load
- // both a buffer and a typed array for the attribute.
- const components = gltfLoader.components;
- const scene = components.scene;
- const rootNode = scene.nodes[0];
- const primitive = rootNode.primitives[0];
- const attributes = primitive.attributes;
- const positionAttribute = getAttribute(
- attributes,
- VertexAttributeSemantic.POSITION,
- );
- const normalAttribute = getAttribute(
- attributes,
- VertexAttributeSemantic.NORMAL,
- );
- const instances = rootNode.instances;
- const instancedAttributes = instances.attributes;
- const translationAttribute = getAttribute(
- instancedAttributes,
- InstanceAttributeSemantic.TRANSLATION,
- );
-
- expect(positionAttribute).toBeDefined();
- expect(normalAttribute).toBeDefined();
-
- expect(translationAttribute.semantic).toBe(
- InstanceAttributeSemantic.TRANSLATION,
- );
- expect(translationAttribute.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
- );
- expect(translationAttribute.type).toBe(AttributeType.VEC3);
- expect(translationAttribute.normalized).toBe(false);
- expect(translationAttribute.count).toBe(4);
- expect(translationAttribute.min).toEqual(new Cartesian3(-2, -2, 0));
- expect(translationAttribute.max).toEqual(new Cartesian3(2, 2, 0));
- expect(translationAttribute.constant).toEqual(Cartesian3.ZERO);
- expect(translationAttribute.quantization).toBeUndefined();
- expect(translationAttribute.typedArray).toBeDefined();
- expect(translationAttribute.buffer).toBeDefined();
- expect(translationAttribute.byteOffset).toBe(0);
- expect(translationAttribute.byteStride).toBe(12);
- },
- );
+ return loadGltf(boxInstancedTranslationMinMax, options).then(function (
+ gltfLoader
+ ) {
+ // Typed arrays are necessary for 2D projection, so this should load
+ // both a buffer and a typed array for the attribute.
+ const components = gltfLoader.components;
+ const scene = components.scene;
+ const rootNode = scene.nodes[0];
+ const primitive = rootNode.primitives[0];
+ const attributes = primitive.attributes;
+ const positionAttribute = getAttribute(
+ attributes,
+ VertexAttributeSemantic.POSITION
+ );
+ const normalAttribute = getAttribute(
+ attributes,
+ VertexAttributeSemantic.NORMAL
+ );
+ const instances = rootNode.instances;
+ const instancedAttributes = instances.attributes;
+ const translationAttribute = getAttribute(
+ instancedAttributes,
+ InstanceAttributeSemantic.TRANSLATION
+ );
+
+ expect(positionAttribute).toBeDefined();
+ expect(normalAttribute).toBeDefined();
+
+ expect(translationAttribute.semantic).toBe(
+ InstanceAttributeSemantic.TRANSLATION
+ );
+ expect(translationAttribute.componentDatatype).toBe(
+ ComponentDatatype.FLOAT
+ );
+ expect(translationAttribute.type).toBe(AttributeType.VEC3);
+ expect(translationAttribute.normalized).toBe(false);
+ expect(translationAttribute.count).toBe(4);
+ expect(translationAttribute.min).toEqual(new Cartesian3(-2, -2, 0));
+ expect(translationAttribute.max).toEqual(new Cartesian3(2, 2, 0));
+ expect(translationAttribute.constant).toEqual(Cartesian3.ZERO);
+ expect(translationAttribute.quantization).toBeUndefined();
+ expect(translationAttribute.typedArray).toBeDefined();
+ expect(translationAttribute.buffer).toBeDefined();
+ expect(translationAttribute.byteOffset).toBe(0);
+ expect(translationAttribute.byteStride).toBe(12);
+ });
});
});
@@ -3771,21 +3784,21 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const normalAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.NORMAL,
+ VertexAttributeSemantic.NORMAL
);
const texcoordAttribute = getAttribute(
attributes,
VertexAttributeSemantic.TEXCOORD,
- 0,
+ 0
);
const colorAttribute = getAttribute(
attributes,
VertexAttributeSemantic.COLOR,
- 0,
+ 0
);
expect(positionAttribute).toBeDefined();
@@ -3812,16 +3825,16 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const normalAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.NORMAL,
+ VertexAttributeSemantic.NORMAL
);
const featureIdAttribute = getAttribute(
attributes,
VertexAttributeSemantic.FEATURE_ID,
- 0,
+ 0
);
expect(positionAttribute).toBeDefined();
@@ -3833,7 +3846,7 @@ describe(
expect(featureIdAttribute.name).toBe("_FEATURE_ID_0");
expect(featureIdAttribute.semantic).toBe(
- VertexAttributeSemantic.FEATURE_ID,
+ VertexAttributeSemantic.FEATURE_ID
);
expect(featureIdAttribute.setIndex).toBe(0);
expect(featureIdAttribute.buffer).toBeDefined();
@@ -3858,7 +3871,7 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
expect(positionAttribute).toBeDefined();
expect(positionAttribute.buffer).toBeDefined();
@@ -3885,17 +3898,17 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const jointsAttribute = getAttribute(
attributes,
VertexAttributeSemantic.JOINTS,
- 0,
+ 0
);
const weightsAttribute = getAttribute(
attributes,
VertexAttributeSemantic.WEIGHTS,
- 0,
+ 0
);
expect(positionAttribute).toBeDefined();
@@ -3922,7 +3935,7 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
expect(positionAttribute).toBeDefined();
@@ -3946,20 +3959,20 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const normalAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.NORMAL,
+ VertexAttributeSemantic.NORMAL
);
const tangentAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.TANGENT,
+ VertexAttributeSemantic.TANGENT
);
const texcoordAttribute = getAttribute(
attributes,
VertexAttributeSemantic.TEXCOORD,
- 0,
+ 0
);
expect(positionAttribute).toBeDefined();
@@ -3978,10 +3991,10 @@ describe(
};
await expectAsync(
- loadGltf(boxInstanced, options),
+ loadGltf(boxInstanced, options)
).toBeRejectedWithError(
RuntimeError,
- "Failed to load glTF\nModels with the EXT_mesh_gpu_instancing extension cannot be used for classification.",
+ "Failed to load glTF\nModels with the EXT_mesh_gpu_instancing extension cannot be used for classification."
);
});
@@ -3991,10 +4004,10 @@ describe(
};
await expectAsync(
- loadGltf(pointCloudWithPropertyAttributes, options),
+ loadGltf(pointCloudWithPropertyAttributes, options)
).toBeRejectedWithError(
RuntimeError,
- "Failed to load glTF\nOnly triangle meshes can be used for classification.",
+ "Failed to load glTF\nOnly triangle meshes can be used for classification."
);
});
});
@@ -4009,16 +4022,16 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const normalAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.NORMAL,
+ VertexAttributeSemantic.NORMAL
);
const texCoordAttribute = getAttribute(
attributes,
VertexAttributeSemantic.TEXCOORD,
- 0,
+ 0
);
expect(positionAttribute).toBeDefined();
@@ -4043,92 +4056,92 @@ describe(
});
it("loads model with CESIUM_primitive_outline with shared vertices", function () {
- return loadGltf(boxWithPrimitiveOutlineSharedVertices).then(
- function (gltfLoader) {
- const components = gltfLoader.components;
- const scene = components.scene;
- const [rootNode] = scene.nodes;
- const [primitive] = rootNode.primitives;
+ return loadGltf(boxWithPrimitiveOutlineSharedVertices).then(function (
+ gltfLoader
+ ) {
+ const components = gltfLoader.components;
+ const scene = components.scene;
+ const [rootNode] = scene.nodes;
+ const [primitive] = rootNode.primitives;
- const attributes = primitive.attributes;
- const positionAttribute = getAttribute(
- attributes,
- VertexAttributeSemantic.POSITION,
- );
- const normalAttribute = getAttribute(
- attributes,
- VertexAttributeSemantic.NORMAL,
- );
- const texCoordAttribute = getAttribute(
- attributes,
- VertexAttributeSemantic.TEXCOORD,
- 0,
- );
+ const attributes = primitive.attributes;
+ const positionAttribute = getAttribute(
+ attributes,
+ VertexAttributeSemantic.POSITION
+ );
+ const normalAttribute = getAttribute(
+ attributes,
+ VertexAttributeSemantic.NORMAL
+ );
+ const texCoordAttribute = getAttribute(
+ attributes,
+ VertexAttributeSemantic.TEXCOORD,
+ 0
+ );
- expect(positionAttribute).toBeDefined();
- expect(normalAttribute).not.toBeDefined();
- expect(texCoordAttribute).not.toBeDefined();
+ expect(positionAttribute).toBeDefined();
+ expect(normalAttribute).not.toBeDefined();
+ expect(texCoordAttribute).not.toBeDefined();
- const indices = primitive.indices;
- expect(indices).toBeDefined();
- expect(indices.buffer).toBeDefined();
- expect(indices.typedArray).not.toBeDefined();
- expect(indices.count).toBe(36);
-
- const outlineCoordinates = primitive.outlineCoordinates;
- expect(outlineCoordinates).toBeDefined();
- expect(outlineCoordinates.name).toBe("_OUTLINE_COORDINATES");
- // the model originally had 8 vertices, but some are duplicated
- // when generating outlines
- expect(outlineCoordinates.count).toBe(16);
- expect(outlineCoordinates.semantic).not.toBeDefined();
- expect(outlineCoordinates.type).toBe(AttributeType.VEC3);
- expect(outlineCoordinates.buffer).toBeDefined();
- expect(outlineCoordinates.typedArray).not.toBeDefined();
- },
- );
+ const indices = primitive.indices;
+ expect(indices).toBeDefined();
+ expect(indices.buffer).toBeDefined();
+ expect(indices.typedArray).not.toBeDefined();
+ expect(indices.count).toBe(36);
+
+ const outlineCoordinates = primitive.outlineCoordinates;
+ expect(outlineCoordinates).toBeDefined();
+ expect(outlineCoordinates.name).toBe("_OUTLINE_COORDINATES");
+ // the model originally had 8 vertices, but some are duplicated
+ // when generating outlines
+ expect(outlineCoordinates.count).toBe(16);
+ expect(outlineCoordinates.semantic).not.toBeDefined();
+ expect(outlineCoordinates.type).toBe(AttributeType.VEC3);
+ expect(outlineCoordinates.buffer).toBeDefined();
+ expect(outlineCoordinates.typedArray).not.toBeDefined();
+ });
});
it("does not load CESIUM_primitive_outline if loadPrimitiveOutline is false", function () {
const options = {
loadPrimitiveOutline: false,
};
- return loadGltf(boxWithPrimitiveOutline, options).then(
- function (gltfLoader) {
- const components = gltfLoader.components;
- const scene = components.scene;
- const [rootNode] = scene.nodes;
- const [primitive] = rootNode.primitives;
+ return loadGltf(boxWithPrimitiveOutline, options).then(function (
+ gltfLoader
+ ) {
+ const components = gltfLoader.components;
+ const scene = components.scene;
+ const [rootNode] = scene.nodes;
+ const [primitive] = rootNode.primitives;
- const attributes = primitive.attributes;
- const positionAttribute = getAttribute(
- attributes,
- VertexAttributeSemantic.POSITION,
- );
- const normalAttribute = getAttribute(
- attributes,
- VertexAttributeSemantic.NORMAL,
- );
- const texCoordAttribute = getAttribute(
- attributes,
- VertexAttributeSemantic.TEXCOORD,
- 0,
- );
+ const attributes = primitive.attributes;
+ const positionAttribute = getAttribute(
+ attributes,
+ VertexAttributeSemantic.POSITION
+ );
+ const normalAttribute = getAttribute(
+ attributes,
+ VertexAttributeSemantic.NORMAL
+ );
+ const texCoordAttribute = getAttribute(
+ attributes,
+ VertexAttributeSemantic.TEXCOORD,
+ 0
+ );
- expect(positionAttribute).toBeDefined();
- expect(normalAttribute).toBeDefined();
- expect(texCoordAttribute).toBeDefined();
+ expect(positionAttribute).toBeDefined();
+ expect(normalAttribute).toBeDefined();
+ expect(texCoordAttribute).toBeDefined();
- const indices = primitive.indices;
- expect(indices).toBeDefined();
- expect(indices.buffer).toBeDefined();
- expect(indices.typedArray).not.toBeDefined();
- expect(indices.count).toBe(36);
+ const indices = primitive.indices;
+ expect(indices).toBeDefined();
+ expect(indices.buffer).toBeDefined();
+ expect(indices.typedArray).not.toBeDefined();
+ expect(indices.count).toBe(36);
- const outlineCoordinates = primitive.outlineCoordinates;
- expect(outlineCoordinates).not.toBeDefined();
- },
- );
+ const outlineCoordinates = primitive.outlineCoordinates;
+ expect(outlineCoordinates).not.toBeDefined();
+ });
});
it("loads model with KHR_materials_specular extension", async function () {
@@ -4139,7 +4152,7 @@ describe(
expect(material.specular.specularFactor).toEqual(0.7);
expect(material.specular.specularTexture.texture.width).toBe(256);
expect(material.specular.specularColorFactor).toEqual(
- Cartesian3.fromElements(50, 0, 0),
+ Cartesian3.fromElements(50, 0, 0)
);
expect(material.specular.specularTexture.texture.width).toBe(256);
});
@@ -4148,8 +4161,11 @@ describe(
const gltfLoader = await loadGltf(anisotropyTestData);
const { material } = gltfLoader.components.nodes[1].primitives[0];
- const { anisotropyStrength, anisotropyRotation, anisotropyTexture } =
- material.anisotropy;
+ const {
+ anisotropyStrength,
+ anisotropyRotation,
+ anisotropyTexture,
+ } = material.anisotropy;
expect(anisotropyStrength).toBe(0.5);
expect(anisotropyRotation).toBe(0.349065850398866);
@@ -4195,5 +4211,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/GltfLoaderUtilSpec.js b/packages/engine/Specs/Scene/GltfLoaderUtilSpec.js
index bef2cf665012..dd30771963ef 100644
--- a/packages/engine/Specs/Scene/GltfLoaderUtilSpec.js
+++ b/packages/engine/Specs/Scene/GltfLoaderUtilSpec.js
@@ -173,7 +173,7 @@ describe(
expect(sampler.wrapT).toBe(TextureWrap.REPEAT);
expect(sampler.minificationFilter).toBe(TextureMinificationFilter.LINEAR);
expect(sampler.magnificationFilter).toBe(
- TextureMagnificationFilter.LINEAR,
+ TextureMagnificationFilter.LINEAR
);
});
@@ -203,10 +203,10 @@ describe(
expect(sampler.wrapS).toBe(TextureWrap.REPEAT);
expect(sampler.wrapT).toBe(TextureWrap.REPEAT);
expect(sampler.minificationFilter).toBe(
- TextureMinificationFilter.NEAREST,
+ TextureMinificationFilter.NEAREST
);
expect(sampler.magnificationFilter).toBe(
- TextureMagnificationFilter.LINEAR,
+ TextureMagnificationFilter.LINEAR
);
});
@@ -237,7 +237,7 @@ describe(
expect(sampler.wrapT).toBe(TextureWrap.REPEAT);
expect(sampler.minificationFilter).toBe(TextureMinificationFilter.LINEAR);
expect(sampler.magnificationFilter).toBe(
- TextureMagnificationFilter.LINEAR,
+ TextureMagnificationFilter.LINEAR
);
});
@@ -284,7 +284,7 @@ describe(
expect(sampler.wrapT).toBe(TextureWrap.REPEAT);
expect(sampler.minificationFilter).toBe(TextureMinificationFilter.LINEAR);
expect(sampler.magnificationFilter).toBe(
- TextureMagnificationFilter.LINEAR,
+ TextureMagnificationFilter.LINEAR
);
});
@@ -402,5 +402,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/GltfStructuralMetadataLoaderSpec.js b/packages/engine/Specs/Scene/GltfStructuralMetadataLoaderSpec.js
index abbc32ae0f9d..6901bbdf1657 100644
--- a/packages/engine/Specs/Scene/GltfStructuralMetadataLoaderSpec.js
+++ b/packages/engine/Specs/Scene/GltfStructuralMetadataLoaderSpec.js
@@ -258,7 +258,7 @@ describe(
});
spyOn(Resource.prototype, "fetchImage").and.returnValue(
- Promise.resolve(image),
+ Promise.resolve(image)
);
const structuralMetadataLoader = new GltfStructuralMetadataLoader({
@@ -272,13 +272,13 @@ describe(
await expectAsync(structuralMetadataLoader.load()).toBeRejectedWithError(
RuntimeError,
- "Failed to load structural metadata\nFailed to load buffer view\nFailed to load external buffer: https://example.com/external.bin\n404 Not Found",
+ "Failed to load structural metadata\nFailed to load buffer view\nFailed to load external buffer: https://example.com/external.bin\n404 Not Found"
);
});
it("load throws if texture fails to load", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(buffer),
+ Promise.resolve(buffer)
);
spyOn(Resource.prototype, "fetchImage").and.callFake(function () {
@@ -297,17 +297,17 @@ describe(
await expectAsync(structuralMetadataLoader.load()).toBeRejectedWithError(
RuntimeError,
- "Failed to load structural metadata\nFailed to load texture\nFailed to load image: map.png\n404 Not Found",
+ "Failed to load structural metadata\nFailed to load texture\nFailed to load image: map.png\n404 Not Found"
);
});
it("load throws if external schema fails to load", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(buffer),
+ Promise.resolve(buffer)
);
spyOn(Resource.prototype, "fetchImage").and.returnValue(
- Promise.resolve(image),
+ Promise.resolve(image)
);
spyOn(Resource.prototype, "fetchJson").and.callFake(function () {
@@ -326,17 +326,17 @@ describe(
await expectAsync(structuralMetadataLoader.load()).toBeRejectedWithError(
RuntimeError,
- "Failed to load structural metadata\nFailed to load schema: https://example.com/schema.json\n404 Not Found",
+ "Failed to load structural metadata\nFailed to load schema: https://example.com/schema.json\n404 Not Found"
);
});
it("loads structural metadata", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(buffer),
+ Promise.resolve(buffer)
);
spyOn(Resource.prototype, "fetchImage").and.returnValue(
- Promise.resolve(image),
+ Promise.resolve(image)
);
const structuralMetadataLoader = new GltfStructuralMetadataLoader({
@@ -351,7 +351,7 @@ describe(
await structuralMetadataLoader.load();
await waitForLoaderProcess(structuralMetadataLoader, scene);
expect(() =>
- loaderProcess(structuralMetadataLoader, scene),
+ loaderProcess(structuralMetadataLoader, scene)
).not.toThrow();
const structuralMetadata = structuralMetadataLoader.structuralMetadata;
@@ -380,13 +380,13 @@ describe(
expect(colorProperty.textureReader.texture.width).toBe(1);
expect(colorProperty.textureReader.texture.height).toBe(1);
expect(colorProperty.textureReader.texture).toBe(
- intensityProperty.textureReader.texture,
+ intensityProperty.textureReader.texture
);
expect(vegetationProperty.textureReader.texture.width).toBe(1);
expect(vegetationProperty.textureReader.texture.height).toBe(1);
expect(vegetationProperty.textureReader.texture).not.toBe(
- colorProperty.textureReader.texture,
+ colorProperty.textureReader.texture
);
expect(Object.keys(structuralMetadata.schema.classes).sort()).toEqual([
@@ -399,15 +399,15 @@ describe(
it("loads structural metadata with external schema", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(buffer),
+ Promise.resolve(buffer)
);
spyOn(Resource.prototype, "fetchImage").and.returnValue(
- Promise.resolve(image),
+ Promise.resolve(image)
);
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(schemaJson),
+ Promise.resolve(schemaJson)
);
const structuralMetadataLoader = new GltfStructuralMetadataLoader({
@@ -433,30 +433,30 @@ describe(
it("destroys structural metadata", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(buffer),
+ Promise.resolve(buffer)
);
spyOn(Resource.prototype, "fetchImage").and.returnValue(
- Promise.resolve(image),
+ Promise.resolve(image)
);
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(schemaJson),
+ Promise.resolve(schemaJson)
);
const destroyBufferView = spyOn(
GltfBufferViewLoader.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
const destroyTexture = spyOn(
GltfTextureLoader.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
const destroySchema = spyOn(
MetadataSchemaLoader.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
const structuralMetadataLoader = new GltfStructuralMetadataLoader({
@@ -486,28 +486,28 @@ describe(
async function resolveAfterDestroy(rejectPromise) {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(buffer),
+ Promise.resolve(buffer)
);
spyOn(Resource.prototype, "fetchImage").and.returnValue(
- Promise.resolve(image),
+ Promise.resolve(image)
);
spyOn(Resource.prototype, "fetchJson").and.callFake(() =>
rejectPromise
? Promise.reject(new Error(""))
- : Promise.resolve(schemaJson),
+ : Promise.resolve(schemaJson)
);
const destroyBufferView = spyOn(
GltfBufferViewLoader.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
const destroyTexture = spyOn(
GltfTextureLoader.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
const destroySchema = spyOn(
MetadataSchemaLoader.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
const structuralMetadataLoader = new GltfStructuralMetadataLoader({
@@ -539,5 +539,5 @@ describe(
return resolveAfterDestroy(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/GltfTextureLoaderSpec.js b/packages/engine/Specs/Scene/GltfTextureLoaderSpec.js
index b6414a5f6182..0845aca115ab 100644
--- a/packages/engine/Specs/Scene/GltfTextureLoaderSpec.js
+++ b/packages/engine/Specs/Scene/GltfTextureLoaderSpec.js
@@ -235,7 +235,7 @@ describe(
it("load throws if image fails to load", async function () {
spyOn(Resource.prototype, "fetchImage").and.callFake(() =>
- Promise.reject(new Error("404 Not Found")),
+ Promise.reject(new Error("404 Not Found"))
);
const textureLoader = new GltfTextureLoader({
@@ -249,13 +249,13 @@ describe(
await expectAsync(textureLoader.load()).toBeRejectedWithError(
RuntimeError,
- "Failed to load texture\nFailed to load image: image.png\n404 Not Found",
+ "Failed to load texture\nFailed to load image: image.png\n404 Not Found"
);
});
it("loads texture", async function () {
spyOn(Resource.prototype, "fetchImage").and.returnValue(
- Promise.resolve(image),
+ Promise.resolve(image)
);
// Simulate JobScheduler not being ready for a few frames
@@ -263,14 +263,15 @@ describe(
let processCallsCount = 0;
const jobScheduler = scene.frameState.jobScheduler;
const originalJobSchedulerExecute = jobScheduler.execute;
- spyOn(JobScheduler.prototype, "execute").and.callFake(
- function (job, jobType) {
- if (processCallsCount++ >= processCallsTotal) {
- return originalJobSchedulerExecute.call(jobScheduler, job, jobType);
- }
- return false;
- },
- );
+ spyOn(JobScheduler.prototype, "execute").and.callFake(function (
+ job,
+ jobType
+ ) {
+ if (processCallsCount++ >= processCallsTotal) {
+ return originalJobSchedulerExecute.call(jobScheduler, job, jobType);
+ }
+ return false;
+ });
const textureLoader = new GltfTextureLoader({
resourceCache: ResourceCache,
@@ -290,13 +291,13 @@ describe(
expect(textureLoader.texture.width).toBe(1);
expect(textureLoader.texture.height).toBe(1);
expect(ResourceCache.statistics.texturesByteLength).toBe(
- textureLoader.texture.sizeInBytes,
+ textureLoader.texture.sizeInBytes
);
});
it("creates texture synchronously", async function () {
spyOn(Resource.prototype, "fetchImage").and.returnValue(
- Promise.resolve(image),
+ Promise.resolve(image)
);
const textureLoader = new GltfTextureLoader({
@@ -403,18 +404,18 @@ describe(
compressedTextureNoMipmap: true,
});
expect(textureLoader.texture.sampler.minificationFilter).toBe(
- TextureMinificationFilter.NEAREST,
+ TextureMinificationFilter.NEAREST
);
});
it("generates mipmap if sampler requires it", async function () {
spyOn(Resource.prototype, "fetchImage").and.returnValue(
- Promise.resolve(image),
+ Promise.resolve(image)
);
const generateMipmap = spyOn(
Texture.prototype,
- "generateMipmap",
+ "generateMipmap"
).and.callThrough();
const textureLoader = new GltfTextureLoader({
@@ -436,7 +437,7 @@ describe(
it("generates power-of-two texture if sampler requires it", async function () {
spyOn(Resource.prototype, "fetchImage").and.returnValue(
- Promise.resolve(imageNpot),
+ Promise.resolve(imageNpot)
);
const textureLoader = new GltfTextureLoader({
@@ -457,7 +458,7 @@ describe(
it("does not generate power-of-two texture if sampler does not require it", async function () {
spyOn(Resource.prototype, "fetchImage").and.returnValue(
- Promise.resolve(imageNpot),
+ Promise.resolve(imageNpot)
);
const textureLoader = new GltfTextureLoader({
@@ -478,17 +479,17 @@ describe(
it("destroys texture loader", async function () {
spyOn(Resource.prototype, "fetchImage").and.returnValue(
- Promise.resolve(image),
+ Promise.resolve(image)
);
const unloadImage = spyOn(
GltfImageLoader.prototype,
- "unload",
+ "unload"
).and.callThrough();
const destroyTexture = spyOn(
Texture.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
const textureLoader = new GltfTextureLoader({
@@ -524,7 +525,7 @@ describe(
} else {
resolve(image);
}
- }),
+ })
);
const textureLoader = new GltfTextureLoader({
@@ -554,5 +555,5 @@ describe(
return resolveImageAfterDestroy(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/GltfVertexBufferLoaderSpec.js b/packages/engine/Specs/Scene/GltfVertexBufferLoaderSpec.js
index 9e6670d5f5b2..8351e05d96dc 100644
--- a/packages/engine/Specs/Scene/GltfVertexBufferLoaderSpec.js
+++ b/packages/engine/Specs/Scene/GltfVertexBufferLoaderSpec.js
@@ -20,7 +20,14 @@ describe(
"Scene/GltfVertexBufferLoader",
function () {
const dracoBufferTypedArray = new Uint8Array([
- 1, 3, 7, 15, 31, 63, 127, 255,
+ 1,
+ 3,
+ 7,
+ 15,
+ 31,
+ 63,
+ 127,
+ 255,
]);
const dracoArrayBuffer = dracoBufferTypedArray.buffer;
@@ -347,7 +354,7 @@ describe(
it("load throws if buffer view fails to load", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.callFake(() =>
- Promise.reject(new Error("404 Not Found")),
+ Promise.reject(new Error("404 Not Found"))
);
const vertexBufferLoader = new GltfVertexBufferLoader({
@@ -361,13 +368,13 @@ describe(
await expectAsync(vertexBufferLoader.load()).toBeRejectedWithError(
RuntimeError,
- "Failed to load vertex buffer\nFailed to load buffer view\nFailed to load external buffer: https://example.com/external.bin\n404 Not Found",
+ "Failed to load vertex buffer\nFailed to load buffer view\nFailed to load external buffer: https://example.com/external.bin\n404 Not Found"
);
});
it("process throws if draco fails to load", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(dracoArrayBuffer),
+ Promise.resolve(dracoArrayBuffer)
);
spyOn(DracoLoader, "decodeBufferView").and.callFake(function () {
@@ -388,16 +395,16 @@ describe(
await vertexBufferLoader.load();
await expectAsync(
- waitForLoaderProcess(vertexBufferLoader, scene),
+ waitForLoaderProcess(vertexBufferLoader, scene)
).toBeRejectedWithError(
RuntimeError,
- "Failed to load vertex buffer\nFailed to load Draco\nDraco decode failed",
+ "Failed to load vertex buffer\nFailed to load Draco\nDraco decode failed"
);
});
it("loads as buffer", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
// Simulate JobScheduler not being ready for a few frames
@@ -405,14 +412,15 @@ describe(
let processCallsCount = 0;
const jobScheduler = scene.frameState.jobScheduler;
const originalJobSchedulerExecute = jobScheduler.execute;
- spyOn(JobScheduler.prototype, "execute").and.callFake(
- function (job, jobType) {
- if (processCallsCount++ >= processCallsTotal) {
- return originalJobSchedulerExecute.call(jobScheduler, job, jobType);
- }
- return false;
- },
- );
+ spyOn(JobScheduler.prototype, "execute").and.callFake(function (
+ job,
+ jobType
+ ) {
+ if (processCallsCount++ >= processCallsTotal) {
+ return originalJobSchedulerExecute.call(jobScheduler, job, jobType);
+ }
+ return false;
+ });
const vertexBufferLoader = new GltfVertexBufferLoader({
resourceCache: ResourceCache,
@@ -431,13 +439,13 @@ describe(
expect(vertexBufferLoader.buffer.sizeInBytes).toBe(positions.byteLength);
expect(vertexBufferLoader.typedArray).toBeUndefined();
expect(ResourceCache.statistics.geometryByteLength).toBe(
- vertexBufferLoader.buffer.sizeInBytes,
+ vertexBufferLoader.buffer.sizeInBytes
);
});
it("loads as typed array", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
spyOn(Buffer, "createVertexBuffer").and.callThrough();
@@ -457,19 +465,19 @@ describe(
expect(() => loaderProcess(vertexBufferLoader, scene)).not.toThrowError();
expect(vertexBufferLoader.typedArray.byteLength).toBe(
- positions.byteLength,
+ positions.byteLength
);
expect(vertexBufferLoader.buffer).toBeUndefined();
expect(Buffer.createVertexBuffer.calls.count()).toBe(0);
expect(ResourceCache.statistics.geometryByteLength).toBe(
- vertexBufferLoader.typedArray.byteLength,
+ vertexBufferLoader.typedArray.byteLength
);
});
it("loads as both buffer and typed array", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
// Simulate JobScheduler not being ready for a few frames
@@ -477,14 +485,15 @@ describe(
let processCallsCount = 0;
const jobScheduler = scene.frameState.jobScheduler;
const originalJobSchedulerExecute = jobScheduler.execute;
- spyOn(JobScheduler.prototype, "execute").and.callFake(
- function (job, jobType) {
- if (processCallsCount++ >= processCallsTotal) {
- return originalJobSchedulerExecute.call(jobScheduler, job, jobType);
- }
- return false;
- },
- );
+ spyOn(JobScheduler.prototype, "execute").and.callFake(function (
+ job,
+ jobType
+ ) {
+ if (processCallsCount++ >= processCallsTotal) {
+ return originalJobSchedulerExecute.call(jobScheduler, job, jobType);
+ }
+ return false;
+ });
const vertexBufferLoader = new GltfVertexBufferLoader({
resourceCache: ResourceCache,
@@ -503,7 +512,7 @@ describe(
expect(() => loaderProcess(vertexBufferLoader, scene)).not.toThrowError();
expect(vertexBufferLoader.buffer.sizeInBytes).toBe(positions.byteLength);
expect(vertexBufferLoader.typedArray.byteLength).toBe(
- positions.byteLength,
+ positions.byteLength
);
const totalSize =
vertexBufferLoader.typedArray.byteLength +
@@ -513,7 +522,7 @@ describe(
it("creates vertex buffer synchronously", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
const vertexBufferLoader = new GltfVertexBufferLoader({
@@ -535,7 +544,7 @@ describe(
it("loads positions from draco", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
// Simulate decodeBufferView not being ready for a few frames
@@ -564,31 +573,31 @@ describe(
expect(() => loaderProcess(vertexBufferLoader, scene)).not.toThrowError();
expect(vertexBufferLoader.buffer.sizeInBytes).toBe(
- decodedPositions.byteLength,
+ decodedPositions.byteLength
);
expect(vertexBufferLoader.typedArray).toBeUndefined();
const quantization = vertexBufferLoader.quantization;
expect(quantization.octEncoded).toBe(false);
expect(quantization.quantizedVolumeOffset).toEqual(
- new Cartesian3(-1.0, -1.0, -1.0),
+ new Cartesian3(-1.0, -1.0, -1.0)
);
expect(quantization.quantizedVolumeDimensions).toEqual(
- new Cartesian3(2.0, 2.0, 2.0),
+ new Cartesian3(2.0, 2.0, 2.0)
);
expect(quantization.normalizationRange).toEqual(
- new Cartesian3(16383, 16383, 16383),
+ new Cartesian3(16383, 16383, 16383)
);
expect(quantization.componentDatatype).toBe(
- ComponentDatatype.UNSIGNED_SHORT,
+ ComponentDatatype.UNSIGNED_SHORT
);
expect(ResourceCache.statistics.geometryByteLength).toBe(
- vertexBufferLoader.buffer.sizeInBytes,
+ vertexBufferLoader.buffer.sizeInBytes
);
});
it("loads normals from draco", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
spyOn(DracoLoader, "decodeBufferView").and.callFake(function () {
@@ -610,7 +619,7 @@ describe(
await waitForLoaderProcess(vertexBufferLoader, scene);
expect(vertexBufferLoader.buffer.sizeInBytes).toBe(
- decodedNormals.byteLength,
+ decodedNormals.byteLength
);
const quantization = vertexBufferLoader.quantization;
@@ -620,23 +629,23 @@ describe(
expect(quantization.quantizedVolumeDimensions).toBeUndefined();
expect(quantization.normalizationRange).toBe(1023);
expect(quantization.componentDatatype).toBe(
- ComponentDatatype.UNSIGNED_BYTE,
+ ComponentDatatype.UNSIGNED_BYTE
);
});
it("destroys vertex buffer loaded from buffer view", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
const unloadBufferView = spyOn(
GltfBufferViewLoader.prototype,
- "unload",
+ "unload"
).and.callThrough();
const destroyVertexBuffer = spyOn(
Buffer.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
const vertexBufferLoader = new GltfVertexBufferLoader({
@@ -664,21 +673,21 @@ describe(
it("destroys vertex buffer loaded from draco", async function () {
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(arrayBuffer),
+ Promise.resolve(arrayBuffer)
);
spyOn(DracoLoader, "decodeBufferView").and.returnValue(
- Promise.resolve(decodeDracoResults),
+ Promise.resolve(decodeDracoResults)
);
const unloadDraco = spyOn(
GltfDracoLoader.prototype,
- "unload",
+ "unload"
).and.callThrough();
const destroyVertexBuffer = spyOn(
Buffer.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
const vertexBufferLoader = new GltfVertexBufferLoader({
@@ -710,7 +719,7 @@ describe(
spyOn(Resource.prototype, "fetchArrayBuffer").and.callFake(() =>
rejectPromise
? Promise.reject(new Error())
- : Promise.resolve(arrayBuffer),
+ : Promise.resolve(arrayBuffer)
);
const vertexBufferLoader = new GltfVertexBufferLoader({
@@ -764,7 +773,7 @@ describe(
const decodeBufferView = spyOn(
DracoLoader,
- "decodeBufferView",
+ "decodeBufferView"
).and.callFake(function () {
return new Promise(function (resolve, reject) {
setTimeout(function () {
@@ -781,7 +790,7 @@ describe(
await vertexBufferLoader.load(); // Destroy happens in mock function above
await expectAsync(
- waitForLoaderProcess(vertexBufferLoader, scene),
+ waitForLoaderProcess(vertexBufferLoader, scene)
).toBeResolved();
expect(decodeBufferView).toHaveBeenCalled(); // Make sure the decode actually starts
@@ -797,5 +806,5 @@ describe(
return resolveDracoAfterDestroy(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/GoogleEarthEnterpriseImageryProviderSpec.js b/packages/engine/Specs/Scene/GoogleEarthEnterpriseImageryProviderSpec.js
index 416514c4a68e..6a476a32a0a6 100644
--- a/packages/engine/Specs/Scene/GoogleEarthEnterpriseImageryProviderSpec.js
+++ b/packages/engine/Specs/Scene/GoogleEarthEnterpriseImageryProviderSpec.js
@@ -49,39 +49,39 @@ describe("Scene/GoogleEarthEnterpriseImageryProvider", function () {
it("conforms to ImageryProvider interface", function () {
expect(GoogleEarthEnterpriseImageryProvider).toConformToInterface(
- ImageryProvider,
+ ImageryProvider
);
});
function installMockGetQuadTreePacket() {
spyOn(
GoogleEarthEnterpriseMetadata.prototype,
- "getQuadTreePacket",
+ "getQuadTreePacket"
).and.callFake(function (quadKey, version) {
quadKey = defaultValue(quadKey, "");
this._tileInfo[`${quadKey}0`] = new GoogleEarthEnterpriseTileInformation(
0xff,
1,
1,
- 1,
+ 1
);
this._tileInfo[`${quadKey}1`] = new GoogleEarthEnterpriseTileInformation(
0xff,
1,
1,
- 1,
+ 1
);
this._tileInfo[`${quadKey}2`] = new GoogleEarthEnterpriseTileInformation(
0xff,
1,
1,
- 1,
+ 1
);
this._tileInfo[`${quadKey}3`] = new GoogleEarthEnterpriseTileInformation(
0xff,
1,
1,
- 1,
+ 1
);
return Promise.resolve();
@@ -92,7 +92,7 @@ describe("Scene/GoogleEarthEnterpriseImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
let url = request.url;
if (/^blob:/.test(url) || supportsImageBitmapOptions) {
@@ -103,7 +103,7 @@ describe("Scene/GoogleEarthEnterpriseImageryProvider", function () {
deferred,
true,
false,
- true,
+ true
);
} else {
if (proxy) {
@@ -117,7 +117,7 @@ describe("Scene/GoogleEarthEnterpriseImageryProvider", function () {
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
}
};
@@ -129,7 +129,7 @@ describe("Scene/GoogleEarthEnterpriseImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
if (defined(expectedUrl) && !/^blob:/.test(url)) {
if (proxy) {
@@ -147,14 +147,14 @@ describe("Scene/GoogleEarthEnterpriseImageryProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
}
it("fromMetadata throws without metadata", function () {
expect(() =>
- GoogleEarthEnterpriseImageryProvider.fromMetadata(),
+ GoogleEarthEnterpriseImageryProvider.fromMetadata()
).toThrowDeveloperError("");
});
@@ -168,10 +168,10 @@ describe("Scene/GoogleEarthEnterpriseImageryProvider", function () {
metadata.imageryPresent = false;
expect(() =>
- GoogleEarthEnterpriseImageryProvider.fromMetadata(metadata),
+ GoogleEarthEnterpriseImageryProvider.fromMetadata(metadata)
).toThrowError(
RuntimeError,
- "The server made/up/url/ doesn't have imagery",
+ "The server made/up/url/ doesn't have imagery"
);
});
@@ -180,11 +180,12 @@ describe("Scene/GoogleEarthEnterpriseImageryProvider", function () {
const url = "http://fake.fake.invalid";
const metadata = await GoogleEarthEnterpriseMetadata.fromUrl(url);
- imageryProvider =
- GoogleEarthEnterpriseImageryProvider.fromMetadata(metadata);
+ imageryProvider = GoogleEarthEnterpriseImageryProvider.fromMetadata(
+ metadata
+ );
expect(imageryProvider).toBeInstanceOf(
- GoogleEarthEnterpriseImageryProvider,
+ GoogleEarthEnterpriseImageryProvider
);
});
@@ -193,8 +194,9 @@ describe("Scene/GoogleEarthEnterpriseImageryProvider", function () {
const url = "http://fake.fake.invalid";
const metadata = await GoogleEarthEnterpriseMetadata.fromUrl(url);
- imageryProvider =
- GoogleEarthEnterpriseImageryProvider.fromMetadata(metadata);
+ imageryProvider = GoogleEarthEnterpriseImageryProvider.fromMetadata(
+ metadata
+ );
expect(typeof imageryProvider.hasAlphaChannel).toBe("boolean");
expect(imageryProvider.hasAlphaChannel).toBe(false);
@@ -205,8 +207,9 @@ describe("Scene/GoogleEarthEnterpriseImageryProvider", function () {
const url = "http://fake.fake.invalid/";
const metadata = await GoogleEarthEnterpriseMetadata.fromUrl(url);
- imageryProvider =
- GoogleEarthEnterpriseImageryProvider.fromMetadata(metadata);
+ imageryProvider = GoogleEarthEnterpriseImageryProvider.fromMetadata(
+ metadata
+ );
expect(imageryProvider.url).toEqual(url);
@@ -216,10 +219,10 @@ describe("Scene/GoogleEarthEnterpriseImageryProvider", function () {
expect(imageryProvider.tilingScheme).toBeInstanceOf(GeographicTilingScheme);
// Defaults to custom tile policy
expect(imageryProvider.tileDiscardPolicy).not.toBeInstanceOf(
- DiscardMissingTileImagePolicy,
+ DiscardMissingTileImagePolicy
);
expect(imageryProvider.rectangle).toEqual(
- new Rectangle(-Math.PI, -Math.PI, Math.PI, Math.PI),
+ new Rectangle(-Math.PI, -Math.PI, Math.PI, Math.PI)
);
expect(imageryProvider.credit).toBeUndefined();
@@ -234,8 +237,9 @@ describe("Scene/GoogleEarthEnterpriseImageryProvider", function () {
const url = "http://foo.bar.invalid";
const metadata = await GoogleEarthEnterpriseMetadata.fromUrl(url);
- imageryProvider =
- GoogleEarthEnterpriseImageryProvider.fromMetadata(metadata);
+ imageryProvider = GoogleEarthEnterpriseImageryProvider.fromMetadata(
+ metadata
+ );
const layer = new ImageryLayer(imageryProvider);
let tries = 0;
@@ -257,7 +261,7 @@ describe("Scene/GoogleEarthEnterpriseImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
if (tries === 2) {
// Succeed after 2 tries
@@ -267,7 +271,7 @@ describe("Scene/GoogleEarthEnterpriseImageryProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
} else {
// fail
diff --git a/packages/engine/Specs/Scene/GoogleEarthEnterpriseMapsProviderSpec.js b/packages/engine/Specs/Scene/GoogleEarthEnterpriseMapsProviderSpec.js
index 987fdde44c41..43791beaf69d 100644
--- a/packages/engine/Specs/Scene/GoogleEarthEnterpriseMapsProviderSpec.js
+++ b/packages/engine/Specs/Scene/GoogleEarthEnterpriseMapsProviderSpec.js
@@ -28,19 +28,19 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
it("conforms to ImageryProvider interface", function () {
expect(GoogleEarthEnterpriseMapsProvider).toConformToInterface(
- ImageryProvider,
+ ImageryProvider
);
});
it("fromUrl throws without url", async function () {
await expectAsync(
- GoogleEarthEnterpriseMapsProvider.fromUrl(undefined, 1234),
+ GoogleEarthEnterpriseMapsProvider.fromUrl(undefined, 1234)
).toBeRejectedWithDeveloperError();
});
it("fromUrl throws without channel", async function () {
await expectAsync(
- GoogleEarthEnterpriseMapsProvider.fromUrl("url", undefined),
+ GoogleEarthEnterpriseMapsProvider.fromUrl("url", undefined)
).toBeRejectedWithDeveloperError();
});
@@ -56,7 +56,7 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/GoogleEarthEnterpriseMapsProvider/good.json",
@@ -64,7 +64,7 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -73,7 +73,7 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
channel,
{
path: path,
- },
+ }
);
expect(provider).toBeInstanceOf(GoogleEarthEnterpriseMapsProvider);
@@ -91,7 +91,7 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/GoogleEarthEnterpriseMapsProvider/good.json",
@@ -99,7 +99,7 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -110,7 +110,7 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
const provider = await GoogleEarthEnterpriseMapsProvider.fromUrl(
resource,
channel,
- { path: path },
+ { path: path }
);
expect(provider).toBeInstanceOf(GoogleEarthEnterpriseMapsProvider);
@@ -119,10 +119,10 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
it("fromUrl throws with invalid url", async function () {
const url = "http://invalid.localhost";
await expectAsync(
- GoogleEarthEnterpriseMapsProvider.fromUrl(url, 1234),
+ GoogleEarthEnterpriseMapsProvider.fromUrl(url, 1234)
).toBeRejectedWithError(
RuntimeError,
- new RegExp("An error occurred while accessing"),
+ new RegExp("An error occurred while accessing")
);
});
@@ -134,7 +134,7 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/GoogleEarthEnterpriseMapsProvider/bad_channel.json",
@@ -142,16 +142,16 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
const url = "http://invalid.localhost";
await expectAsync(
- GoogleEarthEnterpriseMapsProvider.fromUrl(url, 1235),
+ GoogleEarthEnterpriseMapsProvider.fromUrl(url, 1235)
).toBeRejectedWithError(
RuntimeError,
- new RegExp("Could not find layer with channel \\(id\\) of 1235"),
+ new RegExp("Could not find layer with channel \\(id\\) of 1235")
);
});
@@ -163,7 +163,7 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/GoogleEarthEnterpriseMapsProvider/bad_version.json",
@@ -171,16 +171,16 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
const url = "http://invalid.localhost";
await expectAsync(
- GoogleEarthEnterpriseMapsProvider.fromUrl(url, 1234),
+ GoogleEarthEnterpriseMapsProvider.fromUrl(url, 1234)
).toBeRejectedWithError(
RuntimeError,
- new RegExp("Could not find a version in channel \\(id\\) 1234"),
+ new RegExp("Could not find a version in channel \\(id\\) 1234")
);
});
@@ -192,7 +192,7 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/GoogleEarthEnterpriseMapsProvider/bad_projection.json",
@@ -200,16 +200,16 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
const url = "http://invalid.localhost";
await expectAsync(
- GoogleEarthEnterpriseMapsProvider.fromUrl(url, 1234),
+ GoogleEarthEnterpriseMapsProvider.fromUrl(url, 1234)
).toBeRejectedWithError(
RuntimeError,
- new RegExp("Unsupported projection asdf"),
+ new RegExp("Unsupported projection asdf")
);
});
@@ -225,7 +225,7 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/GoogleEarthEnterpriseMapsProvider/good.json",
@@ -233,7 +233,7 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -242,7 +242,7 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
channel,
{
path: path,
- },
+ }
);
expect(typeof provider.hasAlphaChannel).toBe("boolean");
@@ -261,7 +261,7 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/GoogleEarthEnterpriseMapsProvider/good.json",
@@ -269,7 +269,7 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -278,7 +278,7 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
channel,
{
path: path,
- },
+ }
);
expect(provider.url).toEqual(url);
@@ -297,7 +297,7 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
const url = request.url;
if (/^blob:/.test(url) || supportsImageBitmapOptions) {
@@ -308,18 +308,18 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
deferred,
true,
false,
- true,
+ true
);
} else {
expect(url).toEqual(
- "http://example.invalid/query?request=ImageryMaps&channel=1234&version=1&x=0&y=0&z=1",
+ "http://example.invalid/query?request=ImageryMaps&channel=1234&version=1&x=0&y=0&z=1"
);
// Just return any old image.
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
}
};
@@ -331,10 +331,10 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
expect(url).toEqual(
- "http://example.invalid/query?request=ImageryMaps&channel=1234&version=1&x=0&y=0&z=1",
+ "http://example.invalid/query?request=ImageryMaps&channel=1234&version=1&x=0&y=0&z=1"
);
// Just return any old image.
@@ -344,7 +344,7 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -366,7 +366,7 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
return deferred.resolve(
"{\n" +
@@ -392,13 +392,13 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
"],\n" +
'serverUrl: "https://example.invalid",\n' +
"useGoogleLayers: false\n" +
- "}",
+ "}"
);
};
const provider = await GoogleEarthEnterpriseMapsProvider.fromUrl(
url,
- channel,
+ channel
);
expect(provider.url).toEqual(url);
@@ -415,7 +415,7 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
return deferred.resolve(
JSON.stringify({
@@ -432,13 +432,13 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
],
serverUrl: "https://example.invalid",
useGoogleLayers: false,
- }),
+ })
);
};
const provider = await GoogleEarthEnterpriseMapsProvider.fromUrl(
"http://example.invalid",
- 1234,
+ 1234
);
expect(provider.tilingScheme).toBeInstanceOf(WebMercatorTilingScheme);
@@ -453,7 +453,7 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
return deferred.resolve(
JSON.stringify({
@@ -471,13 +471,13 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
projection: "mercator",
serverUrl: "https://example.invalid",
useGoogleLayers: false,
- }),
+ })
);
};
const provider = await GoogleEarthEnterpriseMapsProvider.fromUrl(
"http://example.invalid",
- 1234,
+ 1234
);
expect(provider.tilingScheme).toBeInstanceOf(WebMercatorTilingScheme);
@@ -492,7 +492,7 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
return deferred.resolve(
JSON.stringify({
@@ -510,18 +510,18 @@ describe("Scene/GoogleEarthEnterpriseMapsProvider", function () {
projection: "flat",
serverUrl: "https://example.invalid",
useGoogleLayers: false,
- }),
+ })
);
};
const provider = await GoogleEarthEnterpriseMapsProvider.fromUrl(
"http://example.invalid",
- 1234,
+ 1234
);
expect(provider.tilingScheme).toBeInstanceOf(GeographicTilingScheme);
expect(provider.rectangle).toEqual(
- new Rectangle(-Math.PI, -Math.PI, Math.PI, Math.PI),
+ new Rectangle(-Math.PI, -Math.PI, Math.PI, Math.PI)
);
});
});
diff --git a/packages/engine/Specs/Scene/GridImageryProviderSpec.js b/packages/engine/Specs/Scene/GridImageryProviderSpec.js
index 745249679cd3..c2236aea20ac 100644
--- a/packages/engine/Specs/Scene/GridImageryProviderSpec.js
+++ b/packages/engine/Specs/Scene/GridImageryProviderSpec.js
@@ -33,11 +33,11 @@ describe("Scene/GridImageryProvider", function () {
expect(provider.tileDiscardPolicy).toBeUndefined();
expect(provider.rectangle).toEqual(new GeographicTilingScheme().rectangle);
- return Promise.resolve(provider.requestImage(0, 0, 0)).then(
- function (image) {
- expect(image).toBeDefined();
- },
- );
+ return Promise.resolve(provider.requestImage(0, 0, 0)).then(function (
+ image
+ ) {
+ expect(image).toBeDefined();
+ });
});
it("uses alternate tiling scheme if provided", function () {
diff --git a/packages/engine/Specs/Scene/GroundPolylinePrimitiveSpec.js b/packages/engine/Specs/Scene/GroundPolylinePrimitiveSpec.js
index 8d71a98f6bb9..e7e7347483e8 100644
--- a/packages/engine/Specs/Scene/GroundPolylinePrimitiveSpec.js
+++ b/packages/engine/Specs/Scene/GroundPolylinePrimitiveSpec.js
@@ -105,8 +105,9 @@ describe(
scene.camera.frustum.near = 0.1;
scene.camera.frustum.far = 10000000000.0;
- const depthpolylineColorAttribute =
- ColorGeometryInstanceAttribute.fromColor(new Color(0.0, 0.0, 1.0, 1.0));
+ const depthpolylineColorAttribute = ColorGeometryInstanceAttribute.fromColor(
+ new Color(0.0, 0.0, 1.0, 1.0)
+ );
depthColor = depthpolylineColorAttribute.value;
const primitive = new Primitive({
geometryInstances: new GeometryInstance({
@@ -130,7 +131,7 @@ describe(
depthRectanglePrimitive = new MockGlobePrimitive(primitive);
polylineColorAttribute = ColorGeometryInstanceAttribute.fromColor(
- new Color(0.0, 1.0, 1.0, 1.0),
+ new Color(0.0, 1.0, 1.0, 1.0)
);
polylineColor = polylineColorAttribute.value;
groundPolylineInstance = new GeometryInstance({
@@ -164,7 +165,7 @@ describe(
groundPolylinePrimitive = new GroundPolylinePrimitive();
expect(groundPolylinePrimitive.geometryInstances).not.toBeDefined();
expect(groundPolylinePrimitive.appearance).toBeInstanceOf(
- PolylineMaterialAppearance,
+ PolylineMaterialAppearance
);
expect(groundPolylinePrimitive.show).toEqual(true);
expect(groundPolylinePrimitive.interleave).toEqual(false);
@@ -190,7 +191,7 @@ describe(
});
expect(groundPolylinePrimitive.geometryInstances).toEqual(
- geometryInstances,
+ geometryInstances
);
expect(groundPolylinePrimitive.show).toEqual(false);
expect(groundPolylinePrimitive.interleave).toEqual(true);
@@ -306,7 +307,7 @@ describe(
groundPolylinePrimitive = scene.groundPrimitives.add(
new GroundPolylinePrimitive({
geometryInstances: groundPolylineInstance,
- }),
+ })
);
groundPolylinePrimitive.show = false;
@@ -355,7 +356,7 @@ describe(
function verifyGroundPolylinePrimitiveRender(
lookPosition,
primitive,
- color,
+ color
) {
scene.camera.lookAt(lookPosition, Cartesian3.UNIT_Z);
@@ -387,7 +388,7 @@ describe(
verifyGroundPolylinePrimitiveRender(
lookPosition,
groundPolylinePrimitive,
- polylineColor,
+ polylineColor
);
});
@@ -406,7 +407,7 @@ describe(
verifyGroundPolylinePrimitiveRender(
lookPosition,
groundPolylinePrimitive,
- polylineColor,
+ polylineColor
);
});
@@ -425,7 +426,7 @@ describe(
verifyGroundPolylinePrimitiveRender(
lookPosition,
groundPolylinePrimitive,
- polylineColor,
+ polylineColor
);
});
@@ -487,7 +488,7 @@ describe(
id: "polyline on terrain",
attributes: {
color: ColorGeometryInstanceAttribute.fromColor(
- new Color(1.0, 1.0, 1.0, 0.5),
+ new Color(1.0, 1.0, 1.0, 0.5)
),
},
});
@@ -503,7 +504,7 @@ describe(
id: "polyline on terrain",
attributes: {
color: ColorGeometryInstanceAttribute.fromColor(
- new Color(1.0, 1.0, 1.0, 0.5),
+ new Color(1.0, 1.0, 1.0, 0.5)
),
},
});
@@ -517,7 +518,7 @@ describe(
verifyGroundPolylinePrimitiveRender(
lookPosition,
groundPolylinePrimitive,
- [192, 192, 255, 255],
+ [192, 192, 255, 255]
);
});
@@ -581,11 +582,11 @@ describe(
verifyGroundPolylinePrimitiveRender(
lookPosition,
groundPolylinePrimitive,
- polylineColor,
+ polylineColor
);
const attributes = groundPolylinePrimitive.getGeometryInstanceAttributes(
- "polyline on terrain",
+ "polyline on terrain"
);
expect(attributes.color).toBeDefined();
});
@@ -604,7 +605,7 @@ describe(
verifyGroundPolylinePrimitiveRender(
lookPosition,
groundPolylinePrimitive,
- polylineColor,
+ polylineColor
);
// Remove so it can be re-added, but don't destroy.
@@ -614,7 +615,7 @@ describe(
const newColor = [255, 255, 255, 255];
const attributes = groundPolylinePrimitive.getGeometryInstanceAttributes(
- "polyline on terrain",
+ "polyline on terrain"
);
expect(attributes.color).toBeDefined();
attributes.color = newColor;
@@ -622,7 +623,7 @@ describe(
verifyGroundPolylinePrimitiveRender(
lookPosition,
groundPolylinePrimitive,
- newColor,
+ newColor
);
});
@@ -640,7 +641,7 @@ describe(
verifyGroundPolylinePrimitiveRender(
lookPositionOffset,
groundPolylinePrimitive,
- polylineColor,
+ polylineColor
);
scene.groundPrimitives.destroyPrimitives = false;
@@ -648,7 +649,7 @@ describe(
scene.groundPrimitives.destroyPrimitives = true;
const attributes = groundPolylinePrimitive.getGeometryInstanceAttributes(
- "polyline on terrain",
+ "polyline on terrain"
);
expect(attributes.width).toBeDefined();
attributes.width = [0];
@@ -656,7 +657,7 @@ describe(
verifyGroundPolylinePrimitiveRender(
lookPositionOffset,
groundPolylinePrimitive,
- depthColor,
+ depthColor
);
});
@@ -665,8 +666,9 @@ describe(
return;
}
- groundPolylineInstance.attributes.show =
- new ShowGeometryInstanceAttribute(true);
+ groundPolylineInstance.attributes.show = new ShowGeometryInstanceAttribute(
+ true
+ );
groundPolylinePrimitive = new GroundPolylinePrimitive({
geometryInstances: groundPolylineInstance,
@@ -677,7 +679,7 @@ describe(
verifyGroundPolylinePrimitiveRender(
lookPosition,
groundPolylinePrimitive,
- polylineColor,
+ polylineColor
);
scene.groundPrimitives.destroyPrimitives = false;
@@ -685,7 +687,7 @@ describe(
scene.groundPrimitives.destroyPrimitives = true;
const attributes = groundPolylinePrimitive.getGeometryInstanceAttributes(
- "polyline on terrain",
+ "polyline on terrain"
);
expect(attributes.show).toBeDefined();
attributes.show = [0];
@@ -693,7 +695,7 @@ describe(
verifyGroundPolylinePrimitiveRender(
lookPosition,
groundPolylinePrimitive,
- depthColor,
+ depthColor
);
});
@@ -719,8 +721,10 @@ describe(
}),
id: "polyline on terrain",
attributes: {
- distanceDisplayCondition:
- new DistanceDisplayConditionGeometryInstanceAttribute(near, far),
+ distanceDisplayCondition: new DistanceDisplayConditionGeometryInstanceAttribute(
+ near,
+ far
+ ),
color: polylineColorAttribute,
},
});
@@ -735,16 +739,15 @@ describe(
scene.camera.lookAt(lookPosition, Cartesian3.UNIT_Z);
scene.renderForSpecs();
- const boundingSphere =
- groundPolylinePrimitive.getGeometryInstanceAttributes(
- "polyline on terrain",
- ).boundingSphere;
+ const boundingSphere = groundPolylinePrimitive.getGeometryInstanceAttributes(
+ "polyline on terrain"
+ ).boundingSphere;
const center = boundingSphere.center;
const radius = boundingSphere.radius;
scene.camera.lookAt(
center,
- new HeadingPitchRange(0.0, -CesiumMath.PI_OVER_TWO, radius),
+ new HeadingPitchRange(0.0, -CesiumMath.PI_OVER_TWO, radius)
);
expect(scene).toRenderAndCall(function (rgba) {
expect(coordinateOfPixelColor(rgba, depthColor)).toBeDefined();
@@ -752,11 +755,7 @@ describe(
scene.camera.lookAt(
center,
- new HeadingPitchRange(
- 0.0,
- -CesiumMath.PI_OVER_TWO,
- radius + near + 1.0,
- ),
+ new HeadingPitchRange(0.0, -CesiumMath.PI_OVER_TWO, radius + near + 1.0)
);
expect(scene).toRenderAndCall(function (rgba) {
expect(coordinateOfPixelColor(rgba, depthColor)).toBeUndefined();
@@ -764,7 +763,7 @@ describe(
scene.camera.lookAt(
center,
- new HeadingPitchRange(0.0, -CesiumMath.PI_OVER_TWO, radius + far + 1.0),
+ new HeadingPitchRange(0.0, -CesiumMath.PI_OVER_TWO, radius + far + 1.0)
);
expect(scene).toRenderAndCall(function (rgba) {
expect(coordinateOfPixelColor(rgba, depthColor)).toBeDefined();
@@ -776,8 +775,9 @@ describe(
return;
}
- groundPolylineInstance.attributes.show =
- new ShowGeometryInstanceAttribute(true);
+ groundPolylineInstance.attributes.show = new ShowGeometryInstanceAttribute(
+ true
+ );
groundPolylinePrimitive = new GroundPolylinePrimitive({
geometryInstances: groundPolylineInstance,
@@ -788,14 +788,14 @@ describe(
verifyGroundPolylinePrimitiveRender(
lookPosition,
groundPolylinePrimitive,
- polylineColor,
+ polylineColor
);
const attributes = groundPolylinePrimitive.getGeometryInstanceAttributes(
- "polyline on terrain",
+ "polyline on terrain"
);
const attributes2 = groundPolylinePrimitive.getGeometryInstanceAttributes(
- "polyline on terrain",
+ "polyline on terrain"
);
expect(attributes).toBe(attributes2);
});
@@ -814,7 +814,7 @@ describe(
const polylineColorCoordinate = verifyGroundPolylinePrimitiveRender(
lookPosition,
groundPolylinePrimitive,
- polylineColor,
+ polylineColor
);
expect(scene).toPickAndCall(function (result) {
@@ -837,7 +837,7 @@ describe(
const polylineColorCoordinate = verifyGroundPolylinePrimitiveRender(
lookPosition,
groundPolylinePrimitive,
- polylineColor,
+ polylineColor
);
expect(scene).toPickAndCall(function (result) {
@@ -860,7 +860,7 @@ describe(
const polylineColorCoordinate = verifyGroundPolylinePrimitiveRender(
lookPosition,
groundPolylinePrimitive,
- polylineColor,
+ polylineColor
);
scene.camera.lookAt(lookPosition, Cartesian3.UNIT_Z);
@@ -933,7 +933,7 @@ describe(
verifyGroundPolylinePrimitiveRender(
lookPosition,
groundPolylinePrimitive,
- polylineColor,
+ polylineColor
);
expect(scene).toPickAndCall(function (result) {
@@ -959,7 +959,7 @@ describe(
verifyGroundPolylinePrimitiveRender(
lookPosition,
groundPolylinePrimitive,
- polylineColor,
+ polylineColor
);
}).toThrowDeveloperError();
});
@@ -978,11 +978,11 @@ describe(
verifyGroundPolylinePrimitiveRender(
lookPosition,
groundPolylinePrimitive,
- polylineColor,
+ polylineColor
);
const attributes = groundPolylinePrimitive.getGeometryInstanceAttributes(
- "polyline on terrain",
+ "polyline on terrain"
);
expect(function () {
@@ -1008,10 +1008,9 @@ describe(
scene.renderForSpecs();
return groundPolylinePrimitive.ready;
}).then(function () {
- const attributes =
- groundPolylinePrimitive.getGeometryInstanceAttributes(
- "polyline on terrain",
- );
+ const attributes = groundPolylinePrimitive.getGeometryInstanceAttributes(
+ "polyline on terrain"
+ );
expect(function () {
attributes.color = undefined;
}).toThrowDeveloperError();
@@ -1032,7 +1031,7 @@ describe(
verifyGroundPolylinePrimitiveRender(
lookPosition,
groundPolylinePrimitive,
- polylineColor,
+ polylineColor
);
expect(function () {
@@ -1088,7 +1087,7 @@ describe(
verifyGroundPolylinePrimitiveRender(
lookPosition,
groundPolylinePrimitive,
- polylineColor,
+ polylineColor
);
});
});
@@ -1141,5 +1140,5 @@ describe(
ApproximateTerrainHeights._terrainHeights = terrainHeights;
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/GroundPrimitiveSpec.js b/packages/engine/Specs/Scene/GroundPrimitiveSpec.js
index 1c77f26b5245..1fffa328d6fb 100644
--- a/packages/engine/Specs/Scene/GroundPrimitiveSpec.js
+++ b/packages/engine/Specs/Scene/GroundPrimitiveSpec.js
@@ -59,7 +59,7 @@ describe(
});
}
const depthColorAttribute = ColorGeometryInstanceAttribute.fromColor(
- new Color(0.0, 0.0, 1.0, 1.0),
+ new Color(0.0, 0.0, 1.0, 1.0)
);
depthColor = depthColorAttribute.value;
return new Primitive({
@@ -124,12 +124,12 @@ describe(
-180 + CesiumMath.EPSILON4,
-90 + CesiumMath.EPSILON4,
180 - CesiumMath.EPSILON4,
- 90 - CesiumMath.EPSILON4,
+ 90 - CesiumMath.EPSILON4
);
reusableGlobePrimitive = createPrimitive(bigRectangle, Pass.GLOBE);
reusableTilesetPrimitive = createPrimitive(
bigRectangle,
- Pass.CESIUM_3D_TILE,
+ Pass.CESIUM_3D_TILE
);
return GroundPrimitive.initializeTerrainHeights();
@@ -153,11 +153,11 @@ describe(
globePrimitive = new MockPrimitive(reusableGlobePrimitive, Pass.GLOBE);
tilesetPrimitive = new MockPrimitive(
reusableTilesetPrimitive,
- Pass.CESIUM_3D_TILE,
+ Pass.CESIUM_3D_TILE
);
const rectColorAttribute = ColorGeometryInstanceAttribute.fromColor(
- new Color(1.0, 1.0, 0.0, 1.0),
+ new Color(1.0, 1.0, 0.0, 1.0)
);
rectColor = rectColorAttribute.value;
rectangleInstance = new GeometryInstance({
@@ -335,7 +335,7 @@ describe(
geometryInstances: rectangleInstance,
asynchronous: false,
show: false,
- }),
+ })
);
await pollToPromise(() => {
@@ -434,7 +434,7 @@ describe(
}
const rectColorAttribute = ColorGeometryInstanceAttribute.fromColor(
- new Color(1.0, 1.0, 0.0, 1.0),
+ new Color(1.0, 1.0, 0.0, 1.0)
);
const bigIdlRectangle = Rectangle.fromDegrees(176.0, 30.0, -176.0, 34.0);
const bigIdlRectangleInstance = new GeometryInstance({
@@ -471,13 +471,13 @@ describe(
}
const rectColorAttribute = ColorGeometryInstanceAttribute.fromColor(
- new Color(1.0, 1.0, 0.0, 1.0),
+ new Color(1.0, 1.0, 0.0, 1.0)
);
const smallIdlRectangle = Rectangle.fromDegrees(
179.6,
30.0,
-179.6,
- 30.9,
+ 30.9
);
const smallIdlRectangleInstance = new GeometryInstance({
geometry: new RectangleGeometry({
@@ -549,15 +549,15 @@ describe(
-180 + CesiumMath.EPSILON4,
-90 + CesiumMath.EPSILON4,
180 - CesiumMath.EPSILON4,
- 90 - CesiumMath.EPSILON4,
+ 90 - CesiumMath.EPSILON4
);
largeSceneReusableGlobePrimitive = createPrimitive(
bigRectangle,
- Pass.GLOBE,
+ Pass.GLOBE
);
largeSceneReusableTilesetPrimitive = createPrimitive(
bigRectangle,
- Pass.CESIUM_3D_TILE,
+ Pass.CESIUM_3D_TILE
);
});
afterAll(function () {
@@ -578,11 +578,11 @@ describe(
const largeSceneGlobePrimitive = new MockPrimitive(
largeSceneReusableGlobePrimitive,
- Pass.GLOBE,
+ Pass.GLOBE
);
const largeSceneTilesetPrimitive = new MockPrimitive(
largeSceneReusableTilesetPrimitive,
- Pass.CESIUM_3D_TILE,
+ Pass.CESIUM_3D_TILE
);
largeScene.primitives.add(largeSceneGlobePrimitive);
@@ -626,7 +626,7 @@ describe(
}
const rectColorAttribute = ColorGeometryInstanceAttribute.fromColor(
- new Color(0.0, 1.0, 1.0, 1.0),
+ new Color(0.0, 1.0, 1.0, 1.0)
);
const rectangleInstance1 = new GeometryInstance({
geometry: new RectangleGeometry({
@@ -635,7 +635,7 @@ describe(
rectangle.west,
rectangle.south,
rectangle.east,
- (rectangle.north + rectangle.south) * 0.5,
+ (rectangle.north + rectangle.south) * 0.5
),
}),
id: "rectangle1",
@@ -650,7 +650,7 @@ describe(
rectangle.west,
(rectangle.north + rectangle.south) * 0.5,
rectangle.east,
- rectangle.north,
+ rectangle.north
),
}),
id: "rectangle2",
@@ -685,7 +685,7 @@ describe(
west,
south,
west + radians,
- south + radians,
+ south + radians
);
const smallRectanglePrimitive = new GroundPrimitive({
geometryInstances: new GeometryInstance({
@@ -706,7 +706,7 @@ describe(
verifyLargerScene(
smallRectanglePrimitive,
[255, 255, 255, 255],
- smallRectangle,
+ smallRectangle
);
});
@@ -728,7 +728,7 @@ describe(
west,
south,
west + radians,
- south + radians,
+ south + radians
);
const largeRectanglePrimitive = new GroundPrimitive({
geometryInstances: new GeometryInstance({
@@ -749,7 +749,7 @@ describe(
verifyLargerScene(
largeRectanglePrimitive,
[255, 255, 255, 255],
- largeRectangle,
+ largeRectangle
);
});
@@ -784,7 +784,7 @@ describe(
verifyLargerScene(
largeRectanglePrimitive,
[255, 255, 255, 255],
- largeRectangle,
+ largeRectangle
);
});
});
@@ -798,7 +798,7 @@ describe(
scene.invertClassificationColor = new Color(0.25, 0.25, 0.25, 1.0);
rectangleInstance.attributes.show = new ShowGeometryInstanceAttribute(
- true,
+ true
);
primitive = new GroundPrimitive({
@@ -810,14 +810,13 @@ describe(
const invertedColor = new Array(4);
invertedColor[0] = Color.floatToByte(
- Color.byteToFloat(depthColor[0]) * scene.invertClassificationColor.red,
+ Color.byteToFloat(depthColor[0]) * scene.invertClassificationColor.red
);
invertedColor[1] = Color.floatToByte(
- Color.byteToFloat(depthColor[1]) *
- scene.invertClassificationColor.green,
+ Color.byteToFloat(depthColor[1]) * scene.invertClassificationColor.green
);
invertedColor[2] = Color.floatToByte(
- Color.byteToFloat(depthColor[2]) * scene.invertClassificationColor.blue,
+ Color.byteToFloat(depthColor[2]) * scene.invertClassificationColor.blue
);
invertedColor[3] = 255;
@@ -846,7 +845,7 @@ describe(
scene.invertClassificationColor = new Color(0.25, 0.25, 0.25, 0.25);
rectangleInstance.attributes.show = new ShowGeometryInstanceAttribute(
- true,
+ true
);
primitive = new GroundPrimitive({
@@ -860,17 +859,17 @@ describe(
invertedColor[0] = Color.floatToByte(
Color.byteToFloat(depthColor[0]) *
scene.invertClassificationColor.red *
- scene.invertClassificationColor.alpha,
+ scene.invertClassificationColor.alpha
);
invertedColor[1] = Color.floatToByte(
Color.byteToFloat(depthColor[1]) *
scene.invertClassificationColor.green *
- scene.invertClassificationColor.alpha,
+ scene.invertClassificationColor.alpha
);
invertedColor[2] = Color.floatToByte(
Color.byteToFloat(depthColor[2]) *
scene.invertClassificationColor.blue *
- scene.invertClassificationColor.alpha,
+ scene.invertClassificationColor.alpha
);
invertedColor[3] = 255;
@@ -978,7 +977,7 @@ describe(
}
rectangleInstance.attributes.show = new ShowGeometryInstanceAttribute(
- true,
+ true
);
primitive = new GroundPrimitive({
@@ -1017,7 +1016,7 @@ describe(
const rect = Rectangle.fromDegrees(-1.0, -1.0, 1.0, 1.0);
const rectColorAttribute = ColorGeometryInstanceAttribute.fromColor(
- new Color(1.0, 1.0, 0.0, 1.0),
+ new Color(1.0, 1.0, 0.0, 1.0)
);
const rectInstance = new GeometryInstance({
geometry: new RectangleGeometry({
@@ -1027,8 +1026,10 @@ describe(
id: "rect",
attributes: {
color: rectColorAttribute,
- distanceDisplayCondition:
- new DistanceDisplayConditionGeometryInstanceAttribute(near, far),
+ distanceDisplayCondition: new DistanceDisplayConditionGeometryInstanceAttribute(
+ near,
+ far
+ ),
},
});
@@ -1042,30 +1043,26 @@ describe(
scene.camera.setView({ destination: rect });
scene.renderForSpecs();
- const boundingSphere =
- primitive.getGeometryInstanceAttributes("rect").boundingSphere;
+ const boundingSphere = primitive.getGeometryInstanceAttributes("rect")
+ .boundingSphere;
const center = boundingSphere.center;
const radius = boundingSphere.radius;
scene.camera.lookAt(
center,
- new HeadingPitchRange(0.0, -CesiumMath.PI_OVER_TWO, radius),
+ new HeadingPitchRange(0.0, -CesiumMath.PI_OVER_TWO, radius)
);
expect(scene).toRender([0, 0, 255, 255]);
scene.camera.lookAt(
center,
- new HeadingPitchRange(
- 0.0,
- -CesiumMath.PI_OVER_TWO,
- radius + near + 1.0,
- ),
+ new HeadingPitchRange(0.0, -CesiumMath.PI_OVER_TWO, radius + near + 1.0)
);
expect(scene).notToRender([0, 0, 255, 255]);
scene.camera.lookAt(
center,
- new HeadingPitchRange(0.0, -CesiumMath.PI_OVER_TWO, radius + far + 1.0),
+ new HeadingPitchRange(0.0, -CesiumMath.PI_OVER_TWO, radius + far + 1.0)
);
expect(scene).toRender([0, 0, 255, 255]);
});
@@ -1257,7 +1254,7 @@ describe(
});
let rectColorAttribute = ColorGeometryInstanceAttribute.fromColor(
- new Color(0.0, 1.0, 1.0, 1.0),
+ new Color(0.0, 1.0, 1.0, 1.0)
);
const rectangleInstance1 = new GeometryInstance({
geometry: new RectangleGeometry({
@@ -1266,7 +1263,7 @@ describe(
rectangle.west,
rectangle.south,
rectangle.east,
- (rectangle.north + rectangle.south) * 0.5,
+ (rectangle.north + rectangle.south) * 0.5
),
}),
id: "rectangle1",
@@ -1275,7 +1272,7 @@ describe(
},
});
rectColorAttribute = ColorGeometryInstanceAttribute.fromColor(
- new Color(1.0, 1.0, 0.0, 1.0),
+ new Color(1.0, 1.0, 0.0, 1.0)
);
const rectangleInstance2 = new GeometryInstance({
geometry: new RectangleGeometry({
@@ -1284,7 +1281,7 @@ describe(
rectangle.west,
(rectangle.north + rectangle.south) * 0.5,
rectangle.east,
- rectangle.north,
+ rectangle.north
),
}),
id: "rectangle2",
@@ -1309,7 +1306,7 @@ describe(
}
const rectColorAttribute = ColorGeometryInstanceAttribute.fromColor(
- new Color(0.0, 1.0, 1.0, 1.0),
+ new Color(0.0, 1.0, 1.0, 1.0)
);
const rectangleInstance1 = new GeometryInstance({
geometry: new RectangleGeometry({
@@ -1318,7 +1315,7 @@ describe(
rectangle.west,
rectangle.south,
rectangle.east,
- (rectangle.north + rectangle.south) * 0.5,
+ (rectangle.north + rectangle.south) * 0.5
),
}),
id: "rectangle1",
@@ -1333,7 +1330,7 @@ describe(
rectangle.west,
(rectangle.north + rectangle.south) * 0.5,
rectangle.east,
- rectangle.north,
+ rectangle.north
),
}),
id: "rectangle2",
@@ -1433,7 +1430,7 @@ describe(
verifyGroundPrimitiveRender(primitive, rectColor);
expect(
- primitive.getGeometryInstanceAttributes("unknown"),
+ primitive.getGeometryInstanceAttributes("unknown")
).not.toBeDefined();
});
@@ -1514,5 +1511,5 @@ describe(
ApproximateTerrainHeights._terrainHeights = terrainHeights;
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/GroupMetadataSpec.js b/packages/engine/Specs/Scene/GroupMetadataSpec.js
index 883a28517d29..c5f3cd9cfcc7 100644
--- a/packages/engine/Specs/Scene/GroupMetadataSpec.js
+++ b/packages/engine/Specs/Scene/GroupMetadataSpec.js
@@ -58,7 +58,7 @@ describe("Scene/GroupMetadata", function () {
expect(groupMetadata.extras).toBe(extras);
expect(groupMetadata.extensions).toBe(extensions);
expect(groupMetadata.getProperty("position")).toEqual(
- Cartesian3.unpack(properties.position),
+ Cartesian3.unpack(properties.position)
);
});
diff --git a/packages/engine/Specs/Scene/HeightmapTessellatorSpec.js b/packages/engine/Specs/Scene/HeightmapTessellatorSpec.js
index b773fa271203..06835f4d42a9 100644
--- a/packages/engine/Specs/Scene/HeightmapTessellatorSpec.js
+++ b/packages/engine/Specs/Scene/HeightmapTessellatorSpec.js
@@ -102,18 +102,18 @@ describe("Scene/HeightmapTessellator", function () {
vertices,
heightmap,
ellipsoid,
- skirtHeight,
+ skirtHeight
) {
let latitude = CesiumMath.lerp(
nativeRectangle.north,
nativeRectangle.south,
- j / (height - 1),
+ j / (height - 1)
);
latitude = CesiumMath.toRadians(latitude);
let longitude = CesiumMath.lerp(
nativeRectangle.west,
nativeRectangle.east,
- i / (width - 1),
+ i / (width - 1)
);
longitude = CesiumMath.toRadians(longitude);
@@ -133,18 +133,18 @@ describe("Scene/HeightmapTessellator", function () {
const vertexPosition = new Cartesian3(
vertices[index],
vertices[index + 1],
- vertices[index + 2],
+ vertices[index + 2]
);
expect(vertexPosition).toEqualEpsilon(expectedVertexPosition, 1.0);
expect(vertices[index + 3]).toEqual(heightSample);
expect(vertices[index + 4]).toEqualEpsilon(
i / (width - 1),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(vertices[index + 5]).toEqualEpsilon(
1.0 - j / (height - 1),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
}
@@ -160,18 +160,18 @@ describe("Scene/HeightmapTessellator", function () {
heightmap,
ellipsoid,
skirtHeight,
- encoding,
+ encoding
) {
let latitude = CesiumMath.lerp(
nativeRectangle.north,
nativeRectangle.south,
- j / (height - 1),
+ j / (height - 1)
);
latitude = CesiumMath.toRadians(latitude);
let longitude = CesiumMath.lerp(
nativeRectangle.west,
nativeRectangle.east,
- i / (width - 1),
+ i / (width - 1)
);
longitude = CesiumMath.toRadians(longitude);
@@ -189,7 +189,7 @@ describe("Scene/HeightmapTessellator", function () {
expect(encoding.decodePosition(vertices, index)).toEqualEpsilon(
expectedVertexPosition,
- 1.0,
+ 1.0
);
}
@@ -211,7 +211,7 @@ describe("Scene/HeightmapTessellator", function () {
CesiumMath.toRadians(10.0),
CesiumMath.toRadians(30.0),
CesiumMath.toRadians(20.0),
- CesiumMath.toRadians(40.0),
+ CesiumMath.toRadians(40.0)
),
};
const results = HeightmapTessellator.computeVertices(options);
@@ -235,7 +235,7 @@ describe("Scene/HeightmapTessellator", function () {
vertices,
options.heightmap,
ellipsoid,
- options.skirtHeight,
+ options.skirtHeight
);
}
}
@@ -278,7 +278,7 @@ describe("Scene/HeightmapTessellator", function () {
vertices,
options.heightmap,
ellipsoid,
- options.skirtHeight,
+ options.skirtHeight
);
}
}
@@ -298,7 +298,7 @@ describe("Scene/HeightmapTessellator", function () {
vertices,
options.heightmap,
ellipsoid,
- options.skirtHeight,
+ options.skirtHeight
);
}
@@ -315,7 +315,7 @@ describe("Scene/HeightmapTessellator", function () {
vertices,
options.heightmap,
ellipsoid,
- options.skirtHeight,
+ options.skirtHeight
);
}
@@ -332,7 +332,7 @@ describe("Scene/HeightmapTessellator", function () {
vertices,
options.heightmap,
ellipsoid,
- options.skirtHeight,
+ options.skirtHeight
);
}
@@ -349,7 +349,7 @@ describe("Scene/HeightmapTessellator", function () {
vertices,
options.heightmap,
ellipsoid,
- options.skirtHeight,
+ options.skirtHeight
);
}
});
@@ -392,7 +392,7 @@ describe("Scene/HeightmapTessellator", function () {
options.heightmap,
ellipsoid,
options.skirtHeight,
- results.encoding,
+ results.encoding
);
}
}
@@ -413,7 +413,7 @@ describe("Scene/HeightmapTessellator", function () {
options.heightmap,
ellipsoid,
options.skirtHeight,
- results.encoding,
+ results.encoding
);
}
@@ -431,7 +431,7 @@ describe("Scene/HeightmapTessellator", function () {
options.heightmap,
ellipsoid,
options.skirtHeight,
- results.encoding,
+ results.encoding
);
}
@@ -449,7 +449,7 @@ describe("Scene/HeightmapTessellator", function () {
options.heightmap,
ellipsoid,
options.skirtHeight,
- results.encoding,
+ results.encoding
);
}
@@ -467,7 +467,7 @@ describe("Scene/HeightmapTessellator", function () {
options.heightmap,
ellipsoid,
options.skirtHeight,
- results.encoding,
+ results.encoding
);
}
});
@@ -496,23 +496,23 @@ describe("Scene/HeightmapTessellator", function () {
const nativeRectangle = options.nativeRectangle;
const geographicSouthwest = projection.unproject(
- new Cartesian2(nativeRectangle.west, nativeRectangle.south),
+ new Cartesian2(nativeRectangle.west, nativeRectangle.south)
);
const geographicNortheast = projection.unproject(
- new Cartesian2(nativeRectangle.east, nativeRectangle.north),
+ new Cartesian2(nativeRectangle.east, nativeRectangle.north)
);
for (let j = 0; j < height; ++j) {
const y = CesiumMath.lerp(
nativeRectangle.north,
nativeRectangle.south,
- j / (height - 1),
+ j / (height - 1)
);
for (let i = 0; i < width; ++i) {
const x = CesiumMath.lerp(
nativeRectangle.west,
nativeRectangle.east,
- i / (width - 1),
+ i / (width - 1)
);
const latLon = projection.unproject(new Cartesian2(x, y));
@@ -531,7 +531,7 @@ describe("Scene/HeightmapTessellator", function () {
const vertexPosition = new Cartesian3(
vertices[index],
vertices[index + 1],
- vertices[index + 2],
+ vertices[index + 2]
);
const expectedU =
@@ -545,11 +545,11 @@ describe("Scene/HeightmapTessellator", function () {
expect(vertices[index + 3]).toEqual(heightSample);
expect(vertices[index + 4]).toEqualEpsilon(
expectedU,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(vertices[index + 5]).toEqualEpsilon(
expectedV,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
}
}
@@ -560,9 +560,33 @@ describe("Scene/HeightmapTessellator", function () {
const height = 3;
const options = {
heightmap: [
- 1.0, 2.0, 100.0, 3.0, 4.0, 100.0, 5.0, 6.0, 100.0, 7.0, 8.0, 100.0, 9.0,
- 10.0, 100.0, 11.0, 12.0, 100.0, 13.0, 14.0, 100.0, 15.0, 16.0, 100.0,
- 17.0, 18.0, 100.0,
+ 1.0,
+ 2.0,
+ 100.0,
+ 3.0,
+ 4.0,
+ 100.0,
+ 5.0,
+ 6.0,
+ 100.0,
+ 7.0,
+ 8.0,
+ 100.0,
+ 9.0,
+ 10.0,
+ 100.0,
+ 11.0,
+ 12.0,
+ 100.0,
+ 13.0,
+ 14.0,
+ 100.0,
+ 15.0,
+ 16.0,
+ 100.0,
+ 17.0,
+ 18.0,
+ 100.0,
],
width: width,
height: height,
@@ -577,7 +601,7 @@ describe("Scene/HeightmapTessellator", function () {
CesiumMath.toRadians(10.0),
CesiumMath.toRadians(30.0),
CesiumMath.toRadians(20.0),
- CesiumMath.toRadians(40.0),
+ CesiumMath.toRadians(40.0)
),
structure: {
stride: 3,
@@ -595,14 +619,14 @@ describe("Scene/HeightmapTessellator", function () {
let latitude = CesiumMath.lerp(
nativeRectangle.north,
nativeRectangle.south,
- j / (height - 1),
+ j / (height - 1)
);
latitude = CesiumMath.toRadians(latitude);
for (let i = 0; i < width; ++i) {
let longitude = CesiumMath.lerp(
nativeRectangle.west,
nativeRectangle.east,
- i / (width - 1),
+ i / (width - 1)
);
longitude = CesiumMath.toRadians(longitude);
@@ -621,18 +645,18 @@ describe("Scene/HeightmapTessellator", function () {
const vertexPosition = new Cartesian3(
vertices[index],
vertices[index + 1],
- vertices[index + 2],
+ vertices[index + 2]
);
expect(vertexPosition).toEqualEpsilon(expectedVertexPosition, 1.0);
expect(vertices[index + 3]).toEqual(heightSample);
expect(vertices[index + 4]).toEqualEpsilon(
i / (width - 1),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(vertices[index + 5]).toEqualEpsilon(
1.0 - j / (height - 1),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
}
}
@@ -643,9 +667,33 @@ describe("Scene/HeightmapTessellator", function () {
const height = 3;
const options = {
heightmap: [
- 1.0, 2.0, 100.0, 3.0, 4.0, 100.0, 5.0, 6.0, 100.0, 7.0, 8.0, 100.0, 9.0,
- 10.0, 100.0, 11.0, 12.0, 100.0, 13.0, 14.0, 100.0, 15.0, 16.0, 100.0,
- 17.0, 18.0, 100.0,
+ 1.0,
+ 2.0,
+ 100.0,
+ 3.0,
+ 4.0,
+ 100.0,
+ 5.0,
+ 6.0,
+ 100.0,
+ 7.0,
+ 8.0,
+ 100.0,
+ 9.0,
+ 10.0,
+ 100.0,
+ 11.0,
+ 12.0,
+ 100.0,
+ 13.0,
+ 14.0,
+ 100.0,
+ 15.0,
+ 16.0,
+ 100.0,
+ 17.0,
+ 18.0,
+ 100.0,
],
width: width,
height: height,
@@ -660,7 +708,7 @@ describe("Scene/HeightmapTessellator", function () {
CesiumMath.toRadians(10.0),
CesiumMath.toRadians(30.0),
CesiumMath.toRadians(20.0),
- CesiumMath.toRadians(40.0),
+ CesiumMath.toRadians(40.0)
),
structure: {
stride: 3,
@@ -679,14 +727,14 @@ describe("Scene/HeightmapTessellator", function () {
let latitude = CesiumMath.lerp(
nativeRectangle.north,
nativeRectangle.south,
- j / (height - 1),
+ j / (height - 1)
);
latitude = CesiumMath.toRadians(latitude);
for (let i = 0; i < width; ++i) {
let longitude = CesiumMath.lerp(
nativeRectangle.west,
nativeRectangle.east,
- i / (width - 1),
+ i / (width - 1)
);
longitude = CesiumMath.toRadians(longitude);
@@ -705,18 +753,18 @@ describe("Scene/HeightmapTessellator", function () {
const vertexPosition = new Cartesian3(
vertices[index],
vertices[index + 1],
- vertices[index + 2],
+ vertices[index + 2]
);
expect(vertexPosition).toEqualEpsilon(expectedVertexPosition, 1.0);
expect(vertices[index + 3]).toEqual(heightSample);
expect(vertices[index + 4]).toEqualEpsilon(
i / (width - 1),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(vertices[index + 5]).toEqualEpsilon(
1.0 - j / (height - 1),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
}
}
diff --git a/packages/engine/Specs/Scene/I3SDataProviderSpec.js b/packages/engine/Specs/Scene/I3SDataProviderSpec.js
index 52efa9ea37d2..f1f1989d0bd4 100644
--- a/packages/engine/Specs/Scene/I3SDataProviderSpec.js
+++ b/packages/engine/Specs/Scene/I3SDataProviderSpec.js
@@ -289,7 +289,7 @@ describe("Scene/I3SDataProvider", function () {
it("constructs I3SDataProvider with options", async function () {
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(mockProviderData),
+ Promise.resolve(mockProviderData)
);
spyOn(Cesium3DTileset, "fromUrl").and.callFake(async () => {
const tileset = new Cesium3DTileset();
@@ -298,7 +298,7 @@ describe("Scene/I3SDataProvider", function () {
});
const testProvider = await I3SDataProvider.fromUrl(
"mockProviderUrl",
- i3sOptions,
+ i3sOptions
);
expect(testProvider.name).toEqual("testProvider");
@@ -328,7 +328,7 @@ describe("Scene/I3SDataProvider", function () {
});
const testProvider = await I3SDataProvider.fromUrl(
"mockProviderUrl",
- i3sOptions,
+ i3sOptions
);
expect(testProvider.name).toEqual("testProvider");
@@ -345,45 +345,45 @@ describe("Scene/I3SDataProvider", function () {
expect(testProvider.sublayers[0].sublayers.length).toEqual(2);
expect(testProvider.sublayers[0].sublayers[0].name).toEqual("Cat1");
expect(testProvider.sublayers[0].sublayers[0]._parent.name).toEqual(
- "Full Model",
+ "Full Model"
);
expect(testProvider.sublayers[0].sublayers[0]._parent.modelName).toEqual(
- "FullModel",
+ "FullModel"
);
expect(testProvider.sublayers[0].sublayers[1].name).toEqual("Cat2");
expect(testProvider.sublayers[0].sublayers[1]._parent.name).toEqual(
- "Full Model",
+ "Full Model"
);
expect(testProvider.sublayers[0].sublayers[1]._parent.modelName).toEqual(
- "FullModel",
+ "FullModel"
);
expect(testProvider.sublayers[0].sublayers[0].sublayers.length).toEqual(3);
expect(testProvider.sublayers[0].sublayers[0].sublayers[0].name).toEqual(
- "SubCat1",
+ "SubCat1"
);
expect(
- testProvider.sublayers[0].sublayers[0].sublayers[0].visibility,
+ testProvider.sublayers[0].sublayers[0].sublayers[0].visibility
).toEqual(false);
expect(
- testProvider.sublayers[0].sublayers[0].sublayers[0]._parent.name,
+ testProvider.sublayers[0].sublayers[0].sublayers[0]._parent.name
).toEqual("Cat1");
expect(testProvider.sublayers[0].sublayers[0].sublayers[1].name).toEqual(
- "SubCat2",
+ "SubCat2"
);
expect(
- testProvider.sublayers[0].sublayers[0].sublayers[1].visibility,
+ testProvider.sublayers[0].sublayers[0].sublayers[1].visibility
).toEqual(true);
expect(
- testProvider.sublayers[0].sublayers[0].sublayers[1]._parent.name,
+ testProvider.sublayers[0].sublayers[0].sublayers[1]._parent.name
).toEqual("Cat1");
expect(testProvider.sublayers[0].sublayers[0].sublayers[2].name).toEqual(
- "SubCat3",
+ "SubCat3"
);
expect(
- testProvider.sublayers[0].sublayers[0].sublayers[2].visibility,
+ testProvider.sublayers[0].sublayers[0].sublayers[2].visibility
).toEqual(true);
expect(
- testProvider.sublayers[0].sublayers[0].sublayers[2]._parent.name,
+ testProvider.sublayers[0].sublayers[0].sublayers[2]._parent.name
).toEqual("Cat1");
expect(testProvider.sublayers[0].sublayers[1].sublayers.length).toEqual(0);
});
@@ -395,7 +395,7 @@ describe("Scene/I3SDataProvider", function () {
layers: [mockLayerDataTextured],
};
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(providerData),
+ Promise.resolve(providerData)
);
spyOn(Cesium3DTileset, "fromUrl").and.callFake(async () => {
const tileset = new Cesium3DTileset();
@@ -414,7 +414,7 @@ describe("Scene/I3SDataProvider", function () {
it("default options for I3SDataProvider without textured layers", async function () {
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(mockProviderData),
+ Promise.resolve(mockProviderData)
);
spyOn(Cesium3DTileset, "fromUrl").and.callFake(async () => {
const tileset = new Cesium3DTileset();
@@ -433,7 +433,7 @@ describe("Scene/I3SDataProvider", function () {
it("manual options for I3SDataProvider without textured layers", async function () {
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(mockProviderData),
+ Promise.resolve(mockProviderData)
);
spyOn(Cesium3DTileset, "fromUrl").and.callFake(async () => {
const tileset = new Cesium3DTileset();
@@ -526,7 +526,7 @@ describe("Scene/I3SDataProvider", function () {
it("constructs I3SDataProvider with BSL without sublayers and statistics", async function () {
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(mockBSLProviderData2),
+ Promise.resolve(mockBSLProviderData2)
);
spyOn(Cesium3DTileset, "fromUrl").and.callFake(async () => {
const tileset = new Cesium3DTileset();
@@ -535,7 +535,7 @@ describe("Scene/I3SDataProvider", function () {
});
const testProvider = await I3SDataProvider.fromUrl(
"mockProviderUrl",
- i3sOptions,
+ i3sOptions
);
expect(testProvider.sublayers.length).toEqual(0);
@@ -544,7 +544,7 @@ describe("Scene/I3SDataProvider", function () {
it("wraps update", async function () {
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(mockProviderData),
+ Promise.resolve(mockProviderData)
);
spyOn(Cesium3DTileset, "fromUrl").and.callFake(async () => {
const tileset = new Cesium3DTileset();
@@ -563,16 +563,16 @@ describe("Scene/I3SDataProvider", function () {
testProvider.update(frameState);
expect(testProvider._layers[0]._tileset.update).toHaveBeenCalledWith(
- frameState,
+ frameState
);
expect(testProvider._layers[1]._tileset.update).toHaveBeenCalledWith(
- frameState,
+ frameState
);
});
it("wraps prePassesUpdate", async function () {
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(mockProviderData),
+ Promise.resolve(mockProviderData)
);
spyOn(Cesium3DTileset, "fromUrl").and.callFake(async () => {
const tileset = new Cesium3DTileset();
@@ -591,16 +591,16 @@ describe("Scene/I3SDataProvider", function () {
testProvider.prePassesUpdate(frameState);
expect(
- testProvider._layers[0]._tileset.prePassesUpdate,
+ testProvider._layers[0]._tileset.prePassesUpdate
).toHaveBeenCalledWith(frameState);
expect(
- testProvider._layers[1]._tileset.prePassesUpdate,
+ testProvider._layers[1]._tileset.prePassesUpdate
).toHaveBeenCalledWith(frameState);
});
it("wraps postPassesUpdate", async function () {
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(mockProviderData),
+ Promise.resolve(mockProviderData)
);
spyOn(Cesium3DTileset, "fromUrl").and.callFake(async () => {
const tileset = new Cesium3DTileset();
@@ -619,16 +619,16 @@ describe("Scene/I3SDataProvider", function () {
testProvider.postPassesUpdate(frameState);
expect(
- testProvider._layers[0]._tileset.postPassesUpdate,
+ testProvider._layers[0]._tileset.postPassesUpdate
).toHaveBeenCalledWith(frameState);
expect(
- testProvider._layers[1]._tileset.postPassesUpdate,
+ testProvider._layers[1]._tileset.postPassesUpdate
).toHaveBeenCalledWith(frameState);
});
it("wraps updateForPass", async function () {
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(mockProviderData),
+ Promise.resolve(mockProviderData)
);
spyOn(Cesium3DTileset, "fromUrl").and.callFake(async () => {
const tileset = new Cesium3DTileset();
@@ -649,11 +649,11 @@ describe("Scene/I3SDataProvider", function () {
expect(testProvider._layers[0]._tileset.updateForPass).toHaveBeenCalledWith(
frameState,
- passState,
+ passState
);
expect(testProvider._layers[1]._tileset.updateForPass).toHaveBeenCalledWith(
frameState,
- passState,
+ passState
);
});
@@ -668,7 +668,7 @@ describe("Scene/I3SDataProvider", function () {
});
const testProvider = await I3SDataProvider.fromUrl(
"mockProviderUrl",
- i3sOptions,
+ i3sOptions
);
// Function should not be called for tilesets that are not yet ready
@@ -683,7 +683,7 @@ describe("Scene/I3SDataProvider", function () {
it("isDestroyed returns false for new provider", async function () {
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(mockProviderData),
+ Promise.resolve(mockProviderData)
);
spyOn(Cesium3DTileset, "fromUrl").and.callFake(async () => {
const tileset = new Cesium3DTileset();
@@ -700,7 +700,7 @@ describe("Scene/I3SDataProvider", function () {
it("destroys provider", async function () {
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(mockProviderData),
+ Promise.resolve(mockProviderData)
);
spyOn(Cesium3DTileset, "fromUrl").and.callFake(async () => {
const tileset = new Cesium3DTileset();
@@ -727,7 +727,7 @@ describe("Scene/I3SDataProvider", function () {
const mockBinaryResponse = new ArrayBuffer(1);
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(mockProviderData),
+ Promise.resolve(mockProviderData)
);
spyOn(Cesium3DTileset, "fromUrl").and.callFake(async () => {
const tileset = new Cesium3DTileset();
@@ -739,7 +739,7 @@ describe("Scene/I3SDataProvider", function () {
});
spyOn(Resource.prototype, "fetchArrayBuffer").and.returnValue(
- Promise.resolve(mockBinaryResponse),
+ Promise.resolve(mockBinaryResponse)
);
const resource = Resource.createIfNeeded("mockBinaryUri");
@@ -751,7 +751,7 @@ describe("Scene/I3SDataProvider", function () {
it("loads binary with invalid uri", async function () {
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(mockProviderData),
+ Promise.resolve(mockProviderData)
);
spyOn(Cesium3DTileset, "fromUrl").and.callFake(async () => {
const tileset = new Cesium3DTileset();
@@ -775,13 +775,13 @@ describe("Scene/I3SDataProvider", function () {
it("fromUrl throws without url ", async function () {
await expectAsync(
- I3SDataProvider.fromUrl(),
+ I3SDataProvider.fromUrl()
).toBeRejectedWithDeveloperError();
});
it("loads json", async function () {
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(mockProviderData),
+ Promise.resolve(mockProviderData)
);
spyOn(Cesium3DTileset, "fromUrl").and.callFake(async () => {
const tileset = new Cesium3DTileset();
@@ -817,13 +817,13 @@ describe("Scene/I3SDataProvider", function () {
};
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(mockErrorResponse),
+ Promise.resolve(mockErrorResponse)
);
const resource = Resource.createIfNeeded("mockJsonUri");
await expectAsync(I3SDataProvider.loadJson(resource)).toBeRejectedWithError(
RuntimeError,
- mockErrorResponse.error,
+ mockErrorResponse.error
);
});
@@ -833,19 +833,19 @@ describe("Scene/I3SDataProvider", function () {
};
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(mockErrorResponse),
+ Promise.resolve(mockErrorResponse)
);
const resource = Resource.createIfNeeded("mockJsonUri");
await expectAsync(I3SDataProvider.loadJson(resource)).toBeRejectedWithError(
RuntimeError,
- mockErrorResponse.error,
+ mockErrorResponse.error
);
});
it("loads geoid data", async function () {
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(mockProviderDataWithLargeExtent),
+ Promise.resolve(mockProviderDataWithLargeExtent)
);
spyOn(Cesium3DTileset, "fromUrl").and.callFake(async () => {
const tileset = new Cesium3DTileset();
@@ -862,20 +862,20 @@ describe("Scene/I3SDataProvider", function () {
expect(testProvider._geoidDataList[0].height).toEqual(2);
expect(testProvider._geoidDataList[0].width).toEqual(2);
expect(testProvider._geoidDataList[0].buffer).toEqual(
- new Float32Array([0, 1, 2, 3]),
+ new Float32Array([0, 1, 2, 3])
);
expect(testProvider._geoidDataList[1].height).toEqual(2);
expect(testProvider._geoidDataList[1].width).toEqual(2);
expect(testProvider._geoidDataList[1].buffer).toEqual(
- new Float32Array([4, 5, 6, 7]),
+ new Float32Array([4, 5, 6, 7])
);
});
});
it("loadGeoidData resolves when no geoid provider is given", async function () {
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(mockProviderData),
+ Promise.resolve(mockProviderData)
);
spyOn(Cesium3DTileset, "fromUrl").and.callFake(async () => {
const tileset = new Cesium3DTileset();
@@ -896,7 +896,7 @@ describe("Scene/I3SDataProvider", function () {
const mockExtent2 = Rectangle.fromDegrees(3, 1, 4, 3);
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(mockProviderData),
+ Promise.resolve(mockProviderData)
);
spyOn(Cesium3DTileset, "fromUrl").and.callFake(async () => {
const tileset = new Cesium3DTileset();
@@ -938,7 +938,7 @@ describe("Scene/I3SDataProvider", function () {
expect(testProvider.layers.length).toEqual(2);
expect(testProvider.layers[0].rootNode.tile).toBeDefined();
expect(testProvider.layers[0].rootNode.tile.i3sNode).toEqual(
- testProvider.layers[0].rootNode,
+ testProvider.layers[0].rootNode
);
// Expect geoid data to have been loaded
@@ -946,7 +946,7 @@ describe("Scene/I3SDataProvider", function () {
expect(testProvider._geoidDataList[0].height).toEqual(2);
expect(testProvider._geoidDataList[0].width).toEqual(2);
expect(testProvider._geoidDataList[0].buffer).toEqual(
- new Float32Array([4, 5, 6, 7]),
+ new Float32Array([4, 5, 6, 7])
);
});
@@ -966,14 +966,14 @@ describe("Scene/I3SDataProvider", function () {
{
name: "testProvider",
geoidTiledTerrainProvider: mockGeoidProvider,
- },
+ }
);
// Layers have been populated and root node is loaded
expect(testProvider.layers.length).toEqual(1);
expect(testProvider.layers[0].rootNode.tile).toBeDefined();
expect(testProvider.layers[0].rootNode.tile.i3sNode).toEqual(
- testProvider.layers[0].rootNode,
+ testProvider.layers[0].rootNode
);
// Expect geoid data to have been loaded
@@ -981,7 +981,7 @@ describe("Scene/I3SDataProvider", function () {
expect(testProvider._geoidDataList[0].height).toEqual(2);
expect(testProvider._geoidDataList[0].width).toEqual(2);
expect(testProvider._geoidDataList[0].buffer).toEqual(
- new Float32Array([4, 5, 6, 7]),
+ new Float32Array([4, 5, 6, 7])
);
});
@@ -1008,30 +1008,30 @@ describe("Scene/I3SDataProvider", function () {
});
const testProvider = await I3SDataProvider.fromUrl(
"mockProviderUrl",
- i3sOptions,
+ i3sOptions
);
expect(testProvider.sublayers[0].sublayers[0].sublayers[0].name).toEqual(
- "SubCat1",
+ "SubCat1"
);
expect(
- testProvider.sublayers[0].sublayers[0].sublayers[0].visibility,
+ testProvider.sublayers[0].sublayers[0].sublayers[0].visibility
).toEqual(false);
const spy = spyOn(
testProvider.sublayers[0].sublayers[0].sublayers[0]._i3sLayers[0],
- "_updateVisibility",
+ "_updateVisibility"
);
testProvider.sublayers[0].sublayers[0].sublayers[0].visibility = false;
expect(
- testProvider.sublayers[0].sublayers[0].sublayers[0].visibility,
+ testProvider.sublayers[0].sublayers[0].sublayers[0].visibility
).toEqual(false);
expect(spy).not.toHaveBeenCalled();
testProvider.sublayers[0].sublayers[0].sublayers[0].visibility = true;
expect(
- testProvider.sublayers[0].sublayers[0].sublayers[0].visibility,
+ testProvider.sublayers[0].sublayers[0].sublayers[0].visibility
).toEqual(true);
expect(spy).toHaveBeenCalled();
});
@@ -1059,7 +1059,7 @@ describe("Scene/I3SDataProvider", function () {
});
const testProvider = await I3SDataProvider.fromUrl(
"mockProviderUrl/layers/0/",
- i3sOptions,
+ i3sOptions
);
const sublayers = testProvider.sublayers;
@@ -1113,16 +1113,16 @@ describe("Scene/I3SDataProvider", function () {
});
const testProvider = await I3SDataProvider.fromUrl(
"mockProviderUrl",
- i3sOptions,
+ i3sOptions
);
expect(
testProvider._attributeStatistics[0].resource.url.includes(
- `${mockBuildingLayerData.statisticsHRef}/?`,
- ),
+ `${mockBuildingLayerData.statisticsHRef}/?`
+ )
).toEqual(true);
expect(testProvider._attributeStatistics[0].data).toEqual(
- mockStatisticsData,
+ mockStatisticsData
);
const attributes = testProvider.getAttributeNames();
@@ -1137,7 +1137,7 @@ describe("Scene/I3SDataProvider", function () {
expect(noValues).toEqual([]);
const notExistingValues = testProvider.getAttributeValues(
- "notExistingAttribute",
+ "notExistingAttribute"
);
expect(notExistingValues).toEqual([]);
});
diff --git a/packages/engine/Specs/Scene/I3SDecoderSpec.js b/packages/engine/Specs/Scene/I3SDecoderSpec.js
index 52e3c3b6788f..feeec5984ae6 100644
--- a/packages/engine/Specs/Scene/I3SDecoderSpec.js
+++ b/packages/engine/Specs/Scene/I3SDecoderSpec.js
@@ -53,22 +53,22 @@ describe("Scene/I3SDecoder", function () {
it("throws with no default geometry schema", async function () {
await expectAsync(
- I3SDecoder.decode("mockUrl"),
+ I3SDecoder.decode("mockUrl")
).toBeRejectedWithDeveloperError();
});
it("throws with no geometry data", async function () {
await expectAsync(
- I3SDecoder.decode("mockUrl", defaultGeometrySchema),
+ I3SDecoder.decode("mockUrl", defaultGeometrySchema)
).toBeRejectedWithDeveloperError();
});
it("throws if not initialized", async function () {
spyOn(TaskProcessor.prototype, "initWebAssemblyModule").and.returnValue(
- Promise.resolve(false),
+ Promise.resolve(false)
);
await expectAsync(
- I3SDecoder.decode("mockUrl", defaultGeometrySchema, geometryDataObb),
+ I3SDecoder.decode("mockUrl", defaultGeometrySchema, geometryDataObb)
).toBeRejectedWithError(RuntimeError);
});
@@ -76,7 +76,7 @@ describe("Scene/I3SDecoder", function () {
const result = await I3SDecoder.decode(
"mockUrl",
defaultGeometrySchema,
- geometryDataObb,
+ geometryDataObb
);
expect(result).toBeDefined();
expect(result.meshData).toBeDefined();
@@ -98,7 +98,7 @@ describe("Scene/I3SDecoder", function () {
const result = await I3SDecoder.decode(
"mockUrl",
defaultGeometrySchema,
- geometryDataMbs,
+ geometryDataMbs
);
expect(result).toBeDefined();
expect(result.meshData).toBeDefined();
@@ -121,7 +121,7 @@ describe("Scene/I3SDecoder", function () {
"mockUrl",
defaultGeometrySchema,
geometryDataMbs,
- featureData,
+ featureData
);
expect(result).toBeDefined();
expect(result.meshData).toBeDefined();
diff --git a/packages/engine/Specs/Scene/I3SFieldSpec.js b/packages/engine/Specs/Scene/I3SFieldSpec.js
index 2d1031b287d9..e74abfd4cae8 100644
--- a/packages/engine/Specs/Scene/I3SFieldSpec.js
+++ b/packages/engine/Specs/Scene/I3SFieldSpec.js
@@ -10,7 +10,7 @@ import {
describe("Scene/I3SField", function () {
async function createMockProvider(url, layerData, geoidDataList) {
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(layerData),
+ Promise.resolve(layerData)
);
spyOn(Cesium3DTileset, "fromUrl").and.callFake(async () => {
const tileset = new Cesium3DTileset();
@@ -28,7 +28,7 @@ describe("Scene/I3SField", function () {
const provider = await createMockProvider(
providerUrl,
layerData,
- geoidDataList,
+ geoidDataList
);
const mockI3SLayer = provider.layers[0];
mockI3SLayer._geometryDefinitions = [
@@ -181,20 +181,20 @@ describe("Scene/I3SField", function () {
it("create field for root node loaded from uri", async function () {
const mockI3SLayerWithoutNodePages = await createMockLayer(
"mockProviderUrl",
- layerDataWithoutNodePages,
+ layerDataWithoutNodePages
);
const rootNode = new I3SNode(mockI3SLayerWithoutNodePages, "mockUrl", true);
const field = new I3SField(rootNode, { key: "test_key" });
expect(
- field.resource.url.includes("mockUrl/attributes/test_key/0?"),
+ field.resource.url.includes("mockUrl/attributes/test_key/0?")
).toEqual(true);
});
it("get field values", async function () {
const mockI3SLayerWithoutNodePages = await createMockLayer(
"mockProviderUrl",
- layerDataWithoutNodePages,
+ layerDataWithoutNodePages
);
const rootNode = new I3SNode(mockI3SLayerWithoutNodePages, "mockUrl", true);
@@ -211,7 +211,7 @@ describe("Scene/I3SField", function () {
it("get body offset for objectIds", async function () {
const mockI3SLayerWithoutNodePages = await createMockLayer(
"mockProviderUrl",
- layerDataWithoutNodePages,
+ layerDataWithoutNodePages
);
const rootNode = new I3SNode(mockI3SLayerWithoutNodePages, "mockUrl", true);
@@ -225,7 +225,7 @@ describe("Scene/I3SField", function () {
it("get body offset for unsupported property", async function () {
const mockI3SLayerWithoutNodePages = await createMockLayer(
"mockProviderUrl",
- layerDataWithoutNodePages,
+ layerDataWithoutNodePages
);
const rootNode = new I3SNode(mockI3SLayerWithoutNodePages, "mockUrl", true);
@@ -239,7 +239,7 @@ describe("Scene/I3SField", function () {
it("validate field header with invalid attribute buffer size", async function () {
const mockI3SLayerWithoutNodePages = await createMockLayer(
"mockProviderUrl",
- layerDataWithoutNodePages,
+ layerDataWithoutNodePages
);
const rootNode = new I3SNode(mockI3SLayerWithoutNodePages, "mockUrl", true);
@@ -254,7 +254,7 @@ describe("Scene/I3SField", function () {
it("validate field body with empty header", async function () {
const mockI3SLayerWithoutNodePages = await createMockLayer(
"mockProviderUrl",
- layerDataWithoutNodePages,
+ layerDataWithoutNodePages
);
const rootNode = new I3SNode(mockI3SLayerWithoutNodePages, "mockUrl", true);
@@ -269,7 +269,7 @@ describe("Scene/I3SField", function () {
it("validate field body with invalid attribute buffer", async function () {
const mockI3SLayerWithoutNodePages = await createMockLayer(
"mockProviderUrl",
- layerDataWithoutNodePages,
+ layerDataWithoutNodePages
);
const rootNode = new I3SNode(mockI3SLayerWithoutNodePages, "mockUrl", true);
@@ -287,7 +287,7 @@ describe("Scene/I3SField", function () {
it("validate field body with invalid offset", async function () {
const mockI3SLayerWithoutNodePages = await createMockLayer(
"mockProviderUrl",
- layerDataWithoutNodePages,
+ layerDataWithoutNodePages
);
const rootNode = new I3SNode(mockI3SLayerWithoutNodePages, "mockUrl", true);
@@ -302,7 +302,7 @@ describe("Scene/I3SField", function () {
it("validate field body with missing property", async function () {
const mockI3SLayerWithoutNodePages = await createMockLayer(
"mockProviderUrl",
- layerDataWithoutNodePages,
+ layerDataWithoutNodePages
);
const rootNode = new I3SNode(mockI3SLayerWithoutNodePages, "mockUrl", true);
@@ -317,7 +317,7 @@ describe("Scene/I3SField", function () {
it("load field with unavailable resource", async function () {
const mockI3SLayerWithoutNodePages = await createMockLayer(
"mockProviderUrl",
- layerDataWithoutNodePages,
+ layerDataWithoutNodePages
);
const spy = spyOn(Resource.prototype, "fetchArrayBuffer");
spy.and.callFake(function () {
@@ -343,11 +343,11 @@ describe("Scene/I3SField", function () {
it("load field with invalid header", async function () {
const mockI3SLayerWithoutNodePages = await createMockLayer(
"mockProviderUrl",
- layerDataWithoutNodePages,
+ layerDataWithoutNodePages
);
spyOn(
mockI3SLayerWithoutNodePages._dataProvider,
- "_loadBinary",
+ "_loadBinary"
).and.callFake(function () {
return Promise.resolve(new ArrayBuffer(1));
});
@@ -364,11 +364,11 @@ describe("Scene/I3SField", function () {
it("load field with invalid body", async function () {
const mockI3SLayerWithoutNodePages = await createMockLayer(
"mockProviderUrl",
- layerDataWithoutNodePages,
+ layerDataWithoutNodePages
);
spyOn(
mockI3SLayerWithoutNodePages._dataProvider,
- "_loadBinary",
+ "_loadBinary"
).and.callFake(function () {
return Promise.resolve(new ArrayBuffer(1));
});
@@ -386,12 +386,12 @@ describe("Scene/I3SField", function () {
it("load field with valid buffer", async function () {
const mockI3SLayerWithoutNodePages = await createMockLayer(
"mockProviderUrl",
- layerDataWithoutNodePages,
+ layerDataWithoutNodePages
);
const text = "Pass";
spyOn(
mockI3SLayerWithoutNodePages._dataProvider,
- "_loadBinary",
+ "_loadBinary"
).and.callFake(function () {
const buffer = new ArrayBuffer(text.length + 3);
const view = new Uint8Array(buffer);
diff --git a/packages/engine/Specs/Scene/I3SLayerSpec.js b/packages/engine/Specs/Scene/I3SLayerSpec.js
index 41aab81626af..c5832c28f3ba 100644
--- a/packages/engine/Specs/Scene/I3SLayerSpec.js
+++ b/packages/engine/Specs/Scene/I3SLayerSpec.js
@@ -115,7 +115,7 @@ describe("Scene/I3SLayer", function () {
async function createMockI3SProvider(layerData, options) {
spyOn(I3SDataProvider, "loadJson").and.returnValue(
- Promise.resolve(layerData),
+ Promise.resolve(layerData)
);
spyOn(Cesium3DTileset, "fromUrl").and.callFake(async (url, options) => {
const tileset = new Cesium3DTileset(options);
@@ -125,17 +125,17 @@ describe("Scene/I3SLayer", function () {
});
const mockI3SProvider = await I3SDataProvider.fromUrl(
"mockProviderUrl?testQuery=test",
- options,
+ options
);
spyOn(I3SDataProvider.prototype, "loadGeoidData").and.returnValue(
- Promise.resolve(),
+ Promise.resolve()
);
return mockI3SProvider;
}
it("constructs I3SLayer from url", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodePageResult),
+ Promise.resolve(nodePageResult)
);
const mockI3SProvider = await createMockI3SProvider(layerData);
@@ -202,14 +202,14 @@ describe("Scene/I3SLayer", function () {
it("constructs I3SLayer from id", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodePageResult),
+ Promise.resolve(nodePageResult)
);
const mockI3SProvider = await createMockI3SProvider(layerData2);
const testLayer = new I3SLayer(
mockI3SProvider,
layerData2,
- mockI3SProvider,
+ mockI3SProvider
);
expect(testLayer.data).toEqual(layerData2);
@@ -237,7 +237,7 @@ describe("Scene/I3SLayer", function () {
it("constructs I3SLayer from single layer url", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodePageResult),
+ Promise.resolve(nodePageResult)
);
const mockI3SProvider = await createMockI3SProvider(layerData2);
@@ -253,7 +253,7 @@ describe("Scene/I3SLayer", function () {
it("loads root node", async function () {
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(nodePageResult),
+ Promise.resolve(nodePageResult)
);
const mockI3SProvider = await createMockI3SProvider(layerData);
@@ -261,14 +261,14 @@ describe("Scene/I3SLayer", function () {
expect(testLayer.rootNode).toBeDefined();
expect(testLayer.rootNode.data.index).toEqual(rootNodePageEntry.index);
expect(testLayer.rootNode.data.children).toEqual(
- rootNodePageEntry.children,
+ rootNodePageEntry.children
);
expect(testLayer.rootNode.data.obb).toEqual(rootNodePageEntry.obb);
});
it("creates 3d tileset", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodePageResult),
+ Promise.resolve(nodePageResult)
);
const mockI3SProvider = await createMockI3SProvider(layerData);
@@ -288,7 +288,7 @@ describe("Scene/I3SLayer", function () {
maximumScreenSpaceError: 8,
};
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodePageResult),
+ Promise.resolve(nodePageResult)
);
await createMockI3SProvider(layerData, {
@@ -296,13 +296,13 @@ describe("Scene/I3SLayer", function () {
});
expect(Cesium3DTileset.fromUrl).toHaveBeenCalledWith(
jasmine.any(String),
- cesium3dTilesetOptions,
+ cesium3dTilesetOptions
);
});
it("load i3s layer rejects unsupported spatial reference", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodePageResult),
+ Promise.resolve(nodePageResult)
);
const invalidLayerData = {
layerType: "3DObject",
@@ -319,16 +319,16 @@ describe("Scene/I3SLayer", function () {
spatialReference: { wkid: 3857 },
};
await expectAsync(
- createMockI3SProvider(invalidLayerData),
+ createMockI3SProvider(invalidLayerData)
).toBeRejectedWithError(
RuntimeError,
- `Unsupported spatial reference: ${invalidLayerData.spatialReference.wkid}`,
+ `Unsupported spatial reference: ${invalidLayerData.spatialReference.wkid}`
);
});
it("creates 3d tileset with outline color from symbology", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodePageResult),
+ Promise.resolve(nodePageResult)
);
const mockI3SProvider = await createMockI3SProvider(layerData2, {
@@ -349,7 +349,7 @@ describe("Scene/I3SLayer", function () {
outlineColor: new Color(0.5, 0.5, 0.5, 0.5),
};
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodePageResult),
+ Promise.resolve(nodePageResult)
);
const mockI3SProvider = await createMockI3SProvider(layerData2, {
diff --git a/packages/engine/Specs/Scene/I3SNodeSpec.js b/packages/engine/Specs/Scene/I3SNodeSpec.js
index 8cdf6e51e6a2..f7cc79df1263 100644
--- a/packages/engine/Specs/Scene/I3SNodeSpec.js
+++ b/packages/engine/Specs/Scene/I3SNodeSpec.js
@@ -30,11 +30,11 @@ describe("Scene/I3SNode", function () {
-20037508.342787e7,
-20037508.342787e7,
20037508.342787e7,
- 20037508.342787e7,
+ 20037508.342787e7
),
offset: 0,
projection: new WebMercatorProjection(
- new Ellipsoid(6378137, 6378137, 6356752.314245179),
+ new Ellipsoid(6378137, 6378137, 6356752.314245179)
),
projectionType: "WebMercator",
scale: 1,
@@ -370,7 +370,7 @@ describe("Scene/I3SNode", function () {
async function createMockProvider(url, layerData, geoidDataList, options) {
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(layerData),
+ Promise.resolve(layerData)
);
spyOn(Cesium3DTileset, "fromUrl").and.callFake(async () => {
const tileset = new Cesium3DTileset();
@@ -387,13 +387,13 @@ describe("Scene/I3SNode", function () {
providerUrl,
layerData,
geoidDataList,
- options,
+ options
) {
const provider = await createMockProvider(
providerUrl,
layerData,
geoidDataList,
- options,
+ options
);
const mockI3SLayer = provider.layers[0];
mockI3SLayer._geometryDefinitions = [
@@ -420,15 +420,15 @@ describe("Scene/I3SNode", function () {
it("constructs nodes", async function () {
const mockI3SLayerWithoutNodePages = await createMockLayer(
"mockProviderUrl",
- layerDataWithoutNodePages,
+ layerDataWithoutNodePages
);
const rootNode = new I3SNode(
mockI3SLayerWithoutNodePages,
"mockRootUrl",
- true,
+ true
);
expect(rootNode.resource.url).toContain(
- "mockProviderUrl/mockLayerUrl/mockRootUrl/",
+ "mockProviderUrl/mockLayerUrl/mockRootUrl/"
);
expect(rootNode.parent).toEqual(mockI3SLayerWithoutNodePages);
expect(rootNode.layer).toEqual(mockI3SLayerWithoutNodePages);
@@ -444,23 +444,74 @@ describe("Scene/I3SNode", function () {
const customAttributes = {
cartesianCenter: Ellipsoid.WGS84.cartographicToCartesian(
- new Cartographic(-90, 45, 0),
+ new Cartographic(-90, 45, 0)
),
featureIndex: new Uint32Array([0, 0, 1, 1]),
positions: new Float32Array([
- -20, -20, 0, 20, 0, 0, -20, 0, 0, -20, -20, 0, 20, -20, 0, 20, 0, 0, -20,
- 0, 0, 20, 20, 0, -20, 20, 0, -20, 0, 0, 20, 0, 0, 20, 20, 0,
+ -20,
+ -20,
+ 0,
+ 20,
+ 0,
+ 0,
+ -20,
+ 0,
+ 0,
+ -20,
+ -20,
+ 0,
+ 20,
+ -20,
+ 0,
+ 20,
+ 0,
+ 0,
+ -20,
+ 0,
+ 0,
+ 20,
+ 20,
+ 0,
+ -20,
+ 20,
+ 0,
+ -20,
+ 0,
+ 0,
+ 20,
+ 0,
+ 0,
+ 20,
+ 20,
+ 0,
]),
parentRotation: [1, 0, 0, 0, 1, 0, 0, 0, 1],
};
const customAttributesIndexed = {
cartesianCenter: Ellipsoid.WGS84.cartographicToCartesian(
- new Cartographic(-90, 45, 0),
+ new Cartographic(-90, 45, 0)
),
featureIndex: new Uint32Array([0, 0, 1, 1]),
indices: new Uint32Array([0, 1, 2, 0, 3, 1, 2, 4, 5, 2, 1, 4]),
positions: new Float32Array([
- -20, -20, 0, 20, 0, 0, -20, 0, 0, 20, -20, 0, 20, 20, 0, -20, 20, 0,
+ -20,
+ -20,
+ 0,
+ 20,
+ 0,
+ 0,
+ -20,
+ 0,
+ 0,
+ 20,
+ -20,
+ 0,
+ 20,
+ 20,
+ 0,
+ -20,
+ 20,
+ 0,
]),
parentRotation: [1, 0, 0, 0, 1, 0, 0, 0, 1],
};
@@ -470,25 +521,25 @@ describe("Scene/I3SNode", function () {
const intersectPoint = new Cartesian3(
-19 + customAttributes.cartesianCenter.x,
-19 + customAttributes.cartesianCenter.y,
- 0 + customAttributes.cartesianCenter.z,
+ 0 + customAttributes.cartesianCenter.z
);
// On triangle edge
const borderPoint = new Cartesian3(
20 + customAttributes.cartesianCenter.x,
15 + customAttributes.cartesianCenter.y,
- 0 + customAttributes.cartesianCenter.z,
+ 0 + customAttributes.cartesianCenter.z
);
// Above triangle
const floatingIntersectPoint = new Cartesian3(
-19 + customAttributes.cartesianCenter.x,
19 + customAttributes.cartesianCenter.y,
- 2 + customAttributes.cartesianCenter.z,
+ 2 + customAttributes.cartesianCenter.z
);
// No intersection
const noIntersectPoint = new Cartesian3(
-21 + customAttributes.cartesianCenter.x,
-21 + customAttributes.cartesianCenter.y,
- 0 + customAttributes.cartesianCenter.z,
+ 0 + customAttributes.cartesianCenter.z
);
const i3sGeometryData = {
@@ -583,12 +634,12 @@ describe("Scene/I3SNode", function () {
it("loads root node from uri", async function () {
const mockI3SLayerWithoutNodePages = await createMockLayer(
"mockProviderUrl",
- layerDataWithoutNodePages,
+ layerDataWithoutNodePages
);
const rootNode = new I3SNode(mockI3SLayerWithoutNodePages, "mockUrl", true);
const spy = spyOn(I3SDataProvider, "loadJson").and.returnValue(
- Promise.resolve(rootNodeWithChildren),
+ Promise.resolve(rootNodeWithChildren)
);
return rootNode.load().then(function () {
@@ -600,12 +651,12 @@ describe("Scene/I3SNode", function () {
it("loads child node from uri", async function () {
const mockI3SLayerWithoutNodePages = await createMockLayer(
"mockProviderUrl",
- layerDataWithoutNodePages,
+ layerDataWithoutNodePages
);
const rootNode = new I3SNode(mockI3SLayerWithoutNodePages, "mockUrl", true);
const childNode = new I3SNode(rootNode, "mockUrlChild", false);
const spy = spyOn(I3SDataProvider, "loadJson").and.returnValue(
- Promise.resolve(nodeWithContent),
+ Promise.resolve(nodeWithContent)
);
return rootNode
@@ -623,12 +674,12 @@ describe("Scene/I3SNode", function () {
it("loads root from node pages", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const rootNode = new I3SNode(mockI3SLayerWithNodePages, 0, true);
@@ -640,12 +691,12 @@ describe("Scene/I3SNode", function () {
it("loads node from node pages", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const rootNode = new I3SNode(mockI3SLayerWithNodePages, 0, true);
const childNode = new I3SNode(rootNode, 1, false);
@@ -663,13 +714,13 @@ describe("Scene/I3SNode", function () {
it("loads node with geoid conversion", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockI3SLayerGeoid = await createMockLayer(
"mockProviderUrl?testQuery=test",
layerData,
- geoidDataList,
+ geoidDataList
);
const rootNode = new I3SNode(mockI3SLayerGeoid, 0, true);
const childNode = new I3SNode(rootNode, 1, false);
@@ -686,41 +737,42 @@ describe("Scene/I3SNode", function () {
const nodeOrigin = new Cartesian3(
childNode._globalTransform[3],
childNode._globalTransform[7],
- childNode._globalTransform[11],
+ childNode._globalTransform[11]
+ );
+ const cartographicOrigin = Ellipsoid.WGS84.cartesianToCartographic(
+ nodeOrigin
);
- const cartographicOrigin =
- Ellipsoid.WGS84.cartesianToCartographic(nodeOrigin);
const expectedHeight = 10;
const expectedPosition = new Cartographic(
CesiumMath.toRadians(-90),
CesiumMath.toRadians(45),
- expectedHeight,
+ expectedHeight
);
expect(cartographicOrigin.longitude).toBeCloseTo(
expectedPosition.longitude,
- -3,
+ -3
);
expect(cartographicOrigin.latitude).toBeCloseTo(
expectedPosition.latitude,
- -3,
+ -3
);
expect(cartographicOrigin.height).toBeCloseTo(
expectedPosition.height,
- -3,
+ -3
);
});
});
it("loads children", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const rootNode = new I3SNode(mockI3SLayerWithNodePages, 0, true);
@@ -748,12 +800,12 @@ describe("Scene/I3SNode", function () {
it("loads children for leaf node", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const nodeWithoutChildren = new I3SNode(mockI3SLayerWithNodePages, 1, true);
@@ -770,49 +822,49 @@ describe("Scene/I3SNode", function () {
it("loads not existing fields", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const rootNode = new I3SNode(mockI3SLayerWithNodePages, 1, true);
- spyOn(rootNode._dataProvider, "_loadBinary").and.callFake(
- function (resource) {
- return new Promise(function (resolve, reject) {
- let resultBuffer = "";
- if (resource.url.includes("f_0/") || resource.url.includes("f_1/")) {
- resultBuffer = int8AttrBufferBase64;
- } else if (
- resource.url.includes("f_2/") ||
- resource.url.includes("f_3/")
- ) {
- resultBuffer = int16AttrBufferBase64;
- } else if (
- resource.url.includes("f_4/") ||
- resource.url.includes("f_5/") ||
- resource.url.includes("f_6/")
- ) {
- resultBuffer = int32AttrBufferBase64;
- } else if (
- resource.url.includes("f_7/") ||
- resource.url.includes("f_8/")
- ) {
- resultBuffer = int64AttrBufferBase64;
- } else if (resource.url.includes("f_9/")) {
- resultBuffer = float32AttrBufferBase64;
- } else if (resource.url.includes("f_10/")) {
- resultBuffer = float64AttrBufferBase64;
- } else if (resource.url.includes("f_11/")) {
- resultBuffer = stringAttrBufferBase64;
- }
+ spyOn(rootNode._dataProvider, "_loadBinary").and.callFake(function (
+ resource
+ ) {
+ return new Promise(function (resolve, reject) {
+ let resultBuffer = "";
+ if (resource.url.includes("f_0/") || resource.url.includes("f_1/")) {
+ resultBuffer = int8AttrBufferBase64;
+ } else if (
+ resource.url.includes("f_2/") ||
+ resource.url.includes("f_3/")
+ ) {
+ resultBuffer = int16AttrBufferBase64;
+ } else if (
+ resource.url.includes("f_4/") ||
+ resource.url.includes("f_5/") ||
+ resource.url.includes("f_6/")
+ ) {
+ resultBuffer = int32AttrBufferBase64;
+ } else if (
+ resource.url.includes("f_7/") ||
+ resource.url.includes("f_8/")
+ ) {
+ resultBuffer = int64AttrBufferBase64;
+ } else if (resource.url.includes("f_9/")) {
+ resultBuffer = float32AttrBufferBase64;
+ } else if (resource.url.includes("f_10/")) {
+ resultBuffer = float64AttrBufferBase64;
+ } else if (resource.url.includes("f_11/")) {
+ resultBuffer = stringAttrBufferBase64;
+ }
- resolve(base64ToArrayBuffer(resultBuffer));
- });
- },
- );
+ resolve(base64ToArrayBuffer(resultBuffer));
+ });
+ });
return rootNode
.load()
@@ -822,10 +874,10 @@ describe("Scene/I3SNode", function () {
.then(function () {
expect(rootNode.fields.testInt8.name).toEqual("testInt8");
expect(rootNode.fields.testInt8.resource.url).toContain(
- "mockProviderUrl/mockLayerUrl/nodes/1/attributes/f_1/0",
+ "mockProviderUrl/mockLayerUrl/nodes/1/attributes/f_1/0"
);
expect(
- rootNode.fields.testInt8.resource.queryParameters.testQuery,
+ rootNode.fields.testInt8.resource.queryParameters.testQuery
).toEqual("test");
expect(rootNode.fields.testInt8.header.count).toEqual(2);
@@ -845,7 +897,7 @@ describe("Scene/I3SNode", function () {
expect(rootNode.fields.testString.header.count).toEqual(2);
expect(
- rootNode.fields.testString.header.attributeValuesByteCount,
+ rootNode.fields.testString.header.attributeValuesByteCount
).toEqual(16);
const featureFields0 = rootNode.getFieldsForFeature(0);
@@ -874,11 +926,11 @@ describe("Scene/I3SNode", function () {
it("loads existing fields", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
spyOn(I3SField.prototype, "load").and.returnValue(
- Promise.resolve({ mockResult: "success" }),
+ Promise.resolve({ mockResult: "success" })
);
const mockLayerData = clone(layerData, true);
@@ -886,7 +938,7 @@ describe("Scene/I3SNode", function () {
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- mockLayerData,
+ mockLayerData
);
const rootNode = new I3SNode(mockI3SLayerWithNodePages, 1, true);
rootNode._data = {
@@ -903,7 +955,7 @@ describe("Scene/I3SNode", function () {
it("loads existing fields without storageInfo", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockLayerData = clone(layerData, true);
@@ -911,7 +963,7 @@ describe("Scene/I3SNode", function () {
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- mockLayerData,
+ mockLayerData
);
const rootNode = new I3SNode(mockI3SLayerWithNodePages, 1, true);
@@ -922,11 +974,11 @@ describe("Scene/I3SNode", function () {
it("loads existing field", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
spyOn(I3SField.prototype, "load").and.returnValue(
- Promise.resolve({ mockResult: "success" }),
+ Promise.resolve({ mockResult: "success" })
);
const mockLayerData = clone(layerData, true);
@@ -934,7 +986,7 @@ describe("Scene/I3SNode", function () {
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- mockLayerData,
+ mockLayerData
);
const rootNode = new I3SNode(mockI3SLayerWithNodePages, 1, true);
rootNode._data = {
@@ -951,7 +1003,7 @@ describe("Scene/I3SNode", function () {
it("loads not existing field without storageInfo for the layer", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockLayerData = clone(layerData, true);
@@ -959,7 +1011,7 @@ describe("Scene/I3SNode", function () {
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- mockLayerData,
+ mockLayerData
);
const rootNode = new I3SNode(mockI3SLayerWithNodePages, 1, true);
@@ -970,7 +1022,7 @@ describe("Scene/I3SNode", function () {
it("loads not existing field without storageInfo for the field", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockLayerData = clone(layerData, true);
@@ -978,7 +1030,7 @@ describe("Scene/I3SNode", function () {
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- mockLayerData,
+ mockLayerData
);
const rootNode = new I3SNode(mockI3SLayerWithNodePages, 1, true);
@@ -989,17 +1041,17 @@ describe("Scene/I3SNode", function () {
it("loads geometry from node pages", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const nodeWithMesh = new I3SNode(mockI3SLayerWithNodePages, 1, true);
spyOn(nodeWithMesh._dataProvider, "_loadBinary").and.returnValue(
- Promise.resolve(new ArrayBuffer()),
+ Promise.resolve(new ArrayBuffer())
);
return nodeWithMesh
@@ -1011,18 +1063,18 @@ describe("Scene/I3SNode", function () {
expect(nodeWithMesh.geometryData.length).toEqual(1);
expect(nodeWithMesh.geometryData[0].resource.url).toContain(
- "mockProviderUrl/mockLayerUrl/nodes/1/geometries/1",
+ "mockProviderUrl/mockLayerUrl/nodes/1/geometries/1"
);
expect(
- nodeWithMesh.geometryData[0].resource.queryParameters.testQuery,
+ nodeWithMesh.geometryData[0].resource.queryParameters.testQuery
).toEqual("test");
//Expect geometry 1 to have been picked because geometry 0 didn't have all the required properties
expect(nodeWithMesh._dataProvider._loadBinary).toHaveBeenCalledWith(
- nodeWithMesh.geometryData[0].resource,
+ nodeWithMesh.geometryData[0].resource
);
expect(nodeWithMesh.geometryData[0]._geometryBufferInfo.index).toEqual(
- 1,
+ 1
);
expect(nodeWithMesh.geometryData[0]._geometryDefinitions).toBeDefined();
@@ -1034,19 +1086,19 @@ describe("Scene/I3SNode", function () {
it("loads geometry from url", async function () {
const mockI3SLayerWithoutNodePages = await createMockLayer(
"mockProviderUrl",
- layerDataWithoutNodePages,
+ layerDataWithoutNodePages
);
const nodeWithMesh = new I3SNode(
mockI3SLayerWithoutNodePages,
"mockNodeUrl",
- true,
+ true
);
spyOn(I3SDataProvider, "loadJson").and.returnValue(
- Promise.resolve(nodeWithContent),
+ Promise.resolve(nodeWithContent)
);
spyOn(nodeWithMesh._dataProvider, "_loadBinary").and.returnValue(
- Promise.resolve(new ArrayBuffer()),
+ Promise.resolve(new ArrayBuffer())
);
return nodeWithMesh
@@ -1058,10 +1110,10 @@ describe("Scene/I3SNode", function () {
expect(nodeWithMesh.geometryData.length).toEqual(1);
expect(nodeWithMesh.geometryData[0].resource.url).toContain(
- "mockProviderUrl/mockLayerUrl/mockNodeUrl/mockGeometryDataUrl",
+ "mockProviderUrl/mockLayerUrl/mockNodeUrl/mockGeometryDataUrl"
);
expect(nodeWithMesh._dataProvider._loadBinary).toHaveBeenCalledWith(
- nodeWithMesh.geometryData[0].resource,
+ nodeWithMesh.geometryData[0].resource
);
//Expect data to match the empty data returned by our spy
@@ -1071,12 +1123,12 @@ describe("Scene/I3SNode", function () {
it("loads not existing geometry", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const rootNode = new I3SNode(mockI3SLayerWithNodePages, 1, true);
rootNode._data = {};
@@ -1088,21 +1140,21 @@ describe("Scene/I3SNode", function () {
it("generate geometry from node pages", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const nodeWithTexturedMesh = new I3SNode(
mockI3SLayerWithNodePages,
1,
- true,
+ true
);
spyOn(nodeWithTexturedMesh._dataProvider, "_loadBinary").and.returnValue(
- Promise.resolve(new ArrayBuffer()),
+ Promise.resolve(new ArrayBuffer())
);
return nodeWithTexturedMesh
@@ -1117,7 +1169,7 @@ describe("Scene/I3SNode", function () {
i3sGeometryData.meshData.meshes,
i3sGeometryData.meshData.buffers,
i3sGeometryData.meshData.bufferViews,
- i3sGeometryData.meshData.accessors,
+ i3sGeometryData.meshData.accessors
);
expect(rawGltf.scene).toEqual(0);
@@ -1127,7 +1179,7 @@ describe("Scene/I3SNode", function () {
expect(rawGltf.meshes).toEqual(i3sGeometryData.meshData.meshes);
expect(rawGltf.buffers).toEqual(i3sGeometryData.meshData.buffers);
expect(rawGltf.bufferViews).toEqual(
- i3sGeometryData.meshData.bufferViews,
+ i3sGeometryData.meshData.bufferViews
);
expect(rawGltf.accessors).toEqual(i3sGeometryData.meshData.accessors);
@@ -1140,21 +1192,21 @@ describe("Scene/I3SNode", function () {
it("generate geometry from node pages with transparent material", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const nodeWithTexturedMesh = new I3SNode(
mockI3SLayerWithNodePages,
1,
- true,
+ true
);
spyOn(nodeWithTexturedMesh._dataProvider, "_loadBinary").and.returnValue(
- Promise.resolve(new ArrayBuffer()),
+ Promise.resolve(new ArrayBuffer())
);
return nodeWithTexturedMesh
@@ -1182,26 +1234,26 @@ describe("Scene/I3SNode", function () {
transparentI3sGeometryData.meshData.meshes,
transparentI3sGeometryData.meshData.buffers,
transparentI3sGeometryData.meshData.bufferViews,
- transparentI3sGeometryData.meshData.accessors,
+ transparentI3sGeometryData.meshData.accessors
);
expect(rawGltf.scene).toEqual(0);
expect(rawGltf.scenes.length).toEqual(1);
expect(rawGltf.nodes).toEqual(
- transparentI3sGeometryData.meshData.nodes,
+ transparentI3sGeometryData.meshData.nodes
);
expect(rawGltf.meshes).toEqual(
- transparentI3sGeometryData.meshData.meshes,
+ transparentI3sGeometryData.meshData.meshes
);
expect(rawGltf.buffers).toEqual(
- transparentI3sGeometryData.meshData.buffers,
+ transparentI3sGeometryData.meshData.buffers
);
expect(rawGltf.bufferViews).toEqual(
- transparentI3sGeometryData.meshData.bufferViews,
+ transparentI3sGeometryData.meshData.bufferViews
);
expect(rawGltf.accessors).toEqual(
- transparentI3sGeometryData.meshData.accessors,
+ transparentI3sGeometryData.meshData.accessors
);
expect(rawGltf.textures).toEqual([]);
@@ -1210,7 +1262,7 @@ describe("Scene/I3SNode", function () {
expect(rawGltf.materials[0].alphaMode).toEqual("BLEND");
expect(rawGltf.materials[0].emissiveFactor).toEqual([0, 0, 0]);
expect(
- rawGltf.materials[0].pbrMetallicRoughness.baseColorFactor,
+ rawGltf.materials[0].pbrMetallicRoughness.baseColorFactor
).toEqual([1, 1, 1, 1]);
expect(rawGltf.materials[1].alphaMode).toBeUndefined();
});
@@ -1218,23 +1270,23 @@ describe("Scene/I3SNode", function () {
it("generate geometry from node pages with transparent material when alpha mode is defined", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
mockI3SLayerWithNodePages._data.materialDefinitions[0].alphaMode = "blend";
mockI3SLayerWithNodePages._data.materialDefinitions[1].alphaMode = "blend";
const nodeWithTexturedMesh = new I3SNode(
mockI3SLayerWithNodePages,
1,
- true,
+ true
);
spyOn(nodeWithTexturedMesh._dataProvider, "_loadBinary").and.returnValue(
- Promise.resolve(new ArrayBuffer()),
+ Promise.resolve(new ArrayBuffer())
);
return nodeWithTexturedMesh
@@ -1262,26 +1314,26 @@ describe("Scene/I3SNode", function () {
transparentI3sGeometryData.meshData.meshes,
transparentI3sGeometryData.meshData.buffers,
transparentI3sGeometryData.meshData.bufferViews,
- transparentI3sGeometryData.meshData.accessors,
+ transparentI3sGeometryData.meshData.accessors
);
expect(rawGltf.scene).toEqual(0);
expect(rawGltf.scenes.length).toEqual(1);
expect(rawGltf.nodes).toEqual(
- transparentI3sGeometryData.meshData.nodes,
+ transparentI3sGeometryData.meshData.nodes
);
expect(rawGltf.meshes).toEqual(
- transparentI3sGeometryData.meshData.meshes,
+ transparentI3sGeometryData.meshData.meshes
);
expect(rawGltf.buffers).toEqual(
- transparentI3sGeometryData.meshData.buffers,
+ transparentI3sGeometryData.meshData.buffers
);
expect(rawGltf.bufferViews).toEqual(
- transparentI3sGeometryData.meshData.bufferViews,
+ transparentI3sGeometryData.meshData.bufferViews
);
expect(rawGltf.accessors).toEqual(
- transparentI3sGeometryData.meshData.accessors,
+ transparentI3sGeometryData.meshData.accessors
);
expect(rawGltf.textures).toEqual([]);
@@ -1294,21 +1346,21 @@ describe("Scene/I3SNode", function () {
it("generate geometry from node pages without material", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const nodeWithTexturedMesh = new I3SNode(
mockI3SLayerWithNodePages,
1,
- true,
+ true
);
spyOn(nodeWithTexturedMesh._dataProvider, "_loadBinary").and.returnValue(
- Promise.resolve(new ArrayBuffer()),
+ Promise.resolve(new ArrayBuffer())
);
return nodeWithTexturedMesh
@@ -1325,7 +1377,7 @@ describe("Scene/I3SNode", function () {
copyI3sGeometryData.meshData.meshes,
copyI3sGeometryData.meshData.buffers,
copyI3sGeometryData.meshData.bufferViews,
- copyI3sGeometryData.meshData.accessors,
+ copyI3sGeometryData.meshData.accessors
);
expect(rawGltf.scene).toEqual(0);
@@ -1335,10 +1387,10 @@ describe("Scene/I3SNode", function () {
expect(rawGltf.meshes).toEqual(copyI3sGeometryData.meshData.meshes);
expect(rawGltf.buffers).toEqual(copyI3sGeometryData.meshData.buffers);
expect(rawGltf.bufferViews).toEqual(
- copyI3sGeometryData.meshData.bufferViews,
+ copyI3sGeometryData.meshData.bufferViews
);
expect(rawGltf.accessors).toEqual(
- copyI3sGeometryData.meshData.accessors,
+ copyI3sGeometryData.meshData.accessors
);
expect(rawGltf.textures).toEqual([]);
@@ -1350,21 +1402,21 @@ describe("Scene/I3SNode", function () {
it("generate textured geometry from node pages", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const nodeWithTexturedMesh = new I3SNode(
mockI3SLayerWithNodePages,
2,
- true,
+ true
);
spyOn(nodeWithTexturedMesh._dataProvider, "_loadBinary").and.returnValue(
- Promise.resolve(new ArrayBuffer()),
+ Promise.resolve(new ArrayBuffer())
);
return nodeWithTexturedMesh
@@ -1379,7 +1431,7 @@ describe("Scene/I3SNode", function () {
i3sGeometryData.meshData.meshes,
i3sGeometryData.meshData.buffers,
i3sGeometryData.meshData.bufferViews,
- i3sGeometryData.meshData.accessors,
+ i3sGeometryData.meshData.accessors
);
expect(rawGltf.textures).toBeDefined();
@@ -1393,7 +1445,7 @@ describe("Scene/I3SNode", function () {
expect(rawGltf.images).toBeDefined();
expect(rawGltf.images.length).toEqual(1);
expect(rawGltf.images[0].uri).toContain(
- "mockProviderUrl/mockLayerUrl/nodes/2/textures/1?testQuery=test",
+ "mockProviderUrl/mockLayerUrl/nodes/2/textures/1?testQuery=test"
);
});
});
@@ -1401,19 +1453,19 @@ describe("Scene/I3SNode", function () {
it("generate textured geometry from url", async function () {
const mockI3SLayerWithoutNodePages = await createMockLayer(
"mockProviderUrl",
- layerDataWithoutNodePages,
+ layerDataWithoutNodePages
);
const nodeWithTexturedMesh = new I3SNode(
mockI3SLayerWithoutNodePages,
"mockNodeUrl",
- true,
+ true
);
spyOn(I3SDataProvider, "loadJson").and.returnValue(
- Promise.resolve(nodeWithTexturedContent),
+ Promise.resolve(nodeWithTexturedContent)
);
spyOn(nodeWithTexturedMesh._dataProvider, "_loadBinary").and.returnValue(
- Promise.resolve(new ArrayBuffer()),
+ Promise.resolve(new ArrayBuffer())
);
return nodeWithTexturedMesh
@@ -1428,7 +1480,7 @@ describe("Scene/I3SNode", function () {
i3sGeometryData.meshData.meshes,
i3sGeometryData.meshData.buffers,
i3sGeometryData.meshData.bufferViews,
- i3sGeometryData.meshData.accessors,
+ i3sGeometryData.meshData.accessors
);
expect(rawGltf.textures).toBeDefined();
@@ -1442,19 +1494,19 @@ describe("Scene/I3SNode", function () {
expect(rawGltf.images).toBeDefined();
expect(rawGltf.images.length).toEqual(1);
expect(rawGltf.images[0].uri).toContain(
- "mockProviderUrl/mockLayerUrl/mockNodeUrl/mockTextureDataUrl",
+ "mockProviderUrl/mockLayerUrl/mockNodeUrl/mockTextureDataUrl"
);
});
});
it("load geometry rejects invalid url", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const nodeWithMesh = new I3SNode(mockI3SLayerWithNodePages, 1, true);
@@ -1474,36 +1526,36 @@ describe("Scene/I3SNode", function () {
it("loads feature data from uri", async function () {
const mockI3SLayerWithoutNodePages = await createMockLayer(
"mockProviderUrl",
- layerDataWithoutNodePages,
+ layerDataWithoutNodePages
);
const nodeWithMesh = new I3SNode(
mockI3SLayerWithoutNodePages,
"mockNodeUrl",
- true,
+ true
);
- const spy = spyOn(I3SDataProvider, "loadJson").and.callFake(
- function (resource) {
- if (
- resource
- .getUrlComponent()
- .endsWith(
- "mockProviderUrl/mockLayerUrl/mockNodeUrl/mockFeatureDataUrl",
- )
- ) {
- return Promise.resolve({ featureData: [], geometryData: [] });
- }
- if (
- resource
- .getUrlComponent()
- .endsWith("mockProviderUrl/mockLayerUrl/mockNodeUrl/")
- ) {
- return Promise.resolve(nodeWithContent);
- }
+ const spy = spyOn(I3SDataProvider, "loadJson").and.callFake(function (
+ resource
+ ) {
+ if (
+ resource
+ .getUrlComponent()
+ .endsWith(
+ "mockProviderUrl/mockLayerUrl/mockNodeUrl/mockFeatureDataUrl"
+ )
+ ) {
+ return Promise.resolve({ featureData: [], geometryData: [] });
+ }
+ if (
+ resource
+ .getUrlComponent()
+ .endsWith("mockProviderUrl/mockLayerUrl/mockNodeUrl/")
+ ) {
+ return Promise.resolve(nodeWithContent);
+ }
- return Promise.reject("invalid i3s node");
- },
- );
+ return Promise.reject("invalid i3s node");
+ });
return nodeWithMesh
.load()
@@ -1513,7 +1565,7 @@ describe("Scene/I3SNode", function () {
.then(function (result) {
expect(nodeWithMesh.featureData.length).toEqual(1);
expect(nodeWithMesh.featureData[0].resource.url).toContain(
- "mockProviderUrl/mockLayerUrl/mockNodeUrl/mockFeatureDataUrl",
+ "mockProviderUrl/mockLayerUrl/mockNodeUrl/mockFeatureDataUrl"
);
expect(nodeWithMesh.featureData[0].data.featureData).toEqual([]);
expect(nodeWithMesh.featureData[0].data.geometryData).toEqual([]);
@@ -1524,12 +1576,12 @@ describe("Scene/I3SNode", function () {
it("loads feature data from node pages", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const nodeWithMesh = new I3SNode(mockI3SLayerWithNodePages, 1, true);
@@ -1548,12 +1600,12 @@ describe("Scene/I3SNode", function () {
it("load feature data rejects invalid url", async function () {
const mockI3SLayerWithoutNodePages = await createMockLayer(
"mockProviderUrl",
- layerDataWithoutNodePages,
+ layerDataWithoutNodePages
);
const nodeWithMesh = new I3SNode(
mockI3SLayerWithoutNodePages,
"mockNodeUrl",
- true,
+ true
);
spyOn(I3SDataProvider, "loadJson").and.callFake(function (resource) {
@@ -1561,7 +1613,7 @@ describe("Scene/I3SNode", function () {
resource
.getUrlComponent()
.endsWith(
- "mockProviderUrl/mockLayerUrl/mockNodeUrl/mockFeatureDataUrl",
+ "mockProviderUrl/mockLayerUrl/mockNodeUrl/mockFeatureDataUrl"
)
) {
return Promise.reject({ statusCode: 404 });
@@ -1583,22 +1635,22 @@ describe("Scene/I3SNode", function () {
it("creates 3d tile content", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const rootNode = new I3SNode(mockI3SLayerWithNodePages, 0, true);
const nodeWithMesh = new I3SNode(rootNode, 1, false);
spyOn(nodeWithMesh._dataProvider, "_loadBinary").and.returnValue(
- Promise.resolve(new ArrayBuffer()),
+ Promise.resolve(new ArrayBuffer())
);
spyOn(nodeWithMesh, "_loadFeatureData").and.returnValue(Promise.all([]));
spyOn(I3SDecoder, "decode").and.returnValue(
- Promise.resolve(i3sGeometryData),
+ Promise.resolve(i3sGeometryData)
);
await rootNode.load();
@@ -1608,12 +1660,12 @@ describe("Scene/I3SNode", function () {
expect(nodeWithMesh.tile).toBeDefined();
expect(I3SDecoder.decode).toHaveBeenCalledWith(
jasmine.stringContaining(
- "mockProviderUrl/mockLayerUrl/nodes/1/geometries/1/?testQuery=test",
+ "mockProviderUrl/mockLayerUrl/nodes/1/geometries/1/?testQuery=test"
),
jasmine.any(Object),
jasmine.any(I3SGeometry),
undefined,
- undefined,
+ undefined
);
//Test fetching the blob url that was created
@@ -1642,17 +1694,17 @@ describe("Scene/I3SNode", function () {
it("picks closest point in geometry", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const nodeWithMesh = new I3SNode(mockI3SLayerWithNodePages, 1, true);
spyOn(nodeWithMesh._dataProvider, "_loadBinary").and.returnValue(
- Promise.resolve(new ArrayBuffer()),
+ Promise.resolve(new ArrayBuffer())
);
return nodeWithMesh
@@ -1669,46 +1721,46 @@ describe("Scene/I3SNode", function () {
geometryData.getClosestPointIndexOnTriangle(
intersectPoint.x,
intersectPoint.y,
- intersectPoint.z,
- ).index,
+ intersectPoint.z
+ ).index
).toEqual(0);
expect(
geometryData.getClosestPointIndexOnTriangle(
borderPoint.x,
borderPoint.y,
- borderPoint.z,
- ).index,
+ borderPoint.z
+ ).index
).toEqual(11);
expect(
geometryData.getClosestPointIndexOnTriangle(
floatingIntersectPoint.x,
floatingIntersectPoint.y,
- floatingIntersectPoint.z,
- ).index,
+ floatingIntersectPoint.z
+ ).index
).toEqual(8);
expect(
geometryData.getClosestPointIndexOnTriangle(
noIntersectPoint.x,
noIntersectPoint.y,
- noIntersectPoint.z,
- ).index,
+ noIntersectPoint.z
+ ).index
).toEqual(-1);
});
});
it("picks closest point in indexed geometry", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const nodeWithMesh = new I3SNode(mockI3SLayerWithNodePages, 1, true);
spyOn(nodeWithMesh._dataProvider, "_loadBinary").and.returnValue(
- Promise.resolve(new ArrayBuffer()),
+ Promise.resolve(new ArrayBuffer())
);
return nodeWithMesh
@@ -1725,41 +1777,41 @@ describe("Scene/I3SNode", function () {
geometryData.getClosestPointIndexOnTriangle(
intersectPoint.x,
intersectPoint.y,
- intersectPoint.z,
- ).index,
+ intersectPoint.z
+ ).index
).toEqual(0);
expect(
geometryData.getClosestPointIndexOnTriangle(
borderPoint.x,
borderPoint.y,
- borderPoint.z,
- ).index,
+ borderPoint.z
+ ).index
).toEqual(4);
expect(
geometryData.getClosestPointIndexOnTriangle(
floatingIntersectPoint.x,
floatingIntersectPoint.y,
- floatingIntersectPoint.z,
- ).index,
+ floatingIntersectPoint.z
+ ).index
).toEqual(5);
expect(
geometryData.getClosestPointIndexOnTriangle(
noIntersectPoint.x,
noIntersectPoint.y,
- noIntersectPoint.z,
- ).index,
+ noIntersectPoint.z
+ ).index
).toEqual(-1);
});
});
it("requests content", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const rootNode = new I3SNode(mockI3SLayerWithNodePages, 0, true);
const childNode = new I3SNode(rootNode, 1, false);
@@ -1784,12 +1836,12 @@ describe("Scene/I3SNode", function () {
it("requests content without url", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const rootNode = new I3SNode(mockI3SLayerWithNodePages, 0, true);
const childNode = new I3SNode(rootNode, 1, false);
@@ -1814,7 +1866,7 @@ describe("Scene/I3SNode", function () {
it("can filter by attributes", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
spyOn(I3SField.prototype, "load").and.callFake(function () {
@@ -1824,7 +1876,7 @@ describe("Scene/I3SNode", function () {
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const rootNode = new I3SNode(mockI3SLayerWithNodePages, 0, true);
const childNode = new I3SNode(rootNode, 1, false);
@@ -1867,7 +1919,7 @@ describe("Scene/I3SNode", function () {
function () {
childNode._tile._content = content;
return Promise.resolve(content);
- },
+ }
);
return childNode.tile.requestContent();
})
@@ -1886,7 +1938,7 @@ describe("Scene/I3SNode", function () {
it("can filter by not existing attributes", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
spyOn(I3SField.prototype, "load").and.callFake(function () {
@@ -1896,7 +1948,7 @@ describe("Scene/I3SNode", function () {
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const rootNode = new I3SNode(mockI3SLayerWithNodePages, 0, true);
const childNode = new I3SNode(rootNode, 1, false);
@@ -1942,7 +1994,7 @@ describe("Scene/I3SNode", function () {
it("filtering by attributes can handle filters without values", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
spyOn(I3SField.prototype, "load").and.callFake(function () {
@@ -1952,7 +2004,7 @@ describe("Scene/I3SNode", function () {
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const rootNode = new I3SNode(mockI3SLayerWithNodePages, 0, true);
const childNode = new I3SNode(rootNode, 1, false);
@@ -1998,12 +2050,12 @@ describe("Scene/I3SNode", function () {
it("filtering by attributes can handle content with zero features length", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const rootNode = new I3SNode(mockI3SLayerWithNodePages, 0, true);
const childNode = new I3SNode(rootNode, 1, false);
@@ -2048,14 +2100,14 @@ describe("Scene/I3SNode", function () {
it("filtering by attributes without filters", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
spyOn(I3SField.prototype, "load").and.returnValue(Promise.resolve());
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const rootNode = new I3SNode(mockI3SLayerWithNodePages, 0, true);
const childNode = new I3SNode(rootNode, 1, false);
@@ -2099,14 +2151,14 @@ describe("Scene/I3SNode", function () {
it("filtering by attributes can handle fields without values", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
spyOn(I3SField.prototype, "load").and.returnValue(Promise.resolve());
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const rootNode = new I3SNode(mockI3SLayerWithNodePages, 0, true);
const childNode = new I3SNode(rootNode, 1, false);
@@ -2162,14 +2214,14 @@ describe("Scene/I3SNode", function () {
const i3sFeature = new I3SFeature(i3sNode, "testNode");
expect(
i3sFeature._resource.url.endsWith(
- `nodes/${attributeResource.url}/testNode`,
- ),
+ `nodes/${attributeResource.url}/testNode`
+ )
).toEqual(true);
});
it("can clear node geometry data", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
spyOn(I3SField.prototype, "load").and.callFake(function () {
@@ -2179,7 +2231,7 @@ describe("Scene/I3SNode", function () {
const mockI3SLayerWithNodePages = await createMockLayer(
"mockProviderUrl?testQuery=test",
- layerData,
+ layerData
);
const rootNode = new I3SNode(mockI3SLayerWithNodePages, 0, true);
return rootNode.load().then(function () {
@@ -2191,7 +2243,7 @@ describe("Scene/I3SNode", function () {
it("creates 3d tile content with symbology", async function () {
spyOn(I3SLayer.prototype, "_loadNodePage").and.returnValue(
- Promise.resolve(nodeData),
+ Promise.resolve(nodeData)
);
const mockI3SLayerWithNodePages = await createMockLayer(
@@ -2200,17 +2252,17 @@ describe("Scene/I3SNode", function () {
undefined,
{
applySymbology: true,
- },
+ }
);
const rootNode = new I3SNode(mockI3SLayerWithNodePages, 0, true);
const nodeWithMesh = new I3SNode(rootNode, 1, false);
spyOn(nodeWithMesh._dataProvider, "_loadBinary").and.returnValue(
- Promise.resolve(new ArrayBuffer()),
+ Promise.resolve(new ArrayBuffer())
);
spyOn(nodeWithMesh, "_loadFeatureData").and.returnValue(Promise.all([]));
spyOn(I3SDecoder, "decode").and.returnValue(
- Promise.resolve(i3sGeometryData),
+ Promise.resolve(i3sGeometryData)
);
await rootNode.load();
@@ -2221,12 +2273,12 @@ describe("Scene/I3SNode", function () {
expect(I3SDecoder.decode).toHaveBeenCalledTimes(2);
expect(I3SDecoder.decode).toHaveBeenCalledWith(
jasmine.stringContaining(
- "mockProviderUrl/mockLayerUrl/nodes/1/geometries/1/?testQuery=test",
+ "mockProviderUrl/mockLayerUrl/nodes/1/geometries/1/?testQuery=test"
),
jasmine.any(Object),
jasmine.any(I3SGeometry),
undefined,
- jasmine.any(Object),
+ jasmine.any(Object)
);
});
@@ -2237,23 +2289,23 @@ describe("Scene/I3SNode", function () {
undefined,
{
applySymbology: true,
- },
+ }
);
const nodeWithMesh = new I3SNode(
mockI3SLayerWithoutNodePages,
"mockNodeUrl",
- true,
+ true
);
spyOn(I3SDataProvider, "loadJson").and.returnValue(
- Promise.resolve(nodeWithContent),
+ Promise.resolve(nodeWithContent)
);
spyOn(nodeWithMesh._dataProvider, "_loadBinary").and.returnValue(
- Promise.resolve(new ArrayBuffer()),
+ Promise.resolve(new ArrayBuffer())
);
spyOn(nodeWithMesh, "_loadFeatureData").and.returnValue(Promise.all([]));
spyOn(I3SDecoder, "decode").and.returnValue(
- Promise.resolve(i3sGeometryData),
+ Promise.resolve(i3sGeometryData)
);
await nodeWithMesh.load();
@@ -2261,12 +2313,12 @@ describe("Scene/I3SNode", function () {
expect(I3SDecoder.decode).toHaveBeenCalledWith(
jasmine.stringContaining(
- "mockProviderUrl/mockLayerUrl/mockNodeUrl/mockGeometryDataUrl?testQuery=test",
+ "mockProviderUrl/mockLayerUrl/mockNodeUrl/mockGeometryDataUrl?testQuery=test"
),
jasmine.any(Object),
jasmine.any(I3SGeometry),
undefined,
- jasmine.any(Object),
+ jasmine.any(Object)
);
});
});
diff --git a/packages/engine/Specs/Scene/I3dmParserSpec.js b/packages/engine/Specs/Scene/I3dmParserSpec.js
index 4e4d9f905760..e749db4fbca0 100644
--- a/packages/engine/Specs/Scene/I3dmParserSpec.js
+++ b/packages/engine/Specs/Scene/I3dmParserSpec.js
@@ -112,5 +112,5 @@ describe(
expect(getStringFromTypedArray(results.gltf)).toEqual(gltfUri);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/ImageBasedLightingSpec.js b/packages/engine/Specs/Scene/ImageBasedLightingSpec.js
index a129dd4ce0da..159d92a2a7a0 100644
--- a/packages/engine/Specs/Scene/ImageBasedLightingSpec.js
+++ b/packages/engine/Specs/Scene/ImageBasedLightingSpec.js
@@ -19,8 +19,8 @@ describe("Scene/ImageBasedLighting", function () {
expect(
Cartesian2.equals(
imageBasedLighting.imageBasedLightingFactor,
- new Cartesian2(1.0, 1.0),
- ),
+ new Cartesian2(1.0, 1.0)
+ )
).toBe(true);
expect(imageBasedLighting.luminanceAtZenith).toEqual(0.2);
expect(imageBasedLighting.sphericalHarmonicCoefficients).toBeUndefined();
@@ -73,14 +73,14 @@ describe("Scene/ImageBasedLighting", function () {
expect(
Cartesian2.equals(
imageBasedLighting.imageBasedLightingFactor,
- new Cartesian2(1.0, 1.0),
- ),
+ new Cartesian2(1.0, 1.0)
+ )
).toBe(true);
expect(
Cartesian2.equals(
imageBasedLighting._previousImageBasedLightingFactor,
- Cartesian2.ZERO,
- ),
+ Cartesian2.ZERO
+ )
).toBe(true);
});
@@ -101,7 +101,7 @@ describe("Scene/ImageBasedLighting", function () {
imageBasedLighting.sphericalHarmonicCoefficients = undefined;
expect(imageBasedLighting.sphericalHarmonicCoefficients).toBeUndefined();
expect(imageBasedLighting._previousSphericalHarmonicCoefficients).toBe(
- testCoefficients,
+ testCoefficients
);
});
diff --git a/packages/engine/Specs/Scene/ImageryLayerCollectionSpec.js b/packages/engine/Specs/Scene/ImageryLayerCollectionSpec.js
index 88a81e2fa6ac..426ecf48a0ba 100644
--- a/packages/engine/Specs/Scene/ImageryLayerCollectionSpec.js
+++ b/packages/engine/Specs/Scene/ImageryLayerCollectionSpec.js
@@ -308,12 +308,12 @@ describe(
const ellipsoid = Ellipsoid.WGS84;
camera.lookAt(
new Cartesian3(ellipsoid.maximumRadius, 0.0, 0.0),
- new Cartesian3(0.0, 0.0, 100.0),
+ new Cartesian3(0.0, 0.0, 100.0)
);
const ray = new Ray(
camera.position,
- Cartesian3.negate(camera.direction, new Cartesian3()),
+ Cartesian3.negate(camera.direction, new Cartesian3())
);
const imagery = scene.imageryLayers.pickImageryLayers(ray, scene);
expect(imagery).toBeUndefined();
@@ -323,7 +323,7 @@ describe(
const ellipsoid = Ellipsoid.WGS84;
camera.lookAt(
new Cartesian3(ellipsoid.maximumRadius, 0.0, 0.0),
- new Cartesian3(0.0, 0.0, 100.0),
+ new Cartesian3(0.0, 0.0, 100.0)
);
const ray = new Ray(camera.position, camera.direction);
@@ -335,7 +335,7 @@ describe(
const ellipsoid = Ellipsoid.WGS84;
camera.lookAt(
new Cartesian3(ellipsoid.maximumRadius, 0.0, 0.0),
- new Cartesian3(0.0, 0.0, 100.0),
+ new Cartesian3(0.0, 0.0, 100.0)
);
camera.lookAtTransform(Matrix4.IDENTITY);
return updateUntilDone(globe, scene).then(function () {
@@ -366,7 +366,7 @@ describe(
const ellipsoid = Ellipsoid.WGS84;
camera.lookAt(
new Cartesian3(ellipsoid.maximumRadius, 0.0, 0.0),
- new Cartesian3(0.0, 0.0, 100.0),
+ new Cartesian3(0.0, 0.0, 100.0)
);
camera.lookAtTransform(Matrix4.IDENTITY);
return updateUntilDone(globe, scene).then(function () {
@@ -414,7 +414,7 @@ describe(
const ellipsoid = Ellipsoid.WGS84;
camera.lookAt(
new Cartesian3(ellipsoid.maximumRadius, 0.0, 0.0),
- new Cartesian3(0.0, 0.0, 100.0),
+ new Cartesian3(0.0, 0.0, 100.0)
);
camera.lookAtTransform(Matrix4.IDENTITY);
return updateUntilDone(globe, scene).then(function () {
@@ -454,16 +454,16 @@ describe(
const ellipsoid = Ellipsoid.WGS84;
camera.lookAt(
new Cartesian3(ellipsoid.maximumRadius, 0.0, 0.0),
- new Cartesian3(0.0, 0.0, 100.0),
+ new Cartesian3(0.0, 0.0, 100.0)
);
const ray = new Ray(
camera.position,
- Cartesian3.negate(camera.direction, new Cartesian3()),
+ Cartesian3.negate(camera.direction, new Cartesian3())
);
const featuresPromise = scene.imageryLayers.pickImageryLayerFeatures(
ray,
- scene,
+ scene
);
expect(featuresPromise).toBeUndefined();
});
@@ -472,13 +472,13 @@ describe(
const ellipsoid = Ellipsoid.WGS84;
camera.lookAt(
new Cartesian3(ellipsoid.maximumRadius, 0.0, 0.0),
- new Cartesian3(0.0, 0.0, 100.0),
+ new Cartesian3(0.0, 0.0, 100.0)
);
const ray = new Ray(camera.position, camera.direction);
const featuresPromise = scene.imageryLayers.pickImageryLayerFeatures(
ray,
- scene,
+ scene
);
expect(featuresPromise).toBeUndefined();
});
@@ -505,13 +505,13 @@ describe(
const ellipsoid = Ellipsoid.WGS84;
camera.lookAt(
new Cartesian3(ellipsoid.maximumRadius, 0.0, 0.0),
- new Cartesian3(0.0, 0.0, 100.0),
+ new Cartesian3(0.0, 0.0, 100.0)
);
const ray = new Ray(camera.position, camera.direction);
const featuresPromise = scene.imageryLayers.pickImageryLayerFeatures(
ray,
- scene,
+ scene
);
expect(featuresPromise).toBeUndefined();
});
@@ -543,13 +543,13 @@ describe(
const ellipsoid = Ellipsoid.WGS84;
camera.lookAt(
new Cartesian3(ellipsoid.maximumRadius, 0.0, 0.0),
- new Cartesian3(0.0, 0.0, 100.0),
+ new Cartesian3(0.0, 0.0, 100.0)
);
const ray = new Ray(camera.position, camera.direction);
const featuresPromise = scene.imageryLayers.pickImageryLayerFeatures(
ray,
- scene,
+ scene
);
expect(featuresPromise).toBeUndefined();
});
@@ -588,14 +588,14 @@ describe(
const ellipsoid = Ellipsoid.WGS84;
camera.lookAt(
new Cartesian3(ellipsoid.maximumRadius, 0.0, 0.0),
- new Cartesian3(0.0, 0.0, 100.0),
+ new Cartesian3(0.0, 0.0, 100.0)
);
camera.lookAtTransform(Matrix4.IDENTITY);
const ray = new Ray(camera.position, camera.direction);
const featuresPromise = scene.imageryLayers.pickImageryLayerFeatures(
ray,
- scene,
+ scene
);
expect(featuresPromise).toBeDefined();
@@ -670,14 +670,14 @@ describe(
const ellipsoid = Ellipsoid.WGS84;
camera.lookAt(
new Cartesian3(ellipsoid.maximumRadius, 0.0, 0.0),
- new Cartesian3(0.0, 0.0, 100.0),
+ new Cartesian3(0.0, 0.0, 100.0)
);
camera.lookAtTransform(Matrix4.IDENTITY);
const ray = new Ray(camera.position, camera.direction);
const featuresPromise = scene.imageryLayers.pickImageryLayerFeatures(
ray,
- scene,
+ scene
);
expect(featuresPromise).toBeDefined();
@@ -700,7 +700,7 @@ describe(
-Math.PI,
-WebMercatorProjection.MaximumLatitude,
Math.PI,
- WebMercatorProjection.MaximumLatitude,
+ WebMercatorProjection.MaximumLatitude
),
tileWidth: 256,
tileHeight: 256,
@@ -739,7 +739,7 @@ describe(
const ray = new Ray(camera.position, camera.direction);
const featuresPromise = scene.imageryLayers.pickImageryLayerFeatures(
ray,
- scene,
+ scene
);
expect(featuresPromise).toBeDefined();
@@ -753,5 +753,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/ImageryLayerSpec.js b/packages/engine/Specs/Scene/ImageryLayerSpec.js
index 5ec56fae243d..1ee0381faf21 100644
--- a/packages/engine/Specs/Scene/ImageryLayerSpec.js
+++ b/packages/engine/Specs/Scene/ImageryLayerSpec.js
@@ -78,13 +78,13 @@ describe(
it("fromProviderAsync throws without provider promise", function () {
expect(() => ImageryLayer.fromProviderAsync()).toThrowDeveloperError(
- "expected",
+ "expected"
);
});
it("readyEvent is raised when asynchronous provider become ready", async function () {
const providerPromise = SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
const layer = ImageryLayer.fromProviderAsync(providerPromise);
expect(layer.ready).toBe(false);
@@ -118,12 +118,12 @@ describe(
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
};
@@ -134,7 +134,7 @@ describe(
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/Images/Red16x16.png",
@@ -142,7 +142,7 @@ describe(
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -174,7 +174,7 @@ describe(
async function createWebMercatorProvider() {
Resource._Implementations.loadAndExecuteScript = function (
url,
- functionName,
+ functionName
) {
window[functionName]({
authenticationResultCode: "ValidCredentials",
@@ -213,12 +213,12 @@ describe(
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
};
@@ -229,7 +229,7 @@ describe(
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
"Data/Images/Red16x16.png",
@@ -237,7 +237,7 @@ describe(
method,
data,
headers,
- deferred,
+ deferred
);
};
@@ -275,10 +275,10 @@ describe(
expect(imagery.texture).toBeDefined();
expect(imagery.texture.sampler).toBeDefined();
expect(imagery.texture.sampler.minificationFilter).toEqual(
- TextureMinificationFilter.LINEAR_MIPMAP_LINEAR,
+ TextureMinificationFilter.LINEAR_MIPMAP_LINEAR
);
expect(imagery.texture.sampler.magnificationFilter).toEqual(
- TextureMinificationFilter.LINEAR,
+ TextureMinificationFilter.LINEAR
);
expect(textureBeforeReprojection).not.toEqual(imagery.texture);
imagery.releaseReference();
@@ -356,10 +356,10 @@ describe(
expect(imagery.texture).toBeDefined();
expect(imagery.texture.sampler).toBeDefined();
expect(imagery.texture.sampler.minificationFilter).toEqual(
- TextureMinificationFilter.LINEAR_MIPMAP_LINEAR,
+ TextureMinificationFilter.LINEAR_MIPMAP_LINEAR
);
expect(imagery.texture.sampler.magnificationFilter).toEqual(
- TextureMinificationFilter.LINEAR,
+ TextureMinificationFilter.LINEAR
);
expect(textureBeforeReprojection).not.toEqual(imagery.texture);
imagery.releaseReference();
@@ -373,12 +373,12 @@ describe(
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red256x256.png" }),
crossOrigin,
- deferred,
+ deferred
);
};
@@ -390,7 +390,7 @@ describe(
13.39657249732205,
52.49127999816725,
13.42722986993895,
- 52.50998943590507,
+ 52.50998943590507
),
});
const layer = new ImageryLayer(provider);
@@ -418,10 +418,10 @@ describe(
expect(imagery.texture).toBeDefined();
expect(imagery.texture.sampler).toBeDefined();
expect(imagery.texture.sampler.minificationFilter).toEqual(
- TextureMinificationFilter.LINEAR_MIPMAP_LINEAR,
+ TextureMinificationFilter.LINEAR_MIPMAP_LINEAR
);
expect(imagery.texture.sampler.magnificationFilter).toEqual(
- TextureMinificationFilter.LINEAR,
+ TextureMinificationFilter.LINEAR
);
expect(imagery.texture).toBe(imagery.textureWebMercator);
imagery.releaseReference();
@@ -457,7 +457,7 @@ describe(
it("basic properties work as expected", async function () {
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
const rectangle = new Rectangle(0.1, 0.2, 0.3, 0.4);
@@ -472,16 +472,16 @@ describe(
it("allows setting texture filter properties", async function () {
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
// expect default LINEAR
let layer = new ImageryLayer(provider);
expect(layer.minificationFilter).toEqual(
- TextureMinificationFilter.LINEAR,
+ TextureMinificationFilter.LINEAR
);
expect(layer.magnificationFilter).toEqual(
- TextureMagnificationFilter.LINEAR,
+ TextureMagnificationFilter.LINEAR
);
layer.destroy();
@@ -491,10 +491,10 @@ describe(
magnificationFilter: TextureMagnificationFilter.NEAREST,
});
expect(layer.minificationFilter).toEqual(
- TextureMinificationFilter.NEAREST,
+ TextureMinificationFilter.NEAREST
);
expect(layer.magnificationFilter).toEqual(
- TextureMagnificationFilter.NEAREST,
+ TextureMagnificationFilter.NEAREST
);
const imagery = new Imagery(layer, 0, 0, 0);
@@ -508,10 +508,10 @@ describe(
layer._createTexture(scene.context, imagery);
const sampler = imagery.texture.sampler;
expect(sampler.minificationFilter).toEqual(
- TextureMinificationFilter.NEAREST,
+ TextureMinificationFilter.NEAREST
);
expect(sampler.magnificationFilter).toEqual(
- TextureMinificationFilter.NEAREST,
+ TextureMinificationFilter.NEAREST
);
imagery.releaseReference();
layer.destroy();
@@ -529,7 +529,7 @@ describe(
{
usePreCachedTilesIfAvailable: false,
tileDiscardPolicy: new NeverTileDiscardPolicy(),
- },
+ }
);
let errorRaised = false;
@@ -555,7 +555,7 @@ describe(
"Data/Images/Green4x4.png",
{
rectangle: providerRectangle,
- },
+ }
);
const layerRectangle = Rectangle.fromDegrees(7.2, 60.9, 9.0, 61.7);
@@ -564,21 +564,22 @@ describe(
});
expect(layer.getImageryRectangle()).toEqual(
- Rectangle.intersection(providerRectangle, layerRectangle),
+ Rectangle.intersection(providerRectangle, layerRectangle)
);
});
describe("createTileImagerySkeletons", function () {
it("handles a base layer that does not cover the entire globe", async function () {
- const provider =
- await TileMapServiceImageryProvider.fromUrl("Data/TMS/SmallArea");
+ const provider = await TileMapServiceImageryProvider.fromUrl(
+ "Data/TMS/SmallArea"
+ );
const layers = new ImageryLayerCollection();
const layer = layers.addImageryProvider(provider);
const terrainProvider = new EllipsoidTerrainProvider();
const tiles = QuadtreeTile.createLevelZeroTiles(
- terrainProvider.tilingScheme,
+ terrainProvider.tilingScheme
);
tiles[0].data = new GlobeSurfaceTile();
tiles[1].data = new GlobeSurfaceTile();
@@ -613,17 +614,18 @@ describe(
// triggers an exception (use of an undefined reference).
const wholeWorldProvider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Blue.png",
+ "Data/Images/Blue.png"
+ );
+ const provider = await TileMapServiceImageryProvider.fromUrl(
+ "Data/TMS/SmallArea"
);
- const provider =
- await TileMapServiceImageryProvider.fromUrl("Data/TMS/SmallArea");
const layers = new ImageryLayerCollection();
const wholeWorldLayer = layers.addImageryProvider(wholeWorldProvider);
const terrainProvider = new EllipsoidTerrainProvider();
let tiles = QuadtreeTile.createLevelZeroTiles(
- terrainProvider.tilingScheme,
+ terrainProvider.tilingScheme
);
tiles[0].data = new GlobeSurfaceTile();
tiles[1].data = new GlobeSurfaceTile();
@@ -655,10 +657,11 @@ describe(
it("handles a non-base layer that does not cover the entire globe", async function () {
const baseProvider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Green4x4.png",
+ "Data/Images/Green4x4.png"
+ );
+ const provider = await TileMapServiceImageryProvider.fromUrl(
+ "Data/TMS/SmallArea"
);
- const provider =
- await TileMapServiceImageryProvider.fromUrl("Data/TMS/SmallArea");
const layers = new ImageryLayerCollection();
layers.addImageryProvider(baseProvider);
@@ -666,7 +669,7 @@ describe(
const terrainProvider = new EllipsoidTerrainProvider();
const tiles = QuadtreeTile.createLevelZeroTiles(
- terrainProvider.tilingScheme,
+ terrainProvider.tilingScheme
);
tiles[0].data = new GlobeSurfaceTile();
tiles[1].data = new GlobeSurfaceTile();
@@ -678,52 +681,52 @@ describe(
// And the imagery should not cover it completely.
expect(tiles[0].data.imagery.length).toBe(4);
expect(tiles[0].data.imagery[0].textureCoordinateRectangle.x).not.toBe(
- 0.0,
+ 0.0
);
expect(tiles[0].data.imagery[0].textureCoordinateRectangle.y).not.toBe(
- 0.0,
+ 0.0
);
expect(tiles[0].data.imagery[0].textureCoordinateRectangle.z).not.toBe(
- 1.0,
+ 1.0
);
expect(tiles[0].data.imagery[0].textureCoordinateRectangle.w).not.toBe(
- 1.0,
+ 1.0
);
expect(tiles[0].data.imagery[1].textureCoordinateRectangle.x).not.toBe(
- 0.0,
+ 0.0
);
expect(tiles[0].data.imagery[1].textureCoordinateRectangle.y).not.toBe(
- 0.0,
+ 0.0
);
expect(tiles[0].data.imagery[1].textureCoordinateRectangle.z).not.toBe(
- 1.0,
+ 1.0
);
expect(tiles[0].data.imagery[1].textureCoordinateRectangle.w).not.toBe(
- 1.0,
+ 1.0
);
expect(tiles[0].data.imagery[2].textureCoordinateRectangle.x).not.toBe(
- 0.0,
+ 0.0
);
expect(tiles[0].data.imagery[2].textureCoordinateRectangle.y).not.toBe(
- 0.0,
+ 0.0
);
expect(tiles[0].data.imagery[2].textureCoordinateRectangle.z).not.toBe(
- 1.0,
+ 1.0
);
expect(tiles[0].data.imagery[2].textureCoordinateRectangle.w).not.toBe(
- 1.0,
+ 1.0
);
expect(tiles[0].data.imagery[3].textureCoordinateRectangle.x).not.toBe(
- 0.0,
+ 0.0
);
expect(tiles[0].data.imagery[3].textureCoordinateRectangle.y).not.toBe(
- 0.0,
+ 0.0
);
expect(tiles[0].data.imagery[3].textureCoordinateRectangle.z).not.toBe(
- 1.0,
+ 1.0
);
expect(tiles[0].data.imagery[3].textureCoordinateRectangle.w).not.toBe(
- 1.0,
+ 1.0
);
expect(tiles[1].data.imagery.length).toBe(0);
@@ -731,7 +734,7 @@ describe(
it("honors the minimumTerrainLevel and maximumTerrainLevel properties", async function () {
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Green4x4.png",
+ "Data/Images/Green4x4.png"
);
const layer = new ImageryLayer(provider, {
@@ -745,7 +748,7 @@ describe(
const terrainProvider = new EllipsoidTerrainProvider();
const level0 = QuadtreeTile.createLevelZeroTiles(
- terrainProvider.tilingScheme,
+ terrainProvider.tilingScheme
);
const level1 = level0[0].children;
const level2 = level1[0].children;
@@ -781,7 +784,7 @@ describe(
it("honors limited extent of non-base ImageryLayer", async function () {
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Green4x4.png",
+ "Data/Images/Green4x4.png"
);
const layer = new ImageryLayer(provider, {
@@ -790,7 +793,7 @@ describe(
const layers = new ImageryLayerCollection();
const provider2 = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
layers.addImageryProvider(provider2);
layers.add(layer);
@@ -798,7 +801,7 @@ describe(
const terrainProvider = new EllipsoidTerrainProvider();
const tiles = QuadtreeTile.createLevelZeroTiles(
- terrainProvider.tilingScheme,
+ terrainProvider.tilingScheme
);
tiles[0].data = new GlobeSurfaceTile();
tiles[1].data = new GlobeSurfaceTile();
@@ -821,5 +824,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Implicit3DTileContentSpec.js b/packages/engine/Specs/Scene/Implicit3DTileContentSpec.js
index 1f743ef08afc..b48e080ced12 100644
--- a/packages/engine/Specs/Scene/Implicit3DTileContentSpec.js
+++ b/packages/engine/Specs/Scene/Implicit3DTileContentSpec.js
@@ -131,7 +131,7 @@ describe(
implicitTileset = new ImplicitTileset(
tilesetResource,
tileJson,
- metadataSchema,
+ metadataSchema
);
rootCoordinates = new ImplicitTileCoordinates({
@@ -184,7 +184,7 @@ describe(
mockTileset,
mockPlaceholderTile,
tilesetResource,
- quadtreeJson,
+ quadtreeJson
);
const expectedChildrenCounts = [4, 0, 0, 0, 0];
const tiles = [];
@@ -204,7 +204,7 @@ describe(
tilesetResource,
undefined,
quadtreeBuffer,
- 0,
+ 0
);
const expectedChildrenCounts = [2, 4, 0, 0, 0, 0, 4, 0, 0, 0, 0];
const tiles = [];
@@ -224,7 +224,7 @@ describe(
tilesetResource,
undefined,
quadtreeBuffer,
- 0,
+ 0
);
const expectedCoordinates = [
[0, 0, 0],
@@ -269,7 +269,7 @@ describe(
tilesetResource,
undefined,
quadtreeBuffer,
- 0,
+ 0
);
const refine =
implicitTileset.refine === "ADD"
@@ -287,13 +287,13 @@ describe(
rootBoundingVolume,
parentCoordinates.level,
parentCoordinates.x,
- parentCoordinates.y,
+ parentCoordinates.y
);
const childBox = Implicit3DTileContent._deriveBoundingBox(
rootBoundingVolume,
childCoordinates.level,
childCoordinates.x,
- childCoordinates.y,
+ childCoordinates.y
);
const subtreeRootTile = mockPlaceholderTile.children[0];
@@ -322,7 +322,7 @@ describe(
tilesetResource,
undefined,
quadtreeBuffer,
- 0,
+ 0
);
expect(mockPlaceholderTile.children.length).toEqual(1);
});
@@ -334,7 +334,7 @@ describe(
tilesetResource,
undefined,
quadtreeBuffer,
- 0,
+ 0
);
const tiles = [];
const subtreeRootTile = mockPlaceholderTile.children[0];
@@ -351,7 +351,7 @@ describe(
tilesetResource,
undefined,
quadtreeBuffer,
- 0,
+ 0
);
expect(mockPlaceholderTile.children[0].extras).toEqual(tileJson.extras);
});
@@ -363,7 +363,7 @@ describe(
tilesetResource,
undefined,
quadtreeBuffer,
- 0,
+ 0
);
expect(mockPlaceholderTile.implicitSubtree).not.toBeDefined();
@@ -385,7 +385,7 @@ describe(
tilesetResource,
undefined,
quadtreeBuffer,
- 0,
+ 0
);
expect(mockPlaceholderTile.implicitSubtree).not.toBeDefined();
@@ -405,7 +405,7 @@ describe(
tilesetResource,
undefined,
quadtreeBuffer,
- 0,
+ 0
);
const subtree = content._implicitSubtree;
expect(content.isDestroyed()).toBe(false);
@@ -423,7 +423,7 @@ describe(
tilesetResource,
undefined,
quadtreeBuffer,
- 0,
+ 0
);
expect(content.featurePropertiesDirty).toBe(false);
@@ -446,7 +446,7 @@ describe(
tilesetResource,
undefined,
quadtreeBuffer,
- 0,
+ 0
);
expect(content.url).toBe("https://example.com/0/0/0.subtree");
});
@@ -458,7 +458,7 @@ describe(
tilesetResource,
undefined,
quadtreeBuffer,
- 0,
+ 0
);
const expectedCoordinates = [
[0, 0, 0],
@@ -498,7 +498,7 @@ describe(
tilesetResource,
undefined,
quadtreeBuffer,
- 0,
+ 0
);
const expectedCoordinates = [
[2, 0, 0],
@@ -530,7 +530,7 @@ describe(
});
const placeholderTile = tiles[i];
expect(placeholderTile._contentResource.url).toEqual(
- expectedResource.url,
+ expectedResource.url
);
expect(placeholderTile.implicitTileset).toBeDefined();
expect(placeholderTile.implicitCoordinates).toBeDefined();
@@ -548,7 +548,7 @@ describe(
tilesetResource,
undefined,
quadtreeBuffer,
- 0,
+ 0
);
const refine =
implicitTileset.refine === "ADD"
@@ -569,7 +569,7 @@ describe(
tilesetResource,
undefined,
quadtreeBuffer,
- 0,
+ 0
);
const rootGeometricError = implicitTileset.geometricError;
const subtreeRootTile = mockPlaceholderTile.children[0];
@@ -578,7 +578,7 @@ describe(
for (let i = 0; i < tiles.length; i++) {
const level = tiles[i].implicitCoordinates.level;
expect(tiles[i].geometricError).toEqual(
- rootGeometricError / Math.pow(2, level),
+ rootGeometricError / Math.pow(2, level)
);
}
});
@@ -590,7 +590,7 @@ describe(
tilesetResource,
undefined,
quadtreeBuffer,
- 0,
+ 0
);
const expectedCoordinates = [
[0, 0, 0],
@@ -624,7 +624,7 @@ describe(
rootBoundingVolume,
coordinates[0],
coordinates[1],
- coordinates[2],
+ coordinates[2]
);
expect(childBox).toEqual(expectedBounds);
}
@@ -637,11 +637,11 @@ describe(
tilesetResource,
undefined,
quadtreeBuffer,
- 0,
+ 0
);
const subtreeRootTile = mockPlaceholderTile.children[0];
expect(subtreeRootTile.computedTransform).toEqual(
- mockPlaceholderTile.transform,
+ mockPlaceholderTile.transform
);
});
@@ -654,7 +654,7 @@ describe(
maximumHeight: 10,
};
const simpleBoundingVolumeS2Cell = new TileBoundingS2Cell(
- simpleBoundingVolumeS2,
+ simpleBoundingVolumeS2
);
const implicitTilesetS2 = {
boundingVolume: {
@@ -718,7 +718,7 @@ describe(
0,
0,
0,
- 0,
+ 0
);
expect(result).toEqual(implicitTilesetS2.boundingVolume);
expect(result).not.toBe(implicitTilesetS2.boundingVolume);
@@ -780,7 +780,7 @@ describe(
1,
0,
0,
- 0,
+ 0
);
expect(result0).toEqual({
extensions: {
@@ -794,7 +794,7 @@ describe(
1,
0,
0,
- 0,
+ 0
);
expect(result1).toEqual({
extensions: {
@@ -893,7 +893,7 @@ describe(
eastDegrees,
northDegrees,
minimumHeight,
- maximumHeight,
+ maximumHeight
) {
return [
CesiumMath.toRadians(westDegrees),
@@ -941,7 +941,7 @@ describe(
it("a single content is transcoded as a regular tile", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- implicitMultipleContentsUrl,
+ implicitMultipleContentsUrl
).then(function (tileset) {
// The root tile of this tileset only has one available content
const transcodedRoot = tileset.root.children[0];
@@ -957,7 +957,7 @@ describe(
it("multiple contents are transcoded to a tile", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- implicitMultipleContentsUrl,
+ implicitMultipleContentsUrl
).then(function (tileset) {
const childTiles = tileset.root.children[0].children;
for (let i = 0; i < childTiles.length; i++) {
@@ -983,7 +983,7 @@ describe(
it("a single content is transcoded as a regular tile (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- implicitMultipleContentsLegacyUrl,
+ implicitMultipleContentsLegacyUrl
).then(function (tileset) {
// The root tile of this tileset only has one available content
const transcodedRoot = tileset.root.children[0];
@@ -999,7 +999,7 @@ describe(
it("a single content is transcoded as a regular tile (legacy with 'content')", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- implicitMultipleContentsLegacyWithContentUrl,
+ implicitMultipleContentsLegacyWithContentUrl
).then(function (tileset) {
// The root tile of this tileset only has one available content
const transcodedRoot = tileset.root.children[0];
@@ -1015,7 +1015,7 @@ describe(
it("multiple contents are transcoded to a tile (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- implicitMultipleContentsLegacyUrl,
+ implicitMultipleContentsLegacyUrl
).then(function (tileset) {
const childTiles = tileset.root.children[0].children;
for (let i = 0; i < childTiles.length; i++) {
@@ -1032,7 +1032,7 @@ describe(
it("multiple contents are transcoded to a tile (legacy with 'content')", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- implicitMultipleContentsLegacyWithContentUrl,
+ implicitMultipleContentsLegacyWithContentUrl
).then(function (tileset) {
const childTiles = tileset.root.children[0].children;
for (let i = 0; i < childTiles.length; i++) {
@@ -1077,7 +1077,7 @@ describe(
return Cesium3DTilesTester.loadTileset(
scene,
- implicitMultipleContentsLegacyUrl,
+ implicitMultipleContentsLegacyUrl
).then(function (tileset) {
// the placeholder tile does not have any extensions.
const placeholderTile = tileset.root;
@@ -1100,7 +1100,7 @@ describe(
const childTileHeader = childTile._header;
expect(childTileHeader.extensions["3DTILES_extension"]).toEqual(
- otherExtension,
+ otherExtension
);
const innerContentHeaders = childTileHeader.contents;
@@ -1181,14 +1181,14 @@ describe(
metadata: groupMetadata,
});
expect(content.group.metadata).toBe(groupMetadata);
- },
+ }
);
});
it("group metadata gets transcoded correctly", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- implicitGroupMetadataUrl,
+ implicitGroupMetadataUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
const subtreeRootTile = placeholderTile.children[0];
@@ -1198,13 +1198,13 @@ describe(
const groups = tileset.metadataExtension.groups;
const ground = groups[0];
expect(ground.getProperty("color")).toEqual(
- new Cartesian3(120, 68, 32),
+ new Cartesian3(120, 68, 32)
);
expect(ground.getProperty("priority")).toBe(0);
const sky = groups[1];
expect(sky.getProperty("color")).toEqual(
- new Cartesian3(206, 237, 242),
+ new Cartesian3(206, 237, 242)
);
expect(sky.getProperty("priority")).toBe(1);
@@ -1225,7 +1225,7 @@ describe(
it("assigning content metadata throws", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- implicitContentMetadataUrl,
+ implicitContentMetadataUrl
).then(function (tileset) {
expect(function () {
const placeholderTile = tileset.root;
@@ -1238,7 +1238,7 @@ describe(
it("content metadata gets transcoded correctly", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- implicitContentMetadataUrl,
+ implicitContentMetadataUrl
).then(function (tileset) {
const expectedHeights = [10, 20, 0, 30, 40];
const expectedColors = [
@@ -1266,10 +1266,10 @@ describe(
expect(metadata.getProperty("color")).not.toBeDefined();
} else {
expect(metadata.getProperty("height")).toBe(
- expectedHeights[index],
+ expectedHeights[index]
);
expect(metadata.getProperty("color")).toEqual(
- expectedColors[index],
+ expectedColors[index]
);
}
}
@@ -1279,7 +1279,7 @@ describe(
it("multiple content metadata views get transcoded correctly", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- implicitMultipleContentsMetadataUrl,
+ implicitMultipleContentsMetadataUrl
).then(function (tileset) {
const expectedHeights = [10, 20, 30, 40, 50];
const expectedColors = [
@@ -1313,10 +1313,10 @@ describe(
}
expect(buildingMetadata.getProperty("height")).toBe(
- expectedHeights[index],
+ expectedHeights[index]
);
expect(buildingMetadata.getProperty("color")).toEqual(
- expectedColors[index],
+ expectedColors[index]
);
if (i === 0) {
@@ -1326,7 +1326,7 @@ describe(
const treeContent = tile.content.innerContents[1];
const treeMetadata = treeContent.metadata;
expect(treeMetadata.getProperty("age")).toEqual(
- expectedAges[index - 1],
+ expectedAges[index - 1]
);
}
});
@@ -1343,7 +1343,7 @@ describe(
viewCartographicOrigin(10000);
return Cesium3DTilesTester.loadTileset(
scene,
- implicitHeightSemanticsUrl,
+ implicitHeightSemanticsUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
const subtreeRootTile = placeholderTile.children[0];
@@ -1369,7 +1369,7 @@ describe(
viewCartographicOrigin(10000);
return Cesium3DTilesTester.loadTileset(
scene,
- implicitS2HeightSemanticsUrl,
+ implicitS2HeightSemanticsUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
const subtreeRootTile = placeholderTile.children[0];
@@ -1428,7 +1428,7 @@ describe(
viewCartographicOrigin(cameraHeight);
return Cesium3DTilesTester.loadTileset(
scene,
- implicitHeightSemanticsUrl,
+ implicitHeightSemanticsUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
const subtreeRootTile = placeholderTile.children[0];
@@ -1452,14 +1452,14 @@ describe(
viewCartographicOrigin(124000);
return Cesium3DTilesTester.loadTileset(
scene,
- implicitTileBoundingVolumeSemanticsUrl,
+ implicitTileBoundingVolumeSemanticsUrl
).then(function (tileset) {
const placeholderTile = tileset.root.children[0];
const subtreeRootTile = placeholderTile.children[0];
const rootHalfWidth = 2048;
expect(getHalfWidth(subtreeRootTile.boundingVolume)).toBe(
- rootHalfWidth,
+ rootHalfWidth
);
for (let level = 1; level < 4; level++) {
@@ -1482,7 +1482,7 @@ describe(
viewCartographicOrigin(10000);
return Cesium3DTilesTester.loadTileset(
scene,
- implicitHeightAndSphereSemanticsUrl,
+ implicitHeightAndSphereSemanticsUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
const subtreeRootTile = placeholderTile.children[0];
@@ -1511,7 +1511,7 @@ describe(
viewCartographicOrigin(10000);
return Cesium3DTilesTester.loadTileset(
scene,
- implicitHeightAndRegionSemanticsUrl,
+ implicitHeightAndRegionSemanticsUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
const subtreeRootTile = placeholderTile.children[0];
@@ -1548,7 +1548,7 @@ describe(
viewCartographicOrigin(124000);
return Cesium3DTilesTester.loadTileset(
scene,
- implicitContentBoundingVolumeSemanticsUrl,
+ implicitContentBoundingVolumeSemanticsUrl
).then(function (tileset) {
const placeholderTile = tileset.root.children[0];
const subtreeRootTile = placeholderTile.children[0];
@@ -1560,7 +1560,7 @@ describe(
gatherTilesPreorder(subtreeRootTile, 0, 3, tiles);
tiles.forEach(function (tile) {
expect(
- tile.contentBoundingVolume instanceof TileBoundingSphere,
+ tile.contentBoundingVolume instanceof TileBoundingSphere
).toBe(true);
expect(tile.contentBoundingVolume).not.toBe(tile.boundingVolume);
});
@@ -1571,7 +1571,7 @@ describe(
viewCartographicOrigin(10000);
return Cesium3DTilesTester.loadTileset(
scene,
- implicitContentHeightSemanticsUrl,
+ implicitContentHeightSemanticsUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
const subtreeRootTile = placeholderTile.children[0];
@@ -1598,7 +1598,7 @@ describe(
viewCartographicOrigin(10000);
return Cesium3DTilesTester.loadTileset(
scene,
- implicitContentHeightAndRegionSemanticsUrl,
+ implicitContentHeightAndRegionSemanticsUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
const subtreeRootTile = placeholderTile.children[0];
@@ -1635,7 +1635,7 @@ describe(
viewCartographicOrigin(10000);
return Cesium3DTilesTester.loadTileset(
scene,
- implicitGeometricErrorSemanticsUrl,
+ implicitGeometricErrorSemanticsUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
const subtreeRootTile = placeholderTile.children[0];
@@ -1687,7 +1687,7 @@ describe(
it("group metadata gets transcoded correctly (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- implicitGroupMetadataLegacyUrl,
+ implicitGroupMetadataLegacyUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
const subtreeRootTile = placeholderTile.children[0];
@@ -1697,13 +1697,13 @@ describe(
const groups = tileset.metadataExtension.groups;
const ground = groups[0];
expect(ground.getProperty("color")).toEqual(
- new Cartesian3(120, 68, 32),
+ new Cartesian3(120, 68, 32)
);
expect(ground.getProperty("priority")).toBe(0);
const sky = groups[1];
expect(sky.getProperty("color")).toEqual(
- new Cartesian3(206, 237, 242),
+ new Cartesian3(206, 237, 242)
);
expect(sky.getProperty("priority")).toBe(1);
@@ -1724,7 +1724,7 @@ describe(
it("content metadata gets transcoded correctly (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- implicitContentMetadataLegacyUrl,
+ implicitContentMetadataLegacyUrl
).then(function (tileset) {
const expectedHeights = [10, 20, 0, 30, 40];
const expectedColors = [
@@ -1752,10 +1752,10 @@ describe(
expect(metadata.getProperty("color")).not.toBeDefined();
} else {
expect(metadata.getProperty("height")).toBe(
- expectedHeights[index],
+ expectedHeights[index]
);
expect(metadata.getProperty("color")).toEqual(
- expectedColors[index],
+ expectedColors[index]
);
}
}
@@ -1765,7 +1765,7 @@ describe(
it("multiple content metadata views get transcoded correctly (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- implicitMultipleContentsMetadataLegacyUrl,
+ implicitMultipleContentsMetadataLegacyUrl
).then(function (tileset) {
const expectedHeights = [10, 20, 30, 40, 50];
const expectedColors = [
@@ -1799,10 +1799,10 @@ describe(
}
expect(buildingMetadata.getProperty("height")).toBe(
- expectedHeights[index],
+ expectedHeights[index]
);
expect(buildingMetadata.getProperty("color")).toEqual(
- expectedColors[index],
+ expectedColors[index]
);
if (i === 0) {
@@ -1812,7 +1812,7 @@ describe(
const treeContent = tile.content.innerContents[1];
const treeMetadata = treeContent.metadata;
expect(treeMetadata.getProperty("age")).toEqual(
- expectedAges[index - 1],
+ expectedAges[index - 1]
);
}
});
@@ -1829,7 +1829,7 @@ describe(
viewCartographicOrigin(10000);
return Cesium3DTilesTester.loadTileset(
scene,
- implicitHeightSemanticsLegacyUrl,
+ implicitHeightSemanticsLegacyUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
const subtreeRootTile = placeholderTile.children[0];
@@ -1855,7 +1855,7 @@ describe(
viewCartographicOrigin(10000);
return Cesium3DTilesTester.loadTileset(
scene,
- implicitS2HeightSemanticsLegacyUrl,
+ implicitS2HeightSemanticsLegacyUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
const subtreeRootTile = placeholderTile.children[0];
@@ -1914,7 +1914,7 @@ describe(
viewCartographicOrigin(cameraHeight);
return Cesium3DTilesTester.loadTileset(
scene,
- implicitHeightSemanticsLegacyUrl,
+ implicitHeightSemanticsLegacyUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
const subtreeRootTile = placeholderTile.children[0];
@@ -1938,14 +1938,14 @@ describe(
viewCartographicOrigin(124000);
return Cesium3DTilesTester.loadTileset(
scene,
- implicitTileBoundingVolumeSemanticsLegacyUrl,
+ implicitTileBoundingVolumeSemanticsLegacyUrl
).then(function (tileset) {
const placeholderTile = tileset.root.children[0];
const subtreeRootTile = placeholderTile.children[0];
const rootHalfWidth = 2048;
expect(getHalfWidth(subtreeRootTile.boundingVolume)).toBe(
- rootHalfWidth,
+ rootHalfWidth
);
for (let level = 1; level < 4; level++) {
@@ -1968,7 +1968,7 @@ describe(
viewCartographicOrigin(10000);
return Cesium3DTilesTester.loadTileset(
scene,
- implicitHeightAndSphereSemanticsLegacyUrl,
+ implicitHeightAndSphereSemanticsLegacyUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
const subtreeRootTile = placeholderTile.children[0];
@@ -1997,7 +1997,7 @@ describe(
viewCartographicOrigin(10000);
return Cesium3DTilesTester.loadTileset(
scene,
- implicitHeightAndRegionSemanticsLegacyUrl,
+ implicitHeightAndRegionSemanticsLegacyUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
const subtreeRootTile = placeholderTile.children[0];
@@ -2034,7 +2034,7 @@ describe(
viewCartographicOrigin(124000);
return Cesium3DTilesTester.loadTileset(
scene,
- implicitContentBoundingVolumeSemanticsLegacyUrl,
+ implicitContentBoundingVolumeSemanticsLegacyUrl
).then(function (tileset) {
const placeholderTile = tileset.root.children[0];
const subtreeRootTile = placeholderTile.children[0];
@@ -2046,7 +2046,7 @@ describe(
gatherTilesPreorder(subtreeRootTile, 0, 3, tiles);
tiles.forEach(function (tile) {
expect(
- tile.contentBoundingVolume instanceof TileBoundingSphere,
+ tile.contentBoundingVolume instanceof TileBoundingSphere
).toBe(true);
expect(tile.contentBoundingVolume).not.toBe(tile.boundingVolume);
});
@@ -2057,7 +2057,7 @@ describe(
viewCartographicOrigin(10000);
return Cesium3DTilesTester.loadTileset(
scene,
- implicitContentHeightSemanticsLegacyUrl,
+ implicitContentHeightSemanticsLegacyUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
const subtreeRootTile = placeholderTile.children[0];
@@ -2084,7 +2084,7 @@ describe(
viewCartographicOrigin(10000);
return Cesium3DTilesTester.loadTileset(
scene,
- implicitContentHeightAndRegionSemanticsLegacyUrl,
+ implicitContentHeightAndRegionSemanticsLegacyUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
const subtreeRootTile = placeholderTile.children[0];
@@ -2121,7 +2121,7 @@ describe(
viewCartographicOrigin(10000);
return Cesium3DTilesTester.loadTileset(
scene,
- implicitGeometricErrorSemanticsLegacyUrl,
+ implicitGeometricErrorSemanticsLegacyUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
const subtreeRootTile = placeholderTile.children[0];
@@ -2144,5 +2144,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/ImplicitMetadataViewSpec.js b/packages/engine/Specs/Scene/ImplicitMetadataViewSpec.js
index 8df69ce9626a..089d3a3de96e 100644
--- a/packages/engine/Specs/Scene/ImplicitMetadataViewSpec.js
+++ b/packages/engine/Specs/Scene/ImplicitMetadataViewSpec.js
@@ -205,7 +205,7 @@ describe("Scene/ImplicitMetadataView", function () {
metadataQuadtree = new ImplicitTileset(
tilesetResource,
implicitQuadtreeJson,
- metadataSchema,
+ metadataSchema
);
rootCoordinates = new ImplicitTileCoordinates({
@@ -231,15 +231,16 @@ describe("Scene/ImplicitMetadataView", function () {
let secondTreeView;
beforeEach(async function () {
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
metadataQuadtree,
- rootCoordinates,
+ rootCoordinates
);
tileView = new ImplicitMetadataView({
@@ -418,7 +419,7 @@ describe("Scene/ImplicitMetadataView", function () {
it("getProperty returns the property value for the metadata table", function () {
expect(tileView.getProperty("highlightColor")).toEqual(
- new Cartesian3(255, 0, 0),
+ new Cartesian3(255, 0, 0)
);
expect(tileView.getProperty("buildingCount")).toBe(100);
@@ -431,10 +432,10 @@ describe("Scene/ImplicitMetadataView", function () {
it("getProperty returns the correct value for metadata table views that point to the same table", function () {
expect(tileView.getProperty("highlightColor")).toEqual(
- new Cartesian3(255, 0, 0),
+ new Cartesian3(255, 0, 0)
);
expect(secondTileView.getProperty("highlightColor")).toEqual(
- new Cartesian3(255, 255, 0),
+ new Cartesian3(255, 255, 0)
);
expect(buildingView.getProperty("buildingType")).toEqual("Residential");
@@ -499,17 +500,17 @@ describe("Scene/ImplicitMetadataView", function () {
it("getPropertyBySemantic returns undefined when there's no property with the given semantic", function () {
expect(tileView.getPropertyBySemantic("_AREA")).not.toBeDefined();
expect(
- buildingView.getPropertyBySemantic("_HIGHLIGHT_COLOR"),
+ buildingView.getPropertyBySemantic("_HIGHLIGHT_COLOR")
).not.toBeDefined();
expect(treeView.getPropertyBySemantic("_BUILDING_TYPE")).not.toBeDefined();
});
it("getPropertyBySemantic returns the property value", function () {
expect(tileView.getPropertyBySemantic("_HIGHLIGHT_COLOR")).toEqual(
- new Cartesian3(255, 0, 0),
+ new Cartesian3(255, 0, 0)
);
expect(buildingView.getPropertyBySemantic("_BUILDING_TYPE")).toEqual(
- "Residential",
+ "Residential"
);
expect(treeView.getPropertyBySemantic("_TREE_SPECIES")).toEqual("Oak");
});
@@ -521,52 +522,52 @@ describe("Scene/ImplicitMetadataView", function () {
it("getPropertyBySemantic returns correct values for metadata table views that point to the same table", function () {
expect(tileView.getPropertyBySemantic("_HIGHLIGHT_COLOR")).toEqual(
- new Cartesian3(255, 0, 0),
+ new Cartesian3(255, 0, 0)
);
expect(secondTileView.getPropertyBySemantic("_HIGHLIGHT_COLOR")).toEqual(
- new Cartesian3(255, 255, 0),
+ new Cartesian3(255, 255, 0)
);
expect(buildingView.getPropertyBySemantic("_BUILDING_TYPE")).toEqual(
- "Residential",
+ "Residential"
);
expect(secondBuildingView.getPropertyBySemantic("_BUILDING_TYPE")).toEqual(
- "Commercial",
+ "Commercial"
);
expect(treeView.getPropertyBySemantic("_TREE_SPECIES")).toEqual("Oak");
expect(secondTreeView.getPropertyBySemantic("_TREE_SPECIES")).toEqual(
- "Pine",
+ "Pine"
);
});
it("setPropertyBySemantic sets property value", function () {
expect(tileView.getPropertyBySemantic("_HIGHLIGHT_COLOR")).toEqual(
- new Cartesian3(255, 0, 0),
+ new Cartesian3(255, 0, 0)
);
expect(
tileView.setPropertyBySemantic(
"_HIGHLIGHT_COLOR",
- new Cartesian3(0, 0, 0),
- ),
+ new Cartesian3(0, 0, 0)
+ )
).toBe(true);
expect(tileView.getPropertyBySemantic("_HIGHLIGHT_COLOR")).toEqual(
- new Cartesian3(0, 0, 0),
+ new Cartesian3(0, 0, 0)
);
expect(buildingView.getPropertyBySemantic("_BUILDING_TYPE")).toEqual(
- "Residential",
+ "Residential"
);
expect(buildingView.setPropertyBySemantic("_BUILDING_TYPE", "Other")).toBe(
- true,
+ true
);
expect(buildingView.getPropertyBySemantic("_BUILDING_TYPE")).toEqual(
- "Other",
+ "Other"
);
expect(treeView.getPropertyBySemantic("_TREE_SPECIES")).toEqual("Oak");
expect(treeView.setPropertyBySemantic("_TREE_SPECIES", "Chestnut")).toBe(
- true,
+ true
);
expect(treeView.getPropertyBySemantic("_TREE_SPECIES")).toEqual("Chestnut");
});
@@ -583,41 +584,41 @@ describe("Scene/ImplicitMetadataView", function () {
it("setPropertyBySemantic sets the correct value for metadata table views that point to the same table", function () {
expect(tileView.getPropertyBySemantic("_HIGHLIGHT_COLOR")).toEqual(
- new Cartesian3(255, 0, 0),
+ new Cartesian3(255, 0, 0)
);
expect(
tileView.setPropertyBySemantic(
"_HIGHLIGHT_COLOR",
- new Cartesian3(0, 0, 0),
- ),
+ new Cartesian3(0, 0, 0)
+ )
).toBe(true);
expect(tileView.getPropertyBySemantic("_HIGHLIGHT_COLOR")).toEqual(
- new Cartesian3(0, 0, 0),
+ new Cartesian3(0, 0, 0)
);
expect(secondTileView.getPropertyBySemantic("_HIGHLIGHT_COLOR")).toEqual(
- new Cartesian3(255, 255, 0),
+ new Cartesian3(255, 255, 0)
);
expect(buildingView.getPropertyBySemantic("_BUILDING_TYPE")).toEqual(
- "Residential",
+ "Residential"
);
expect(buildingView.setPropertyBySemantic("_BUILDING_TYPE", "Other")).toBe(
- true,
+ true
);
expect(buildingView.getPropertyBySemantic("_BUILDING_TYPE")).toEqual(
- "Other",
+ "Other"
);
expect(secondBuildingView.getPropertyBySemantic("_BUILDING_TYPE")).toEqual(
- "Commercial",
+ "Commercial"
);
expect(treeView.getPropertyBySemantic("_TREE_SPECIES")).toEqual("Oak");
expect(treeView.setPropertyBySemantic("_TREE_SPECIES", "Chestnut")).toBe(
- true,
+ true
);
expect(treeView.getPropertyBySemantic("_TREE_SPECIES")).toEqual("Chestnut");
expect(secondTreeView.getPropertyBySemantic("_TREE_SPECIES")).toEqual(
- "Pine",
+ "Pine"
);
});
@@ -626,14 +627,14 @@ describe("Scene/ImplicitMetadataView", function () {
expect(
buildingView.setPropertyBySemantic(
"_HIGHLIGHT_COLOR",
- new Cartesian3(255, 0, 0),
- ),
+ new Cartesian3(255, 0, 0)
+ )
).toBe(false);
expect(
treeView.setPropertyBySemantic(
"_HIGHLIGHT_COLOR",
- new Cartesian3(255, 0, 0),
- ),
+ new Cartesian3(255, 0, 0)
+ )
).toBe(false);
});
});
diff --git a/packages/engine/Specs/Scene/ImplicitSubdivisionSchemeSpec.js b/packages/engine/Specs/Scene/ImplicitSubdivisionSchemeSpec.js
index 43983838d177..b1198d03251d 100644
--- a/packages/engine/Specs/Scene/ImplicitSubdivisionSchemeSpec.js
+++ b/packages/engine/Specs/Scene/ImplicitSubdivisionSchemeSpec.js
@@ -10,7 +10,7 @@ describe("Scene/ImplicitSubdivisionScheme", function () {
for (let i = 0; i < treeTypes.length; i++) {
expect(ImplicitSubdivisionScheme.getBranchingFactor(treeTypes[i])).toBe(
- branchingFactors[i],
+ branchingFactors[i]
);
}
});
diff --git a/packages/engine/Specs/Scene/ImplicitSubtreeCacheSpec.js b/packages/engine/Specs/Scene/ImplicitSubtreeCacheSpec.js
index 8a2ac96aa031..9cfafaac261a 100644
--- a/packages/engine/Specs/Scene/ImplicitSubtreeCacheSpec.js
+++ b/packages/engine/Specs/Scene/ImplicitSubtreeCacheSpec.js
@@ -55,7 +55,7 @@ describe("Scene/ImplicitSubtreeCache", function () {
implicitOctree = new ImplicitTileset(
tilesetResource,
implicitOctreeJson,
- metadataSchema,
+ metadataSchema
);
});
@@ -80,7 +80,7 @@ describe("Scene/ImplicitSubtreeCache", function () {
subtreeConstantJson,
undefined,
implicitOctree,
- octreeCoordinates,
+ octreeCoordinates
);
cache.addSubtree(subtree);
expect(cache._subtreeRequestCounter).toBe(1);
@@ -101,7 +101,7 @@ describe("Scene/ImplicitSubtreeCache", function () {
subtreeConstantJson,
undefined,
implicitOctree,
- octreeCoordinates,
+ octreeCoordinates
);
expect(() => cache.addSubtree(subtree)).toThrowDeveloperError();
});
@@ -123,17 +123,17 @@ describe("Scene/ImplicitSubtreeCache", function () {
await Promise.all(
octreeCoordArray.map(async (octreeCoord) => {
const octreeCoordinates = new ImplicitTileCoordinates(
- Object.assign({}, octreeCoordParams, octreeCoord),
+ Object.assign({}, octreeCoordParams, octreeCoord)
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
subtreeConstantJson,
undefined,
implicitOctree,
- octreeCoordinates,
+ octreeCoordinates
);
cache.addSubtree(subtree);
- }),
+ })
);
expect(cache._subtreeRequestCounter).toBe(4);
expect(cache._queue.length).toBe(3);
diff --git a/packages/engine/Specs/Scene/ImplicitSubtreeSpec.js b/packages/engine/Specs/Scene/ImplicitSubtreeSpec.js
index 9843af4215ad..7e275c53ae28 100644
--- a/packages/engine/Specs/Scene/ImplicitSubtreeSpec.js
+++ b/packages/engine/Specs/Scene/ImplicitSubtreeSpec.js
@@ -32,7 +32,7 @@ describe("Scene/ImplicitSubtree", function () {
const expectedAvailability = availabilityToBooleanArray(availability);
for (let i = 0; i < availability.lengthBits; i++) {
expect(subtree.tileIsAvailableAtIndex(i)).toEqual(
- expectedAvailability[i],
+ expectedAvailability[i]
);
// same as above, but using coordinates
expect(
@@ -40,9 +40,9 @@ describe("Scene/ImplicitSubtree", function () {
ImplicitTileCoordinates.fromTileIndex(
subtree.implicitCoordinates.subdivisionScheme,
subtree.implicitCoordinates.subtreeLevels,
- i,
- ),
- ),
+ i
+ )
+ )
).toEqual(expectedAvailability[i]);
}
}
@@ -53,7 +53,7 @@ describe("Scene/ImplicitSubtree", function () {
const expectedAvailability = availabilityToBooleanArray(availability);
for (let j = 0; j < availability.lengthBits; j++) {
expect(subtree.contentIsAvailableAtIndex(j, i)).toEqual(
- expectedAvailability[j],
+ expectedAvailability[j]
);
// same as above, but using coordinates
expect(
@@ -61,10 +61,10 @@ describe("Scene/ImplicitSubtree", function () {
ImplicitTileCoordinates.fromTileIndex(
subtree.implicitCoordinates.subdivisionScheme,
subtree.implicitCoordinates.subtreeLevels,
- j,
+ j
),
- i,
- ),
+ i
+ )
).toEqual(expectedAvailability[j]);
}
}
@@ -74,7 +74,7 @@ describe("Scene/ImplicitSubtree", function () {
const expectedAvailability = availabilityToBooleanArray(availability);
for (let i = 0; i < availability.lengthBits; i++) {
expect(subtree.childSubtreeIsAvailableAtIndex(i)).toEqual(
- expectedAvailability[i],
+ expectedAvailability[i]
);
// same as above, but using coordinates
expect(
@@ -83,9 +83,9 @@ describe("Scene/ImplicitSubtree", function () {
subtree.implicitCoordinates.subdivisionScheme,
subtree.implicitCoordinates.subtreeLevels,
subtree.implicitCoordinates.subtreeLevels,
- i,
- ),
- ),
+ i
+ )
+ )
).toEqual(expectedAvailability[i]);
}
}
@@ -217,7 +217,7 @@ describe("Scene/ImplicitSubtree", function () {
implicitQuadtree = new ImplicitTileset(
tilesetResource,
implicitQuadtreeJson,
- metadataSchema,
+ metadataSchema
);
quadtreeCoordinates = new ImplicitTileCoordinates({
@@ -231,7 +231,7 @@ describe("Scene/ImplicitSubtree", function () {
implicitOctree = new ImplicitTileset(
tilesetResource,
implicitOctreeJson,
- metadataSchema,
+ metadataSchema
);
octreeCoordinates = new ImplicitTileCoordinates({
@@ -249,7 +249,7 @@ describe("Scene/ImplicitSubtree", function () {
return new ImplicitSubtree(
undefined,
implicitQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
}).toThrowDeveloperError();
});
@@ -259,7 +259,7 @@ describe("Scene/ImplicitSubtree", function () {
return new ImplicitSubtree(
subtreeResource,
undefined,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
}).toThrowDeveloperError();
});
@@ -272,18 +272,18 @@ describe("Scene/ImplicitSubtree", function () {
it("sets the implicit coordinates of the subtree's root", async function () {
const results = ImplicitTilingTester.generateSubtreeBuffers(
- internalQuadtreeDescription,
+ internalQuadtreeDescription
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
implicitQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expect(subtree.implicitCoordinates.isEqual(quadtreeCoordinates)).toEqual(
- true,
+ true
);
});
@@ -294,33 +294,33 @@ describe("Scene/ImplicitSubtree", function () {
undefined,
undefined,
implicitQuadtree,
- quadtreeCoordinates,
- ),
+ quadtreeCoordinates
+ )
).toBeRejectedWithDeveloperError();
});
it("gets availability from internal buffer", async function () {
const results = ImplicitTilingTester.generateSubtreeBuffers(
- internalQuadtreeDescription,
+ internalQuadtreeDescription
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
implicitQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expectTileAvailability(
subtree,
- internalQuadtreeDescription.tileAvailability,
+ internalQuadtreeDescription.tileAvailability
);
expectContentAvailability(
subtree,
- internalQuadtreeDescription.contentAvailability,
+ internalQuadtreeDescription.contentAvailability
);
expectChildSubtreeAvailability(
subtree,
- internalQuadtreeDescription.childSubtreeAvailability,
+ internalQuadtreeDescription.childSubtreeAvailability
);
});
@@ -344,23 +344,24 @@ describe("Scene/ImplicitSubtree", function () {
isInternal: false,
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const fetchExternal = spyOn(ResourceCache, "get").and.callFake(
- fakeResourceLoader(results.externalBuffer),
+ fakeResourceLoader(results.externalBuffer)
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
implicitQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expectTileAvailability(subtree, subtreeDescription.tileAvailability);
expectContentAvailability(subtree, subtreeDescription.contentAvailability);
expectChildSubtreeAvailability(
subtree,
- subtreeDescription.childSubtreeAvailability,
+ subtreeDescription.childSubtreeAvailability
);
expect(fetchExternal.calls.count()).toEqual(1);
@@ -372,20 +373,20 @@ describe("Scene/ImplicitSubtree", function () {
subtreeConstantJson,
undefined,
implicitQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expectTileAvailability(
subtree,
- constantQuadtreeDescription.tileAvailability,
+ constantQuadtreeDescription.tileAvailability
);
expectContentAvailability(
subtree,
- constantQuadtreeDescription.contentAvailability,
+ constantQuadtreeDescription.contentAvailability
);
expectChildSubtreeAvailability(
subtree,
- constantQuadtreeDescription.childSubtreeAvailability,
+ constantQuadtreeDescription.childSubtreeAvailability
);
});
@@ -414,7 +415,7 @@ describe("Scene/ImplicitSubtree", function () {
const results = ImplicitTilingTester.generateSubtreeBuffers(description);
const fetchExternal = spyOn(ResourceCache, "get").and.callFake(
- fakeResourceLoader(results.externalBuffer),
+ fakeResourceLoader(results.externalBuffer)
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
@@ -422,14 +423,14 @@ describe("Scene/ImplicitSubtree", function () {
results.subtreeJson,
undefined,
implicitQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expectTileAvailability(subtree, description.tileAvailability);
expectContentAvailability(subtree, description.contentAvailability);
expectChildSubtreeAvailability(
subtree,
- description.childSubtreeAvailability,
+ description.childSubtreeAvailability
);
expect(fetchExternal.calls.count()).toEqual(1);
@@ -447,20 +448,20 @@ describe("Scene/ImplicitSubtree", function () {
undefined,
results.subtreeBuffer,
implicitQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expectTileAvailability(
subtree,
- internalQuadtreeDescription.tileAvailability,
+ internalQuadtreeDescription.tileAvailability
);
expectContentAvailability(
subtree,
- internalQuadtreeDescription.contentAvailability,
+ internalQuadtreeDescription.contentAvailability
);
expectChildSubtreeAvailability(
subtree,
- internalQuadtreeDescription.childSubtreeAvailability,
+ internalQuadtreeDescription.childSubtreeAvailability
);
});
@@ -485,13 +486,14 @@ describe("Scene/ImplicitSubtree", function () {
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
// Put the subtree buffer in a larger buffer so the byteOffset is not 0
const paddingLength = 8;
const biggerBuffer = new Uint8Array(
- results.subtreeBuffer.length + paddingLength,
+ results.subtreeBuffer.length + paddingLength
);
biggerBuffer.set(results.subtreeBuffer, paddingLength);
const subtreeView = new Uint8Array(biggerBuffer.buffer, paddingLength);
@@ -501,13 +503,13 @@ describe("Scene/ImplicitSubtree", function () {
undefined,
subtreeView,
implicitQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expectTileAvailability(subtree, subtreeDescription.tileAvailability);
expectContentAvailability(subtree, subtreeDescription.contentAvailability);
expectChildSubtreeAvailability(
subtree,
- subtreeDescription.childSubtreeAvailability,
+ subtreeDescription.childSubtreeAvailability
);
});
@@ -532,24 +534,25 @@ describe("Scene/ImplicitSubtree", function () {
isInternal: false,
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const fetchExternal = spyOn(ResourceCache, "get").and.callFake(
- fakeResourceLoader(results.externalBuffer),
+ fakeResourceLoader(results.externalBuffer)
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
implicitQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expectTileAvailability(subtree, subtreeDescription.tileAvailability);
expectContentAvailability(subtree, subtreeDescription.contentAvailability);
expectChildSubtreeAvailability(
subtree,
- subtreeDescription.childSubtreeAvailability,
+ subtreeDescription.childSubtreeAvailability
);
expect(fetchExternal.calls.count()).toEqual(1);
});
@@ -574,18 +577,19 @@ describe("Scene/ImplicitSubtree", function () {
isInternal: false,
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const fetchExternal = spyOn(ResourceCache, "get").and.callFake(
- fakeResourceLoader(results.externalBuffer),
+ fakeResourceLoader(results.externalBuffer)
);
await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
implicitQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expect(fetchExternal.calls.count()).toEqual(1);
});
@@ -615,19 +619,20 @@ describe("Scene/ImplicitSubtree", function () {
isInternal: false,
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const fetchExternal = spyOn(
Resource.prototype,
- "fetchArrayBuffer",
+ "fetchArrayBuffer"
).and.returnValue(Promise.resolve(results.externalBuffer));
await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
implicitQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expect(fetchExternal).not.toHaveBeenCalled();
});
@@ -651,21 +656,22 @@ describe("Scene/ImplicitSubtree", function () {
isInternal: true,
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
implicitQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expectTileAvailability(subtree, subtreeDescription.tileAvailability);
expectContentAvailability(subtree, expectedContentAvailability);
expectChildSubtreeAvailability(
subtree,
- subtreeDescription.childSubtreeAvailability,
+ subtreeDescription.childSubtreeAvailability
);
});
@@ -690,20 +696,21 @@ describe("Scene/ImplicitSubtree", function () {
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
implicitQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expectTileAvailability(subtree, subtreeDescription.tileAvailability);
expectContentAvailability(subtree, subtreeDescription.contentAvailability);
expectChildSubtreeAvailability(
subtree,
- subtreeDescription.childSubtreeAvailability,
+ subtreeDescription.childSubtreeAvailability
);
});
@@ -727,14 +734,15 @@ describe("Scene/ImplicitSubtree", function () {
isInternal: true,
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
implicitOctree,
- octreeCoordinates,
+ octreeCoordinates
);
expect(subtree.getLevelOffset(2)).toEqual(9);
@@ -760,8 +768,9 @@ describe("Scene/ImplicitSubtree", function () {
isInternal: true,
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const deeperQuadtreeCoordinates = new ImplicitTileCoordinates({
subdivisionScheme: implicitQuadtree.subdivisionScheme,
@@ -776,7 +785,7 @@ describe("Scene/ImplicitSubtree", function () {
undefined,
results.subtreeBuffer,
implicitQuadtree,
- deeperQuadtreeCoordinates,
+ deeperQuadtreeCoordinates
);
expect(function () {
@@ -821,8 +830,9 @@ describe("Scene/ImplicitSubtree", function () {
isInternal: true,
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const subtreeCoordinates = new ImplicitTileCoordinates({
subdivisionScheme: implicitQuadtree.subdivisionScheme,
subtreeLevels: implicitQuadtree.subtreeLevels,
@@ -835,7 +845,7 @@ describe("Scene/ImplicitSubtree", function () {
undefined,
results.subtreeBuffer,
implicitQuadtree,
- subtreeCoordinates,
+ subtreeCoordinates
);
// level offset: 1, morton index: 0, so tile index is 1 + 0 = 1
@@ -850,11 +860,11 @@ describe("Scene/ImplicitSubtree", function () {
expect(indexFull).toBe(1);
expect(subtree.tileIsAvailableAtIndex(indexFull)).toEqual(true);
expect(
- subtree.tileIsAvailableAtCoordinates(implicitCoordinatesFull),
+ subtree.tileIsAvailableAtCoordinates(implicitCoordinatesFull)
).toEqual(true);
expect(subtree.contentIsAvailableAtIndex(indexFull)).toEqual(true);
expect(
- subtree.contentIsAvailableAtCoordinates(implicitCoordinatesFull),
+ subtree.contentIsAvailableAtCoordinates(implicitCoordinatesFull)
).toEqual(true);
// level offset: 1, morton index: 3, so tile index is 1 + 3 = 4
@@ -869,11 +879,11 @@ describe("Scene/ImplicitSubtree", function () {
expect(indexEmpty).toBe(4);
expect(subtree.tileIsAvailableAtIndex(indexEmpty)).toEqual(false);
expect(
- subtree.tileIsAvailableAtCoordinates(implicitCoordinatesEmpty),
+ subtree.tileIsAvailableAtCoordinates(implicitCoordinatesEmpty)
).toEqual(false);
expect(subtree.contentIsAvailableAtIndex(indexEmpty)).toEqual(false);
expect(
- subtree.contentIsAvailableAtCoordinates(implicitCoordinatesEmpty),
+ subtree.contentIsAvailableAtCoordinates(implicitCoordinatesEmpty)
).toEqual(false);
});
@@ -897,8 +907,9 @@ describe("Scene/ImplicitSubtree", function () {
isInternal: true,
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const deeperQuadtreeCoordinates = new ImplicitTileCoordinates({
subdivisionScheme: implicitQuadtree.subdivisionScheme,
subtreeLevels: implicitQuadtree.subtreeLevels,
@@ -911,7 +922,7 @@ describe("Scene/ImplicitSubtree", function () {
undefined,
results.subtreeBuffer,
implicitQuadtree,
- deeperQuadtreeCoordinates,
+ deeperQuadtreeCoordinates
);
expect(function () {
@@ -956,8 +967,9 @@ describe("Scene/ImplicitSubtree", function () {
isInternal: true,
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const subtreeCoordinates = new ImplicitTileCoordinates({
subdivisionScheme: implicitQuadtree.subdivisionScheme,
subtreeLevels: implicitQuadtree.subtreeLevels,
@@ -970,7 +982,7 @@ describe("Scene/ImplicitSubtree", function () {
undefined,
results.subtreeBuffer,
implicitQuadtree,
- subtreeCoordinates,
+ subtreeCoordinates
);
const implicitCoordinatesFull = new ImplicitTileCoordinates({
@@ -986,7 +998,7 @@ describe("Scene/ImplicitSubtree", function () {
expect(indexFull).toBe(0);
expect(subtree.childSubtreeIsAvailableAtIndex(indexFull)).toEqual(true);
expect(
- subtree.childSubtreeIsAvailableAtCoordinates(implicitCoordinatesFull),
+ subtree.childSubtreeIsAvailableAtCoordinates(implicitCoordinatesFull)
).toEqual(true);
const implicitCoordinatesEmpty = new ImplicitTileCoordinates({
@@ -1002,7 +1014,7 @@ describe("Scene/ImplicitSubtree", function () {
expect(indexEmpty).toBe(3);
expect(subtree.childSubtreeIsAvailableAtIndex(indexEmpty)).toEqual(false);
expect(
- subtree.childSubtreeIsAvailableAtCoordinates(implicitCoordinatesEmpty),
+ subtree.childSubtreeIsAvailableAtCoordinates(implicitCoordinatesEmpty)
).toEqual(false);
});
@@ -1026,14 +1038,15 @@ describe("Scene/ImplicitSubtree", function () {
isInternal: true,
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
implicitOctree,
- octreeCoordinates,
+ octreeCoordinates
);
// 341 = 0b101010101
@@ -1062,20 +1075,21 @@ describe("Scene/ImplicitSubtree", function () {
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
implicitOctree,
- octreeCoordinates,
+ octreeCoordinates
);
expectTileAvailability(subtree, subtreeDescription.tileAvailability);
expectContentAvailability(subtree, subtreeDescription.contentAvailability);
expectChildSubtreeAvailability(
subtree,
- subtreeDescription.childSubtreeAvailability,
+ subtreeDescription.childSubtreeAvailability
);
});
@@ -1103,20 +1117,20 @@ describe("Scene/ImplicitSubtree", function () {
const constantOnly = true;
const results = ImplicitTilingTester.generateSubtreeBuffers(
subtreeDescription,
- constantOnly,
+ constantOnly
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
implicitOctree,
- octreeCoordinates,
+ octreeCoordinates
);
expectTileAvailability(subtree, subtreeDescription.tileAvailability);
expectContentAvailability(subtree, subtreeDescription.contentAvailability);
expectChildSubtreeAvailability(
subtree,
- subtreeDescription.childSubtreeAvailability,
+ subtreeDescription.childSubtreeAvailability
);
});
@@ -1140,10 +1154,11 @@ describe("Scene/ImplicitSubtree", function () {
isInternal: false,
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
spyOn(ResourceCache, "get").and.callFake(
- fakeResourceLoader(results.externalBuffer),
+ fakeResourceLoader(results.externalBuffer)
);
const unload = spyOn(ResourceCache, "unload");
const subtree = await ImplicitSubtree.fromSubtreeJson(
@@ -1151,7 +1166,7 @@ describe("Scene/ImplicitSubtree", function () {
undefined,
results.subtreeBuffer,
implicitQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
const bufferLoader = subtree._bufferLoader;
expect(bufferLoader).toBeDefined();
@@ -1193,7 +1208,7 @@ describe("Scene/ImplicitSubtree", function () {
multipleContentsQuadtree = new ImplicitTileset(
tilesetResource,
tileJson,
- metadataSchema,
+ metadataSchema
);
multipleContentsCoordinates = new ImplicitTileCoordinates({
@@ -1230,14 +1245,15 @@ describe("Scene/ImplicitSubtree", function () {
isInternal: true,
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
multipleContentsQuadtree,
- multipleContentsCoordinates,
+ multipleContentsCoordinates
);
const outOfBounds = 100;
@@ -1272,10 +1288,11 @@ describe("Scene/ImplicitSubtree", function () {
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const fetchExternal = spyOn(ResourceCache, "get").and.callFake(
- fakeResourceLoader(results.externalBuffer),
+ fakeResourceLoader(results.externalBuffer)
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
@@ -1283,14 +1300,14 @@ describe("Scene/ImplicitSubtree", function () {
undefined,
results.subtreeBuffer,
multipleContentsQuadtree,
- multipleContentsCoordinates,
+ multipleContentsCoordinates
);
expect(fetchExternal).toHaveBeenCalled();
expectTileAvailability(subtree, subtreeDescription.tileAvailability);
expectContentAvailability(
subtree,
- subtreeDescription.contentAvailability,
+ subtreeDescription.contentAvailability
);
});
@@ -1321,10 +1338,11 @@ describe("Scene/ImplicitSubtree", function () {
useLegacySchema: true,
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const fetchExternal = spyOn(ResourceCache, "get").and.callFake(
- fakeResourceLoader(results.externalBuffer),
+ fakeResourceLoader(results.externalBuffer)
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
@@ -1332,14 +1350,14 @@ describe("Scene/ImplicitSubtree", function () {
undefined,
results.subtreeBuffer,
multipleContentsQuadtree,
- multipleContentsCoordinates,
+ multipleContentsCoordinates
);
expect(fetchExternal).toHaveBeenCalled();
expectTileAvailability(subtree, subtreeDescription.tileAvailability);
expectContentAvailability(
subtree,
- subtreeDescription.contentAvailability,
+ subtreeDescription.contentAvailability
);
});
});
@@ -1500,31 +1518,31 @@ describe("Scene/ImplicitSubtree", function () {
subtreeMetadataSchema = MetadataSchema.fromJson(subtreeSchema);
buildingMetadataSchema = MetadataSchema.fromJson(buildingSchema);
multipleContentsMetadataSchema = MetadataSchema.fromJson(
- multipleContentsSchema,
+ multipleContentsSchema
);
tileMetadataQuadtree = new ImplicitTileset(
tilesetResource,
implicitQuadtreeJson,
- tileMetadataSchema,
+ tileMetadataSchema
);
subtreeMetadataQuadtree = new ImplicitTileset(
tilesetResource,
implicitQuadtreeJson,
- subtreeMetadataSchema,
+ subtreeMetadataSchema
);
buildingMetadataQuadtree = new ImplicitTileset(
tilesetResource,
implicitQuadtreeJson,
- buildingMetadataSchema,
+ buildingMetadataSchema
);
multipleContentsMetadataQuadtree = new ImplicitTileset(
tilesetResource,
implicitQuadtreeJson,
- multipleContentsMetadataSchema,
+ multipleContentsMetadataSchema
);
});
@@ -1553,7 +1571,7 @@ describe("Scene/ImplicitSubtree", function () {
metadataSubtreeJson,
undefined,
subtreeMetadataQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
const metadata = subtree.metadata;
@@ -1592,17 +1610,18 @@ describe("Scene/ImplicitSubtree", function () {
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const fetchExternal = spyOn(ResourceCache, "get").and.callFake(
- fakeResourceLoader(results.externalBuffer),
+ fakeResourceLoader(results.externalBuffer)
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
tileMetadataQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expect(fetchExternal).not.toHaveBeenCalled();
@@ -1613,10 +1632,10 @@ describe("Scene/ImplicitSubtree", function () {
for (let i = 0; i < buildingCounts.length; i++) {
expect(metadataTable.getProperty(i, "highlightColor")).toEqual(
- Cartesian3.unpack(highlightColors[i]),
+ Cartesian3.unpack(highlightColors[i])
);
expect(metadataTable.getProperty(i, "buildingCount")).toBe(
- buildingCounts[i],
+ buildingCounts[i]
);
}
});
@@ -1647,17 +1666,18 @@ describe("Scene/ImplicitSubtree", function () {
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const fetchExternal = spyOn(ResourceCache, "get").and.callFake(
- fakeResourceLoader(results.externalBuffer),
+ fakeResourceLoader(results.externalBuffer)
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
tileMetadataQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expect(fetchExternal).toHaveBeenCalled();
@@ -1668,10 +1688,10 @@ describe("Scene/ImplicitSubtree", function () {
for (let i = 0; i < buildingCounts.length; i++) {
expect(metadataTable.getProperty(i, "highlightColor")).toEqual(
- Cartesian3.unpack(highlightColors[i]),
+ Cartesian3.unpack(highlightColors[i])
);
expect(metadataTable.getProperty(i, "buildingCount")).toBe(
- buildingCounts[i],
+ buildingCounts[i]
);
}
});
@@ -1702,17 +1722,18 @@ describe("Scene/ImplicitSubtree", function () {
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const fetchExternal = spyOn(ResourceCache, "get").and.callFake(
- fakeResourceLoader(results.externalBuffer),
+ fakeResourceLoader(results.externalBuffer)
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
buildingMetadataQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expect(fetchExternal).not.toHaveBeenCalled();
@@ -1726,10 +1747,10 @@ describe("Scene/ImplicitSubtree", function () {
for (let i = 0; i < buildingHeights.length; i++) {
expect(metadataTable.getProperty(i, "height")).toEqual(
- buildingHeights[i],
+ buildingHeights[i]
);
expect(metadataTable.getProperty(i, "buildingType")).toBe(
- buildingTypes[i],
+ buildingTypes[i]
);
}
});
@@ -1760,17 +1781,18 @@ describe("Scene/ImplicitSubtree", function () {
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const fetchExternal = spyOn(ResourceCache, "get").and.callFake(
- fakeResourceLoader(results.externalBuffer),
+ fakeResourceLoader(results.externalBuffer)
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
buildingMetadataQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expect(fetchExternal).toHaveBeenCalled();
@@ -1784,10 +1806,10 @@ describe("Scene/ImplicitSubtree", function () {
for (let i = 0; i < buildingHeights.length; i++) {
expect(metadataTable.getProperty(i, "height")).toEqual(
- buildingHeights[i],
+ buildingHeights[i]
);
expect(metadataTable.getProperty(i, "buildingType")).toBe(
- buildingTypes[i],
+ buildingTypes[i]
);
}
});
@@ -1823,17 +1845,18 @@ describe("Scene/ImplicitSubtree", function () {
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const fetchExternal = spyOn(ResourceCache, "get").and.callFake(
- fakeResourceLoader(results.externalBuffer),
+ fakeResourceLoader(results.externalBuffer)
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
multipleContentsMetadataQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expect(fetchExternal).not.toHaveBeenCalled();
@@ -1847,10 +1870,10 @@ describe("Scene/ImplicitSubtree", function () {
for (let i = 0; i < buildingHeights.length; i++) {
expect(buildingMetadataTable.getProperty(i, "height")).toEqual(
- buildingHeights[i],
+ buildingHeights[i]
);
expect(buildingMetadataTable.getProperty(i, "buildingType")).toBe(
- buildingTypes[i],
+ buildingTypes[i]
);
}
@@ -1860,10 +1883,10 @@ describe("Scene/ImplicitSubtree", function () {
for (let i = 0; i < treeHeights.length; i++) {
expect(treeMetadataTable.getProperty(i, "height")).toEqual(
- treeHeights[i],
+ treeHeights[i]
);
expect(treeMetadataTable.getProperty(i, "species")).toBe(
- treeSpecies[i],
+ treeSpecies[i]
);
}
});
@@ -1899,17 +1922,18 @@ describe("Scene/ImplicitSubtree", function () {
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const fetchExternal = spyOn(ResourceCache, "get").and.callFake(
- fakeResourceLoader(results.externalBuffer),
+ fakeResourceLoader(results.externalBuffer)
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
multipleContentsMetadataQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expect(fetchExternal).toHaveBeenCalled();
@@ -1923,10 +1947,10 @@ describe("Scene/ImplicitSubtree", function () {
for (let i = 0; i < buildingHeights.length; i++) {
expect(buildingMetadataTable.getProperty(i, "height")).toEqual(
- buildingHeights[i],
+ buildingHeights[i]
);
expect(buildingMetadataTable.getProperty(i, "buildingType")).toBe(
- buildingTypes[i],
+ buildingTypes[i]
);
}
@@ -1936,10 +1960,10 @@ describe("Scene/ImplicitSubtree", function () {
for (let i = 0; i < treeHeights.length; i++) {
expect(treeMetadataTable.getProperty(i, "height")).toEqual(
- treeHeights[i],
+ treeHeights[i]
);
expect(treeMetadataTable.getProperty(i, "species")).toBe(
- treeSpecies[i],
+ treeSpecies[i]
);
}
});
@@ -1970,11 +1994,12 @@ describe("Scene/ImplicitSubtree", function () {
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const fetchExternal = spyOn(ResourceCache, "get").and.callFake(
- fakeResourceLoader(results.externalBuffer),
+ fakeResourceLoader(results.externalBuffer)
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
@@ -1982,17 +2007,17 @@ describe("Scene/ImplicitSubtree", function () {
undefined,
results.subtreeBuffer,
tileMetadataQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expect(fetchExternal).not.toHaveBeenCalled();
const metadataView = subtree.getTileMetadataView(quadtreeCoordinates);
expect(metadataView).toBeDefined();
expect(metadataView.getProperty("highlightColor")).toEqual(
- Cartesian3.unpack(highlightColors[0]),
+ Cartesian3.unpack(highlightColors[0])
);
expect(metadataView.getProperty("buildingCount")).toEqual(
- buildingCounts[0],
+ buildingCounts[0]
);
});
@@ -2022,11 +2047,12 @@ describe("Scene/ImplicitSubtree", function () {
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const fetchExternal = spyOn(ResourceCache, "get").and.callFake(
- fakeResourceLoader(results.externalBuffer),
+ fakeResourceLoader(results.externalBuffer)
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
@@ -2034,7 +2060,7 @@ describe("Scene/ImplicitSubtree", function () {
undefined,
results.subtreeBuffer,
tileMetadataQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expect(fetchExternal).not.toHaveBeenCalled();
@@ -2077,11 +2103,12 @@ describe("Scene/ImplicitSubtree", function () {
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const fetchExternal = spyOn(ResourceCache, "get").and.callFake(
- fakeResourceLoader(results.externalBuffer),
+ fakeResourceLoader(results.externalBuffer)
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
@@ -2089,18 +2116,18 @@ describe("Scene/ImplicitSubtree", function () {
undefined,
results.subtreeBuffer,
buildingMetadataQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expect(fetchExternal).not.toHaveBeenCalled();
const metadataView = subtree.getContentMetadataView(
quadtreeCoordinates,
- 0,
+ 0
);
expect(metadataView).toBeDefined();
expect(metadataView.getProperty("height")).toEqual(buildingHeights[0]);
expect(metadataView.getProperty("buildingType")).toEqual(
- buildingTypes[0],
+ buildingTypes[0]
);
});
@@ -2130,11 +2157,12 @@ describe("Scene/ImplicitSubtree", function () {
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const fetchExternal = spyOn(ResourceCache, "get").and.callFake(
- fakeResourceLoader(results.externalBuffer),
+ fakeResourceLoader(results.externalBuffer)
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
@@ -2142,7 +2170,7 @@ describe("Scene/ImplicitSubtree", function () {
undefined,
results.subtreeBuffer,
buildingMetadataQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expect(fetchExternal).not.toHaveBeenCalled();
@@ -2190,11 +2218,12 @@ describe("Scene/ImplicitSubtree", function () {
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const fetchExternal = spyOn(ResourceCache, "get").and.callFake(
- fakeResourceLoader(results.externalBuffer),
+ fakeResourceLoader(results.externalBuffer)
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
@@ -2202,7 +2231,7 @@ describe("Scene/ImplicitSubtree", function () {
undefined,
results.subtreeBuffer,
multipleContentsMetadataQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expect(fetchExternal).not.toHaveBeenCalled();
@@ -2216,14 +2245,14 @@ describe("Scene/ImplicitSubtree", function () {
const buildingMetadataView = subtree.getContentMetadataView(
coordinates,
- 0,
+ 0
);
expect(buildingMetadataView).toBeDefined();
expect(buildingMetadataView.getProperty("height")).toEqual(
- buildingHeights[2],
+ buildingHeights[2]
);
expect(buildingMetadataView.getProperty("buildingType")).toEqual(
- buildingTypes[2],
+ buildingTypes[2]
);
const treeMetadataView = subtree.getContentMetadataView(coordinates, 1);
@@ -2263,11 +2292,12 @@ describe("Scene/ImplicitSubtree", function () {
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const fetchExternal = spyOn(ResourceCache, "get").and.callFake(
- fakeResourceLoader(results.externalBuffer),
+ fakeResourceLoader(results.externalBuffer)
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
@@ -2275,7 +2305,7 @@ describe("Scene/ImplicitSubtree", function () {
undefined,
results.subtreeBuffer,
multipleContentsMetadataQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expect(fetchExternal).not.toHaveBeenCalled();
@@ -2289,13 +2319,13 @@ describe("Scene/ImplicitSubtree", function () {
const buildingMetadataView = subtree.getContentMetadataView(
coordinates,
- 0,
+ 0
);
expect(buildingMetadataView).not.toBeDefined();
const treeMetadataView = subtree.getContentMetadataView(
quadtreeCoordinates,
- 1,
+ 1
);
expect(treeMetadataView).not.toBeDefined();
});
@@ -2327,17 +2357,18 @@ describe("Scene/ImplicitSubtree", function () {
useLegacySchema: true,
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const fetchExternal = spyOn(ResourceCache, "get").and.callFake(
- fakeResourceLoader(results.externalBuffer),
+ fakeResourceLoader(results.externalBuffer)
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
buildingMetadataQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expect(fetchExternal).not.toHaveBeenCalled();
@@ -2351,10 +2382,10 @@ describe("Scene/ImplicitSubtree", function () {
for (let i = 0; i < buildingHeights.length; i++) {
expect(metadataTable.getProperty(i, "height")).toEqual(
- buildingHeights[i],
+ buildingHeights[i]
);
expect(metadataTable.getProperty(i, "buildingType")).toBe(
- buildingTypes[i],
+ buildingTypes[i]
);
}
});
@@ -2386,17 +2417,18 @@ describe("Scene/ImplicitSubtree", function () {
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const fetchExternal = spyOn(ResourceCache, "get").and.callFake(
- fakeResourceLoader(results.externalBuffer),
+ fakeResourceLoader(results.externalBuffer)
);
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
tileMetadataQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expect(fetchExternal).not.toHaveBeenCalled();
@@ -2407,10 +2439,10 @@ describe("Scene/ImplicitSubtree", function () {
for (let i = 0; i < buildingCounts.length; i++) {
expect(metadataTable.getProperty(i, "highlightColor")).toEqual(
- Cartesian3.unpack(highlightColors[i]),
+ Cartesian3.unpack(highlightColors[i])
);
expect(metadataTable.getProperty(i, "buildingCount")).toBe(
- buildingCounts[i],
+ buildingCounts[i]
);
}
});
@@ -2462,14 +2494,15 @@ describe("Scene/ImplicitSubtree", function () {
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
tileMetadataQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
expect(subtree._tileJumpBuffer).toEqual(new Uint8Array([0, 0, 0, 1, 2]));
@@ -2479,10 +2512,10 @@ describe("Scene/ImplicitSubtree", function () {
for (let i = 0; i < buildingCounts.length; i++) {
expect(metadataTable.getProperty(i, "highlightColor")).toEqual(
- Cartesian3.unpack(highlightColors[i]),
+ Cartesian3.unpack(highlightColors[i])
);
expect(metadataTable.getProperty(i, "buildingCount")).toBe(
- buildingCounts[i],
+ buildingCounts[i]
);
}
});
@@ -2516,15 +2549,16 @@ describe("Scene/ImplicitSubtree", function () {
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
buildingMetadataQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
const jumpBuffer = subtree._contentJumpBuffers[0];
@@ -2540,10 +2574,10 @@ describe("Scene/ImplicitSubtree", function () {
for (let i = 0; i < buildingHeightsTruncated.length; i++) {
expect(metadataTable.getProperty(i, "height")).toEqual(
- buildingHeightsTruncated[i],
+ buildingHeightsTruncated[i]
);
expect(metadataTable.getProperty(i, "buildingType")).toBe(
- buildingTypesTruncated[i],
+ buildingTypesTruncated[i]
);
}
});
@@ -2585,15 +2619,16 @@ describe("Scene/ImplicitSubtree", function () {
},
};
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
multipleContentsMetadataQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
const buildingJumpBuffer = subtree._contentJumpBuffers[0];
@@ -2612,10 +2647,10 @@ describe("Scene/ImplicitSubtree", function () {
for (let i = 0; i < buildingHeightsTruncated.length; i++) {
expect(buildingMetadataTable.getProperty(i, "height")).toEqual(
- buildingHeightsTruncated[i],
+ buildingHeightsTruncated[i]
);
expect(buildingMetadataTable.getProperty(i, "buildingType")).toBe(
- buildingTypesTruncated[i],
+ buildingTypesTruncated[i]
);
}
@@ -2625,10 +2660,10 @@ describe("Scene/ImplicitSubtree", function () {
for (let i = 0; i < treeHeightsTruncated.length; i++) {
expect(treeMetadataTable.getProperty(i, "height")).toEqual(
- treeHeightsTruncated[i],
+ treeHeightsTruncated[i]
);
expect(treeMetadataTable.getProperty(i, "species")).toBe(
- treeSpeciesTruncated[i],
+ treeSpeciesTruncated[i]
);
}
});
@@ -2713,17 +2748,18 @@ describe("Scene/ImplicitSubtree", function () {
const arrayQuadtree = new ImplicitTileset(
tilesetResource,
implicitQuadtreeJson,
- metadataSchema,
+ metadataSchema
);
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
arrayQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
const metadataTable = subtree.tileMetadataTable;
expect(metadataTable).toBeDefined();
@@ -2731,13 +2767,13 @@ describe("Scene/ImplicitSubtree", function () {
for (let i = 0; i < buildingCounts.length; i++) {
expect(metadataTable.getProperty(i, "stringProperty")).toBe(
- stringValues[i],
+ stringValues[i]
);
expect(metadataTable.getProperty(i, "arrayProperty")).toEqual(
- arrayValues[i],
+ arrayValues[i]
);
expect(metadataTable.getProperty(i, "arrayOfStringProperty")).toEqual(
- stringArrayValues[i],
+ stringArrayValues[i]
);
}
});
@@ -2823,17 +2859,18 @@ describe("Scene/ImplicitSubtree", function () {
const arrayQuadtree = new ImplicitTileset(
tilesetResource,
implicitQuadtreeJson,
- metadataSchema,
+ metadataSchema
);
- const results =
- ImplicitTilingTester.generateSubtreeBuffers(subtreeDescription);
+ const results = ImplicitTilingTester.generateSubtreeBuffers(
+ subtreeDescription
+ );
const subtree = await ImplicitSubtree.fromSubtreeJson(
subtreeResource,
undefined,
results.subtreeBuffer,
arrayQuadtree,
- quadtreeCoordinates,
+ quadtreeCoordinates
);
const metadataTable = subtree.tileMetadataTable;
expect(metadataTable).toBeDefined();
@@ -2841,13 +2878,13 @@ describe("Scene/ImplicitSubtree", function () {
for (let i = 0; i < buildingCounts.length; i++) {
expect(metadataTable.getProperty(i, "stringProperty")).toBe(
- stringValues[i],
+ stringValues[i]
);
expect(metadataTable.getProperty(i, "arrayProperty")).toEqual(
- arrayValues[i],
+ arrayValues[i]
);
expect(metadataTable.getProperty(i, "arrayOfStringProperty")).toEqual(
- stringArrayValues[i],
+ stringArrayValues[i]
);
}
});
diff --git a/packages/engine/Specs/Scene/ImplicitTileCoordinatesSpec.js b/packages/engine/Specs/Scene/ImplicitTileCoordinatesSpec.js
index 5f941647832a..30d5c1e04f83 100644
--- a/packages/engine/Specs/Scene/ImplicitTileCoordinatesSpec.js
+++ b/packages/engine/Specs/Scene/ImplicitTileCoordinatesSpec.js
@@ -53,7 +53,7 @@ describe("Scene/ImplicitTileCoordinates", function () {
});
expect(coordinates.subdivisionScheme).toEqual(
- ImplicitSubdivisionScheme.QUADTREE,
+ ImplicitSubdivisionScheme.QUADTREE
);
expect(coordinates.level).toEqual(4);
expect(coordinates.x).toEqual(3);
@@ -72,7 +72,7 @@ describe("Scene/ImplicitTileCoordinates", function () {
});
expect(coordinates.subdivisionScheme).toEqual(
- ImplicitSubdivisionScheme.OCTREE,
+ ImplicitSubdivisionScheme.OCTREE
);
expect(coordinates.level).toEqual(4);
expect(coordinates.x).toEqual(3);
@@ -128,7 +128,7 @@ describe("Scene/ImplicitTileCoordinates", function () {
// mismatched subdivisionScheme
expect(function () {
return quadtreeCoordinates(0, 0, 0).getDescendantCoordinates(
- octreeCoordinates(0, 0, 0, 0),
+ octreeCoordinates(0, 0, 0, 0)
);
}).toThrowDeveloperError();
@@ -140,7 +140,7 @@ describe("Scene/ImplicitTileCoordinates", function () {
0,
0,
0,
- subtreeLevelsA,
+ subtreeLevelsA
).getDescendantCoordinates(quadtreeCoordinates(0, 0, 0, subtreeLevelsB));
}).toThrowDeveloperError();
});
@@ -149,19 +149,19 @@ describe("Scene/ImplicitTileCoordinates", function () {
expect(
quadtreeCoordinates(0, 0, 0)
.getDescendantCoordinates(quadtreeCoordinates(0, 0, 0))
- .isEqual(quadtreeCoordinates(0, 0, 0)),
+ .isEqual(quadtreeCoordinates(0, 0, 0))
).toEqual(true);
expect(
quadtreeCoordinates(0, 0, 0)
.getDescendantCoordinates(quadtreeCoordinates(1, 1, 1))
- .isEqual(quadtreeCoordinates(1, 1, 1)),
+ .isEqual(quadtreeCoordinates(1, 1, 1))
).toEqual(true);
expect(
quadtreeCoordinates(1, 1, 1)
.getDescendantCoordinates(quadtreeCoordinates(2, 3, 3))
- .isEqual(quadtreeCoordinates(3, 7, 7)),
+ .isEqual(quadtreeCoordinates(3, 7, 7))
).toEqual(true);
});
@@ -169,19 +169,19 @@ describe("Scene/ImplicitTileCoordinates", function () {
expect(
octreeCoordinates(0, 0, 0, 0)
.getDescendantCoordinates(octreeCoordinates(0, 0, 0, 0))
- .isEqual(octreeCoordinates(0, 0, 0, 0)),
+ .isEqual(octreeCoordinates(0, 0, 0, 0))
).toEqual(true);
expect(
octreeCoordinates(0, 0, 0, 0)
.getDescendantCoordinates(octreeCoordinates(1, 1, 1, 1))
- .isEqual(octreeCoordinates(1, 1, 1, 1)),
+ .isEqual(octreeCoordinates(1, 1, 1, 1))
).toEqual(true);
expect(
octreeCoordinates(1, 1, 1, 1)
.getDescendantCoordinates(octreeCoordinates(2, 3, 3, 3))
- .isEqual(octreeCoordinates(3, 7, 7, 7)),
+ .isEqual(octreeCoordinates(3, 7, 7, 7))
).toEqual(true);
});
@@ -206,31 +206,31 @@ describe("Scene/ImplicitTileCoordinates", function () {
expect(
quadtreeCoordinates(0, 0, 0)
.getAncestorCoordinates(0)
- .isEqual(quadtreeCoordinates(0, 0, 0)),
+ .isEqual(quadtreeCoordinates(0, 0, 0))
).toEqual(true);
expect(
quadtreeCoordinates(1, 0, 0)
.getAncestorCoordinates(1)
- .isEqual(quadtreeCoordinates(0, 0, 0)),
+ .isEqual(quadtreeCoordinates(0, 0, 0))
).toEqual(true);
expect(
quadtreeCoordinates(1, 1, 1)
.getAncestorCoordinates(1)
- .isEqual(quadtreeCoordinates(0, 0, 0)),
+ .isEqual(quadtreeCoordinates(0, 0, 0))
).toEqual(true);
expect(
quadtreeCoordinates(2, 3, 3)
.getAncestorCoordinates(1)
- .isEqual(quadtreeCoordinates(1, 1, 1)),
+ .isEqual(quadtreeCoordinates(1, 1, 1))
).toEqual(true);
expect(
quadtreeCoordinates(2, 3, 3)
.getAncestorCoordinates(2)
- .isEqual(quadtreeCoordinates(0, 0, 0)),
+ .isEqual(quadtreeCoordinates(0, 0, 0))
).toEqual(true);
});
@@ -238,31 +238,31 @@ describe("Scene/ImplicitTileCoordinates", function () {
expect(
octreeCoordinates(0, 0, 0, 0)
.getAncestorCoordinates(0)
- .isEqual(octreeCoordinates(0, 0, 0, 0)),
+ .isEqual(octreeCoordinates(0, 0, 0, 0))
).toEqual(true);
expect(
octreeCoordinates(1, 0, 0, 0)
.getAncestorCoordinates(1)
- .isEqual(octreeCoordinates(0, 0, 0, 0)),
+ .isEqual(octreeCoordinates(0, 0, 0, 0))
).toEqual(true);
expect(
octreeCoordinates(1, 1, 1, 1)
.getAncestorCoordinates(1)
- .isEqual(octreeCoordinates(0, 0, 0, 0)),
+ .isEqual(octreeCoordinates(0, 0, 0, 0))
).toEqual(true);
expect(
octreeCoordinates(2, 3, 3, 3)
.getAncestorCoordinates(1)
- .isEqual(octreeCoordinates(1, 1, 1, 1)),
+ .isEqual(octreeCoordinates(1, 1, 1, 1))
).toEqual(true);
expect(
octreeCoordinates(2, 3, 3, 3)
.getAncestorCoordinates(2)
- .isEqual(octreeCoordinates(0, 0, 0, 0)),
+ .isEqual(octreeCoordinates(0, 0, 0, 0))
).toEqual(true);
});
@@ -275,21 +275,21 @@ describe("Scene/ImplicitTileCoordinates", function () {
// descendant is above ancestor
expect(function () {
return quadtreeCoordinates(1, 0, 0).getOffsetCoordinates(
- quadtreeCoordinates(0, 0, 0),
+ quadtreeCoordinates(0, 0, 0)
);
}).toThrowDeveloperError();
// descendant is not actually a descendant
expect(function () {
return quadtreeCoordinates(1, 0, 0).getOffsetCoordinates(
- quadtreeCoordinates(2, 3, 3),
+ quadtreeCoordinates(2, 3, 3)
);
}).toThrowDeveloperError();
// mismatched subdivisionScheme
expect(function () {
return quadtreeCoordinates(0, 0, 0).getOffsetCoordinates(
- octreeCoordinates(0, 0, 0, 0),
+ octreeCoordinates(0, 0, 0, 0)
);
}).toThrowDeveloperError();
@@ -298,7 +298,7 @@ describe("Scene/ImplicitTileCoordinates", function () {
const subtreeLevelsA = 2;
const subtreeLevelsB = 3;
return quadtreeCoordinates(0, 0, 0, subtreeLevelsA).getOffsetCoordinates(
- quadtreeCoordinates(0, 0, 0, subtreeLevelsB),
+ quadtreeCoordinates(0, 0, 0, subtreeLevelsB)
);
}).toThrowDeveloperError();
});
@@ -307,25 +307,25 @@ describe("Scene/ImplicitTileCoordinates", function () {
expect(
quadtreeCoordinates(0, 0, 0)
.getOffsetCoordinates(quadtreeCoordinates(0, 0, 0))
- .isEqual(quadtreeCoordinates(0, 0, 0)),
+ .isEqual(quadtreeCoordinates(0, 0, 0))
).toEqual(true);
expect(
quadtreeCoordinates(0, 0, 0)
.getOffsetCoordinates(quadtreeCoordinates(1, 1, 1))
- .isEqual(quadtreeCoordinates(1, 1, 1)),
+ .isEqual(quadtreeCoordinates(1, 1, 1))
).toEqual(true);
expect(
quadtreeCoordinates(0, 0, 0)
.getOffsetCoordinates(quadtreeCoordinates(2, 3, 3))
- .isEqual(quadtreeCoordinates(2, 3, 3)),
+ .isEqual(quadtreeCoordinates(2, 3, 3))
).toEqual(true);
expect(
quadtreeCoordinates(1, 1, 1)
.getOffsetCoordinates(quadtreeCoordinates(2, 2, 2))
- .isEqual(quadtreeCoordinates(1, 0, 0)),
+ .isEqual(quadtreeCoordinates(1, 0, 0))
).toEqual(true);
});
@@ -333,25 +333,25 @@ describe("Scene/ImplicitTileCoordinates", function () {
expect(
octreeCoordinates(0, 0, 0, 0)
.getOffsetCoordinates(octreeCoordinates(0, 0, 0, 0))
- .isEqual(octreeCoordinates(0, 0, 0, 0)),
+ .isEqual(octreeCoordinates(0, 0, 0, 0))
).toEqual(true);
expect(
octreeCoordinates(0, 0, 0, 0)
.getOffsetCoordinates(octreeCoordinates(1, 1, 1, 1))
- .isEqual(octreeCoordinates(1, 1, 1, 1)),
+ .isEqual(octreeCoordinates(1, 1, 1, 1))
).toEqual(true);
expect(
octreeCoordinates(0, 0, 0, 0)
.getOffsetCoordinates(octreeCoordinates(2, 3, 3, 3))
- .isEqual(octreeCoordinates(2, 3, 3, 3)),
+ .isEqual(octreeCoordinates(2, 3, 3, 3))
).toEqual(true);
expect(
octreeCoordinates(1, 1, 1, 1)
.getOffsetCoordinates(octreeCoordinates(2, 2, 2, 2))
- .isEqual(octreeCoordinates(1, 0, 0, 0)),
+ .isEqual(octreeCoordinates(1, 0, 0, 0))
).toEqual(true);
});
@@ -372,19 +372,19 @@ describe("Scene/ImplicitTileCoordinates", function () {
const coordinates = quadtreeCoordinates(1, 0, 0);
expect(
- coordinates.getChildCoordinates(0).isEqual(quadtreeCoordinates(2, 0, 0)),
+ coordinates.getChildCoordinates(0).isEqual(quadtreeCoordinates(2, 0, 0))
).toEqual(true);
expect(
- coordinates.getChildCoordinates(1).isEqual(quadtreeCoordinates(2, 1, 0)),
+ coordinates.getChildCoordinates(1).isEqual(quadtreeCoordinates(2, 1, 0))
).toEqual(true);
expect(
- coordinates.getChildCoordinates(2).isEqual(quadtreeCoordinates(2, 0, 1)),
+ coordinates.getChildCoordinates(2).isEqual(quadtreeCoordinates(2, 0, 1))
).toEqual(true);
expect(
- coordinates.getChildCoordinates(3).isEqual(quadtreeCoordinates(2, 1, 1)),
+ coordinates.getChildCoordinates(3).isEqual(quadtreeCoordinates(2, 1, 1))
).toEqual(true);
});
@@ -392,35 +392,35 @@ describe("Scene/ImplicitTileCoordinates", function () {
const coordinates = octreeCoordinates(1, 0, 1, 1);
expect(
- coordinates.getChildCoordinates(0).isEqual(octreeCoordinates(2, 0, 2, 2)),
+ coordinates.getChildCoordinates(0).isEqual(octreeCoordinates(2, 0, 2, 2))
).toEqual(true);
expect(
- coordinates.getChildCoordinates(1).isEqual(octreeCoordinates(2, 1, 2, 2)),
+ coordinates.getChildCoordinates(1).isEqual(octreeCoordinates(2, 1, 2, 2))
).toEqual(true);
expect(
- coordinates.getChildCoordinates(2).isEqual(octreeCoordinates(2, 0, 3, 2)),
+ coordinates.getChildCoordinates(2).isEqual(octreeCoordinates(2, 0, 3, 2))
).toEqual(true);
expect(
- coordinates.getChildCoordinates(3).isEqual(octreeCoordinates(2, 1, 3, 2)),
+ coordinates.getChildCoordinates(3).isEqual(octreeCoordinates(2, 1, 3, 2))
).toEqual(true);
expect(
- coordinates.getChildCoordinates(4).isEqual(octreeCoordinates(2, 0, 2, 3)),
+ coordinates.getChildCoordinates(4).isEqual(octreeCoordinates(2, 0, 2, 3))
).toEqual(true);
expect(
- coordinates.getChildCoordinates(5).isEqual(octreeCoordinates(2, 1, 2, 3)),
+ coordinates.getChildCoordinates(5).isEqual(octreeCoordinates(2, 1, 2, 3))
).toEqual(true);
expect(
- coordinates.getChildCoordinates(6).isEqual(octreeCoordinates(2, 0, 3, 3)),
+ coordinates.getChildCoordinates(6).isEqual(octreeCoordinates(2, 0, 3, 3))
).toEqual(true);
expect(
- coordinates.getChildCoordinates(7).isEqual(octreeCoordinates(2, 1, 3, 3)),
+ coordinates.getChildCoordinates(7).isEqual(octreeCoordinates(2, 1, 3, 3))
).toEqual(true);
});
@@ -428,25 +428,25 @@ describe("Scene/ImplicitTileCoordinates", function () {
expect(
quadtreeCoordinates(0, 0, 0)
.getSubtreeCoordinates()
- .isEqual(quadtreeCoordinates(0, 0, 0)),
+ .isEqual(quadtreeCoordinates(0, 0, 0))
).toEqual(true);
expect(
quadtreeCoordinates(1, 1, 1)
.getSubtreeCoordinates()
- .isEqual(quadtreeCoordinates(0, 0, 0)),
+ .isEqual(quadtreeCoordinates(0, 0, 0))
).toEqual(true);
expect(
quadtreeCoordinates(2, 3, 3)
.getSubtreeCoordinates()
- .isEqual(quadtreeCoordinates(2, 3, 3)),
+ .isEqual(quadtreeCoordinates(2, 3, 3))
).toEqual(true);
expect(
quadtreeCoordinates(3, 7, 7)
.getSubtreeCoordinates()
- .isEqual(quadtreeCoordinates(2, 3, 3)),
+ .isEqual(quadtreeCoordinates(2, 3, 3))
).toEqual(true);
});
@@ -454,25 +454,25 @@ describe("Scene/ImplicitTileCoordinates", function () {
expect(
octreeCoordinates(0, 0, 0, 0)
.getSubtreeCoordinates()
- .isEqual(octreeCoordinates(0, 0, 0, 0)),
+ .isEqual(octreeCoordinates(0, 0, 0, 0))
).toEqual(true);
expect(
octreeCoordinates(1, 1, 1, 1)
.getSubtreeCoordinates()
- .isEqual(octreeCoordinates(0, 0, 0, 0)),
+ .isEqual(octreeCoordinates(0, 0, 0, 0))
).toEqual(true);
expect(
octreeCoordinates(2, 3, 3, 3)
.getSubtreeCoordinates()
- .isEqual(octreeCoordinates(2, 3, 3, 3)),
+ .isEqual(octreeCoordinates(2, 3, 3, 3))
).toEqual(true);
expect(
octreeCoordinates(3, 7, 7, 7)
.getSubtreeCoordinates()
- .isEqual(octreeCoordinates(2, 3, 3, 3)),
+ .isEqual(octreeCoordinates(2, 3, 3, 3))
).toEqual(true);
});
@@ -492,31 +492,31 @@ describe("Scene/ImplicitTileCoordinates", function () {
expect(
quadtreeCoordinates(2, 0, 0)
.getParentSubtreeCoordinates()
- .isEqual(quadtreeCoordinates(0, 0, 0)),
+ .isEqual(quadtreeCoordinates(0, 0, 0))
).toEqual(true);
expect(
quadtreeCoordinates(2, 3, 3)
.getParentSubtreeCoordinates()
- .isEqual(quadtreeCoordinates(0, 0, 0)),
+ .isEqual(quadtreeCoordinates(0, 0, 0))
).toEqual(true);
expect(
quadtreeCoordinates(3, 7, 7)
.getParentSubtreeCoordinates()
- .isEqual(quadtreeCoordinates(0, 0, 0)),
+ .isEqual(quadtreeCoordinates(0, 0, 0))
).toEqual(true);
expect(
quadtreeCoordinates(4, 0, 0)
.getParentSubtreeCoordinates()
- .isEqual(quadtreeCoordinates(2, 0, 0)),
+ .isEqual(quadtreeCoordinates(2, 0, 0))
).toEqual(true);
expect(
quadtreeCoordinates(4, 15, 15)
.getParentSubtreeCoordinates()
- .isEqual(quadtreeCoordinates(2, 3, 3)),
+ .isEqual(quadtreeCoordinates(2, 3, 3))
).toEqual(true);
});
@@ -524,31 +524,31 @@ describe("Scene/ImplicitTileCoordinates", function () {
expect(
octreeCoordinates(2, 0, 0, 0)
.getParentSubtreeCoordinates()
- .isEqual(octreeCoordinates(0, 0, 0, 0)),
+ .isEqual(octreeCoordinates(0, 0, 0, 0))
).toEqual(true);
expect(
octreeCoordinates(2, 3, 3, 3)
.getParentSubtreeCoordinates()
- .isEqual(octreeCoordinates(0, 0, 0, 0)),
+ .isEqual(octreeCoordinates(0, 0, 0, 0))
).toEqual(true);
expect(
octreeCoordinates(3, 7, 7, 7)
.getParentSubtreeCoordinates()
- .isEqual(octreeCoordinates(0, 0, 0, 0)),
+ .isEqual(octreeCoordinates(0, 0, 0, 0))
).toEqual(true);
expect(
octreeCoordinates(4, 0, 0, 0)
.getParentSubtreeCoordinates()
- .isEqual(octreeCoordinates(2, 0, 0, 0)),
+ .isEqual(octreeCoordinates(2, 0, 0, 0))
).toEqual(true);
expect(
octreeCoordinates(4, 15, 15, 15)
.getParentSubtreeCoordinates()
- .isEqual(octreeCoordinates(2, 3, 3, 3)),
+ .isEqual(octreeCoordinates(2, 3, 3, 3))
).toEqual(true);
});
@@ -561,7 +561,7 @@ describe("Scene/ImplicitTileCoordinates", function () {
// mismatched subdivisionScheme
expect(function () {
return quadtreeCoordinates(0, 0, 0).isAncestor(
- octreeCoordinates(0, 0, 0, 0),
+ octreeCoordinates(0, 0, 0, 0)
);
}).toThrowDeveloperError();
@@ -570,7 +570,7 @@ describe("Scene/ImplicitTileCoordinates", function () {
const subtreeLevelsA = 2;
const subtreeLevelsB = 3;
return quadtreeCoordinates(0, 0, 0, subtreeLevelsA).isAncestor(
- quadtreeCoordinates(0, 0, 0, subtreeLevelsB),
+ quadtreeCoordinates(0, 0, 0, subtreeLevelsB)
);
}).toThrowDeveloperError();
});
@@ -578,54 +578,54 @@ describe("Scene/ImplicitTileCoordinates", function () {
it("isAncestor works as expected for quadtree", function () {
// cannot be ancestor of itself
expect(
- quadtreeCoordinates(0, 0, 0).isAncestor(quadtreeCoordinates(0, 0, 0)),
+ quadtreeCoordinates(0, 0, 0).isAncestor(quadtreeCoordinates(0, 0, 0))
).toEqual(false);
// ancestor one level above
expect(
- quadtreeCoordinates(0, 0, 0).isAncestor(quadtreeCoordinates(1, 1, 1)),
+ quadtreeCoordinates(0, 0, 0).isAncestor(quadtreeCoordinates(1, 1, 1))
).toEqual(true);
// cannot be descendant
expect(
- quadtreeCoordinates(1, 1, 1).isAncestor(quadtreeCoordinates(0, 0, 0)),
+ quadtreeCoordinates(1, 1, 1).isAncestor(quadtreeCoordinates(0, 0, 0))
).toEqual(false);
// works with bigger divide
expect(
- quadtreeCoordinates(0, 0, 0).isAncestor(quadtreeCoordinates(3, 7, 7)),
+ quadtreeCoordinates(0, 0, 0).isAncestor(quadtreeCoordinates(3, 7, 7))
).toEqual(true);
// higher up in the tree but not an ancestor
expect(
- quadtreeCoordinates(1, 0, 0).isAncestor(quadtreeCoordinates(2, 3, 3)),
+ quadtreeCoordinates(1, 0, 0).isAncestor(quadtreeCoordinates(2, 3, 3))
).toEqual(false);
});
it("isAncestor works as expected for octree", function () {
// cannot be ancestor of itself
expect(
- octreeCoordinates(0, 0, 0, 0).isAncestor(octreeCoordinates(0, 0, 0, 0)),
+ octreeCoordinates(0, 0, 0, 0).isAncestor(octreeCoordinates(0, 0, 0, 0))
).toEqual(false);
// ancestor one level above
expect(
- octreeCoordinates(0, 0, 0, 0).isAncestor(octreeCoordinates(1, 1, 1, 1)),
+ octreeCoordinates(0, 0, 0, 0).isAncestor(octreeCoordinates(1, 1, 1, 1))
).toEqual(true);
// cannot be descendant
expect(
- octreeCoordinates(1, 1, 1, 1).isAncestor(octreeCoordinates(0, 0, 0, 0)),
+ octreeCoordinates(1, 1, 1, 1).isAncestor(octreeCoordinates(0, 0, 0, 0))
).toEqual(false);
// works with bigger divide
expect(
- octreeCoordinates(0, 0, 0, 0).isAncestor(octreeCoordinates(3, 7, 7, 7)),
+ octreeCoordinates(0, 0, 0, 0).isAncestor(octreeCoordinates(3, 7, 7, 7))
).toEqual(true);
// higher up in the tree but not an ancestor
expect(
- octreeCoordinates(1, 0, 0, 0).isAncestor(octreeCoordinates(2, 3, 3, 3)),
+ octreeCoordinates(1, 0, 0, 0).isAncestor(octreeCoordinates(2, 3, 3, 3))
).toEqual(false);
});
@@ -639,32 +639,32 @@ describe("Scene/ImplicitTileCoordinates", function () {
it("isEqual works as expected for quadtree", function () {
// same
expect(
- octreeCoordinates(0, 0, 0, 0).isEqual(octreeCoordinates(0, 0, 0, 0)),
+ octreeCoordinates(0, 0, 0, 0).isEqual(octreeCoordinates(0, 0, 0, 0))
).toEqual(true);
// different level
expect(
- octreeCoordinates(0, 0, 0, 0).isEqual(octreeCoordinates(1, 0, 0, 0)),
+ octreeCoordinates(0, 0, 0, 0).isEqual(octreeCoordinates(1, 0, 0, 0))
).toEqual(false);
// different X
expect(
- octreeCoordinates(1, 0, 0, 0).isEqual(octreeCoordinates(1, 1, 0, 0)),
+ octreeCoordinates(1, 0, 0, 0).isEqual(octreeCoordinates(1, 1, 0, 0))
).toEqual(false);
// different Y
expect(
- octreeCoordinates(1, 0, 0, 0).isEqual(octreeCoordinates(1, 0, 1, 0)),
+ octreeCoordinates(1, 0, 0, 0).isEqual(octreeCoordinates(1, 0, 1, 0))
).toEqual(false);
// different Z
expect(
- octreeCoordinates(1, 0, 0, 0).isEqual(octreeCoordinates(1, 0, 0, 1)),
+ octreeCoordinates(1, 0, 0, 0).isEqual(octreeCoordinates(1, 0, 0, 1))
).toEqual(false);
// mismatched subdivisionScheme
expect(
- quadtreeCoordinates(0, 0, 0).isEqual(octreeCoordinates(0, 0, 0, 0)),
+ quadtreeCoordinates(0, 0, 0).isEqual(octreeCoordinates(0, 0, 0, 0))
).toEqual(false);
// mismatched subtreeLevels
@@ -672,8 +672,8 @@ describe("Scene/ImplicitTileCoordinates", function () {
const subtreeLevelsB = 3;
expect(
quadtreeCoordinates(0, 0, 0, subtreeLevelsA).isEqual(
- quadtreeCoordinates(0, 0, 0, subtreeLevelsB),
- ),
+ quadtreeCoordinates(0, 0, 0, subtreeLevelsB)
+ )
).toEqual(false);
});
@@ -736,11 +736,11 @@ describe("Scene/ImplicitTileCoordinates", function () {
ImplicitSubdivisionScheme.QUADTREE,
subtreeLevels,
3,
- 42,
+ 42
);
expect(
- coordinates.isEqual(quadtreeCoordinates(3, 0, 7, subtreeLevels)),
+ coordinates.isEqual(quadtreeCoordinates(3, 0, 7, subtreeLevels))
).toEqual(true);
});
@@ -753,11 +753,11 @@ describe("Scene/ImplicitTileCoordinates", function () {
ImplicitSubdivisionScheme.OCTREE,
subtreeLevels,
2,
- 43,
+ 43
);
expect(
- coordinates.isEqual(octreeCoordinates(2, 3, 1, 2, subtreeLevels)),
+ coordinates.isEqual(octreeCoordinates(2, 3, 1, 2, subtreeLevels))
).toEqual(true);
});
@@ -793,11 +793,11 @@ describe("Scene/ImplicitTileCoordinates", function () {
const coordinates = ImplicitTileCoordinates.fromTileIndex(
ImplicitSubdivisionScheme.QUADTREE,
subtreeLevels,
- 63,
+ 63
);
expect(
- coordinates.isEqual(quadtreeCoordinates(3, 0, 7, subtreeLevels)),
+ coordinates.isEqual(quadtreeCoordinates(3, 0, 7, subtreeLevels))
).toEqual(true);
});
@@ -812,18 +812,18 @@ describe("Scene/ImplicitTileCoordinates", function () {
const coordinates = ImplicitTileCoordinates.fromTileIndex(
ImplicitSubdivisionScheme.OCTREE,
subtreeLevels,
- 52,
+ 52
);
expect(
- coordinates.isEqual(octreeCoordinates(2, 3, 1, 2, subtreeLevels)),
+ coordinates.isEqual(octreeCoordinates(2, 3, 1, 2, subtreeLevels))
).toEqual(true);
});
it("getTemplateValues works as expected for quadtree", function () {
const subtreeLevels = 6;
expect(
- quadtreeCoordinates(4, 3, 2, subtreeLevels).getTemplateValues(),
+ quadtreeCoordinates(4, 3, 2, subtreeLevels).getTemplateValues()
).toEqual({
level: 4,
x: 3,
@@ -835,7 +835,7 @@ describe("Scene/ImplicitTileCoordinates", function () {
const subtreeLevels = 6;
expect(
- octreeCoordinates(4, 3, 2, 1, subtreeLevels).getTemplateValues(),
+ octreeCoordinates(4, 3, 2, 1, subtreeLevels).getTemplateValues()
).toEqual({
level: 4,
x: 3,
diff --git a/packages/engine/Specs/Scene/ImplicitTilesetSpec.js b/packages/engine/Specs/Scene/ImplicitTilesetSpec.js
index 45684b9170db..9050f117205d 100644
--- a/packages/engine/Specs/Scene/ImplicitTilesetSpec.js
+++ b/packages/engine/Specs/Scene/ImplicitTilesetSpec.js
@@ -76,16 +76,16 @@ describe("Scene/ImplicitTileset", function () {
const implicitTileset = new ImplicitTileset(
baseResource,
implicitTileJson,
- metadataSchema,
+ metadataSchema
);
expect(implicitTileset.metadataSchema).toBeUndefined();
expect(implicitTileset.subtreeLevels).toEqual(3);
expect(implicitTileset.availableLevels).toEqual(5);
expect(implicitTileset.subdivisionScheme).toEqual(
- ImplicitSubdivisionScheme.QUADTREE,
+ ImplicitSubdivisionScheme.QUADTREE
);
expect(implicitTileset.boundingVolume).toEqual(
- implicitTileJson.boundingVolume,
+ implicitTileJson.boundingVolume
);
expect(implicitTileset.refine).toEqual(implicitTileJson.refine);
expect(implicitTileset.geometricError).toEqual(500);
@@ -98,7 +98,7 @@ describe("Scene/ImplicitTileset", function () {
const implicitTileset = new ImplicitTileset(
baseResource,
implicitTileJson,
- metadataSchema,
+ metadataSchema
);
const deep = true;
const expected = clone(implicitTileJson, deep);
@@ -117,7 +117,7 @@ describe("Scene/ImplicitTileset", function () {
const implicitTileset = new ImplicitTileset(
baseResource,
withExtensions,
- metadataSchema,
+ metadataSchema
);
const expected = clone(withExtensions, deep);
delete expected.content;
@@ -130,7 +130,7 @@ describe("Scene/ImplicitTileset", function () {
const implicitTileset = new ImplicitTileset(
baseResource,
implicitTileJson,
- metadataSchema,
+ metadataSchema
);
expect(implicitTileset.contentHeaders[0]).toEqual(implicitTileJson.content);
});
@@ -142,7 +142,7 @@ describe("Scene/ImplicitTileset", function () {
const implicitTileset = new ImplicitTileset(
baseResource,
noContentJson,
- metadataSchema,
+ metadataSchema
);
expect(implicitTileset.contentUriTemplates).toEqual([]);
});
@@ -165,7 +165,7 @@ describe("Scene/ImplicitTileset", function () {
const implicitTileset = new ImplicitTileset(
baseResource,
tileJson,
- metadataSchema,
+ metadataSchema
);
const implicitTilesetS2 =
implicitTileset.boundingVolume.extensions["3DTILES_bounding_volume_S2"];
@@ -193,16 +193,16 @@ describe("Scene/ImplicitTileset", function () {
const implicitTileset = new ImplicitTileset(
baseResource,
implicitTileLegacyJson,
- metadataSchema,
+ metadataSchema
);
expect(implicitTileset.metadataSchema).toBeUndefined();
expect(implicitTileset.subtreeLevels).toEqual(3);
expect(implicitTileset.availableLevels).toEqual(5);
expect(implicitTileset.subdivisionScheme).toEqual(
- ImplicitSubdivisionScheme.QUADTREE,
+ ImplicitSubdivisionScheme.QUADTREE
);
expect(implicitTileset.boundingVolume).toEqual(
- implicitTileJson.boundingVolume,
+ implicitTileJson.boundingVolume
);
expect(implicitTileset.refine).toEqual(implicitTileJson.refine);
expect(implicitTileset.geometricError).toEqual(500);
@@ -215,7 +215,7 @@ describe("Scene/ImplicitTileset", function () {
const implicitTileset = new ImplicitTileset(
baseResource,
implicitTileLegacyJson,
- metadataSchema,
+ metadataSchema
);
expect(implicitTileset.availableLevels).toEqual(5);
});
@@ -225,7 +225,7 @@ describe("Scene/ImplicitTileset", function () {
const implicitTileset = new ImplicitTileset(
baseResource,
implicitTileLegacyJson,
- metadataSchema,
+ metadataSchema
);
const deep = true;
const expected = clone(implicitTileLegacyJson, deep);
@@ -243,7 +243,7 @@ describe("Scene/ImplicitTileset", function () {
const implicitTileset = new ImplicitTileset(
baseResource,
withExtensions,
- metadataSchema,
+ metadataSchema
);
const expected = clone(withExtensions, deep);
delete expected.content;
@@ -256,10 +256,10 @@ describe("Scene/ImplicitTileset", function () {
const implicitTileset = new ImplicitTileset(
baseResource,
implicitTileLegacyJson,
- metadataSchema,
+ metadataSchema
);
expect(implicitTileset.contentHeaders[0]).toEqual(
- implicitTileJson.content,
+ implicitTileJson.content
);
});
@@ -270,7 +270,7 @@ describe("Scene/ImplicitTileset", function () {
const implicitTileset = new ImplicitTileset(
baseResource,
noContentJson,
- metadataSchema,
+ metadataSchema
);
expect(implicitTileset.contentUriTemplates).toEqual([]);
});
@@ -326,7 +326,7 @@ describe("Scene/ImplicitTileset", function () {
const implicitTileset = new ImplicitTileset(
baseResource,
multipleContentTile,
- metadataSchema,
+ metadataSchema
);
expect(implicitTileset.contentUriTemplates).toEqual([
new Resource({ url: b3dmPattern }),
@@ -351,7 +351,7 @@ describe("Scene/ImplicitTileset", function () {
const implicitTileset = new ImplicitTileset(
baseResource,
withProperties,
- metadataSchema,
+ metadataSchema
);
for (i = 0; i < implicitTileset.contentHeaders.length; i++) {
expect(implicitTileset.contentHeaders[i]).toEqual(contents[i]);
@@ -363,7 +363,7 @@ describe("Scene/ImplicitTileset", function () {
const implicitTileset = new ImplicitTileset(
baseResource,
multipleContentTile,
- metadataSchema,
+ metadataSchema
);
expect(implicitTileset.tileHeader.extensions).not.toBeDefined();
});
@@ -406,7 +406,7 @@ describe("Scene/ImplicitTileset", function () {
const implicitTileset = new ImplicitTileset(
baseResource,
multipleContentLegacyTile,
- metadataSchema,
+ metadataSchema
);
expect(implicitTileset.contentUriTemplates).toEqual([
new Resource({ url: b3dmPattern }),
@@ -432,7 +432,7 @@ describe("Scene/ImplicitTileset", function () {
const implicitTileset = new ImplicitTileset(
baseResource,
withProperties,
- metadataSchema,
+ metadataSchema
);
for (i = 0; i < implicitTileset.contentHeaders.length; i++) {
expect(implicitTileset.contentHeaders[i]).toEqual(contents[i]);
@@ -460,7 +460,7 @@ describe("Scene/ImplicitTileset", function () {
const implicitTileset = new ImplicitTileset(
baseResource,
implicitTileJson,
- metadataSchema,
+ metadataSchema
);
expect(implicitTileset.metadataSchema).toBeDefined();
diff --git a/packages/engine/Specs/Scene/InstanceAttributeSemanticSpec.js b/packages/engine/Specs/Scene/InstanceAttributeSemanticSpec.js
index 1311f00be47f..51b70891d303 100644
--- a/packages/engine/Specs/Scene/InstanceAttributeSemanticSpec.js
+++ b/packages/engine/Specs/Scene/InstanceAttributeSemanticSpec.js
@@ -24,8 +24,8 @@ describe("Scene/InstanceAttributeSemantic", function () {
expect(
InstanceAttributeSemantic.fromGltfSemantic(
gltfSemantics[i],
- expectedSemantics[i],
- ),
+ expectedSemantics[i]
+ )
).toBe(expectedSemantics[i]);
}
});
diff --git a/packages/engine/Specs/Scene/IonImageryProviderSpec.js b/packages/engine/Specs/Scene/IonImageryProviderSpec.js
index 4b8a589ac020..abde504d9040 100644
--- a/packages/engine/Specs/Scene/IonImageryProviderSpec.js
+++ b/packages/engine/Specs/Scene/IonImageryProviderSpec.js
@@ -30,21 +30,21 @@ describe("Scene/IonImageryProvider", function () {
const options = {};
const endpointResource = IonResource._createEndpointResource(
assetId,
- options,
+ options
);
spyOn(IonResource, "_createEndpointResource").and.returnValue(
- endpointResource,
+ endpointResource
);
spyOn(endpointResource, "fetchJson").and.returnValue(
- Promise.resolve(endpointData),
+ Promise.resolve(endpointData)
);
const provider = await IonImageryProvider.fromAssetId(assetId, options);
expect(IonResource._createEndpointResource).toHaveBeenCalledWith(
assetId,
- options,
+ options
);
return provider;
}
@@ -60,7 +60,7 @@ describe("Scene/IonImageryProvider", function () {
it("fromAssetId throws without assetId", async function () {
await expectAsync(
- IonImageryProvider.fromAssetId(),
+ IonImageryProvider.fromAssetId()
).toBeRejectedWithDeveloperError();
});
@@ -71,10 +71,10 @@ describe("Scene/IonImageryProvider", function () {
url: "http://test.invalid/layer",
accessToken: "not_really_a_refresh_token",
attributions: [],
- }),
+ })
).toBeRejectedWithError(
RuntimeError,
- "Cesium ion asset 12335 is not an imagery asset.",
+ "Cesium ion asset 12335 is not an imagery asset."
);
});
@@ -85,10 +85,10 @@ describe("Scene/IonImageryProvider", function () {
externalType: "TUBELCANE",
options: { url: "http://test.invalid/layer" },
attributions: [],
- }),
+ })
).toBeRejectedWithError(
RuntimeError,
- "Unrecognized Cesium ion imagery type: TUBELCANE",
+ "Unrecognized Cesium ion imagery type: TUBELCANE"
);
});
@@ -97,7 +97,7 @@ describe("Scene/IonImageryProvider", function () {
expect(provider).toBeInstanceOf(IonImageryProvider);
expect(provider.errorEvent).toBeDefined();
expect(provider._imageryProvider).toBeInstanceOf(
- UrlTemplateImageryProvider,
+ UrlTemplateImageryProvider
);
});
@@ -116,13 +116,13 @@ describe("Scene/IonImageryProvider", function () {
};
const endpointResource = IonResource._createEndpointResource(
assetId,
- options,
+ options
);
spyOn(IonResource, "_createEndpointResource").and.returnValue(
- endpointResource,
+ endpointResource
);
spyOn(endpointResource, "fetchJson").and.returnValue(
- Promise.resolve(endpointData),
+ Promise.resolve(endpointData)
);
expect(endpointResource.fetchJson.calls.count()).toBe(0);
@@ -155,19 +155,19 @@ describe("Scene/IonImageryProvider", function () {
const image = new Image();
const request = {};
spyOn(internalProvider, "requestImage").and.returnValue(
- Promise.resolve(image),
+ Promise.resolve(image)
);
let result = await provider.requestImage(1, 2, 3, request);
expect(internalProvider.requestImage).toHaveBeenCalledWith(
1,
2,
3,
- request,
+ request
);
expect(result).toBe(image);
const info = {};
spyOn(internalProvider, "pickFeatures").and.returnValue(
- Promise.resolve(info),
+ Promise.resolve(info)
);
result = await provider.pickFeatures(1, 2, 3, 4, 5);
expect(internalProvider.pickFeatures).toHaveBeenCalledWith(1, 2, 3, 4, 5);
@@ -209,25 +209,23 @@ describe("Scene/IonImageryProvider", function () {
}
it("createImageryProvider works with ARCGIS_MAPSERVER", function () {
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- deferred.resolve(
- JSON.stringify({ imageUrl: "", imageUrlSubdomains: [], zoomMax: 0 }),
- );
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ deferred.resolve(
+ JSON.stringify({ imageUrl: "", imageUrlSubdomains: [], zoomMax: 0 })
+ );
+ });
return testExternalImagery(
"ARCGIS_MAPSERVER",
{ url: "http://test.invalid" },
- ArcGisMapServerImageryProvider,
+ ArcGisMapServerImageryProvider
);
});
@@ -241,34 +239,32 @@ describe("Scene/IonImageryProvider", function () {
},
],
});
- },
+ }
);
return testExternalImagery(
"BING",
{ url: "http://test.invalid", key: "" },
- BingMapsImageryProvider,
+ BingMapsImageryProvider
);
});
it("createImageryProvider works with GOOGLE_EARTH", function () {
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- deferred.resolve(JSON.stringify({ layers: [{ id: 0, version: "" }] }));
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ deferred.resolve(JSON.stringify({ layers: [{ id: 0, version: "" }] }));
+ });
return testExternalImagery(
"GOOGLE_EARTH",
{ url: "http://test.invalid", channel: 0 },
- GoogleEarthEnterpriseMapsProvider,
+ GoogleEarthEnterpriseMapsProvider
);
});
@@ -276,24 +272,26 @@ describe("Scene/IonImageryProvider", function () {
return testExternalImagery(
"MAPBOX",
{ accessToken: "test-token", url: "http://test.invalid", mapId: 1 },
- MapboxImageryProvider,
+ MapboxImageryProvider
);
});
it("createImageryProvider works with SINGLE_TILE", function () {
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- deferred.resolve({
- height: 16,
- width: 16,
- });
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ deferred.resolve({
+ height: 16,
+ width: 16,
+ });
+ });
return testExternalImagery(
"SINGLE_TILE",
{ url: "http://test.invalid" },
- SingleTileImageryProvider,
+ SingleTileImageryProvider
);
});
@@ -301,7 +299,7 @@ describe("Scene/IonImageryProvider", function () {
return testExternalImagery(
"TMS",
{ url: "http://test.invalid" },
- UrlTemplateImageryProvider,
+ UrlTemplateImageryProvider
);
});
@@ -309,7 +307,7 @@ describe("Scene/IonImageryProvider", function () {
return testExternalImagery(
"URL_TEMPLATE",
{ url: "http://test.invalid" },
- UrlTemplateImageryProvider,
+ UrlTemplateImageryProvider
);
});
@@ -317,7 +315,7 @@ describe("Scene/IonImageryProvider", function () {
return testExternalImagery(
"WMS",
{ url: "http://test.invalid", layers: [] },
- WebMapServiceImageryProvider,
+ WebMapServiceImageryProvider
);
});
@@ -325,7 +323,7 @@ describe("Scene/IonImageryProvider", function () {
return testExternalImagery(
"WMTS",
{ url: "http://test.invalid", layer: "", style: "", tileMatrixSetID: 1 },
- WebMapTileServiceImageryProvider,
+ WebMapTileServiceImageryProvider
);
});
});
diff --git a/packages/engine/Specs/Scene/KeyframeNodeSpec.js b/packages/engine/Specs/Scene/KeyframeNodeSpec.js
index ef8c86607285..9b6d39b99647 100644
--- a/packages/engine/Specs/Scene/KeyframeNodeSpec.js
+++ b/packages/engine/Specs/Scene/KeyframeNodeSpec.js
@@ -25,7 +25,7 @@ describe("Scene/KeyframeNode", function () {
keyframeNode2.priority = 2;
const comparison = KeyframeNode.priorityComparator(
keyframeNode1,
- keyframeNode2,
+ keyframeNode2
);
expect(comparison).toBe(-1);
});
@@ -37,7 +37,7 @@ describe("Scene/KeyframeNode", function () {
const keyframeNode2 = new KeyframeNode(dummySpatialNode, keyframe2);
const comparison = KeyframeNode.searchComparator(
keyframeNode1,
- keyframeNode2,
+ keyframeNode2
);
expect(comparison).toBe(6);
});
diff --git a/packages/engine/Specs/Scene/LabelCollectionSpec.js b/packages/engine/Specs/Scene/LabelCollectionSpec.js
index 3f163690e81e..352e8fcfd822 100644
--- a/packages/engine/Specs/Scene/LabelCollectionSpec.js
+++ b/packages/engine/Specs/Scene/LabelCollectionSpec.js
@@ -70,7 +70,7 @@ describe(
expect(label.outlineWidth).toEqual(1);
expect(label.showBackground).toEqual(false);
expect(label.backgroundColor).toEqual(
- new Color(0.165, 0.165, 0.165, 0.8),
+ new Color(0.165, 0.165, 0.165, 0.8)
);
expect(label.backgroundPadding).toEqual(new Cartesian2(7, 5));
expect(label.style).toEqual(LabelStyle.FILL);
@@ -121,7 +121,7 @@ describe(
const scaleByDistance = new NearFarScalar(1.0e4, 1.0, 1.0e6, 0.0);
const distanceDisplayCondition = new DistanceDisplayCondition(
10.0,
- 100.0,
+ 100.0
);
const disableDepthTestDistance = 10.0;
const label = labels.add({
@@ -312,8 +312,9 @@ describe(
// render until all labels have been updated
return pollToPromise(function () {
scene.renderForSpecs();
- const backgroundBillboard =
- labels._backgroundBillboardCollection.get(0);
+ const backgroundBillboard = labels._backgroundBillboardCollection.get(
+ 0
+ );
return (
(!defined(backgroundBillboard) || backgroundBillboard.ready) &&
labels._labelsToUpdate.length === 0
@@ -1108,7 +1109,7 @@ describe(
scene.renderForSpecs();
expect(label.computeScreenSpacePosition(scene)).toEqualEpsilon(
new Cartesian2(0.5, 0.5),
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
});
@@ -1124,7 +1125,7 @@ describe(
expect(actual).toEqual(result);
expect(result).toEqualEpsilon(
new Cartesian2(0.5, 0.5),
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
});
@@ -1138,7 +1139,7 @@ describe(
scene.renderForSpecs();
expect(label.computeScreenSpacePosition(scene)).toEqualEpsilon(
new Cartesian2(1.0, 1.0),
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
});
@@ -1152,7 +1153,7 @@ describe(
scene.renderForSpecs();
expect(label.computeScreenSpacePosition(scene)).toEqualEpsilon(
new Cartesian2(0.5, 0.5),
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
});
@@ -1166,7 +1167,7 @@ describe(
return allLabelsReady().then(function () {
const bbox = Label.getScreenSpaceBoundingBox(
label,
- Cartesian2.ZERO,
+ Cartesian2.ZERO
);
expect(bbox.x).toBeDefined();
expect(bbox.y).toBeDefined();
@@ -1189,7 +1190,7 @@ describe(
const bbox = Label.getScreenSpaceBoundingBox(
label,
Cartesian2.ZERO,
- result,
+ result
);
expect(bbox.x).toBeDefined();
expect(bbox.y).toBeDefined();
@@ -1213,7 +1214,7 @@ describe(
return allLabelsReady().then(function () {
const bbox = Label.getScreenSpaceBoundingBox(
label,
- Cartesian2.ZERO,
+ Cartesian2.ZERO
);
expect(bbox.y).toBeGreaterThan(bbox.height * -0.9);
expect(bbox.y).toBeLessThan(bbox.height * -0.3);
@@ -1232,7 +1233,7 @@ describe(
return allLabelsReady().then(function () {
const bbox = Label.getScreenSpaceBoundingBox(
label,
- Cartesian2.ZERO,
+ Cartesian2.ZERO
);
expect(bbox.y).toBeLessThan(5);
expect(bbox.y).toBeGreaterThan(-5);
@@ -1251,7 +1252,7 @@ describe(
return allLabelsReady().then(function () {
const bbox = Label.getScreenSpaceBoundingBox(
label,
- Cartesian2.ZERO,
+ Cartesian2.ZERO
);
expect(bbox.y).toBeLessThan(bbox.height * -0.8);
expect(bbox.y).toBeGreaterThan(bbox.height * -1.2);
@@ -1387,14 +1388,14 @@ describe(
function getGlyphBillboardVertexTranslate(label, index) {
return Cartesian2.clone(
label._glyphs[index].billboard._translate,
- new Cartesian2(),
+ new Cartesian2()
);
}
function getBackgroundBillboardVertexTranslate(label) {
return Cartesian2.clone(
label._backgroundBillboard._translate,
- new Cartesian2(),
+ new Cartesian2()
);
}
@@ -1459,10 +1460,10 @@ describe(
expect(billboard.scale).toEqual(label.scale * label._relativeSize);
expect(billboard.id).toEqual(label.id);
expect(billboard.translucencyByDistance).toEqual(
- label.translucencyByDistance,
+ label.translucencyByDistance
);
expect(billboard.pixelOffsetScaleByDistance).toEqual(
- label.pixelOffsetScaleByDistance,
+ label.pixelOffsetScaleByDistance
);
expect(billboard.scaleByDistance).toEqual(label.scaleByDistance);
@@ -1486,7 +1487,7 @@ describe(
1.0e4,
1.0,
1.0e6,
- 0.0,
+ 0.0
),
scaleByDistance: new NearFarScalar(1.0e4, 1.0, 1.0e6, 0.0),
showBackground: true,
@@ -1596,7 +1597,7 @@ describe(
getGlyphBillboards().forEach(function (billboard) {
expect(billboard.translucencyByDistance).toEqual(
- label.translucencyByDistance,
+ label.translucencyByDistance
);
});
});
@@ -1609,7 +1610,7 @@ describe(
getGlyphBillboards().forEach(function (billboard) {
expect(billboard.pixelOffsetScaleByDistance).toEqual(
- label.pixelOffsetScaleByDistance,
+ label.pixelOffsetScaleByDistance
);
});
});
@@ -1633,7 +1634,7 @@ describe(
getGlyphBillboards().forEach(function (billboard) {
expect(billboard.translucencyByDistance).toEqual(
- label.translucencyByDistance,
+ label.translucencyByDistance
);
});
});
@@ -1646,7 +1647,7 @@ describe(
getGlyphBillboards().forEach(function (billboard) {
expect(billboard.pixelOffsetScaleByDistance).toEqual(
- label.pixelOffsetScaleByDistance,
+ label.pixelOffsetScaleByDistance
);
});
});
@@ -1689,13 +1690,13 @@ describe(
// X offset should be unchanged
expect(getGlyphBillboardVertexTranslate(label, 0).x).toEqual(
- offset0.x,
+ offset0.x
);
expect(getGlyphBillboardVertexTranslate(label, 1).x).toEqual(
- offset1.x,
+ offset1.x
);
expect(getGlyphBillboardVertexTranslate(label, 2).x).toEqual(
- offset2.x,
+ offset2.x
);
label.verticalOrigin = VerticalOrigin.BOTTOM;
@@ -1703,13 +1704,13 @@ describe(
// X offset should be unchanged
expect(getGlyphBillboardVertexTranslate(label, 0).x).toEqual(
- offset0.x,
+ offset0.x
);
expect(getGlyphBillboardVertexTranslate(label, 1).x).toEqual(
- offset1.x,
+ offset1.x
);
expect(getGlyphBillboardVertexTranslate(label, 2).x).toEqual(
- offset2.x,
+ offset2.x
);
});
});
@@ -1733,30 +1734,30 @@ describe(
// horizontal origin LEFT should increase X offset compared to CENTER
expect(
- getGlyphBillboardVertexTranslate(label, 0).x,
+ getGlyphBillboardVertexTranslate(label, 0).x
).toBeGreaterThan(offset0.x);
expect(
- getGlyphBillboardVertexTranslate(label, 1).x,
+ getGlyphBillboardVertexTranslate(label, 1).x
).toBeGreaterThan(offset1.x);
expect(
- getGlyphBillboardVertexTranslate(label, 2).x,
+ getGlyphBillboardVertexTranslate(label, 2).x
).toBeGreaterThan(offset2.x);
expect(
- getBackgroundBillboardVertexTranslate(label).x,
+ getBackgroundBillboardVertexTranslate(label).x
).toBeGreaterThan(offsetBack.x);
// Y offset should be unchanged
expect(getGlyphBillboardVertexTranslate(label, 0).y).toEqual(
- offset0.y,
+ offset0.y
);
expect(getGlyphBillboardVertexTranslate(label, 1).y).toEqual(
- offset1.y,
+ offset1.y
);
expect(getGlyphBillboardVertexTranslate(label, 2).y).toEqual(
- offset2.y,
+ offset2.y
);
expect(getBackgroundBillboardVertexTranslate(label).y).toEqual(
- offsetBack.y,
+ offsetBack.y
);
label.horizontalOrigin = HorizontalOrigin.RIGHT;
@@ -1764,30 +1765,30 @@ describe(
// horizontal origin RIGHT should decrease X offset compared to CENTER
expect(getGlyphBillboardVertexTranslate(label, 0).x).toBeLessThan(
- offset0.x,
+ offset0.x
);
expect(getGlyphBillboardVertexTranslate(label, 1).x).toBeLessThan(
- offset1.x,
+ offset1.x
);
expect(getGlyphBillboardVertexTranslate(label, 2).x).toBeLessThan(
- offset2.x,
+ offset2.x
);
expect(getBackgroundBillboardVertexTranslate(label).x).toBeLessThan(
- offsetBack.x,
+ offsetBack.x
);
// Y offset should be unchanged
expect(getGlyphBillboardVertexTranslate(label, 0).y).toEqual(
- offset0.y,
+ offset0.y
);
expect(getGlyphBillboardVertexTranslate(label, 1).y).toEqual(
- offset1.y,
+ offset1.y
);
expect(getGlyphBillboardVertexTranslate(label, 2).y).toEqual(
- offset2.y,
+ offset2.y
);
expect(getBackgroundBillboardVertexTranslate(label).y).toEqual(
- offsetBack.y,
+ offsetBack.y
);
});
});
@@ -1810,22 +1811,22 @@ describe(
// scaling by 2 should double X and Y offset
expect(getGlyphBillboardVertexTranslate(label, 0).x).toEqual(
- 2 * offset0.x,
+ 2 * offset0.x
);
expect(getGlyphBillboardVertexTranslate(label, 0).y).toEqual(
- 2 * offset0.y,
+ 2 * offset0.y
);
expect(getGlyphBillboardVertexTranslate(label, 1).x).toEqual(
- 2 * offset1.x,
+ 2 * offset1.x
);
expect(getGlyphBillboardVertexTranslate(label, 1).y).toEqual(
- 2 * offset1.y,
+ 2 * offset1.y
);
expect(getGlyphBillboardVertexTranslate(label, 2).x).toEqual(
- 2 * offset2.x,
+ 2 * offset2.x
);
expect(getGlyphBillboardVertexTranslate(label, 2).y).toEqual(
- 2 * offset2.y,
+ 2 * offset2.y
);
// store the offsets when vertically centered at scale 2
@@ -1841,24 +1842,24 @@ describe(
// horizontal origin LEFT should increase X offset compared to CENTER
expect(
- getGlyphBillboardVertexTranslate(label, 0).x,
+ getGlyphBillboardVertexTranslate(label, 0).x
).toBeGreaterThan(offset0.x);
expect(
- getGlyphBillboardVertexTranslate(label, 1).x,
+ getGlyphBillboardVertexTranslate(label, 1).x
).toBeGreaterThan(offset1.x);
expect(
- getGlyphBillboardVertexTranslate(label, 2).x,
+ getGlyphBillboardVertexTranslate(label, 2).x
).toBeGreaterThan(offset2.x);
// Y offset should be unchanged
expect(getGlyphBillboardVertexTranslate(label, 0).y).toEqual(
- offset0.y,
+ offset0.y
);
expect(getGlyphBillboardVertexTranslate(label, 1).y).toEqual(
- offset1.y,
+ offset1.y
);
expect(getGlyphBillboardVertexTranslate(label, 2).y).toEqual(
- offset2.y,
+ offset2.y
);
label.horizontalOrigin = HorizontalOrigin.RIGHT;
@@ -1866,24 +1867,24 @@ describe(
// horizontal origin RIGHT should decrease X offset compared to CENTER
expect(getGlyphBillboardVertexTranslate(label, 0).x).toBeLessThan(
- offset0.x,
+ offset0.x
);
expect(getGlyphBillboardVertexTranslate(label, 1).x).toBeLessThan(
- offset1.x,
+ offset1.x
);
expect(getGlyphBillboardVertexTranslate(label, 2).x).toBeLessThan(
- offset2.x,
+ offset2.x
);
// Y offset should be unchanged
expect(getGlyphBillboardVertexTranslate(label, 0).y).toEqual(
- offset0.y,
+ offset0.y
);
expect(getGlyphBillboardVertexTranslate(label, 1).y).toEqual(
- offset1.y,
+ offset1.y
);
expect(getGlyphBillboardVertexTranslate(label, 2).y).toEqual(
- offset2.y,
+ offset2.y
);
});
});
@@ -1955,22 +1956,22 @@ describe(
// reducing font size should reduce absolute value of both X and Y offset
expect(
- Math.abs(getGlyphBillboardVertexTranslate(label, 0).x),
+ Math.abs(getGlyphBillboardVertexTranslate(label, 0).x)
).toBeLessThanOrEqual(Math.abs(offset0.x));
expect(
- Math.abs(getGlyphBillboardVertexTranslate(label, 0).y),
+ Math.abs(getGlyphBillboardVertexTranslate(label, 0).y)
).toBeLessThanOrEqual(Math.abs(offset0.y));
expect(
- Math.abs(getGlyphBillboardVertexTranslate(label, 1).x),
+ Math.abs(getGlyphBillboardVertexTranslate(label, 1).x)
).toBeLessThanOrEqual(Math.abs(offset1.x));
expect(
- Math.abs(getGlyphBillboardVertexTranslate(label, 1).y),
+ Math.abs(getGlyphBillboardVertexTranslate(label, 1).y)
).toBeLessThanOrEqual(Math.abs(offset1.y));
expect(
- Math.abs(getGlyphBillboardVertexTranslate(label, 2).x),
+ Math.abs(getGlyphBillboardVertexTranslate(label, 2).x)
).toBeLessThanOrEqual(Math.abs(offset2.x));
expect(
- Math.abs(getGlyphBillboardVertexTranslate(label, 2).y),
+ Math.abs(getGlyphBillboardVertexTranslate(label, 2).y)
).toBeLessThanOrEqual(Math.abs(offset2.y));
});
});
@@ -2000,13 +2001,13 @@ describe(
return allLabelsReady().then(function () {
expect(getGlyphBillboardVertexTranslate(one, 0)).toEqual(
- getGlyphBillboardVertexTranslate(two, 0),
+ getGlyphBillboardVertexTranslate(two, 0)
);
expect(getGlyphBillboardVertexTranslate(one, 1)).toEqual(
- getGlyphBillboardVertexTranslate(two, 1),
+ getGlyphBillboardVertexTranslate(two, 1)
);
expect(getGlyphBillboardVertexTranslate(one, 2)).toEqual(
- getGlyphBillboardVertexTranslate(two, 2),
+ getGlyphBillboardVertexTranslate(two, 2)
);
});
});
@@ -2089,14 +2090,14 @@ describe(
return allLabelsReady().then(function () {
const originalBbox = Label.getScreenSpaceBoundingBox(
label,
- Cartesian2.ZERO,
+ Cartesian2.ZERO
);
label.text = "apl\napl\napl";
scene.renderForSpecs();
const newlinesBbox = Label.getScreenSpaceBoundingBox(
label,
- Cartesian2.ZERO,
+ Cartesian2.ZERO
);
expect(newlinesBbox.width).toBeLessThan(originalBbox.width);
@@ -2126,7 +2127,7 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
describe("right to left detection", function () {
@@ -2322,15 +2323,14 @@ describe(
expected.center = new Cartesian3(
0.0,
expected.center.x,
- expected.center.y,
+ expected.center.y
);
expect(actual.center).toEqualEpsilon(
expected.center,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(actual.radius).toBeGreaterThanOrEqual(expected.radius);
- scene.screenSpaceCameraController.enableCollisionDetection =
- originalEnableCollisionDetection;
+ scene.screenSpaceCameraController.enableCollisionDetection = originalEnableCollisionDetection;
});
});
@@ -2363,11 +2363,11 @@ describe(
expected.center = new Cartesian3(
0.0,
expected.center.x,
- expected.center.y,
+ expected.center.y
);
expect(actual.center).toEqualEpsilon(
expected.center,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(actual.radius).toBeGreaterThan(expected.radius);
});
@@ -2599,7 +2599,7 @@ describe(
expect(scene.updateHeight).toHaveBeenCalledWith(
Cartographic.fromCartesian(position),
jasmine.any(Function),
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
});
@@ -2615,7 +2615,7 @@ describe(
expect(scene.updateHeight).toHaveBeenCalledWith(
Cartographic.fromCartesian(position),
jasmine.any(Function),
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
});
@@ -2631,7 +2631,7 @@ describe(
expect(scene.updateHeight).toHaveBeenCalledWith(
Cartographic.fromCartesian(position),
jasmine.any(Function),
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
l.heightReference = HeightReference.RELATIVE_TO_GROUND;
@@ -2639,7 +2639,7 @@ describe(
expect(scene.updateHeight).toHaveBeenCalledWith(
Cartographic.fromCartesian(position),
jasmine.any(Function),
- HeightReference.RELATIVE_TO_GROUND,
+ HeightReference.RELATIVE_TO_GROUND
);
});
@@ -2671,7 +2671,7 @@ describe(
expect(scene.updateHeight).toHaveBeenCalledWith(
Cartographic.fromCartesian(position),
jasmine.any(Function),
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
position = l.position = Cartesian3.fromDegrees(-73.0, 40.0);
@@ -2680,7 +2680,7 @@ describe(
expect(scene.updateHeight).toHaveBeenCalledWith(
Cartographic.fromCartesian(position),
jasmine.any(Function),
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
});
@@ -2692,7 +2692,7 @@ describe(
cartographic.height = height;
updateCallback(cartographic);
};
- },
+ }
);
const position = Cartesian3.fromDegrees(-72.0, 40.0);
@@ -2703,14 +2703,14 @@ describe(
expect(scene.updateHeight).toHaveBeenCalled();
let cartographic = scene.globe.ellipsoid.cartesianToCartographic(
- l._clampedPosition,
+ l._clampedPosition
);
expect(cartographic.height).toEqual(0.0);
invokeCallback(100.0);
cartographic = scene.globe.ellipsoid.cartesianToCartographic(
- l._clampedPosition,
+ l._clampedPosition
);
expect(cartographic.height).toEqualEpsilon(100.0, CesiumMath.EPSILON9);
});
@@ -2746,11 +2746,11 @@ describe(
labelsWithHeight.remove(l);
expect(spy).toHaveBeenCalled();
expect(
- labelsWithHeight._spareBillboards[0]._removeCallbackFunc,
+ labelsWithHeight._spareBillboards[0]._removeCallbackFunc
).toBeUndefined();
});
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/MapboxImageryProviderSpec.js b/packages/engine/Specs/Scene/MapboxImageryProviderSpec.js
index cba4f0aebf7f..201da71b3e65 100644
--- a/packages/engine/Specs/Scene/MapboxImageryProviderSpec.js
+++ b/packages/engine/Specs/Scene/MapboxImageryProviderSpec.js
@@ -51,18 +51,20 @@ describe("Scene/MapboxImageryProvider", function () {
mapId: "test-id",
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).not.toContain("//");
-
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).not.toContain("//");
+
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -77,18 +79,20 @@ describe("Scene/MapboxImageryProvider", function () {
mapId: "test-id",
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toContain("made/up/mapbox/server/");
-
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toContain("made/up/mapbox/server/");
+
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -104,7 +108,7 @@ describe("Scene/MapboxImageryProvider", function () {
});
expect(provider.url).toEqual(
- "made/up/mapbox/server/test-id/{z}/{x}/{y}.png?access_token=test-token",
+ "made/up/mapbox/server/test-id/{z}/{x}/{y}.png?access_token=test-token"
);
expect(provider.tileWidth).toEqual(256);
expect(provider.tileHeight).toEqual(256);
@@ -112,16 +116,18 @@ describe("Scene/MapboxImageryProvider", function () {
expect(provider.tilingScheme).toBeInstanceOf(WebMercatorTilingScheme);
expect(provider.rectangle).toEqual(new WebMercatorTilingScheme().rectangle);
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -145,18 +151,20 @@ describe("Scene/MapboxImageryProvider", function () {
expect(provider.rectangle).toEqualEpsilon(rectangle, CesiumMath.EPSILON14);
expect(provider.tileDiscardPolicy).toBeUndefined();
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toContain("/0/0/0");
-
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toContain("/0/0/0");
+
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -228,14 +236,14 @@ describe("Scene/MapboxImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
if (tries === 2) {
// Succeed after 2 tries
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
} else {
// fail
@@ -267,22 +275,24 @@ describe("Scene/MapboxImageryProvider", function () {
format: "@2x.png",
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(
- /made\/up\/mapbox\/server\/test-id\/0\/0\/0@2x\.png\?access_token=/.test(
- request.url,
- ),
- ).toBe(true);
-
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(
+ /made\/up\/mapbox\/server\/test-id\/0\/0\/0@2x\.png\?access_token=/.test(
+ request.url
+ )
+ ).toBe(true);
+
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -297,22 +307,24 @@ describe("Scene/MapboxImageryProvider", function () {
format: "png",
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(
- /made\/up\/mapbox\/server\/test-id\/0\/0\/0\.png\?access_token=/.test(
- request.url,
- ),
- ).toBe(true);
-
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(
+ /made\/up\/mapbox\/server\/test-id\/0\/0\/0\.png\?access_token=/.test(
+ request.url
+ )
+ ).toBe(true);
+
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
diff --git a/packages/engine/Specs/Scene/MapboxStyleImageryProviderSpec.js b/packages/engine/Specs/Scene/MapboxStyleImageryProviderSpec.js
index 2bd1728922d8..a44d3c25c3e2 100644
--- a/packages/engine/Specs/Scene/MapboxStyleImageryProviderSpec.js
+++ b/packages/engine/Specs/Scene/MapboxStyleImageryProviderSpec.js
@@ -51,18 +51,20 @@ describe("Scene/MapboxStyleImageryProvider", function () {
styleId: "test-id",
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).not.toContain("//");
-
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).not.toContain("//");
+
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -77,18 +79,20 @@ describe("Scene/MapboxStyleImageryProvider", function () {
styleId: "test-id",
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toContain("made/up/mapbox/server/");
-
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toContain("made/up/mapbox/server/");
+
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -104,7 +108,7 @@ describe("Scene/MapboxStyleImageryProvider", function () {
});
expect(provider.url).toEqual(
- "made/up/mapbox/server/mapbox/test-id/tiles/512/{z}/{x}/{y}?access_token=test-token",
+ "made/up/mapbox/server/mapbox/test-id/tiles/512/{z}/{x}/{y}?access_token=test-token"
);
expect(provider.tileWidth).toEqual(256);
expect(provider.tileHeight).toEqual(256);
@@ -112,16 +116,18 @@ describe("Scene/MapboxStyleImageryProvider", function () {
expect(provider.tilingScheme).toBeInstanceOf(WebMercatorTilingScheme);
expect(provider.rectangle).toEqual(new WebMercatorTilingScheme().rectangle);
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -145,18 +151,20 @@ describe("Scene/MapboxStyleImageryProvider", function () {
expect(provider.rectangle).toEqualEpsilon(rectangle, CesiumMath.EPSILON14);
expect(provider.tileDiscardPolicy).toBeUndefined();
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toContain("/0/0/0");
-
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toContain("/0/0/0");
+
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -228,14 +236,14 @@ describe("Scene/MapboxStyleImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
if (tries === 2) {
// Succeed after 2 tries
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
} else {
// fail
@@ -266,18 +274,20 @@ describe("Scene/MapboxStyleImageryProvider", function () {
styleId: "test-id",
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toContain("http://fake.map.com");
-
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toContain("http://fake.map.com");
+
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0);
});
@@ -289,20 +299,22 @@ describe("Scene/MapboxStyleImageryProvider", function () {
username: "fakeUsername",
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toContain(
- "https://api.mapbox.com/styles/v1/fakeUsername",
- );
-
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toContain(
+ "https://api.mapbox.com/styles/v1/fakeUsername"
+ );
+
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0);
});
@@ -314,20 +326,22 @@ describe("Scene/MapboxStyleImageryProvider", function () {
tilesize: 256,
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toContain(
- "https://api.mapbox.com/styles/v1/mapbox/test-id/tiles/256",
- );
-
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toContain(
+ "https://api.mapbox.com/styles/v1/mapbox/test-id/tiles/256"
+ );
+
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0);
});
@@ -339,20 +353,22 @@ describe("Scene/MapboxStyleImageryProvider", function () {
scaleFactor: true,
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toContain(
- "https://api.mapbox.com/styles/v1/mapbox/test-id/tiles/512/0/0/0@2x",
- );
-
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toContain(
+ "https://api.mapbox.com/styles/v1/mapbox/test-id/tiles/512/0/0/0@2x"
+ );
+
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0);
});
diff --git a/packages/engine/Specs/Scene/MaterialAppearanceSpec.js b/packages/engine/Specs/Scene/MaterialAppearanceSpec.js
index bad1a970b4c4..014322fe88d0 100644
--- a/packages/engine/Specs/Scene/MaterialAppearanceSpec.js
+++ b/packages/engine/Specs/Scene/MaterialAppearanceSpec.js
@@ -40,7 +40,7 @@ describe(
function createPrimitive(vertexFormat) {
vertexFormat = defaultValue(
vertexFormat,
- MaterialAppearance.MaterialSupport.ALL.vertexFormat,
+ MaterialAppearance.MaterialSupport.ALL.vertexFormat
);
primitive = new Primitive({
geometryInstances: new GeometryInstance({
@@ -60,21 +60,21 @@ describe(
const a = new MaterialAppearance();
expect(a.materialSupport).toEqual(
- MaterialAppearance.MaterialSupport.TEXTURED,
+ MaterialAppearance.MaterialSupport.TEXTURED
);
expect(a.material).toBeDefined();
expect(a.material.type).toEqual(Material.ColorType);
expect(a.vertexShaderSource).toEqual(
- MaterialAppearance.MaterialSupport.TEXTURED.vertexShaderSource,
+ MaterialAppearance.MaterialSupport.TEXTURED.vertexShaderSource
);
expect(a.fragmentShaderSource).toEqual(
- MaterialAppearance.MaterialSupport.TEXTURED.fragmentShaderSource,
+ MaterialAppearance.MaterialSupport.TEXTURED.fragmentShaderSource
);
expect(a.renderState).toEqual(
- Appearance.getDefaultRenderState(true, false),
+ Appearance.getDefaultRenderState(true, false)
);
expect(a.vertexFormat).toEqual(
- MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat,
+ MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat
);
expect(a.flat).toEqual(false);
expect(a.faceForward).toEqual(true);
@@ -129,5 +129,5 @@ describe(
expect(scene).notToRender(backgroundColor);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/MaterialSpec.js b/packages/engine/Specs/Scene/MaterialSpec.js
index 9b940ef30994..53b0148ca38a 100644
--- a/packages/engine/Specs/Scene/MaterialSpec.js
+++ b/packages/engine/Specs/Scene/MaterialSpec.js
@@ -38,7 +38,7 @@ describe(
backgroundColor[1],
backgroundColor[2],
backgroundColor[3],
- scene.backgroundColor,
+ scene.backgroundColor
);
scene.primitives.destroyPrimitives = false;
scene.camera.setView({ destination: rectangle });
@@ -71,7 +71,7 @@ describe(
polyline = polylines.add({
positions: Cartesian3.fromDegreesArray(
[-50.0, 0.0, 50.0, 0.0],
- Ellipsoid.WGS84,
+ Ellipsoid.WGS84
),
width: 5.0,
});
@@ -494,8 +494,22 @@ describe(
fabric: {
uniforms: {
value: [
- 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5,
- 0.5, 0.5, 0.5,
+ 0.5,
+ 0.5,
+ 0.5,
+ 0.5,
+ 0.5,
+ 0.5,
+ 0.5,
+ 0.5,
+ 0.5,
+ 0.5,
+ 0.5,
+ 0.5,
+ 0.5,
+ 0.5,
+ 0.5,
+ 0.5,
],
},
components: {
@@ -1049,5 +1063,5 @@ describe(
material.destroy();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/MegatextureSpec.js b/packages/engine/Specs/Scene/MegatextureSpec.js
index 1e191000f158..9074e86898cf 100644
--- a/packages/engine/Specs/Scene/MegatextureSpec.js
+++ b/packages/engine/Specs/Scene/MegatextureSpec.js
@@ -22,7 +22,7 @@ describe("Scene/Megatexture", function () {
dimensions,
channelCount,
componentType,
- textureMemoryByteLength / 2,
+ textureMemoryByteLength / 2
);
}).toThrowError(RuntimeError);
@@ -31,7 +31,7 @@ describe("Scene/Megatexture", function () {
dimensions,
channelCount,
componentType,
- textureMemoryByteLength,
+ textureMemoryByteLength
);
expect(megatexture.channelCount).toBe(channelCount);
expect(megatexture.componentType).toBe(componentType);
@@ -52,7 +52,7 @@ describe("Scene/Megatexture", function () {
scene.context,
dimensions,
channelCount,
- componentType,
+ componentType
);
const data = new Uint16Array(tileSize);
@@ -78,7 +78,7 @@ describe("Scene/Megatexture", function () {
dimensions,
channelCount,
componentType,
- textureMemoryByteLength,
+ textureMemoryByteLength
);
const data = new Float32Array(tileSize);
@@ -108,7 +108,7 @@ describe("Scene/Megatexture", function () {
dimensions,
channelCount,
componentType,
- textureMemoryByteLength,
+ textureMemoryByteLength
);
expect(megatexture.occupiedCount).toBe(0);
@@ -160,8 +160,8 @@ describe("Scene/Megatexture", function () {
tileCount,
dimensions,
channelCount,
- componentType,
- ),
+ componentType
+ )
).toBe(textureMemoryByteLength);
});
@@ -182,7 +182,7 @@ describe("Scene/Megatexture", function () {
dimensions,
channelCount,
componentType,
- textureMemoryByteLength,
+ textureMemoryByteLength
);
expect(megatexture.maximumTileCount).toBe(4);
diff --git a/packages/engine/Specs/Scene/MetadataClassPropertySpec.js b/packages/engine/Specs/Scene/MetadataClassPropertySpec.js
index 4f2f2ca37129..7e79fb403d0d 100644
--- a/packages/engine/Specs/Scene/MetadataClassPropertySpec.js
+++ b/packages/engine/Specs/Scene/MetadataClassPropertySpec.js
@@ -460,7 +460,15 @@ describe("Scene/MetadataClassProperty", function () {
const isNested = false;
expect(property.expandConstant(1, isNested)).toEqual([
- 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
]);
property = MetadataClassProperty.fromJson({
@@ -474,7 +482,24 @@ describe("Scene/MetadataClassProperty", function () {
});
expect(property.expandConstant(1, isNested)).toEqual([
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
]);
});
@@ -829,7 +854,7 @@ describe("Scene/MetadataClassProperty", function () {
const value = scalarValues[propertyId][i];
const normalizedValue = property.normalize(value);
expect(normalizedValue).toEqual(
- normalizedScalarValues[propertyId][i],
+ normalizedScalarValues[propertyId][i]
);
}
}
@@ -869,7 +894,7 @@ describe("Scene/MetadataClassProperty", function () {
const value = arrayValues[propertyId][i];
const normalizedValue = property.normalize(clone(value, true));
expect(normalizedValue).toEqual(
- normalizedArrayValues[propertyId][i],
+ normalizedArrayValues[propertyId][i]
);
}
}
@@ -905,7 +930,7 @@ describe("Scene/MetadataClassProperty", function () {
const value = vectorValues[propertyId][i];
const normalizedValue = property.normalize(clone(value, true));
expect(normalizedValue).toEqual(
- normalizedVectorValues[propertyId][i],
+ normalizedVectorValues[propertyId][i]
);
}
}
@@ -941,7 +966,7 @@ describe("Scene/MetadataClassProperty", function () {
const value = arrayOfVectorValues[propertyId][i];
const normalizedValue = property.normalize(clone(value, true));
expect(normalizedValue).toEqual(
- normalizedArrayOfVectorValues[propertyId][i],
+ normalizedArrayOfVectorValues[propertyId][i]
);
}
}
@@ -1413,7 +1438,7 @@ describe("Scene/MetadataClassProperty", function () {
const value = scalarValues[propertyId][i];
const transformedValue = property.applyValueTransform(value);
expect(transformedValue).toEqual(
- transformedScalarValues[propertyId][i],
+ transformedScalarValues[propertyId][i]
);
}
}
@@ -1458,7 +1483,7 @@ describe("Scene/MetadataClassProperty", function () {
it("value transformations are no-ops for identity transformations", function () {
const valueTransformInPlace = spyOn(
MetadataClassProperty,
- "valueTransformInPlace",
+ "valueTransformInPlace"
);
const property = MetadataClassProperty.fromJson({
id: "identityTransform",
@@ -1484,10 +1509,10 @@ describe("Scene/MetadataClassProperty", function () {
for (let i = 0; i < length; ++i) {
const value = arrayValues[propertyId][i];
const transformedValue = property.applyValueTransform(
- clone(value, true),
+ clone(value, true)
);
expect(transformedValue).toEqual(
- transformedArrayValues[propertyId][i],
+ transformedArrayValues[propertyId][i]
);
}
}
@@ -1505,7 +1530,7 @@ describe("Scene/MetadataClassProperty", function () {
for (let i = 0; i < length; ++i) {
const transformedValue = transformedArrayValues[propertyId][i];
const value = property.unapplyValueTransform(
- clone(transformedValue, true),
+ clone(transformedValue, true)
);
expect(value).toEqual(arrayValues[propertyId][i]);
}
@@ -1516,7 +1541,7 @@ describe("Scene/MetadataClassProperty", function () {
it("value transforms do not transform variable length arrays", function () {
const valueTransformInPlace = spyOn(
MetadataClassProperty,
- "valueTransformInPlace",
+ "valueTransformInPlace"
);
const property = MetadataClassProperty.fromJson({
@@ -1534,7 +1559,7 @@ describe("Scene/MetadataClassProperty", function () {
const values = [-1.0, 0.0, 5.0, 4.0];
expect(property.applyValueTransform(clone(values, true))).toEqual(values);
expect(property.unapplyValueTransform(clone(values, true))).toEqual(
- values,
+ values
);
expect(valueTransformInPlace).not.toHaveBeenCalled();
@@ -1551,10 +1576,10 @@ describe("Scene/MetadataClassProperty", function () {
for (let i = 0; i < length; ++i) {
const value = vectorValues[propertyId][i];
const transformedValue = property.applyValueTransform(
- clone(value, true),
+ clone(value, true)
);
expect(transformedValue).toEqual(
- transformedVectorValues[propertyId][i],
+ transformedVectorValues[propertyId][i]
);
}
}
@@ -1572,7 +1597,7 @@ describe("Scene/MetadataClassProperty", function () {
for (let i = 0; i < length; ++i) {
const transformedValue = transformedVectorValues[propertyId][i];
const value = property.unapplyValueTransform(
- clone(transformedValue, true),
+ clone(transformedValue, true)
);
expect(value).toEqual(vectorValues[propertyId][i]);
}
@@ -1591,10 +1616,10 @@ describe("Scene/MetadataClassProperty", function () {
for (let i = 0; i < length; ++i) {
const value = arrayOfVectorValues[propertyId][i];
const transformedValue = property.applyValueTransform(
- clone(value, true),
+ clone(value, true)
);
expect(transformedValue).toEqual(
- transformedArrayOfVectorValues[propertyId][i],
+ transformedArrayOfVectorValues[propertyId][i]
);
}
}
@@ -1613,7 +1638,7 @@ describe("Scene/MetadataClassProperty", function () {
const transformedValue =
transformedArrayOfVectorValues[propertyId][i];
const value = property.unapplyValueTransform(
- clone(transformedValue, true),
+ clone(transformedValue, true)
);
expect(value).toEqual(arrayOfVectorValues[propertyId][i]);
}
@@ -2597,7 +2622,7 @@ describe("Scene/MetadataClassProperty", function () {
new Cartesian3(1.0, 2.0, 3.0),
new Cartesian3(4.0, 5.0, 6.0),
new Cartesian3(7.0, 8.0, 9.0),
- ]),
+ ])
).toBeUndefined();
});
@@ -2617,7 +2642,7 @@ describe("Scene/MetadataClassProperty", function () {
new Matrix3(1, 0, 0, 0, 1, 0, 0, 0, 1),
new Matrix3(2, 0, 0, 0, 2, 0, 0, 0, 2),
new Matrix3(3, 0, 0, 0, 3, 0, 0, 0, 3),
- ]),
+ ])
).toBeUndefined();
});
@@ -2632,7 +2657,7 @@ describe("Scene/MetadataClassProperty", function () {
});
expect(property.validate(undefined)).toBe(
- "required property must have a value",
+ "required property must have a value"
);
});
@@ -2674,7 +2699,7 @@ describe("Scene/MetadataClassProperty", function () {
});
expect(property.validate(8.0)).toBe(
- "componentType STRING is incompatible with vector type VEC2",
+ "componentType STRING is incompatible with vector type VEC2"
);
});
@@ -2688,7 +2713,7 @@ describe("Scene/MetadataClassProperty", function () {
});
expect(property.validate(8.0)).toBe(
- "componentType INT64 is incompatible with matrix type MAT3",
+ "componentType INT64 is incompatible with matrix type MAT3"
);
});
@@ -2768,7 +2793,7 @@ describe("Scene/MetadataClassProperty", function () {
});
expect(property.validate([1.0, 2.0])).toBe(
- "Array length does not match property.arrayLength",
+ "Array length does not match property.arrayLength"
);
});
@@ -2805,10 +2830,10 @@ describe("Scene/MetadataClassProperty", function () {
});
expect(property.validate("INVALID")).toBe(
- "value INVALID is not a valid enum name for myEnum",
+ "value INVALID is not a valid enum name for myEnum"
);
expect(property.validate(0)).toBe(
- "value 0 is not a valid enum name for myEnum",
+ "value 0 is not a valid enum name for myEnum"
);
});
@@ -2835,7 +2860,7 @@ describe("Scene/MetadataClassProperty", function () {
},
});
expect(property.validate({})).toBe(
- `value [object Object] does not match type ${types[i]}`,
+ `value [object Object] does not match type ${types[i]}`
);
}
});
@@ -2848,7 +2873,7 @@ describe("Scene/MetadataClassProperty", function () {
},
});
expect(property.validate({})).toBe(
- `value [object Object] does not match type BOOLEAN`,
+ `value [object Object] does not match type BOOLEAN`
);
});
@@ -2860,7 +2885,7 @@ describe("Scene/MetadataClassProperty", function () {
},
});
expect(property.validate({})).toBe(
- `value [object Object] does not match type STRING`,
+ `value [object Object] does not match type STRING`
);
});
@@ -2899,7 +2924,7 @@ describe("Scene/MetadataClassProperty", function () {
});
for (let i = 0; i < values.length; ++i) {
expect(property.validate(values[i])).toBe(
- `value ${values[i]} is out of range for type ${type}`,
+ `value ${values[i]} is out of range for type ${type}`
);
}
}
@@ -2940,7 +2965,7 @@ describe("Scene/MetadataClassProperty", function () {
});
for (let i = 0; i < nonFiniteValues.length; ++i) {
expect(property.validate(nonFiniteValues[i])).toBe(
- `value ${nonFiniteValues[i]} of type ${type} must be finite`,
+ `value ${nonFiniteValues[i]} of type ${type} must be finite`
);
}
}
@@ -2982,7 +3007,7 @@ describe("Scene/MetadataClassProperty", function () {
});
for (let i = 0; i < values.length; ++i) {
expect(property.validate(values)).toBe(
- `value ${values[0]} is out of range for type ${componentType}`,
+ `value ${values[0]} is out of range for type ${componentType}`
);
}
}
@@ -3009,16 +3034,16 @@ describe("Scene/MetadataClassProperty", function () {
});
expect(propertyInt8.validate(-1.1)).toBe(
- "value -1.1 is out of range for type INT8 (normalized)",
+ "value -1.1 is out of range for type INT8 (normalized)"
);
expect(propertyInt8.validate(1.1)).toBe(
- "value 1.1 is out of range for type INT8 (normalized)",
+ "value 1.1 is out of range for type INT8 (normalized)"
);
expect(propertyUint8.validate(-0.1)).toBe(
- "value -0.1 is out of range for type UINT8 (normalized)",
+ "value -0.1 is out of range for type UINT8 (normalized)"
);
expect(propertyUint8.validate(1.1)).toBe(
- "value 1.1 is out of range for type UINT8 (normalized)",
+ "value 1.1 is out of range for type UINT8 (normalized)"
);
});
@@ -3031,7 +3056,7 @@ describe("Scene/MetadataClassProperty", function () {
value,
offset,
scale,
- MetadataComponentType.applyValueTransform,
+ MetadataComponentType.applyValueTransform
);
expect(result).toBe(3);
@@ -3045,7 +3070,7 @@ describe("Scene/MetadataClassProperty", function () {
value,
offset,
scale,
- MetadataComponentType.applyValueTransform,
+ MetadataComponentType.applyValueTransform
);
expect(result).toEqual([3, 4, 5]);
});
@@ -3070,7 +3095,7 @@ describe("Scene/MetadataClassProperty", function () {
values,
offset,
scale,
- MetadataComponentType.applyValueTransform,
+ MetadataComponentType.applyValueTransform
);
expect(result).toEqual([
[3, 4, 5],
diff --git a/packages/engine/Specs/Scene/MetadataComponentTypeSpec.js b/packages/engine/Specs/Scene/MetadataComponentTypeSpec.js
index 025792cccabb..3bb720dff7e1 100644
--- a/packages/engine/Specs/Scene/MetadataComponentTypeSpec.js
+++ b/packages/engine/Specs/Scene/MetadataComponentTypeSpec.js
@@ -7,40 +7,40 @@ import {
describe("Scene/MetadataComponentType", function () {
it("getMinimum", function () {
expect(MetadataComponentType.getMinimum(MetadataComponentType.INT8)).toBe(
- -128,
+ -128
);
expect(MetadataComponentType.getMinimum(MetadataComponentType.UINT8)).toBe(
- 0,
+ 0
);
expect(MetadataComponentType.getMinimum(MetadataComponentType.INT16)).toBe(
- -32768,
+ -32768
);
expect(MetadataComponentType.getMinimum(MetadataComponentType.UINT16)).toBe(
- 0,
+ 0
);
expect(MetadataComponentType.getMinimum(MetadataComponentType.INT32)).toBe(
- -2147483648,
+ -2147483648
);
expect(MetadataComponentType.getMinimum(MetadataComponentType.UINT32)).toBe(
- 0,
+ 0
);
expect(
- MetadataComponentType.getMinimum(MetadataComponentType.FLOAT32),
+ MetadataComponentType.getMinimum(MetadataComponentType.FLOAT32)
).toBe(-340282346638528859811704183484516925440.0);
expect(
- MetadataComponentType.getMinimum(MetadataComponentType.FLOAT64),
+ MetadataComponentType.getMinimum(MetadataComponentType.FLOAT64)
).toBe(-Number.MAX_VALUE);
if (FeatureDetection.supportsBigInt()) {
expect(
- MetadataComponentType.getMinimum(MetadataComponentType.INT64),
+ MetadataComponentType.getMinimum(MetadataComponentType.INT64)
).toBe(
- BigInt("-9223372036854775808"), // eslint-disable-line
+ BigInt("-9223372036854775808") // eslint-disable-line
);
expect(
- MetadataComponentType.getMinimum(MetadataComponentType.UINT64),
+ MetadataComponentType.getMinimum(MetadataComponentType.UINT64)
).toBe(
- BigInt(0), // eslint-disable-line
+ BigInt(0) // eslint-disable-line
);
}
});
@@ -48,14 +48,14 @@ describe("Scene/MetadataComponentType", function () {
it("getMinimum returns approximate number for INT64 when BigInt is not supported", function () {
spyOn(FeatureDetection, "supportsBigInt").and.returnValue(false);
expect(MetadataComponentType.getMinimum(MetadataComponentType.INT64)).toBe(
- -Math.pow(2, 63),
+ -Math.pow(2, 63)
);
});
it("getMinimum returns number for UINT64 when BigInt is not supported", function () {
spyOn(FeatureDetection, "supportsBigInt").and.returnValue(false);
expect(MetadataComponentType.getMinimum(MetadataComponentType.UINT64)).toBe(
- 0,
+ 0
);
});
@@ -73,40 +73,40 @@ describe("Scene/MetadataComponentType", function () {
it("getMaximum", function () {
expect(MetadataComponentType.getMaximum(MetadataComponentType.INT8)).toBe(
- 127,
+ 127
);
expect(MetadataComponentType.getMaximum(MetadataComponentType.UINT8)).toBe(
- 255,
+ 255
);
expect(MetadataComponentType.getMaximum(MetadataComponentType.INT16)).toBe(
- 32767,
+ 32767
);
expect(MetadataComponentType.getMaximum(MetadataComponentType.UINT16)).toBe(
- 65535,
+ 65535
);
expect(MetadataComponentType.getMaximum(MetadataComponentType.INT32)).toBe(
- 2147483647,
+ 2147483647
);
expect(MetadataComponentType.getMaximum(MetadataComponentType.UINT32)).toBe(
- 4294967295,
+ 4294967295
);
expect(
- MetadataComponentType.getMaximum(MetadataComponentType.FLOAT32),
+ MetadataComponentType.getMaximum(MetadataComponentType.FLOAT32)
).toBe(340282346638528859811704183484516925440.0);
expect(
- MetadataComponentType.getMaximum(MetadataComponentType.FLOAT64),
+ MetadataComponentType.getMaximum(MetadataComponentType.FLOAT64)
).toBe(Number.MAX_VALUE);
if (FeatureDetection.supportsBigInt()) {
expect(
- MetadataComponentType.getMaximum(MetadataComponentType.INT64),
+ MetadataComponentType.getMaximum(MetadataComponentType.INT64)
).toBe(
- BigInt("9223372036854775807"), // eslint-disable-line
+ BigInt("9223372036854775807") // eslint-disable-line
);
expect(
- MetadataComponentType.getMaximum(MetadataComponentType.UINT64),
+ MetadataComponentType.getMaximum(MetadataComponentType.UINT64)
).toBe(
- BigInt("18446744073709551615"), // eslint-disable-line
+ BigInt("18446744073709551615") // eslint-disable-line
);
}
});
@@ -114,14 +114,14 @@ describe("Scene/MetadataComponentType", function () {
it("getMaximum returns approximate number for INT64 when BigInt is not supported", function () {
spyOn(FeatureDetection, "supportsBigInt").and.returnValue(false);
expect(MetadataComponentType.getMaximum(MetadataComponentType.INT64)).toBe(
- Math.pow(2, 63) - 1,
+ Math.pow(2, 63) - 1
);
});
it("getMaximum returns approximate number for UINT64 when BigInt is not supported", function () {
spyOn(FeatureDetection, "supportsBigInt").and.returnValue(false);
expect(MetadataComponentType.getMaximum(MetadataComponentType.UINT64)).toBe(
- Math.pow(2, 64) - 1,
+ Math.pow(2, 64) - 1
);
});
@@ -139,34 +139,34 @@ describe("Scene/MetadataComponentType", function () {
it("isIntegerType", function () {
expect(
- MetadataComponentType.isIntegerType(MetadataComponentType.INT8),
+ MetadataComponentType.isIntegerType(MetadataComponentType.INT8)
).toBe(true);
expect(
- MetadataComponentType.isIntegerType(MetadataComponentType.UINT8),
+ MetadataComponentType.isIntegerType(MetadataComponentType.UINT8)
).toBe(true);
expect(
- MetadataComponentType.isIntegerType(MetadataComponentType.INT16),
+ MetadataComponentType.isIntegerType(MetadataComponentType.INT16)
).toBe(true);
expect(
- MetadataComponentType.isIntegerType(MetadataComponentType.UINT16),
+ MetadataComponentType.isIntegerType(MetadataComponentType.UINT16)
).toBe(true);
expect(
- MetadataComponentType.isIntegerType(MetadataComponentType.INT32),
+ MetadataComponentType.isIntegerType(MetadataComponentType.INT32)
).toBe(true);
expect(
- MetadataComponentType.isIntegerType(MetadataComponentType.UINT32),
+ MetadataComponentType.isIntegerType(MetadataComponentType.UINT32)
).toBe(true);
expect(
- MetadataComponentType.isIntegerType(MetadataComponentType.INT64),
+ MetadataComponentType.isIntegerType(MetadataComponentType.INT64)
).toBe(true);
expect(
- MetadataComponentType.isIntegerType(MetadataComponentType.UINT64),
+ MetadataComponentType.isIntegerType(MetadataComponentType.UINT64)
).toBe(true);
expect(
- MetadataComponentType.isIntegerType(MetadataComponentType.FLOAT32),
+ MetadataComponentType.isIntegerType(MetadataComponentType.FLOAT32)
).toBe(false);
expect(
- MetadataComponentType.isIntegerType(MetadataComponentType.FLOAT64),
+ MetadataComponentType.isIntegerType(MetadataComponentType.FLOAT64)
).toBe(false);
});
@@ -178,38 +178,34 @@ describe("Scene/MetadataComponentType", function () {
it("isUnsignedIntegerType", function () {
expect(
- MetadataComponentType.isUnsignedIntegerType(MetadataComponentType.INT8),
+ MetadataComponentType.isUnsignedIntegerType(MetadataComponentType.INT8)
).toBe(false);
expect(
- MetadataComponentType.isUnsignedIntegerType(MetadataComponentType.UINT8),
+ MetadataComponentType.isUnsignedIntegerType(MetadataComponentType.UINT8)
).toBe(true);
expect(
- MetadataComponentType.isUnsignedIntegerType(MetadataComponentType.INT16),
+ MetadataComponentType.isUnsignedIntegerType(MetadataComponentType.INT16)
).toBe(false);
expect(
- MetadataComponentType.isUnsignedIntegerType(MetadataComponentType.UINT16),
+ MetadataComponentType.isUnsignedIntegerType(MetadataComponentType.UINT16)
).toBe(true);
expect(
- MetadataComponentType.isUnsignedIntegerType(MetadataComponentType.INT32),
+ MetadataComponentType.isUnsignedIntegerType(MetadataComponentType.INT32)
).toBe(false);
expect(
- MetadataComponentType.isUnsignedIntegerType(MetadataComponentType.UINT32),
+ MetadataComponentType.isUnsignedIntegerType(MetadataComponentType.UINT32)
).toBe(true);
expect(
- MetadataComponentType.isUnsignedIntegerType(MetadataComponentType.INT64),
+ MetadataComponentType.isUnsignedIntegerType(MetadataComponentType.INT64)
).toBe(false);
expect(
- MetadataComponentType.isUnsignedIntegerType(MetadataComponentType.UINT64),
+ MetadataComponentType.isUnsignedIntegerType(MetadataComponentType.UINT64)
).toBe(true);
expect(
- MetadataComponentType.isUnsignedIntegerType(
- MetadataComponentType.FLOAT32,
- ),
+ MetadataComponentType.isUnsignedIntegerType(MetadataComponentType.FLOAT32)
).toBe(false);
expect(
- MetadataComponentType.isUnsignedIntegerType(
- MetadataComponentType.FLOAT64,
- ),
+ MetadataComponentType.isUnsignedIntegerType(MetadataComponentType.FLOAT64)
).toBe(false);
});
@@ -275,7 +271,7 @@ describe("Scene/MetadataComponentType", function () {
for (let j = 0; j < values.length; ++j) {
const result = MetadataComponentType.normalize(
values[j],
- MetadataComponentType.INT64,
+ MetadataComponentType.INT64
);
expect(result).toBe(expectedResults[j]);
}
@@ -293,7 +289,7 @@ describe("Scene/MetadataComponentType", function () {
for (let j = 0; j < values.length; ++j) {
const result = MetadataComponentType.normalize(
values[j],
- MetadataComponentType.UINT64,
+ MetadataComponentType.UINT64
);
expect(result).toBe(expectedResults[j]);
}
@@ -385,7 +381,7 @@ describe("Scene/MetadataComponentType", function () {
for (let i = 0; i < values.length; ++i) {
const result = MetadataComponentType.unnormalize(
values[i],
- MetadataComponentType.INT64,
+ MetadataComponentType.INT64
);
expect(result).toBe(expectedResults[i]);
}
@@ -410,7 +406,7 @@ describe("Scene/MetadataComponentType", function () {
for (let i = 0; i < values.length; ++i) {
const result = MetadataComponentType.unnormalize(
values[i],
- MetadataComponentType.UINT64,
+ MetadataComponentType.UINT64
);
expect(result).toBe(expectedResults[i]);
}
@@ -418,16 +414,16 @@ describe("Scene/MetadataComponentType", function () {
it("unnormalize clamps values outside the range", function () {
expect(
- MetadataComponentType.unnormalize(-1.1, MetadataComponentType.INT8),
+ MetadataComponentType.unnormalize(-1.1, MetadataComponentType.INT8)
).toBe(-127);
expect(
- MetadataComponentType.unnormalize(-0.1, MetadataComponentType.UINT8),
+ MetadataComponentType.unnormalize(-0.1, MetadataComponentType.UINT8)
).toBe(0);
expect(
- MetadataComponentType.unnormalize(1.1, MetadataComponentType.INT8),
+ MetadataComponentType.unnormalize(1.1, MetadataComponentType.INT8)
).toBe(127);
expect(
- MetadataComponentType.unnormalize(1.1, MetadataComponentType.UINT8),
+ MetadataComponentType.unnormalize(1.1, MetadataComponentType.UINT8)
).toBe(255);
});
@@ -451,34 +447,34 @@ describe("Scene/MetadataComponentType", function () {
it("getSizeInBytes", function () {
expect(
- MetadataComponentType.getSizeInBytes(MetadataComponentType.INT8),
+ MetadataComponentType.getSizeInBytes(MetadataComponentType.INT8)
).toBe(1);
expect(
- MetadataComponentType.getSizeInBytes(MetadataComponentType.UINT8),
+ MetadataComponentType.getSizeInBytes(MetadataComponentType.UINT8)
).toBe(1);
expect(
- MetadataComponentType.getSizeInBytes(MetadataComponentType.INT16),
+ MetadataComponentType.getSizeInBytes(MetadataComponentType.INT16)
).toBe(2);
expect(
- MetadataComponentType.getSizeInBytes(MetadataComponentType.UINT16),
+ MetadataComponentType.getSizeInBytes(MetadataComponentType.UINT16)
).toBe(2);
expect(
- MetadataComponentType.getSizeInBytes(MetadataComponentType.INT32),
+ MetadataComponentType.getSizeInBytes(MetadataComponentType.INT32)
).toBe(4);
expect(
- MetadataComponentType.getSizeInBytes(MetadataComponentType.UINT32),
+ MetadataComponentType.getSizeInBytes(MetadataComponentType.UINT32)
).toBe(4);
expect(
- MetadataComponentType.getSizeInBytes(MetadataComponentType.INT64),
+ MetadataComponentType.getSizeInBytes(MetadataComponentType.INT64)
).toBe(8);
expect(
- MetadataComponentType.getSizeInBytes(MetadataComponentType.UINT64),
+ MetadataComponentType.getSizeInBytes(MetadataComponentType.UINT64)
).toBe(8);
expect(
- MetadataComponentType.getSizeInBytes(MetadataComponentType.FLOAT32),
+ MetadataComponentType.getSizeInBytes(MetadataComponentType.FLOAT32)
).toBe(4);
expect(
- MetadataComponentType.getSizeInBytes(MetadataComponentType.FLOAT64),
+ MetadataComponentType.getSizeInBytes(MetadataComponentType.FLOAT64)
).toBe(8);
});
@@ -496,34 +492,34 @@ describe("Scene/MetadataComponentType", function () {
it("fromComponentDatatype", function () {
expect(
- MetadataComponentType.fromComponentDatatype(ComponentDatatype.BYTE),
+ MetadataComponentType.fromComponentDatatype(ComponentDatatype.BYTE)
).toBe(MetadataComponentType.INT8);
expect(
MetadataComponentType.fromComponentDatatype(
- ComponentDatatype.UNSIGNED_BYTE,
- ),
+ ComponentDatatype.UNSIGNED_BYTE
+ )
).toBe(MetadataComponentType.UINT8);
expect(
- MetadataComponentType.fromComponentDatatype(ComponentDatatype.SHORT),
+ MetadataComponentType.fromComponentDatatype(ComponentDatatype.SHORT)
).toBe(MetadataComponentType.INT16);
expect(
MetadataComponentType.fromComponentDatatype(
- ComponentDatatype.UNSIGNED_SHORT,
- ),
+ ComponentDatatype.UNSIGNED_SHORT
+ )
).toBe(MetadataComponentType.UINT16);
expect(
- MetadataComponentType.fromComponentDatatype(ComponentDatatype.INT),
+ MetadataComponentType.fromComponentDatatype(ComponentDatatype.INT)
).toBe(MetadataComponentType.INT32);
expect(
MetadataComponentType.fromComponentDatatype(
- ComponentDatatype.UNSIGNED_INT,
- ),
+ ComponentDatatype.UNSIGNED_INT
+ )
).toBe(MetadataComponentType.UINT32);
expect(
- MetadataComponentType.fromComponentDatatype(ComponentDatatype.FLOAT),
+ MetadataComponentType.fromComponentDatatype(ComponentDatatype.FLOAT)
).toBe(MetadataComponentType.FLOAT32);
expect(
- MetadataComponentType.fromComponentDatatype(ComponentDatatype.DOUBLE),
+ MetadataComponentType.fromComponentDatatype(ComponentDatatype.DOUBLE)
).toBe(MetadataComponentType.FLOAT64);
});
@@ -535,40 +531,40 @@ describe("Scene/MetadataComponentType", function () {
it("toComponentDatatype", function () {
expect(
- MetadataComponentType.toComponentDatatype(MetadataComponentType.INT8),
+ MetadataComponentType.toComponentDatatype(MetadataComponentType.INT8)
).toBe(ComponentDatatype.BYTE);
expect(
- MetadataComponentType.toComponentDatatype(MetadataComponentType.UINT8),
+ MetadataComponentType.toComponentDatatype(MetadataComponentType.UINT8)
).toBe(ComponentDatatype.UNSIGNED_BYTE);
expect(
- MetadataComponentType.toComponentDatatype(MetadataComponentType.INT16),
+ MetadataComponentType.toComponentDatatype(MetadataComponentType.INT16)
).toBe(ComponentDatatype.SHORT);
expect(
- MetadataComponentType.toComponentDatatype(MetadataComponentType.UINT16),
+ MetadataComponentType.toComponentDatatype(MetadataComponentType.UINT16)
).toBe(ComponentDatatype.UNSIGNED_SHORT);
expect(
- MetadataComponentType.toComponentDatatype(MetadataComponentType.INT32),
+ MetadataComponentType.toComponentDatatype(MetadataComponentType.INT32)
).toBe(ComponentDatatype.INT);
expect(
- MetadataComponentType.toComponentDatatype(MetadataComponentType.UINT32),
+ MetadataComponentType.toComponentDatatype(MetadataComponentType.UINT32)
).toBe(ComponentDatatype.UNSIGNED_INT);
expect(
- MetadataComponentType.toComponentDatatype(MetadataComponentType.FLOAT32),
+ MetadataComponentType.toComponentDatatype(MetadataComponentType.FLOAT32)
).toBe(ComponentDatatype.FLOAT);
expect(
- MetadataComponentType.toComponentDatatype(MetadataComponentType.FLOAT64),
+ MetadataComponentType.toComponentDatatype(MetadataComponentType.FLOAT64)
).toBe(ComponentDatatype.DOUBLE);
});
it("toComponentDatatype returns undefined for INT64", function () {
expect(
- MetadataComponentType.toComponentDatatype(MetadataComponentType.INT64),
+ MetadataComponentType.toComponentDatatype(MetadataComponentType.INT64)
).toBeUndefined();
});
it("toComponentDatatype returns undefined for UINT64", function () {
expect(
- MetadataComponentType.toComponentDatatype(MetadataComponentType.UINT64),
+ MetadataComponentType.toComponentDatatype(MetadataComponentType.UINT64)
).toBeUndefined();
});
diff --git a/packages/engine/Specs/Scene/MetadataEntitySpec.js b/packages/engine/Specs/Scene/MetadataEntitySpec.js
index a8bb15476fb0..eb87dd915744 100644
--- a/packages/engine/Specs/Scene/MetadataEntitySpec.js
+++ b/packages/engine/Specs/Scene/MetadataEntitySpec.js
@@ -200,25 +200,25 @@ describe("Scene/MetadataEntity", function () {
it("hasProperty returns false when there are no properties", function () {
expect(
- MetadataEntity.hasProperty("name", {}, classWithNoPropertiesDefinition),
+ MetadataEntity.hasProperty("name", {}, classWithNoPropertiesDefinition)
).toBe(false);
});
it("hasProperty returns false when there's no property with the given property ID", function () {
expect(
- MetadataEntity.hasProperty("volume", properties, classDefinition),
+ MetadataEntity.hasProperty("volume", properties, classDefinition)
).toBe(false);
});
it("hasProperty returns true when there's a property with the given property ID", function () {
expect(
- MetadataEntity.hasProperty("name", properties, classDefinition),
+ MetadataEntity.hasProperty("name", properties, classDefinition)
).toBe(true);
});
it("hasProperty returns true when the class has a default value for a missing property", function () {
expect(
- MetadataEntity.hasProperty("height", properties, classDefinition),
+ MetadataEntity.hasProperty("height", properties, classDefinition)
).toBe(true);
});
@@ -245,8 +245,8 @@ describe("Scene/MetadataEntity", function () {
MetadataEntity.hasPropertyBySemantic(
"NAME",
{},
- classWithNoPropertiesDefinition,
- ),
+ classWithNoPropertiesDefinition
+ )
).toBe(false);
});
@@ -255,20 +255,20 @@ describe("Scene/MetadataEntity", function () {
MetadataEntity.hasPropertyBySemantic(
"VOLUME",
properties,
- classDefinition,
- ),
+ classDefinition
+ )
).toBe(false);
});
it("hasPropertyBySemantic returns true when there's a property with the given property ID", function () {
expect(
- MetadataEntity.hasPropertyBySemantic("NAME", properties, classDefinition),
+ MetadataEntity.hasPropertyBySemantic("NAME", properties, classDefinition)
).toBe(true);
});
it("hasPropertyBySemantic returns true when the class has a default value for a missing property", function () {
expect(
- MetadataEntity.hasPropertyBySemantic("NAME", properties, classDefinition),
+ MetadataEntity.hasPropertyBySemantic("NAME", properties, classDefinition)
).toBe(true);
});
@@ -277,7 +277,7 @@ describe("Scene/MetadataEntity", function () {
MetadataEntity.hasPropertyBySemantic(
undefined,
properties,
- classDefinition,
+ classDefinition
);
}).toThrowDeveloperError();
});
@@ -296,14 +296,14 @@ describe("Scene/MetadataEntity", function () {
it("getPropertyIds returns empty array when there are no properties", function () {
expect(
- MetadataEntity.getPropertyIds({}, classWithNoPropertiesDefinition).length,
+ MetadataEntity.getPropertyIds({}, classWithNoPropertiesDefinition).length
).toBe(0);
});
it("getPropertyIds returns array of property IDs", function () {
// Includes height which has a default value
expect(
- MetadataEntity.getPropertyIds(properties, classDefinition).sort(),
+ MetadataEntity.getPropertyIds(properties, classDefinition).sort()
).toEqual([
"axisColors",
"height",
@@ -319,7 +319,7 @@ describe("Scene/MetadataEntity", function () {
const returnedResults = MetadataEntity.getPropertyIds(
properties,
classDefinition,
- results,
+ results
);
expect(results).toBe(returnedResults);
@@ -356,14 +356,14 @@ describe("Scene/MetadataEntity", function () {
const value = MetadataEntity.getProperty(
"position",
properties,
- classDefinition,
+ classDefinition
);
expect(value).toEqual(properties.position);
});
it("getProperty returns the default value when the property is missing", function () {
expect(
- MetadataEntity.getProperty("height", properties, classDefinition),
+ MetadataEntity.getProperty("height", properties, classDefinition)
).toBe(10.0);
});
@@ -372,71 +372,71 @@ describe("Scene/MetadataEntity", function () {
MetadataEntity.getProperty(
"noDefault",
noDataProperties,
- classWithNoDataValues,
- ),
+ classWithNoDataValues
+ )
).not.toBeDefined();
expect(
MetadataEntity.getProperty(
"hasDefault",
noDataProperties,
- classWithNoDataValues,
- ),
+ classWithNoDataValues
+ )
).toBe(100);
expect(
MetadataEntity.getProperty(
"noDefaultVector",
noDataProperties,
- classWithNoDataValues,
- ),
+ classWithNoDataValues
+ )
).not.toBeDefined();
expect(
MetadataEntity.getProperty(
"hasDefaultVector",
noDataProperties,
- classWithNoDataValues,
- ),
+ classWithNoDataValues
+ )
).toEqual(new Cartesian2(100.0, 100.0));
expect(
MetadataEntity.getProperty(
"noDefaultArray",
noDataProperties,
- classWithNoDataValues,
- ),
+ classWithNoDataValues
+ )
).not.toBeDefined();
expect(
MetadataEntity.getProperty(
"hasDefaultArray",
noDataProperties,
- classWithNoDataValues,
- ),
+ classWithNoDataValues
+ )
).toEqual([1, 1, 1]);
expect(
MetadataEntity.getProperty(
"noDefaultArrayOfVector",
noDataProperties,
- classWithNoDataValues,
- ),
+ classWithNoDataValues
+ )
).not.toBeDefined();
expect(
MetadataEntity.getProperty(
"hasDefaultArrayOfVector",
noDataProperties,
- classWithNoDataValues,
- ),
+ classWithNoDataValues
+ )
).toEqual([new Cartesian2(1.0, 1.0), new Cartesian2(1.0, 1.0)]);
});
it("handles offset and scale", function () {
expect(
- MetadataEntity.getProperty("temperature", properties, classDefinition),
+ MetadataEntity.getProperty("temperature", properties, classDefinition)
).toEqual(32);
expect(
MetadataEntity.getProperty(
"temperatureArray",
properties,
- classDefinition,
- ),
+ classDefinition
+ )
).toEqual([32, 212, 212, 32]);
});
@@ -460,7 +460,7 @@ describe("Scene/MetadataEntity", function () {
it("getProperty handles arrays of vectors correctly", function () {
expect(
- MetadataEntity.getProperty("axisColors", properties, classDefinition),
+ MetadataEntity.getProperty("axisColors", properties, classDefinition)
).toEqual([
new Cartesian3(1, 0, 0),
new Cartesian3(0, 1, 0),
@@ -470,7 +470,7 @@ describe("Scene/MetadataEntity", function () {
it("setProperty returns false if property doesn't exist", function () {
expect(
- MetadataEntity.setProperty("volume", 100.0, properties, classDefinition),
+ MetadataEntity.setProperty("volume", 100.0, properties, classDefinition)
).toBe(false);
});
@@ -481,13 +481,13 @@ describe("Scene/MetadataEntity", function () {
"position",
position,
properties,
- classDefinition,
- ),
+ classDefinition
+ )
).toBe(true);
const retrievedPosition = MetadataEntity.getProperty(
"position",
properties,
- classDefinition,
+ classDefinition
);
expect(retrievedPosition).toEqual(position);
expect(retrievedPosition).not.toBe(position); // The value is cloned
@@ -504,13 +504,13 @@ describe("Scene/MetadataEntity", function () {
"axisColors",
axisColors,
properties,
- classDefinition,
- ),
+ classDefinition
+ )
).toBe(true);
const retrievedPosition = MetadataEntity.getProperty(
"axisColors",
properties,
- classDefinition,
+ classDefinition
);
expect(retrievedPosition).toEqual(axisColors);
expect(retrievedPosition).not.toBe(axisColors); // The value is cloned
@@ -518,18 +518,13 @@ describe("Scene/MetadataEntity", function () {
it("handles offset and scale", function () {
expect(
- MetadataEntity.setProperty(
- "temperature",
- 70,
- properties,
- classDefinition,
- ),
+ MetadataEntity.setProperty("temperature", 70, properties, classDefinition)
).toBe(true);
// There is some expected loss of precision due to storing as a UINT8
// so the result is not 0
expect(
- MetadataEntity.getProperty("temperature", properties, classDefinition),
+ MetadataEntity.getProperty("temperature", properties, classDefinition)
).toEqualEpsilon(70.11764705882354, CesiumMath.EPSILON15);
const values = [32, 32, 32, 32];
@@ -538,14 +533,14 @@ describe("Scene/MetadataEntity", function () {
"temperatureArray",
values,
properties,
- classDefinition,
- ),
+ classDefinition
+ )
).toBe(true);
const result = MetadataEntity.getProperty(
"temperatureArray",
properties,
- classDefinition,
+ classDefinition
);
expect(result).toEqual(values);
expect(result).not.toBe(values); // value should be cloned
@@ -557,7 +552,7 @@ describe("Scene/MetadataEntity", function () {
undefined,
"Building B",
properties,
- classDefinition,
+ classDefinition
);
}).toThrowDeveloperError();
});
@@ -568,7 +563,7 @@ describe("Scene/MetadataEntity", function () {
"name",
undefined,
properties,
- classDefinition,
+ classDefinition
);
}).toThrowDeveloperError();
});
@@ -579,7 +574,7 @@ describe("Scene/MetadataEntity", function () {
"name",
"Building B",
undefined,
- classDefinition,
+ classDefinition
);
}).toThrowDeveloperError();
});
@@ -595,14 +590,14 @@ describe("Scene/MetadataEntity", function () {
MetadataEntity.getPropertyBySemantic(
"HEIGHT",
properties,
- classDefinition,
- ),
+ classDefinition
+ )
).toBeUndefined();
});
it("getPropertyBySemantic returns the property value", function () {
expect(
- MetadataEntity.getPropertyBySemantic("NAME", properties, classDefinition),
+ MetadataEntity.getPropertyBySemantic("NAME", properties, classDefinition)
).toBe("Building A");
});
@@ -611,7 +606,7 @@ describe("Scene/MetadataEntity", function () {
MetadataEntity.getPropertyBySemantic(
undefined,
properties,
- classDefinition,
+ classDefinition
);
}).toThrowDeveloperError();
});
@@ -634,11 +629,11 @@ describe("Scene/MetadataEntity", function () {
"NAME",
"Building B",
properties,
- classDefinition,
- ),
+ classDefinition
+ )
).toBe(true);
expect(
- MetadataEntity.getProperty("name", properties, classDefinition),
+ MetadataEntity.getProperty("name", properties, classDefinition)
).toBe("Building B");
});
@@ -648,8 +643,8 @@ describe("Scene/MetadataEntity", function () {
"HEIGHT",
20.0,
properties,
- classDefinition,
- ),
+ classDefinition
+ )
).toBe(false);
});
@@ -659,7 +654,7 @@ describe("Scene/MetadataEntity", function () {
undefined,
"Building B",
properties,
- classDefinition,
+ classDefinition
);
}).toThrowDeveloperError();
});
@@ -670,7 +665,7 @@ describe("Scene/MetadataEntity", function () {
"NAME",
undefined,
properties,
- classDefinition,
+ classDefinition
);
}).toThrowDeveloperError();
});
@@ -681,7 +676,7 @@ describe("Scene/MetadataEntity", function () {
"NAME",
"Building B",
undefined,
- classDefinition,
+ classDefinition
);
}).toThrowDeveloperError();
});
@@ -692,7 +687,7 @@ describe("Scene/MetadataEntity", function () {
"NAME",
"Building B",
properties,
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
diff --git a/packages/engine/Specs/Scene/MetadataSchemaLoaderSpec.js b/packages/engine/Specs/Scene/MetadataSchemaLoaderSpec.js
index 4ead1809dc3f..9c14c187e943 100644
--- a/packages/engine/Specs/Scene/MetadataSchemaLoaderSpec.js
+++ b/packages/engine/Specs/Scene/MetadataSchemaLoaderSpec.js
@@ -74,7 +74,7 @@ describe("Scene/MetadataSchemaLoader", function () {
await expectAsync(schemaLoader.load()).toBeRejectedWithError(
RuntimeError,
- "Failed to load schema: https://example.com/schema.json\n404 Not Found",
+ "Failed to load schema: https://example.com/schema.json\n404 Not Found"
);
});
@@ -96,7 +96,7 @@ describe("Scene/MetadataSchemaLoader", function () {
it("loads external schema", async function () {
const fetchJson = spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(schemaJson),
+ Promise.resolve(schemaJson)
);
const schemaLoader = new MetadataSchemaLoader({
@@ -119,7 +119,7 @@ describe("Scene/MetadataSchemaLoader", function () {
it("destroys schema", async function () {
spyOn(Resource.prototype, "fetchJson").and.returnValue(
- Promise.resolve(schemaJson),
+ Promise.resolve(schemaJson)
);
const schemaLoader = new MetadataSchemaLoader({
@@ -140,7 +140,7 @@ describe("Scene/MetadataSchemaLoader", function () {
async function resolveJsonAfterDestroy(rejectPromise) {
spyOn(Resource.prototype, "fetchJson").and.callFake(() =>
- rejectPromise ? Promise.reject(new Error()) : Promise.resolve(schemaJson),
+ rejectPromise ? Promise.reject(new Error()) : Promise.resolve(schemaJson)
);
const schemaLoader = new MetadataSchemaLoader({
diff --git a/packages/engine/Specs/Scene/MetadataTablePropertySpec.js b/packages/engine/Specs/Scene/MetadataTablePropertySpec.js
index 1d64a16bc1d0..a6ddddbb5ace 100644
--- a/packages/engine/Specs/Scene/MetadataTablePropertySpec.js
+++ b/packages/engine/Specs/Scene/MetadataTablePropertySpec.js
@@ -111,10 +111,10 @@ describe("Scene/MetadataTableProperty", function () {
expect(property.extras).toBe(extras);
expect(property.extensions).toBe(extensions);
expect(property._stringOffsets._componentType).toBe(
- MetadataComponentType.UINT16,
+ MetadataComponentType.UINT16
);
expect(property._arrayOffsets._componentType).toBe(
- MetadataComponentType.UINT8,
+ MetadataComponentType.UINT8
);
expect(property.get(0)).toEqual(["a", "bb", "ccc"]);
expect(property.get(1)).toEqual(["dddd", "eeeee"]);
@@ -163,10 +163,10 @@ describe("Scene/MetadataTableProperty", function () {
expect(property.extras).toBe(extras);
expect(property.extensions).toBe(extensions);
expect(property._stringOffsets._componentType).toBe(
- MetadataComponentType.UINT16,
+ MetadataComponentType.UINT16
);
expect(property._arrayOffsets._componentType).toBe(
- MetadataComponentType.UINT16,
+ MetadataComponentType.UINT16
);
expect(property.get(0)).toEqual(["a", "bb", "ccc"]);
expect(property.get(1)).toEqual(["dddd", "eeeee"]);
@@ -377,8 +377,13 @@ describe("Scene/MetadataTableProperty", function () {
if (disableBigInt64ArraySupport && disableBigIntSupport) {
// Precision loss is expected if INT64 is converted to JS numbers
expectedValues = [
- -9223372036854776000, -4611686018427388000, -10, 0, 10,
- 4611686018427388000, 9223372036854776000,
+ -9223372036854776000,
+ -4611686018427388000,
+ -10,
+ 0,
+ 10,
+ 4611686018427388000,
+ 9223372036854776000,
];
}
diff --git a/packages/engine/Specs/Scene/MetadataTableSpec.js b/packages/engine/Specs/Scene/MetadataTableSpec.js
index 77f5ec24b80f..9cb1721620f0 100644
--- a/packages/engine/Specs/Scene/MetadataTableSpec.js
+++ b/packages/engine/Specs/Scene/MetadataTableSpec.js
@@ -59,10 +59,10 @@ describe("Scene/MetadataTable", function () {
expect(metadataTable.count).toBe(2);
expect(metadataTable.getPropertyIds().sort()).toEqual(
- expectedPropertyNames,
+ expectedPropertyNames
);
expect(Object.keys(metadataTable.class.properties).sort()).toEqual(
- expectedPropertyNames,
+ expectedPropertyNames
);
const heightSize = 2 * 4; // two floats
@@ -523,13 +523,13 @@ describe("Scene/MetadataTable", function () {
const length = valuesToSet.length;
for (let i = 0; i < length; ++i) {
expect(metadataTable.setProperty(i, "propertyInt8", valuesToSet[i])).toBe(
- true,
+ true
);
let value = metadataTable.getProperty(i, "propertyInt8");
expect(value).toEqual(valuesToSet[i]);
// Test setting / getting again
expect(metadataTable.setProperty(i, "propertyInt8", valuesToSet[i])).toBe(
- true,
+ true
);
value = metadataTable.getProperty(i, "propertyInt8");
expect(value).toEqual(valuesToSet[i]);
@@ -914,7 +914,7 @@ describe("Scene/MetadataTable", function () {
const expectedTypedArray = new Float32Array([1.0, 2.0]);
expect(metadataTable.getPropertyTypedArray("height")).toEqual(
- expectedTypedArray,
+ expectedTypedArray
);
});
@@ -968,7 +968,7 @@ describe("Scene/MetadataTable", function () {
const expectedTypedArray = new Float32Array([1.0, 2.0]);
expect(metadataTable.getPropertyTypedArrayBySemantic("HEIGHT")).toEqual(
- expectedTypedArray,
+ expectedTypedArray
);
});
@@ -989,7 +989,7 @@ describe("Scene/MetadataTable", function () {
});
expect(
- metadataTable.getPropertyTypedArrayBySemantic("HEIGHT"),
+ metadataTable.getPropertyTypedArrayBySemantic("HEIGHT")
).toBeUndefined();
});
diff --git a/packages/engine/Specs/Scene/Model/AlphaPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/AlphaPipelineStageSpec.js
index de6ed67e7d2d..120bf89679ad 100644
--- a/packages/engine/Specs/Scene/Model/AlphaPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/AlphaPipelineStageSpec.js
@@ -35,7 +35,7 @@ describe(
AlphaPipelineStage.process(
renderResources,
mockPrimitive,
- mockFrameState,
+ mockFrameState
);
expect(renderResources.alphaOptions.pass).toBe(mockModel.opaquePass);
});
@@ -50,7 +50,7 @@ describe(
AlphaPipelineStage.process(
renderResources,
mockPrimitive,
- mockFrameState,
+ mockFrameState
);
const renderStateOptions = renderResources.renderStateOptions;
@@ -69,7 +69,7 @@ describe(
AlphaPipelineStage.process(
renderResources,
mockPrimitive,
- mockFrameState,
+ mockFrameState
);
const shaderBuilder = renderResources.shaderBuilder;
@@ -82,5 +82,5 @@ describe(
expect(renderResources.uniformMap.u_alphaCutoff()).toBe(cutoff);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/AtmospherePipelineStageSpec.js b/packages/engine/Specs/Scene/Model/AtmospherePipelineStageSpec.js
index 02a065f4365d..753fbcbcb5e8 100644
--- a/packages/engine/Specs/Scene/Model/AtmospherePipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/AtmospherePipelineStageSpec.js
@@ -27,7 +27,7 @@ describe(
url: boxTexturedGlbUrl,
modelMatrix: Transforms.eastNorthUpToFixedFrame(center),
},
- scene,
+ scene
);
});
@@ -85,7 +85,7 @@ describe(
const frameState = scene.frameState;
frameState.camera.position = Cartesian3.clone(
model.boundingSphere.center,
- frameState.camera.position,
+ frameState.camera.position
);
scene.renderForSpecs();
@@ -116,5 +116,5 @@ describe(
expect(uniformMap.u_isInFog()).toBe(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/B3dmLoaderSpec.js b/packages/engine/Specs/Scene/Model/B3dmLoaderSpec.js
index 9267f6a15df6..7933375ca4b1 100644
--- a/packages/engine/Specs/Scene/Model/B3dmLoaderSpec.js
+++ b/packages/engine/Specs/Scene/Model/B3dmLoaderSpec.js
@@ -76,7 +76,7 @@ describe(
async function expectLoadError(arrayBuffer) {
const resource = new Resource("http://example.com/test.b3dm");
await expectAsync(
- loadB3dmArrayBuffer(resource, arrayBuffer),
+ loadB3dmArrayBuffer(resource, arrayBuffer)
).toBeRejectedWithError(RuntimeError);
}
@@ -138,7 +138,7 @@ describe(
expect(propertyTable.count).toEqual(10);
expect(loader.components.transform).toEqual(
- Matrix4.fromTranslation(new Cartesian3(0.1, 0.2, 0.3)),
+ Matrix4.fromTranslation(new Cartesian3(0.1, 0.2, 0.3))
);
});
});
@@ -170,7 +170,7 @@ describe(
it("destroys b3dm loader", function () {
const unloadGltfLoader = spyOn(
GltfLoader.prototype,
- "unload",
+ "unload"
).and.callThrough();
return loadB3dm(withBatchTableUrl).then(function (loader) {
@@ -186,5 +186,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/BatchTexturePipelineStageSpec.js b/packages/engine/Specs/Scene/Model/BatchTexturePipelineStageSpec.js
index 71d50413c106..fc9e95c69f56 100644
--- a/packages/engine/Specs/Scene/Model/BatchTexturePipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/BatchTexturePipelineStageSpec.js
@@ -72,7 +72,7 @@ describe("Scene/Model/BatchTexturePipelineStage", function () {
verifyBatchTextureShaders(renderResources.shaderBuilder);
verifyBatchTextureUniforms(
renderResources.model.featureTables[0],
- renderResources.uniformMap,
+ renderResources.uniformMap
);
});
});
diff --git a/packages/engine/Specs/Scene/Model/CPUStylingPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/CPUStylingPipelineStageSpec.js
index ad73f3aa26c8..63fb2545ce9c 100644
--- a/packages/engine/Specs/Scene/Model/CPUStylingPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/CPUStylingPipelineStageSpec.js
@@ -51,7 +51,7 @@ describe("Scene/Model/CPUStylingPipelineStage", function () {
renderResources.model.colorBlendMode = ColorBlendMode.MIX;
const colorBlend = ColorBlendMode.getColorBlend(
renderResources.model.colorBlendMode,
- renderResources.model.colorBlendAmount,
+ renderResources.model.colorBlendAmount
);
CPUStylingPipelineStage.process(renderResources);
diff --git a/packages/engine/Specs/Scene/Model/ClassificationModelDrawCommandSpec.js b/packages/engine/Specs/Scene/Model/ClassificationModelDrawCommandSpec.js
index adfa295c7948..6df7bf6333e6 100644
--- a/packages/engine/Specs/Scene/Model/ClassificationModelDrawCommandSpec.js
+++ b/packages/engine/Specs/Scene/Model/ClassificationModelDrawCommandSpec.js
@@ -78,12 +78,12 @@ describe(
options.boundingVolume = BoundingSphere.transform(
boundingSphere,
options.modelMatrix,
- boundingSphere,
+ boundingSphere
);
options.renderState = defaultValue(
options.renderState,
- RenderState.fromCache(),
+ RenderState.fromCache()
);
options.pass = Pass.OPAQUE;
@@ -96,7 +96,7 @@ describe(
command,
expectedPass,
expectedStencilFunction,
- testForPicking,
+ testForPicking
) {
testForPicking = defaultValue(testForPicking, false);
@@ -136,7 +136,7 @@ describe(
};
expect(renderState.stencilTest).toEqual(expectedStencilTest);
expect(renderState.stencilMask).toEqual(
- StencilConstants.CLASSIFICATION_MASK,
+ StencilConstants.CLASSIFICATION_MASK
);
expect(renderState.depthTest).toEqual({
@@ -150,7 +150,7 @@ describe(
// that is not in BlendingState.PRE_MULTIPLIED_ALPHA_BLEND.
const expectedColorCommandBlending = clone(
BlendingState.PRE_MULTIPLIED_ALPHA_BLEND,
- true,
+ true
);
expectedColorCommandBlending.color = noColor;
@@ -192,7 +192,7 @@ describe(
expect(renderState.stencilTest).toEqual(expectedStencilTest);
expect(renderState.stencilMask).toEqual(
- StencilConstants.CLASSIFICATION_MASK,
+ StencilConstants.CLASSIFICATION_MASK
);
expect(renderState.depthTest.enabled).toEqual(false);
expect(renderState.depthMask).toEqual(false);
@@ -215,7 +215,7 @@ describe(
commandList,
expectedPass,
expectedStencilFunction,
- testForPicking,
+ testForPicking
) {
const batchLengths = drawCommand.batchLengths;
const batchOffsets = drawCommand.batchOffsets;
@@ -233,7 +233,7 @@ describe(
stencilDepthCommand,
expectedPass,
expectedStencilFunction,
- testForPicking,
+ testForPicking
);
const colorCommand = commandList[i * 2 + 1];
@@ -275,7 +275,7 @@ describe(
expect(drawCommand.command).toBe(command);
expect(drawCommand.runtimePrimitive).toBe(
- renderResources.runtimePrimitive,
+ renderResources.runtimePrimitive
);
expect(drawCommand.model).toBe(renderResources.model);
@@ -294,7 +294,7 @@ describe(
drawCommand,
commandList,
expectedPass,
- expectedStencilFunction,
+ expectedStencilFunction
);
expect(drawCommand._commandList3DTiles.length).toBe(0);
@@ -316,7 +316,7 @@ describe(
expect(drawCommand.command).toBe(command);
expect(drawCommand.runtimePrimitive).toBe(
- renderResources.runtimePrimitive,
+ renderResources.runtimePrimitive
);
expect(drawCommand.model).toBe(renderResources.model);
@@ -324,7 +324,7 @@ describe(
expect(drawCommand.boundingVolume).toBe(command.boundingVolume);
expect(drawCommand.classificationType).toBe(
- ClassificationType.CESIUM_3D_TILE,
+ ClassificationType.CESIUM_3D_TILE
);
expect(drawCommand._classifiesTerrain).toBe(false);
expect(drawCommand._classifies3DTiles).toBe(true);
@@ -337,7 +337,7 @@ describe(
drawCommand,
commandList,
expectedPass,
- expectedStencilFunction,
+ expectedStencilFunction
);
expect(drawCommand._commandListTerrain.length).toBe(0);
@@ -359,7 +359,7 @@ describe(
expect(drawCommand.command).toBe(command);
expect(drawCommand.runtimePrimitive).toBe(
- renderResources.runtimePrimitive,
+ renderResources.runtimePrimitive
);
expect(drawCommand.model).toBe(renderResources.model);
@@ -378,7 +378,7 @@ describe(
drawCommand,
commandList,
expectedPass,
- expectedStencilFunction,
+ expectedStencilFunction
);
commandList = drawCommand._commandList3DTiles;
@@ -389,7 +389,7 @@ describe(
drawCommand,
commandList,
expectedPass,
- expectedStencilFunction,
+ expectedStencilFunction
);
expect(drawCommand._commandListIgnoreShow.length).toBe(0);
@@ -411,7 +411,7 @@ describe(
expect(drawCommand.command).toBe(command);
expect(drawCommand.runtimePrimitive).toBe(
- renderResources.runtimePrimitive,
+ renderResources.runtimePrimitive
);
expect(drawCommand.model).toBe(renderResources.model);
@@ -470,7 +470,7 @@ describe(
commandList,
expectedPass,
expectedStencilFunction,
- testForPicking,
+ testForPicking
);
expect(drawCommand._commandListTerrain.length).toBe(6);
@@ -496,7 +496,7 @@ describe(
});
expect(drawCommand.classificationType).toBe(
- ClassificationType.CESIUM_3D_TILE,
+ ClassificationType.CESIUM_3D_TILE
);
expect(drawCommand._classifiesTerrain).toBe(false);
expect(drawCommand._classifies3DTiles).toBe(true);
@@ -512,7 +512,7 @@ describe(
commandList,
expectedPass,
expectedStencilFunction,
- testForPicking,
+ testForPicking
);
expect(drawCommand._commandList3DTiles.length).toBe(6);
@@ -551,7 +551,7 @@ describe(
commandList,
expectedPass,
expectedStencilFunction,
- testForPicking,
+ testForPicking
);
commandList = drawCommand._commandList3DTilesPicking;
@@ -563,7 +563,7 @@ describe(
commandList,
expectedPass,
expectedStencilFunction,
- testForPicking,
+ testForPicking
);
expect(drawCommand._commandListTerrain.length).toBe(6);
@@ -623,7 +623,7 @@ describe(
drawCommand,
commandListTerrain,
expectedPass,
- expectedStencilFunction,
+ expectedStencilFunction
);
const commandList3DTiles = commandList.slice(6, 12);
@@ -634,7 +634,7 @@ describe(
drawCommand,
commandList3DTiles,
expectedPass,
- expectedStencilFunction,
+ expectedStencilFunction
);
});
@@ -662,7 +662,7 @@ describe(
drawCommand,
commandListTerrain,
expectedPass,
- expectedStencilFunction,
+ expectedStencilFunction
);
const commandList3DTiles = commandList.slice(6, 12);
@@ -673,7 +673,7 @@ describe(
drawCommand,
commandList3DTiles,
expectedPass,
- expectedStencilFunction,
+ expectedStencilFunction
);
});
@@ -705,7 +705,7 @@ describe(
commandListTerrain,
expectedPass,
expectedStencilFunction,
- testForPicking,
+ testForPicking
);
const commandList3DTiles = commandList.slice(6, 12);
@@ -717,7 +717,7 @@ describe(
commandList3DTiles,
expectedPass,
expectedStencilFunction,
- testForPicking,
+ testForPicking
);
});
@@ -740,7 +740,7 @@ describe(
mockFrameStateWithInvertedClassification.commandList;
drawCommand.pushCommands(
mockFrameStateWithInvertedClassification,
- commandList,
+ commandList
);
expect(commandList.length).toBe(9);
@@ -752,7 +752,7 @@ describe(
drawCommand,
commandList3DTiles,
expectedPass,
- expectedStencilFunction,
+ expectedStencilFunction
);
const length = commandListIgnoreShow.length;
@@ -767,7 +767,7 @@ describe(
verifyStencilDepthCommand(
ignoreShowCommand,
expectedPass,
- expectedStencilFunction,
+ expectedStencilFunction
);
}
});
@@ -791,7 +791,7 @@ describe(
mockFrameStateWithInvertedClassification.commandList;
drawCommand.pushCommands(
mockFrameStateWithInvertedClassification,
- commandList,
+ commandList
);
expect(commandList.length).toBe(6);
@@ -837,5 +837,5 @@ describe(
}
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/ClassificationPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/ClassificationPipelineStageSpec.js
index d62b7184c13c..dc30239df431 100644
--- a/packages/engine/Specs/Scene/Model/ClassificationPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/ClassificationPipelineStageSpec.js
@@ -73,7 +73,7 @@ describe("Scene/Model/ClassificationPipelineStage", function () {
ClassificationPipelineStage.process(
renderResources,
primitive,
- mockFrameState,
+ mockFrameState
);
}).toThrowError(RuntimeError);
});
@@ -87,7 +87,7 @@ describe("Scene/Model/ClassificationPipelineStage", function () {
ClassificationPipelineStage.process(
renderResources,
primitive,
- mockFrameState,
+ mockFrameState
);
const shaderBuilder = renderResources.shaderBuilder;
@@ -109,7 +109,7 @@ describe("Scene/Model/ClassificationPipelineStage", function () {
ClassificationPipelineStage.process(
renderResources,
primitive,
- mockFrameState,
+ mockFrameState
);
const runtimePrimitive = renderResources.runtimePrimitive;
@@ -129,7 +129,7 @@ describe("Scene/Model/ClassificationPipelineStage", function () {
ClassificationPipelineStage.process(
renderResources,
primitive,
- mockFrameState,
+ mockFrameState
);
const runtimePrimitive = renderResources.runtimePrimitive;
@@ -149,7 +149,7 @@ describe("Scene/Model/ClassificationPipelineStage", function () {
ClassificationPipelineStage.process(
renderResources,
primitive,
- mockFrameState,
+ mockFrameState
);
const runtimePrimitive = renderResources.runtimePrimitive;
@@ -180,7 +180,7 @@ describe("Scene/Model/ClassificationPipelineStage", function () {
ClassificationPipelineStage.process(
renderResources,
primitive,
- mockFrameState,
+ mockFrameState
);
const runtimePrimitive = renderResources.runtimePrimitive;
@@ -204,7 +204,7 @@ describe("Scene/Model/ClassificationPipelineStage", function () {
ClassificationPipelineStage.process(
renderResources,
primitive,
- mockFrameState,
+ mockFrameState
);
const batchLengths = runtimePrimitive.batchLengths;
diff --git a/packages/engine/Specs/Scene/Model/CustomShaderPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/CustomShaderPipelineStageSpec.js
index a2e8a6797800..cf674eee8c16 100644
--- a/packages/engine/Specs/Scene/Model/CustomShaderPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/CustomShaderPipelineStageSpec.js
@@ -168,7 +168,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
CustomShaderPipelineStage.process(renderResources, primitive);
expect(renderResources.lightingOptions.lightingModel).toBe(
- LightingModel.PBR,
+ LightingModel.PBR
);
});
@@ -237,7 +237,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
expect(renderResources.alphaOptions.pass).toBe(Pass.TRANSLUCENT);
expect(renderResources.lightingOptions.lightingModel).toBe(
- LightingModel.PBR,
+ LightingModel.PBR
);
// the shader code proper gets optimized out
@@ -273,13 +273,13 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
shaderBuilder,
CustomShaderPipelineStage.STRUCT_ID_ATTRIBUTES_VS,
CustomShaderPipelineStage.STRUCT_NAME_ATTRIBUTES,
- [" vec3 positionMC;", " vec3 normalMC;", " vec2 texCoord_0;"],
+ [" vec3 positionMC;", " vec3 normalMC;", " vec2 texCoord_0;"]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
CustomShaderPipelineStage.STRUCT_ID_ATTRIBUTES_FS,
CustomShaderPipelineStage.STRUCT_NAME_ATTRIBUTES,
- [" vec3 positionMC;", " vec3 normalEC;", " vec2 texCoord_0;"],
+ [" vec3 positionMC;", " vec3 normalEC;", " vec2 texCoord_0;"]
);
ShaderBuilderTester.expectHasVertexStruct(
@@ -292,7 +292,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
" Metadata metadata;",
" MetadataClass metadataClass;",
" MetadataStatistics metadataStatistics;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
@@ -304,7 +304,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
" Metadata metadata;",
" MetadataClass metadataClass;",
" MetadataStatistics metadataStatistics;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
@@ -315,7 +315,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
" vsInput.attributes.positionMC = attributes.positionMC;",
" vsInput.attributes.normalMC = attributes.normalMC;",
" vsInput.attributes.texCoord_0 = attributes.texCoord_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
@@ -325,7 +325,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
" fsInput.attributes.positionMC = attributes.positionMC;",
" fsInput.attributes.normalEC = attributes.normalEC;",
" fsInput.attributes.texCoord_0 = attributes.texCoord_0;",
- ],
+ ]
);
});
@@ -351,20 +351,20 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
CustomShaderPipelineStage.process(
renderResources,
- primitiveWithCustomAttributes,
+ primitiveWithCustomAttributes
);
ShaderBuilderTester.expectHasVertexStruct(
shaderBuilder,
CustomShaderPipelineStage.STRUCT_ID_ATTRIBUTES_VS,
CustomShaderPipelineStage.STRUCT_NAME_ATTRIBUTES,
- [" vec3 positionMC;", " float temperature;"],
+ [" vec3 positionMC;", " float temperature;"]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
CustomShaderPipelineStage.STRUCT_ID_ATTRIBUTES_FS,
CustomShaderPipelineStage.STRUCT_NAME_ATTRIBUTES,
- [" vec3 positionMC;", " float temperature;"],
+ [" vec3 positionMC;", " float temperature;"]
);
ShaderBuilderTester.expectHasVertexStruct(
@@ -377,7 +377,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
" Metadata metadata;",
" MetadataClass metadataClass;",
" MetadataStatistics metadataStatistics;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
@@ -389,7 +389,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
" Metadata metadata;",
" MetadataClass metadataClass;",
" MetadataStatistics metadataStatistics;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
@@ -399,7 +399,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
[
" vsInput.attributes.positionMC = attributes.positionMC;",
" vsInput.attributes.temperature = attributes.temperature;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
@@ -408,7 +408,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
[
" fsInput.attributes.positionMC = attributes.positionMC;",
" fsInput.attributes.temperature = attributes.temperature;",
- ],
+ ]
);
});
@@ -437,20 +437,20 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
CustomShaderPipelineStage.process(
renderResources,
- primitiveWithColorAttributes,
+ primitiveWithColorAttributes
);
ShaderBuilderTester.expectHasVertexStruct(
shaderBuilder,
CustomShaderPipelineStage.STRUCT_ID_ATTRIBUTES_VS,
CustomShaderPipelineStage.STRUCT_NAME_ATTRIBUTES,
- [" vec4 color_0;", " vec4 color_1;"],
+ [" vec4 color_0;", " vec4 color_1;"]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
CustomShaderPipelineStage.STRUCT_ID_ATTRIBUTES_FS,
CustomShaderPipelineStage.STRUCT_NAME_ATTRIBUTES,
- [" vec4 color_0;", " vec4 color_1;"],
+ [" vec4 color_0;", " vec4 color_1;"]
);
ShaderBuilderTester.expectHasVertexStruct(
@@ -463,7 +463,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
" Metadata metadata;",
" MetadataClass metadataClass;",
" MetadataStatistics metadataStatistics;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
@@ -475,7 +475,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
" Metadata metadata;",
" MetadataClass metadataClass;",
" MetadataStatistics metadataStatistics;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
@@ -485,7 +485,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
[
" vsInput.attributes.color_0 = attributes.color_0;",
" vsInput.attributes.color_1 = attributes.color_1;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
@@ -494,7 +494,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
[
" fsInput.attributes.color_0 = attributes.color_0;",
" fsInput.attributes.color_1 = attributes.color_1;",
- ],
+ ]
);
});
@@ -520,20 +520,20 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
CustomShaderPipelineStage.process(
renderResources,
- primitiveWithCustomAttributes,
+ primitiveWithCustomAttributes
);
ShaderBuilderTester.expectHasVertexStruct(
shaderBuilder,
CustomShaderPipelineStage.STRUCT_ID_ATTRIBUTES_VS,
CustomShaderPipelineStage.STRUCT_NAME_ATTRIBUTES,
- [" vec3 positionMC;"],
+ [" vec3 positionMC;"]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
CustomShaderPipelineStage.STRUCT_ID_ATTRIBUTES_FS,
CustomShaderPipelineStage.STRUCT_NAME_ATTRIBUTES,
- [" float temperature;"],
+ [" float temperature;"]
);
ShaderBuilderTester.expectHasVertexStruct(
@@ -546,7 +546,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
" Metadata metadata;",
" MetadataClass metadataClass;",
" MetadataStatistics metadataStatistics;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
@@ -558,20 +558,20 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
" Metadata metadata;",
" MetadataClass metadataClass;",
" MetadataStatistics metadataStatistics;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
CustomShaderPipelineStage.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_VS,
CustomShaderPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_VS,
- [" vsInput.attributes.positionMC = attributes.positionMC;"],
+ [" vsInput.attributes.positionMC = attributes.positionMC;"]
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
CustomShaderPipelineStage.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_FS,
CustomShaderPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_FS,
- [" fsInput.attributes.temperature = attributes.temperature;"],
+ [" fsInput.attributes.temperature = attributes.temperature;"]
);
});
@@ -619,7 +619,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
" Metadata metadata;",
" MetadataClass metadataClass;",
" MetadataStatistics metadataStatistics;",
- ],
+ ]
);
});
@@ -654,13 +654,13 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
shaderBuilder,
CustomShaderPipelineStage.STRUCT_ID_ATTRIBUTES_VS,
CustomShaderPipelineStage.STRUCT_NAME_ATTRIBUTES,
- [],
+ []
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
CustomShaderPipelineStage.STRUCT_ID_ATTRIBUTES_FS,
CustomShaderPipelineStage.STRUCT_NAME_ATTRIBUTES,
- [" vec3 positionMC;", " vec3 positionWC;", " vec3 positionEC;"],
+ [" vec3 positionMC;", " vec3 positionWC;", " vec3 positionEC;"]
);
ShaderBuilderTester.expectHasVertexStruct(
@@ -673,7 +673,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
" Metadata metadata;",
" MetadataClass metadataClass;",
" MetadataStatistics metadataStatistics;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
@@ -685,14 +685,14 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
" Metadata metadata;",
" MetadataClass metadataClass;",
" MetadataStatistics metadataStatistics;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
CustomShaderPipelineStage.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_VS,
CustomShaderPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_VS,
- [],
+ []
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
@@ -702,7 +702,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
" fsInput.attributes.positionMC = attributes.positionMC;",
" fsInput.attributes.positionWC = attributes.positionWC;",
" fsInput.attributes.positionEC = attributes.positionEC;",
- ],
+ ]
);
});
@@ -730,13 +730,13 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
shaderBuilder,
CustomShaderPipelineStage.STRUCT_ID_ATTRIBUTES_VS,
CustomShaderPipelineStage.STRUCT_NAME_ATTRIBUTES,
- [" vec2 texCoord_1;"],
+ [" vec2 texCoord_1;"]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
CustomShaderPipelineStage.STRUCT_ID_ATTRIBUTES_FS,
CustomShaderPipelineStage.STRUCT_NAME_ATTRIBUTES,
- [" vec3 tangentEC;"],
+ [" vec3 tangentEC;"]
);
ShaderBuilderTester.expectHasVertexStruct(
@@ -749,7 +749,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
" Metadata metadata;",
" MetadataClass metadataClass;",
" MetadataStatistics metadataStatistics;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
@@ -761,20 +761,20 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
" Metadata metadata;",
" MetadataClass metadataClass;",
" MetadataStatistics metadataStatistics;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
CustomShaderPipelineStage.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_VS,
CustomShaderPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_VS,
- [" vsInput.attributes.texCoord_1 = vec2(0.0);"],
+ [" vsInput.attributes.texCoord_1 = vec2(0.0);"]
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
CustomShaderPipelineStage.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_FS,
CustomShaderPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_FS,
- [" fsInput.attributes.tangentEC = vec3(1.0, 0.0, 0.0);"],
+ [" fsInput.attributes.tangentEC = vec3(1.0, 0.0, 0.0);"]
);
});
@@ -825,7 +825,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
ShaderBuilderTester.expectVertexLinesEqual(shaderBuilder, []);
ShaderBuilderTester.expectFragmentLinesContains(
shaderBuilder,
- emptyFragmentShader,
+ emptyFragmentShader
);
});
@@ -845,7 +845,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
ShaderBuilderTester.expectVertexLinesContains(
shaderBuilder,
- emptyVertexShader,
+ emptyVertexShader
);
ShaderBuilderTester.expectFragmentLinesEqual(shaderBuilder, []);
});
@@ -890,7 +890,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
shaderBuilder,
CustomShaderPipelineStage.STRUCT_ID_ATTRIBUTES_FS,
CustomShaderPipelineStage.STRUCT_NAME_ATTRIBUTES,
- [" vec3 positionWC;"],
+ [" vec3 positionWC;"]
);
ShaderBuilderTester.expectHasFragmentStruct(
@@ -903,7 +903,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
" Metadata metadata;",
" MetadataClass metadataClass;",
" MetadataStatistics metadataStatistics;",
- ],
+ ]
);
expect(shaderBuilder._vertexShaderParts.functionIds).toEqual([]);
@@ -911,7 +911,7 @@ describe("Scene/Model/CustomShaderPipelineStage", function () {
shaderBuilder,
CustomShaderPipelineStage.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_FS,
CustomShaderPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_FS,
- [" fsInput.attributes.positionWC = attributes.positionWC;"],
+ [" fsInput.attributes.positionWC = attributes.positionWC;"]
);
});
});
diff --git a/packages/engine/Specs/Scene/Model/CustomShaderSpec.js b/packages/engine/Specs/Scene/Model/CustomShaderSpec.js
index 03c8b3698168..669b4ab404a5 100644
--- a/packages/engine/Specs/Scene/Model/CustomShaderSpec.js
+++ b/packages/engine/Specs/Scene/Model/CustomShaderSpec.js
@@ -25,7 +25,7 @@ describe("Scene/Model/CustomShader", function () {
expect(customShader.mode).toBe(CustomShaderMode.MODIFY_MATERIAL);
expect(customShader.lightingModel).not.toBeDefined();
expect(customShader.translucencyMode).toBe(
- CustomShaderTranslucencyMode.INHERIT,
+ CustomShaderTranslucencyMode.INHERIT
);
expect(customShader.uniforms).toEqual({});
expect(customShader.varyings).toEqual({});
@@ -46,7 +46,7 @@ describe("Scene/Model/CustomShader", function () {
expect(customShader.mode).toBe(CustomShaderMode.REPLACE_MATERIAL);
expect(customShader.lightingModel).toBe(LightingModel.PBR);
expect(customShader.translucencyMode).toBe(
- CustomShaderTranslucencyMode.TRANSLUCENT,
+ CustomShaderTranslucencyMode.TRANSLUCENT
);
expect(customShader.uniforms).toEqual({});
expect(customShader.varyings).toEqual({});
@@ -225,7 +225,7 @@ describe("Scene/Model/CustomShader", function () {
expect(customShader.usedVariablesVertex).toEqual(expectedVertexVariables);
expect(customShader.usedVariablesFragment).toEqual(
- expectedFragmentVariables,
+ expectedFragmentVariables
);
});
@@ -408,13 +408,13 @@ describe("Scene/Model/CustomShader", function () {
expect(customShader.uniformMap.u_blue).toBeDefined();
expect(customShader.uniformMap.u_blue()).not.toBeDefined();
- return waitForTextureLoad(customShader, "u_blue").then(
- function (texture) {
- expect(customShader.uniformMap.u_blue()).toBe(texture);
- expect(texture.width).toBe(2);
- expect(texture.height).toBe(2);
- },
- );
+ return waitForTextureLoad(customShader, "u_blue").then(function (
+ texture
+ ) {
+ expect(customShader.uniformMap.u_blue()).toBe(texture);
+ expect(texture.width).toBe(2);
+ expect(texture.height).toBe(2);
+ });
});
it("can change texture uniform value", function () {
@@ -432,28 +432,28 @@ describe("Scene/Model/CustomShader", function () {
});
shaders.push(customShader);
- return waitForTextureLoad(customShader, "u_testTexture").then(
- function (blueTexture) {
- expect(customShader.uniformMap.u_testTexture()).toBe(blueTexture);
- expect(blueTexture.width).toBe(2);
- expect(blueTexture.height).toBe(2);
- customShader.setUniform(
- "u_testTexture",
- new TextureUniform({
- url: greenUrl,
- }),
- );
- return waitForTextureLoad(customShader, "u_testTexture").then(
- function (greenTexture) {
- expect(customShader.uniformMap.u_testTexture()).toBe(
- greenTexture,
- );
- expect(greenTexture.width).toBe(1);
- expect(greenTexture.height).toBe(4);
- },
- );
- },
- );
+ return waitForTextureLoad(customShader, "u_testTexture").then(function (
+ blueTexture
+ ) {
+ expect(customShader.uniformMap.u_testTexture()).toBe(blueTexture);
+ expect(blueTexture.width).toBe(2);
+ expect(blueTexture.height).toBe(2);
+ customShader.setUniform(
+ "u_testTexture",
+ new TextureUniform({
+ url: greenUrl,
+ })
+ );
+ return waitForTextureLoad(customShader, "u_testTexture").then(
+ function (greenTexture) {
+ expect(customShader.uniformMap.u_testTexture()).toBe(
+ greenTexture
+ );
+ expect(greenTexture.width).toBe(1);
+ expect(greenTexture.height).toBe(4);
+ }
+ );
+ });
});
it("destroys", function () {
@@ -471,19 +471,19 @@ describe("Scene/Model/CustomShader", function () {
});
shaders.push(customShader);
- return waitForTextureLoad(customShader, "u_blue").then(
- function (texture) {
- expect(customShader.isDestroyed()).toBe(false);
- expect(texture.isDestroyed()).toBe(false);
+ return waitForTextureLoad(customShader, "u_blue").then(function (
+ texture
+ ) {
+ expect(customShader.isDestroyed()).toBe(false);
+ expect(texture.isDestroyed()).toBe(false);
- customShader.destroy();
+ customShader.destroy();
- expect(customShader.isDestroyed()).toBe(true);
- expect(texture.isDestroyed()).toBe(true);
- },
- );
+ expect(customShader.isDestroyed()).toBe(true);
+ expect(texture.isDestroyed()).toBe(true);
+ });
});
},
- "WebGL",
+ "WebGL"
);
});
diff --git a/packages/engine/Specs/Scene/Model/DequantizationPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/DequantizationPipelineStageSpec.js
index 47cef0858305..c8eed6be5bd5 100644
--- a/packages/engine/Specs/Scene/Model/DequantizationPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/DequantizationPipelineStageSpec.js
@@ -96,7 +96,7 @@ describe(
[
" attributes.normalMC = czm_octDecode(a_quantized_normalMC, model_normalizationRange_normalMC).zxy;",
" attributes.positionMC = model_quantizedVolumeOffset_positionMC + a_quantized_positionMC * model_quantizedVolumeStepSize_positionMC;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentDefines(shaderBuilder, []);
ShaderBuilderTester.expectHasFragmentFunctionIds(shaderBuilder, []);
@@ -125,11 +125,9 @@ describe(
const uniformValues = {
normalRange: uniformMap.model_normalizationRange_normalMC(),
positionOffset: uniformMap.model_quantizedVolumeOffset_positionMC(),
- positionStepSize:
- uniformMap.model_quantizedVolumeStepSize_positionMC(),
+ positionStepSize: uniformMap.model_quantizedVolumeStepSize_positionMC(),
texCoordOffset: uniformMap.model_quantizedVolumeOffset_texCoord_0(),
- texCoordStepSize:
- uniformMap.model_quantizedVolumeStepSize_texCoord_0(),
+ texCoordStepSize: uniformMap.model_quantizedVolumeStepSize_texCoord_0(),
};
const expected = {
@@ -137,20 +135,20 @@ describe(
positionOffset: new Cartesian3(
-2.430910110473633,
0.2667999863624573,
- -1.3960000276565552,
+ -1.3960000276565552
),
positionStepSize: new Cartesian3(
0.0002971928118058615,
0.0002971928118058615,
- 0.0002971928118058615,
+ 0.0002971928118058615
),
texCoordOffset: new Cartesian2(
0.0029563899151980877,
- 0.015672028064727783,
+ 0.015672028064727783
),
texCoordStepSize: new Cartesian2(
0.0002397004064622816,
- 0.0002397004064622816,
+ 0.0002397004064622816
),
};
@@ -182,11 +180,9 @@ describe(
const uniformValues = {
normalRange: uniformMap.model_normalizationRange_normalMC(),
texCoordOffset: uniformMap.model_quantizedVolumeOffset_texCoord_0(),
- texCoordStepSize:
- uniformMap.model_quantizedVolumeStepSize_texCoord_0(),
+ texCoordStepSize: uniformMap.model_quantizedVolumeStepSize_texCoord_0(),
positionOffset: uniformMap.model_quantizedVolumeOffset_positionMC(),
- positionStepSize:
- uniformMap.model_quantizedVolumeStepSize_positionMC(),
+ positionStepSize: uniformMap.model_quantizedVolumeStepSize_positionMC(),
colorOffset: uniformMap.model_quantizedVolumeOffset_color_0(),
colorStepSize: uniformMap.model_quantizedVolumeStepSize_color_0(),
};
@@ -197,24 +193,24 @@ describe(
positionStepSize: new Cartesian3(
0.00006103888176768602,
0.00006103888176768602,
- 0.00006103888176768602,
+ 0.00006103888176768602
),
texCoordOffset: new Cartesian2(0, 0),
texCoordStepSize: new Cartesian2(
0.0002442002442002442,
- 0.0002442002442002442,
+ 0.0002442002442002442
),
colorOffset: new Cartesian4(
4.908018991223173e-10,
0.0006933663971722126,
0.000028382812160998583,
- 0,
+ 0
),
colorStepSize: new Cartesian4(
0.00392145689795999,
0.00392145689795999,
0.00392145689795999,
- 1,
+ 1
),
};
@@ -244,24 +240,22 @@ describe(
const uniformValues = {
texCoordOffset: uniformMap.model_quantizedVolumeOffset_texCoord_0(),
- texCoordStepSize:
- uniformMap.model_quantizedVolumeStepSize_texCoord_0(),
+ texCoordStepSize: uniformMap.model_quantizedVolumeStepSize_texCoord_0(),
positionOffset: uniformMap.model_quantizedVolumeOffset_positionMC(),
- positionStepSize:
- uniformMap.model_quantizedVolumeStepSize_positionMC(),
+ positionStepSize: uniformMap.model_quantizedVolumeStepSize_positionMC(),
};
const expected = {
texCoordOffset: new Cartesian2(0, 0),
texCoordStepSize: new Cartesian2(
0.0002442002442002442,
- 0.0002442002442002442,
+ 0.0002442002442002442
),
positionOffset: new Cartesian3(-0.5, -0.5, -0.5),
positionStepSize: new Cartesian3(
0.00006103888176768602,
0.00006103888176768602,
- 0.00006103888176768602,
+ 0.00006103888176768602
),
};
@@ -290,12 +284,12 @@ describe(
shaderBuilder,
DequantizationPipelineStage.FUNCTION_ID_DEQUANTIZATION_STAGE_VS,
DequantizationPipelineStage.FUNCTION_SIGNATURE_DEQUANTIZATION_STAGE_VS,
- [],
+ []
);
ShaderBuilderTester.expectHasFragmentDefines(shaderBuilder, []);
ShaderBuilderTester.expectHasFragmentFunctionIds(shaderBuilder, []);
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/Extensions/Gpm/GltfGpmLoaderSpec.js b/packages/engine/Specs/Scene/Model/Extensions/Gpm/GltfGpmLoaderSpec.js
index ddaf8ddfb390..6a4178441d26 100644
--- a/packages/engine/Specs/Scene/Model/Extensions/Gpm/GltfGpmLoaderSpec.js
+++ b/packages/engine/Specs/Scene/Model/Extensions/Gpm/GltfGpmLoaderSpec.js
@@ -62,8 +62,8 @@ describe("Scene/Model/Extensions/Gpm/GltfGpmLoader", function () {
Cartesian3.equalsEpsilon(
actualAnchorPoint.position,
expectedPosition,
- CesiumMath.EPSILON6,
- ),
+ CesiumMath.EPSILON6
+ )
).toBeTrue();
const expectedAdjustmentParams = new Cartesian3(0.1, 0.2, 0.3);
@@ -71,21 +71,21 @@ describe("Scene/Model/Extensions/Gpm/GltfGpmLoader", function () {
Cartesian3.equalsEpsilon(
actualAnchorPoint.adjustmentParams,
expectedAdjustmentParams,
- CesiumMath.EPSILON6,
- ),
+ CesiumMath.EPSILON6
+ )
).toBeTrue();
const expectedCovarianceDirect = Matrix3.fromArray(
[0.1, 0.2, 0.4, 0.2, 0.3, 0.5, 0.4, 0.5, 0.6],
0,
- new Matrix3(),
+ new Matrix3()
);
expect(
Matrix3.equalsEpsilon(
result.covarianceDirect,
expectedCovarianceDirect,
- CesiumMath.EPSILON6,
- ),
+ CesiumMath.EPSILON6
+ )
).toBeTrue();
});
@@ -151,8 +151,8 @@ describe("Scene/Model/Extensions/Gpm/GltfGpmLoader", function () {
Cartesian3.equalsEpsilon(
actualAnchorPoint.position,
expectedPosition,
- CesiumMath.EPSILON6,
- ),
+ CesiumMath.EPSILON6
+ )
).toBeTrue();
const expectedAdjustmentParams = new Cartesian3(0.1, 0.2, 0.3);
@@ -160,21 +160,21 @@ describe("Scene/Model/Extensions/Gpm/GltfGpmLoader", function () {
Cartesian3.equalsEpsilon(
actualAnchorPoint.adjustmentParams,
expectedAdjustmentParams,
- CesiumMath.EPSILON6,
- ),
+ CesiumMath.EPSILON6
+ )
).toBeTrue();
const expectedCovarianceMatrix = Matrix3.fromArray(
[0.1, 0.2, 0.4, 0.2, 0.3, 0.5, 0.4, 0.5, 0.6],
0,
- new Matrix3(),
+ new Matrix3()
);
expect(
Matrix3.equalsEpsilon(
actualAnchorPoint.covarianceMatrix,
expectedCovarianceMatrix,
- CesiumMath.EPSILON6,
- ),
+ CesiumMath.EPSILON6
+ )
).toBeTrue();
expect(result.intraTileCorrelationGroups.length).toBe(1);
@@ -188,8 +188,8 @@ describe("Scene/Model/Extensions/Gpm/GltfGpmLoader", function () {
Cartesian3.equalsEpsilon(
correlationGroup.rotationThetas,
expectedRotationThetas,
- CesiumMath.EPSILON6,
- ),
+ CesiumMath.EPSILON6
+ )
).toBeTrue();
const params = correlationGroup.params;
diff --git a/packages/engine/Specs/Scene/Model/Extensions/Gpm/GltfMeshPrimitiveGpmLoaderSpec.js b/packages/engine/Specs/Scene/Model/Extensions/Gpm/GltfMeshPrimitiveGpmLoaderSpec.js
index b68aa8a9f834..81591889fbdc 100644
--- a/packages/engine/Specs/Scene/Model/Extensions/Gpm/GltfMeshPrimitiveGpmLoaderSpec.js
+++ b/packages/engine/Specs/Scene/Model/Extensions/Gpm/GltfMeshPrimitiveGpmLoaderSpec.js
@@ -103,7 +103,8 @@ function createEmbeddedGltf(gpmExtension) {
},
buffers: [
{
- uri: "data:application/gltf-buffer;base64,AAABAAIAAQADAAIAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAA",
+ uri:
+ "data:application/gltf-buffer;base64,AAABAAIAAQADAAIAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAA",
byteLength: 156,
},
],
@@ -124,7 +125,8 @@ function createEmbeddedGltf(gpmExtension) {
],
images: [
{
- uri: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR42hXMUwCWBwBA0b8Wlo1lLHNt2a4tLZtbrdZatm1jWcu2bSxrtWq1Zds438O5jzcUCoU+hSEsXxCO8EQgIl8SichEISrRiE4MQjElFrGJQ1ziEZ8EJOQrEpGYJCQlGcmDQQpJSSpS8zVpSEs60pOBjGQiM1nISrZgkF2+IQff8h05yUVu8pCXfOSnAAUpROFgUESKUozilKAkpShNGcryPT9QjvJUoGIwqCQ/UpkqVKUa1alBTWpRmzrUpR71aRAMGkojGtOEn/iZpjTjF5rTgl9pyW+04vdg0Fra0JZ2tKcDHelEZ7rQlW50pwc96RUMeksf+tKP/gxgIIMYzBCGMozhjGAko4LBaBnDWMYxnglMZBJ/MJkpTGUa05nBzGAwS2Yzh7n8yTzms4CFLGIxS1jKMpazIhislFWsZg1rWcd6NrCRTWxmC1vZxnZ2BIOdsovd7GEv+9jPAQ5yiMMc4Sh/cYzjweCEnOQUpznDWc5xngv8zUUu8Q+XucLVYPCvXOM6//E/N7jJLW5zh7vc4z4PeMijYPBYnvCUZzznBS95xWve8JZ3vOcDH/nEZ7gvfpBCxLDKAAAAAElFTkSuQmCC",
+ uri:
+ "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR42hXMUwCWBwBA0b8Wlo1lLHNt2a4tLZtbrdZatm1jWcu2bSxrtWq1Zds438O5jzcUCoU+hSEsXxCO8EQgIl8SichEISrRiE4MQjElFrGJQ1ziEZ8EJOQrEpGYJCQlGcmDQQpJSSpS8zVpSEs60pOBjGQiM1nISrZgkF2+IQff8h05yUVu8pCXfOSnAAUpROFgUESKUozilKAkpShNGcryPT9QjvJUoGIwqCQ/UpkqVKUa1alBTWpRmzrUpR71aRAMGkojGtOEn/iZpjTjF5rTgl9pyW+04vdg0Fra0JZ2tKcDHelEZ7rQlW50pwc96RUMeksf+tKP/gxgIIMYzBCGMozhjGAko4LBaBnDWMYxnglMZBJ/MJkpTGUa05nBzGAwS2Yzh7n8yTzms4CFLGIxS1jKMpazIhislFWsZg1rWcd6NrCRTWxmC1vZxnZ2BIOdsovd7GEv+9jPAQ5yiMMc4Sh/cYzjweCEnOQUpznDWc5xngv8zUUu8Q+XucLVYPCvXOM6//E/N7jJLW5zh7vc4z4PeMijYPBYnvCUZzznBS95xWve8JZ3vOcDH/nEZ7gvfpBCxLDKAAAAAElFTkSuQmCC",
mimeType: "image/png",
},
],
@@ -361,7 +363,7 @@ describe(
const destroyTexture = spyOn(
GltfTextureLoader.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
const loader = new GltfMeshPrimitiveGpmLoader({
@@ -393,7 +395,7 @@ describe(
const destroyTexture = spyOn(
GltfTextureLoader.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
const loader = new GltfMeshPrimitiveGpmLoader({
@@ -423,5 +425,5 @@ describe(
return resolveAfterDestroy(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/FeatureIdPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/FeatureIdPipelineStageSpec.js
index 91a653a3a154..889c6e5c2eca 100644
--- a/packages/engine/Specs/Scene/Model/FeatureIdPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/FeatureIdPipelineStageSpec.js
@@ -115,31 +115,31 @@ describe(
shaderBuilder,
FeatureIdPipelineStage.STRUCT_ID_FEATURE_IDS_VS,
FeatureIdPipelineStage.STRUCT_NAME_FEATURE_IDS,
- [],
+ []
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
FeatureIdPipelineStage.STRUCT_ID_FEATURE_IDS_FS,
FeatureIdPipelineStage.STRUCT_NAME_FEATURE_IDS,
- [],
+ []
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
FeatureIdPipelineStage.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,
FeatureIdPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS,
- [],
+ []
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
FeatureIdPipelineStage.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,
FeatureIdPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS,
- [],
+ []
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
FeatureIdPipelineStage.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,
FeatureIdPipelineStage.FUNCTION_SIGNATURE_SET_FEATURE_ID_VARYINGS,
- [],
+ []
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, []);
ShaderBuilderTester.expectHasFragmentDefines(shaderBuilder, []);
@@ -187,7 +187,7 @@ describe(
" int featureId_1;",
" int perPoint;",
" int town;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
@@ -198,7 +198,7 @@ describe(
" int featureId_1;",
" int perPoint;",
" int town;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
@@ -207,7 +207,7 @@ describe(
[
" featureIds.featureId_0 = int(czm_round(a_implicit_featureId_0));",
" featureIds.featureId_1 = int(czm_round(attributes.featureId_0));",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
@@ -216,7 +216,7 @@ describe(
[
" featureIds.featureId_0 = int(czm_round(v_implicit_featureId_0));",
" featureIds.featureId_1 = int(czm_round(attributes.featureId_0));",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
@@ -225,7 +225,7 @@ describe(
[
" featureIds.perPoint = featureIds.featureId_0;",
" featureIds.town = featureIds.featureId_1;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
@@ -234,13 +234,13 @@ describe(
[
" featureIds.perPoint = featureIds.featureId_0;",
" featureIds.town = featureIds.featureId_1;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
FeatureIdPipelineStage.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,
FeatureIdPipelineStage.FUNCTION_SIGNATURE_SET_FEATURE_ID_VARYINGS,
- [" v_implicit_featureId_0 = a_implicit_featureId_0;"],
+ [" v_implicit_featureId_0 = a_implicit_featureId_0;"]
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, []);
ShaderBuilderTester.expectHasFragmentDefines(shaderBuilder, []);
@@ -273,7 +273,7 @@ describe(
expect(implicitAttribute.normalize).toBe(false);
expect(implicitAttribute.componentsPerAttribute).toBe(1);
expect(implicitAttribute.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(implicitAttribute.strideInBytes).toBe(4);
expect(implicitAttribute.offsetInBytes).toBe(0);
@@ -309,7 +309,7 @@ describe(
" int featureId_1;",
" int buildings;",
" int defaultIdsTest;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
@@ -320,7 +320,7 @@ describe(
" int featureId_1;",
" int buildings;",
" int defaultIdsTest;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
@@ -329,7 +329,7 @@ describe(
[
" featureIds.featureId_0 = int(czm_round(attributes.featureId_0));",
" featureIds.featureId_1 = int(czm_round(a_implicit_featureId_1));",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
@@ -338,7 +338,7 @@ describe(
[
" featureIds.featureId_0 = int(czm_round(attributes.featureId_0));",
" featureIds.featureId_1 = int(czm_round(v_implicit_featureId_1));",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
@@ -347,7 +347,7 @@ describe(
[
" featureIds.buildings = featureIds.featureId_0;",
" featureIds.defaultIdsTest = featureIds.featureId_1;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
@@ -356,13 +356,13 @@ describe(
[
" featureIds.buildings = featureIds.featureId_0;",
" featureIds.defaultIdsTest = featureIds.featureId_1;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
FeatureIdPipelineStage.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,
FeatureIdPipelineStage.FUNCTION_SIGNATURE_SET_FEATURE_ID_VARYINGS,
- [" v_implicit_featureId_1 = a_implicit_featureId_1;"],
+ [" v_implicit_featureId_1 = a_implicit_featureId_1;"]
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, []);
ShaderBuilderTester.expectHasFragmentDefines(shaderBuilder, []);
@@ -395,7 +395,7 @@ describe(
expect(implicitAttribute.normalize).toBe(false);
expect(implicitAttribute.componentsPerAttribute).toBe(1);
expect(implicitAttribute.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(implicitAttribute.strideInBytes).toBe(4);
expect(implicitAttribute.offsetInBytes).toBe(0);
@@ -426,19 +426,19 @@ describe(
shaderBuilder,
FeatureIdPipelineStage.STRUCT_ID_FEATURE_IDS_VS,
FeatureIdPipelineStage.STRUCT_NAME_FEATURE_IDS,
- [],
+ []
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
FeatureIdPipelineStage.STRUCT_ID_FEATURE_IDS_FS,
FeatureIdPipelineStage.STRUCT_NAME_FEATURE_IDS,
- [" int featureId_0;", " int landCover;"],
+ [" int featureId_0;", " int landCover;"]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
FeatureIdPipelineStage.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,
FeatureIdPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS,
- [],
+ []
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
@@ -446,25 +446,25 @@ describe(
FeatureIdPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS,
[
" featureIds.featureId_0 = czm_unpackUint(texture(u_featureIdTexture_0, v_texCoord_0).r);",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
FeatureIdPipelineStage.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS,
FeatureIdPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES,
- [],
+ []
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
FeatureIdPipelineStage.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS,
FeatureIdPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES,
- [" featureIds.landCover = featureIds.featureId_0;"],
+ [" featureIds.landCover = featureIds.featureId_0;"]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
FeatureIdPipelineStage.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,
FeatureIdPipelineStage.FUNCTION_SIGNATURE_SET_FEATURE_ID_VARYINGS,
- [],
+ []
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, []);
ShaderBuilderTester.expectHasFragmentDefines(shaderBuilder, []);
@@ -488,14 +488,14 @@ describe(
expect(uniformMap.u_featureIdTexture_0).toBeDefined();
const featureIdTexture = primitive.featureIds[0];
expect(uniformMap.u_featureIdTexture_0()).toBe(
- featureIdTexture.textureReader.texture,
+ featureIdTexture.textureReader.texture
);
});
});
it("adds feature ID texture transforms to the shader", async function () {
const gltfLoader = await loadGltf(
- featureIdTextureWithTextureTransformUrl,
+ featureIdTextureWithTextureTransformUrl
);
const components = gltfLoader.components;
const node = components.nodes[0];
@@ -510,19 +510,19 @@ describe(
shaderBuilder,
FeatureIdPipelineStage.STRUCT_ID_FEATURE_IDS_VS,
FeatureIdPipelineStage.STRUCT_NAME_FEATURE_IDS,
- [],
+ []
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
FeatureIdPipelineStage.STRUCT_ID_FEATURE_IDS_FS,
FeatureIdPipelineStage.STRUCT_NAME_FEATURE_IDS,
- [" int featureId_0;"],
+ [" int featureId_0;"]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
FeatureIdPipelineStage.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,
FeatureIdPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS,
- [],
+ []
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
@@ -530,19 +530,19 @@ describe(
FeatureIdPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS,
[
" featureIds.featureId_0 = czm_unpackUint(texture(u_featureIdTexture_0, vec2(u_featureIdTexture_0Transform * vec3(v_texCoord_0, 1.0))).r);",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
FeatureIdPipelineStage.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS,
FeatureIdPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES,
- [],
+ []
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
FeatureIdPipelineStage.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,
FeatureIdPipelineStage.FUNCTION_SIGNATURE_SET_FEATURE_ID_VARYINGS,
- [],
+ []
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, []);
ShaderBuilderTester.expectHasFragmentDefines(shaderBuilder, []);
@@ -567,7 +567,7 @@ describe(
expect(uniformMap.u_featureIdTexture_0).toBeDefined();
const featureIdTexture = primitive.featureIds[0];
expect(uniformMap.u_featureIdTexture_0()).toBe(
- featureIdTexture.textureReader.texture,
+ featureIdTexture.textureReader.texture
);
});
@@ -586,7 +586,7 @@ describe(
shaderBuilder,
FeatureIdPipelineStage.STRUCT_ID_FEATURE_IDS_VS,
FeatureIdPipelineStage.STRUCT_NAME_FEATURE_IDS,
- [],
+ []
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
@@ -607,13 +607,13 @@ describe(
" int idsGR;",
" int idsAGBB;",
" int idsGWithNull;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
FeatureIdPipelineStage.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,
FeatureIdPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS,
- [],
+ []
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
@@ -627,13 +627,13 @@ describe(
" featureIds.featureId_4 = czm_unpackUint(texture(u_featureIdTexture_4, v_texCoord_0).gr);",
" featureIds.featureId_5 = czm_unpackUint(texture(u_featureIdTexture_5, v_texCoord_0).agbb);",
" featureIds.featureId_6 = czm_unpackUint(texture(u_featureIdTexture_6, v_texCoord_0).g);",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
FeatureIdPipelineStage.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS,
FeatureIdPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES,
- [],
+ []
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
@@ -647,13 +647,13 @@ describe(
" featureIds.idsGR = featureIds.featureId_4;",
" featureIds.idsAGBB = featureIds.featureId_5;",
" featureIds.idsGWithNull = featureIds.featureId_6;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
FeatureIdPipelineStage.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,
FeatureIdPipelineStage.FUNCTION_SIGNATURE_SET_FEATURE_ID_VARYINGS,
- [],
+ []
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, []);
ShaderBuilderTester.expectHasFragmentDefines(shaderBuilder, []);
@@ -713,7 +713,7 @@ describe(
" int instanceFeatureId_1;",
" int perInstance;",
" int section;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
@@ -724,7 +724,7 @@ describe(
" int instanceFeatureId_1;",
" int perInstance;",
" int section;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
@@ -733,7 +733,7 @@ describe(
[
" featureIds.instanceFeatureId_0 = int(czm_round(a_implicit_instanceFeatureId_0));",
" featureIds.instanceFeatureId_1 = int(czm_round(a_instanceFeatureId_0));",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
@@ -742,7 +742,7 @@ describe(
[
" featureIds.instanceFeatureId_0 = int(czm_round(v_implicit_instanceFeatureId_0));",
" featureIds.instanceFeatureId_1 = int(czm_round(v_instanceFeatureId_0));",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
@@ -751,7 +751,7 @@ describe(
[
" featureIds.perInstance = featureIds.instanceFeatureId_0;",
" featureIds.section = featureIds.instanceFeatureId_1;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
@@ -760,7 +760,7 @@ describe(
[
" featureIds.perInstance = featureIds.instanceFeatureId_0;",
" featureIds.section = featureIds.instanceFeatureId_1;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
@@ -769,7 +769,7 @@ describe(
[
" v_instanceFeatureId_0 = a_instanceFeatureId_0;",
" v_implicit_instanceFeatureId_0 = a_implicit_instanceFeatureId_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, []);
ShaderBuilderTester.expectHasFragmentDefines(shaderBuilder, []);
@@ -803,7 +803,7 @@ describe(
expect(implicitAttribute.normalize).toBe(false);
expect(implicitAttribute.componentsPerAttribute).toBe(1);
expect(implicitAttribute.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(implicitAttribute.strideInBytes).toBe(4);
expect(implicitAttribute.offsetInBytes).toBe(0);
@@ -817,5 +817,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/GeoJsonLoaderSpec.js b/packages/engine/Specs/Scene/Model/GeoJsonLoaderSpec.js
index 5edd68d8acdf..adb5ca1b8bd1 100644
--- a/packages/engine/Specs/Scene/Model/GeoJsonLoaderSpec.js
+++ b/packages/engine/Specs/Scene/Model/GeoJsonLoaderSpec.js
@@ -93,12 +93,12 @@ describe(
const attributes = primitive.attributes;
const positionAttribute = getAttribute(
attributes,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
const featureIdAttribute = getAttribute(
attributes,
VertexAttributeSemantic.FEATURE_ID,
- 0,
+ 0
);
const indices = primitive.indices;
const material = primitive.material;
@@ -109,7 +109,7 @@ describe(
expect(positionAttribute.buffer).toBeDefined();
expect(positionAttribute.buffer.sizeInBytes).toBe(
- expected.vertexCount * 3 * 4,
+ expected.vertexCount * 3 * 4
);
expect(positionAttribute.count).toBe(expected.vertexCount);
expect(positionAttribute.min).toBeDefined();
@@ -117,7 +117,7 @@ describe(
expect(featureIdAttribute.buffer).toBeDefined();
expect(featureIdAttribute.buffer.sizeInBytes).toBe(
- expected.vertexCount * 4,
+ expected.vertexCount * 4
);
expect(featureIdAttribute.count).toBe(expected.vertexCount);
@@ -252,5 +252,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/GeometryPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/GeometryPipelineStageSpec.js
index 57d9e3794a1f..cc34a4795f4b 100644
--- a/packages/engine/Specs/Scene/Model/GeometryPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/GeometryPipelineStageSpec.js
@@ -111,13 +111,13 @@ describe(
shaderBuilder,
SelectedFeatureIdPipelineStage.STRUCT_ID_SELECTED_FEATURE,
SelectedFeatureIdPipelineStage.STRUCT_NAME_SELECTED_FEATURE,
- [],
+ []
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
SelectedFeatureIdPipelineStage.STRUCT_ID_SELECTED_FEATURE,
SelectedFeatureIdPipelineStage.STRUCT_NAME_SELECTED_FEATURE,
- [],
+ []
);
}
@@ -167,7 +167,7 @@ describe(
GeometryPipelineStage.process(
renderResources,
positionOnlyPrimitive,
- scene.frameState,
+ scene.frameState
);
const shaderBuilder = renderResources.shaderBuilder;
@@ -179,7 +179,7 @@ describe(
expect(positionAttribute.vertexBuffer).toBeDefined();
expect(positionAttribute.componentsPerAttribute).toEqual(3);
expect(positionAttribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(positionAttribute.offsetInBytes).toBe(0);
expect(positionAttribute.strideInBytes).toBe(12);
@@ -188,35 +188,31 @@ describe(
shaderBuilder,
GeometryPipelineStage.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,
GeometryPipelineStage.STRUCT_NAME_PROCESSED_ATTRIBUTES,
- [" vec3 positionMC;"],
+ [" vec3 positionMC;"]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
GeometryPipelineStage.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,
GeometryPipelineStage.STRUCT_NAME_PROCESSED_ATTRIBUTES,
- [
- " vec3 positionMC;",
- " vec3 positionWC;",
- " vec3 positionEC;",
- ],
+ [" vec3 positionMC;", " vec3 positionWC;", " vec3 positionEC;"]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
GeometryPipelineStage.FUNCTION_ID_INITIALIZE_ATTRIBUTES,
GeometryPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_ATTRIBUTES,
- [" attributes.positionMC = a_positionMC;"],
+ [" attributes.positionMC = a_positionMC;"]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
GeometryPipelineStage.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,
GeometryPipelineStage.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,
- [],
+ []
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
GeometryPipelineStage.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,
GeometryPipelineStage.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,
- [],
+ []
);
ShaderBuilderTester.expectHasVaryings(shaderBuilder, [
"vec3 v_positionEC;",
@@ -228,7 +224,7 @@ describe(
ShaderBuilderTester.expectHasAttributes(
shaderBuilder,
"in vec3 a_positionMC;",
- [],
+ []
);
verifyFeatureStruct(shaderBuilder);
});
@@ -242,7 +238,7 @@ describe(
GeometryPipelineStage.process(
renderResources,
primitive,
- scene.frameState,
+ scene.frameState
);
const shaderBuilder = renderResources.shaderBuilder;
@@ -255,7 +251,7 @@ describe(
expect(normalAttribute.vertexBuffer).toBeDefined();
expect(normalAttribute.componentsPerAttribute).toEqual(3);
expect(normalAttribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(normalAttribute.offsetInBytes).toBe(0);
expect(normalAttribute.strideInBytes).toBe(12);
@@ -265,7 +261,7 @@ describe(
expect(positionAttribute.vertexBuffer).toBeDefined();
expect(positionAttribute.componentsPerAttribute).toEqual(3);
expect(positionAttribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(positionAttribute.offsetInBytes).toBe(288);
expect(positionAttribute.strideInBytes).toBe(12);
@@ -275,7 +271,7 @@ describe(
expect(texCoord0Attribute.vertexBuffer).toBeDefined();
expect(texCoord0Attribute.componentsPerAttribute).toEqual(2);
expect(texCoord0Attribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(texCoord0Attribute.offsetInBytes).toBe(0);
expect(texCoord0Attribute.strideInBytes).toBe(8);
@@ -284,11 +280,7 @@ describe(
shaderBuilder,
GeometryPipelineStage.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,
GeometryPipelineStage.STRUCT_NAME_PROCESSED_ATTRIBUTES,
- [
- " vec3 positionMC;",
- " vec3 normalMC;",
- " vec2 texCoord_0;",
- ],
+ [" vec3 positionMC;", " vec3 normalMC;", " vec2 texCoord_0;"]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
@@ -300,7 +292,7 @@ describe(
" vec3 positionEC;",
" vec3 normalEC;",
" vec2 texCoord_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
@@ -310,19 +302,19 @@ describe(
" attributes.positionMC = a_positionMC;",
" attributes.normalMC = a_normalMC;",
" attributes.texCoord_0 = a_texCoord_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
GeometryPipelineStage.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,
GeometryPipelineStage.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,
- [" v_texCoord_0 = attributes.texCoord_0;"],
+ [" v_texCoord_0 = attributes.texCoord_0;"]
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
GeometryPipelineStage.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,
GeometryPipelineStage.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,
- [" attributes.texCoord_0 = v_texCoord_0;"],
+ [" attributes.texCoord_0 = v_texCoord_0;"]
);
ShaderBuilderTester.expectHasVaryings(shaderBuilder, [
"vec3 v_normalEC;",
@@ -342,7 +334,7 @@ describe(
ShaderBuilderTester.expectHasAttributes(
shaderBuilder,
"in vec3 a_positionMC;",
- ["in vec3 a_normalMC;", "in vec2 a_texCoord_0;"],
+ ["in vec3 a_normalMC;", "in vec2 a_texCoord_0;"]
);
verifyFeatureStruct(shaderBuilder);
});
@@ -361,7 +353,7 @@ describe(
GeometryPipelineStage.process(
renderResources,
primitive,
- scene2D.frameState,
+ scene2D.frameState
);
const shaderBuilder = renderResources.shaderBuilder;
@@ -377,7 +369,7 @@ describe(
expect(positionAttribute.vertexBuffer).toBeDefined();
expect(positionAttribute.componentsPerAttribute).toEqual(3);
expect(positionAttribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(positionAttribute.offsetInBytes).toBe(288);
expect(positionAttribute.strideInBytes).toBe(12);
@@ -385,11 +377,11 @@ describe(
const position2DAttribute = attributes[2];
expect(position2DAttribute.index).toEqual(2);
expect(position2DAttribute.vertexBuffer).toBe(
- runtimePrimitive.positionBuffer2D,
+ runtimePrimitive.positionBuffer2D
);
expect(position2DAttribute.componentsPerAttribute).toEqual(3);
expect(position2DAttribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(position2DAttribute.offsetInBytes).toBe(0);
expect(position2DAttribute.strideInBytes).toBeUndefined();
@@ -406,7 +398,7 @@ describe(
" vec3 position2D;",
" vec3 normalMC;",
" vec2 texCoord_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
@@ -417,7 +409,7 @@ describe(
" attributes.position2D = a_position2D;",
" attributes.normalMC = a_normalMC;",
" attributes.texCoord_0 = a_texCoord_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
"HAS_NORMALS",
@@ -430,7 +422,7 @@ describe(
"in vec3 a_position2D;",
"in vec3 a_normalMC;",
"in vec2 a_texCoord_0;",
- ],
+ ]
);
verifyFeatureStruct(shaderBuilder);
});
@@ -445,7 +437,7 @@ describe(
GeometryPipelineStage.process(
renderResources,
primitive,
- scene.frameState,
+ scene.frameState
);
const shaderBuilder = renderResources.shaderBuilder;
@@ -458,7 +450,7 @@ describe(
expect(texCoord0Attribute.vertexBuffer).toBeDefined();
expect(texCoord0Attribute.componentsPerAttribute).toEqual(2);
expect(texCoord0Attribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(texCoord0Attribute.offsetInBytes).toBe(0);
expect(texCoord0Attribute.strideInBytes).toBe(8);
@@ -468,7 +460,7 @@ describe(
expect(normalAttribute.vertexBuffer).toBeDefined();
expect(normalAttribute.componentsPerAttribute).toEqual(3);
expect(normalAttribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(normalAttribute.offsetInBytes).toBe(0);
expect(normalAttribute.strideInBytes).toBe(12);
@@ -478,7 +470,7 @@ describe(
expect(tangentAttribute.vertexBuffer).toBeDefined();
expect(tangentAttribute.componentsPerAttribute).toEqual(4);
expect(tangentAttribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(tangentAttribute.offsetInBytes).toBe(0);
expect(tangentAttribute.strideInBytes).toBe(16);
@@ -488,7 +480,7 @@ describe(
expect(positionAttribute.vertexBuffer).toBeDefined();
expect(positionAttribute.componentsPerAttribute).toEqual(3);
expect(positionAttribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(positionAttribute.offsetInBytes).toBe(0);
expect(positionAttribute.strideInBytes).toBe(12);
@@ -504,7 +496,7 @@ describe(
" float tangentSignMC;",
" vec3 bitangentMC;",
" vec2 texCoord_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
@@ -518,7 +510,7 @@ describe(
" vec3 tangentEC;",
" vec3 bitangentEC;",
" vec2 texCoord_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
@@ -530,19 +522,19 @@ describe(
" attributes.tangentMC = a_tangentMC.xyz;",
" attributes.tangentSignMC = a_tangentMC.w;",
" attributes.texCoord_0 = a_texCoord_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
GeometryPipelineStage.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,
GeometryPipelineStage.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,
- [" v_texCoord_0 = attributes.texCoord_0;"],
+ [" v_texCoord_0 = attributes.texCoord_0;"]
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
GeometryPipelineStage.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,
GeometryPipelineStage.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,
- [" attributes.texCoord_0 = v_texCoord_0;"],
+ [" attributes.texCoord_0 = v_texCoord_0;"]
);
ShaderBuilderTester.expectHasVaryings(shaderBuilder, [
"vec3 v_normalEC;",
@@ -572,7 +564,7 @@ describe(
"in vec3 a_normalMC;",
"in vec4 a_tangentMC;",
"in vec2 a_texCoord_0;",
- ],
+ ]
);
verifyFeatureStruct(shaderBuilder);
});
@@ -587,7 +579,7 @@ describe(
GeometryPipelineStage.process(
renderResources,
primitive,
- scene.frameState,
+ scene.frameState
);
const shaderBuilder = renderResources.shaderBuilder;
@@ -600,7 +592,7 @@ describe(
expect(positionAttribute.vertexBuffer).toBeDefined();
expect(positionAttribute.componentsPerAttribute).toEqual(3);
expect(positionAttribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
const texCoord0Attribute = attributes[1];
@@ -608,7 +600,7 @@ describe(
expect(texCoord0Attribute.vertexBuffer).toBeDefined();
expect(texCoord0Attribute.componentsPerAttribute).toEqual(2);
expect(texCoord0Attribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(texCoord0Attribute.offsetInBytes).toBe(0);
expect(texCoord0Attribute.strideInBytes).toBe(8);
@@ -618,7 +610,7 @@ describe(
expect(texCoord1Attribute.vertexBuffer).toBeDefined();
expect(texCoord1Attribute.componentsPerAttribute).toEqual(2);
expect(texCoord1Attribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(texCoord1Attribute.offsetInBytes).toBe(0);
expect(texCoord1Attribute.strideInBytes).toBe(8);
@@ -631,7 +623,7 @@ describe(
" vec3 positionMC;",
" vec2 texCoord_0;",
" vec2 texCoord_1;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
@@ -643,7 +635,7 @@ describe(
" vec3 positionEC;",
" vec2 texCoord_0;",
" vec2 texCoord_1;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
@@ -653,7 +645,7 @@ describe(
" attributes.positionMC = a_positionMC;",
" attributes.texCoord_0 = a_texCoord_0;",
" attributes.texCoord_1 = a_texCoord_1;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
@@ -662,7 +654,7 @@ describe(
[
" v_texCoord_0 = attributes.texCoord_0;",
" v_texCoord_1 = attributes.texCoord_1;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
@@ -671,7 +663,7 @@ describe(
[
" attributes.texCoord_0 = v_texCoord_0;",
" attributes.texCoord_1 = v_texCoord_1;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVaryings(shaderBuilder, [
"vec2 v_texCoord_0;",
@@ -691,7 +683,7 @@ describe(
ShaderBuilderTester.expectHasAttributes(
shaderBuilder,
"in vec3 a_positionMC;",
- ["in vec2 a_texCoord_0;", "in vec2 a_texCoord_1;"],
+ ["in vec2 a_texCoord_0;", "in vec2 a_texCoord_1;"]
);
verifyFeatureStruct(shaderBuilder);
});
@@ -706,7 +698,7 @@ describe(
GeometryPipelineStage.process(
renderResources,
primitive,
- scene.frameState,
+ scene.frameState
);
const shaderBuilder = renderResources.shaderBuilder;
@@ -719,7 +711,7 @@ describe(
expect(color0Attribute.vertexBuffer).toBeDefined();
expect(color0Attribute.componentsPerAttribute).toEqual(4);
expect(color0Attribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(color0Attribute.offsetInBytes).toBe(0);
expect(color0Attribute.strideInBytes).toBe(16);
@@ -729,7 +721,7 @@ describe(
expect(normalAttribute.vertexBuffer).toBeDefined();
expect(normalAttribute.componentsPerAttribute).toEqual(3);
expect(normalAttribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(normalAttribute.offsetInBytes).toBe(0);
expect(normalAttribute.strideInBytes).toBe(12);
@@ -739,7 +731,7 @@ describe(
expect(positionAttribute.vertexBuffer).toBeDefined();
expect(positionAttribute.componentsPerAttribute).toEqual(3);
expect(positionAttribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(positionAttribute.offsetInBytes).toBe(0);
expect(positionAttribute.strideInBytes).toBe(12);
@@ -749,7 +741,7 @@ describe(
expect(texCoord0Attribute.vertexBuffer).toBeDefined();
expect(texCoord0Attribute.componentsPerAttribute).toEqual(2);
expect(texCoord0Attribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(texCoord0Attribute.offsetInBytes).toBe(0);
expect(texCoord0Attribute.strideInBytes).toBe(8);
@@ -763,7 +755,7 @@ describe(
" vec3 normalMC;",
" vec4 color_0;",
" vec2 texCoord_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
@@ -776,7 +768,7 @@ describe(
" vec3 normalEC;",
" vec4 color_0;",
" vec2 texCoord_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
@@ -787,7 +779,7 @@ describe(
" attributes.normalMC = a_normalMC;",
" attributes.color_0 = a_color_0;",
" attributes.texCoord_0 = a_texCoord_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
@@ -796,7 +788,7 @@ describe(
[
" v_color_0 = attributes.color_0;",
" v_texCoord_0 = attributes.texCoord_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
@@ -805,7 +797,7 @@ describe(
[
" attributes.color_0 = v_color_0;",
" attributes.texCoord_0 = v_texCoord_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVaryings(shaderBuilder, [
"vec3 v_normalEC;",
@@ -828,11 +820,7 @@ describe(
ShaderBuilderTester.expectHasAttributes(
shaderBuilder,
"in vec3 a_positionMC;",
- [
- "in vec3 a_normalMC;",
- "in vec4 a_color_0;",
- "in vec2 a_texCoord_0;",
- ],
+ ["in vec3 a_normalMC;", "in vec4 a_color_0;", "in vec2 a_texCoord_0;"]
);
verifyFeatureStruct(shaderBuilder);
});
@@ -847,7 +835,7 @@ describe(
GeometryPipelineStage.process(
renderResources,
primitive,
- scene.frameState,
+ scene.frameState
);
const shaderBuilder = renderResources.shaderBuilder;
@@ -860,7 +848,7 @@ describe(
expect(positionAttribute.vertexBuffer).toBeDefined();
expect(positionAttribute.componentsPerAttribute).toEqual(3);
expect(positionAttribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(positionAttribute.offsetInBytes).toBe(0);
expect(positionAttribute.strideInBytes).toBe(24);
@@ -870,7 +858,7 @@ describe(
expect(color0Attribute.vertexBuffer).toBeDefined();
expect(color0Attribute.componentsPerAttribute).toEqual(3);
expect(color0Attribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(color0Attribute.offsetInBytes).toBe(12);
expect(color0Attribute.strideInBytes).toBe(24);
@@ -879,7 +867,7 @@ describe(
shaderBuilder,
GeometryPipelineStage.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,
GeometryPipelineStage.STRUCT_NAME_PROCESSED_ATTRIBUTES,
- [" vec3 positionMC;", " vec4 color_0;"],
+ [" vec3 positionMC;", " vec4 color_0;"]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
@@ -890,7 +878,7 @@ describe(
" vec3 positionWC;",
" vec3 positionEC;",
" vec4 color_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
@@ -899,19 +887,19 @@ describe(
[
" attributes.positionMC = a_positionMC;",
" attributes.color_0 = a_color_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
GeometryPipelineStage.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,
GeometryPipelineStage.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,
- [" v_color_0 = attributes.color_0;"],
+ [" v_color_0 = attributes.color_0;"]
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
GeometryPipelineStage.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,
GeometryPipelineStage.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,
- [" attributes.color_0 = v_color_0;"],
+ [" attributes.color_0 = v_color_0;"]
);
ShaderBuilderTester.expectHasVaryings(shaderBuilder, [
"vec4 v_color_0;",
@@ -930,7 +918,7 @@ describe(
ShaderBuilderTester.expectHasAttributes(
shaderBuilder,
"in vec3 a_positionMC;",
- ["in vec4 a_color_0;"],
+ ["in vec4 a_color_0;"]
);
verifyFeatureStruct(shaderBuilder);
});
@@ -942,7 +930,7 @@ describe(
GeometryPipelineStage.process(
renderResources,
customAttributePrimitive,
- scene.frameState,
+ scene.frameState
);
const shaderBuilder = renderResources.shaderBuilder;
@@ -955,7 +943,7 @@ describe(
expect(positionAttribute.vertexBuffer).toBeDefined();
expect(positionAttribute.componentsPerAttribute).toEqual(3);
expect(positionAttribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(positionAttribute.offsetInBytes).toBe(0);
expect(positionAttribute.strideInBytes).toBe(12);
@@ -965,7 +953,7 @@ describe(
expect(customAttribute.vertexBuffer).toBeDefined();
expect(customAttribute.componentsPerAttribute).toEqual(2);
expect(customAttribute.componentDatatype).toEqual(
- ComponentDatatype.UNSIGNED_SHORT,
+ ComponentDatatype.UNSIGNED_SHORT
);
expect(customAttribute.offsetInBytes).toBe(0);
expect(customAttribute.strideInBytes).toBe(4);
@@ -974,7 +962,7 @@ describe(
shaderBuilder,
GeometryPipelineStage.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,
GeometryPipelineStage.STRUCT_NAME_PROCESSED_ATTRIBUTES,
- [" vec3 positionMC;", " vec2 temperature;"],
+ [" vec3 positionMC;", " vec2 temperature;"]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
@@ -985,7 +973,7 @@ describe(
" vec3 positionWC;",
" vec3 positionEC;",
" vec2 temperature;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
@@ -994,19 +982,19 @@ describe(
[
" attributes.positionMC = a_positionMC;",
" attributes.temperature = a_temperature;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
GeometryPipelineStage.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,
GeometryPipelineStage.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,
- [" v_temperature = attributes.temperature;"],
+ [" v_temperature = attributes.temperature;"]
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
GeometryPipelineStage.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,
GeometryPipelineStage.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,
- [" attributes.temperature = v_temperature;"],
+ [" attributes.temperature = v_temperature;"]
);
ShaderBuilderTester.expectHasVaryings(shaderBuilder, [
"vec2 v_temperature;",
@@ -1017,7 +1005,7 @@ describe(
ShaderBuilderTester.expectHasAttributes(
shaderBuilder,
"in vec3 a_positionMC;",
- ["in vec2 a_temperature;"],
+ ["in vec2 a_temperature;"]
);
verifyFeatureStruct(shaderBuilder);
});
@@ -1031,7 +1019,7 @@ describe(
GeometryPipelineStage.process(
renderResources,
primitive,
- scene.frameState,
+ scene.frameState
);
const shaderBuilder = renderResources.shaderBuilder;
@@ -1044,7 +1032,7 @@ describe(
expect(positionAttribute.vertexBuffer).toBeDefined();
expect(positionAttribute.componentsPerAttribute).toEqual(3);
expect(positionAttribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(positionAttribute.offsetInBytes).toBe(0);
expect(positionAttribute.strideInBytes).toBe(12);
@@ -1054,7 +1042,7 @@ describe(
expect(normalAttribute.vertexBuffer).toBeDefined();
expect(normalAttribute.componentsPerAttribute).toEqual(3);
expect(normalAttribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(normalAttribute.offsetInBytes).toBe(0);
expect(normalAttribute.strideInBytes).toBe(12);
@@ -1064,7 +1052,7 @@ describe(
expect(featureId0Attribute.vertexBuffer).toBeDefined();
expect(featureId0Attribute.componentsPerAttribute).toEqual(1);
expect(featureId0Attribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(featureId0Attribute.offsetInBytes).toBe(0);
expect(featureId0Attribute.strideInBytes).toBe(4);
@@ -1077,7 +1065,7 @@ describe(
" vec3 positionMC;",
" vec3 normalMC;",
" float featureId_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
@@ -1089,7 +1077,7 @@ describe(
" vec3 positionEC;",
" vec3 normalEC;",
" float featureId_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
@@ -1099,12 +1087,12 @@ describe(
" attributes.positionMC = a_positionMC;",
" attributes.normalMC = a_normalMC;",
" attributes.featureId_0 = a_featureId_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasAttributes(
shaderBuilder,
"in vec3 a_positionMC;",
- ["in float a_featureId_0;", "in vec3 a_normalMC;"],
+ ["in float a_featureId_0;", "in vec3 a_normalMC;"]
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
"HAS_FEATURE_ID_0",
@@ -1127,7 +1115,7 @@ describe(
GeometryPipelineStage.process(
renderResources,
primitive,
- scene.frameState,
+ scene.frameState
);
const shaderBuilder = renderResources.shaderBuilder;
@@ -1140,7 +1128,7 @@ describe(
expect(positionAttribute.vertexBuffer).toBeDefined();
expect(positionAttribute.componentsPerAttribute).toEqual(3);
expect(positionAttribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(positionAttribute.offsetInBytes).toBe(0);
expect(positionAttribute.strideInBytes).toBe(12);
@@ -1150,7 +1138,7 @@ describe(
expect(featureId0Attribute.vertexBuffer).toBeDefined();
expect(featureId0Attribute.componentsPerAttribute).toEqual(1);
expect(featureId0Attribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(featureId0Attribute.offsetInBytes).toBe(0);
expect(featureId0Attribute.strideInBytes).toBe(4);
@@ -1159,7 +1147,7 @@ describe(
shaderBuilder,
GeometryPipelineStage.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,
GeometryPipelineStage.STRUCT_NAME_PROCESSED_ATTRIBUTES,
- [" vec3 positionMC;", " float featureId_0;"],
+ [" vec3 positionMC;", " float featureId_0;"]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
@@ -1170,7 +1158,7 @@ describe(
" vec3 positionWC;",
" vec3 positionEC;",
" float featureId_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
@@ -1179,12 +1167,12 @@ describe(
[
" attributes.positionMC = a_positionMC;",
" attributes.featureId_0 = a_featureId_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasAttributes(
shaderBuilder,
"in vec3 a_positionMC;",
- ["in float a_featureId_0;"],
+ ["in float a_featureId_0;"]
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
"HAS_FEATURE_ID_0",
@@ -1207,7 +1195,7 @@ describe(
GeometryPipelineStage.process(
renderResources,
primitive,
- scene.frameState,
+ scene.frameState
);
const shaderBuilder = renderResources.shaderBuilder;
@@ -1220,7 +1208,7 @@ describe(
expect(normalAttribute.vertexBuffer).toBeDefined();
expect(normalAttribute.componentsPerAttribute).toEqual(2);
expect(normalAttribute.componentDatatype).toEqual(
- ComponentDatatype.UNSIGNED_SHORT,
+ ComponentDatatype.UNSIGNED_SHORT
);
expect(normalAttribute.offsetInBytes).toBe(0);
expect(normalAttribute.strideInBytes).not.toBeDefined();
@@ -1230,7 +1218,7 @@ describe(
expect(positionAttribute.vertexBuffer).toBeDefined();
expect(positionAttribute.componentsPerAttribute).toEqual(3);
expect(positionAttribute.componentDatatype).toEqual(
- ComponentDatatype.UNSIGNED_SHORT,
+ ComponentDatatype.UNSIGNED_SHORT
);
expect(positionAttribute.offsetInBytes).toBe(0);
expect(positionAttribute.strideInBytes).not.toBeDefined();
@@ -1240,7 +1228,7 @@ describe(
expect(texCoord0Attribute.vertexBuffer).toBeDefined();
expect(texCoord0Attribute.componentsPerAttribute).toEqual(2);
expect(texCoord0Attribute.componentDatatype).toEqual(
- ComponentDatatype.UNSIGNED_SHORT,
+ ComponentDatatype.UNSIGNED_SHORT
);
expect(texCoord0Attribute.offsetInBytes).toBe(0);
expect(texCoord0Attribute.strideInBytes).not.toBeDefined();
@@ -1249,11 +1237,7 @@ describe(
shaderBuilder,
GeometryPipelineStage.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,
GeometryPipelineStage.STRUCT_NAME_PROCESSED_ATTRIBUTES,
- [
- " vec3 positionMC;",
- " vec3 normalMC;",
- " vec2 texCoord_0;",
- ],
+ [" vec3 positionMC;", " vec3 normalMC;", " vec2 texCoord_0;"]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
@@ -1265,19 +1249,19 @@ describe(
" vec3 positionEC;",
" vec3 normalEC;",
" vec2 texCoord_0;",
- ],
+ ]
);
// Initialization is skipped for dequantized attributes
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
GeometryPipelineStage.FUNCTION_ID_INITIALIZE_ATTRIBUTES,
GeometryPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_ATTRIBUTES,
- [],
+ []
);
ShaderBuilderTester.expectHasAttributes(
shaderBuilder,
"in vec3 a_quantized_positionMC;",
- ["in vec2 a_quantized_normalMC;", "in vec2 a_quantized_texCoord_0;"],
+ ["in vec2 a_quantized_normalMC;", "in vec2 a_quantized_texCoord_0;"]
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
"HAS_NORMALS",
@@ -1301,7 +1285,7 @@ describe(
GeometryPipelineStage.process(
renderResources,
primitive,
- scene.frameState,
+ scene.frameState
);
const shaderBuilder = renderResources.shaderBuilder;
@@ -1314,7 +1298,7 @@ describe(
expect(positionAttribute.vertexBuffer).toBeDefined();
expect(positionAttribute.componentsPerAttribute).toEqual(3);
expect(positionAttribute.componentDatatype).toEqual(
- ComponentDatatype.UNSIGNED_SHORT,
+ ComponentDatatype.UNSIGNED_SHORT
);
expect(positionAttribute.offsetInBytes).toBe(0);
expect(positionAttribute.strideInBytes).not.toBeDefined();
@@ -1324,7 +1308,7 @@ describe(
expect(normalAttribute.vertexBuffer).toBeDefined();
expect(normalAttribute.componentsPerAttribute).toEqual(2);
expect(normalAttribute.componentDatatype).toEqual(
- ComponentDatatype.UNSIGNED_BYTE,
+ ComponentDatatype.UNSIGNED_BYTE
);
expect(normalAttribute.offsetInBytes).toBe(0);
expect(normalAttribute.strideInBytes).not.toBeDefined();
@@ -1334,7 +1318,7 @@ describe(
expect(tangentAttribute.vertexBuffer).toBeDefined();
expect(tangentAttribute.componentsPerAttribute).toEqual(4);
expect(tangentAttribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(normalAttribute.offsetInBytes).toBe(0);
expect(normalAttribute.strideInBytes).not.toBeDefined();
@@ -1344,7 +1328,7 @@ describe(
expect(texCoord0Attribute.vertexBuffer).toBeDefined();
expect(texCoord0Attribute.componentsPerAttribute).toEqual(2);
expect(texCoord0Attribute.componentDatatype).toEqual(
- ComponentDatatype.UNSIGNED_SHORT,
+ ComponentDatatype.UNSIGNED_SHORT
);
expect(texCoord0Attribute.offsetInBytes).toBe(0);
expect(texCoord0Attribute.strideInBytes).not.toBeDefined();
@@ -1360,7 +1344,7 @@ describe(
" float tangentSignMC;",
" vec3 bitangentMC;",
" vec2 texCoord_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
@@ -1374,7 +1358,7 @@ describe(
" vec3 tangentEC;",
" vec3 bitangentEC;",
" vec2 texCoord_0;",
- ],
+ ]
);
// Initialization is skipped for dequantized attributes
ShaderBuilderTester.expectHasVertexFunctionUnordered(
@@ -1384,7 +1368,7 @@ describe(
[
" attributes.tangentMC = a_tangentMC.xyz;",
" attributes.tangentSignMC = a_tangentMC.w;",
- ],
+ ]
);
ShaderBuilderTester.expectHasAttributes(
shaderBuilder,
@@ -1393,7 +1377,7 @@ describe(
"in vec2 a_quantized_normalMC;",
"in vec2 a_quantized_texCoord_0;",
"in vec4 a_tangentMC;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
"HAS_BITANGENTS",
@@ -1422,7 +1406,7 @@ describe(
GeometryPipelineStage.process(
renderResources,
primitive,
- scene2D.frameState,
+ scene2D.frameState
);
const shaderBuilder = renderResources.shaderBuilder;
@@ -1435,7 +1419,7 @@ describe(
expect(normalAttribute.vertexBuffer).toBeDefined();
expect(normalAttribute.componentsPerAttribute).toEqual(2);
expect(normalAttribute.componentDatatype).toEqual(
- ComponentDatatype.UNSIGNED_SHORT,
+ ComponentDatatype.UNSIGNED_SHORT
);
expect(normalAttribute.offsetInBytes).toBe(0);
expect(normalAttribute.strideInBytes).not.toBeDefined();
@@ -1445,7 +1429,7 @@ describe(
expect(positionAttribute.vertexBuffer).toBeDefined();
expect(positionAttribute.componentsPerAttribute).toEqual(3);
expect(positionAttribute.componentDatatype).toEqual(
- ComponentDatatype.UNSIGNED_SHORT,
+ ComponentDatatype.UNSIGNED_SHORT
);
expect(positionAttribute.offsetInBytes).toBe(0);
expect(positionAttribute.strideInBytes).not.toBeDefined();
@@ -1455,7 +1439,7 @@ describe(
expect(positionAttribute2D.vertexBuffer).toBeDefined();
expect(positionAttribute2D.componentsPerAttribute).toEqual(3);
expect(positionAttribute2D.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(positionAttribute2D.offsetInBytes).toBe(0);
expect(positionAttribute2D.strideInBytes).not.toBeDefined();
@@ -1465,7 +1449,7 @@ describe(
expect(texCoord0Attribute.vertexBuffer).toBeDefined();
expect(texCoord0Attribute.componentsPerAttribute).toEqual(2);
expect(texCoord0Attribute.componentDatatype).toEqual(
- ComponentDatatype.UNSIGNED_SHORT,
+ ComponentDatatype.UNSIGNED_SHORT
);
expect(texCoord0Attribute.offsetInBytes).toBe(0);
expect(texCoord0Attribute.strideInBytes).not.toBeDefined();
@@ -1479,7 +1463,7 @@ describe(
" vec3 position2D;",
" vec3 normalMC;",
" vec2 texCoord_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
@@ -1491,7 +1475,7 @@ describe(
" vec3 positionEC;",
" vec3 normalEC;",
" vec2 texCoord_0;",
- ],
+ ]
);
// While initialization is skipped for dequantized attributes,
@@ -1500,7 +1484,7 @@ describe(
shaderBuilder,
GeometryPipelineStage.FUNCTION_ID_INITIALIZE_ATTRIBUTES,
GeometryPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_ATTRIBUTES,
- [" attributes.position2D = a_position2D;"],
+ [" attributes.position2D = a_position2D;"]
);
ShaderBuilderTester.expectHasAttributes(
shaderBuilder,
@@ -1509,7 +1493,7 @@ describe(
"in vec3 a_position2D;",
"in vec2 a_quantized_normalMC;",
"in vec2 a_quantized_texCoord_0;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
"HAS_NORMALS",
@@ -1523,171 +1507,171 @@ describe(
});
it("processes model with matrix attributes", function () {
- return loadGltf(boxTexturedWithPropertyAttributes).then(
- function (gltfLoader) {
- const components = gltfLoader.components;
- const primitive = components.nodes[1].primitives[0];
- const renderResources = mockRenderResources(primitive);
-
- GeometryPipelineStage.process(
- renderResources,
- primitive,
- scene.frameState,
- );
-
- const shaderBuilder = renderResources.shaderBuilder;
- const attributes = renderResources.attributes;
-
- expect(attributes.length).toEqual(6);
-
- const normalAttribute = attributes[0];
- expect(normalAttribute.index).toEqual(1);
- expect(normalAttribute.vertexBuffer).toBeDefined();
- expect(normalAttribute.componentsPerAttribute).toEqual(3);
- expect(normalAttribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
- );
- expect(normalAttribute.offsetInBytes).toBe(0);
- expect(normalAttribute.strideInBytes).toBe(12);
-
- const positionAttribute = attributes[1];
- expect(positionAttribute.index).toEqual(0);
- expect(positionAttribute.vertexBuffer).toBeDefined();
- expect(positionAttribute.componentsPerAttribute).toEqual(3);
- expect(positionAttribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
- );
- expect(positionAttribute.offsetInBytes).toBe(288);
- expect(positionAttribute.strideInBytes).toBe(12);
-
- const texCoord0Attribute = attributes[2];
- expect(texCoord0Attribute.index).toEqual(2);
- expect(texCoord0Attribute.vertexBuffer).toBeDefined();
- expect(texCoord0Attribute.componentsPerAttribute).toEqual(2);
- expect(texCoord0Attribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
- );
- expect(texCoord0Attribute.offsetInBytes).toBe(0);
- expect(texCoord0Attribute.strideInBytes).toBe(8);
-
- const warpMatrixAttribute = attributes[3];
- expect(warpMatrixAttribute.index).toEqual(3);
- expect(warpMatrixAttribute.vertexBuffer).toBeDefined();
- expect(warpMatrixAttribute.componentsPerAttribute).toEqual(2);
- expect(warpMatrixAttribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
- );
- expect(warpMatrixAttribute.offsetInBytes).toBe(0);
- expect(warpMatrixAttribute.strideInBytes).toBe(16);
-
- const warpMatrixAttributePart2 = attributes[4];
- expect(warpMatrixAttributePart2.index).toEqual(4);
- expect(warpMatrixAttributePart2.vertexBuffer).toBeDefined();
- expect(warpMatrixAttributePart2.componentsPerAttribute).toEqual(2);
- expect(warpMatrixAttributePart2.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
- );
- expect(warpMatrixAttributePart2.offsetInBytes).toBe(8);
- expect(warpMatrixAttributePart2.strideInBytes).toBe(16);
-
- const temperaturesAttribute = attributes[5];
- expect(temperaturesAttribute.index).toEqual(5);
- expect(temperaturesAttribute.vertexBuffer).toBeDefined();
- expect(temperaturesAttribute.componentsPerAttribute).toEqual(2);
- expect(temperaturesAttribute.componentDatatype).toEqual(
- ComponentDatatype.UNSIGNED_SHORT,
- );
- expect(temperaturesAttribute.offsetInBytes).toBe(0);
- expect(temperaturesAttribute.strideInBytes).toBe(4);
-
- ShaderBuilderTester.expectHasVertexStruct(
- shaderBuilder,
- GeometryPipelineStage.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,
- GeometryPipelineStage.STRUCT_NAME_PROCESSED_ATTRIBUTES,
- [
- " vec3 positionMC;",
- " vec3 normalMC;",
- " vec2 texCoord_0;",
- " mat2 warp_matrix;",
- " vec2 temperatures;",
- ],
- );
- ShaderBuilderTester.expectHasFragmentStruct(
- shaderBuilder,
- GeometryPipelineStage.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,
- GeometryPipelineStage.STRUCT_NAME_PROCESSED_ATTRIBUTES,
- [
- " vec3 positionMC;",
- " vec3 positionWC;",
- " vec3 positionEC;",
- " vec3 normalEC;",
- " vec2 texCoord_0;",
- " mat2 warp_matrix;",
- " vec2 temperatures;",
- ],
- );
- ShaderBuilderTester.expectHasVertexFunctionUnordered(
- shaderBuilder,
- GeometryPipelineStage.FUNCTION_ID_INITIALIZE_ATTRIBUTES,
- GeometryPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_ATTRIBUTES,
- [
- " attributes.positionMC = a_positionMC;",
- " attributes.normalMC = a_normalMC;",
- " attributes.texCoord_0 = a_texCoord_0;",
- " attributes.warp_matrix = a_warp_matrix;",
- " attributes.temperatures = a_temperatures;",
- ],
- );
- ShaderBuilderTester.expectHasVertexFunctionUnordered(
- shaderBuilder,
- GeometryPipelineStage.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,
- GeometryPipelineStage.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,
- [
- " v_texCoord_0 = attributes.texCoord_0;",
- " v_warp_matrix = attributes.warp_matrix;",
- " v_temperatures = attributes.temperatures;",
- ],
- );
- ShaderBuilderTester.expectHasFragmentFunctionUnordered(
- shaderBuilder,
- GeometryPipelineStage.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,
- GeometryPipelineStage.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,
- [
- " attributes.texCoord_0 = v_texCoord_0;",
- " attributes.warp_matrix = v_warp_matrix;",
- " attributes.temperatures = v_temperatures;",
- ],
- );
- ShaderBuilderTester.expectHasVaryings(shaderBuilder, [
- "vec3 v_normalEC;",
- "vec2 v_texCoord_0;",
- "vec3 v_positionEC;",
- "vec3 v_positionMC;",
- "vec3 v_positionWC;",
- "mat2 v_warp_matrix;",
- "vec2 v_temperatures;",
- ]);
- ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
- "HAS_NORMALS",
- "HAS_TEXCOORD_0",
- ]);
- ShaderBuilderTester.expectHasFragmentDefines(shaderBuilder, [
- "HAS_NORMALS",
- "HAS_TEXCOORD_0",
- ]);
- ShaderBuilderTester.expectHasAttributes(
- shaderBuilder,
- "in vec3 a_positionMC;",
- [
- "in vec3 a_normalMC;",
- "in vec2 a_texCoord_0;",
- "in mat2 a_warp_matrix;",
- "in vec2 a_temperatures;",
- ],
- );
- verifyFeatureStruct(shaderBuilder);
- },
- );
+ return loadGltf(boxTexturedWithPropertyAttributes).then(function (
+ gltfLoader
+ ) {
+ const components = gltfLoader.components;
+ const primitive = components.nodes[1].primitives[0];
+ const renderResources = mockRenderResources(primitive);
+
+ GeometryPipelineStage.process(
+ renderResources,
+ primitive,
+ scene.frameState
+ );
+
+ const shaderBuilder = renderResources.shaderBuilder;
+ const attributes = renderResources.attributes;
+
+ expect(attributes.length).toEqual(6);
+
+ const normalAttribute = attributes[0];
+ expect(normalAttribute.index).toEqual(1);
+ expect(normalAttribute.vertexBuffer).toBeDefined();
+ expect(normalAttribute.componentsPerAttribute).toEqual(3);
+ expect(normalAttribute.componentDatatype).toEqual(
+ ComponentDatatype.FLOAT
+ );
+ expect(normalAttribute.offsetInBytes).toBe(0);
+ expect(normalAttribute.strideInBytes).toBe(12);
+
+ const positionAttribute = attributes[1];
+ expect(positionAttribute.index).toEqual(0);
+ expect(positionAttribute.vertexBuffer).toBeDefined();
+ expect(positionAttribute.componentsPerAttribute).toEqual(3);
+ expect(positionAttribute.componentDatatype).toEqual(
+ ComponentDatatype.FLOAT
+ );
+ expect(positionAttribute.offsetInBytes).toBe(288);
+ expect(positionAttribute.strideInBytes).toBe(12);
+
+ const texCoord0Attribute = attributes[2];
+ expect(texCoord0Attribute.index).toEqual(2);
+ expect(texCoord0Attribute.vertexBuffer).toBeDefined();
+ expect(texCoord0Attribute.componentsPerAttribute).toEqual(2);
+ expect(texCoord0Attribute.componentDatatype).toEqual(
+ ComponentDatatype.FLOAT
+ );
+ expect(texCoord0Attribute.offsetInBytes).toBe(0);
+ expect(texCoord0Attribute.strideInBytes).toBe(8);
+
+ const warpMatrixAttribute = attributes[3];
+ expect(warpMatrixAttribute.index).toEqual(3);
+ expect(warpMatrixAttribute.vertexBuffer).toBeDefined();
+ expect(warpMatrixAttribute.componentsPerAttribute).toEqual(2);
+ expect(warpMatrixAttribute.componentDatatype).toEqual(
+ ComponentDatatype.FLOAT
+ );
+ expect(warpMatrixAttribute.offsetInBytes).toBe(0);
+ expect(warpMatrixAttribute.strideInBytes).toBe(16);
+
+ const warpMatrixAttributePart2 = attributes[4];
+ expect(warpMatrixAttributePart2.index).toEqual(4);
+ expect(warpMatrixAttributePart2.vertexBuffer).toBeDefined();
+ expect(warpMatrixAttributePart2.componentsPerAttribute).toEqual(2);
+ expect(warpMatrixAttributePart2.componentDatatype).toEqual(
+ ComponentDatatype.FLOAT
+ );
+ expect(warpMatrixAttributePart2.offsetInBytes).toBe(8);
+ expect(warpMatrixAttributePart2.strideInBytes).toBe(16);
+
+ const temperaturesAttribute = attributes[5];
+ expect(temperaturesAttribute.index).toEqual(5);
+ expect(temperaturesAttribute.vertexBuffer).toBeDefined();
+ expect(temperaturesAttribute.componentsPerAttribute).toEqual(2);
+ expect(temperaturesAttribute.componentDatatype).toEqual(
+ ComponentDatatype.UNSIGNED_SHORT
+ );
+ expect(temperaturesAttribute.offsetInBytes).toBe(0);
+ expect(temperaturesAttribute.strideInBytes).toBe(4);
+
+ ShaderBuilderTester.expectHasVertexStruct(
+ shaderBuilder,
+ GeometryPipelineStage.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,
+ GeometryPipelineStage.STRUCT_NAME_PROCESSED_ATTRIBUTES,
+ [
+ " vec3 positionMC;",
+ " vec3 normalMC;",
+ " vec2 texCoord_0;",
+ " mat2 warp_matrix;",
+ " vec2 temperatures;",
+ ]
+ );
+ ShaderBuilderTester.expectHasFragmentStruct(
+ shaderBuilder,
+ GeometryPipelineStage.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,
+ GeometryPipelineStage.STRUCT_NAME_PROCESSED_ATTRIBUTES,
+ [
+ " vec3 positionMC;",
+ " vec3 positionWC;",
+ " vec3 positionEC;",
+ " vec3 normalEC;",
+ " vec2 texCoord_0;",
+ " mat2 warp_matrix;",
+ " vec2 temperatures;",
+ ]
+ );
+ ShaderBuilderTester.expectHasVertexFunctionUnordered(
+ shaderBuilder,
+ GeometryPipelineStage.FUNCTION_ID_INITIALIZE_ATTRIBUTES,
+ GeometryPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_ATTRIBUTES,
+ [
+ " attributes.positionMC = a_positionMC;",
+ " attributes.normalMC = a_normalMC;",
+ " attributes.texCoord_0 = a_texCoord_0;",
+ " attributes.warp_matrix = a_warp_matrix;",
+ " attributes.temperatures = a_temperatures;",
+ ]
+ );
+ ShaderBuilderTester.expectHasVertexFunctionUnordered(
+ shaderBuilder,
+ GeometryPipelineStage.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,
+ GeometryPipelineStage.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,
+ [
+ " v_texCoord_0 = attributes.texCoord_0;",
+ " v_warp_matrix = attributes.warp_matrix;",
+ " v_temperatures = attributes.temperatures;",
+ ]
+ );
+ ShaderBuilderTester.expectHasFragmentFunctionUnordered(
+ shaderBuilder,
+ GeometryPipelineStage.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,
+ GeometryPipelineStage.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,
+ [
+ " attributes.texCoord_0 = v_texCoord_0;",
+ " attributes.warp_matrix = v_warp_matrix;",
+ " attributes.temperatures = v_temperatures;",
+ ]
+ );
+ ShaderBuilderTester.expectHasVaryings(shaderBuilder, [
+ "vec3 v_normalEC;",
+ "vec2 v_texCoord_0;",
+ "vec3 v_positionEC;",
+ "vec3 v_positionMC;",
+ "vec3 v_positionWC;",
+ "mat2 v_warp_matrix;",
+ "vec2 v_temperatures;",
+ ]);
+ ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
+ "HAS_NORMALS",
+ "HAS_TEXCOORD_0",
+ ]);
+ ShaderBuilderTester.expectHasFragmentDefines(shaderBuilder, [
+ "HAS_NORMALS",
+ "HAS_TEXCOORD_0",
+ ]);
+ ShaderBuilderTester.expectHasAttributes(
+ shaderBuilder,
+ "in vec3 a_positionMC;",
+ [
+ "in vec3 a_normalMC;",
+ "in vec2 a_texCoord_0;",
+ "in mat2 a_warp_matrix;",
+ "in vec2 a_temperatures;",
+ ]
+ );
+ verifyFeatureStruct(shaderBuilder);
+ });
});
it("processes POSITION attribute for instanced model for 2D", function () {
@@ -1703,7 +1687,7 @@ describe(
GeometryPipelineStage.process(
renderResources,
primitive,
- scene2D.frameState,
+ scene2D.frameState
);
const shaderBuilder = renderResources.shaderBuilder;
@@ -1719,7 +1703,7 @@ describe(
expect(positionAttribute.vertexBuffer).toBeDefined();
expect(positionAttribute.componentsPerAttribute).toEqual(3);
expect(positionAttribute.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(positionAttribute.offsetInBytes).toBe(0);
expect(positionAttribute.strideInBytes).toBe(12);
@@ -1730,11 +1714,7 @@ describe(
shaderBuilder,
GeometryPipelineStage.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,
GeometryPipelineStage.STRUCT_NAME_PROCESSED_ATTRIBUTES,
- [
- " vec3 positionMC;",
- " vec3 position2D;",
- " vec3 normalMC;",
- ],
+ [" vec3 positionMC;", " vec3 position2D;", " vec3 normalMC;"]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
@@ -1743,7 +1723,7 @@ describe(
[
" attributes.positionMC = a_positionMC;",
" attributes.normalMC = a_normalMC;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
"HAS_NORMALS",
@@ -1751,11 +1731,11 @@ describe(
ShaderBuilderTester.expectHasAttributes(
shaderBuilder,
"in vec3 a_positionMC;",
- ["in vec3 a_normalMC;"],
+ ["in vec3 a_normalMC;"]
);
verifyFeatureStruct(shaderBuilder);
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/I3dmLoaderSpec.js b/packages/engine/Specs/Scene/Model/I3dmLoaderSpec.js
index 7237c8ae1dc3..a23fae09288c 100644
--- a/packages/engine/Specs/Scene/Model/I3dmLoaderSpec.js
+++ b/packages/engine/Specs/Scene/Model/I3dmLoaderSpec.js
@@ -88,7 +88,7 @@ describe(
async function expectLoadError(arrayBuffer) {
const resource = Resource.createIfNeeded(
- "http://example.com/content.i3dm",
+ "http://example.com/content.i3dm"
);
const loader = new I3dmLoader({
i3dmResource: resource,
@@ -99,7 +99,7 @@ describe(
(async () => {
await loader.load();
await waitForLoaderProcess(loader, scene);
- })(),
+ })()
).toBeRejectedWithError(RuntimeError);
}
@@ -127,7 +127,7 @@ describe(
for (let j = 0; j < attributesLength; j++) {
const attribute = node.instances.attributes[j];
expect(expectedSemantics.indexOf(attribute.semantic) > -1).toEqual(
- true,
+ true
);
expect(attribute.count).toEqual(instancesLength);
@@ -174,7 +174,7 @@ describe(
InstanceAttributeSemantic.ROTATION,
InstanceAttributeSemantic.FEATURE_ID,
],
- 25,
+ 25
);
});
});
@@ -188,7 +188,7 @@ describe(
InstanceAttributeSemantic.ROTATION,
InstanceAttributeSemantic.FEATURE_ID,
],
- 25,
+ 25
);
});
});
@@ -202,7 +202,7 @@ describe(
InstanceAttributeSemantic.ROTATION,
InstanceAttributeSemantic.FEATURE_ID,
],
- 25,
+ 25
);
});
});
@@ -216,7 +216,7 @@ describe(
InstanceAttributeSemantic.ROTATION,
InstanceAttributeSemantic.FEATURE_ID,
],
- 25,
+ 25
);
});
});
@@ -230,7 +230,7 @@ describe(
InstanceAttributeSemantic.ROTATION,
InstanceAttributeSemantic.FEATURE_ID,
],
- 25,
+ 25
);
});
});
@@ -244,7 +244,7 @@ describe(
InstanceAttributeSemantic.ROTATION,
InstanceAttributeSemantic.FEATURE_ID,
],
- 25,
+ 25
);
});
});
@@ -259,7 +259,7 @@ describe(
InstanceAttributeSemantic.SCALE,
InstanceAttributeSemantic.FEATURE_ID,
],
- 25,
+ 25
);
});
});
@@ -274,7 +274,7 @@ describe(
InstanceAttributeSemantic.SCALE,
InstanceAttributeSemantic.FEATURE_ID,
],
- 25,
+ 25
);
});
});
@@ -288,7 +288,7 @@ describe(
InstanceAttributeSemantic.ROTATION,
InstanceAttributeSemantic.FEATURE_ID,
],
- 25,
+ 25
);
const transform = loader.components.transform;
@@ -311,7 +311,7 @@ describe(
InstanceAttributeSemantic.ROTATION,
InstanceAttributeSemantic.FEATURE_ID,
],
- 25,
+ 25
);
const transform = loader.components.transform;
@@ -334,7 +334,7 @@ describe(
InstanceAttributeSemantic.ROTATION,
InstanceAttributeSemantic.FEATURE_ID,
],
- 25,
+ 25
);
const transform = loader.components.transform;
@@ -350,19 +350,19 @@ describe(
});
it("loads InstancedQuantizedOct32POrientationUrl", function () {
- return loadI3dm(instancedQuantizedOct32POrientationUrl).then(
- function (loader) {
- verifyInstances(
- loader,
- [
- InstanceAttributeSemantic.TRANSLATION,
- InstanceAttributeSemantic.ROTATION,
- InstanceAttributeSemantic.FEATURE_ID,
- ],
- 25,
- );
- },
- );
+ return loadI3dm(instancedQuantizedOct32POrientationUrl).then(function (
+ loader
+ ) {
+ verifyInstances(
+ loader,
+ [
+ InstanceAttributeSemantic.TRANSLATION,
+ InstanceAttributeSemantic.ROTATION,
+ InstanceAttributeSemantic.FEATURE_ID,
+ ],
+ 25
+ );
+ });
});
it("loads InstancedWithTransformUrl", function () {
@@ -373,7 +373,7 @@ describe(
InstanceAttributeSemantic.TRANSLATION,
InstanceAttributeSemantic.FEATURE_ID,
],
- 25,
+ 25
);
});
});
@@ -387,7 +387,7 @@ describe(
InstanceAttributeSemantic.ROTATION,
InstanceAttributeSemantic.FEATURE_ID,
],
- 25,
+ 25
);
});
});
@@ -401,7 +401,7 @@ describe(
InstanceAttributeSemantic.ROTATION,
InstanceAttributeSemantic.FEATURE_ID,
],
- 25,
+ 25
);
});
});
@@ -433,5 +433,5 @@ describe(
await expectLoadError(arrayBuffer);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/ImageBasedLightingPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/ImageBasedLightingPipelineStageSpec.js
index 9c3f32e422ed..cc2c3bf9ce1f 100644
--- a/packages/engine/Specs/Scene/Model/ImageBasedLightingPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/ImageBasedLightingPipelineStageSpec.js
@@ -35,7 +35,7 @@ describe("Scene/Model/ImageBasedLightingPipelineStage", function () {
ImageBasedLightingPipelineStage.process(
renderResources,
mockModel,
- mockFrameState,
+ mockFrameState
);
ShaderBuilderTester.expectHasFragmentDefines(shaderBuilder, [
@@ -56,19 +56,19 @@ describe("Scene/Model/ImageBasedLightingPipelineStage", function () {
expect(
Cartesian2.equals(
uniformMap.model_iblFactor(),
- imageBasedLighting.imageBasedLightingFactor,
- ),
+ imageBasedLighting.imageBasedLightingFactor
+ )
).toBe(true);
expect(
Matrix3.equals(
uniformMap.model_iblReferenceFrameMatrix(),
- mockModel._iblReferenceFrameMatrix,
- ),
+ mockModel._iblReferenceFrameMatrix
+ )
).toBe(true);
expect(uniformMap.model_luminanceAtZenith()).toEqual(
- imageBasedLighting.luminanceAtZenith,
+ imageBasedLighting.luminanceAtZenith
);
});
@@ -106,7 +106,7 @@ describe("Scene/Model/ImageBasedLightingPipelineStage", function () {
ImageBasedLightingPipelineStage.process(
renderResources,
mockModel,
- mockFrameState,
+ mockFrameState
);
ShaderBuilderTester.expectHasFragmentDefines(shaderBuilder, [
@@ -124,19 +124,19 @@ describe("Scene/Model/ImageBasedLightingPipelineStage", function () {
expect(
Cartesian2.equals(
uniformMap.model_iblFactor(),
- imageBasedLighting.imageBasedLightingFactor,
- ),
+ imageBasedLighting.imageBasedLightingFactor
+ )
).toBe(true);
expect(
Matrix3.equals(
uniformMap.model_iblReferenceFrameMatrix(),
- mockModel._iblReferenceFrameMatrix,
- ),
+ mockModel._iblReferenceFrameMatrix
+ )
).toBe(true);
expect(uniformMap.model_sphericalHarmonicCoefficients()).toBe(
- testCoefficients,
+ testCoefficients
);
});
@@ -169,7 +169,7 @@ describe("Scene/Model/ImageBasedLightingPipelineStage", function () {
ImageBasedLightingPipelineStage.process(
renderResources,
mockModel,
- mockFrameState,
+ mockFrameState
);
ShaderBuilderTester.expectHasFragmentDefines(shaderBuilder, [
@@ -188,15 +188,15 @@ describe("Scene/Model/ImageBasedLightingPipelineStage", function () {
expect(
Cartesian2.equals(
uniformMap.model_iblFactor(),
- imageBasedLighting.imageBasedLightingFactor,
- ),
+ imageBasedLighting.imageBasedLightingFactor
+ )
).toBe(true);
expect(
Matrix3.equals(
uniformMap.model_iblReferenceFrameMatrix(),
- mockModel._iblReferenceFrameMatrix,
- ),
+ mockModel._iblReferenceFrameMatrix
+ )
).toBe(true);
expect(uniformMap.model_specularEnvironmentMaps()).toBeDefined();
diff --git a/packages/engine/Specs/Scene/Model/InstancingPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/InstancingPipelineStageSpec.js
index 73077d44a515..bc739a877da7 100644
--- a/packages/engine/Specs/Scene/Model/InstancingPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/InstancingPipelineStageSpec.js
@@ -144,7 +144,7 @@ describe(
async function loadI3dm(i3dmPath) {
const arrayBuffer = await Resource.fetchArrayBuffer(i3dmPath);
const i3dmLoader = new I3dmLoader(
- getI3dmOptions(i3dmPath, { arrayBuffer: arrayBuffer }),
+ getI3dmOptions(i3dmPath, { arrayBuffer: arrayBuffer })
);
gltfLoaders.push(i3dmLoader);
await i3dmLoader.load();
@@ -170,17 +170,17 @@ describe(
InstancingPipelineStage.process(
renderResources,
node,
- scene.frameState,
+ scene.frameState
);
expect(renderResources.attributes.length).toBe(4);
const runtimeNode = renderResources.runtimeNode;
expect(runtimeNode.instancingTranslationMin).toEqual(
- new Cartesian3(-2, -2, 0),
+ new Cartesian3(-2, -2, 0)
);
expect(runtimeNode.instancingTranslationMax).toEqual(
- new Cartesian3(2, 2, 0),
+ new Cartesian3(2, 2, 0)
);
// Ensure that the max / min are only computed once by checking if
@@ -188,56 +188,56 @@ describe(
InstancingPipelineStage.process(
renderResources,
node,
- scene.frameState,
+ scene.frameState
);
expect(runtimeNode.instancingTranslationMin).toEqual(
- new Cartesian3(-2, -2, 0),
+ new Cartesian3(-2, -2, 0)
);
expect(runtimeNode.instancingTranslationMax).toEqual(
- new Cartesian3(2, 2, 0),
+ new Cartesian3(2, 2, 0)
);
});
});
it("sets instancing TRANSLATION min and max from attributes", function () {
- return loadGltf(boxInstancedTranslationMinMax).then(
- function (gltfLoader) {
- const components = gltfLoader.components;
- const node = components.nodes[0];
- const renderResources = mockRenderResources(node);
-
- InstancingPipelineStage.process(
- renderResources,
- node,
- scene.frameState,
- );
+ return loadGltf(boxInstancedTranslationMinMax).then(function (
+ gltfLoader
+ ) {
+ const components = gltfLoader.components;
+ const node = components.nodes[0];
+ const renderResources = mockRenderResources(node);
- expect(renderResources.attributes.length).toBe(1);
+ InstancingPipelineStage.process(
+ renderResources,
+ node,
+ scene.frameState
+ );
- const runtimeNode = renderResources.runtimeNode;
- expect(runtimeNode.instancingTranslationMax).toEqual(
- new Cartesian3(2, 2, 0),
- );
- expect(runtimeNode.instancingTranslationMin).toEqual(
- new Cartesian3(-2, -2, 0),
- );
+ expect(renderResources.attributes.length).toBe(1);
- // Ensure that the max / min are still defined after the stage is re-run.
- InstancingPipelineStage.process(
- renderResources,
- node,
- scene.frameState,
- );
+ const runtimeNode = renderResources.runtimeNode;
+ expect(runtimeNode.instancingTranslationMax).toEqual(
+ new Cartesian3(2, 2, 0)
+ );
+ expect(runtimeNode.instancingTranslationMin).toEqual(
+ new Cartesian3(-2, -2, 0)
+ );
- expect(runtimeNode.instancingTranslationMin).toEqual(
- new Cartesian3(-2, -2, 0),
- );
- expect(runtimeNode.instancingTranslationMax).toEqual(
- new Cartesian3(2, 2, 0),
- );
- },
- );
+ // Ensure that the max / min are still defined after the stage is re-run.
+ InstancingPipelineStage.process(
+ renderResources,
+ node,
+ scene.frameState
+ );
+
+ expect(runtimeNode.instancingTranslationMin).toEqual(
+ new Cartesian3(-2, -2, 0)
+ );
+ expect(runtimeNode.instancingTranslationMax).toEqual(
+ new Cartesian3(2, 2, 0)
+ );
+ });
});
it("creates instancing matrices vertex attributes when ROTATION is present", function () {
@@ -252,7 +252,7 @@ describe(
InstancingPipelineStage.process(
renderResources,
node,
- scene.frameState,
+ scene.frameState
);
expect(renderResources.attributes.length).toBe(4);
@@ -295,7 +295,7 @@ describe(
InstancingPipelineStage.process(
renderResources,
node,
- scene2D.frameState,
+ scene2D.frameState
);
expect(renderResources.attributes.length).toBe(7);
@@ -332,12 +332,12 @@ describe(
const translationMatrix = Matrix4.fromTranslation(
runtimeNode.instancingReferencePoint2D,
- scratchMatrix4,
+ scratchMatrix4
);
const expectedMatrix = Matrix4.multiplyTransformation(
scene2D.context.uniformState.view,
translationMatrix,
- scratchMatrix4,
+ scratchMatrix4
);
const uniformMap = renderResources.uniformMap;
expect(uniformMap.u_modelView2D()).toEqual(expectedMatrix);
@@ -357,33 +357,71 @@ describe(
const renderResources = mockRenderResources(node);
const expectedTransformsTypedArray = new Float32Array([
- 0.5999999642372131, 0, 0, -2, 0, 0.4949747323989868,
- -0.7071067094802856, 2, 0, 0.49497467279434204, 0.7071067690849304, 0,
- 0.7071068286895752, 4.174155421310388e-8, 0.3535534143447876, -2, 0.5,
- 0.7071068286895752, -0.2500000298023224, -2, -0.5000000596046448,
- 0.7071068286895752, 0.25, 0, 0.375, -0.10000001639127731,
- 0.3535534143447876, 2, 0.6401650905609131, 0.029289301484823227,
- -0.2500000298023224, -2, 0.10983504354953766, 0.1707106977701187,
- 0.25, 0, 0.4898979365825653, -0.3674234449863434, 0.44999992847442627,
- 2, 0.5277916193008423, 0.028420301154255867, -0.6749999523162842, 2,
- 0.3484765887260437, 0.4734894633293152, 0.3897113800048828, 0,
+ 0.5999999642372131,
+ 0,
+ 0,
+ -2,
+ 0,
+ 0.4949747323989868,
+ -0.7071067094802856,
+ 2,
+ 0,
+ 0.49497467279434204,
+ 0.7071067690849304,
+ 0,
+ 0.7071068286895752,
+ 4.174155421310388e-8,
+ 0.3535534143447876,
+ -2,
+ 0.5,
+ 0.7071068286895752,
+ -0.2500000298023224,
+ -2,
+ -0.5000000596046448,
+ 0.7071068286895752,
+ 0.25,
+ 0,
+ 0.375,
+ -0.10000001639127731,
+ 0.3535534143447876,
+ 2,
+ 0.6401650905609131,
+ 0.029289301484823227,
+ -0.2500000298023224,
+ -2,
+ 0.10983504354953766,
+ 0.1707106977701187,
+ 0.25,
+ 0,
+ 0.4898979365825653,
+ -0.3674234449863434,
+ 0.44999992847442627,
+ 2,
+ 0.5277916193008423,
+ 0.028420301154255867,
+ -0.6749999523162842,
+ 2,
+ 0.3484765887260437,
+ 0.4734894633293152,
+ 0.3897113800048828,
+ 0,
]);
- const transforms =
- InstancingPipelineStage._getInstanceTransformsAsMatrices(
- node.instances,
- node.instances.attributes[0].count,
- renderResources,
- );
- const transformsTypedArray =
- InstancingPipelineStage._transformsToTypedArray(transforms);
+ const transforms = InstancingPipelineStage._getInstanceTransformsAsMatrices(
+ node.instances,
+ node.instances.attributes[0].count,
+ renderResources
+ );
+ const transformsTypedArray = InstancingPipelineStage._transformsToTypedArray(
+ transforms
+ );
expect(transformsTypedArray.length).toEqual(
- expectedTransformsTypedArray.length,
+ expectedTransformsTypedArray.length
);
for (let i = 0; i < expectedTransformsTypedArray.length; i++) {
expect(transformsTypedArray[i]).toEqualEpsilon(
expectedTransformsTypedArray[i],
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
}
});
@@ -395,85 +433,96 @@ describe(
return;
}
- return loadGltf(instancedWithNormalizedRotation).then(
- function (gltfLoader) {
- const components = gltfLoader.components;
- const node = components.nodes[0];
- const renderResources = mockRenderResources(node);
-
- // Check that the first two matrices are dequantized correctly. The
- // first matrix is the identity matrix, and the second matrix has a
- // slight translation, rotation and scale.
- const secondMatrixComponents = [
- 1.1007905724243354, 0.07140440309598281, -0.1331359457080602, 0,
- -0.04344372372420601, 1.0874251248973055, 0.22401538735190446, 0,
- 0.1446942006095891, -0.21672946758564085, 1.0801183172918447, 0,
- 1.1111111640930176, 1.1111111640930176, 1.1111111640930176, 1,
- ];
- const expectedTransforms = [
- Matrix4.IDENTITY,
- Matrix4.unpack(secondMatrixComponents),
- ];
-
- const transforms =
- InstancingPipelineStage._getInstanceTransformsAsMatrices(
- node.instances,
- node.instances.attributes[0].count,
- renderResources,
- );
-
- expect(transforms.length).toBe(10);
-
- const length = expectedTransforms.length;
- for (let i = 0; i < length; i++) {
- expect(transforms[i]).toEqualEpsilon(
- expectedTransforms[i],
- CesiumMath.EPSILON10,
- );
- }
- },
- );
+ return loadGltf(instancedWithNormalizedRotation).then(function (
+ gltfLoader
+ ) {
+ const components = gltfLoader.components;
+ const node = components.nodes[0];
+ const renderResources = mockRenderResources(node);
+
+ // Check that the first two matrices are dequantized correctly. The
+ // first matrix is the identity matrix, and the second matrix has a
+ // slight translation, rotation and scale.
+ const secondMatrixComponents = [
+ 1.1007905724243354,
+ 0.07140440309598281,
+ -0.1331359457080602,
+ 0,
+ -0.04344372372420601,
+ 1.0874251248973055,
+ 0.22401538735190446,
+ 0,
+ 0.1446942006095891,
+ -0.21672946758564085,
+ 1.0801183172918447,
+ 0,
+ 1.1111111640930176,
+ 1.1111111640930176,
+ 1.1111111640930176,
+ 1,
+ ];
+ const expectedTransforms = [
+ Matrix4.IDENTITY,
+ Matrix4.unpack(secondMatrixComponents),
+ ];
+
+ const transforms = InstancingPipelineStage._getInstanceTransformsAsMatrices(
+ node.instances,
+ node.instances.attributes[0].count,
+ renderResources
+ );
+
+ expect(transforms.length).toBe(10);
+
+ const length = expectedTransforms.length;
+ for (let i = 0; i < length; i++) {
+ expect(transforms[i]).toEqualEpsilon(
+ expectedTransforms[i],
+ CesiumMath.EPSILON10
+ );
+ }
+ });
});
it("creates TRANSLATION vertex attributes with min/max present", function () {
- return loadGltf(boxInstancedTranslationMinMax).then(
- function (gltfLoader) {
- const components = gltfLoader.components;
- const node = components.nodes[0];
- const renderResources = mockRenderResources(node);
-
- scene.renderForSpecs();
- InstancingPipelineStage.process(
- renderResources,
- node,
- scene.frameState,
- );
+ return loadGltf(boxInstancedTranslationMinMax).then(function (
+ gltfLoader
+ ) {
+ const components = gltfLoader.components;
+ const node = components.nodes[0];
+ const renderResources = mockRenderResources(node);
- expect(renderResources.attributes.length).toBe(1);
-
- const shaderBuilder = renderResources.shaderBuilder;
- ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
- "HAS_INSTANCING",
- "HAS_INSTANCE_TRANSLATION",
- ]);
- ShaderBuilderTester.expectHasFragmentDefines(shaderBuilder, [
- "HAS_INSTANCING",
- "HAS_INSTANCE_TRANSLATION",
- ]);
-
- ShaderBuilderTester.expectHasAttributes(shaderBuilder, undefined, [
- "in vec3 a_instanceTranslation;",
- ]);
-
- // No additional buffer was created.
- expect(renderResources.model._pipelineResources.length).toEqual(0);
- expect(renderResources.model._modelResources.length).toEqual(0);
-
- // Attributes with buffers already loaded in will be counted
- // in NodeStatisticsPipelineStage.
- expect(renderResources.model.statistics.geometryByteLength).toBe(0);
- },
- );
+ scene.renderForSpecs();
+ InstancingPipelineStage.process(
+ renderResources,
+ node,
+ scene.frameState
+ );
+
+ expect(renderResources.attributes.length).toBe(1);
+
+ const shaderBuilder = renderResources.shaderBuilder;
+ ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
+ "HAS_INSTANCING",
+ "HAS_INSTANCE_TRANSLATION",
+ ]);
+ ShaderBuilderTester.expectHasFragmentDefines(shaderBuilder, [
+ "HAS_INSTANCING",
+ "HAS_INSTANCE_TRANSLATION",
+ ]);
+
+ ShaderBuilderTester.expectHasAttributes(shaderBuilder, undefined, [
+ "in vec3 a_instanceTranslation;",
+ ]);
+
+ // No additional buffer was created.
+ expect(renderResources.model._pipelineResources.length).toEqual(0);
+ expect(renderResources.model._modelResources.length).toEqual(0);
+
+ // Attributes with buffers already loaded in will be counted
+ // in NodeStatisticsPipelineStage.
+ expect(renderResources.model.statistics.geometryByteLength).toBe(0);
+ });
});
it("creates TRANSLATION vertex attributes without min/max present", function () {
@@ -487,14 +536,14 @@ describe(
InstancingPipelineStage.process(
renderResources,
node,
- scene.frameState,
+ scene.frameState
);
expect(renderResources.attributes.length).toBe(1);
const translationAttribute = ModelUtility.getAttributeBySemantic(
instances,
- InstanceAttributeSemantic.TRANSLATION,
+ InstanceAttributeSemantic.TRANSLATION
);
// Expect the typed array to be unloaded.
expect(translationAttribute.typedArray).toBeUndefined();
@@ -542,14 +591,14 @@ describe(
InstancingPipelineStage.process(
renderResources,
node,
- scene2D.frameState,
+ scene2D.frameState
);
expect(renderResources.attributes.length).toBe(2);
const translationAttribute = ModelUtility.getAttributeBySemantic(
instances,
- InstanceAttributeSemantic.TRANSLATION,
+ InstanceAttributeSemantic.TRANSLATION
);
// Expect the typed array to be unloaded.
expect(translationAttribute.typedArray).toBeUndefined();
@@ -578,12 +627,12 @@ describe(
const translationMatrix = Matrix4.fromTranslation(
runtimeNode.instancingReferencePoint2D,
- scratchMatrix4,
+ scratchMatrix4
);
const expectedMatrix = Matrix4.multiplyTransformation(
scene2D.context.uniformState.view,
translationMatrix,
- scratchMatrix4,
+ scratchMatrix4
);
const uniformMap = renderResources.uniformMap;
expect(uniformMap.u_modelView2D()).toEqual(expectedMatrix);
@@ -613,14 +662,14 @@ describe(
axisCorrectionMatrix: ModelUtility.getAxisCorrectionMatrix(
Axis.Y,
Axis.Z,
- new Matrix4(),
+ new Matrix4()
),
},
},
uniformMap: {},
runtimeNode: {
computedTransform: Matrix4.fromTranslation(
- new Cartesian3(0.0, 2.0, 0.0),
+ new Cartesian3(0.0, 2.0, 0.0)
),
},
};
@@ -641,7 +690,7 @@ describe(
InstancingPipelineStage.process(
renderResources,
node,
- scene.frameState,
+ scene.frameState
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
@@ -673,18 +722,18 @@ describe(
let expectedModelView = Matrix4.multiplyTransformation(
view,
modelMatrix,
- new Matrix4(),
+ new Matrix4()
);
expectedModelView = Matrix4.multiplyTransformation(
expectedModelView,
rtcTransform,
- expectedModelView,
+ expectedModelView
);
const uniformMap = renderResources.uniformMap;
expect(uniformMap.u_instance_modifiedModelView()).toEqualEpsilon(
expectedModelView,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
// The second part of the matrix.
@@ -695,11 +744,11 @@ describe(
const expectedNodeTransform = Matrix4.multiplyTransformation(
axisCorrection,
computedTransform,
- new Matrix4(),
+ new Matrix4()
);
expect(uniformMap.u_instance_nodeTransform()).toEqualEpsilon(
expectedNodeTransform,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
// The matrix transforms buffer will be counted by NodeStatisticsPipelineStage.
@@ -707,5 +756,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/MaterialPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/MaterialPipelineStageSpec.js
index 128eef15b282..f7dd44fefae7 100644
--- a/packages/engine/Specs/Scene/Model/MaterialPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/MaterialPipelineStageSpec.js
@@ -251,7 +251,7 @@ describe(
const material = primitive.material;
material.emissiveFactor = Cartesian3.clone(
- ModelComponents.Material.DEFAULT_EMISSIVE_FACTOR,
+ ModelComponents.Material.DEFAULT_EMISSIVE_FACTOR
);
const metallicRoughness = material.metallicRoughness;
@@ -471,12 +471,15 @@ describe(
"USE_METALLIC_ROUGHNESS",
]);
- const { anisotropyStrength, anisotropyRotation, anisotropyTexture } =
- primitive.material.anisotropy;
+ const {
+ anisotropyStrength,
+ anisotropyRotation,
+ anisotropyTexture,
+ } = primitive.material.anisotropy;
const expectedAnisotropy = Cartesian3.fromElements(
Math.cos(anisotropyRotation),
Math.sin(anisotropyRotation),
- anisotropyStrength,
+ anisotropyStrength
);
const expectedUniforms = {
u_anisotropy: expectedAnisotropy,
@@ -832,7 +835,7 @@ describe(
uniformMap,
textureReader,
"u_testTexture",
- "TEST",
+ "TEST"
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, []);
@@ -864,7 +867,7 @@ describe(
textureReader,
"u_testTexture",
"TEST",
- mockFrameState.context.defaultTexture,
+ mockFrameState.context.defaultTexture
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, []);
@@ -899,7 +902,7 @@ describe(
textureReader,
"u_testTexture",
"TEST",
- mockFrameState.context.defaultTexture,
+ mockFrameState.context.defaultTexture
);
expectUniformMap(uniformMap, {
@@ -907,5 +910,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/MetadataPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/MetadataPipelineStageSpec.js
index a873646d0dab..8600d2edef03 100644
--- a/packages/engine/Specs/Scene/Model/MetadataPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/MetadataPipelineStageSpec.js
@@ -95,13 +95,13 @@ describe(
shaderBuilder,
structName,
structName,
- structFields,
+ structFields
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
structName,
structName,
- structFields,
+ structFields
);
}
}
@@ -121,31 +121,31 @@ describe(
shaderBuilder,
MetadataPipelineStage.STRUCT_ID_METADATA_VS,
MetadataPipelineStage.STRUCT_NAME_METADATA,
- [],
+ []
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
MetadataPipelineStage.STRUCT_ID_METADATA_FS,
MetadataPipelineStage.STRUCT_NAME_METADATA,
- [],
+ []
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_VS,
MetadataPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_METADATA,
- [],
+ []
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_FS,
MetadataPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_METADATA,
- [],
+ []
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
MetadataPipelineStage.FUNCTION_ID_SET_METADATA_VARYINGS,
MetadataPipelineStage.FUNCTION_SIGNATURE_SET_METADATA_VARYINGS,
- [],
+ []
);
ShaderBuilderTester.expectHasVertexUniforms(shaderBuilder, []);
ShaderBuilderTester.expectHasFragmentUniforms(shaderBuilder, []);
@@ -155,120 +155,120 @@ describe(
});
it("Adds property attributes to the shader", function () {
- return loadGltf(pointCloudWithPropertyAttributes).then(
- function (gltfLoader) {
- const components = gltfLoader.components;
- const node = components.nodes[0];
- const primitive = node.primitives[0];
- const frameState = scene.frameState;
- const renderResources = mockRenderResources(components);
-
- MetadataPipelineStage.process(renderResources, primitive, frameState);
-
- const shaderBuilder = renderResources.shaderBuilder;
-
- const metadataTypes = ["float"];
- checkMetadataClassStructs(shaderBuilder, metadataTypes);
-
- ShaderBuilderTester.expectHasVertexStruct(
- shaderBuilder,
- MetadataPipelineStage.STRUCT_ID_METADATA_VS,
- MetadataPipelineStage.STRUCT_NAME_METADATA,
- [
- " float circleT;",
- " float iteration;",
- " float pointId;",
- " float toroidalNormalized;",
- " float poloidalNormalized;",
- " float toroidalAngle;",
- " float poloidalAngle;",
- ],
- );
- ShaderBuilderTester.expectHasFragmentStruct(
- shaderBuilder,
- MetadataPipelineStage.STRUCT_ID_METADATA_FS,
- MetadataPipelineStage.STRUCT_NAME_METADATA,
- [
- " float circleT;",
- " float iteration;",
- " float pointId;",
- " float toroidalNormalized;",
- " float poloidalNormalized;",
- " float toroidalAngle;",
- " float poloidalAngle;",
- ],
- );
- ShaderBuilderTester.expectHasVertexFunctionUnordered(
- shaderBuilder,
- MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_VS,
- MetadataPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_METADATA,
- [
- " metadata.circleT = attributes.circle_t;",
- " metadata.iteration = attributes.featureId_0;",
- " metadata.pointId = attributes.featureId_1;",
- " metadata.toroidalNormalized = czm_valueTransform(u_toroidalNormalized_offset, u_toroidalNormalized_scale, attributes.featureId_0);",
- " metadata.poloidalNormalized = czm_valueTransform(u_poloidalNormalized_offset, u_poloidalNormalized_scale, attributes.featureId_1);",
- " metadata.toroidalAngle = czm_valueTransform(u_toroidalAngle_offset, u_toroidalAngle_scale, attributes.featureId_0);",
- " metadata.poloidalAngle = czm_valueTransform(u_poloidalAngle_offset, u_poloidalAngle_scale, attributes.featureId_1);",
- ],
- );
- ShaderBuilderTester.expectHasFragmentFunctionUnordered(
- shaderBuilder,
- MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_FS,
- MetadataPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_METADATA,
- [
- " metadata.circleT = attributes.circle_t;",
- " metadata.iteration = attributes.featureId_0;",
- " metadata.pointId = attributes.featureId_1;",
- " metadata.toroidalNormalized = czm_valueTransform(u_toroidalNormalized_offset, u_toroidalNormalized_scale, attributes.featureId_0);",
- " metadata.poloidalNormalized = czm_valueTransform(u_poloidalNormalized_offset, u_poloidalNormalized_scale, attributes.featureId_1);",
- " metadata.toroidalAngle = czm_valueTransform(u_toroidalAngle_offset, u_toroidalAngle_scale, attributes.featureId_0);",
- " metadata.poloidalAngle = czm_valueTransform(u_poloidalAngle_offset, u_poloidalAngle_scale, attributes.featureId_1);",
- ],
- );
- ShaderBuilderTester.expectHasVertexFunctionUnordered(
- shaderBuilder,
- MetadataPipelineStage.FUNCTION_ID_SET_METADATA_VARYINGS,
- MetadataPipelineStage.FUNCTION_SIGNATURE_SET_METADATA_VARYINGS,
- [],
- );
- ShaderBuilderTester.expectHasVertexUniforms(shaderBuilder, [
- "uniform float u_toroidalNormalized_offset;",
- "uniform float u_toroidalNormalized_scale;",
- "uniform float u_poloidalNormalized_offset;",
- "uniform float u_poloidalNormalized_scale;",
- "uniform float u_toroidalAngle_offset;",
- "uniform float u_toroidalAngle_scale;",
- "uniform float u_poloidalAngle_offset;",
- "uniform float u_poloidalAngle_scale;",
- ]);
- ShaderBuilderTester.expectHasFragmentUniforms(shaderBuilder, [
- "uniform float u_toroidalNormalized_offset;",
- "uniform float u_toroidalNormalized_scale;",
- "uniform float u_poloidalNormalized_offset;",
- "uniform float u_poloidalNormalized_scale;",
- "uniform float u_toroidalAngle_offset;",
- "uniform float u_toroidalAngle_scale;",
- "uniform float u_poloidalAngle_offset;",
- "uniform float u_poloidalAngle_scale;",
- ]);
-
- // The offsets and scales should be exactly as they appear in the glTF
- const uniformMap = renderResources.uniformMap;
- expect(uniformMap.u_toroidalNormalized_offset()).toBe(0);
- expect(uniformMap.u_toroidalNormalized_scale()).toBe(
- 0.034482758620689655,
- );
- expect(uniformMap.u_poloidalNormalized_offset()).toBe(0);
- expect(uniformMap.u_poloidalNormalized_scale()).toBe(
- 0.05263157894736842,
- );
- expect(uniformMap.u_toroidalAngle_offset()).toBe(0);
- expect(uniformMap.u_toroidalAngle_scale()).toBe(0.21666156231653746);
- expect(uniformMap.u_poloidalAngle_offset()).toBe(-3.141592653589793);
- expect(uniformMap.u_poloidalAngle_scale()).toBe(0.3306939635357677);
- },
- );
+ return loadGltf(pointCloudWithPropertyAttributes).then(function (
+ gltfLoader
+ ) {
+ const components = gltfLoader.components;
+ const node = components.nodes[0];
+ const primitive = node.primitives[0];
+ const frameState = scene.frameState;
+ const renderResources = mockRenderResources(components);
+
+ MetadataPipelineStage.process(renderResources, primitive, frameState);
+
+ const shaderBuilder = renderResources.shaderBuilder;
+
+ const metadataTypes = ["float"];
+ checkMetadataClassStructs(shaderBuilder, metadataTypes);
+
+ ShaderBuilderTester.expectHasVertexStruct(
+ shaderBuilder,
+ MetadataPipelineStage.STRUCT_ID_METADATA_VS,
+ MetadataPipelineStage.STRUCT_NAME_METADATA,
+ [
+ " float circleT;",
+ " float iteration;",
+ " float pointId;",
+ " float toroidalNormalized;",
+ " float poloidalNormalized;",
+ " float toroidalAngle;",
+ " float poloidalAngle;",
+ ]
+ );
+ ShaderBuilderTester.expectHasFragmentStruct(
+ shaderBuilder,
+ MetadataPipelineStage.STRUCT_ID_METADATA_FS,
+ MetadataPipelineStage.STRUCT_NAME_METADATA,
+ [
+ " float circleT;",
+ " float iteration;",
+ " float pointId;",
+ " float toroidalNormalized;",
+ " float poloidalNormalized;",
+ " float toroidalAngle;",
+ " float poloidalAngle;",
+ ]
+ );
+ ShaderBuilderTester.expectHasVertexFunctionUnordered(
+ shaderBuilder,
+ MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_VS,
+ MetadataPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_METADATA,
+ [
+ " metadata.circleT = attributes.circle_t;",
+ " metadata.iteration = attributes.featureId_0;",
+ " metadata.pointId = attributes.featureId_1;",
+ " metadata.toroidalNormalized = czm_valueTransform(u_toroidalNormalized_offset, u_toroidalNormalized_scale, attributes.featureId_0);",
+ " metadata.poloidalNormalized = czm_valueTransform(u_poloidalNormalized_offset, u_poloidalNormalized_scale, attributes.featureId_1);",
+ " metadata.toroidalAngle = czm_valueTransform(u_toroidalAngle_offset, u_toroidalAngle_scale, attributes.featureId_0);",
+ " metadata.poloidalAngle = czm_valueTransform(u_poloidalAngle_offset, u_poloidalAngle_scale, attributes.featureId_1);",
+ ]
+ );
+ ShaderBuilderTester.expectHasFragmentFunctionUnordered(
+ shaderBuilder,
+ MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_FS,
+ MetadataPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_METADATA,
+ [
+ " metadata.circleT = attributes.circle_t;",
+ " metadata.iteration = attributes.featureId_0;",
+ " metadata.pointId = attributes.featureId_1;",
+ " metadata.toroidalNormalized = czm_valueTransform(u_toroidalNormalized_offset, u_toroidalNormalized_scale, attributes.featureId_0);",
+ " metadata.poloidalNormalized = czm_valueTransform(u_poloidalNormalized_offset, u_poloidalNormalized_scale, attributes.featureId_1);",
+ " metadata.toroidalAngle = czm_valueTransform(u_toroidalAngle_offset, u_toroidalAngle_scale, attributes.featureId_0);",
+ " metadata.poloidalAngle = czm_valueTransform(u_poloidalAngle_offset, u_poloidalAngle_scale, attributes.featureId_1);",
+ ]
+ );
+ ShaderBuilderTester.expectHasVertexFunctionUnordered(
+ shaderBuilder,
+ MetadataPipelineStage.FUNCTION_ID_SET_METADATA_VARYINGS,
+ MetadataPipelineStage.FUNCTION_SIGNATURE_SET_METADATA_VARYINGS,
+ []
+ );
+ ShaderBuilderTester.expectHasVertexUniforms(shaderBuilder, [
+ "uniform float u_toroidalNormalized_offset;",
+ "uniform float u_toroidalNormalized_scale;",
+ "uniform float u_poloidalNormalized_offset;",
+ "uniform float u_poloidalNormalized_scale;",
+ "uniform float u_toroidalAngle_offset;",
+ "uniform float u_toroidalAngle_scale;",
+ "uniform float u_poloidalAngle_offset;",
+ "uniform float u_poloidalAngle_scale;",
+ ]);
+ ShaderBuilderTester.expectHasFragmentUniforms(shaderBuilder, [
+ "uniform float u_toroidalNormalized_offset;",
+ "uniform float u_toroidalNormalized_scale;",
+ "uniform float u_poloidalNormalized_offset;",
+ "uniform float u_poloidalNormalized_scale;",
+ "uniform float u_toroidalAngle_offset;",
+ "uniform float u_toroidalAngle_scale;",
+ "uniform float u_poloidalAngle_offset;",
+ "uniform float u_poloidalAngle_scale;",
+ ]);
+
+ // The offsets and scales should be exactly as they appear in the glTF
+ const uniformMap = renderResources.uniformMap;
+ expect(uniformMap.u_toroidalNormalized_offset()).toBe(0);
+ expect(uniformMap.u_toroidalNormalized_scale()).toBe(
+ 0.034482758620689655
+ );
+ expect(uniformMap.u_poloidalNormalized_offset()).toBe(0);
+ expect(uniformMap.u_poloidalNormalized_scale()).toBe(
+ 0.05263157894736842
+ );
+ expect(uniformMap.u_toroidalAngle_offset()).toBe(0);
+ expect(uniformMap.u_toroidalAngle_scale()).toBe(0.21666156231653746);
+ expect(uniformMap.u_poloidalAngle_offset()).toBe(-3.141592653589793);
+ expect(uniformMap.u_poloidalAngle_scale()).toBe(0.3306939635357677);
+ });
});
it("Adds property textures to the shader", function () {
@@ -290,7 +290,7 @@ describe(
shaderBuilder,
MetadataPipelineStage.STRUCT_ID_METADATA_VS,
MetadataPipelineStage.STRUCT_NAME_METADATA,
- [],
+ []
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
@@ -300,13 +300,13 @@ describe(
" float insulation;",
" int insideTemperature;",
" int outsideTemperature;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_VS,
MetadataPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_METADATA,
- [],
+ []
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
shaderBuilder,
@@ -317,13 +317,13 @@ describe(
" metadata.insideTemperature = int(255.0 * texture(u_propertyTexture_1, attributes.texCoord_0).r);",
" metadata.outsideTemperature = int(255.0 * texture(u_propertyTexture_1, attributes.texCoord_0).g);",
" metadataClass.insulation.defaultValue = float(1);",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
MetadataPipelineStage.FUNCTION_ID_SET_METADATA_VARYINGS,
MetadataPipelineStage.FUNCTION_SIGNATURE_SET_METADATA_VARYINGS,
- [],
+ []
);
ShaderBuilderTester.expectHasVertexUniforms(shaderBuilder, []);
ShaderBuilderTester.expectHasFragmentUniforms(shaderBuilder, [
@@ -337,7 +337,7 @@ describe(
const uniformMap = renderResources.uniformMap;
expect(uniformMap.u_propertyTexture_1()).toBe(
- texture1.textureReader.texture,
+ texture1.textureReader.texture
);
});
});
@@ -361,25 +361,25 @@ describe(
shaderBuilder,
MetadataPipelineStage.STRUCT_ID_METADATA_VS,
MetadataPipelineStage.STRUCT_NAME_METADATA,
- [],
+ []
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
MetadataPipelineStage.STRUCT_ID_METADATA_FS,
MetadataPipelineStage.STRUCT_NAME_METADATA,
- [" float exampleProperty;"],
+ [" float exampleProperty;"]
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_VS,
MetadataPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_METADATA,
- [],
+ []
);
ShaderBuilderTester.expectHasVertexFunctionUnordered(
shaderBuilder,
MetadataPipelineStage.FUNCTION_ID_SET_METADATA_VARYINGS,
MetadataPipelineStage.FUNCTION_SIGNATURE_SET_METADATA_VARYINGS,
- [],
+ []
);
ShaderBuilderTester.expectHasVertexUniforms(shaderBuilder, []);
ShaderBuilderTester.expectHasFragmentUniforms(shaderBuilder, [
@@ -394,115 +394,115 @@ describe(
const uniformMap = renderResources.uniformMap;
expect(uniformMap.u_propertyTexture_0()).toBe(
- texture1.textureReader.texture,
+ texture1.textureReader.texture
);
});
it("Handles property textures with vector values", function () {
- return loadGltf(propertyTextureWithVectorProperties).then(
- function (gltfLoader) {
- const components = gltfLoader.components;
- const node = components.nodes[0];
- const primitive = node.primitives[0];
- const frameState = scene.frameState;
- const renderResources = mockRenderResources(components);
-
- MetadataPipelineStage.process(renderResources, primitive, frameState);
-
- const shaderBuilder = renderResources.shaderBuilder;
-
- const metadataTypes = ["vec2", "int", "ivec3", "vec3"];
- checkMetadataClassStructs(shaderBuilder, metadataTypes);
-
- ShaderBuilderTester.expectHasVertexStruct(
- shaderBuilder,
- MetadataPipelineStage.STRUCT_ID_METADATA_VS,
- MetadataPipelineStage.STRUCT_NAME_METADATA,
- [],
- );
- ShaderBuilderTester.expectHasFragmentStruct(
- shaderBuilder,
- MetadataPipelineStage.STRUCT_ID_METADATA_FS,
- MetadataPipelineStage.STRUCT_NAME_METADATA,
- [
- " vec2 vec2Property;",
- " int uint8Property;",
- " ivec3 uint8vec3Property;",
- " vec3 arrayProperty;",
- " vec2 valueTransformProperty;",
- ],
- );
-
- // Check for the MetadataClass struct, containing the specific fields
- // required by this test dataset
- ShaderBuilderTester.expectHasFragmentStruct(
- shaderBuilder,
- MetadataPipelineStage.STRUCT_ID_METADATA_CLASS_FS,
- MetadataPipelineStage.STRUCT_NAME_METADATA_CLASS,
- [
- " vec2MetadataClass vec2Property;",
- " intMetadataClass uint8Property;",
- " ivec3MetadataClass uint8vec3Property;",
- " vec3MetadataClass arrayProperty;",
- " vec2MetadataClass valueTransformProperty;",
- ],
- );
-
- ShaderBuilderTester.expectHasVertexFunctionUnordered(
- shaderBuilder,
- MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_VS,
- MetadataPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_METADATA,
- [],
- );
-
- // Check that the correct values are assigned to the metadata and metadataClass structs
- ShaderBuilderTester.expectHasFragmentFunctionUnordered(
- shaderBuilder,
- MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_FS,
- MetadataPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_METADATA,
- [
- " metadata.vec2Property = texture(u_propertyTexture_1, attributes.texCoord_0).gb;",
- " metadata.uint8Property = int(255.0 * texture(u_propertyTexture_1, attributes.texCoord_0).r);",
- " metadata.uint8vec3Property = ivec3(255.0 * texture(u_propertyTexture_1, attributes.texCoord_0).rgb);",
- " metadata.arrayProperty = texture(u_propertyTexture_1, attributes.texCoord_0).rgb;",
- " metadata.valueTransformProperty = czm_valueTransform(u_valueTransformProperty_offset, u_valueTransformProperty_scale, texture(u_propertyTexture_1, attributes.texCoord_0).rg);",
- " metadataClass.uint8vec3Property.defaultValue = ivec3(255,0,0);",
- " metadataClass.uint8vec3Property.maxValue = ivec3(30,17,50);",
- " metadataClass.uint8vec3Property.minValue = ivec3(10,10,10);",
- " metadataClass.uint8vec3Property.noData = ivec3(19,13,50);",
- ],
- );
- ShaderBuilderTester.expectHasVertexFunctionUnordered(
- shaderBuilder,
- MetadataPipelineStage.FUNCTION_ID_SET_METADATA_VARYINGS,
- MetadataPipelineStage.FUNCTION_SIGNATURE_SET_METADATA_VARYINGS,
- [],
- );
- ShaderBuilderTester.expectHasVertexUniforms(shaderBuilder, []);
- ShaderBuilderTester.expectHasFragmentUniforms(shaderBuilder, [
- "uniform sampler2D u_propertyTexture_1;",
- "uniform vec2 u_valueTransformProperty_offset;",
- "uniform vec2 u_valueTransformProperty_scale;",
- ]);
-
- // everything shares the same texture.
- const structuralMetadata = renderResources.model.structuralMetadata;
- const propertyTexture1 = structuralMetadata.getPropertyTexture(0);
- const texture1 = propertyTexture1.getProperty("arrayProperty");
-
- const uniformMap = renderResources.uniformMap;
- expect(uniformMap.u_propertyTexture_1()).toBe(
- texture1.textureReader.texture,
- );
-
- expect(uniformMap.u_valueTransformProperty_offset()).toEqual(
- new Cartesian2(1, 1),
- );
- expect(uniformMap.u_valueTransformProperty_scale()).toEqual(
- new Cartesian2(2, 2),
- );
- },
- );
+ return loadGltf(propertyTextureWithVectorProperties).then(function (
+ gltfLoader
+ ) {
+ const components = gltfLoader.components;
+ const node = components.nodes[0];
+ const primitive = node.primitives[0];
+ const frameState = scene.frameState;
+ const renderResources = mockRenderResources(components);
+
+ MetadataPipelineStage.process(renderResources, primitive, frameState);
+
+ const shaderBuilder = renderResources.shaderBuilder;
+
+ const metadataTypes = ["vec2", "int", "ivec3", "vec3"];
+ checkMetadataClassStructs(shaderBuilder, metadataTypes);
+
+ ShaderBuilderTester.expectHasVertexStruct(
+ shaderBuilder,
+ MetadataPipelineStage.STRUCT_ID_METADATA_VS,
+ MetadataPipelineStage.STRUCT_NAME_METADATA,
+ []
+ );
+ ShaderBuilderTester.expectHasFragmentStruct(
+ shaderBuilder,
+ MetadataPipelineStage.STRUCT_ID_METADATA_FS,
+ MetadataPipelineStage.STRUCT_NAME_METADATA,
+ [
+ " vec2 vec2Property;",
+ " int uint8Property;",
+ " ivec3 uint8vec3Property;",
+ " vec3 arrayProperty;",
+ " vec2 valueTransformProperty;",
+ ]
+ );
+
+ // Check for the MetadataClass struct, containing the specific fields
+ // required by this test dataset
+ ShaderBuilderTester.expectHasFragmentStruct(
+ shaderBuilder,
+ MetadataPipelineStage.STRUCT_ID_METADATA_CLASS_FS,
+ MetadataPipelineStage.STRUCT_NAME_METADATA_CLASS,
+ [
+ " vec2MetadataClass vec2Property;",
+ " intMetadataClass uint8Property;",
+ " ivec3MetadataClass uint8vec3Property;",
+ " vec3MetadataClass arrayProperty;",
+ " vec2MetadataClass valueTransformProperty;",
+ ]
+ );
+
+ ShaderBuilderTester.expectHasVertexFunctionUnordered(
+ shaderBuilder,
+ MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_VS,
+ MetadataPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_METADATA,
+ []
+ );
+
+ // Check that the correct values are assigned to the metadata and metadataClass structs
+ ShaderBuilderTester.expectHasFragmentFunctionUnordered(
+ shaderBuilder,
+ MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_FS,
+ MetadataPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_METADATA,
+ [
+ " metadata.vec2Property = texture(u_propertyTexture_1, attributes.texCoord_0).gb;",
+ " metadata.uint8Property = int(255.0 * texture(u_propertyTexture_1, attributes.texCoord_0).r);",
+ " metadata.uint8vec3Property = ivec3(255.0 * texture(u_propertyTexture_1, attributes.texCoord_0).rgb);",
+ " metadata.arrayProperty = texture(u_propertyTexture_1, attributes.texCoord_0).rgb;",
+ " metadata.valueTransformProperty = czm_valueTransform(u_valueTransformProperty_offset, u_valueTransformProperty_scale, texture(u_propertyTexture_1, attributes.texCoord_0).rg);",
+ " metadataClass.uint8vec3Property.defaultValue = ivec3(255,0,0);",
+ " metadataClass.uint8vec3Property.maxValue = ivec3(30,17,50);",
+ " metadataClass.uint8vec3Property.minValue = ivec3(10,10,10);",
+ " metadataClass.uint8vec3Property.noData = ivec3(19,13,50);",
+ ]
+ );
+ ShaderBuilderTester.expectHasVertexFunctionUnordered(
+ shaderBuilder,
+ MetadataPipelineStage.FUNCTION_ID_SET_METADATA_VARYINGS,
+ MetadataPipelineStage.FUNCTION_SIGNATURE_SET_METADATA_VARYINGS,
+ []
+ );
+ ShaderBuilderTester.expectHasVertexUniforms(shaderBuilder, []);
+ ShaderBuilderTester.expectHasFragmentUniforms(shaderBuilder, [
+ "uniform sampler2D u_propertyTexture_1;",
+ "uniform vec2 u_valueTransformProperty_offset;",
+ "uniform vec2 u_valueTransformProperty_scale;",
+ ]);
+
+ // everything shares the same texture.
+ const structuralMetadata = renderResources.model.structuralMetadata;
+ const propertyTexture1 = structuralMetadata.getPropertyTexture(0);
+ const texture1 = propertyTexture1.getProperty("arrayProperty");
+
+ const uniformMap = renderResources.uniformMap;
+ expect(uniformMap.u_propertyTexture_1()).toBe(
+ texture1.textureReader.texture
+ );
+
+ expect(uniformMap.u_valueTransformProperty_offset()).toEqual(
+ new Cartesian2(1, 1)
+ );
+ expect(uniformMap.u_valueTransformProperty_scale()).toEqual(
+ new Cartesian2(2, 2)
+ );
+ });
});
it("Handles a tileset with metadata statistics", function () {
@@ -517,7 +517,7 @@ describe(
return Cesium3DTilesTester.loadTileset(
scene,
tilesetWithMetadataStatistics,
- tilesetOptions,
+ tilesetOptions
).then(function (tileset) {
expect(tileset).toBeDefined();
expect(tileset.tilesLoaded).toBe(true);
@@ -562,13 +562,13 @@ describe(
shaderBuilder,
structName,
structName,
- structFields,
+ structFields
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
structName,
structName,
- structFields,
+ structFields
);
// Check main metadata, metadataClass, metadataStatistics structs
@@ -580,13 +580,13 @@ describe(
shaderBuilder,
MetadataPipelineStage.STRUCT_ID_METADATA_VS,
MetadataPipelineStage.STRUCT_NAME_METADATA,
- metadataFields,
+ metadataFields
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
MetadataPipelineStage.STRUCT_ID_METADATA_FS,
MetadataPipelineStage.STRUCT_NAME_METADATA,
- metadataFields,
+ metadataFields
);
const metadataClassFields = [
@@ -597,13 +597,13 @@ describe(
shaderBuilder,
MetadataPipelineStage.STRUCT_ID_METADATA_CLASS_VS,
MetadataPipelineStage.STRUCT_NAME_METADATA_CLASS,
- metadataClassFields,
+ metadataClassFields
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
MetadataPipelineStage.STRUCT_ID_METADATA_CLASS_FS,
MetadataPipelineStage.STRUCT_NAME_METADATA_CLASS,
- metadataClassFields,
+ metadataClassFields
);
const metadataStatisticsFields = [
@@ -613,13 +613,13 @@ describe(
shaderBuilder,
MetadataPipelineStage.STRUCT_ID_METADATA_STATISTICS_VS,
MetadataPipelineStage.STRUCT_NAME_METADATA_STATISTICS,
- metadataStatisticsFields,
+ metadataStatisticsFields
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
MetadataPipelineStage.STRUCT_ID_METADATA_STATISTICS_FS,
MetadataPipelineStage.STRUCT_NAME_METADATA_STATISTICS,
- metadataStatisticsFields,
+ metadataStatisticsFields
);
// Check that the correct values are set in the initializeMetadata function
@@ -638,16 +638,16 @@ describe(
renderResources.shaderBuilder,
MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_VS,
MetadataPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_METADATA,
- assignments,
+ assignments
);
ShaderBuilderTester.expectHasFragmentFunctionUnordered(
renderResources.shaderBuilder,
MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_FS,
MetadataPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_METADATA,
- assignments,
+ assignments
);
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/Model3DTileContentSpec.js b/packages/engine/Specs/Scene/Model/Model3DTileContentSpec.js
index 289dc253d350..1aa9a724e95c 100644
--- a/packages/engine/Specs/Scene/Model/Model3DTileContentSpec.js
+++ b/packages/engine/Specs/Scene/Model/Model3DTileContentSpec.js
@@ -160,11 +160,11 @@ describe(
});
function rendersGeoJson(url) {
- return Cesium3DTilesTester.loadTileset(scene, url).then(
- function (tileset) {
- Cesium3DTilesTester.expectRender(scene, tileset);
- },
- );
+ return Cesium3DTilesTester.loadTileset(scene, url).then(function (
+ tileset
+ ) {
+ Cesium3DTilesTester.expectRender(scene, tileset);
+ });
}
it("renders GeoJSON MultiPolygon", function () {
@@ -201,31 +201,31 @@ describe(
function picksGeoJson(url, hasProperties, expectedFeatureId) {
expectedFeatureId = defaultValue(expectedFeatureId, 0);
- return Cesium3DTilesTester.loadTileset(scene, url).then(
- function (tileset) {
- const content = tileset.root.content;
- tileset.show = false;
- expect(scene).toPickPrimitive(undefined);
- tileset.show = true;
- expect(scene).toPickAndCall(function (result) {
- expect(result).toBeDefined();
- expect(result.primitive).toBe(tileset);
- expect(result.content).toBe(content);
- const featureId = result.featureId;
- expect(featureId).toBe(expectedFeatureId);
- const feature = content.getFeature(featureId);
- expect(feature).toBeDefined();
-
- if (hasProperties) {
- expect(feature.getProperty("name")).toBe("UL");
- expect(feature.getProperty("code")).toBe(12);
- } else {
- expect(feature.getProperty("name")).toBeUndefined();
- expect(feature.getProperty("code")).toBeUndefined();
- }
- });
- },
- );
+ return Cesium3DTilesTester.loadTileset(scene, url).then(function (
+ tileset
+ ) {
+ const content = tileset.root.content;
+ tileset.show = false;
+ expect(scene).toPickPrimitive(undefined);
+ tileset.show = true;
+ expect(scene).toPickAndCall(function (result) {
+ expect(result).toBeDefined();
+ expect(result.primitive).toBe(tileset);
+ expect(result.content).toBe(content);
+ const featureId = result.featureId;
+ expect(featureId).toBe(expectedFeatureId);
+ const feature = content.getFeature(featureId);
+ expect(feature).toBeDefined();
+
+ if (hasProperties) {
+ expect(feature.getProperty("name")).toBe("UL");
+ expect(feature.getProperty("code")).toBe(12);
+ } else {
+ expect(feature.getProperty("name")).toBeUndefined();
+ expect(feature.getProperty("code")).toBeUndefined();
+ }
+ });
+ });
}
it("picks GeoJSON MultiPolygon", function () {
@@ -270,14 +270,14 @@ describe(
return Cesium3DTilesTester.loadTileset(scene, withBatchTableUrl).then(
function (tileset) {
Cesium3DTilesTester.expectRenderTileset(scene, tileset);
- },
+ }
);
});
it("renders b3dm with a binary batch table", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- withBatchTableBinaryUrl,
+ withBatchTableBinaryUrl
).then(function (tileset) {
Cesium3DTilesTester.expectRenderTileset(scene, tileset);
});
@@ -286,7 +286,7 @@ describe(
it("renders b3dm content without batch table", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- withoutBatchTableUrl,
+ withoutBatchTableUrl
).then(function (tileset) {
Cesium3DTilesTester.expectRenderTileset(scene, tileset);
});
@@ -296,14 +296,14 @@ describe(
return Cesium3DTilesTester.loadTileset(scene, noBatchIdsUrl).then(
function (tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
- },
+ }
);
});
it("picks from b3dm", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- withoutBatchTableUrl,
+ withoutBatchTableUrl
).then(function (tileset) {
const content = tileset.root.content;
tileset.show = false;
@@ -325,14 +325,14 @@ describe(
return Cesium3DTilesTester.loadTileset(scene, translucentUrl).then(
function (tileset) {
Cesium3DTilesTester.expectRenderTileset(scene, tileset);
- },
+ }
);
});
it("renders with a mix of opaque and translucent features", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- translucentOpaqueMixUrl,
+ translucentOpaqueMixUrl
).then(function (tileset) {
Cesium3DTilesTester.expectRenderTileset(scene, tileset);
});
@@ -342,38 +342,38 @@ describe(
return Cesium3DTilesTester.loadTileset(scene, texturedUrl).then(
function (tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
- },
+ }
);
});
function expectRenderWithTransform(url) {
setCamera(centerLongitude, centerLatitude, 15.0);
- return Cesium3DTilesTester.loadTileset(scene, url).then(
- function (tileset) {
- Cesium3DTilesTester.expectRenderTileset(scene, tileset);
+ return Cesium3DTilesTester.loadTileset(scene, url).then(function (
+ tileset
+ ) {
+ Cesium3DTilesTester.expectRenderTileset(scene, tileset);
- const newLongitude = -1.31962;
- const newLatitude = 0.698874;
- const newCenter = Cartesian3.fromRadians(
- newLongitude,
- newLatitude,
- 0.0,
- );
- const newHPR = new HeadingPitchRoll();
- const newTransform = Transforms.headingPitchRollToFixedFrame(
- newCenter,
- newHPR,
- );
+ const newLongitude = -1.31962;
+ const newLatitude = 0.698874;
+ const newCenter = Cartesian3.fromRadians(
+ newLongitude,
+ newLatitude,
+ 0.0
+ );
+ const newHPR = new HeadingPitchRoll();
+ const newTransform = Transforms.headingPitchRollToFixedFrame(
+ newCenter,
+ newHPR
+ );
- // Update tile transform
- tileset.root.transform = newTransform;
- scene.renderForSpecs();
+ // Update tile transform
+ tileset.root.transform = newTransform;
+ scene.renderForSpecs();
- // Move the camera to the new location
- setCamera(newLongitude, newLatitude, 15.0);
- Cesium3DTilesTester.expectRenderTileset(scene, tileset);
- },
- );
+ // Move the camera to the new location
+ setCamera(newLongitude, newLatitude, 15.0);
+ Cesium3DTilesTester.expectRenderTileset(scene, tileset);
+ });
}
it("renders with a tile transform and box bounding volume", function () {
@@ -405,7 +405,7 @@ describe(
expect(content.hasProperty(featureId, "id")).toBe(true);
expect(content.getFeature(featureId)).toBeDefined();
});
- },
+ }
);
});
@@ -417,7 +417,7 @@ describe(
expect(content.innerContents).toBeUndefined();
expect(content.hasProperty(0, "id")).toBe(true);
expect(content.getFeature(0)).toBeDefined();
- },
+ }
);
});
@@ -450,7 +450,7 @@ describe(
expect(content.geometryByteLength).toEqual(geometryByteLength);
expect(content.texturesByteLength).toEqual(texturesByteLength);
expect(content.batchTableByteLength).toEqual(
- batchTexturesByteLength,
+ batchTexturesByteLength
);
// Pick the tile and expect the texture memory to increase
@@ -458,9 +458,9 @@ describe(
expect(content.geometryByteLength).toEqual(geometryByteLength);
expect(content.texturesByteLength).toEqual(texturesByteLength);
expect(content.batchTableByteLength).toEqual(
- batchTexturesByteLength + pickTexturesByteLength,
+ batchTexturesByteLength + pickTexturesByteLength
);
- },
+ }
);
});
@@ -472,7 +472,7 @@ describe(
creditDisplay._currentFrameCredits.lightboxCredits.values;
expect(credits.length).toEqual(1);
expect(credits[0].credit.html).toEqual("Sample Copyright");
- },
+ }
);
});
@@ -525,7 +525,7 @@ describe(
it("renders i3dm content", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- instancedWithBatchTableUrl,
+ instancedWithBatchTableUrl
).then(function (tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
});
@@ -534,7 +534,7 @@ describe(
it("renders with external gltf", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- instancedExternalGltfUrl,
+ instancedExternalGltfUrl
).then(function (tileset) {
Cesium3DTilesTester.expectRenderTileset(scene, tileset);
});
@@ -543,7 +543,7 @@ describe(
it("renders without normals", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- instancedWithoutNormalsUrl,
+ instancedWithoutNormalsUrl
).then(function (tileset) {
Cesium3DTilesTester.expectRenderTileset(scene, tileset);
});
@@ -552,7 +552,7 @@ describe(
it("renders with batch table", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- instancedWithBatchTableUrl,
+ instancedWithBatchTableUrl
).then(function (tileset) {
Cesium3DTilesTester.expectRenderTileset(scene, tileset);
});
@@ -561,7 +561,7 @@ describe(
it("renders without batch table", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- instancedWithoutBatchTableUrl,
+ instancedWithoutBatchTableUrl
).then(function (tileset) {
Cesium3DTilesTester.expectRenderTileset(scene, tileset);
});
@@ -570,7 +570,7 @@ describe(
it("renders with batch ids", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- instancedWithBatchIdsUrl,
+ instancedWithBatchIdsUrl
).then(function (tileset) {
Cesium3DTilesTester.expectRenderTileset(scene, tileset);
});
@@ -579,7 +579,7 @@ describe(
it("renders with textures", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- instancedTexturedUrl,
+ instancedTexturedUrl
).then(function (tileset) {
Cesium3DTilesTester.expectRenderTileset(scene, tileset);
});
@@ -588,7 +588,7 @@ describe(
it("gets memory usage", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- instancedTexturedUrl,
+ instancedTexturedUrl
).then(function (tileset) {
const content = tileset.root.content;
@@ -625,7 +625,7 @@ describe(
expect(content.geometryByteLength).toEqual(geometryByteLength);
expect(content.texturesByteLength).toEqual(texturesByteLength);
expect(content.batchTableByteLength).toEqual(
- batchTexturesByteLength + pickTexturesByteLength,
+ batchTexturesByteLength + pickTexturesByteLength
);
});
});
@@ -633,7 +633,7 @@ describe(
it("picks from i3dm batch table", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- instancedWithBatchTableUrl,
+ instancedWithBatchTableUrl
).then(function (tileset) {
const content = tileset.root.content;
tileset.show = false;
@@ -667,7 +667,7 @@ describe(
return Cesium3DTilesTester.loadTileset(scene, pointCloudRGBAUrl).then(
function (tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
- },
+ }
);
});
@@ -685,7 +685,7 @@ describe(
expect(rgba[0]).toBeGreaterThan(rgba[1]);
expect(rgba[0]).toBeGreaterThan(rgba[2]);
});
- },
+ }
);
});
@@ -693,14 +693,14 @@ describe(
return Cesium3DTilesTester.loadTileset(scene, pointCloudWGS84Url).then(
function (tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
- },
+ }
);
});
it("renders point cloud with batch table", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- pointCloudBatchedUrl,
+ pointCloudBatchedUrl
).then(function (tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
});
@@ -709,7 +709,7 @@ describe(
it("renders point cloud with per-point properties", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- pointCloudWithPerPointPropertiesUrl,
+ pointCloudWithPerPointPropertiesUrl
).then(function (tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
});
@@ -727,14 +727,14 @@ describe(
expect(renderOptions).notToRender(color);
tileset.debugColorizeTiles = false;
expect(renderOptions).toRender(color);
- },
+ }
);
});
it("renders pnts with color style", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- pointCloudWithPerPointPropertiesUrl,
+ pointCloudWithPerPointPropertiesUrl
).then(function (tileset) {
// Verify render without style
Cesium3DTilesTester.expectRender(scene, tileset);
@@ -767,7 +767,7 @@ describe(
it("renders pnts with show style", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- pointCloudWithPerPointPropertiesUrl,
+ pointCloudWithPerPointPropertiesUrl
).then(function (tileset) {
// Verify render without style
Cesium3DTilesTester.expectRender(scene, tileset);
@@ -793,7 +793,7 @@ describe(
it("renders pnts with point size style", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- pointCloudWithPerPointPropertiesUrl,
+ pointCloudWithPerPointPropertiesUrl
).then(function (tileset) {
// Verify render without style
Cesium3DTilesTester.expectRender(scene, tileset);
@@ -816,7 +816,7 @@ describe(
it("renders pnts with style using point cloud semantics", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- pointCloudWithPerPointPropertiesUrl,
+ pointCloudWithPerPointPropertiesUrl
).then(function (tileset) {
// Verify render without style
Cesium3DTilesTester.expectRender(scene, tileset);
@@ -852,7 +852,7 @@ describe(
it("renders pnts with style using point cloud properties", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- pointCloudWithPerPointPropertiesUrl,
+ pointCloudWithPerPointPropertiesUrl
).then(function (tileset) {
// Verify render without style
Cesium3DTilesTester.expectRender(scene, tileset);
@@ -877,7 +877,7 @@ describe(
it("renders pnts with style using point cloud properties (unicode)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- pointCloudWithUnicodePropertyIdsUrl,
+ pointCloudWithUnicodePropertyIdsUrl
).then(function (tileset) {
// Verify render without style
Cesium3DTilesTester.expectRender(scene, tileset);
@@ -903,7 +903,7 @@ describe(
it("renders pnts with style and normals", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- pointCloudNormalsUrl,
+ pointCloudNormalsUrl
).then(function (tileset) {
// Verify render without style
Cesium3DTilesTester.expectRender(scene, tileset);
@@ -930,7 +930,7 @@ describe(
it("throws if style references the NORMAL semantic for pnts without normals", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- pointCloudWithPerPointPropertiesUrl,
+ pointCloudWithPerPointPropertiesUrl
).then(function (tileset) {
// Verify render without style
Cesium3DTilesTester.expectRender(scene, tileset);
@@ -957,14 +957,14 @@ describe(
expect(result.primitive).toBe(tileset);
expect(result.content).toBe(content);
});
- },
+ }
);
});
it("picks based on batchId", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- pointCloudBatchedUrl,
+ pointCloudBatchedUrl
).then(function (tileset) {
// Get the original color
let color;
@@ -1001,14 +1001,14 @@ describe(
expect(function () {
return content.getFeature(0);
}).toThrowDeveloperError();
- },
+ }
);
});
it("batched point cloud works", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- pointCloudBatchedUrl,
+ pointCloudBatchedUrl
).then(function (tileset) {
const content = tileset.root.content;
expect(content.featuresLength).toBe(8);
@@ -1023,7 +1023,7 @@ describe(
// table will be created.
return Cesium3DTilesTester.loadTileset(
scene,
- pointCloudWithPerPointPropertiesUrl,
+ pointCloudWithPerPointPropertiesUrl
).then(function (tileset) {
const content = tileset.root.content;
expect(content.featuresLength).toBe(0);
@@ -1039,7 +1039,7 @@ describe(
return Cesium3DTilesTester.loadTileset(
scene,
- pointCloudBatchedUrl,
+ pointCloudBatchedUrl
).then(function (tileset) {
// Get the number of picked sections with back face culling on
let pickedCountCulling = 0;
@@ -1070,7 +1070,7 @@ describe(
Cesium3DTilesTester.loadTileset(scene, pointCloudNormalsUrl),
Cesium3DTilesTester.loadTileset(
scene,
- pointCloudQuantizedOctEncodedUrl,
+ pointCloudQuantizedOctEncodedUrl
),
];
@@ -1087,7 +1087,7 @@ describe(
for (let i = 0; i < length; ++i) {
const content = tilesets[i].root.content;
expect(content.geometryByteLength).toEqual(
- expectedGeometryMemory[i],
+ expectedGeometryMemory[i]
);
expect(content.texturesByteLength).toEqual(0);
}
@@ -1098,7 +1098,7 @@ describe(
setCamera(centerLongitude, centerLatitude, 25.0);
return Cesium3DTilesTester.loadTileset(
scene,
- instancedWithBatchTableUrl,
+ instancedWithBatchTableUrl
).then(function (tileset) {
const content = tileset.root.content;
tileset.show = false;
@@ -1119,7 +1119,7 @@ describe(
it("gets memory usage for batch point cloud", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- pointCloudBatchedUrl,
+ pointCloudBatchedUrl
).then(function (tileset) {
const content = tileset.root.content;
@@ -1147,7 +1147,7 @@ describe(
expect(content.geometryByteLength).toEqual(pointCloudGeometryMemory);
expect(content.texturesByteLength).toEqual(0);
expect(content.batchTableByteLength).toEqual(
- binaryPropertyMemory + batchTexturesByteLength,
+ binaryPropertyMemory + batchTexturesByteLength
);
// Pick the tile and expect the texture memory to increase
@@ -1157,7 +1157,7 @@ describe(
expect(content.batchTableByteLength).toEqual(
binaryPropertyMemory +
batchTexturesByteLength +
- pickTexturesByteLength,
+ pickTexturesByteLength
);
});
});
@@ -1174,7 +1174,7 @@ describe(
const center = new Cartesian3.fromRadians(
centerLongitude,
centerLatitude,
- 5.0,
+ 5.0
);
scene.camera.lookAt(center, new HeadingPitchRange(0.0, -1.57, 5.0));
scene.postProcessStages.fxaa.enabled = false;
@@ -1182,7 +1182,7 @@ describe(
return Cesium3DTilesTester.loadTileset(
scene,
- pointCloudNoColorUrl,
+ pointCloudNoColorUrl
).then(function (tileset) {
tileset.pointCloudShading.eyeDomeLighting = false;
tileset.root.refine = Cesium3DTileRefine.REPLACE;
@@ -1281,7 +1281,7 @@ describe(
it("becomes ready with glb", async function () {
const tileset = await Cesium3DTilesTester.loadTileset(
scene,
- glbContentUrl,
+ glbContentUrl
);
expect(tileset.root.contentReady).toBeTrue();
expect(tileset.root.content).toBeDefined();
@@ -1290,7 +1290,7 @@ describe(
it("becomes ready with glTF", async function () {
const tileset = await Cesium3DTilesTester.loadTileset(
scene,
- gltfContentUrl,
+ gltfContentUrl
);
expect(tileset.root.contentReady).toBeTrue();
expect(tileset.root.content).toBeDefined();
@@ -1300,14 +1300,14 @@ describe(
return Cesium3DTilesTester.loadTileset(scene, glbContentUrl).then(
function (tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
- },
+ }
);
});
it("renders glTF content", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- buildingsMetadataUrl,
+ buildingsMetadataUrl
).then(function (tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
});
@@ -1320,14 +1320,14 @@ describe(
expect(function () {
content.getFeature(0);
}).toThrowDeveloperError();
- },
+ }
);
});
it("throws when calling getFeature with invalid index", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- buildingsMetadataUrl,
+ buildingsMetadataUrl
).then(function (tileset) {
const content = tileset.root.content;
expect(function () {
@@ -1360,14 +1360,14 @@ describe(
return content.getFeature(0);
}).toThrowDeveloperError();
});
- },
+ }
);
});
it("picks from glTF feature table", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- buildingsMetadataUrl,
+ buildingsMetadataUrl
).then(function (tileset) {
const content = tileset.root.content;
tileset.show = false;
@@ -1404,7 +1404,7 @@ describe(
return Cesium3DTilesTester.loadTileset(
scene,
noBatchIdsUrl,
- tilesetOptions,
+ tilesetOptions
).then(function (tileset) {
// expectRender() renders twice, first with tileset.show = false,
// then with tileset.show = true.
@@ -1423,7 +1423,7 @@ describe(
return Cesium3DTilesTester.loadTileset(
scene,
noBatchIdsUrl,
- tilesetOptions,
+ tilesetOptions
).then(function (tileset) {
// expectRenderBlank() renders twice, first with tileset.show = false,
// then with tileset.show = true.
@@ -1448,7 +1448,7 @@ describe(
const content = tile.content;
const model = content._model;
const passOptions = Cesium3DTilePass.getPassOptions(
- Cesium3DTilePass.RENDER,
+ Cesium3DTilePass.RENDER
);
expect(model.clippingPlanes).toBeUndefined();
@@ -1467,7 +1467,7 @@ describe(
tile.update(tileset, scene.frameState, passOptions);
expect(model.clippingPlanes).toBeUndefined();
- },
+ }
);
});
@@ -1477,7 +1477,7 @@ describe(
const tile = tileset.root;
const model = tile.content._model;
const passOptions = Cesium3DTilePass.getPassOptions(
- Cesium3DTilePass.RENDER,
+ Cesium3DTilePass.RENDER
);
expect(model.clippingPlanes).toBeUndefined();
@@ -1501,7 +1501,7 @@ describe(
tile.update(tileset, scene.frameState, passOptions);
expect(model.clippingPlanes).toBe(tileset.clippingPlanes);
- },
+ }
);
});
@@ -1511,7 +1511,7 @@ describe(
const tile = tileset.root;
const model = tile.content._model;
const passOptions = Cesium3DTilePass.getPassOptions(
- Cesium3DTilePass.RENDER,
+ Cesium3DTilePass.RENDER
);
expect(model.clippingPlanes).toBeUndefined();
@@ -1534,7 +1534,7 @@ describe(
tile.update(tileset, scene.frameState, passOptions);
expect(model.resetDrawCommands.calls.count()).toBe(2);
- },
+ }
);
});
@@ -1556,7 +1556,7 @@ describe(
clipPlane.distance = 5.0;
expect(scene).toRender(color);
- },
+ }
);
});
@@ -1572,14 +1572,14 @@ describe(
tileset.clippingPlanes = new ClippingPlaneCollection({
planes: [clipPlane],
modelMatrix: Transforms.eastNorthUpToFixedFrame(
- tileset.boundingSphere.center,
+ tileset.boundingSphere.center
),
edgeWidth: 20.0,
edgeColor: Color.RED,
});
expect(scene).notToRender(color);
- },
+ }
);
});
@@ -1587,7 +1587,7 @@ describe(
// Force uint8 mode - there's a slight rendering difference between
// float and packed uint8 clipping planes for this test due to the small context
spyOn(ClippingPlaneCollection, "useFloatTexture").and.returnValue(
- false,
+ false
);
return Cesium3DTilesTester.loadTileset(scene, withBatchTableUrl).then(
function (tileset) {
@@ -1602,7 +1602,7 @@ describe(
new ClippingPlane(Cartesian3.UNIT_X, 0.0),
],
modelMatrix: Transforms.eastNorthUpToFixedFrame(
- tileset.boundingSphere.center,
+ tileset.boundingSphere.center
),
unionClippingRegions: true,
});
@@ -1612,7 +1612,7 @@ describe(
tileset.clippingPlanes.unionClippingRegions = false;
expect(scene).toRender(color);
- },
+ }
);
});
@@ -1634,7 +1634,7 @@ describe(
new ClippingPlane(Cartesian3.UNIT_X, 1.0),
],
modelMatrix: Transforms.eastNorthUpToFixedFrame(
- tileset.boundingSphere.center,
+ tileset.boundingSphere.center
),
unionClippingRegions: true,
});
@@ -1644,7 +1644,7 @@ describe(
tileset.clippingPlanes.unionClippingRegions = false;
expect(scene).toRender(color);
- },
+ }
);
});
});
@@ -1673,7 +1673,7 @@ describe(
const tileset = await Cesium3DTilesTester.loadTileset(
scene,
- withBatchTableUrl,
+ withBatchTableUrl
);
let color;
expect(scene).toRenderAndCall(function (rgba) {
@@ -1712,7 +1712,7 @@ describe(
}
const depthColorAttribute = ColorGeometryInstanceAttribute.fromColor(
- new Color(0.0, 0.0, 0.0, 1.0),
+ new Color(0.0, 0.0, 0.0, 1.0)
);
return new Primitive({
@@ -1769,7 +1769,7 @@ describe(
scene = createScene();
const translation = Ellipsoid.WGS84.geodeticSurfaceNormalCartographic(
- new Cartographic(centerLongitude, centerLatitude),
+ new Cartographic(centerLongitude, centerLatitude)
);
Cartesian3.multiplyByScalar(translation, -5.0, translation);
modelMatrix = Matrix4.fromTranslation(translation);
@@ -1779,12 +1779,12 @@ describe(
centerLongitude - offset,
centerLatitude - offset,
centerLongitude + offset,
- centerLatitude + offset,
+ centerLatitude + offset
);
reusableGlobePrimitive = createPrimitive(rectangle, Pass.GLOBE);
reusableTilesetPrimitive = createPrimitive(
rectangle,
- Pass.CESIUM_3D_TILE,
+ Pass.CESIUM_3D_TILE
);
});
@@ -1796,7 +1796,7 @@ describe(
globePrimitive = new MockPrimitive(reusableGlobePrimitive, Pass.GLOBE);
tilesetPrimitive = new MockPrimitive(
reusableTilesetPrimitive,
- Pass.CESIUM_3D_TILE,
+ Pass.CESIUM_3D_TILE
);
scene.primitives.add(globePrimitive);
@@ -1936,7 +1936,7 @@ describe(
it("assigns group metadata", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- withoutBatchTableUrl,
+ withoutBatchTableUrl
).then(function (tileset) {
const content = tileset.root.content;
content.group = new Cesium3DContentGroup({ metadata: groupMetadata });
@@ -1947,7 +1947,7 @@ describe(
it("assigns metadata", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- withoutBatchTableUrl,
+ withoutBatchTableUrl
).then(function (tileset) {
const content = tileset.root.content;
content.metadata = contentMetadata;
@@ -1956,5 +1956,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/ModelAnimationChannelSpec.js b/packages/engine/Specs/Scene/Model/ModelAnimationChannelSpec.js
index b03ffb438fd1..20070d210ee7 100644
--- a/packages/engine/Specs/Scene/Model/ModelAnimationChannelSpec.js
+++ b/packages/engine/Specs/Scene/Model/ModelAnimationChannelSpec.js
@@ -128,7 +128,7 @@ describe("Scene/Model/ModelAnimationChannel", function () {
const mockChannel = createMockChannel(
mockNode,
mockSampler,
- AnimatedPropertyType.TRANSLATION,
+ AnimatedPropertyType.TRANSLATION
);
const runtimeChannel = new ModelAnimationChannel({
@@ -154,7 +154,7 @@ describe("Scene/Model/ModelAnimationChannel", function () {
const mockChannel = createMockChannel(
mockNode,
mockSampler,
- AnimatedPropertyType.TRANSLATION,
+ AnimatedPropertyType.TRANSLATION
);
const runtimeChannel = new ModelAnimationChannel({
@@ -180,7 +180,7 @@ describe("Scene/Model/ModelAnimationChannel", function () {
const mockChannel = createMockChannel(
mockNode,
mockSampler,
- AnimatedPropertyType.ROTATION,
+ AnimatedPropertyType.ROTATION
);
const runtimeChannel = new ModelAnimationChannel({
@@ -206,7 +206,7 @@ describe("Scene/Model/ModelAnimationChannel", function () {
const mockChannel = createMockChannel(
mockNode,
mockSampler,
- AnimatedPropertyType.SCALE,
+ AnimatedPropertyType.SCALE
);
const runtimeChannel = new ModelAnimationChannel({
@@ -247,7 +247,7 @@ describe("Scene/Model/ModelAnimationChannel", function () {
const mockChannel = createMockChannel(
mockNode,
mockSampler,
- AnimatedPropertyType.TRANSLATION,
+ AnimatedPropertyType.TRANSLATION
);
const runtimeChannel = new ModelAnimationChannel({
@@ -285,7 +285,7 @@ describe("Scene/Model/ModelAnimationChannel", function () {
const mockChannel = createMockChannel(
mockNode,
mockSampler,
- AnimatedPropertyType.WEIGHTS,
+ AnimatedPropertyType.WEIGHTS
);
const runtimeChannel = new ModelAnimationChannel({
@@ -324,7 +324,7 @@ describe("Scene/Model/ModelAnimationChannel", function () {
const mockChannel = createMockChannel(
mockNode,
mockSampler,
- AnimatedPropertyType.WEIGHTS,
+ AnimatedPropertyType.WEIGHTS
);
const runtimeChannel = new ModelAnimationChannel({
@@ -361,7 +361,7 @@ describe("Scene/Model/ModelAnimationChannel", function () {
const mockChannel = createMockChannel(
mockNode,
mockSampler,
- AnimatedPropertyType.TRANSLATION,
+ AnimatedPropertyType.TRANSLATION
);
const runtimeChannel = new ModelAnimationChannel({
@@ -379,7 +379,7 @@ describe("Scene/Model/ModelAnimationChannel", function () {
runtimeChannel.animate(time);
expect(runtimeNode.translation).toEqual(expected);
expect(runtimeNode.transform).toEqual(
- Matrix4.fromTranslation(expected, scratchTransform),
+ Matrix4.fromTranslation(expected, scratchTransform)
);
time = (times[1] + times[2]) / 2.0;
@@ -387,13 +387,13 @@ describe("Scene/Model/ModelAnimationChannel", function () {
translationPoints[1],
translationPoints[2],
0.5,
- expected,
+ expected
);
runtimeChannel.animate(time);
expect(runtimeNode.translation).toEqual(expected);
expect(runtimeNode.transform).toEqual(
- Matrix4.fromTranslation(expected, scratchTransform),
+ Matrix4.fromTranslation(expected, scratchTransform)
);
});
@@ -407,7 +407,7 @@ describe("Scene/Model/ModelAnimationChannel", function () {
const mockChannel = createMockChannel(
mockNode,
mockSampler,
- AnimatedPropertyType.ROTATION,
+ AnimatedPropertyType.ROTATION
);
const runtimeChannel = new ModelAnimationChannel({
@@ -428,8 +428,8 @@ describe("Scene/Model/ModelAnimationChannel", function () {
expect(
runtimeNode.transform.equalsEpsilon(
Matrix4.fromRotation(expectedMatrix, scratchTransform),
- CesiumMath.EPSILON6,
- ),
+ CesiumMath.EPSILON6
+ )
).toBe(true);
time = (times[1] + times[2]) / 2.0;
@@ -437,19 +437,19 @@ describe("Scene/Model/ModelAnimationChannel", function () {
rotationPoints[1],
rotationPoints[2],
0.5,
- expected,
+ expected
);
expectedMatrix = Matrix3.fromQuaternion(expected, expectedMatrix);
runtimeChannel.animate(time);
expect(
- runtimeNode.rotation.equalsEpsilon(expected, CesiumMath.EPSILON6),
+ runtimeNode.rotation.equalsEpsilon(expected, CesiumMath.EPSILON6)
).toEqual(true);
expect(
runtimeNode.transform.equalsEpsilon(
Matrix4.fromRotation(expectedMatrix, scratchTransform),
- CesiumMath.EPSILON6,
- ),
+ CesiumMath.EPSILON6
+ )
);
});
@@ -463,7 +463,7 @@ describe("Scene/Model/ModelAnimationChannel", function () {
const mockChannel = createMockChannel(
mockNode,
mockSampler,
- AnimatedPropertyType.SCALE,
+ AnimatedPropertyType.SCALE
);
const runtimeChannel = new ModelAnimationChannel({
@@ -482,7 +482,7 @@ describe("Scene/Model/ModelAnimationChannel", function () {
runtimeChannel.animate(time);
expect(runtimeNode.scale).toEqual(expected);
expect(runtimeNode.transform).toEqual(
- Matrix4.fromScale(expected, scratchTransform),
+ Matrix4.fromScale(expected, scratchTransform)
);
time = (times[1] + times[2]) / 2.0;
@@ -491,7 +491,7 @@ describe("Scene/Model/ModelAnimationChannel", function () {
runtimeChannel.animate(time);
expect(runtimeNode.scale).toEqual(expected);
expect(runtimeNode.transform).toEqual(
- Matrix4.fromScale(expected, scratchTransform),
+ Matrix4.fromScale(expected, scratchTransform)
);
});
@@ -507,7 +507,7 @@ describe("Scene/Model/ModelAnimationChannel", function () {
const mockChannel = createMockChannel(
mockNode,
mockSampler,
- AnimatedPropertyType.WEIGHTS,
+ AnimatedPropertyType.WEIGHTS
);
const runtimeChannel = new ModelAnimationChannel({
@@ -543,7 +543,7 @@ describe("Scene/Model/ModelAnimationChannel", function () {
const mockChannel = createMockChannel(
mockNode,
mockSampler,
- AnimatedPropertyType.TRANSLATION,
+ AnimatedPropertyType.TRANSLATION
);
const runtimeChannel = new ModelAnimationChannel({
@@ -561,7 +561,7 @@ describe("Scene/Model/ModelAnimationChannel", function () {
runtimeChannel.animate(time);
expect(runtimeNode.translation).toEqual(expected);
expect(runtimeNode.transform).toEqual(
- Matrix4.fromTranslation(expected, scratchTransform),
+ Matrix4.fromTranslation(expected, scratchTransform)
);
time = -10.0;
@@ -570,7 +570,7 @@ describe("Scene/Model/ModelAnimationChannel", function () {
runtimeChannel.animate(time);
expect(runtimeNode.translation).toEqual(expected);
expect(runtimeNode.transform).toEqual(
- Matrix4.fromTranslation(expected, scratchTransform),
+ Matrix4.fromTranslation(expected, scratchTransform)
);
});
@@ -584,7 +584,7 @@ describe("Scene/Model/ModelAnimationChannel", function () {
const mockChannel = createMockChannel(
mockNode,
mockSampler,
- AnimatedPropertyType.TRANSLATION,
+ AnimatedPropertyType.TRANSLATION
);
const wrappedRuntimeAnimation = {
@@ -608,7 +608,7 @@ describe("Scene/Model/ModelAnimationChannel", function () {
runtimeChannel.animate(time);
expect(runtimeNode.translation).toEqual(expected);
expect(runtimeNode.transform).toEqual(
- Matrix4.fromTranslation(expected, scratchTransform),
+ Matrix4.fromTranslation(expected, scratchTransform)
);
time = -0.5;
@@ -617,7 +617,7 @@ describe("Scene/Model/ModelAnimationChannel", function () {
runtimeChannel.animate(time);
expect(runtimeNode.translation).toEqual(expected);
expect(runtimeNode.transform).toEqual(
- Matrix4.fromTranslation(expected, scratchTransform),
+ Matrix4.fromTranslation(expected, scratchTransform)
);
});
@@ -631,7 +631,7 @@ describe("Scene/Model/ModelAnimationChannel", function () {
const mockChannel = createMockChannel(
mockNode,
mockSampler,
- AnimatedPropertyType.TRANSLATION,
+ AnimatedPropertyType.TRANSLATION
);
const runtimeChannel = new ModelAnimationChannel({
diff --git a/packages/engine/Specs/Scene/Model/ModelAnimationCollectionSpec.js b/packages/engine/Specs/Scene/Model/ModelAnimationCollectionSpec.js
index b6c1f392a4e6..cc938fab9721 100644
--- a/packages/engine/Specs/Scene/Model/ModelAnimationCollectionSpec.js
+++ b/packages/engine/Specs/Scene/Model/ModelAnimationCollectionSpec.js
@@ -19,7 +19,7 @@ describe(
"./Data/Models/glTF-2.0/InterpolationTest/glTF-Binary/InterpolationTest.glb";
const defaultDate = JulianDate.fromDate(
- new Date("January 1, 2014 12:00:00 UTC"),
+ new Date("January 1, 2014 12:00:00 UTC")
);
const scratchJulianDate = new JulianDate();
let scene;
@@ -42,7 +42,7 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
const animationCollection = model.activeAnimations;
expect(animationCollection).toBeDefined();
@@ -68,7 +68,7 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
expect(function () {
model.activeAnimations.add({});
@@ -81,7 +81,7 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
expect(function () {
model.activeAnimations.add({
@@ -96,7 +96,7 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
expect(function () {
model.activeAnimations.add({
@@ -111,7 +111,7 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
expect(function () {
model.activeAnimations.add({
@@ -127,7 +127,7 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
const runtimeAnimation = model.activeAnimations.add({
name: "Sample Animation",
@@ -137,7 +137,7 @@ describe(
expect(animationCollection.length).toBe(1);
expect(runtimeAnimation).toBe(
- animationCollection._runtimeAnimations[0],
+ animationCollection._runtimeAnimations[0]
);
expect(runtimeAnimation.startTime).toBeUndefined();
expect(runtimeAnimation.delay).toBe(0.0);
@@ -154,7 +154,7 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
const runtimeAnimation = model.activeAnimations.add({
index: 0,
@@ -164,7 +164,7 @@ describe(
expect(animationCollection.length).toBe(1);
expect(runtimeAnimation).toBe(
- animationCollection._runtimeAnimations[0],
+ animationCollection._runtimeAnimations[0]
);
expect(runtimeAnimation.startTime).toBeUndefined();
expect(runtimeAnimation.delay).toBe(0.0);
@@ -181,16 +181,16 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
const options = {
index: 0,
startTime: JulianDate.fromDate(
- new Date("January 1, 2014 12:00:00 UTC"),
+ new Date("January 1, 2014 12:00:00 UTC")
),
delay: 5.0,
stopTime: JulianDate.fromDate(
- new Date("January 1, 2014 12:01:30 UTC"),
+ new Date("January 1, 2014 12:01:30 UTC")
),
multiplier: 0.5,
reverse: true,
@@ -203,7 +203,7 @@ describe(
expect(animationCollection.length).toBe(1);
expect(runtimeAnimation).toBe(
- animationCollection._runtimeAnimations[0],
+ animationCollection._runtimeAnimations[0]
);
expect(runtimeAnimation.startTime).toEqual(options.startTime);
expect(runtimeAnimation.delay).toBe(5.0);
@@ -230,7 +230,7 @@ describe(
{
gltf: interpolationTestUrl,
},
- scene,
+ scene
).then(function (model) {
expect(function () {
model.activeAnimations.addAll({
@@ -245,7 +245,7 @@ describe(
{
gltf: interpolationTestUrl,
},
- scene,
+ scene
).then(function (model) {
const runtimeAnimations = model.activeAnimations.addAll();
@@ -256,7 +256,7 @@ describe(
for (let i = 0; i < length; i++) {
const runtimeAnimation = runtimeAnimations[i];
expect(runtimeAnimation).toBe(
- animationCollection._runtimeAnimations[i],
+ animationCollection._runtimeAnimations[i]
);
expect(runtimeAnimation.startTime).toBeUndefined();
expect(runtimeAnimation.delay).toBe(0.0);
@@ -274,15 +274,15 @@ describe(
{
gltf: interpolationTestUrl,
},
- scene,
+ scene
).then(function (model) {
const options = {
startTime: JulianDate.fromDate(
- new Date("January 1, 2014 12:00:00 UTC"),
+ new Date("January 1, 2014 12:00:00 UTC")
),
delay: 5.0,
stopTime: JulianDate.fromDate(
- new Date("January 1, 2014 12:01:30 UTC"),
+ new Date("January 1, 2014 12:01:30 UTC")
),
multiplier: 0.5,
reverse: true,
@@ -298,7 +298,7 @@ describe(
for (let i = 0; i < length; i++) {
const runtimeAnimation = runtimeAnimations[i];
expect(runtimeAnimation).toBe(
- animationCollection._runtimeAnimations[i],
+ animationCollection._runtimeAnimations[i]
);
expect(runtimeAnimation.startTime).toEqual(options.startTime);
expect(runtimeAnimation.delay).toBe(5.0);
@@ -316,7 +316,7 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
const animationCollection = model.activeAnimations;
animationCollection.add({ index: 0 });
@@ -329,13 +329,13 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (firstModel) {
return loadAndZoomToModelAsync(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (secondModel) {
const firstCollection = firstModel.activeAnimations;
const animation = firstCollection.add({ index: 0 });
@@ -350,7 +350,7 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
const animationCollection = model.activeAnimations;
const animation = animationCollection.add({ index: 0 });
@@ -363,7 +363,7 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
const animationCollection = model.activeAnimations;
animationCollection.add({ index: 0 });
@@ -378,7 +378,7 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
const animationCollection = model.activeAnimations;
animationCollection.add({ index: 0 });
@@ -393,7 +393,7 @@ describe(
{
gltf: interpolationTestUrl,
},
- scene,
+ scene
).then(function (model) {
const animationCollection = model.activeAnimations;
const animation = animationCollection.add({ index: 3 });
@@ -406,7 +406,7 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
const animationCollection = model.activeAnimations;
animationCollection.add({ index: 0 });
@@ -419,13 +419,13 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (firstModel) {
return loadAndZoomToModelAsync(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (secondModel) {
const firstCollection = firstModel.activeAnimations;
const animation = firstCollection.add({ index: 0 });
@@ -440,7 +440,7 @@ describe(
{
gltf: interpolationTestUrl,
},
- scene,
+ scene
).then(function (model) {
const animationCollection = model.activeAnimations;
const animationToRemove = animationCollection.add({ index: 0 });
@@ -460,7 +460,7 @@ describe(
{
gltf: interpolationTestUrl,
},
- scene,
+ scene
).then(function (model) {
const animationCollection = model.activeAnimations;
animationCollection.addAll();
@@ -475,7 +475,7 @@ describe(
{
gltf: interpolationTestUrl,
},
- scene,
+ scene
).then(function (model) {
const animationCollection = model.activeAnimations;
expect(animationCollection.length).toBe(0);
@@ -488,7 +488,7 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
let time = defaultDate;
const animations = model.activeAnimations;
@@ -516,7 +516,7 @@ describe(
time = JulianDate.addSeconds(time, 1.0, scratchJulianDate);
return stopped;
},
- { timeout: 10000 },
+ { timeout: 10000 }
).then(function () {
expect(spyStart).toHaveBeenCalledWith(model, animation);
@@ -540,7 +540,7 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
const time = defaultDate;
const animationCollection = model.activeAnimations;
@@ -553,10 +553,10 @@ describe(
scene.renderForSpecs(time);
scene.renderForSpecs(
- JulianDate.addSeconds(time, 1.0, scratchJulianDate),
+ JulianDate.addSeconds(time, 1.0, scratchJulianDate)
);
scene.renderForSpecs(
- JulianDate.addSeconds(time, 2.0, scratchJulianDate),
+ JulianDate.addSeconds(time, 2.0, scratchJulianDate)
);
expect(spyUpdate.calls.count()).toEqual(3);
@@ -572,7 +572,7 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
const time = defaultDate;
const animationCollection = model.activeAnimations;
@@ -587,7 +587,7 @@ describe(
scene.renderForSpecs(time); // Does not fire start event
scene.renderForSpecs(
- JulianDate.addSeconds(time, 1.0, scratchJulianDate),
+ JulianDate.addSeconds(time, 1.0, scratchJulianDate)
);
expect(spyStart.calls.count()).toEqual(1);
@@ -599,7 +599,7 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
const time = defaultDate;
const animationCollection = model.activeAnimations;
@@ -612,10 +612,10 @@ describe(
animation.update.addEventListener(spyUpdate);
scene.renderForSpecs(
- JulianDate.addSeconds(time, -2.0, scratchJulianDate),
+ JulianDate.addSeconds(time, -2.0, scratchJulianDate)
);
scene.renderForSpecs(
- JulianDate.addSeconds(time, -1.0, scratchJulianDate),
+ JulianDate.addSeconds(time, -1.0, scratchJulianDate)
);
scene.renderForSpecs(time);
@@ -629,10 +629,10 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
const time = JulianDate.fromDate(
- new Date("January 1, 2014 12:00:00 UTC"),
+ new Date("January 1, 2014 12:00:00 UTC")
);
const endDate = new Date("January 1, 2014 12:00:00 UTC");
endDate.setMilliseconds(500);
@@ -650,10 +650,10 @@ describe(
scene.renderForSpecs(time);
scene.renderForSpecs(
- JulianDate.addSeconds(time, 0.5, scratchJulianDate),
+ JulianDate.addSeconds(time, 0.5, scratchJulianDate)
);
scene.renderForSpecs(
- JulianDate.addSeconds(time, 1.0, scratchJulianDate),
+ JulianDate.addSeconds(time, 1.0, scratchJulianDate)
);
expect(spyUpdate.calls.count()).toEqual(3);
@@ -668,7 +668,7 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
const time = defaultDate;
const animationCollection = model.activeAnimations;
@@ -686,34 +686,34 @@ describe(
scene.renderForSpecs(time);
animationTime = 0.1;
scene.renderForSpecs(
- JulianDate.addSeconds(time, 1.0, scratchJulianDate),
+ JulianDate.addSeconds(time, 1.0, scratchJulianDate)
);
// no update because animationTime didn't change
scene.renderForSpecs(
- JulianDate.addSeconds(time, 2.0, scratchJulianDate),
+ JulianDate.addSeconds(time, 2.0, scratchJulianDate)
);
animationTime = 0.2;
// no update because scene time didn't change
scene.renderForSpecs(
- JulianDate.addSeconds(time, 2.0, scratchJulianDate),
+ JulianDate.addSeconds(time, 2.0, scratchJulianDate)
);
animationTime = 0.3;
scene.renderForSpecs(
- JulianDate.addSeconds(time, 3.0, scratchJulianDate),
+ JulianDate.addSeconds(time, 3.0, scratchJulianDate)
);
expect(spyUpdate.calls.count()).toEqual(3);
expect(spyUpdate.calls.argsFor(0)[2]).toEqualEpsilon(
0.0,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(spyUpdate.calls.argsFor(1)[2]).toEqualEpsilon(
0.1,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(spyUpdate.calls.argsFor(2)[2]).toEqualEpsilon(
0.3,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
});
@@ -723,7 +723,7 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
const time = defaultDate;
const animationCollection = model.activeAnimations;
@@ -750,15 +750,15 @@ describe(
expect(spyUpdate.calls.count()).toEqual(3);
expect(spyUpdate.calls.argsFor(0)[2]).toEqualEpsilon(
0.0,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(spyUpdate.calls.argsFor(1)[2]).toEqualEpsilon(
0.1,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(spyUpdate.calls.argsFor(2)[2]).toEqualEpsilon(
0.3,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
});
@@ -768,7 +768,7 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
const time = defaultDate;
const animationCollection = model.activeAnimations;
@@ -783,10 +783,10 @@ describe(
scene.renderForSpecs(time);
scene.renderForSpecs(
- JulianDate.addSeconds(time, 1.0, scratchJulianDate),
+ JulianDate.addSeconds(time, 1.0, scratchJulianDate)
);
scene.renderForSpecs(
- JulianDate.addSeconds(time, 2.0, scratchJulianDate),
+ JulianDate.addSeconds(time, 2.0, scratchJulianDate)
);
expect(spyUpdate.calls.count()).toEqual(3);
@@ -801,7 +801,7 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
const time = defaultDate;
const animationCollection = model.activeAnimations;
@@ -816,10 +816,10 @@ describe(
scene.renderForSpecs(time);
scene.renderForSpecs(
- JulianDate.addSeconds(time, 0.5, scratchJulianDate),
+ JulianDate.addSeconds(time, 0.5, scratchJulianDate)
);
scene.renderForSpecs(
- JulianDate.addSeconds(time, 1.0, scratchJulianDate),
+ JulianDate.addSeconds(time, 1.0, scratchJulianDate)
);
expect(spyUpdate.calls.count()).toEqual(3);
@@ -834,7 +834,7 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
const time = defaultDate;
const animationCollection = model.activeAnimations;
@@ -849,13 +849,13 @@ describe(
scene.renderForSpecs(time);
scene.renderForSpecs(
- JulianDate.addSeconds(time, 0.5, scratchJulianDate),
+ JulianDate.addSeconds(time, 0.5, scratchJulianDate)
);
scene.renderForSpecs(
- JulianDate.addSeconds(time, 1.0, scratchJulianDate),
+ JulianDate.addSeconds(time, 1.0, scratchJulianDate)
);
scene.renderForSpecs(
- JulianDate.addSeconds(time, 1.5, scratchJulianDate),
+ JulianDate.addSeconds(time, 1.5, scratchJulianDate)
);
expect(spyUpdate.calls.count()).toEqual(4);
@@ -871,7 +871,7 @@ describe(
{
gltf: animatedTriangleUrl,
},
- scene,
+ scene
).then(function (model) {
const time = defaultDate;
const animationCollection = model.activeAnimations;
@@ -886,16 +886,16 @@ describe(
scene.renderForSpecs(time);
scene.renderForSpecs(
- JulianDate.addSeconds(time, 0.5, scratchJulianDate),
+ JulianDate.addSeconds(time, 0.5, scratchJulianDate)
);
scene.renderForSpecs(
- JulianDate.addSeconds(time, 1.0, scratchJulianDate),
+ JulianDate.addSeconds(time, 1.0, scratchJulianDate)
);
scene.renderForSpecs(
- JulianDate.addSeconds(time, 1.5, scratchJulianDate),
+ JulianDate.addSeconds(time, 1.5, scratchJulianDate)
);
scene.renderForSpecs(
- JulianDate.addSeconds(time, 2.0, scratchJulianDate),
+ JulianDate.addSeconds(time, 2.0, scratchJulianDate)
);
expect(spyUpdate.calls.count()).toEqual(5);
@@ -907,5 +907,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/ModelAnimationSpec.js b/packages/engine/Specs/Scene/Model/ModelAnimationSpec.js
index 045d5d33c025..12d2b936b02a 100644
--- a/packages/engine/Specs/Scene/Model/ModelAnimationSpec.js
+++ b/packages/engine/Specs/Scene/Model/ModelAnimationSpec.js
@@ -84,12 +84,12 @@ describe("Scene/Model/ModelAnimation", function () {
createMockChannel(
mockNode,
mockTranslationSampler,
- AnimatedPropertyType.TRANSLATION,
+ AnimatedPropertyType.TRANSLATION
),
createMockChannel(
mockNode,
mockRotationSampler,
- AnimatedPropertyType.ROTATION,
+ AnimatedPropertyType.ROTATION
),
],
name: "Sample Animation",
@@ -98,7 +98,7 @@ describe("Scene/Model/ModelAnimation", function () {
const runtimeAnimation = new ModelAnimation(
mockModel,
mockAnimation,
- emptyOptions,
+ emptyOptions
);
expect(runtimeAnimation.animation).toBe(mockAnimation);
@@ -128,12 +128,12 @@ describe("Scene/Model/ModelAnimation", function () {
createMockChannel(
mockNode,
mockTranslationSampler,
- AnimatedPropertyType.TRANSLATION,
+ AnimatedPropertyType.TRANSLATION
),
createMockChannel(
mockNode,
mockRotationSampler,
- AnimatedPropertyType.ROTATION,
+ AnimatedPropertyType.ROTATION
),
],
name: "Sample Animation",
@@ -152,7 +152,7 @@ describe("Scene/Model/ModelAnimation", function () {
const runtimeAnimation = new ModelAnimation(
mockModel,
mockAnimation,
- options,
+ options
);
expect(runtimeAnimation.animation).toBe(mockAnimation);
@@ -182,7 +182,7 @@ describe("Scene/Model/ModelAnimation", function () {
createMockChannel(
mockNode,
mockTranslationSampler,
- AnimatedPropertyType.TRANSLATION,
+ AnimatedPropertyType.TRANSLATION
),
{
sampler: mockRotationSampler,
@@ -195,7 +195,7 @@ describe("Scene/Model/ModelAnimation", function () {
const runtimeAnimation = new ModelAnimation(
mockModel,
mockAnimation,
- emptyOptions,
+ emptyOptions
);
expect(runtimeAnimation.animation).toBe(mockAnimation);
@@ -216,12 +216,12 @@ describe("Scene/Model/ModelAnimation", function () {
createMockChannel(
mockNode,
mockTranslationSampler,
- AnimatedPropertyType.TRANSLATION,
+ AnimatedPropertyType.TRANSLATION
),
createMockChannel(
mockNode,
mockRotationSampler,
- AnimatedPropertyType.ROTATION,
+ AnimatedPropertyType.ROTATION
),
],
name: "Sample Animation",
@@ -230,7 +230,7 @@ describe("Scene/Model/ModelAnimation", function () {
const runtimeAnimation = new ModelAnimation(
mockModel,
mockAnimation,
- emptyOptions,
+ emptyOptions
);
expect(runtimeNode.translation).toEqual(Cartesian3.ZERO);
@@ -245,7 +245,7 @@ describe("Scene/Model/ModelAnimation", function () {
expect(runtimeNode.translation).toEqual(new Cartesian3(4.0, 5.0, 6.0));
expect(runtimeNode.rotation).toEqual(
- new Quaternion(0.0, 0.0, 0.707, -0.707),
+ new Quaternion(0.0, 0.0, 0.707, -0.707)
);
});
});
diff --git a/packages/engine/Specs/Scene/Model/ModelArticulationSpec.js b/packages/engine/Specs/Scene/Model/ModelArticulationSpec.js
index 804d78bec6e3..4cc07a260bd3 100644
--- a/packages/engine/Specs/Scene/Model/ModelArticulationSpec.js
+++ b/packages/engine/Specs/Scene/Model/ModelArticulationSpec.js
@@ -195,7 +195,7 @@ describe("Scene/Model/ModelArticulation", function () {
const transform = Matrix4.fromTranslation(
new Cartesian3(1.0, 2.0, 3.0),
- new Matrix4(),
+ new Matrix4()
);
const node = mockRuntimeNode(transform);
@@ -216,7 +216,7 @@ describe("Scene/Model/ModelArticulation", function () {
const transform = Matrix4.fromTranslation(
new Cartesian3(1.0, 2.0, 3.0),
- new Matrix4(),
+ new Matrix4()
);
const node = mockRuntimeNode(transform);
@@ -226,7 +226,7 @@ describe("Scene/Model/ModelArticulation", function () {
let expectedMatrix = Matrix4.fromTranslation(
new Cartesian3(50.0, 0.0, 0.0),
- new Matrix4(),
+ new Matrix4()
);
const rotation = CesiumMath.toRadians(180.0);
@@ -235,19 +235,19 @@ describe("Scene/Model/ModelArticulation", function () {
expectedMatrix = Matrix4.multiplyByMatrix3(
expectedMatrix,
expectedRotation,
- expectedMatrix,
+ expectedMatrix
);
expectedMatrix = Matrix4.multiplyByUniformScale(
expectedMatrix,
0.5,
- expectedMatrix,
+ expectedMatrix
);
expectedMatrix = Matrix4.multiplyTransformation(
transform,
expectedMatrix,
- expectedMatrix,
+ expectedMatrix
);
runtimeArticulation.apply();
diff --git a/packages/engine/Specs/Scene/Model/ModelArticulationStageSpec.js b/packages/engine/Specs/Scene/Model/ModelArticulationStageSpec.js
index 490e94330f9a..13e8be131b3d 100644
--- a/packages/engine/Specs/Scene/Model/ModelArticulationStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/ModelArticulationStageSpec.js
@@ -157,11 +157,11 @@ describe("Scene/Model/ModelArticulationStage", function () {
50.0,
0.0,
0.0,
- scratchCartesian3,
+ scratchCartesian3
);
const expectedMatrix = Matrix4.fromTranslation(
expectedTranslation,
- scratchExpectedMatrix,
+ scratchExpectedMatrix
);
let resultMatrix = Matrix4.clone(Matrix4.IDENTITY, scratchResultMatrix);
@@ -191,11 +191,11 @@ describe("Scene/Model/ModelArticulationStage", function () {
0.0,
50.0,
0.0,
- scratchCartesian3,
+ scratchCartesian3
);
const expectedMatrix = Matrix4.fromTranslation(
expectedTranslation,
- scratchExpectedMatrix,
+ scratchExpectedMatrix
);
let resultMatrix = Matrix4.clone(Matrix4.IDENTITY, scratchResultMatrix);
@@ -225,11 +225,11 @@ describe("Scene/Model/ModelArticulationStage", function () {
0.0,
0.0,
50.0,
- scratchCartesian3,
+ scratchCartesian3
);
const expectedMatrix = Matrix4.fromTranslation(
expectedTranslation,
- scratchExpectedMatrix,
+ scratchExpectedMatrix
);
let resultMatrix = Matrix4.clone(Matrix4.IDENTITY, scratchResultMatrix);
@@ -258,7 +258,7 @@ describe("Scene/Model/ModelArticulationStage", function () {
const expectedRotation = Matrix3.fromRotationX(value, scratchMatrix3);
const expectedMatrix = Matrix4.fromRotation(
expectedRotation,
- scratchExpectedMatrix,
+ scratchExpectedMatrix
);
let resultMatrix = Matrix4.clone(Matrix4.IDENTITY, scratchResultMatrix);
@@ -288,7 +288,7 @@ describe("Scene/Model/ModelArticulationStage", function () {
const expectedRotation = Matrix3.fromRotationY(value, scratchMatrix3);
const expectedMatrix = Matrix4.fromRotation(
expectedRotation,
- scratchExpectedMatrix,
+ scratchExpectedMatrix
);
let resultMatrix = Matrix4.clone(Matrix4.IDENTITY, scratchResultMatrix);
@@ -318,7 +318,7 @@ describe("Scene/Model/ModelArticulationStage", function () {
const expectedRotation = Matrix3.fromRotationZ(value, scratchMatrix3);
const expectedMatrix = Matrix4.fromRotation(
expectedRotation,
- scratchExpectedMatrix,
+ scratchExpectedMatrix
);
let resultMatrix = Matrix4.clone(Matrix4.IDENTITY, scratchResultMatrix);
@@ -348,11 +348,11 @@ describe("Scene/Model/ModelArticulationStage", function () {
0.5,
1.0,
1.0,
- scratchCartesian3,
+ scratchCartesian3
);
const expectedMatrix = Matrix4.fromScale(
expectedScale,
- scratchExpectedMatrix,
+ scratchExpectedMatrix
);
let resultMatrix = Matrix4.clone(Matrix4.IDENTITY, scratchResultMatrix);
@@ -382,11 +382,11 @@ describe("Scene/Model/ModelArticulationStage", function () {
1.0,
0.5,
1.0,
- scratchCartesian3,
+ scratchCartesian3
);
const expectedMatrix = Matrix4.fromScale(
expectedScale,
- scratchExpectedMatrix,
+ scratchExpectedMatrix
);
let resultMatrix = Matrix4.clone(Matrix4.IDENTITY, scratchResultMatrix);
@@ -416,11 +416,11 @@ describe("Scene/Model/ModelArticulationStage", function () {
1.0,
1.0,
0.5,
- scratchCartesian3,
+ scratchCartesian3
);
const expectedMatrix = Matrix4.fromScale(
expectedScale,
- scratchExpectedMatrix,
+ scratchExpectedMatrix
);
let resultMatrix = Matrix4.clone(Matrix4.IDENTITY, scratchResultMatrix);
diff --git a/packages/engine/Specs/Scene/Model/ModelClippingPlanesPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/ModelClippingPlanesPipelineStageSpec.js
index d51edda0f504..734a88a3b433 100644
--- a/packages/engine/Specs/Scene/Model/ModelClippingPlanesPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/ModelClippingPlanesPipelineStageSpec.js
@@ -45,7 +45,7 @@ describe("Scene/Model/ModelClippingPlanesPipelineStage", function () {
ModelClippingPlanesPipelineStage.process(
renderResources,
mockModel,
- mockFrameState,
+ mockFrameState
);
ShaderBuilderTester.expectHasFragmentDefines(shaderBuilder, [
@@ -69,17 +69,17 @@ describe("Scene/Model/ModelClippingPlanesPipelineStage", function () {
edgeColor.r,
edgeColor.g,
edgeColor.b,
- clippingPlanes.edgeWidth,
+ clippingPlanes.edgeWidth
);
expect(
- Color.equals(uniformMap.model_clippingPlanesEdgeStyle(), expectedStyle),
+ Color.equals(uniformMap.model_clippingPlanesEdgeStyle(), expectedStyle)
).toBe(true);
expect(
Matrix4.equals(
uniformMap.model_clippingPlanesMatrix(),
- mockModel._clippingPlanesMatrix,
- ),
+ mockModel._clippingPlanesMatrix
+ )
).toBe(true);
ShaderBuilderTester.expectFragmentLinesEqual(shaderBuilder, [
@@ -108,7 +108,7 @@ describe("Scene/Model/ModelClippingPlanesPipelineStage", function () {
ModelClippingPlanesPipelineStage.process(
renderResources,
mockModel,
- mockFrameState,
+ mockFrameState
);
ShaderBuilderTester.expectHasFragmentDefines(shaderBuilder, [
@@ -146,7 +146,7 @@ describe("Scene/Model/ModelClippingPlanesPipelineStage", function () {
ModelClippingPlanesPipelineStage.process(
renderResources,
mockModel,
- mockFrameState,
+ mockFrameState
);
ShaderBuilderTester.expectHasFragmentDefines(shaderBuilder, [
diff --git a/packages/engine/Specs/Scene/Model/ModelClippingPolygonsPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/ModelClippingPolygonsPipelineStageSpec.js
index 964c0990130c..756d865e8688 100644
--- a/packages/engine/Specs/Scene/Model/ModelClippingPolygonsPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/ModelClippingPolygonsPipelineStageSpec.js
@@ -14,8 +14,12 @@ import createContext from "../../../../../Specs/createContext.js";
describe("Scene/Model/ModelClippingPolygonsPipelineStage", function () {
const positions = Cartesian3.fromRadiansArray([
- -1.3194369277314022, 0.6988062530900625, -1.31941, 0.69879,
- -1.3193931220959367, 0.698743632490865,
+ -1.3194369277314022,
+ 0.6988062530900625,
+ -1.31941,
+ 0.69879,
+ -1.3193931220959367,
+ 0.698743632490865,
]);
let polygon, clippingPolygons, context, model;
@@ -65,7 +69,7 @@ describe("Scene/Model/ModelClippingPolygonsPipelineStage", function () {
ModelClippingPolygonsPipelineStage.process(
renderResources,
model,
- mockFrameState,
+ mockFrameState
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
@@ -128,7 +132,7 @@ describe("Scene/Model/ModelClippingPolygonsPipelineStage", function () {
ModelClippingPolygonsPipelineStage.process(
renderResources,
model,
- mockFrameState,
+ mockFrameState
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
diff --git a/packages/engine/Specs/Scene/Model/ModelColorPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/ModelColorPipelineStageSpec.js
index 4d1ac96a7d19..d68bec1590c9 100644
--- a/packages/engine/Specs/Scene/Model/ModelColorPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/ModelColorPipelineStageSpec.js
@@ -50,8 +50,8 @@ describe(
expect(uniformMap.model_colorBlend()).toEqual(
ColorBlendMode.getColorBlend(
mockModel.colorBlendMode,
- mockModel.colorBlendAmount,
- ),
+ mockModel.colorBlendAmount
+ )
);
});
@@ -82,8 +82,8 @@ describe(
expect(uniformMap.model_colorBlend()).toEqual(
ColorBlendMode.getColorBlend(
mockModel.colorBlendMode,
- mockModel.colorBlendAmount,
- ),
+ mockModel.colorBlendAmount
+ )
);
});
@@ -110,5 +110,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/ModelDrawCommandSpec.js b/packages/engine/Specs/Scene/Model/ModelDrawCommandSpec.js
index 565e227470e5..6e86f1b0f1b6 100644
--- a/packages/engine/Specs/Scene/Model/ModelDrawCommandSpec.js
+++ b/packages/engine/Specs/Scene/Model/ModelDrawCommandSpec.js
@@ -119,14 +119,14 @@ describe(
const boundingSphereTransform2D = defaultValue(
options.boundingSphereTransform2D,
- Matrix4.IDENTITY,
+ Matrix4.IDENTITY
);
const sceneGraph = resources.model.sceneGraph;
sceneGraph._boundingSphere2D = BoundingSphere.transform(
sceneGraph._boundingSphere2D,
boundingSphereTransform2D,
- sceneGraph._boundingSphere2D,
+ sceneGraph._boundingSphere2D
);
return resources;
@@ -137,14 +137,14 @@ describe(
options.modelMatrix = defaultValue(
options.modelMatrix,
- Matrix4.clone(Matrix4.IDENTITY),
+ Matrix4.clone(Matrix4.IDENTITY)
);
const boundingSphere = new BoundingSphere(Cartesian3.ZERO, 1.0);
options.boundingVolume = BoundingSphere.transform(
boundingSphere,
options.modelMatrix,
- boundingSphere,
+ boundingSphere
);
options.renderState = defaultValue(
@@ -154,7 +154,7 @@ describe(
enabled: true,
func: DepthFunction.LESS_OR_EQUAL,
},
- }),
+ })
);
options.pass = defaultValue(options.pass, Pass.OPAQUE);
@@ -165,13 +165,13 @@ describe(
const idlMatrix = Matrix4.fromTranslation(
Cartesian3.fromDegrees(180, 0),
- new Matrix4(),
+ new Matrix4()
);
const idlMatrix2D = Transforms.basisTo2D(
mockFrameState2D.mapProjection,
idlMatrix,
- idlMatrix,
+ idlMatrix
);
// Creates a ModelDrawCommand with the specified derived commands.
@@ -208,7 +208,7 @@ describe(
if (derive2D) {
drawCommand.pushCommands(
mockFrameState2D,
- mockFrameState2D.commandList,
+ mockFrameState2D.commandList
);
mockFrameState2D.commandList.length = 0;
}
@@ -239,7 +239,7 @@ describe(
// Verify if the skip level of detail commands are defined / undefined.
const skipLevelOfDetailDefined = defaultValue(
expected.skipLevelOfDetail,
- false,
+ false
);
const skipLodBackfaceCommand = drawCommand._skipLodBackfaceCommand;
const skipLodStencilCommand = drawCommand._skipLodStencilCommand;
@@ -257,11 +257,11 @@ describe(
function verifyDerivedCommandUpdateFlags(derivedCommand, expected) {
expect(derivedCommand.updateShadows).toEqual(expected.updateShadows);
expect(derivedCommand.updateBackFaceCulling).toEqual(
- expected.updateBackFaceCulling,
+ expected.updateBackFaceCulling
);
expect(derivedCommand.updateCullFace).toEqual(expected.updateCullFace);
expect(derivedCommand.updateDebugShowBoundingVolume).toEqual(
- expected.updateDebugShowBoundingVolume,
+ expected.updateDebugShowBoundingVolume
);
}
@@ -298,7 +298,7 @@ describe(
expect(drawCommand.command).toBe(command);
expect(drawCommand.runtimePrimitive).toBe(
- renderResources.runtimePrimitive,
+ renderResources.runtimePrimitive
);
expect(drawCommand.model).toBe(renderResources.model);
@@ -379,7 +379,7 @@ describe(
function verifySilhouetteModelDerivedCommand(
derivedCommand,
stencilReference,
- modelIsInvisible,
+ modelIsInvisible
) {
const command = derivedCommand.command;
const renderState = command.renderState;
@@ -420,7 +420,7 @@ describe(
function verifySilhouetteColorDerivedCommand(
derivedCommand,
stencilReference,
- silhouetteIsTranslucent,
+ silhouetteIsTranslucent
) {
const command = derivedCommand.command;
const renderState = command.renderState;
@@ -467,7 +467,7 @@ describe(
drawCommand,
modelIsTranslucent,
modelIsInvisible,
- silhouetteIsTranslucent,
+ silhouetteIsTranslucent
) {
const command = drawCommand.command;
const derivedCommands = drawCommand._derivedCommands;
@@ -499,7 +499,7 @@ describe(
verifySilhouetteModelDerivedCommand(
silhouetteModelCommand,
stencilReference,
- modelIsInvisible,
+ modelIsInvisible
);
const silhouetteColorCommand = derivedCommands[2];
@@ -516,7 +516,7 @@ describe(
verifySilhouetteColorDerivedCommand(
silhouetteColorCommand,
stencilReference,
- silhouetteIsTranslucent,
+ silhouetteIsTranslucent
);
}
@@ -540,7 +540,7 @@ describe(
drawCommand,
modelIsTranslucent,
modelIsInvisible,
- silhouetteIsTranslucent,
+ silhouetteIsTranslucent
);
});
@@ -567,7 +567,7 @@ describe(
drawCommand,
modelIsTranslucent,
modelIsInvisible,
- silhouetteIsTranslucent,
+ silhouetteIsTranslucent
);
});
@@ -592,7 +592,7 @@ describe(
drawCommand,
modelIsTranslucent,
modelIsInvisible,
- silhouetteIsTranslucent,
+ silhouetteIsTranslucent
);
});
@@ -618,7 +618,7 @@ describe(
drawCommand,
modelIsTranslucent,
modelIsInvisible,
- silhouetteIsTranslucent,
+ silhouetteIsTranslucent
);
});
});
@@ -657,19 +657,19 @@ describe(
expect(stencilTest.enabled).toBe(true);
expect(stencilTest.mask).toEqual(StencilConstants.SKIP_LOD_MASK);
expect(stencilTest.reference).toEqual(
- StencilConstants.CESIUM_3D_TILE_MASK,
+ StencilConstants.CESIUM_3D_TILE_MASK
);
expect(stencilTest.frontFunction).toEqual(
- StencilFunction.GREATER_OR_EQUAL,
+ StencilFunction.GREATER_OR_EQUAL
);
expect(stencilTest.frontOperation.zPass).toEqual(
- StencilOperation.REPLACE,
+ StencilOperation.REPLACE
);
expect(stencilTest.backFunction).toEqual(
- StencilFunction.GREATER_OR_EQUAL,
+ StencilFunction.GREATER_OR_EQUAL
);
expect(stencilTest.backOperation.zPass).toEqual(
- StencilOperation.REPLACE,
+ StencilOperation.REPLACE
);
const expectedStencilMask =
@@ -928,7 +928,7 @@ describe(
drawCommand.pushCommands(
mockFrameState2D,
- mockFrameState2D.commandList,
+ mockFrameState2D.commandList
);
const originalCommand2D = originalCommand.derivedCommand2D;
@@ -940,7 +940,7 @@ describe(
expect(originalDrawCommand.modelMatrix).toBe(drawCommand._modelMatrix);
expect(originalDrawCommand2D.modelMatrix).toBe(
- drawCommand._modelMatrix2D,
+ drawCommand._modelMatrix2D
);
const commandList = mockFrameState2D.commandList;
@@ -971,7 +971,7 @@ describe(
drawCommand.pushCommands(
mockFrameState2D,
- mockFrameState2D.commandList,
+ mockFrameState2D.commandList
);
const originalCommand2D = originalCommand.derivedCommand2D;
@@ -988,10 +988,10 @@ describe(
const translucentDrawCommand2D = translucentCommand2D.command;
expect(translucentDrawCommand.modelMatrix).toBe(
- drawCommand._modelMatrix,
+ drawCommand._modelMatrix
);
expect(translucentDrawCommand2D.modelMatrix).toBe(
- drawCommand._modelMatrix2D,
+ drawCommand._modelMatrix2D
);
const commandList = mockFrameState2D.commandList;
@@ -1025,7 +1025,7 @@ describe(
drawCommand.pushCommands(
mockFrameState2D,
- mockFrameState2D.commandList,
+ mockFrameState2D.commandList
);
const silhouetteModelCommand2D =
@@ -1078,7 +1078,7 @@ describe(
drawCommand.pushCommands(
mockFrameState2D,
- mockFrameState2D.commandList,
+ mockFrameState2D.commandList
);
const skipLodBackfaceCommand2D =
@@ -1094,14 +1094,14 @@ describe(
const backfaceDrawCommand2D = skipLodBackfaceCommand2D.command;
expect(backfaceDrawCommand.modelMatrix).toBe(drawCommand._modelMatrix);
expect(backfaceDrawCommand2D.modelMatrix).toBe(
- drawCommand._modelMatrix2D,
+ drawCommand._modelMatrix2D
);
const stencilDrawCommand = skipLodStencilCommand.command;
const stencilDrawCommand2D = skipLodStencilCommand2D.command;
expect(stencilDrawCommand.modelMatrix).toBe(drawCommand._modelMatrix);
expect(stencilDrawCommand2D.modelMatrix).toBe(
- drawCommand._modelMatrix2D,
+ drawCommand._modelMatrix2D
);
const commandList = mockFrameState2D.commandList;
@@ -1119,12 +1119,12 @@ describe(
it("pushCommands doesn't derive 2D commands if model is not near IDL", function () {
const modelMatrix = Matrix4.fromTranslation(
Cartesian3.fromDegrees(100, 250),
- scratchModelMatrix,
+ scratchModelMatrix
);
const modelMatrix2D = Transforms.basisTo2D(
mockFrameState2D.mapProjection,
modelMatrix,
- modelMatrix,
+ modelMatrix
);
const renderResources = mockRenderResources({
boundingSphereTransform2D: modelMatrix2D,
@@ -1142,7 +1142,7 @@ describe(
drawCommand.pushCommands(
mockFrameState2D,
- mockFrameState2D.commandList,
+ mockFrameState2D.commandList
);
// The 2D command should not be derived.
@@ -1167,22 +1167,22 @@ describe(
const translation = Matrix4.getTranslation(
idlMatrix2D,
- scratchTranslation,
+ scratchTranslation
);
drawCommand.pushCommands(
mockFrameState2D,
- mockFrameState2D.commandList,
+ mockFrameState2D.commandList
);
const expectedModelMatrix = computeExpected2DMatrix(
idlMatrix2D,
- mockFrameState2D,
+ mockFrameState2D
);
const expectedTranslation = Matrix4.getTranslation(
expectedModelMatrix,
- scratchExpectedTranslation,
+ scratchExpectedTranslation
);
const originalCommand = drawCommand._originalCommand;
@@ -1198,7 +1198,7 @@ describe(
expect(translucentDrawCommand.modelMatrix).toEqual(idlMatrix2D);
expect(originalDrawCommand.boundingVolume.center).toEqual(translation);
expect(translucentDrawCommand.boundingVolume.center).toEqual(
- translation,
+ translation
);
const originalDrawCommand2D = originalCommand2D.command;
@@ -1206,13 +1206,13 @@ describe(
expect(originalDrawCommand2D.modelMatrix).toEqual(expectedModelMatrix);
expect(translucentDrawCommand2D.modelMatrix).toEqual(
- expectedModelMatrix,
+ expectedModelMatrix
);
expect(originalDrawCommand2D.boundingVolume.center).toEqual(
- expectedTranslation,
+ expectedTranslation
);
expect(translucentDrawCommand2D.boundingVolume.center).toEqual(
- expectedTranslation,
+ expectedTranslation
);
});
});
@@ -1267,7 +1267,7 @@ describe(
const silhouetteCommands = [];
drawCommand.pushSilhouetteCommands(
mockFrameState2D,
- silhouetteCommands,
+ silhouetteCommands
);
expect(silhouetteCommands.length).toEqual(2);
expect(silhouetteCommands[0]).toBe(colorDrawCommand);
@@ -1293,7 +1293,7 @@ describe(
const translation = Cartesian3.fromDegrees(100, 25);
const modelMatrix = Matrix4.fromTranslation(
translation,
- scratchModelMatrix,
+ scratchModelMatrix
);
drawCommand.modelMatrix = modelMatrix;
@@ -1316,17 +1316,17 @@ describe(
let modelMatrix2D = Matrix4.fromTranslation(
Cartesian3.fromDegrees(100, 25),
- scratchModelMatrix,
+ scratchModelMatrix
);
modelMatrix2D = Transforms.basisTo2D(
mockFrameState2D.mapProjection,
modelMatrix2D,
- modelMatrix2D,
+ modelMatrix2D
);
const translation = Matrix4.getTranslation(
modelMatrix2D,
- scratchTranslation,
+ scratchTranslation
);
drawCommand.modelMatrix = modelMatrix2D;
@@ -1343,16 +1343,16 @@ describe(
// Update the model matrix for the 2D commands
drawCommand.pushCommands(
mockFrameState2D,
- mockFrameState2D.commandList,
+ mockFrameState2D.commandList
);
const expectedModelMatrix = computeExpected2DMatrix(
modelMatrix2D,
- mockFrameState2D,
+ mockFrameState2D
);
const expectedTranslation = Matrix4.getTranslation(
expectedModelMatrix,
- scratchExpectedTranslation,
+ scratchExpectedTranslation
);
// The second half of the derived command list contains 2D commands.
@@ -1710,7 +1710,7 @@ describe(
}
expect(command.debugShowBoundingVolume).toBe(
- updateDebugShowBoundingVolume,
+ updateDebugShowBoundingVolume
);
}
});
@@ -1741,11 +1741,11 @@ describe(
}
expect(command.debugShowBoundingVolume).toBe(
- updateDebugShowBoundingVolume,
+ updateDebugShowBoundingVolume
);
}
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/ModelFeatureTableSpec.js b/packages/engine/Specs/Scene/Model/ModelFeatureTableSpec.js
index d16cd5128f5a..ee195d8ce093 100644
--- a/packages/engine/Specs/Scene/Model/ModelFeatureTableSpec.js
+++ b/packages/engine/Specs/Scene/Model/ModelFeatureTableSpec.js
@@ -131,7 +131,7 @@ describe("Scene/Model/ModelFeatureTable", function () {
for (let i = 0; i < modelFeatures.length; i++) {
const feature = modelFeatures[i];
expect(feature.getProperty(propertyName)).toEqual(
- propertyValues[propertyName][i],
+ propertyValues[propertyName][i]
);
}
}
@@ -154,7 +154,7 @@ describe("Scene/Model/ModelFeatureTable", function () {
for (i = 0; i < modelFeatures.length; i++) {
feature = modelFeatures[i];
expect(feature.getPropertyInherited("height")).toEqual(
- propertyValues["height"][i],
+ propertyValues["height"][i]
);
expect(feature.getPropertyInherited("_height")).toBeUndefined();
}
@@ -163,7 +163,7 @@ describe("Scene/Model/ModelFeatureTable", function () {
for (i = 0; i < modelFeatures.length; i++) {
feature = modelFeatures[i];
expect(feature.getPropertyInherited("HEIGHT_SEMANTIC")).toEqual(
- propertyValues["height"][i],
+ propertyValues["height"][i]
);
expect(feature.getPropertyInherited("_HEIGHT_")).toBeUndefined();
}
diff --git a/packages/engine/Specs/Scene/Model/ModelMatrixUpdateStageSpec.js b/packages/engine/Specs/Scene/Model/ModelMatrixUpdateStageSpec.js
index 34d699423f47..17ffae777fe4 100644
--- a/packages/engine/Specs/Scene/Model/ModelMatrixUpdateStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/ModelMatrixUpdateStageSpec.js
@@ -37,12 +37,12 @@ describe(
const rotation = Quaternion.fromAxisAngle(
Cartesian3.UNIT_Y,
- CesiumMath.toRadians(180),
+ CesiumMath.toRadians(180)
);
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
new Cartesian3(10, 0, 0),
rotation,
- new Cartesian3(1, 1, 1),
+ new Cartesian3(1, 1, 1)
);
let scene;
@@ -138,12 +138,12 @@ describe(
node.transform = Matrix4.multiplyTransformation(
node.transform,
transform,
- new Matrix4(),
+ new Matrix4()
);
expect(node._transformDirty).toEqual(true);
expect(
- Matrix4.equals(node.originalTransform, expectedOriginalTransform),
+ Matrix4.equals(node.originalTransform, expectedOriginalTransform)
).toBe(true);
}
@@ -152,7 +152,7 @@ describe(
{
gltf: simpleSkin,
},
- scene,
+ scene
);
scene.renderForSpecs();
@@ -168,19 +168,19 @@ describe(
const expectedComputedTransform = Matrix4.multiplyTransformation(
sceneGraph.computedModelMatrix,
node.transform,
- new Matrix4(),
+ new Matrix4()
);
const expectedModelMatrix = Matrix4.multiplyTransformation(
drawCommand.modelMatrix,
transform,
- new Matrix4(),
+ new Matrix4()
);
const expectedBoundingSphere = BoundingSphere.transform(
primitive.boundingSphere,
expectedComputedTransform,
- new BoundingSphere(),
+ new BoundingSphere()
);
scene.renderForSpecs();
@@ -190,14 +190,14 @@ describe(
Matrix4.equalsEpsilon(
drawCommand.modelMatrix,
expectedModelMatrix,
- CesiumMath.EPSILON15,
- ),
+ CesiumMath.EPSILON15
+ )
).toBe(true);
expect(
BoundingSphere.equals(
drawCommand.boundingVolume,
- expectedBoundingSphere,
- ),
+ expectedBoundingSphere
+ )
).toBe(true);
});
@@ -206,7 +206,7 @@ describe(
{
gltf: simpleSkin,
},
- scene,
+ scene
);
modifyModel(model);
@@ -221,23 +221,23 @@ describe(
let transformedDrawCommand = getDrawCommand(transformedLeafNode);
const childTransformation = Matrix4.fromTranslation(
- new Cartesian3(0, 5, 0),
+ new Cartesian3(0, 5, 0)
);
applyTransform(transformedLeafNode, childTransformation);
const rootTransformation = Matrix4.fromTranslation(
- new Cartesian3(12, 5, 0),
+ new Cartesian3(12, 5, 0)
);
applyTransform(rootNode, rootTransformation);
const expectedRootModelMatrix = Matrix4.multiplyTransformation(
rootTransformation,
rootDrawCommand.modelMatrix,
- new Matrix4(),
+ new Matrix4()
);
const expectedStaticLeafModelMatrix = Matrix4.clone(
staticDrawCommand.modelMatrix,
- new Matrix4(),
+ new Matrix4()
);
const finalTransform = new Matrix4();
@@ -245,7 +245,7 @@ describe(
const expectedTransformedLeafModelMatrix = Matrix4.multiplyTransformation(
finalTransform,
transformedDrawCommand.modelMatrix,
- new Matrix4(),
+ new Matrix4()
);
scene.renderForSpecs();
@@ -255,10 +255,10 @@ describe(
expect(rootDrawCommand.modelMatrix).toEqual(expectedRootModelMatrix);
expect(staticDrawCommand.modelMatrix).toEqual(
- expectedStaticLeafModelMatrix,
+ expectedStaticLeafModelMatrix
);
expect(transformedDrawCommand.modelMatrix).toEqual(
- expectedTransformedLeafModelMatrix,
+ expectedTransformedLeafModelMatrix
);
});
@@ -267,7 +267,7 @@ describe(
{
gltf: simpleSkin,
},
- scene,
+ scene
);
modifyModel(model);
@@ -284,17 +284,17 @@ describe(
const expectedRootModelMatrix = Matrix4.multiplyTransformation(
modelMatrix,
rootDrawCommand.modelMatrix,
- new Matrix4(),
+ new Matrix4()
);
const expectedStaticLeafModelMatrix = Matrix4.multiplyTransformation(
modelMatrix,
staticDrawCommand.modelMatrix,
- new Matrix4(),
+ new Matrix4()
);
const expectedTransformedLeafModelMatrix = Matrix4.multiplyTransformation(
modelMatrix,
transformedDrawCommand.modelMatrix,
- new Matrix4(),
+ new Matrix4()
);
model.modelMatrix = modelMatrix;
@@ -306,10 +306,10 @@ describe(
expect(rootDrawCommand.modelMatrix).toEqual(expectedRootModelMatrix);
expect(staticDrawCommand.modelMatrix).toEqual(
- expectedStaticLeafModelMatrix,
+ expectedStaticLeafModelMatrix
);
expect(transformedDrawCommand.modelMatrix).toEqual(
- expectedTransformedLeafModelMatrix,
+ expectedTransformedLeafModelMatrix
);
});
@@ -318,7 +318,7 @@ describe(
{
gltf: simpleSkin,
},
- scene,
+ scene
);
modifyModel(model);
@@ -328,7 +328,7 @@ describe(
const scaledModelMatrix = Matrix4.multiplyByUniformScale(
modelMatrix,
modelScale,
- new Matrix4(),
+ new Matrix4()
);
const rootNode = getParentRootNode(model);
@@ -342,17 +342,17 @@ describe(
const expectedRootModelMatrix = Matrix4.multiplyTransformation(
scaledModelMatrix,
rootDrawCommand.modelMatrix,
- new Matrix4(),
+ new Matrix4()
);
const expectedStaticLeafModelMatrix = Matrix4.multiplyTransformation(
scaledModelMatrix,
staticDrawCommand.modelMatrix,
- new Matrix4(),
+ new Matrix4()
);
const expectedTransformedLeafModelMatrix = Matrix4.multiplyTransformation(
scaledModelMatrix,
transformedDrawCommand.modelMatrix,
- new Matrix4(),
+ new Matrix4()
);
model.modelMatrix = modelMatrix;
@@ -364,10 +364,10 @@ describe(
expect(rootDrawCommand.modelMatrix).toEqual(expectedRootModelMatrix);
expect(staticDrawCommand.modelMatrix).toEqual(
- expectedStaticLeafModelMatrix,
+ expectedStaticLeafModelMatrix
);
expect(transformedDrawCommand.modelMatrix).toEqual(
- expectedTransformedLeafModelMatrix,
+ expectedTransformedLeafModelMatrix
);
});
@@ -376,7 +376,7 @@ describe(
{
gltf: simpleSkin,
},
- scene,
+ scene
);
modifyModel(model);
@@ -401,5 +401,5 @@ describe(
expect(childDrawCommand.cullFace).toBe(CullFace.FRONT);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/ModelRenderResourcesSpec.js b/packages/engine/Specs/Scene/Model/ModelRenderResourcesSpec.js
index 6fe8cf58d8ed..26c843b4c6fd 100644
--- a/packages/engine/Specs/Scene/Model/ModelRenderResourcesSpec.js
+++ b/packages/engine/Specs/Scene/Model/ModelRenderResourcesSpec.js
@@ -25,7 +25,7 @@ describe(
enabled: true,
func: DepthFunction.LESS_OR_EQUAL,
},
- }),
+ })
);
expect(modelResources.model).toBe(mockModel);
@@ -35,9 +35,9 @@ describe(
expect(modelResources.hasSkipLevelOfDetail).toBe(false);
ShaderBuilderTester.expectHasFragmentDefines(
modelResources.shaderBuilder,
- [],
+ []
);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/ModelRuntimeNodeSpec.js b/packages/engine/Specs/Scene/Model/ModelRuntimeNodeSpec.js
index 6f73a0ca076c..7bf4f8a1c3b6 100644
--- a/packages/engine/Specs/Scene/Model/ModelRuntimeNodeSpec.js
+++ b/packages/engine/Specs/Scene/Model/ModelRuntimeNodeSpec.js
@@ -40,7 +40,7 @@ describe("Scene/Model/ModelRuntimeNode", function () {
transform,
transformToRoot,
runtimeNode,
- originalTransform,
+ originalTransform
) {
originalTransform = defaultValue(originalTransform, transform);
@@ -51,7 +51,7 @@ describe("Scene/Model/ModelRuntimeNode", function () {
const computedTransform = Matrix4.multiplyTransformation(
transformToRoot,
transform,
- scratchMatrix,
+ scratchMatrix
);
expect(runtimeNode.computedTransform).toEqual(computedTransform);
@@ -275,7 +275,7 @@ describe("Scene/Model/ModelRuntimeNode", function () {
const translationMatrix = Matrix4.fromTranslation(
translation,
- scratchTransform,
+ scratchTransform
);
expect(node.translation).toEqual(translation);
@@ -305,7 +305,7 @@ describe("Scene/Model/ModelRuntimeNode", function () {
const rotationMatrix3 = Matrix3.fromQuaternion(rotation, new Matrix3());
const rotationMatrix = Matrix4.fromRotation(
rotationMatrix3,
- scratchTransform,
+ scratchTransform
);
expect(node.rotation).toEqual(rotation);
@@ -461,7 +461,7 @@ describe("Scene/Model/ModelRuntimeNode", function () {
const newTransform = Matrix4.multiplyByTranslation(
Matrix4.IDENTITY,
new Cartesian3(10, 0, 0),
- new Matrix4(),
+ new Matrix4()
);
node.transform = newTransform;
@@ -485,7 +485,7 @@ describe("Scene/Model/ModelRuntimeNode", function () {
const newTransform = Matrix4.multiplyByTranslation(
Matrix4.IDENTITY,
new Cartesian3(10, 0, 0),
- new Matrix4(),
+ new Matrix4()
);
node.transform = newTransform;
diff --git a/packages/engine/Specs/Scene/Model/ModelSceneGraphSpec.js b/packages/engine/Specs/Scene/Model/ModelSceneGraphSpec.js
index 147536b015b8..8de1acdc3ee6 100644
--- a/packages/engine/Specs/Scene/Model/ModelSceneGraphSpec.js
+++ b/packages/engine/Specs/Scene/Model/ModelSceneGraphSpec.js
@@ -50,7 +50,7 @@ describe(
it("creates runtime nodes and runtime primitives from a model", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: vertexColorGltfUrl },
- scene,
+ scene
);
const sceneGraph = model._sceneGraph;
const components = sceneGraph._components;
@@ -75,7 +75,7 @@ describe(
{
gltf: buildingsMetadata,
},
- scene,
+ scene
);
model.style = style;
@@ -101,7 +101,7 @@ describe(
{
gltf: buildingsMetadata,
},
- scene,
+ scene
);
model.style = style;
@@ -131,7 +131,7 @@ describe(
{
gltf: buildingsMetadata,
},
- scene,
+ scene
);
model.style = style;
@@ -153,7 +153,7 @@ describe(
spyOn(ModelSceneGraph.prototype, "pushDrawCommands").and.callThrough();
const model = await loadAndZoomToModelAsync(
{ gltf: parentGltfUrl },
- scene,
+ scene
);
const sceneGraph = model._sceneGraph;
@@ -183,7 +183,7 @@ describe(
it("stores runtime nodes correctly", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: parentGltfUrl },
- scene,
+ scene
);
const sceneGraph = model._sceneGraph;
@@ -204,7 +204,7 @@ describe(
upAxis: Axis.Z,
forwardAxis: Axis.X,
},
- scene,
+ scene
);
const sceneGraph = model._sceneGraph;
const components = sceneGraph._components;
@@ -214,7 +214,7 @@ describe(
expect(components.forwardAxis).toEqual(Axis.X);
const parentTransform = ModelUtility.getNodeTransform(
- components.nodes[0],
+ components.nodes[0]
);
const childTransform = ModelUtility.getNodeTransform(components.nodes[1]);
expect(runtimeNodes[0].transform).toEqual(parentTransform);
@@ -226,7 +226,7 @@ describe(
it("creates runtime skin from model", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: simpleSkinGltfUrl },
- scene,
+ scene
);
const sceneGraph = model._sceneGraph;
@@ -258,7 +258,7 @@ describe(
it("creates articulation from model", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: boxArticulationsUrl },
- scene,
+ scene
);
const sceneGraph = model._sceneGraph;
@@ -283,7 +283,7 @@ describe(
{
gltf: boxArticulationsUrl,
},
- scene,
+ scene
);
const sceneGraph = model._sceneGraph;
const runtimeNodes = sceneGraph._runtimeNodes;
@@ -325,7 +325,7 @@ describe(
color: Color.RED,
gltf: parentGltfUrl,
},
- scene,
+ scene
);
expect(ModelColorPipelineStage.process).toHaveBeenCalled();
});
@@ -336,7 +336,7 @@ describe(
{
gltf: buildingsMetadata,
},
- scene,
+ scene
);
model.customShader = new CustomShader();
model.update(scene.frameState);
@@ -351,7 +351,7 @@ describe(
{
gltf: buildingsMetadata,
},
- scene,
+ scene
);
model.customShader = new CustomShader();
model.update(scene.frameState);
@@ -366,7 +366,7 @@ describe(
{
gltf: buildingsMetadata,
},
- scene,
+ scene
);
model.customShader = new CustomShader();
model.update(scene.frameState);
@@ -381,7 +381,7 @@ describe(
{
gltf: buildingsMetadata,
},
- scene,
+ scene
);
model.customShader = new CustomShader();
model.update(scene.frameState);
@@ -393,7 +393,7 @@ describe(
{
gltf: duckUrl,
},
- scene,
+ scene
);
const frameState = scene.frameState;
const commandList = frameState.commandList;
@@ -442,5 +442,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/ModelSilhouettePipelineStageSpec.js b/packages/engine/Specs/Scene/Model/ModelSilhouettePipelineStageSpec.js
index 243c07aff70c..a25da3380d4b 100644
--- a/packages/engine/Specs/Scene/Model/ModelSilhouettePipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/ModelSilhouettePipelineStageSpec.js
@@ -57,7 +57,7 @@ describe("Scene/Model/ModelSilhouettePipelineStage", function () {
const uniformMap = renderResources.uniformMap;
expect(uniformMap.model_silhouetteColor()).toEqual(
- mockModel.silhouetteColor,
+ mockModel.silhouetteColor
);
expect(uniformMap.model_silhouetteSize()).toEqual(mockModel.silhouetteSize);
expect(uniformMap.model_silhouettePass()).toBe(false);
diff --git a/packages/engine/Specs/Scene/Model/ModelSpec.js b/packages/engine/Specs/Scene/Model/ModelSpec.js
index aa4f099a657a..8a6386bd7c18 100644
--- a/packages/engine/Specs/Scene/Model/ModelSpec.js
+++ b/packages/engine/Specs/Scene/Model/ModelSpec.js
@@ -67,7 +67,7 @@ describe(
const animatedTriangleOffset = new HeadingPitchRange(
CesiumMath.PI / 2.0,
0,
- 2.0,
+ 2.0
);
const boxTexturedGltfUrl =
@@ -127,14 +127,14 @@ describe(
const fixedFrameTransform = Transforms.localFrameToFixedFrameGenerator(
"north",
- "west",
+ "west"
);
const modelMatrix = Transforms.headingPitchRollToFixedFrame(
Cartesian3.fromDegrees(-123.0744619, 44.0503706, 0),
new HeadingPitchRoll(0, 0, 0),
Ellipsoid.WGS84,
- fixedFrameTransform,
+ fixedFrameTransform
);
let scene;
@@ -177,7 +177,7 @@ describe(
const scratchBytes = [];
const defaultDate = JulianDate.fromDate(
- new Date("January 1, 2014 12:00:00 UTC"),
+ new Date("January 1, 2014 12:00:00 UTC")
);
function verifyRender(model, shouldRender, options) {
@@ -191,7 +191,7 @@ describe(
const backgroundColor = defaultValue(
options.backgroundColor,
- Color.BLACK,
+ Color.BLACK
);
const targetScene = defaultValue(options.scene, scene);
@@ -245,7 +245,7 @@ describe(
const expectedCount = WireframeIndexGenerator.getWireframeIndicesCount(
primitiveType,
- commandCounts[i],
+ commandCounts[i]
);
expect(command.count).toEqual(expectedCount);
}
@@ -270,7 +270,7 @@ describe(
it("fromGltfAsync throws with undefined url", async function () {
await expectAsync(
- Model.fromGltfAsync({}),
+ Model.fromGltfAsync({})
).toBeRejectedWithDeveloperError();
});
@@ -279,7 +279,7 @@ describe(
const buffer = await resource.fetchArrayBuffer();
const model = await loadAndZoomToModelAsync(
{ gltf: new Uint8Array(buffer) },
- scene,
+ scene
);
expect(model.ready).toEqual(true);
expect(model._sceneGraph).toBeDefined();
@@ -295,7 +295,7 @@ describe(
gltf: gltf,
basePath: boxTexturedGltfUrl,
},
- scene,
+ scene
);
expect(model.ready).toEqual(true);
expect(model._sceneGraph).toBeDefined();
@@ -311,7 +311,7 @@ describe(
gltf: gltf,
basePath: microcosm,
},
- scene,
+ scene
);
expect(model.ready).toEqual(true);
expect(model._sceneGraph).toBeDefined();
@@ -324,7 +324,7 @@ describe(
{
url: boxTexturedGltfUrl,
},
- scene,
+ scene
);
expect(model.ready).toEqual(true);
expect(model._sceneGraph).toBeDefined();
@@ -342,11 +342,11 @@ describe(
expect(gltf).toEqual(
jasmine.objectContaining({
asset: { generator: "COLLADA2GLTF", version: "2.0" },
- }),
+ })
);
},
},
- scene,
+ scene
);
expect(model.ready).toEqual(true);
expect(model._sceneGraph).toBeDefined();
@@ -371,7 +371,7 @@ describe(
expect(e).toBeInstanceOf(RuntimeError);
expect(e.message).toContain("Failed to load texture");
expect(e.message).toContain(
- "Failed to load image: non-existent-path.png",
+ "Failed to load image: non-existent-path.png"
);
finished = true;
});
@@ -397,7 +397,7 @@ describe(
model.errorEvent.addEventListener((e) => {
expect(e).toBeInstanceOf(RuntimeError);
expect(e.message).toContain(
- `Failed to load model: ${boxTexturedGltfUrl}`,
+ `Failed to load model: ${boxTexturedGltfUrl}`
);
expect(e.message).toContain("Failed to load texture");
finished = true;
@@ -424,7 +424,7 @@ describe(
model.errorEvent.addEventListener((e) => {
expect(e).toBeInstanceOf(RuntimeError);
expect(e.message).toContain(
- `Failed to load model: ${boxTexturedGltfUrl}`,
+ `Failed to load model: ${boxTexturedGltfUrl}`
);
expect(e.message).toContain("Failed to load vertex buffer");
finished = true;
@@ -439,7 +439,7 @@ describe(
it("loads with asynchronous set to true", async function () {
const jobSchedulerExecute = spyOn(
JobScheduler.prototype,
- "execute",
+ "execute"
).and.callThrough();
const model = await loadAndZoomToModelAsync(
@@ -447,7 +447,7 @@ describe(
gltf: boxTexturedGltfUrl,
asynchronous: true,
},
- scene,
+ scene
);
const loader = model.loader;
expect(loader._asynchronous).toBe(true);
@@ -458,7 +458,7 @@ describe(
it("loads with asynchronous set to false", async function () {
const jobSchedulerExecute = spyOn(
JobScheduler.prototype,
- "execute",
+ "execute"
).and.callThrough();
const model = await loadAndZoomToModelAsync(
@@ -466,7 +466,7 @@ describe(
gltf: boxTexturedGltfUrl,
asynchronous: false,
},
- scene,
+ scene
);
const loader = model.loader;
expect(loader._asynchronous).toBe(false);
@@ -477,7 +477,7 @@ describe(
it("initializes feature table", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: buildingsMetadata },
- scene,
+ scene
);
expect(model.ready).toEqual(true);
expect(model.featureTables).toBeDefined();
@@ -506,7 +506,7 @@ describe(
{
gltf: boxTexturedGlbUrl,
},
- scene,
+ scene
);
expect(model.show).toEqual(true);
expect(model.modelMatrix).toEqual(Matrix4.IDENTITY);
@@ -564,17 +564,17 @@ describe(
gltf: gltf,
basePath: triangleWithoutIndicesUrl,
modelMatrix: Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(0.0, 0.0, 100.0),
+ Cartesian3.fromDegrees(0.0, 0.0, 100.0)
),
},
- scene,
+ scene
);
// Orient the camera so it doesn't back-face cull the triangle.
const center = model.boundingSphere.center;
const range = 4.0 * model.boundingSphere.radius;
scene.camera.lookAt(
center,
- new HeadingPitchRange(-CesiumMath.PI_OVER_TWO, 0, range),
+ new HeadingPitchRange(-CesiumMath.PI_OVER_TWO, 0, range)
);
// The triangle's diagonal edge is slightly out of frame.
@@ -593,7 +593,7 @@ describe(
gltf: gltf,
basePath: vertexColorTestUrl,
},
- scene,
+ scene
);
const renderOptions = {
scene: scene,
@@ -627,10 +627,10 @@ describe(
gltf: gltf,
basePath: twoSidedPlaneUrl,
modelMatrix: Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(0.0, 0.0, 100.0),
+ Cartesian3.fromDegrees(0.0, 0.0, 100.0)
),
},
- scene,
+ scene
);
const renderOptions = {
scene: scene,
@@ -641,7 +641,7 @@ describe(
const range = 4.0 * model.boundingSphere.radius;
scene.camera.lookAt(
center,
- new HeadingPitchRange(0, -CesiumMath.PI_OVER_TWO, range),
+ new HeadingPitchRange(0, -CesiumMath.PI_OVER_TWO, range)
);
// The top of the double-sided plane should render brightly, since
@@ -654,7 +654,7 @@ describe(
scene.camera.lookAt(
center,
- new HeadingPitchRange(0, CesiumMath.PI_OVER_TWO, range),
+ new HeadingPitchRange(0, CesiumMath.PI_OVER_TWO, range)
);
// The bottom of the plane should render darker than the top, since
@@ -679,7 +679,7 @@ describe(
gltf: gltf,
basePath: emissiveTextureUrl,
},
- scene,
+ scene
);
const renderOptions = {
scene: scene,
@@ -710,7 +710,7 @@ describe(
scale: 10.0,
offset: offset,
},
- scene,
+ scene
);
verifyRender(model, true);
});
@@ -723,7 +723,7 @@ describe(
gltf: gltf,
basePath: boxSpecularUrl,
},
- scene,
+ scene
);
verifyRender(model, true);
});
@@ -736,7 +736,7 @@ describe(
gltf: gltf,
basePath: boxAnisotropyUrl,
},
- scene,
+ scene
);
verifyRender(model, true);
});
@@ -749,14 +749,14 @@ describe(
gltf: gltf,
basePath: boxClearcoatUrl,
},
- scene,
+ scene
);
verifyRender(model, true);
});
it("transforms property textures with KHR_texture_transform", async function () {
const resource = Resource.createIfNeeded(
- propertyTextureWithTextureTransformUrl,
+ propertyTextureWithTextureTransformUrl
);
// The texture in the example model contains contains 8x8 pixels
// with increasing 'red' component values [0 to 64)*3, interpreted
@@ -794,7 +794,7 @@ describe(
// texture is fully loaded when the model is rendered!
incrementallyLoadTextures: false,
},
- scene,
+ scene
);
const renderOptions = {
scene: scene,
@@ -806,7 +806,7 @@ describe(
scene.camera.position = new Cartesian3(0.15, 0.1, 0.1);
scene.camera.direction = Cartesian3.negate(
Cartesian3.UNIT_X,
- new Cartesian3(),
+ new Cartesian3()
);
scene.camera.up = Cartesian3.clone(Cartesian3.UNIT_Z);
scene.camera.frustum.near = 0.01;
@@ -824,7 +824,7 @@ describe(
it("transforms feature ID textures with KHR_texture_transform", async function () {
const resource = Resource.createIfNeeded(
- featureIdTextureWithTextureTransformUrl,
+ featureIdTextureWithTextureTransformUrl
);
// The texture in the example model contains contains 8x8 pixels
// with increasing 'red' component values [0 to 64)*3.
@@ -860,7 +860,7 @@ describe(
// texture is fully loaded when the model is rendered!
incrementallyLoadTextures: false,
},
- scene,
+ scene
);
const renderOptions = {
scene: scene,
@@ -873,7 +873,7 @@ describe(
scene.camera.position = new Cartesian3(0.15, 0.1, 0.1);
scene.camera.direction = Cartesian3.negate(
Cartesian3.UNIT_X,
- new Cartesian3(),
+ new Cartesian3()
);
scene.camera.up = Cartesian3.clone(Cartesian3.UNIT_Z);
scene.camera.frustum.near = 0.01;
@@ -902,7 +902,7 @@ describe(
basePath: morphPrimitivesTestUrl,
offset: offset,
},
- scene,
+ scene
);
// The background color must be changed because the model's texture
// contains black, which can confuse the test.
@@ -922,7 +922,7 @@ describe(
it("renders Draco-compressed model", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: dracoCesiumManUrl },
- scene,
+ scene
);
verifyRender(model, true);
});
@@ -941,14 +941,14 @@ describe(
const model = scene.primitives.add(
await Model.fromGltfAsync({
url: dracoCesiumManUrl,
- }),
+ })
);
let failed = false;
model.errorEvent.addEventListener((e) => {
expect(e).toBeInstanceOf(RuntimeError);
expect(e.message).toContain(
- `Failed to load model: ${dracoCesiumManUrl}`,
+ `Failed to load model: ${dracoCesiumManUrl}`
);
expect(e.message).toContain("Failed to load Draco");
expect(e.message).toContain("Custom error");
@@ -960,7 +960,7 @@ describe(
scene.renderForSpecs();
return failed;
},
- { timeout: 10000 },
+ { timeout: 10000 }
);
});
@@ -970,7 +970,7 @@ describe(
gltf: animatedTriangleUrl,
offset: animatedTriangleOffset,
},
- scene,
+ scene
);
const animationCollection = model.activeAnimations;
expect(animationCollection).toBeDefined();
@@ -989,7 +989,7 @@ describe(
gltf: animatedTriangleUrl,
offset: animatedTriangleOffset,
},
- scene,
+ scene
);
// Move camera so that the triangle is in view.
scene.camera.moveDown(0.5);
@@ -1020,7 +1020,7 @@ describe(
{
gltf: boxCesiumRtcUrl,
},
- scene,
+ scene
);
verifyRender(model, true);
});
@@ -1028,7 +1028,7 @@ describe(
it("adds animation to draco-compressed model", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: dracoCesiumManUrl },
- scene,
+ scene
);
verifyRender(model, true);
@@ -1046,7 +1046,7 @@ describe(
const offset = new HeadingPitchRange(
CesiumMath.PI_OVER_TWO,
-CesiumMath.PI_OVER_FOUR,
- 1,
+ 1
);
const resource = Resource.createIfNeeded(boxInstancedNoNormalsUrl);
@@ -1057,7 +1057,7 @@ describe(
basePath: boxInstancedNoNormalsUrl,
offset: offset,
},
- scene,
+ scene
);
const renderOptions = {
zoomToModel: false,
@@ -1071,7 +1071,7 @@ describe(
const buffer = await resource.fetchArrayBuffer();
const model = await loadAndZoomToModelAsync(
{ gltf: new Uint8Array(buffer), show: false },
- scene,
+ scene
);
expect(model.ready).toEqual(true);
expect(model.show).toEqual(false);
@@ -1088,7 +1088,7 @@ describe(
gltf: boxTexturedGlbUrl,
modelMatrix: modelMatrix,
},
- scene2D,
+ scene2D
);
expect(model.ready).toEqual(true);
verifyRender(model, true, {
@@ -1102,10 +1102,10 @@ describe(
{
gltf: boxTexturedGlbUrl,
modelMatrix: Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(180.0, 0.0),
+ Cartesian3.fromDegrees(180.0, 0.0)
),
},
- scene2D,
+ scene2D
);
expect(model.ready).toEqual(true);
verifyRender(model, true, {
@@ -1114,7 +1114,7 @@ describe(
});
model.modelMatrix = Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(-180.0, 0.0),
+ Cartesian3.fromDegrees(-180.0, 0.0)
);
verifyRender(model, true, {
zoomToModel: false,
@@ -1128,7 +1128,7 @@ describe(
gltf: boxTexturedGlbUrl,
modelMatrix: modelMatrix,
},
- sceneCV,
+ sceneCV
);
expect(model.ready).toEqual(true);
scene.camera.moveBackward(1.0);
@@ -1144,7 +1144,7 @@ describe(
gltf: boxTexturedGlbUrl,
modelMatrix: modelMatrix,
},
- sceneCV,
+ sceneCV
);
expect(model.ready).toEqual(true);
scene.camera.moveBackward(1.0);
@@ -1168,7 +1168,7 @@ describe(
projectTo2D: true,
incrementallyLoadTextures: false,
},
- scene2D,
+ scene2D
);
expect(model.ready).toEqual(true);
verifyRender(model, true, {
@@ -1185,7 +1185,7 @@ describe(
projectTo2D: true,
incrementallyLoadTextures: false,
},
- sceneCV,
+ sceneCV
);
expect(model.ready).toEqual(true);
sceneCV.camera.moveBackward(1.0);
@@ -1202,7 +1202,7 @@ describe(
modelMatrix: modelMatrix,
projectTo2D: true,
},
- scene,
+ scene
);
const commandList = scene.frameState.commandList;
expect(model.ready).toEqual(true);
@@ -1224,7 +1224,7 @@ describe(
it("applies style to model with feature table", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: buildingsMetadata },
- scene,
+ scene
);
// Renders without style.
@@ -1247,7 +1247,7 @@ describe(
});
verifyRender(model, true);
expect(model._styleCommandsNeeded).toBe(
- StyleCommandsNeeded.ALL_TRANSLUCENT,
+ StyleCommandsNeeded.ALL_TRANSLUCENT
);
// Does not render with invisible color.
@@ -1274,7 +1274,7 @@ describe(
it("applies style to model without feature table", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGlbUrl },
- scene,
+ scene
);
const renderOptions = {
@@ -1350,7 +1350,7 @@ describe(
basePath: boxTexturedGltfUrl,
credit: credit,
},
- scene,
+ scene
);
scene.renderForSpecs();
const creditDisplay = scene.frameState.creditDisplay;
@@ -1370,7 +1370,7 @@ describe(
basePath: boxTexturedGltfUrl,
credit: creditString,
},
- scene,
+ scene
);
scene.renderForSpecs();
const creditDisplay = scene.frameState.creditDisplay;
@@ -1388,7 +1388,7 @@ describe(
gltf: gltf,
basePath: boxWithCreditsUrl,
},
- scene,
+ scene
);
const expectedCredits = [
"First Source",
@@ -1415,7 +1415,7 @@ describe(
basePath: boxWithCreditsUrl,
credit: "User Credit",
},
- scene,
+ scene
);
model._resourceCredits = [new Credit("Resource Credit")];
const expectedCredits = [
@@ -1446,7 +1446,7 @@ describe(
credit: "User Credit",
showCreditsOnScreen: true,
},
- scene,
+ scene
);
const expectedCredits = [
"User Credit",
@@ -1474,7 +1474,7 @@ describe(
credit: "User Credit",
showCreditsOnScreen: false,
},
- scene,
+ scene
);
const expectedCredits = [
"User Credit",
@@ -1523,7 +1523,7 @@ describe(
credit: new Credit("User Credit", false),
showCreditsOnScreen: true,
},
- scene,
+ scene
);
scene.renderForSpecs();
const creditDisplay = scene.frameState.creditDisplay;
@@ -1564,7 +1564,7 @@ describe(
const buffer = await resource.fetchArrayBuffer();
const model = await loadAndZoomToModelAsync(
{ gltf: new Uint8Array(buffer), enableDebugWireframe: true },
- sceneWithWebgl1,
+ sceneWithWebgl1
);
verifyDebugWireframe(model, PrimitiveType.TRIANGLES);
});
@@ -1574,7 +1574,7 @@ describe(
const buffer = await resource.fetchArrayBuffer();
const model = await loadAndZoomToModelAsync(
{ gltf: new Uint8Array(buffer), enableDebugWireframe: false },
- sceneWithWebgl1,
+ sceneWithWebgl1
);
const commandList = scene.frameState.commandList;
const commandCounts = [];
@@ -1604,7 +1604,7 @@ describe(
const buffer = await resource.fetchArrayBuffer();
const model = await loadAndZoomToModelAsync(
{ gltf: new Uint8Array(buffer) },
- scene,
+ scene
);
verifyDebugWireframe(model, PrimitiveType.TRIANGLES, {
scene: scene,
@@ -1614,7 +1614,7 @@ describe(
it("debugWireframe works for model without indices", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: triangleWithoutIndicesUrl, enableDebugWireframe: true },
- scene,
+ scene
);
verifyDebugWireframe(model, PrimitiveType.TRIANGLES, {
hasIndices: false,
@@ -1624,7 +1624,7 @@ describe(
it("debugWireframe works for model with triangle strip", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: triangleStripUrl, enableDebugWireframe: true },
- scene,
+ scene
);
verifyDebugWireframe(model, PrimitiveType.TRIANGLE_STRIP);
});
@@ -1632,7 +1632,7 @@ describe(
it("debugWireframe works for model with triangle fan", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: triangleFanUrl, enableDebugWireframe: true },
- scene,
+ scene
);
verifyDebugWireframe(model, PrimitiveType.TRIANGLE_FAN);
});
@@ -1640,7 +1640,7 @@ describe(
it("debugWireframe ignores points", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: pointCloudUrl, enableDebugWireframe: true },
- scene,
+ scene
);
scene.renderForSpecs();
const commandList = scene.frameState.commandList;
@@ -1664,7 +1664,7 @@ describe(
const buffer = await resource.fetchArrayBuffer();
const model = await loadAndZoomToModelAsync(
{ gltf: new Uint8Array(buffer), debugShowBoundingVolume: true },
- scene,
+ scene
);
scene.renderForSpecs();
const commandList = scene.frameState.commandList;
@@ -1694,14 +1694,14 @@ describe(
const buffer = await resource.fetchArrayBuffer();
const model = await loadAndZoomToModelAsync(
{ gltf: new Uint8Array(buffer) },
- scene,
+ scene
);
const boundingSphere = model.boundingSphere;
expect(boundingSphere).toBeDefined();
expect(boundingSphere.center).toEqual(new Cartesian3());
expect(boundingSphere.radius).toEqualEpsilon(
0.8660254037844386,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
});
@@ -1715,11 +1715,11 @@ describe(
expect(boundingSphere).toBeDefined();
expect(boundingSphere.center).toEqualEpsilon(
new Cartesian3(0.0320296511054039, 0, 0.7249599695205688),
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
expect(boundingSphere.radius).toEqualEpsilon(
0.9484635280120018,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
});
@@ -1728,7 +1728,7 @@ describe(
{
gltf: boxCesiumRtcUrl,
},
- scene,
+ scene
);
const boundingSphere = model.boundingSphere;
expect(boundingSphere).toBeDefined();
@@ -1738,7 +1738,7 @@ describe(
it("boundingSphere updates bounding sphere when invoked", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGlbUrl },
- scene,
+ scene
);
const expectedRadius = 0.8660254037844386;
const translation = new Cartesian3(10, 0, 0);
@@ -1752,7 +1752,7 @@ describe(
expect(boundingSphere.center).toEqual(translation);
expect(boundingSphere.radius).toEqualEpsilon(
2.0 * expectedRadius,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
});
});
@@ -1773,7 +1773,7 @@ describe(
gltf: new Uint8Array(buffer),
imageBasedLighting: imageBasedLighting,
},
- scene,
+ scene
);
await pollToPromise(function () {
scene.render();
@@ -1790,11 +1790,11 @@ describe(
const expectedIblTransform = Matrix3.multiply(
yUpToZUp,
viewRotation,
- new Matrix3(),
+ new Matrix3()
);
expect(model._iblReferenceFrameMatrix).toEqualEpsilon(
expectedIblTransform,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
});
@@ -1811,7 +1811,7 @@ describe(
offset: offset,
id: boxTexturedGlbUrl,
},
- scene,
+ scene
);
expect(model.id).toBe(boxTexturedGlbUrl);
@@ -1830,7 +1830,7 @@ describe(
gltf: boxTexturedGlbUrl,
offset: offset,
},
- scene,
+ scene
);
expect(model.id).toBeUndefined();
@@ -1862,7 +1862,7 @@ describe(
gltf: boxTexturedGlbUrl,
offset: offset,
},
- scene,
+ scene
);
expect(scene).toPickAndCall(function (result) {
expect(result.primitive).toBeInstanceOf(Model);
@@ -1886,7 +1886,7 @@ describe(
offset: offset,
id: boxTexturedGlbUrl,
},
- scene,
+ scene
);
expect(scene).toPickAndCall(function (result) {
expect(result.primitive).toBeInstanceOf(Model);
@@ -1911,7 +1911,7 @@ describe(
offset: offset,
id: boxTexturedGlbUrl,
},
- scene,
+ scene
);
expect(scene).toPickAndCall(function (result) {
expect(result.primitive).toBeInstanceOf(Model);
@@ -1943,7 +1943,7 @@ describe(
allowPicking: false,
offset: offset,
},
- scene,
+ scene
);
expect(scene).toPickAndCall(function (result) {
expect(result).toBeUndefined();
@@ -1965,7 +1965,7 @@ describe(
gltf: boxTexturedGlbUrl,
offset: offset,
},
- scene,
+ scene
);
model.show = false;
expect(scene).toPickAndCall(function (result) {
@@ -1978,7 +1978,7 @@ describe(
function setFeaturesWithOpacity(
featureTable,
opaqueFeaturesLength,
- translucentFeaturesLength,
+ translucentFeaturesLength
) {
for (let i = 0; i < opaqueFeaturesLength; i++) {
const feature = featureTable.getFeature(i);
@@ -1999,7 +1999,7 @@ describe(
{
gltf: buildingsMetadata,
},
- scene,
+ scene
);
const featureTable = model.featureTables[model.featureTableId];
@@ -2008,7 +2008,7 @@ describe(
scene.renderForSpecs();
expect(featureTable.styleCommandsNeededDirty).toEqual(false);
expect(featureTable._styleCommandsNeeded).toEqual(
- StyleCommandsNeeded.ALL_OPAQUE,
+ StyleCommandsNeeded.ALL_OPAQUE
);
// Set some features to translucent.
@@ -2016,7 +2016,7 @@ describe(
scene.renderForSpecs();
expect(featureTable.styleCommandsNeededDirty).toEqual(true);
expect(featureTable._styleCommandsNeeded).toEqual(
- StyleCommandsNeeded.OPAQUE_AND_TRANSLUCENT,
+ StyleCommandsNeeded.OPAQUE_AND_TRANSLUCENT
);
// Set some more features to translucent.
@@ -2024,7 +2024,7 @@ describe(
scene.renderForSpecs();
expect(featureTable.styleCommandsNeededDirty).toEqual(false);
expect(featureTable._styleCommandsNeeded).toEqual(
- StyleCommandsNeeded.OPAQUE_AND_TRANSLUCENT,
+ StyleCommandsNeeded.OPAQUE_AND_TRANSLUCENT
);
// Set all features to translucent.
@@ -2032,7 +2032,7 @@ describe(
scene.renderForSpecs();
expect(featureTable.styleCommandsNeededDirty).toEqual(true);
expect(featureTable._styleCommandsNeeded).toEqual(
- StyleCommandsNeeded.ALL_TRANSLUCENT,
+ StyleCommandsNeeded.ALL_TRANSLUCENT
);
});
@@ -2045,7 +2045,7 @@ describe(
gltf: boxInstanced,
instanceFeatureIdLabel: "section",
},
- scene,
+ scene
);
expect(model.featureTableId).toEqual(1);
});
@@ -2055,7 +2055,7 @@ describe(
{
gltf: microcosm,
},
- scene,
+ scene
);
expect(model.featureTableId).toEqual(0);
});
@@ -2065,7 +2065,7 @@ describe(
{
gltf: buildingsMetadata,
},
- scene,
+ scene
);
expect(model.featureTableId).toEqual(0);
});
@@ -2075,7 +2075,7 @@ describe(
{
gltf: buildingsMetadata,
},
- scene,
+ scene
);
expect(model.featureIdLabel).toBe("featureId_0");
model.featureIdLabel = "buildings";
@@ -2092,7 +2092,7 @@ describe(
{
gltf: boxInstanced,
},
- scene,
+ scene
);
expect(model.instanceFeatureIdLabel).toBe("instanceFeatureId_0");
model.instanceFeatureIdLabel = "section";
@@ -2114,7 +2114,7 @@ describe(
forwardAxis: Axis.X,
modelMatrix: transform,
},
- scene,
+ scene
);
const sceneGraph = model.sceneGraph;
scene.renderForSpecs();
@@ -2130,11 +2130,11 @@ describe(
const translation = new Cartesian3(10, 0, 0);
const updateModelMatrix = spyOn(
ModelSceneGraph.prototype,
- "updateModelMatrix",
+ "updateModelMatrix"
).and.callThrough();
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGlbUrl, upAxis: Axis.Z, forwardAxis: Axis.X },
- scene,
+ scene
);
verifyRender(model, true);
const sceneGraph = model.sceneGraph;
@@ -2143,7 +2143,7 @@ describe(
Matrix4.multiplyTransformation(
model.modelMatrix,
transform,
- model.modelMatrix,
+ model.modelMatrix
);
scene.renderForSpecs();
@@ -2160,7 +2160,7 @@ describe(
const translation = new Cartesian3(10, 0, 0);
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGlbUrl, upAxis: Axis.Z, forwardAxis: Axis.X },
- scene,
+ scene
);
const transform = Matrix4.fromTranslation(translation);
expect(model.boundingSphere.center).toEqual(Cartesian3.ZERO);
@@ -2168,7 +2168,7 @@ describe(
Matrix4.multiplyTransformation(
model.modelMatrix,
transform,
- model.modelMatrix,
+ model.modelMatrix
);
scene.renderForSpecs();
@@ -2181,7 +2181,7 @@ describe(
gltf: boxTexturedGlbUrl,
modelMatrix: modelMatrix,
},
- scene2D,
+ scene2D
);
verifyRender(model, true, {
zoomToModel: false,
@@ -2202,7 +2202,7 @@ describe(
modelMatrix: modelMatrix,
projectTo2D: true,
},
- scene2D,
+ scene2D
);
expect(function () {
model.modelMatrix = Matrix4.IDENTITY;
@@ -2229,7 +2229,7 @@ describe(
modelMatrix: Transforms.eastNorthUpToFixedFrame(position),
scene: scene,
},
- scene,
+ scene
);
expect(model.heightReference).toEqual(HeightReference.CLAMP_TO_GROUND);
expect(model._scene).toBe(scene);
@@ -2245,7 +2245,7 @@ describe(
modelMatrix: Transforms.eastNorthUpToFixedFrame(position),
scene: scene,
},
- scene,
+ scene
);
expect(model.heightReference).toEqual(HeightReference.NONE);
expect(model._clampedModelMatrix).toBeUndefined();
@@ -2269,14 +2269,14 @@ describe(
heightReference: HeightReference.CLAMP_TO_GROUND,
scene: scene,
},
- scene,
+ scene
);
expect(model.heightReference).toEqual(HeightReference.CLAMP_TO_GROUND);
expect(scene.updateHeight).toHaveBeenCalledWith(
Ellipsoid.WGS84.cartesianToCartographic(position),
jasmine.any(Function),
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
});
@@ -2292,7 +2292,7 @@ describe(
heightReference: HeightReference.NONE,
scene: scene,
},
- scene,
+ scene
);
model.heightReference = HeightReference.CLAMP_TO_GROUND;
@@ -2302,7 +2302,7 @@ describe(
expect(scene.updateHeight).toHaveBeenCalledWith(
Ellipsoid.WGS84.cartesianToCartographic(position),
jasmine.any(Function),
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
});
@@ -2318,7 +2318,7 @@ describe(
heightReference: HeightReference.CLAMP_TO_GROUND,
scene: scene,
},
- scene,
+ scene
);
model.heightReference = HeightReference.NONE;
@@ -2340,12 +2340,12 @@ describe(
heightReference: HeightReference.CLAMP_TO_GROUND,
scene: scene,
},
- scene,
+ scene
);
expect(scene.updateHeight).toHaveBeenCalledWith(
Ellipsoid.WGS84.cartesianToCartographic(position),
jasmine.any(Function),
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
model.heightReference = HeightReference.RELATIVE_TO_GROUND;
@@ -2355,7 +2355,7 @@ describe(
expect(scene.updateHeight).toHaveBeenCalledWith(
Ellipsoid.WGS84.cartesianToCartographic(position),
jasmine.any(Function),
- HeightReference.RELATIVE_TO_GROUND,
+ HeightReference.RELATIVE_TO_GROUND
);
});
@@ -2372,12 +2372,12 @@ describe(
heightReference: HeightReference.CLAMP_TO_GROUND,
scene: scene,
},
- scene,
+ scene
);
expect(scene.updateHeight).toHaveBeenCalledWith(
Ellipsoid.WGS84.cartesianToCartographic(position),
jasmine.any(Function),
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
// Modify the model matrix in place
@@ -2391,7 +2391,7 @@ describe(
expect(scene.updateHeight).toHaveBeenCalledWith(
Ellipsoid.WGS84.cartesianToCartographic(position),
jasmine.any(Function),
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
});
@@ -2408,12 +2408,12 @@ describe(
heightReference: HeightReference.CLAMP_TO_GROUND,
scene: scene,
},
- scene,
+ scene
);
expect(scene.updateHeight).toHaveBeenCalledWith(
Ellipsoid.WGS84.cartesianToCartographic(position),
jasmine.any(Function),
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
position = Cartesian3.fromDegrees(-73.0, 40.0);
@@ -2427,7 +2427,7 @@ describe(
expect(scene.updateHeight).toHaveBeenCalledWith(
Ellipsoid.WGS84.cartesianToCartographic(position),
jasmine.any(Function),
- HeightReference.CLAMP_TO_GROUND,
+ HeightReference.CLAMP_TO_GROUND
);
});
@@ -2439,19 +2439,19 @@ describe(
cartographic.height = height;
updateCallback(cartographic);
};
- },
+ }
);
const model = await loadAndZoomToModelAsync(
{
gltf: boxTexturedGltfUrl,
modelMatrix: Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(-72.0, 40.0),
+ Cartesian3.fromDegrees(-72.0, 40.0)
),
heightReference: HeightReference.CLAMP_TO_GROUND,
scene: scene,
},
- scene,
+ scene
);
invokeCallback(100.0);
@@ -2467,12 +2467,12 @@ describe(
{
gltf: boxTexturedGltfUrl,
modelMatrix: Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(-72.0, 40.0),
+ Cartesian3.fromDegrees(-72.0, 40.0)
),
heightReference: HeightReference.CLAMP_TO_GROUND,
scene: scene,
},
- scene,
+ scene
);
expect(model._heightDirty).toBe(false);
const terrainProvider = new CesiumTerrainProvider({
@@ -2491,15 +2491,15 @@ describe(
{
gltf: boxTexturedGltfUrl,
modelMatrix: Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(-72.0, 40.0),
+ Cartesian3.fromDegrees(-72.0, 40.0)
),
heightReference: HeightReference.CLAMP_TO_GROUND,
scene: undefined,
},
- scene,
- ),
+ scene
+ )
).toBeRejectedWithDeveloperError(
- "Height reference is not supported without a scene.",
+ "Height reference is not supported without a scene."
);
});
@@ -2508,11 +2508,11 @@ describe(
{
gltf: boxTexturedGltfUrl,
modelMatrix: Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(-72.0, 40.0),
+ Cartesian3.fromDegrees(-72.0, 40.0)
),
heightReference: HeightReference.NONE,
},
- scene,
+ scene
);
expect(function () {
@@ -2527,13 +2527,13 @@ describe(
{
gltf: boxTexturedGltfUrl,
modelMatrix: Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(-72.0, 40.0),
+ Cartesian3.fromDegrees(-72.0, 40.0)
),
heightReference: HeightReference.CLAMP_TO_GROUND,
scene: scene,
},
- scene,
- ),
+ scene
+ )
).toBeResolved();
});
@@ -2545,12 +2545,12 @@ describe(
{
gltf: boxTexturedGlbUrl,
modelMatrix: Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(-72.0, 40.0),
+ Cartesian3.fromDegrees(-72.0, 40.0)
),
heightReference: HeightReference.CLAMP_TO_GROUND,
scene: scene,
},
- scene,
+ scene
);
scene.primitives.remove(model);
@@ -2569,7 +2569,7 @@ describe(
gltf: boxTexturedGltfUrl,
distanceDisplayCondition: condition,
},
- scene,
+ scene
);
verifyRender(model, false);
});
@@ -2582,7 +2582,7 @@ describe(
{
gltf: boxTexturedGltfUrl,
},
- scene,
+ scene
);
verifyRender(model, true);
@@ -2601,7 +2601,7 @@ describe(
{
gltf: boxTexturedGltfUrl,
},
- scene,
+ scene
);
verifyRender(model, true);
@@ -2614,7 +2614,7 @@ describe(
// Model distance is between near and far values, should render
frameState.camera.lookAt(
Cartesian3.ZERO,
- new HeadingPitchRange(0.0, 0.0, (far + near) * 0.5),
+ new HeadingPitchRange(0.0, 0.0, (far + near) * 0.5)
);
verifyRender(model, true, {
zoomToModel: false,
@@ -2623,7 +2623,7 @@ describe(
// Model distance is greater than far value, should not render
frameState.camera.lookAt(
Cartesian3.ZERO,
- new HeadingPitchRange(0.0, 0.0, far + 10.0),
+ new HeadingPitchRange(0.0, 0.0, far + 10.0)
);
verifyRender(model, false, {
zoomToModel: false,
@@ -2638,7 +2638,7 @@ describe(
{
gltf: boxTexturedGltfUrl,
},
- scene,
+ scene
);
expect(function () {
model.distanceDisplayCondition = condition;
@@ -2650,7 +2650,7 @@ describe(
it("initializes with model color", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGltfUrl, color: Color.BLACK },
- scene,
+ scene
);
verifyRender(model, false);
});
@@ -2658,7 +2658,7 @@ describe(
it("changing model color works", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGltfUrl },
- scene,
+ scene
);
verifyRender(model, true);
@@ -2682,7 +2682,7 @@ describe(
gltf: boxTexturedGltfUrl,
offset: offset,
},
- scene,
+ scene
);
const renderOptions = {
scene: scene,
@@ -2714,7 +2714,7 @@ describe(
color: Color.fromAlpha(Color.BLACK, 0.0),
offset: offset,
},
- scene,
+ scene
);
verifyRender(model, false);
@@ -2764,7 +2764,7 @@ describe(
color: Color.RED,
colorBlendMode: ColorBlendMode.HIGHLIGHT,
},
- scene,
+ scene
);
expect(model.colorBlendMode).toEqual(ColorBlendMode.HIGHLIGHT);
@@ -2785,7 +2785,7 @@ describe(
color: Color.RED,
colorBlendMode: ColorBlendMode.REPLACE,
},
- scene,
+ scene
);
expect(model.colorBlendMode).toEqual(ColorBlendMode.REPLACE);
@@ -2806,7 +2806,7 @@ describe(
color: Color.RED,
colorBlendMode: ColorBlendMode.MIX,
},
- scene,
+ scene
);
expect(model.colorBlendMode).toEqual(ColorBlendMode.MIX);
@@ -2827,7 +2827,7 @@ describe(
color: Color.RED,
colorBlendMode: ColorBlendMode.REPLACE,
},
- scene,
+ scene
);
expect(model.colorBlendMode).toEqual(ColorBlendMode.REPLACE);
@@ -2869,7 +2869,7 @@ describe(
colorBlendMode: ColorBlendMode.MIX,
colorBlendAmount: 1.0,
},
- scene,
+ scene
);
expect(model.colorBlendAmount).toEqual(1.0);
@@ -2890,7 +2890,7 @@ describe(
gltf: boxTexturedGltfUrl,
offset: offset,
},
- scene,
+ scene
);
const renderOptions = {
scene: scene,
@@ -2936,7 +2936,7 @@ describe(
it("initializes with silhouette size", async function () {
await loadAndZoomToModelAsync(
{ gltf: boxTexturedGltfUrl, silhouetteSize: 1.0 },
- scene,
+ scene
);
const commands = scene.frameState.commandList;
scene.renderForSpecs();
@@ -2950,7 +2950,7 @@ describe(
it("changing silhouette size works", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGltfUrl },
- scene,
+ scene
);
const commands = scene.frameState.commandList;
scene.renderForSpecs();
@@ -2980,7 +2980,7 @@ describe(
silhouetteSize: 1.0,
silhouetteColor: Color.fromAlpha(Color.GREEN, 0.5),
},
- scene,
+ scene
);
const commands = scene.frameState.commandList;
scene.renderForSpecs();
@@ -2994,7 +2994,7 @@ describe(
it("silhouette is disabled by invisible color", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGltfUrl, silhouetteSize: 1.0 },
- scene,
+ scene
);
const commands = scene.frameState.commandList;
scene.renderForSpecs();
@@ -3018,7 +3018,7 @@ describe(
silhouetteSize: 1.0,
color: Color.fromAlpha(Color.WHITE, 0.0),
},
- scene,
+ scene
);
const commands = scene.frameState.commandList;
scene.renderForSpecs();
@@ -3043,7 +3043,7 @@ describe(
silhouetteSize: 1.0,
color: Color.fromAlpha(Color.WHITE, 0.5),
},
- scene,
+ scene
);
const commands = scene.frameState.commandList;
scene.renderForSpecs();
@@ -3065,7 +3065,7 @@ describe(
color: Color.fromAlpha(Color.WHITE, 0.5),
silhouetteColor: Color.fromAlpha(Color.RED, 0.5),
},
- scene,
+ scene
);
const commands = scene.frameState.commandList;
scene.renderForSpecs();
@@ -3083,14 +3083,14 @@ describe(
gltf: boxTexturedGltfUrl,
silhouetteSize: 1.0,
},
- scene,
+ scene
);
await loadAndZoomToModelAsync(
{
gltf: boxTexturedGltfUrl,
silhouetteSize: 1.0,
},
- scene,
+ scene
);
const commands = scene.frameState.commandList;
scene.renderForSpecs();
@@ -3111,7 +3111,7 @@ describe(
it("initializes with light color", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGltfUrl, lightColor: Cartesian3.ZERO },
- scene,
+ scene
);
verifyRender(model, false);
});
@@ -3119,7 +3119,7 @@ describe(
it("changing light color works", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGltfUrl },
- scene,
+ scene
);
model.lightColor = Cartesian3.ZERO;
verifyRender(model, false);
@@ -3134,7 +3134,7 @@ describe(
it("light color doesn't affect unlit models", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: boxUnlitUrl },
- scene,
+ scene
);
const options = {
zoomToModel: false,
@@ -3160,7 +3160,7 @@ describe(
});
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGltfUrl, imageBasedLighting: ibl },
- scene,
+ scene
);
expect(model.imageBasedLighting).toBe(ibl);
});
@@ -3168,19 +3168,19 @@ describe(
it("creates default imageBasedLighting", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGltfUrl },
- scene,
+ scene
);
const imageBasedLighting = model.imageBasedLighting;
expect(imageBasedLighting).toBeDefined();
expect(
Cartesian2.equals(
imageBasedLighting.imageBasedLightingFactor,
- new Cartesian2(1, 1),
- ),
+ new Cartesian2(1, 1)
+ )
).toBe(true);
expect(imageBasedLighting.luminanceAtZenith).toBe(0.2);
expect(
- imageBasedLighting.sphericalHarmonicCoefficients,
+ imageBasedLighting.sphericalHarmonicCoefficients
).toBeUndefined();
expect(imageBasedLighting.specularEnvironmentMaps).toBeUndefined();
});
@@ -3191,7 +3191,7 @@ describe(
});
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGltfUrl },
- scene,
+ scene
);
const renderOptions = {
scene: scene,
@@ -3218,7 +3218,7 @@ describe(
imageBasedLightingFactor: Cartesian2.ZERO,
}),
},
- scene,
+ scene
);
const renderOptions = {
scene: scene,
@@ -3246,7 +3246,7 @@ describe(
luminanceAtZenith: 0.0,
}),
},
- scene,
+ scene
);
const renderOptions = {
scene: scene,
@@ -3273,47 +3273,47 @@ describe(
const L00 = new Cartesian3(
0.692622075009195,
0.4543516001819,
- 0.36910172299235,
+ 0.36910172299235
); // L00, irradiance, pre-scaled base
const L1_1 = new Cartesian3(
0.289407068366422,
0.16789310162658,
- 0.106174907004792,
+ 0.106174907004792
); // L1-1, irradiance, pre-scaled base
const L10 = new Cartesian3(
-0.591502034778913,
-0.28152432317119,
- 0.124647554708491,
+ 0.124647554708491
); // L10, irradiance, pre-scaled base
const L11 = new Cartesian3(
0.34945458117126,
0.163273486841657,
- -0.03095643545207,
+ -0.03095643545207
); // L11, irradiance, pre-scaled base
const L2_2 = new Cartesian3(
0.22171176447426,
0.11771991868122,
- 0.031381053430064,
+ 0.031381053430064
); // L2-2, irradiance, pre-scaled base
const L2_1 = new Cartesian3(
-0.348955284677868,
-0.187256994042823,
- -0.026299717727617,
+ -0.026299717727617
); // L2-1, irradiance, pre-scaled base
const L20 = new Cartesian3(
0.119982671127227,
0.076784552175028,
- 0.055517838847755,
+ 0.055517838847755
); // L20, irradiance, pre-scaled base
const L21 = new Cartesian3(
-0.545546043202299,
-0.279787444030397,
- -0.086854000285261,
+ -0.086854000285261
); // L21, irradiance, pre-scaled base
const L22 = new Cartesian3(
0.160417569726332,
0.120896423762313,
- 0.121102528320197,
+ 0.121102528320197
); // L22, irradiance, pre-scaled base
const coefficients = [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22];
const model = await loadAndZoomToModelAsync(
@@ -3323,7 +3323,7 @@ describe(
sphericalHarmonicCoefficients: coefficients,
}),
},
- scene,
+ scene
);
scene.highDynamicRange = true;
@@ -3358,7 +3358,7 @@ describe(
specularEnvironmentMaps: url,
}),
},
- scene,
+ scene
);
const ibl = model.imageBasedLighting;
@@ -3396,7 +3396,7 @@ describe(
gltf: boomBoxUrl,
scale: 10.0,
},
- scene,
+ scene
);
expect(scene.specularEnvironmentMapsSupported).toBe(false);
verifyRender(model, true);
@@ -3412,7 +3412,7 @@ describe(
forwardAxis: Axis.X,
scale: 0.0,
},
- scene,
+ scene
);
scene.renderForSpecs();
@@ -3424,7 +3424,7 @@ describe(
it("changing scale works", async function () {
const updateModelMatrix = spyOn(
ModelSceneGraph.prototype,
- "updateModelMatrix",
+ "updateModelMatrix"
).and.callThrough();
const model = await loadAndZoomToModelAsync(
{
@@ -3432,7 +3432,7 @@ describe(
upAxis: Axis.Z,
forwardAxis: Axis.X,
},
- scene,
+ scene
);
verifyRender(model, true);
model.scale = 0.0;
@@ -3454,7 +3454,7 @@ describe(
gltf: new Uint8Array(buffer),
scale: 10,
},
- scene,
+ scene
);
scene.renderForSpecs();
@@ -3463,7 +3463,7 @@ describe(
expect(boundingSphere.center).toEqual(Cartesian3.ZERO);
expect(boundingSphere.radius).toEqualEpsilon(
expectedRadius * 10.0,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
model.scale = 0.0;
@@ -3476,7 +3476,7 @@ describe(
expect(boundingSphere.center).toEqual(Cartesian3.ZERO);
expect(boundingSphere.radius).toEqualEpsilon(
expectedRadius,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
});
@@ -3488,7 +3488,7 @@ describe(
gltf: new Uint8Array(buffer),
scale: 10,
},
- scene,
+ scene
);
const expectedRadius = 0.866;
const expectedCenter = new Cartesian3(5.0, 0.0, 0.0);
@@ -3496,22 +3496,22 @@ describe(
const axisCorrectionMatrix = ModelUtility.getAxisCorrectionMatrix(
Axis.Y,
Axis.Z,
- new Matrix4(),
+ new Matrix4()
);
Matrix4.multiplyTransformation(
axisCorrectionMatrix,
expectedTranslation,
- expectedTranslation,
+ expectedTranslation
);
Matrix4.getTranslation(expectedTranslation, expectedCenter);
const boundingSphere = model.boundingSphere;
expect(boundingSphere.center).toEqual(
- Cartesian3.multiplyByScalar(expectedCenter, 10.0, new Cartesian3()),
+ Cartesian3.multiplyByScalar(expectedCenter, 10.0, new Cartesian3())
);
expect(boundingSphere.radius).toEqualEpsilon(
expectedRadius * 10.0,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
model.scale = 0.0;
@@ -3524,7 +3524,7 @@ describe(
expect(boundingSphere.center).toEqual(expectedCenter);
expect(boundingSphere.radius).toEqualEpsilon(
expectedRadius,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
});
});
@@ -3541,7 +3541,7 @@ describe(
minimumPixelSize: 1,
offset: new HeadingPitchRange(0, 0, 500),
},
- scene,
+ scene
);
const renderOptions = {
zoomToModel: false,
@@ -3555,14 +3555,14 @@ describe(
expect(model.scale).toEqual(1.0);
expect(model.boundingSphere.radius).toEqualEpsilon(
expectedRadius,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
});
it("changing minimumPixelSize works", async function () {
const updateModelMatrix = spyOn(
ModelSceneGraph.prototype,
- "updateModelMatrix",
+ "updateModelMatrix"
).and.callThrough();
const model = await loadAndZoomToModelAsync(
{
@@ -3572,7 +3572,7 @@ describe(
minimumPixelSize: 1,
offset: new HeadingPitchRange(0, 0, 500),
},
- scene,
+ scene
);
const renderOptions = {
zoomToModel: false,
@@ -3596,7 +3596,7 @@ describe(
it("changing minimumPixelSize doesn't affect bounding sphere or scale", async function () {
const updateModelMatrix = spyOn(
ModelSceneGraph.prototype,
- "updateModelMatrix",
+ "updateModelMatrix"
).and.callThrough();
const model = await loadAndZoomToModelAsync(
{
@@ -3606,7 +3606,7 @@ describe(
minimumPixelSize: 1,
offset: new HeadingPitchRange(0, 0, 500),
},
- scene,
+ scene
);
const expectedRadius = 0.866;
scene.renderForSpecs();
@@ -3614,7 +3614,7 @@ describe(
expect(model.scale).toEqual(1.0);
expect(model.boundingSphere.radius).toEqualEpsilon(
expectedRadius,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
model.minimumPixelSize = 0.0;
@@ -3623,7 +3623,7 @@ describe(
expect(model.scale).toEqual(1.0);
expect(model.boundingSphere.radius).toEqualEpsilon(
expectedRadius,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
model.minimumPixelSize = 1;
@@ -3632,7 +3632,7 @@ describe(
expect(model.scale).toEqual(1.0);
expect(model.boundingSphere.radius).toEqualEpsilon(
expectedRadius,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
});
});
@@ -3648,7 +3648,7 @@ describe(
forwardAxis: Axis.X,
maximumScale: 0.0,
},
- scene,
+ scene
);
scene.renderForSpecs();
verifyRender(model, false);
@@ -3659,7 +3659,7 @@ describe(
it("changing maximumScale works", async function () {
const updateModelMatrix = spyOn(
ModelSceneGraph.prototype,
- "updateModelMatrix",
+ "updateModelMatrix"
).and.callThrough();
const model = await loadAndZoomToModelAsync(
{
@@ -3668,7 +3668,7 @@ describe(
forwardAxis: Axis.X,
scale: 2.0,
},
- scene,
+ scene
);
scene.renderForSpecs();
verifyRender(model, true);
@@ -3693,7 +3693,7 @@ describe(
scale: 20,
maximumScale: 10,
},
- scene,
+ scene
);
scene.renderForSpecs();
@@ -3702,7 +3702,7 @@ describe(
expect(boundingSphere.center).toEqual(Cartesian3.ZERO);
expect(boundingSphere.radius).toEqualEpsilon(
expectedRadius * 10.0,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
model.maximumScale = 0.0;
@@ -3715,7 +3715,7 @@ describe(
expect(boundingSphere.center).toEqual(Cartesian3.ZERO);
expect(boundingSphere.radius).toEqualEpsilon(
expectedRadius,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
});
@@ -3728,7 +3728,7 @@ describe(
minimumPixelSize: 1,
maximumScale: 10,
},
- scene,
+ scene
);
scene.renderForSpecs();
@@ -3737,7 +3737,7 @@ describe(
expect(boundingSphere.center).toEqual(Cartesian3.ZERO);
expect(boundingSphere.radius).toEqualEpsilon(
expectedRadius,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
model.maximumScale = 0.0;
@@ -3750,7 +3750,7 @@ describe(
expect(boundingSphere.center).toEqual(Cartesian3.ZERO);
expect(boundingSphere.radius).toEqualEpsilon(
expectedRadius,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
});
});
@@ -3760,11 +3760,11 @@ describe(
{
gltf: boxTexturedGltfUrl,
},
- scene,
+ scene
);
const resetDrawCommands = spyOn(
model,
- "resetDrawCommands",
+ "resetDrawCommands"
).and.callThrough();
expect(model.ready).toBe(true);
@@ -3779,11 +3779,11 @@ describe(
{
gltf: boxTexturedGltfUrl,
},
- scene,
+ scene
);
const resetDrawCommands = spyOn(
model,
- "resetDrawCommands",
+ "resetDrawCommands"
).and.callThrough();
expect(model.ready).toBe(true);
expect(model.hasVerticalExaggeration).toBe(true);
@@ -3800,7 +3800,7 @@ describe(
{
gltf: boxTexturedGltfUrl,
},
- scene,
+ scene
);
expect(model.ready).toBe(true);
model._ignoreCommands = true;
@@ -3816,7 +3816,7 @@ describe(
gltf: boxTexturedGltfUrl,
cull: true,
},
- scene,
+ scene
);
expect(model.cull).toEqual(true);
@@ -3826,7 +3826,7 @@ describe(
// Commands should not be submitted when model is out of view.
model.modelMatrix = Matrix4.fromTranslation(
- new Cartesian3(100.0, 0.0, 0.0),
+ new Cartesian3(100.0, 0.0, 0.0)
);
scene.renderForSpecs();
expect(scene.frustumCommandsList.length).toEqual(0);
@@ -3838,7 +3838,7 @@ describe(
gltf: boxTexturedGltfUrl,
cull: false,
},
- scene,
+ scene
);
expect(model.cull).toEqual(false);
@@ -3849,7 +3849,7 @@ describe(
// Commands should still be submitted when model is out of view.
model.modelMatrix = Matrix4.fromTranslation(
- new Cartesian3(0.0, 100.0, 0.0),
+ new Cartesian3(0.0, 100.0, 0.0)
);
scene.renderForSpecs();
expect(scene.frustumCommandsList.length).toEqual(length);
@@ -3862,7 +3862,7 @@ describe(
const boxBackFaceCullingOffset = new HeadingPitchRange(
Math.PI / 2,
0,
- 2.0,
+ 2.0
);
it("enables back-face culling", async function () {
@@ -3872,7 +3872,7 @@ describe(
backFaceCulling: true,
offset: boxBackFaceCullingOffset,
},
- scene,
+ scene
);
verifyRender(model, false, {
zoomToModel: false,
@@ -3886,7 +3886,7 @@ describe(
backFaceCulling: false,
offset: boxBackFaceCullingOffset,
},
- scene,
+ scene
);
verifyRender(model, true, {
zoomToModel: false,
@@ -3900,7 +3900,7 @@ describe(
backFaceCulling: true,
offset: boxBackFaceCullingOffset,
},
- scene,
+ scene
);
verifyRender(model, false, {
zoomToModel: false,
@@ -3920,7 +3920,7 @@ describe(
backFaceCulling: false,
offset: boxBackFaceCullingOffset,
},
- scene,
+ scene
);
verifyRender(model, true, {
zoomToModel: false,
@@ -3941,7 +3941,7 @@ describe(
offset: boxBackFaceCullingOffset,
color: new Color(0, 0, 1.0, 0.5),
},
- scene,
+ scene
);
verifyRender(model, true, {
zoomToModel: false,
@@ -3967,7 +3967,7 @@ describe(
gltf: boxTexturedGlbUrl,
modelMatrix: Matrix4.fromUniformScale(-1.0),
},
- scene,
+ scene
);
const renderOptions = {
scene: scene,
@@ -4002,11 +4002,11 @@ describe(
});
await loadAndZoomToModelAsync(
{ gltf: boxTexturedGlbUrl, clippingPlanes: clippingPlanes },
- scene,
+ scene
);
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGlbUrl },
- scene,
+ scene
);
expect(function () {
model.clippingPlanes = clippingPlanes;
@@ -4020,7 +4020,7 @@ describe(
});
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGlbUrl },
- scene,
+ scene
);
const gl = scene.frameState.context._gl;
spyOn(gl, "texImage2D").and.callThrough();
@@ -4044,7 +4044,7 @@ describe(
});
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGlbUrl, clippingPlanes: clippingPlanes },
- scene,
+ scene
);
verifyRender(model, false);
@@ -4056,7 +4056,7 @@ describe(
const direction = Cartesian3.multiplyByScalar(
Cartesian3.UNIT_X,
-1,
- new Cartesian3(),
+ new Cartesian3()
);
const plane = new ClippingPlane(direction, 0.0);
const clippingPlanes = new ClippingPlaneCollection({
@@ -4064,7 +4064,7 @@ describe(
});
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGlbUrl },
- scene,
+ scene
);
let modelColor;
verifyRender(model, true);
@@ -4092,7 +4092,7 @@ describe(
});
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGlbUrl, clippingPlanes: clippingPlanes },
- scene,
+ scene
);
verifyRender(model, false);
@@ -4107,7 +4107,7 @@ describe(
});
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGlbUrl, clippingPlanes: clippingPlanes },
- scene,
+ scene
);
verifyRender(model, false);
@@ -4125,7 +4125,7 @@ describe(
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGlbUrl, clippingPlanes: clippingPlanes },
- scene,
+ scene
);
verifyRender(model, false);
@@ -4152,7 +4152,7 @@ describe(
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGlbUrl },
- scene,
+ scene
);
let modelColor;
verifyRender(model, true);
@@ -4182,7 +4182,7 @@ describe(
});
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGlbUrl },
- scene,
+ scene
);
verifyRender(model, true);
@@ -4199,7 +4199,7 @@ describe(
{
gltf: boxTexturedGlbUrl,
},
- scene,
+ scene
);
const clippingPlanes = new ClippingPlaneCollection({
planes: [new ClippingPlane(Cartesian3.UNIT_X, 0.0)],
@@ -4219,7 +4219,7 @@ describe(
{
gltf: boxTexturedGlbUrl,
},
- scene,
+ scene
);
const clippingPlanes = new ClippingPlaneCollection({
planes: [new ClippingPlane(Cartesian3.UNIT_X, 0.0)],
@@ -4258,13 +4258,13 @@ describe(
});
const modelA = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGlbUrl },
- scene,
+ scene
);
modelA.clippingPolygons = collection;
const modelB = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGlbUrl },
- scene,
+ scene
);
expect(function () {
@@ -4282,7 +4282,7 @@ describe(
});
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGlbUrl },
- scene,
+ scene
);
model.clippingPolygons = collection;
verifyRender(model, false);
@@ -4301,7 +4301,7 @@ describe(
});
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGlbUrl },
- scene,
+ scene
);
let modelColor;
verifyRender(model, true);
@@ -4330,7 +4330,7 @@ describe(
{
gltf: boxTexturedGlbUrl,
},
- scene,
+ scene
);
model.clippingPolygons = collection;
verifyRender(model, true);
@@ -4351,7 +4351,7 @@ describe(
{
gltf: boxTexturedGlbUrl,
},
- scene,
+ scene
);
model.clippingPolygons = collection;
verifyRender(model, false);
@@ -4365,7 +4365,7 @@ describe(
{
gltf: boxTexturedGlbUrl,
},
- scene,
+ scene
);
const collection = new ClippingPolygonCollection({
polygons: [polygon],
@@ -4385,7 +4385,7 @@ describe(
{
gltf: boxTexturedGlbUrl,
},
- scene,
+ scene
);
const collection = new ClippingPolygonCollection({
polygons: [polygon],
@@ -4404,7 +4404,7 @@ describe(
url: boxTexturedGltfUrl,
classificationType: ClassificationType.CESIUM_3D_TILE,
},
- scene,
+ scene
);
expect(model.classificationType).toBe(ClassificationType.CESIUM_3D_TILE);
@@ -4416,7 +4416,7 @@ describe(
it("gets triangle count", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGltfUrl },
- scene,
+ scene
);
const statistics = model.statistics;
expect(statistics.trianglesLength).toEqual(12);
@@ -4425,7 +4425,7 @@ describe(
it("gets point count", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: pointCloudUrl },
- scene,
+ scene
);
const statistics = model.statistics;
expect(statistics.pointsLength).toEqual(2500);
@@ -4434,7 +4434,7 @@ describe(
it("gets memory usage for geometry and textures", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGltfUrl, incrementallyLoadTextures: false },
- scene,
+ scene
);
const expectedGeometryMemory = 840;
// Texture is 256*256 and then is mipmapped
@@ -4448,13 +4448,13 @@ describe(
it("gets memory usage for property tables", async function () {
const model = await loadAndZoomToModelAsync(
{ gltf: buildingsMetadata },
- scene,
+ scene
);
const expectedPropertyTableMemory = 110;
const statistics = model.statistics;
expect(statistics.propertyTablesByteLength).toEqual(
- expectedPropertyTableMemory,
+ expectedPropertyTableMemory
);
});
});
@@ -4475,7 +4475,7 @@ describe(
{
gltf: boxArticulationsUrl,
},
- scene,
+ scene
);
expect(function () {
model.setArticulationStage("SampleArticulation MoveX", "bad");
@@ -4497,7 +4497,7 @@ describe(
{
gltf: boxArticulationsUrl,
},
- scene,
+ scene
);
verifyRender(model, true);
@@ -4535,7 +4535,7 @@ describe(
{
gltf: boxArticulationsUrl,
},
- scene,
+ scene
);
expect(function () {
model.getNode();
@@ -4547,7 +4547,7 @@ describe(
{
gltf: boxArticulationsUrl,
},
- scene,
+ scene
);
const node = model.getNode("I don't exist");
expect(node).toBeUndefined();
@@ -4558,7 +4558,7 @@ describe(
{
gltf: boxArticulationsUrl,
},
- scene,
+ scene
);
const node = model.getNode("Root");
@@ -4575,7 +4575,7 @@ describe(
{
gltf: boxArticulationsUrl,
},
- scene,
+ scene
);
verifyRender(model, true);
const node = model.getNode("Root");
@@ -4590,7 +4590,7 @@ describe(
{
gltf: boxArticulationsUrl,
},
- scene,
+ scene
);
verifyRender(model, true);
const node = model.getNode("Root");
@@ -4638,10 +4638,10 @@ describe(
{
url: boxTexturedGltfUrl,
modelMatrix: Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(0, 0, 10.0),
+ Cartesian3.fromDegrees(0, 0, 10.0)
),
},
- scene,
+ scene
);
viewFog(scene, model);
@@ -4686,10 +4686,10 @@ describe(
{
url: boxTexturedGltfUrl,
modelMatrix: Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(0, 0, 10.0),
+ Cartesian3.fromDegrees(0, 0, 10.0)
),
},
- scene,
+ scene
);
// In order for fog to render, the camera needs to be
@@ -4754,10 +4754,10 @@ describe(
{
url: boxTexturedGltfUrl,
modelMatrix: Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(0, 0, 10.0),
+ Cartesian3.fromDegrees(0, 0, 10.0)
),
},
- scene,
+ scene
);
viewFog(scene, model);
@@ -4818,10 +4818,10 @@ describe(
{
url: boxTexturedGltfUrl,
modelMatrix: Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(0, 0, 10.0),
+ Cartesian3.fromDegrees(0, 0, 10.0)
),
},
- scene,
+ scene
);
viewFog(scene, model);
@@ -4872,10 +4872,10 @@ describe(
{
url: boxTexturedGltfUrl,
modelMatrix: Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(0, 0, 10.0),
+ Cartesian3.fromDegrees(0, 0, 10.0)
),
},
- scene,
+ scene
);
viewFog(scene, model);
@@ -4945,10 +4945,10 @@ describe(
{
url: boxTexturedGltfUrl,
modelMatrix: Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(0, 0, 10.0),
+ Cartesian3.fromDegrees(0, 0, 10.0)
),
},
- scene,
+ scene
);
viewFog(scene, model);
@@ -4996,10 +4996,10 @@ describe(
{
url: boxTexturedGltfUrl,
modelMatrix: Transforms.eastNorthUpToFixedFrame(
- Cartesian3.fromDegrees(0, 0, 10.0),
+ Cartesian3.fromDegrees(0, 0, 10.0)
),
},
- scene,
+ scene
);
viewFog(scene, model);
@@ -5044,19 +5044,19 @@ describe(
url: boxTexturedGltfUrl,
enablePick: !scene.frameState.context.webgl2,
},
- scene,
+ scene
);
const ray = scene.camera.getPickRay(
new Cartesian2(
scene.drawingBufferWidth / 2.0,
- scene.drawingBufferHeight / 2.0,
- ),
+ scene.drawingBufferHeight / 2.0
+ )
);
const expected = new Cartesian3(0.5, 0, 0.5);
expect(model.pick(ray, scene.frameState)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -5064,7 +5064,7 @@ describe(
spyOn(ShaderProgram.prototype, "destroy").and.callThrough();
const model = await loadAndZoomToModelAsync(
{ gltf: boxTexturedGlbUrl },
- scene,
+ scene
);
const resources = model._pipelineResources;
const loader = model._loader;
@@ -5119,5 +5119,5 @@ describe(
}
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/ModelUtilitySpec.js b/packages/engine/Specs/Scene/Model/ModelUtilitySpec.js
index daa00cf38fde..f29424fc5587 100644
--- a/packages/engine/Specs/Scene/Model/ModelUtilitySpec.js
+++ b/packages/engine/Specs/Scene/Model/ModelUtilitySpec.js
@@ -213,7 +213,7 @@ describe("Scene/Model/ModelUtility", function () {
const minMax = ModelUtility.getPositionMinMax(
mockPrimitive,
new Cartesian3(-5, -5, -5),
- new Cartesian3(5, 5, 5),
+ new Cartesian3(5, 5, 5)
);
const expectedMin = new Cartesian3(-5.5, -5.5, -5.5);
@@ -228,14 +228,14 @@ describe("Scene/Model/ModelUtility", function () {
const expectedCombinedMatrix = Matrix4.multiplyTransformation(
expectedYToZMatrix,
Axis.Z_UP_TO_X_UP,
- new Matrix4(),
+ new Matrix4()
);
// If already in ECEF, this should return identity
let resultMatrix = ModelUtility.getAxisCorrectionMatrix(
Axis.Z,
Axis.X,
- new Matrix4(),
+ new Matrix4()
);
expect(Matrix4.equals(resultMatrix, Matrix4.IDENTITY)).toBe(true);
@@ -243,7 +243,7 @@ describe("Scene/Model/ModelUtility", function () {
resultMatrix = ModelUtility.getAxisCorrectionMatrix(
Axis.Y,
Axis.Z,
- new Matrix4(),
+ new Matrix4()
);
expect(Matrix4.equals(resultMatrix, expectedCombinedMatrix)).toBe(true);
@@ -251,14 +251,14 @@ describe("Scene/Model/ModelUtility", function () {
resultMatrix = ModelUtility.getAxisCorrectionMatrix(
Axis.Y,
Axis.X,
- new Matrix4(),
+ new Matrix4()
);
expect(Matrix4.equals(resultMatrix, expectedYToZMatrix)).toBe(true);
resultMatrix = ModelUtility.getAxisCorrectionMatrix(
Axis.X,
Axis.Y,
- new Matrix4(),
+ new Matrix4()
);
expect(Matrix4.equals(resultMatrix, expectedXToZMatrix)).toBe(true);
});
@@ -276,29 +276,29 @@ describe("Scene/Model/ModelUtility", function () {
expect(
ModelUtility.getAttributeBySemantic(
nodeIntanceAttributes,
- InstanceAttributeSemantic.TRANSLATION,
- ),
+ InstanceAttributeSemantic.TRANSLATION
+ )
).toBeDefined();
expect(
ModelUtility.getAttributeBySemantic(
nodeIntanceAttributes,
- InstanceAttributeSemantic.ROTATION,
- ),
+ InstanceAttributeSemantic.ROTATION
+ )
).toBeDefined();
expect(
ModelUtility.getAttributeBySemantic(
nodeIntanceAttributes,
- InstanceAttributeSemantic.SCALE,
- ),
+ InstanceAttributeSemantic.SCALE
+ )
).toBeDefined();
expect(
ModelUtility.getAttributeBySemantic(
nodeIntanceAttributes,
- InstanceAttributeSemantic.FEATURE_ID,
- ),
+ InstanceAttributeSemantic.FEATURE_ID
+ )
).toBeDefined();
expect(
- ModelUtility.getAttributeBySemantic(nodeIntanceAttributes, "UNKNOWN"),
+ ModelUtility.getAttributeBySemantic(nodeIntanceAttributes, "UNKNOWN")
).toBeUndefined();
const primitiveAttributes = {
@@ -314,37 +314,37 @@ describe("Scene/Model/ModelUtility", function () {
expect(
ModelUtility.getAttributeBySemantic(
primitiveAttributes,
- VertexAttributeSemantic.POSITION,
- ),
+ VertexAttributeSemantic.POSITION
+ )
).toBeDefined();
expect(
ModelUtility.getAttributeBySemantic(
primitiveAttributes,
- VertexAttributeSemantic.NORMAL,
- ),
+ VertexAttributeSemantic.NORMAL
+ )
).toBeDefined();
expect(
ModelUtility.getAttributeBySemantic(
primitiveAttributes,
- VertexAttributeSemantic.TANGENT,
- ),
+ VertexAttributeSemantic.TANGENT
+ )
).toBeDefined();
expect(
ModelUtility.getAttributeBySemantic(
primitiveAttributes,
VertexAttributeSemantic.TEXCOORD,
- 0,
- ),
+ 0
+ )
).toBeDefined();
expect(
ModelUtility.getAttributeBySemantic(
primitiveAttributes,
VertexAttributeSemantic.TEXCOORD,
- 1,
- ),
+ 1
+ )
).toBeDefined();
expect(
- ModelUtility.getAttributeBySemantic(primitiveAttributes, "UNKNOWN"),
+ ModelUtility.getAttributeBySemantic(primitiveAttributes, "UNKNOWN")
).toBeUndefined();
});
@@ -352,10 +352,10 @@ describe("Scene/Model/ModelUtility", function () {
const featureIds = [{ label: "perVertex" }, { label: "perFace" }];
expect(ModelUtility.getFeatureIdsByLabel(featureIds, "perVertex")).toBe(
- featureIds[0],
+ featureIds[0]
);
expect(ModelUtility.getFeatureIdsByLabel(featureIds, "perFace")).toBe(
- featureIds[1],
+ featureIds[1]
);
});
@@ -366,10 +366,10 @@ describe("Scene/Model/ModelUtility", function () {
];
expect(ModelUtility.getFeatureIdsByLabel(featureIds, "featureId_0")).toBe(
- featureIds[0],
+ featureIds[0]
);
expect(ModelUtility.getFeatureIdsByLabel(featureIds, "featureId_1")).toBe(
- featureIds[1],
+ featureIds[1]
);
});
@@ -377,7 +377,7 @@ describe("Scene/Model/ModelUtility", function () {
const featureIds = [{ label: "perVertex" }, { label: "perFace" }];
expect(
- ModelUtility.getFeatureIdsByLabel(featureIds, "other"),
+ ModelUtility.getFeatureIdsByLabel(featureIds, "other")
).not.toBeDefined();
});
diff --git a/packages/engine/Specs/Scene/Model/MorphTargetsPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/MorphTargetsPipelineStageSpec.js
index e3a9377cf475..82b547bd50d6 100644
--- a/packages/engine/Specs/Scene/Model/MorphTargetsPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/MorphTargetsPipelineStageSpec.js
@@ -63,7 +63,7 @@ describe(
attribute,
expectedIndex,
expectedOffset,
- expectedStride,
+ expectedStride
) {
expect(attribute.index).toEqual(expectedIndex);
expect(attribute.vertexBuffer).toBeDefined();
@@ -113,7 +113,7 @@ describe(
positionAttribute,
expectedIndex,
expectedByteOffset,
- expectedStride,
+ expectedStride
);
ShaderBuilderTester.expectHasVertexFunction(
@@ -124,7 +124,7 @@ describe(
" vec3 morphedPosition = position;",
" morphedPosition += u_morphWeights[0] * a_targetPosition_0;",
" return morphedPosition;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
@@ -145,7 +145,7 @@ describe(
const uniformMap = renderResources.uniformMap;
expect(uniformMap.u_morphWeights()).toBe(
- renderResources.runtimeNode.morphWeights,
+ renderResources.runtimeNode.morphWeights
);
});
});
@@ -186,7 +186,7 @@ describe(
attribute,
i + 1,
expectedByteOffset,
- expectedStride,
+ expectedStride
);
}
@@ -199,7 +199,7 @@ describe(
" morphedPosition += u_morphWeights[0] * a_targetPosition_0;",
" morphedPosition += u_morphWeights[1] * a_targetPosition_1;",
" return morphedPosition;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunction(
@@ -211,7 +211,7 @@ describe(
" morphedNormal += u_morphWeights[0] * a_targetNormal_0;",
" morphedNormal += u_morphWeights[1] * a_targetNormal_1;",
" return morphedNormal;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexFunction(
@@ -223,7 +223,7 @@ describe(
" morphedTangent += u_morphWeights[0] * a_targetTangent_0;",
" morphedTangent += u_morphWeights[1] * a_targetTangent_1;",
" return morphedTangent;",
- ],
+ ]
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
@@ -249,10 +249,10 @@ describe(
const uniformMap = renderResources.uniformMap;
expect(uniformMap.u_morphWeights()).toBe(
- renderResources.runtimeNode.morphWeights,
+ renderResources.runtimeNode.morphWeights
);
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/NodeRenderResourcesSpec.js b/packages/engine/Specs/Scene/Model/NodeRenderResourcesSpec.js
index 55f1d221e752..2c97e91d328f 100644
--- a/packages/engine/Specs/Scene/Model/NodeRenderResourcesSpec.js
+++ b/packages/engine/Specs/Scene/Model/NodeRenderResourcesSpec.js
@@ -48,7 +48,7 @@ describe(
const modelResources = new ModelRenderResources(mockModel);
const nodeResources = new NodeRenderResources(
modelResources,
- runtimeNode,
+ runtimeNode
);
const defaultRenderState = RenderState.getState(
@@ -57,7 +57,7 @@ describe(
enabled: true,
func: DepthFunction.LESS_OR_EQUAL,
},
- }),
+ })
);
expect(nodeResources.runtimeNode).toBe(runtimeNode);
@@ -78,7 +78,7 @@ describe(
const nodeResources = new NodeRenderResources(
modelResources,
- runtimeNode,
+ runtimeNode
);
nodeResources.shaderBuilder.addDefine("NODE");
@@ -86,7 +86,7 @@ describe(
// The node's render resources should be a clone of the model's.
expect(nodeResources.renderStateOptions).not.toBe(
- modelResources.renderStateOptions,
+ modelResources.renderStateOptions
);
expect(nodeResources.renderStateOptions.cull).toEqual({
enabled: true,
@@ -97,21 +97,21 @@ describe(
// The node's shader builder should be a clone of the model's
expect(nodeResources.shaderBuilder).not.toBe(
- modelResources.shaderBuilder,
+ modelResources.shaderBuilder
);
// The model shader must not be modified by the node...
ShaderBuilderTester.expectHasFragmentDefines(
modelResources.shaderBuilder,
- ["MODEL"],
+ ["MODEL"]
);
// ...but the node shader will be updated.
ShaderBuilderTester.expectHasFragmentDefines(
nodeResources.shaderBuilder,
- ["MODEL", "NODE"],
+ ["MODEL", "NODE"]
);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/NodeStatisticsPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/NodeStatisticsPipelineStageSpec.js
index 704f92620a1d..d900e93dbbd8 100644
--- a/packages/engine/Specs/Scene/Model/NodeStatisticsPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/NodeStatisticsPipelineStageSpec.js
@@ -96,47 +96,47 @@ describe(
});
it("updates statistics for an instanced model", function () {
- return loadGltf(boxInstancedTranslationMinMax).then(
- function (gltfLoader) {
- const components = gltfLoader.components;
- const node = components.nodes[0];
- const renderResources = mockRenderResources(components);
+ return loadGltf(boxInstancedTranslationMinMax).then(function (
+ gltfLoader
+ ) {
+ const components = gltfLoader.components;
+ const node = components.nodes[0];
+ const renderResources = mockRenderResources(components);
- NodeStatisticsPipelineStage.process(renderResources, node);
+ NodeStatisticsPipelineStage.process(renderResources, node);
- const statistics = renderResources.model.statistics;
+ const statistics = renderResources.model.statistics;
- // Model contains four translated instances:
- // 4 vec3s * 3 floats/vec3 * 4 bytes/float = 48
- const expectedByteLength = 48;
+ // Model contains four translated instances:
+ // 4 vec3s * 3 floats/vec3 * 4 bytes/float = 48
+ const expectedByteLength = 48;
- expect(statistics.pointsLength).toBe(0);
- expect(statistics.trianglesLength).toBe(0);
- expect(statistics.geometryByteLength).toBe(expectedByteLength);
- expect(statistics.texturesByteLength).toBe(0);
- expect(statistics.propertyTablesByteLength).toBe(0);
- },
- );
+ expect(statistics.pointsLength).toBe(0);
+ expect(statistics.trianglesLength).toBe(0);
+ expect(statistics.geometryByteLength).toBe(expectedByteLength);
+ expect(statistics.texturesByteLength).toBe(0);
+ expect(statistics.propertyTablesByteLength).toBe(0);
+ });
});
it("_countInstancingAttributes counts attributes with buffers", function () {
- return loadGltf(boxInstancedTranslationMinMax).then(
- function (gltfLoader) {
- const statistics = new ModelStatistics();
- const components = gltfLoader.components;
- const node = components.nodes[0];
-
- NodeStatisticsPipelineStage._countInstancingAttributes(
- statistics,
- node.instances,
- );
-
- // Model contains four translated instances:
- // 4 instances * 3 floats * 4 bytes per float
- const expectedByteLength = 4 * 12;
- expect(statistics.geometryByteLength).toBe(expectedByteLength);
- },
- );
+ return loadGltf(boxInstancedTranslationMinMax).then(function (
+ gltfLoader
+ ) {
+ const statistics = new ModelStatistics();
+ const components = gltfLoader.components;
+ const node = components.nodes[0];
+
+ NodeStatisticsPipelineStage._countInstancingAttributes(
+ statistics,
+ node.instances
+ );
+
+ // Model contains four translated instances:
+ // 4 instances * 3 floats * 4 bytes per float
+ const expectedByteLength = 4 * 12;
+ expect(statistics.geometryByteLength).toBe(expectedByteLength);
+ });
});
it("_countInstancingAttributes does not count attributes without buffers", function () {
@@ -150,7 +150,7 @@ describe(
NodeStatisticsPipelineStage._countInstancingAttributes(
statistics,
- node.instances,
+ node.instances
);
// 4 feature ids * 4 bytes per float
@@ -172,12 +172,12 @@ describe(
NodeStatisticsPipelineStage._countGeneratedBuffers(
statistics,
- mockRuntimeNode,
+ mockRuntimeNode
);
const transformsBuffer = mockRuntimeNode.instancingTransformsBuffer;
expect(statistics.geometryByteLength).toBe(
- transformsBuffer.sizeInBytes,
+ transformsBuffer.sizeInBytes
);
});
});
@@ -195,41 +195,41 @@ describe(
NodeStatisticsPipelineStage._countGeneratedBuffers(
statistics,
- mockRuntimeNode,
+ mockRuntimeNode
);
const transformsBuffer2D = mockRuntimeNode.instancingTransformsBuffer2D;
expect(statistics.geometryByteLength).toBe(
- transformsBuffer2D.sizeInBytes,
+ transformsBuffer2D.sizeInBytes
);
});
});
it("_countGeneratedBuffers counts instancing translation buffer for 2D", function () {
- return loadGltf(boxInstancedTranslationMinMax).then(
- function (gltfLoader) {
- const statistics = new ModelStatistics();
- const mockRuntimeNode = {
- instancingTranslationBuffer2D: {
- // Model contains four translated instances:
- // 4 instances * 3 floats * 4 bytes per float
- sizeInBytes: 48,
- },
- };
-
- NodeStatisticsPipelineStage._countGeneratedBuffers(
- statistics,
- mockRuntimeNode,
- );
-
- const translationBuffer2D =
- mockRuntimeNode.instancingTranslationBuffer2D;
- expect(statistics.geometryByteLength).toBe(
- translationBuffer2D.sizeInBytes,
- );
- },
- );
+ return loadGltf(boxInstancedTranslationMinMax).then(function (
+ gltfLoader
+ ) {
+ const statistics = new ModelStatistics();
+ const mockRuntimeNode = {
+ instancingTranslationBuffer2D: {
+ // Model contains four translated instances:
+ // 4 instances * 3 floats * 4 bytes per float
+ sizeInBytes: 48,
+ },
+ };
+
+ NodeStatisticsPipelineStage._countGeneratedBuffers(
+ statistics,
+ mockRuntimeNode
+ );
+
+ const translationBuffer2D =
+ mockRuntimeNode.instancingTranslationBuffer2D;
+ expect(statistics.geometryByteLength).toBe(
+ translationBuffer2D.sizeInBytes
+ );
+ });
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/PickingPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/PickingPipelineStageSpec.js
index e1a0a7235c96..5e44cd7e1c69 100644
--- a/packages/engine/Specs/Scene/Model/PickingPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/PickingPipelineStageSpec.js
@@ -121,7 +121,7 @@ describe(
expect(detailPickObject.model).toEqual(model);
expect(detailPickObject.node).toEqual(renderResources.runtimeNode);
expect(detailPickObject.primitive).toEqual(
- renderResources.runtimePrimitive,
+ renderResources.runtimePrimitive
);
}
@@ -318,7 +318,7 @@ describe(
expect(renderResources.attributeIndex).toEqual(2);
expect(pickIdAttribute.vertexBuffer).toBeDefined();
expect(pickIdAttribute.vertexBuffer.sizeInBytes).toEqual(
- renderResources.instanceCount * 4,
+ renderResources.instanceCount * 4
);
expect(pickIdAttribute.instanceDivisor).toEqual(1);
@@ -327,7 +327,7 @@ describe(
const statistics = renderResources.model.statistics;
expect(statistics.geometryByteLength).toBe(
- renderResources.instanceCount * 4,
+ renderResources.instanceCount * 4
);
expect(renderResources.pickId).toEqual("v_pickColor");
@@ -368,10 +368,10 @@ describe(
]);
expect(renderResources.pickId).toEqual(
- "((selectedFeature.id < int(model_featuresLength)) ? texture(model_pickTexture, selectedFeature.st) : vec4(0.0))",
+ "((selectedFeature.id < int(model_featuresLength)) ? texture(model_pickTexture, selectedFeature.st) : vec4(0.0))"
);
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/PntsLoaderSpec.js b/packages/engine/Specs/Scene/Model/PntsLoaderSpec.js
index f3ac4d570a39..5fec3e9e9999 100644
--- a/packages/engine/Specs/Scene/Model/PntsLoaderSpec.js
+++ b/packages/engine/Specs/Scene/Model/PntsLoaderSpec.js
@@ -101,7 +101,7 @@ describe(
async function expectLoadError(arrayBuffer) {
await expectAsync(loadPntsArrayBuffer(arrayBuffer)).toBeRejectedWithError(
- RuntimeError,
+ RuntimeError
);
}
@@ -119,7 +119,7 @@ describe(
const expectedPropertyTableCount = isBatched ? 1 : 0;
expect(structuralMetadata.propertyTableCount).toEqual(
- expectedPropertyTableCount,
+ expectedPropertyTableCount
);
const propertyTable = structuralMetadata.getPropertyTable(0);
@@ -140,7 +140,7 @@ describe(
// Check the property declaration is expected
expect(property.type).toEqual(expectedProperty.type);
expect(property.componentType).toEqual(
- expectedProperty.componentType,
+ expectedProperty.componentType
);
// if batched, binary properties will appear in the property table.
@@ -157,12 +157,12 @@ describe(
// (batched points) or the property attribute (per-point properties)
if (isBatched) {
expect(propertyTable.getPropertyIds(0).sort()).toEqual(
- tablePropertyNames.sort(),
+ tablePropertyNames.sort()
);
} else {
const propertyAttribute = structuralMetadata.getPropertyAttribute(0);
expect(Object.keys(propertyAttribute.properties).sort()).toEqual(
- attributePropertyNames.sort(),
+ attributePropertyNames.sort()
);
}
}
@@ -189,7 +189,7 @@ describe(
const quantization = attribute.quantization;
expect(quantization.componentDatatype).toBe(
- ComponentDatatype.UNSIGNED_SHORT,
+ ComponentDatatype.UNSIGNED_SHORT
);
expect(quantization.normalizationRange).toBeDefined();
expect(quantization.octEncoded).toBe(false);
@@ -388,7 +388,7 @@ describe(
expectNormalOctEncoded(
attributes[1],
ComponentDatatype.UNSIGNED_BYTE,
- false,
+ false
);
expectColorRGB(attributes[2]);
});
@@ -421,7 +421,7 @@ describe(
expectNormalOctEncoded(
attributes[1],
ComponentDatatype.UNSIGNED_BYTE,
- false,
+ false
);
expectColorRGB(attributes[2]);
});
@@ -448,7 +448,7 @@ describe(
componentType: MetadataComponentType.UINT16,
},
},
- isBatched,
+ isBatched
);
const primitive = components.nodes[0].primitives[0];
@@ -459,7 +459,7 @@ describe(
expectNormalOctEncoded(
attributes[1],
ComponentDatatype.UNSIGNED_BYTE,
- true,
+ true
);
expectColorRGB(attributes[2]);
});
@@ -486,7 +486,7 @@ describe(
componentType: MetadataComponentType.UINT16,
},
},
- isBatched,
+ isBatched
);
const primitive = components.nodes[0].primitives[0];
@@ -520,7 +520,7 @@ describe(
componentType: MetadataComponentType.UINT32,
},
},
- isBatched,
+ isBatched
);
const primitive = components.nodes[0].primitives[0];
@@ -531,7 +531,7 @@ describe(
expectNormalOctEncoded(
attributes[1],
ComponentDatatype.UNSIGNED_BYTE,
- true,
+ true
);
expectColorRGB(attributes[2]);
expectBatchId(attributes[3], ComponentDatatype.UNSIGNED_BYTE);
@@ -573,7 +573,7 @@ describe(
componentType: MetadataComponentType.UINT32,
},
},
- isBatched,
+ isBatched
);
const primitive = components.nodes[0].primitives[0];
@@ -632,74 +632,74 @@ describe(
});
it("loads PointCloudWithPerPointProperties", function () {
- return loadPnts(pointCloudWithPerPointPropertiesUrl).then(
- function (loader) {
- const components = loader.components;
- expect(components).toBeDefined();
- const isBatched = false;
- expectMetadata(
- components.structuralMetadata,
- {
- temperature: {
- type: MetadataType.SCALAR,
- componentType: MetadataComponentType.FLOAT32,
- },
- secondaryColor: {
- type: MetadataType.VEC3,
- componentType: MetadataComponentType.FLOAT32,
- },
- id: {
- type: MetadataType.SCALAR,
- componentType: MetadataComponentType.UINT16,
- },
+ return loadPnts(pointCloudWithPerPointPropertiesUrl).then(function (
+ loader
+ ) {
+ const components = loader.components;
+ expect(components).toBeDefined();
+ const isBatched = false;
+ expectMetadata(
+ components.structuralMetadata,
+ {
+ temperature: {
+ type: MetadataType.SCALAR,
+ componentType: MetadataComponentType.FLOAT32,
},
- isBatched,
- );
+ secondaryColor: {
+ type: MetadataType.VEC3,
+ componentType: MetadataComponentType.FLOAT32,
+ },
+ id: {
+ type: MetadataType.SCALAR,
+ componentType: MetadataComponentType.UINT16,
+ },
+ },
+ isBatched
+ );
- const primitive = components.nodes[0].primitives[0];
- const attributes = primitive.attributes;
- // 2 geometry attributes + 3 metadata attributes
- expect(attributes.length).toBe(5);
- expectPosition(attributes[0]);
- expectColorRGB(attributes[1]);
- },
- );
+ const primitive = components.nodes[0].primitives[0];
+ const attributes = primitive.attributes;
+ // 2 geometry attributes + 3 metadata attributes
+ expect(attributes.length).toBe(5);
+ expectPosition(attributes[0]);
+ expectColorRGB(attributes[1]);
+ });
});
it("loads PointCloudWithUnicodePropertyIds", function () {
- return loadPnts(pointCloudWithUnicodePropertyIdsUrl).then(
- function (loader) {
- const components = loader.components;
- expect(components).toBeDefined();
- const isBatched = false;
- expectMetadata(
- components.structuralMetadata,
- {
- // Originally "temperature ℃", but sanitized for GLSL
- temperature_: {
- type: MetadataType.SCALAR,
- componentType: MetadataComponentType.FLOAT32,
- },
- secondaryColor: {
- type: MetadataType.VEC3,
- componentType: MetadataComponentType.FLOAT32,
- },
- id: {
- type: MetadataType.SCALAR,
- componentType: MetadataComponentType.UINT16,
- },
+ return loadPnts(pointCloudWithUnicodePropertyIdsUrl).then(function (
+ loader
+ ) {
+ const components = loader.components;
+ expect(components).toBeDefined();
+ const isBatched = false;
+ expectMetadata(
+ components.structuralMetadata,
+ {
+ // Originally "temperature ℃", but sanitized for GLSL
+ temperature_: {
+ type: MetadataType.SCALAR,
+ componentType: MetadataComponentType.FLOAT32,
},
- isBatched,
- );
+ secondaryColor: {
+ type: MetadataType.VEC3,
+ componentType: MetadataComponentType.FLOAT32,
+ },
+ id: {
+ type: MetadataType.SCALAR,
+ componentType: MetadataComponentType.UINT16,
+ },
+ },
+ isBatched
+ );
- const primitive = components.nodes[0].primitives[0];
- const attributes = primitive.attributes;
- // 2 geometry attributes + 3 metadata attributes
- expect(attributes.length).toBe(5);
- expectPosition(attributes[0]);
- expectColorRGB(attributes[1]);
- },
- );
+ const primitive = components.nodes[0].primitives[0];
+ const attributes = primitive.attributes;
+ // 2 geometry attributes + 3 metadata attributes
+ expect(attributes.length).toBe(5);
+ expectPosition(attributes[0]);
+ expectColorRGB(attributes[1]);
+ });
});
it("loads attributes for 2D", function () {
@@ -718,7 +718,7 @@ describe(
expect(positionAttribute.typedArray).toBeDefined();
expectColorRGB(attributes[1]);
- },
+ }
);
});
@@ -744,7 +744,7 @@ describe(
componentType: MetadataComponentType.UINT16,
},
},
- isBatched,
+ isBatched
);
const primitive = components.nodes[0].primitives[0];
@@ -759,10 +759,10 @@ describe(
expectNormalOctEncoded(
attributes[1],
ComponentDatatype.UNSIGNED_BYTE,
- true,
+ true
);
expectColorRGB(attributes[2]);
- },
+ }
);
});
@@ -850,7 +850,7 @@ describe(
await expectAsync(loadPnts(pointCloudDracoUrl)).toBeRejectedWithError(
RuntimeError,
- "Failed to load Draco pnts\nmy error",
+ "Failed to load Draco pnts\nmy error"
);
});
@@ -866,5 +866,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/PointCloudStylingPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/PointCloudStylingPipelineStageSpec.js
index 11cf22014bd7..d2fb924c6212 100644
--- a/packages/engine/Specs/Scene/Model/PointCloudStylingPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/PointCloudStylingPipelineStageSpec.js
@@ -80,7 +80,7 @@ describe(
function mockPntsRenderResources(options) {
const pointCloudShading = defaultValue(
options.pointCloudShading,
- new PointCloudShading(),
+ new PointCloudShading()
);
const shaderBuilder = new ShaderBuilder();
const uniformMap = {};
@@ -133,7 +133,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- scene.frameState,
+ scene.frameState
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, []);
@@ -170,7 +170,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- scene.frameState,
+ scene.frameState
);
ShaderBuilderTester.expectHasVaryings(shaderBuilder, [
@@ -193,7 +193,7 @@ describe(
ShaderBuilderTester.expectVertexLinesContains(
shaderBuilder,
- `vec4 getColorFromStyle${functionParameterList}`,
+ `vec4 getColorFromStyle${functionParameterList}`
);
});
@@ -217,7 +217,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- scene.frameState,
+ scene.frameState
);
ShaderBuilderTester.expectHasVaryings(shaderBuilder, [
@@ -240,7 +240,7 @@ describe(
ShaderBuilderTester.expectVertexLinesContains(
shaderBuilder,
- `vec4 getColorFromStyle${functionParameterList}`,
+ `vec4 getColorFromStyle${functionParameterList}`
);
expect(renderResources.alphaOptions.pass).toEqual(Pass.TRANSLUCENT);
@@ -266,7 +266,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- scene.frameState,
+ scene.frameState
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
@@ -283,7 +283,7 @@ describe(
ShaderBuilderTester.expectVertexLinesContains(
shaderBuilder,
- `float getPointSizeFromStyle${functionParameterList}`,
+ `float getPointSizeFromStyle${functionParameterList}`
);
});
@@ -307,7 +307,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- scene.frameState,
+ scene.frameState
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
@@ -324,7 +324,7 @@ describe(
ShaderBuilderTester.expectVertexLinesContains(
shaderBuilder,
- `bool getShowFromStyle${functionParameterList}`,
+ `bool getShowFromStyle${functionParameterList}`
);
});
@@ -347,7 +347,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- scene.frameState,
+ scene.frameState
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
@@ -357,12 +357,12 @@ describe(
ShaderBuilderTester.expectVertexLinesContains(
shaderBuilder,
- `bool getShowFromStyle${functionParameterList}`,
+ `bool getShowFromStyle${functionParameterList}`
);
ShaderBuilderTester.expectVertexLinesContains(
shaderBuilder,
- "attributes.positionMC",
+ "attributes.positionMC"
);
});
@@ -385,7 +385,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- scene.frameState,
+ scene.frameState
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
@@ -395,12 +395,12 @@ describe(
ShaderBuilderTester.expectVertexLinesContains(
shaderBuilder,
- `vec4 getColorFromStyle${functionParameterList}`,
+ `vec4 getColorFromStyle${functionParameterList}`
);
ShaderBuilderTester.expectVertexLinesContains(
shaderBuilder,
- "v_positionWC",
+ "v_positionWC"
);
});
@@ -423,7 +423,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitiveWithNormals,
- scene.frameState,
+ scene.frameState
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
@@ -433,12 +433,12 @@ describe(
ShaderBuilderTester.expectVertexLinesContains(
shaderBuilder,
- `vec4 getColorFromStyle${functionParameterList}`,
+ `vec4 getColorFromStyle${functionParameterList}`
);
ShaderBuilderTester.expectVertexLinesContains(
shaderBuilder,
- "attributes.normalMC",
+ "attributes.normalMC"
);
});
@@ -461,7 +461,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- scene.frameState,
+ scene.frameState
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
@@ -471,12 +471,12 @@ describe(
ShaderBuilderTester.expectVertexLinesContains(
shaderBuilder,
- `vec4 getColorFromStyle${functionParameterList}`,
+ `vec4 getColorFromStyle${functionParameterList}`
);
ShaderBuilderTester.expectVertexLinesContains(
shaderBuilder,
- "attributes.color_0",
+ "attributes.color_0"
);
});
@@ -499,7 +499,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- scene.frameState,
+ scene.frameState
);
}).toThrowError(RuntimeError);
});
@@ -531,7 +531,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- scene.frameState,
+ scene.frameState
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
@@ -542,21 +542,21 @@ describe(
ShaderBuilderTester.expectVertexLinesContains(
shaderBuilder,
- `bool getShowFromStyle${functionParameterList}`,
+ `bool getShowFromStyle${functionParameterList}`
);
ShaderBuilderTester.expectVertexLinesContains(
shaderBuilder,
- `vec4 getColorFromStyle${functionParameterList}`,
+ `vec4 getColorFromStyle${functionParameterList}`
);
ShaderBuilderTester.expectVertexLinesContains(
shaderBuilder,
- "metadata.temperature",
+ "metadata.temperature"
);
ShaderBuilderTester.expectVertexLinesContains(
shaderBuilder,
- "metadata.id",
+ "metadata.id"
);
});
@@ -582,7 +582,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- scene.frameState,
+ scene.frameState
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
@@ -625,7 +625,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- scene.frameState,
+ scene.frameState
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, []);
@@ -654,7 +654,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- scene.frameState,
+ scene.frameState
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
@@ -684,7 +684,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- scene.frameState,
+ scene.frameState
);
ShaderBuilderTester.expectHasVertexDefines(shaderBuilder, [
@@ -715,7 +715,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- frameState,
+ frameState
);
const attenuation = uniformMap.model_pointCloudParameters();
@@ -744,7 +744,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- frameState,
+ frameState
);
const attenuation = uniformMap.model_pointCloudParameters();
@@ -774,7 +774,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- frameState,
+ frameState
);
const attenuation = uniformMap.model_pointCloudParameters();
@@ -793,7 +793,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- frameState,
+ frameState
);
const attenuation = uniformMap.model_pointCloudParameters();
@@ -821,7 +821,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- frameState,
+ frameState
);
const attenuation = uniformMap.model_pointCloudParameters();
@@ -849,7 +849,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- frameState,
+ frameState
);
const attenuation = uniformMap.model_pointCloudParameters();
@@ -878,7 +878,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- frameState,
+ frameState
);
const attenuation = uniformMap.model_pointCloudParameters();
@@ -898,7 +898,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- frameState,
+ frameState
);
const attenuation = uniformMap.model_pointCloudParameters();
@@ -918,7 +918,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- frameState,
+ frameState
);
const attenuation = uniformMap.model_pointCloudParameters();
@@ -940,7 +940,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- frameState,
+ frameState
);
const attenuation = uniformMap.model_pointCloudParameters();
@@ -962,7 +962,7 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- frameState,
+ frameState
);
const attenuation = uniformMap.model_pointCloudParameters();
@@ -986,12 +986,12 @@ describe(
PointCloudStylingPipelineStage.process(
renderResources,
mockPrimitive,
- frameState,
+ frameState
);
const attenuation = uniformMap.model_pointCloudParameters();
expect(attenuation.z).toBe(Number.POSITIVE_INFINITY);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/PrimitiveLoadPlanSpec.js b/packages/engine/Specs/Scene/Model/PrimitiveLoadPlanSpec.js
index 30887321fc9d..213612f94c55 100644
--- a/packages/engine/Specs/Scene/Model/PrimitiveLoadPlanSpec.js
+++ b/packages/engine/Specs/Scene/Model/PrimitiveLoadPlanSpec.js
@@ -44,11 +44,11 @@ describe(
const loadPlan = new PrimitiveLoadPlan(primitive);
loadPlan.indicesPlan = new PrimitiveLoadPlan.IndicesLoadPlan(
- primitive.indices,
+ primitive.indices
);
const [positions] = primitive.attributes;
loadPlan.attributePlans.push(
- new PrimitiveLoadPlan.AttributeLoadPlan(positions),
+ new PrimitiveLoadPlan.AttributeLoadPlan(positions)
);
return loadPlan;
@@ -179,8 +179,10 @@ describe(
// A new attribute is created for the outline coordinates
expect(loadPlan.attributePlans.length).toBe(2);
- const [outputPositionPlan, outlineCoordinatesPlan] =
- loadPlan.attributePlans;
+ const [
+ outputPositionPlan,
+ outlineCoordinatesPlan,
+ ] = loadPlan.attributePlans;
expect(outputPositionPlan).toBe(positionPlan);
expectOutlineCoordinates(loadPlan.primitive, outlineCoordinatesPlan);
@@ -212,8 +214,10 @@ describe(
// A new attribute is created for the outline coordinates
expect(loadPlan.attributePlans.length).toBe(2);
- const [outputPositionPlan, outlineCoordinatesPlan] =
- loadPlan.attributePlans;
+ const [
+ outputPositionPlan,
+ outlineCoordinatesPlan,
+ ] = loadPlan.attributePlans;
expect(outputPositionPlan).toBe(positionPlan);
expectOutlineCoordinates(loadPlan.primitive, outlineCoordinatesPlan);
@@ -260,8 +264,10 @@ describe(
// A new attribute is created for the outline coordinates
expect(loadPlan.attributePlans.length).toBe(2);
- const [outputPositionPlan, outlineCoordinatesPlan] =
- loadPlan.attributePlans;
+ const [
+ outputPositionPlan,
+ outlineCoordinatesPlan,
+ ] = loadPlan.attributePlans;
expect(outputPositionPlan).toBe(positionPlan);
expectOutlineCoordinates(loadPlan.primitive, outlineCoordinatesPlan);
@@ -291,5 +297,5 @@ describe(
expect(indices.typedArray).toEqual(expectedIndices);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/PrimitiveOutlineGeneratorSpec.js b/packages/engine/Specs/Scene/Model/PrimitiveOutlineGeneratorSpec.js
index 1e3a0ace79e9..74a50168138d 100644
--- a/packages/engine/Specs/Scene/Model/PrimitiveOutlineGeneratorSpec.js
+++ b/packages/engine/Specs/Scene/Model/PrimitiveOutlineGeneratorSpec.js
@@ -392,7 +392,15 @@ describe(
});
attribute = new Float32Array([
- 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0,
+ 0.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
]);
result = generator.updateAttribute(attribute);
expectedAttribute = new Float32Array([
@@ -503,5 +511,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/PrimitiveOutlinePipelineStageSpec.js b/packages/engine/Specs/Scene/Model/PrimitiveOutlinePipelineStageSpec.js
index 02244c9a321c..fa37b883cca6 100644
--- a/packages/engine/Specs/Scene/Model/PrimitiveOutlinePipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/PrimitiveOutlinePipelineStageSpec.js
@@ -91,7 +91,7 @@ describe(
PrimitiveOutlinePipelineStage.process(
renderResources,
primitive,
- frameState,
+ frameState
);
const context = frameState.context;
@@ -135,11 +135,11 @@ describe(
expect(outlineCoordinates.index).toBe(1);
expect(outlineCoordinates.vertexBuffer).toBe(
- primitive.outlineCoordinates.buffer,
+ primitive.outlineCoordinates.buffer
);
expect(outlineCoordinates.componentsPerAttribute).toBe(3);
expect(outlineCoordinates.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(outlineCoordinates.offsetInBytes).toBe(0);
expect(outlineCoordinates.strideInBytes).not.toBeDefined();
@@ -147,5 +147,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/PrimitiveRenderResourcesSpec.js b/packages/engine/Specs/Scene/Model/PrimitiveRenderResourcesSpec.js
index 740e9218f0c0..ab230b293574 100644
--- a/packages/engine/Specs/Scene/Model/PrimitiveRenderResourcesSpec.js
+++ b/packages/engine/Specs/Scene/Model/PrimitiveRenderResourcesSpec.js
@@ -85,7 +85,7 @@ describe(
enabled: true,
func: DepthFunction.LESS_OR_EQUAL,
},
- }),
+ })
);
let runtimePrimitive;
@@ -115,7 +115,7 @@ describe(
const modelResources = new ModelRenderResources(mockModel);
const nodeResources = new NodeRenderResources(
modelResources,
- runtimeNode,
+ runtimeNode
);
return new PrimitiveRenderResources(nodeResources, undefined);
}).toThrowDeveloperError();
@@ -125,11 +125,11 @@ describe(
const modelResources = new ModelRenderResources(mockModel);
const nodeResources = new NodeRenderResources(
modelResources,
- runtimeNode,
+ runtimeNode
);
const primitiveResources = new PrimitiveRenderResources(
nodeResources,
- runtimePrimitive,
+ runtimePrimitive
);
expect(primitiveResources.runtimePrimitive).toBe(runtimePrimitive);
@@ -138,25 +138,25 @@ describe(
expect(primitiveResources.indices).toBe(primitive.indices);
expect(primitiveResources.primitiveType).toBe(PrimitiveType.TRIANGLES);
expect(primitiveResources.positionMin).toEqual(
- new Cartesian3(-1, -1, -1),
+ new Cartesian3(-1, -1, -1)
);
expect(primitiveResources.positionMax).toEqual(new Cartesian3(1, 1, 1));
// The points are in a cube from -1, -1, -1 to 1, 1, 1. The center is
// (0, 0, 0). The full diagonal is 2 * sqrt(3), so half is sqrt(3)
expect(primitiveResources.boundingSphere.center).toEqualEpsilon(
Cartesian3.ZERO,
- CesiumMath.EPSILON9,
+ CesiumMath.EPSILON9
);
expect(primitiveResources.boundingSphere.radius).toEqualEpsilon(
Math.sqrt(3),
- CesiumMath.EPSILON9,
+ CesiumMath.EPSILON9
);
expect(primitiveResources.uniformMap).toEqual({});
expect(primitiveResources.lightingOptions.lightingModel).toEqual(
- LightingModel.UNLIT,
+ LightingModel.UNLIT
);
expect(
- RenderState.getState(primitiveResources.renderStateOptions),
+ RenderState.getState(primitiveResources.renderStateOptions)
).toEqual(defaultRenderState);
expect(primitiveResources.hasSilhouette).toBe(false);
@@ -167,36 +167,36 @@ describe(
const modelResources = new ModelRenderResources(mockModel);
const nodeResources = new NodeRenderResources(
modelResources,
- runtimeNode,
+ runtimeNode
);
const primitiveResources = new PrimitiveRenderResources(
nodeResources,
- runtimePrimitiveWithoutIndices,
+ runtimePrimitiveWithoutIndices
);
expect(primitiveResources.count).toBe(8);
expect(primitiveResources.indices).not.toBeDefined();
expect(primitiveResources.primitiveType).toBe(PrimitiveType.POINTS);
expect(primitiveResources.positionMin).toEqual(
- new Cartesian3(-2, -2, -2),
+ new Cartesian3(-2, -2, -2)
);
expect(primitiveResources.positionMax).toEqual(new Cartesian3(2, 2, 2));
// The points are in a cube from -2, -2, -2 to 2, 2, 2. The center is
// (0, 0, 0). The full diagonal is 4 * sqrt(3), so half is 2 * sqrt(3)
expect(primitiveResources.boundingSphere.center).toEqualEpsilon(
Cartesian3.ZERO,
- CesiumMath.EPSILON9,
+ CesiumMath.EPSILON9
);
expect(primitiveResources.boundingSphere.radius).toEqualEpsilon(
2.0 * Math.sqrt(3),
- CesiumMath.EPSILON9,
+ CesiumMath.EPSILON9
);
expect(primitiveResources.uniformMap).toEqual({});
expect(primitiveResources.lightingOptions.lightingModel).toEqual(
- LightingModel.UNLIT,
+ LightingModel.UNLIT
);
expect(
- RenderState.getState(primitiveResources.renderStateOptions),
+ RenderState.getState(primitiveResources.renderStateOptions)
).toEqual(defaultRenderState);
});
@@ -211,13 +211,13 @@ describe(
const nodeResources = new NodeRenderResources(
modelResources,
- runtimeNode,
+ runtimeNode
);
nodeResources.shaderBuilder.addDefine("NODE");
const primitiveResources = new PrimitiveRenderResources(
nodeResources,
- runtimePrimitive,
+ runtimePrimitive
);
primitiveResources.shaderBuilder.addDefine("PRIMITIVE");
@@ -225,10 +225,10 @@ describe(
// The primitive's shader builder should be a clone of the node's
expect(primitiveResources.shaderBuilder).not.toBe(
- modelResources.shaderBuilder,
+ modelResources.shaderBuilder
);
expect(primitiveResources.shaderBuilder).not.toBe(
- modelResources.shaderBuilder,
+ modelResources.shaderBuilder
);
// The primitive should have inherited the renderStateOptions of the model's
@@ -243,15 +243,15 @@ describe(
// The defines should cascade through the three levels
ShaderBuilderTester.expectHasFragmentDefines(
modelResources.shaderBuilder,
- ["MODEL"],
+ ["MODEL"]
);
ShaderBuilderTester.expectHasFragmentDefines(
nodeResources.shaderBuilder,
- ["MODEL", "NODE"],
+ ["MODEL", "NODE"]
);
ShaderBuilderTester.expectHasFragmentDefines(
primitiveResources.shaderBuilder,
- ["MODEL", "NODE", "PRIMITIVE"],
+ ["MODEL", "NODE", "PRIMITIVE"]
);
});
@@ -264,14 +264,14 @@ describe(
const nodeResources = new NodeRenderResources(
modelResources,
- runtimeNode,
+ runtimeNode
);
nodeResources.shaderBuilder.addDefine("NODE");
nodeResources.renderStateOptions.blending = BlendingState.ALPHA_BLEND;
const primitiveResources = new PrimitiveRenderResources(
nodeResources,
- runtimePrimitive,
+ runtimePrimitive
);
expect(primitiveResources.runtimeNode).toBe(runtimeNode);
@@ -282,9 +282,9 @@ describe(
enabled: true,
});
expect(primitiveResources.renderStateOptions.blending).toEqual(
- BlendingState.ALPHA_BLEND,
+ BlendingState.ALPHA_BLEND
);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/PrimitiveStatisticsPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/PrimitiveStatisticsPipelineStageSpec.js
index 92bf3249675b..54c2840a8f33 100644
--- a/packages/engine/Specs/Scene/Model/PrimitiveStatisticsPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/PrimitiveStatisticsPipelineStageSpec.js
@@ -337,7 +337,7 @@ describe(
PrimitiveStatisticsPipelineStage._count2DPositions(
statistics,
- mockRuntimePrimitive,
+ mockRuntimePrimitive
);
expect(statistics.geometryByteLength).toBe(0);
@@ -365,7 +365,7 @@ describe(
PrimitiveStatisticsPipelineStage._count2DPositions(
statistics,
- mockRuntimePrimitive,
+ mockRuntimePrimitive
);
// This stage intentionally counts the GPU + CPU copies of the 2D
@@ -383,7 +383,7 @@ describe(
PrimitiveStatisticsPipelineStage._countMorphTargetAttributes(
statistics,
- primitive,
+ primitive
);
let totalSize = 0;
@@ -409,7 +409,7 @@ describe(
PrimitiveStatisticsPipelineStage._countMaterialTextures(
statistics,
- primitive.material,
+ primitive.material
);
expect(statistics.texturesByteLength).toBe(0);
@@ -427,7 +427,7 @@ describe(
PrimitiveStatisticsPipelineStage._countMaterialTextures(
statistics,
- primitive.material,
+ primitive.material
);
const totalTextureSize =
@@ -452,7 +452,7 @@ describe(
PrimitiveStatisticsPipelineStage._countMaterialTextures(
statistics,
- primitive.material,
+ primitive.material
);
const totalTextureSize =
@@ -475,13 +475,13 @@ describe(
PrimitiveStatisticsPipelineStage._countFeatureIdTextures(
statistics,
- primitive.featureIds,
+ primitive.featureIds
);
const featureIdTexture = primitive.featureIds[0];
expect(statistics.geometryByteLength).toBe(0);
expect(statistics.texturesByteLength).toBe(
- featureIdTexture.textureReader.texture.sizeInBytes,
+ featureIdTexture.textureReader.texture.sizeInBytes
);
});
});
@@ -494,7 +494,7 @@ describe(
PrimitiveStatisticsPipelineStage._countBinaryMetadata(
statistics,
- model,
+ model
);
expect(statistics.geometryByteLength).toBe(0);
@@ -509,33 +509,33 @@ describe(
PrimitiveStatisticsPipelineStage._countBinaryMetadata(
statistics,
- model,
+ model
);
const structuralMetadata = model.structuralMetadata;
const propertyTable = structuralMetadata.getPropertyTable(0);
expect(statistics.propertyTablesByteLength).toBe(
- propertyTable.byteLength,
+ propertyTable.byteLength
);
});
});
it("_countBinaryMetadata does not update statistics for property attributes", function () {
- return loadGltf(pointCloudWithPropertyAttributes).then(
- function (gltfLoader) {
- const statistics = new ModelStatistics();
- const components = gltfLoader.components;
- const model = mockModel(components);
-
- PrimitiveStatisticsPipelineStage._countBinaryMetadata(
- statistics,
- model,
- );
-
- expect(statistics.geometryByteLength).toBe(0);
- },
- );
+ return loadGltf(pointCloudWithPropertyAttributes).then(function (
+ gltfLoader
+ ) {
+ const statistics = new ModelStatistics();
+ const components = gltfLoader.components;
+ const model = mockModel(components);
+
+ PrimitiveStatisticsPipelineStage._countBinaryMetadata(
+ statistics,
+ model
+ );
+
+ expect(statistics.geometryByteLength).toBe(0);
+ });
});
it("_countBinaryMetadata updates statistics for propertyTextures", function () {
@@ -546,7 +546,7 @@ describe(
PrimitiveStatisticsPipelineStage._countBinaryMetadata(
statistics,
- model,
+ model
);
// everything shares the same texture, so the memory is only counted
@@ -560,5 +560,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/SceneMode2DPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/SceneMode2DPipelineStageSpec.js
index 17ea371b8ea6..e5998f7f031e 100644
--- a/packages/engine/Specs/Scene/Model/SceneMode2DPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/SceneMode2DPipelineStageSpec.js
@@ -108,7 +108,7 @@ describe(
SceneMode2DPipelineStage.process(
renderResources,
primitive,
- scene.frameState,
+ scene.frameState
);
const model = renderResources.model;
@@ -123,7 +123,7 @@ describe(
// Check that the position attribute's typed array has been unloaded.
const positionAttribute = ModelUtility.getAttributeBySemantic(
primitive,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
expect(positionAttribute.typedArray).toBeUndefined();
@@ -135,12 +135,12 @@ describe(
const translationMatrix = Matrix4.fromTranslation(
runtimePrimitive.boundingSphere2D.center,
- scratchMatrix,
+ scratchMatrix
);
const expected = Matrix4.multiplyTransformation(
scene.frameState.context.uniformState.view,
translationMatrix,
- translationMatrix,
+ translationMatrix
);
expect(renderResources.uniformMap.u_modelView2D()).toEqual(expected);
});
@@ -160,7 +160,7 @@ describe(
SceneMode2DPipelineStage.process(
renderResources,
primitive,
- scene.frameState,
+ scene.frameState
);
const model = renderResources.model;
@@ -175,7 +175,7 @@ describe(
// Check that the position attribute's typed array has been unloaded.
const positionAttribute = ModelUtility.getAttributeBySemantic(
primitive,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
expect(positionAttribute.typedArray).toBeUndefined();
@@ -186,12 +186,12 @@ describe(
const translationMatrix = Matrix4.fromTranslation(
runtimePrimitive.boundingSphere2D.center,
- scratchMatrix,
+ scratchMatrix
);
const expected = Matrix4.multiplyTransformation(
scene.frameState.context.uniformState.view,
translationMatrix,
- translationMatrix,
+ translationMatrix
);
expect(renderResources.uniformMap.u_modelView2D()).toEqual(expected);
});
@@ -211,7 +211,7 @@ describe(
SceneMode2DPipelineStage.process(
renderResources,
primitive,
- scene.frameState,
+ scene.frameState
);
// Only the 2D bounding sphere will be computed for the primitive.
@@ -222,7 +222,7 @@ describe(
// Check that the position attribute's typed array has been unloaded.
const positionAttribute = ModelUtility.getAttributeBySemantic(
primitive,
- VertexAttributeSemantic.POSITION,
+ VertexAttributeSemantic.POSITION
);
expect(positionAttribute.typedArray).toBeUndefined();
@@ -235,5 +235,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/SelectedFeatureIdPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/SelectedFeatureIdPipelineStageSpec.js
index dae4030ca0fc..afa2f5da13d7 100644
--- a/packages/engine/Specs/Scene/Model/SelectedFeatureIdPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/SelectedFeatureIdPipelineStageSpec.js
@@ -51,7 +51,7 @@ describe(
shaderBuilder.addStruct(
SelectedFeatureIdPipelineStage.STRUCT_ID_SELECTED_FEATURE,
SelectedFeatureIdPipelineStage.STRUCT_NAME_SELECTED_FEATURE,
- ShaderDestination.BOTH,
+ ShaderDestination.BOTH
);
return shaderBuilder;
}
@@ -61,14 +61,14 @@ describe(
shaderBuilder,
SelectedFeatureIdPipelineStage.STRUCT_ID_SELECTED_FEATURE,
SelectedFeatureIdPipelineStage.STRUCT_NAME_SELECTED_FEATURE,
- [" int id;", " vec2 st;", " vec4 color;"],
+ [" int id;", " vec2 st;", " vec4 color;"]
);
ShaderBuilderTester.expectHasFragmentStruct(
shaderBuilder,
SelectedFeatureIdPipelineStage.STRUCT_ID_SELECTED_FEATURE,
SelectedFeatureIdPipelineStage.STRUCT_NAME_SELECTED_FEATURE,
- [" int id;", " vec2 st;", " vec4 color;"],
+ [" int id;", " vec2 st;", " vec4 color;"]
);
}
@@ -118,7 +118,7 @@ describe(
SelectedFeatureIdPipelineStage.process(
renderResources,
primitive,
- frameState,
+ frameState
);
expect(renderResources.hasPropertyTable).toBe(true);
@@ -156,7 +156,7 @@ describe(
SelectedFeatureIdPipelineStage.process(
renderResources,
primitive,
- frameState,
+ frameState
);
expect(renderResources.hasPropertyTable).toBe(true);
@@ -187,7 +187,7 @@ describe(
SelectedFeatureIdPipelineStage.process(
renderResources,
primitive,
- frameState,
+ frameState
);
expect(renderResources.hasPropertyTable).toBe(true);
@@ -224,7 +224,7 @@ describe(
SelectedFeatureIdPipelineStage.process(
renderResources,
primitive,
- frameState,
+ frameState
);
expect(renderResources.hasPropertyTable).toBe(true);
@@ -247,5 +247,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/SkinningPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/SkinningPipelineStageSpec.js
index f89b84b59e6e..4449c281bfdb 100644
--- a/packages/engine/Specs/Scene/Model/SkinningPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/SkinningPipelineStageSpec.js
@@ -103,7 +103,7 @@ describe(
" skinnedMatrix += a_weights_0.z * u_jointMatrices[int(a_joints_0.z)];",
" skinnedMatrix += a_weights_0.w * u_jointMatrices[int(a_joints_0.w)];",
" return skinnedMatrix;",
- ],
+ ]
);
ShaderBuilderTester.expectVertexLinesEqual(shaderBuilder, [
_shadersSkinningStageVS,
@@ -116,7 +116,7 @@ describe(
const runtimeNode = renderResources.runtimeNode;
const uniformMap = renderResources.uniformMap;
expect(uniformMap.u_jointMatrices()).toBe(
- runtimeNode.computedJointMatrices,
+ runtimeNode.computedJointMatrices
);
});
});
@@ -160,7 +160,7 @@ describe(
" skinnedMatrix += a_weights_0.z * u_jointMatrices[int(a_joints_0.z)];",
" skinnedMatrix += a_weights_0.w * u_jointMatrices[int(a_joints_0.w)];",
" return skinnedMatrix;",
- ],
+ ]
);
ShaderBuilderTester.expectVertexLinesEqual(shaderBuilder, [
_shadersSkinningStageVS,
@@ -173,10 +173,10 @@ describe(
const runtimeNode = renderResources.runtimeNode;
const uniformMap = renderResources.uniformMap;
expect(uniformMap.u_jointMatrices()).toBe(
- runtimeNode.computedJointMatrices,
+ runtimeNode.computedJointMatrices
);
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/TextureManagerSpec.js b/packages/engine/Specs/Scene/Model/TextureManagerSpec.js
index e5a12e3cf69e..2bd470f93417 100644
--- a/packages/engine/Specs/Scene/Model/TextureManagerSpec.js
+++ b/packages/engine/Specs/Scene/Model/TextureManagerSpec.js
@@ -71,7 +71,7 @@ describe(
id,
new TextureUniform({
url: blueUrl,
- }),
+ })
);
return waitForTextureLoad(textureManager, id).then(function (texture) {
@@ -91,7 +91,7 @@ describe(
typedArray: new Uint8Array([255, 0, 0, 255, 0, 255, 0, 255]),
width: 1,
height: 2,
- }),
+ })
);
return waitForTextureLoad(textureManager, id).then(function (texture) {
@@ -110,14 +110,14 @@ describe(
new TextureUniform({
url: redUrl,
minificationFilter: TextureMinificationFilter.LINEAR_MIPMAP_LINEAR,
- }),
+ })
);
- return waitForTextureLoad(textureManager, id, false).then(
- function (texture) {
- expect(texture._hasMipmap).toBe(true);
- },
- );
+ return waitForTextureLoad(textureManager, id, false).then(function (
+ texture
+ ) {
+ expect(texture._hasMipmap).toBe(true);
+ });
});
it("resizes image to power-of-two dimensions if needed", function () {
@@ -130,16 +130,16 @@ describe(
new TextureUniform({
url: blue10x10Url,
minificationFilter: TextureMinificationFilter.LINEAR_MIPMAP_NEAREST,
- }),
+ })
);
- return waitForTextureLoad(textureManager, id, false).then(
- function (texture) {
- expect(texture.width).toBe(16);
- expect(texture.height).toBe(16);
- expect(texture._hasMipmap).toBe(true);
- },
- );
+ return waitForTextureLoad(textureManager, id, false).then(function (
+ texture
+ ) {
+ expect(texture.width).toBe(16);
+ expect(texture.height).toBe(16);
+ expect(texture._hasMipmap).toBe(true);
+ });
});
it("can resize a texture supplied as a Uint8Array", function () {
@@ -180,18 +180,18 @@ describe(
new TextureUniform({
url: blue10x10Url,
minificationFilter: TextureMinificationFilter.NEAREST_MIPMAP_NEAREST,
- }),
+ })
);
const webgl2 = true;
- return waitForTextureLoad(textureManager, id, webgl2).then(
- function (texture) {
- expect(texture.width).toBe(10);
- expect(texture.height).toBe(10);
- expect(texture._hasMipmap).toBe(true);
- },
- );
+ return waitForTextureLoad(textureManager, id, webgl2).then(function (
+ texture
+ ) {
+ expect(texture.width).toBe(10);
+ expect(texture.height).toBe(10);
+ expect(texture._hasMipmap).toBe(true);
+ });
});
it("destroys old texture before adding a new one", function () {
@@ -203,31 +203,31 @@ describe(
id,
new TextureUniform({
url: blueUrl,
- }),
+ })
);
- return waitForTextureLoad(textureManager, id).then(
- function (blueTexture) {
- expect(blueTexture.width).toBe(2);
- expect(blueTexture.height).toBe(2);
- expect(blueTexture.isDestroyed()).toBe(false);
-
- textureManager.loadTexture2D(
- id,
- new TextureUniform({
- url: greenUrl,
- }),
- );
- return waitForTextureLoad(textureManager, id).then(
- function (greenTexture) {
- expect(blueTexture.isDestroyed()).toBe(true);
- expect(greenTexture.width).toBe(1);
- expect(greenTexture.height).toBe(4);
- expect(greenTexture.isDestroyed()).toBe(false);
- },
- );
- },
- );
+ return waitForTextureLoad(textureManager, id).then(function (
+ blueTexture
+ ) {
+ expect(blueTexture.width).toBe(2);
+ expect(blueTexture.height).toBe(2);
+ expect(blueTexture.isDestroyed()).toBe(false);
+
+ textureManager.loadTexture2D(
+ id,
+ new TextureUniform({
+ url: greenUrl,
+ })
+ );
+ return waitForTextureLoad(textureManager, id).then(function (
+ greenTexture
+ ) {
+ expect(blueTexture.isDestroyed()).toBe(true);
+ expect(greenTexture.width).toBe(1);
+ expect(greenTexture.height).toBe(4);
+ expect(greenTexture.isDestroyed()).toBe(false);
+ });
+ });
});
it("getTexture returns undefined for unknown texture", function () {
@@ -252,7 +252,7 @@ describe(
id,
new TextureUniform({
url: "https://example.com/not-a-texture.jpg",
- }),
+ })
);
return waitForTextureLoad(textureManager, id)
.then(function (texture) {
@@ -272,7 +272,7 @@ describe(
id,
new TextureUniform({
url: blueUrl,
- }),
+ })
);
return waitForTextureLoad(textureManager, id).then(function (texture) {
@@ -285,5 +285,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/TextureUniformSpec.js b/packages/engine/Specs/Scene/Model/TextureUniformSpec.js
index 0d8c853f3370..1cee84bf1cf0 100644
--- a/packages/engine/Specs/Scene/Model/TextureUniformSpec.js
+++ b/packages/engine/Specs/Scene/Model/TextureUniformSpec.js
@@ -108,7 +108,7 @@ describe("Scene/Model/TextureUniform", function () {
minificationFilter: TextureMinificationFilter.NEAREST,
magnificationFilter: TextureMagnificationFilter.NEAREST,
maximumAnisotropy: 2,
- }),
+ })
);
});
diff --git a/packages/engine/Specs/Scene/Model/TilesetPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/TilesetPipelineStageSpec.js
index aa17f40a821f..da7e17dceec3 100644
--- a/packages/engine/Specs/Scene/Model/TilesetPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/TilesetPipelineStageSpec.js
@@ -53,10 +53,10 @@ describe("Scene/Model/TilesetPipelineStage", function () {
const renderStateOptions = renderResources.renderStateOptions;
expect(renderStateOptions.stencilTest).toEqual(
- StencilConstants.setCesium3DTileBit(),
+ StencilConstants.setCesium3DTileBit()
);
expect(renderStateOptions.stencilMask).toEqual(
- StencilConstants.CESIUM_3D_TILE_MASK,
+ StencilConstants.CESIUM_3D_TILE_MASK
);
});
});
diff --git a/packages/engine/Specs/Scene/Model/VerticalExaggerationPipelineStageSpec.js b/packages/engine/Specs/Scene/Model/VerticalExaggerationPipelineStageSpec.js
index 0dc90b162939..0eead95983fe 100644
--- a/packages/engine/Specs/Scene/Model/VerticalExaggerationPipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/VerticalExaggerationPipelineStageSpec.js
@@ -31,7 +31,7 @@ describe(
VerticalExaggerationPipelineStage.process(
renderResources,
mockPrimitive,
- mockFrameState,
+ mockFrameState
);
const shaderBuilder = renderResources.shaderBuilder;
@@ -46,12 +46,12 @@ describe(
]);
const expectedUniform = Cartesian2.fromElements(
mockFrameState.verticalExaggeration,
- mockFrameState.verticalExaggerationRelativeHeight,
+ mockFrameState.verticalExaggerationRelativeHeight
);
expect(
- renderResources.uniformMap.u_verticalExaggerationAndRelativeHeight(),
+ renderResources.uniformMap.u_verticalExaggerationAndRelativeHeight()
).toEqual(expectedUniform);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/WireframePipelineStageSpec.js b/packages/engine/Specs/Scene/Model/WireframePipelineStageSpec.js
index 9287f87ec935..5cf9183b999c 100644
--- a/packages/engine/Specs/Scene/Model/WireframePipelineStageSpec.js
+++ b/packages/engine/Specs/Scene/Model/WireframePipelineStageSpec.js
@@ -87,27 +87,23 @@ describe(
}
it("adds define to shader", function () {
- return loadGltf(boxTexturedBinary, sceneWithWebgl2).then(
- function (gltfLoader) {
- const components = gltfLoader.components;
- const node = components.nodes[1];
- const primitive = node.primitives[0];
- const frameState = sceneWithWebgl2.frameState;
-
- const renderResources = mockRenderResources(primitive);
- const shaderBuilder = renderResources.shaderBuilder;
-
- WireframePipelineStage.process(
- renderResources,
- primitive,
- frameState,
- );
-
- ShaderBuilderTester.expectHasFragmentDefines(shaderBuilder, [
- "HAS_WIREFRAME",
- ]);
- },
- );
+ return loadGltf(boxTexturedBinary, sceneWithWebgl2).then(function (
+ gltfLoader
+ ) {
+ const components = gltfLoader.components;
+ const node = components.nodes[1];
+ const primitive = node.primitives[0];
+ const frameState = sceneWithWebgl2.frameState;
+
+ const renderResources = mockRenderResources(primitive);
+ const shaderBuilder = renderResources.shaderBuilder;
+
+ WireframePipelineStage.process(renderResources, primitive, frameState);
+
+ ShaderBuilderTester.expectHasFragmentDefines(shaderBuilder, [
+ "HAS_WIREFRAME",
+ ]);
+ });
});
it("Creates wireframe indices from buffer (WebGL 2)", function () {
@@ -115,72 +111,64 @@ describe(
return;
}
- return loadGltf(boxTexturedBinary, sceneWithWebgl2).then(
- function (gltfLoader) {
- const components = gltfLoader.components;
- const node = components.nodes[1];
- const primitive = node.primitives[0];
- const frameState = sceneWithWebgl2.frameState;
-
- const renderResources = mockRenderResources(primitive);
-
- expect(renderResources.count).toBe(36);
- expect(renderResources.primitiveType).toBe(PrimitiveType.TRIANGLES);
-
- WireframePipelineStage.process(
- renderResources,
- primitive,
- frameState,
- );
-
- const wireframeIndexBuffer = renderResources.wireframeIndexBuffer;
- const model = renderResources.model;
- expect(wireframeIndexBuffer).toBeDefined();
- expect(model._pipelineResources).toEqual([wireframeIndexBuffer]);
- expect(model.statistics.geometryByteLength).toBe(
- wireframeIndexBuffer.sizeInBytes,
- );
- expect(renderResources.primitiveType).toBe(PrimitiveType.LINES);
- expect(renderResources.count).toBe(72);
- },
- );
+ return loadGltf(boxTexturedBinary, sceneWithWebgl2).then(function (
+ gltfLoader
+ ) {
+ const components = gltfLoader.components;
+ const node = components.nodes[1];
+ const primitive = node.primitives[0];
+ const frameState = sceneWithWebgl2.frameState;
+
+ const renderResources = mockRenderResources(primitive);
+
+ expect(renderResources.count).toBe(36);
+ expect(renderResources.primitiveType).toBe(PrimitiveType.TRIANGLES);
+
+ WireframePipelineStage.process(renderResources, primitive, frameState);
+
+ const wireframeIndexBuffer = renderResources.wireframeIndexBuffer;
+ const model = renderResources.model;
+ expect(wireframeIndexBuffer).toBeDefined();
+ expect(model._pipelineResources).toEqual([wireframeIndexBuffer]);
+ expect(model.statistics.geometryByteLength).toBe(
+ wireframeIndexBuffer.sizeInBytes
+ );
+ expect(renderResources.primitiveType).toBe(PrimitiveType.LINES);
+ expect(renderResources.count).toBe(72);
+ });
});
it("Creates wireframe indices from typedArray (WebGL 1)", function () {
const options = {
loadIndicesForWireframe: true,
};
- return loadGltf(boxTexturedBinary, scene, options).then(
- function (gltfLoader) {
- const components = gltfLoader.components;
- const node = components.nodes[1];
- const primitive = node.primitives[0];
- const frameState = scene.frameState;
-
- const renderResources = mockRenderResources(primitive);
-
- expect(renderResources.count).toBe(36);
- expect(renderResources.primitiveType).toBe(PrimitiveType.TRIANGLES);
-
- WireframePipelineStage.process(
- renderResources,
- primitive,
- frameState,
- );
-
- const wireframeIndexBuffer = renderResources.wireframeIndexBuffer;
- const model = renderResources.model;
- expect(wireframeIndexBuffer).toBeDefined();
- expect(model._pipelineResources).toEqual([wireframeIndexBuffer]);
- expect(model.statistics.geometryByteLength).toBe(
- wireframeIndexBuffer.sizeInBytes,
- );
-
- expect(renderResources.primitiveType).toBe(PrimitiveType.LINES);
- expect(renderResources.count).toBe(72);
- },
- );
+ return loadGltf(boxTexturedBinary, scene, options).then(function (
+ gltfLoader
+ ) {
+ const components = gltfLoader.components;
+ const node = components.nodes[1];
+ const primitive = node.primitives[0];
+ const frameState = scene.frameState;
+
+ const renderResources = mockRenderResources(primitive);
+
+ expect(renderResources.count).toBe(36);
+ expect(renderResources.primitiveType).toBe(PrimitiveType.TRIANGLES);
+
+ WireframePipelineStage.process(renderResources, primitive, frameState);
+
+ const wireframeIndexBuffer = renderResources.wireframeIndexBuffer;
+ const model = renderResources.model;
+ expect(wireframeIndexBuffer).toBeDefined();
+ expect(model._pipelineResources).toEqual([wireframeIndexBuffer]);
+ expect(model.statistics.geometryByteLength).toBe(
+ wireframeIndexBuffer.sizeInBytes
+ );
+
+ expect(renderResources.primitiveType).toBe(PrimitiveType.LINES);
+ expect(renderResources.count).toBe(72);
+ });
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Model/loadAndZoomToModelAsync.js b/packages/engine/Specs/Scene/Model/loadAndZoomToModelAsync.js
index 2a17f97533a4..2c80710f8a4c 100644
--- a/packages/engine/Specs/Scene/Model/loadAndZoomToModelAsync.js
+++ b/packages/engine/Specs/Scene/Model/loadAndZoomToModelAsync.js
@@ -10,7 +10,7 @@ async function loadAndZoomToModelAsync(options, scene) {
scene.renderForSpecs();
return model.ready;
},
- { timeout: 10000 },
+ { timeout: 10000 }
);
scene.camera.flyToBoundingSphere(model.boundingSphere, {
diff --git a/packages/engine/Specs/Scene/Model/pickModelSpec.js b/packages/engine/Specs/Scene/Model/pickModelSpec.js
index 9a8ad02fab38..02dc9d73d8f7 100644
--- a/packages/engine/Specs/Scene/Model/pickModelSpec.js
+++ b/packages/engine/Specs/Scene/Model/pickModelSpec.js
@@ -82,7 +82,7 @@ describe("Scene/Model/pickModel", function () {
url: boxTexturedGltfUrl,
enablePick: !scene.frameState.context.webgl2,
},
- scene,
+ scene
);
const ray = new Ray();
expect(pickModel(model, ray, scene.frameState)).toBeUndefined();
@@ -94,19 +94,19 @@ describe("Scene/Model/pickModel", function () {
url: boxTexturedGltfUrl,
enablePick: !scene.frameState.context.webgl2,
},
- scene,
+ scene
);
const ray = scene.camera.getPickRay(
new Cartesian2(
scene.drawingBufferWidth / 2.0,
- scene.drawingBufferHeight / 2.0,
- ),
+ scene.drawingBufferHeight / 2.0
+ )
);
const expected = new Cartesian3(0.5, 0, 0.5);
expect(pickModel(model, ray, scene.frameState)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -122,19 +122,19 @@ describe("Scene/Model/pickModel", function () {
url: boxTexturedGltfUrl,
enablePick: true,
},
- scene,
+ scene
);
const ray = scene.camera.getPickRay(
new Cartesian2(
scene.drawingBufferWidth / 2.0,
- scene.drawingBufferHeight / 2.0,
- ),
+ scene.drawingBufferHeight / 2.0
+ )
);
const expected = new Cartesian3(0.5, 0, 0.5);
expect(pickModel(model, ray, scene.frameState)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
sceneWithWebgl1.destroyForSpecs();
@@ -146,19 +146,19 @@ describe("Scene/Model/pickModel", function () {
url: boxWithOffsetUrl,
enablePick: !scene.frameState.context.webgl2,
},
- scene,
+ scene
);
const ray = scene.camera.getPickRay(
new Cartesian2(
scene.drawingBufferWidth / 2.0,
- scene.drawingBufferHeight / 2.0,
- ),
+ scene.drawingBufferHeight / 2.0
+ )
);
const expected = new Cartesian3(0.0, 5.5, -0.5);
expect(pickModel(model, ray, scene.frameState)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -168,19 +168,19 @@ describe("Scene/Model/pickModel", function () {
url: boxCesiumRtcUrl,
enablePick: !scene.frameState.context.webgl2,
},
- scene,
+ scene
);
const ray = scene.camera.getPickRay(
new Cartesian2(
scene.drawingBufferWidth / 2.0,
- scene.drawingBufferHeight / 2.0,
- ),
+ scene.drawingBufferHeight / 2.0
+ )
);
const expected = new Cartesian3(6378137.5, 0.0, -0.499999996649);
expect(pickModel(model, ray, scene.frameState)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
});
@@ -190,19 +190,19 @@ describe("Scene/Model/pickModel", function () {
url: boxWithQuantizedAttributes,
enablePick: !scene.frameState.context.webgl2,
},
- scene,
+ scene
);
const ray = scene.camera.getPickRay(
new Cartesian2(
scene.drawingBufferWidth / 2.0,
- scene.drawingBufferHeight / 2.0,
- ),
+ scene.drawingBufferHeight / 2.0
+ )
);
const expected = new Cartesian3(0.5, 0, 0.5);
expect(pickModel(model, ray, scene.frameState)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -212,19 +212,19 @@ describe("Scene/Model/pickModel", function () {
url: boxWithMixedCompression,
enablePick: !scene.frameState.context.webgl2,
},
- scene,
+ scene
);
const ray = scene.camera.getPickRay(
new Cartesian2(
scene.drawingBufferWidth / 2.0,
- scene.drawingBufferHeight / 2.0,
- ),
+ scene.drawingBufferHeight / 2.0
+ )
);
const expected = new Cartesian3(1.0, 0, 1.0);
expect(pickModel(model, ray, scene.frameState)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -234,19 +234,19 @@ describe("Scene/Model/pickModel", function () {
url: boxInterleaved,
enablePick: !scene.frameState.context.webgl2,
},
- scene,
+ scene
);
const ray = scene.camera.getPickRay(
new Cartesian2(
scene.drawingBufferWidth / 2.0,
- scene.drawingBufferHeight / 2.0,
- ),
+ scene.drawingBufferHeight / 2.0
+ )
);
const expected = new Cartesian3(0.5, 0, 0.5);
expect(pickModel(model, ray, scene.frameState)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -256,7 +256,7 @@ describe("Scene/Model/pickModel", function () {
const offset = new HeadingPitchRange(
CesiumMath.PI_OVER_TWO,
-CesiumMath.PI_OVER_FOUR,
- 1,
+ 1
);
const model = await loadAndZoomToModelAsync(
@@ -265,19 +265,19 @@ describe("Scene/Model/pickModel", function () {
enablePick: !scene.frameState.context.webgl2,
offset,
},
- scene,
+ scene
);
const ray = scene.camera.getPickRay(
new Cartesian2(
scene.drawingBufferWidth / 2.0,
- scene.drawingBufferHeight / 2.0,
- ),
+ scene.drawingBufferHeight / 2.0
+ )
);
const expected = new Cartesian3(0, -0.5, 0.5);
expect(pickModel(model, ray, scene.frameState)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -287,13 +287,13 @@ describe("Scene/Model/pickModel", function () {
url: pointCloudUrl,
enablePick: !scene.frameState.context.webgl2,
},
- scene,
+ scene
);
const ray = scene.camera.getPickRay(
new Cartesian2(
scene.drawingBufferWidth / 2.0,
- scene.drawingBufferHeight / 2.0,
- ),
+ scene.drawingBufferHeight / 2.0
+ )
);
expect(pickModel(model, ray, scene.frameState)).toBeUndefined();
@@ -305,13 +305,13 @@ describe("Scene/Model/pickModel", function () {
url: boxTexturedGltfUrl,
enablePick: !scene.frameState.context.webgl2,
},
- scene,
+ scene
);
const ray = scene.camera.getPickRay(
new Cartesian2(
scene.drawingBufferWidth / 2.0,
- scene.drawingBufferHeight / 2.0,
- ),
+ scene.drawingBufferHeight / 2.0
+ )
);
ray.origin = model.boundingSphere.center;
@@ -325,13 +325,13 @@ describe("Scene/Model/pickModel", function () {
enablePick: !scene.frameState.context.webgl2,
backFaceCulling: false,
},
- scene,
+ scene
);
const ray = scene.camera.getPickRay(
new Cartesian2(
scene.drawingBufferWidth / 2.0,
- scene.drawingBufferHeight / 2.0,
- ),
+ scene.drawingBufferHeight / 2.0
+ )
);
ray.origin = model.boundingSphere.center;
@@ -339,11 +339,11 @@ describe("Scene/Model/pickModel", function () {
const expected = new Cartesian3(
-0.9999998807907355,
0,
- -0.9999998807907104,
+ -0.9999998807907104
);
expect(pickModel(model, ray, scene.frameState)).toEqualEpsilon(
expected,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -353,13 +353,13 @@ describe("Scene/Model/pickModel", function () {
url: boxTexturedGltfUrl,
enablePick: !scene.frameState.context.webgl2,
},
- scene,
+ scene
);
const ray = scene.camera.getPickRay(
new Cartesian2(
scene.drawingBufferWidth / 2.0,
- scene.drawingBufferHeight / 2.0,
- ),
+ scene.drawingBufferHeight / 2.0
+ )
);
const result = new Cartesian3();
@@ -371,7 +371,7 @@ describe("Scene/Model/pickModel", function () {
undefined,
undefined,
undefined,
- result,
+ result
);
expect(result).toEqualEpsilon(expected, CesiumMath.EPSILON12);
expect(returned).toBe(result);
@@ -383,13 +383,13 @@ describe("Scene/Model/pickModel", function () {
url: boxTexturedGltfUrl,
enablePick: !scene.frameState.context.webgl2,
},
- scene,
+ scene
);
const ray = scene.camera.getPickRay(
new Cartesian2(
scene.drawingBufferWidth / 2.0,
- scene.drawingBufferHeight / 2.0,
- ),
+ scene.drawingBufferHeight / 2.0
+ )
);
scene.frameState.mode = SceneMode.MORPHING;
@@ -402,13 +402,13 @@ describe("Scene/Model/pickModel", function () {
url: boxTexturedGltfUrl,
enablePick: !scene.frameState.context.webgl2,
},
- scene,
+ scene
);
const ray = scene.camera.getPickRay(
new Cartesian2(
scene.drawingBufferWidth / 2.0,
- scene.drawingBufferHeight / 2.0,
- ),
+ scene.drawingBufferHeight / 2.0
+ )
);
const expected = new Cartesian3(-65.51341504, 0, -65.51341504);
@@ -418,8 +418,8 @@ describe("Scene/Model/pickModel", function () {
ray,
scene.frameState,
2.0,
- -Ellipsoid.WGS84.minimumRadius,
- ),
+ -Ellipsoid.WGS84.minimumRadius
+ )
).toEqualEpsilon(expected, CesiumMath.EPSILON8);
});
});
diff --git a/packages/engine/Specs/Scene/MoonSpec.js b/packages/engine/Specs/Scene/MoonSpec.js
index 1da140c7caba..6b5f2201bec1 100644
--- a/packages/engine/Specs/Scene/MoonSpec.js
+++ b/packages/engine/Specs/Scene/MoonSpec.js
@@ -32,14 +32,13 @@ describe(
Transforms.computeTemeToPseudoFixedMatrix(date, icrfToFixed);
}
- const moonPosition =
- Simon1994PlanetaryPositions.computeMoonPositionInEarthInertialFrame(
- date,
- );
+ const moonPosition = Simon1994PlanetaryPositions.computeMoonPositionInEarthInertialFrame(
+ date
+ );
Matrix3.multiplyByVector(icrfToFixed, moonPosition, moonPosition);
camera.viewBoundingSphere(
- new BoundingSphere(moonPosition, Ellipsoid.MOON.maximumRadius),
+ new BoundingSphere(moonPosition, Ellipsoid.MOON.maximumRadius)
);
}
@@ -81,5 +80,5 @@ describe(
expect(moon.isDestroyed()).toEqual(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/MultifrustumSpec.js b/packages/engine/Specs/Scene/MultifrustumSpec.js
index f981a3de2845..5c417c6f4a7a 100644
--- a/packages/engine/Specs/Scene/MultifrustumSpec.js
+++ b/packages/engine/Specs/Scene/MultifrustumSpec.js
@@ -216,7 +216,7 @@ describe(
this._rs = undefined;
this._modelMatrix = Matrix4.fromTranslation(
new Cartesian3(0.0, 0.0, -50000.0),
- new Matrix4(),
+ new Matrix4()
);
this.color = new Color(1.0, 1.0, 0.0, 1.0);
@@ -253,17 +253,18 @@ describe(
const maximum = Cartesian3.multiplyByScalar(
dimensions,
0.5,
- new Cartesian3(),
+ new Cartesian3()
);
const minimum = Cartesian3.negate(maximum, new Cartesian3());
const geometry = BoxGeometry.createGeometry(
new BoxGeometry({
minimum: minimum,
maximum: maximum,
- }),
+ })
+ );
+ const attributeLocations = GeometryPipeline.createAttributeLocations(
+ geometry
);
- const attributeLocations =
- GeometryPipeline.createAttributeLocations(geometry);
this._va = VertexArray.fromGeometry({
context: frameState.context,
geometry: geometry,
@@ -295,7 +296,7 @@ describe(
? new BoundingSphere(Cartesian3.clone(Cartesian3.ZERO), 500000.0)
: undefined,
pass: Pass.OPAQUE,
- }),
+ })
);
};
@@ -374,5 +375,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Multiple3DTileContentSpec.js b/packages/engine/Specs/Scene/Multiple3DTileContentSpec.js
index 5682ba42c43c..7e84bd96d4e2 100644
--- a/packages/engine/Specs/Scene/Multiple3DTileContentSpec.js
+++ b/packages/engine/Specs/Scene/Multiple3DTileContentSpec.js
@@ -149,7 +149,7 @@ describe(
tileset,
tile,
tilesetResource,
- contentsJson,
+ contentsJson
);
expect(content.innerContentUrls).toEqual([
@@ -166,7 +166,7 @@ describe(
tileset,
tile,
tilesetResource,
- contentJson,
+ contentJson
);
expect(content.innerContentUrls).toEqual([
@@ -188,7 +188,7 @@ describe(
mockTileset,
tile,
tilesetResource,
- contentsJson,
+ contentsJson
);
spyOn(Resource.prototype, "fetchArrayBuffer").and.callFake(function () {
@@ -216,7 +216,7 @@ describe(
mockTileset,
tile,
tilesetResource,
- contentsJson,
+ contentsJson
);
RequestScheduler.maximumRequestsPerServer = 2;
@@ -238,7 +238,7 @@ describe(
mockTileset,
tile,
tilesetResource,
- contentsJson,
+ contentsJson
);
spyOn(Resource.prototype, "fetchArrayBuffer").and.callFake(function () {
@@ -258,7 +258,7 @@ describe(
expect(failureSpy).toHaveBeenCalledWith(
jasmine.objectContaining({
message: "my error",
- }),
+ })
);
});
@@ -274,7 +274,7 @@ describe(
mockTileset,
tile,
tilesetResource,
- contentsJson,
+ contentsJson
);
spyOn(Resource.prototype, "fetchArrayBuffer").and.callFake(function () {
@@ -295,7 +295,7 @@ describe(
it("becomes ready", async function () {
const tileset = await Cesium3DTilesTester.loadTileset(
scene,
- multipleContentsUrl,
+ multipleContentsUrl
);
expect(tileset.root.contentReady).toBeTrue();
expect(tileset.root.content).toBeDefined();
@@ -303,21 +303,21 @@ describe(
it("renders multiple contents", function () {
return Cesium3DTilesTester.loadTileset(scene, multipleContentsUrl).then(
- expectRenderMultipleContents,
+ expectRenderMultipleContents
);
});
it("renders multiple contents (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- multipleContentsLegacyUrl,
+ multipleContentsLegacyUrl
).then(expectRenderMultipleContents);
});
it("renders multiple contents (legacy with 'content')", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- multipleContentsLegacyWithContentUrl,
+ multipleContentsLegacyWithContentUrl
).then(expectRenderMultipleContents);
});
@@ -335,7 +335,7 @@ describe(
});
});
return Cesium3DTilesTester.loadTileset(scene, multipleContentsUrl).then(
- expectRenderMultipleContents,
+ expectRenderMultipleContents
);
});
@@ -355,7 +355,7 @@ describe(
});
return Cesium3DTilesTester.loadTileset(
scene,
- multipleContentsLegacyUrl,
+ multipleContentsLegacyUrl
).then(expectRenderMultipleContents);
});
@@ -373,9 +373,9 @@ describe(
function () {
// the content should be canceled once in total
expect(multipleContents._cancelCount).toBe(1);
- },
+ }
);
- },
+ }
);
});
@@ -433,7 +433,7 @@ describe(
function (tileset) {
const content = tileset.root.content;
expect(content.group).not.toBeDefined();
- },
+ }
);
});
@@ -446,14 +446,14 @@ describe(
metadata: groupMetadata,
});
}).toThrowDeveloperError();
- },
+ }
);
});
it("initializes group metadata for inner contents", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- withGroupMetadataUrl,
+ withGroupMetadataUrl
).then(function (tileset) {
const multipleContents = tileset.root.content;
const innerContents = multipleContents.innerContents;
@@ -462,7 +462,7 @@ describe(
let groupMetadata = buildingsContent.group.metadata;
expect(groupMetadata).toBeDefined();
expect(groupMetadata.getProperty("color")).toEqual(
- new Cartesian3(255, 127, 0),
+ new Cartesian3(255, 127, 0)
);
expect(groupMetadata.getProperty("priority")).toBe(10);
expect(groupMetadata.getProperty("isInstanced")).toBe(false);
@@ -471,7 +471,7 @@ describe(
groupMetadata = cubesContent.group.metadata;
expect(groupMetadata).toBeDefined();
expect(groupMetadata.getProperty("color")).toEqual(
- new Cartesian3(0, 255, 127),
+ new Cartesian3(0, 255, 127)
);
expect(groupMetadata.getProperty("priority")).toBe(5);
expect(groupMetadata.getProperty("isInstanced")).toBe(true);
@@ -481,7 +481,7 @@ describe(
it("initializes group metadata for inner contents (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- withGroupMetadataLegacyUrl,
+ withGroupMetadataLegacyUrl
).then(function (tileset) {
const multipleContents = tileset.root.content;
const innerContents = multipleContents.innerContents;
@@ -490,7 +490,7 @@ describe(
let groupMetadata = buildingsContent.group.metadata;
expect(groupMetadata).toBeDefined();
expect(groupMetadata.getProperty("color")).toEqual(
- new Cartesian3(255, 127, 0),
+ new Cartesian3(255, 127, 0)
);
expect(groupMetadata.getProperty("priority")).toBe(10);
expect(groupMetadata.getProperty("isInstanced")).toBe(false);
@@ -499,7 +499,7 @@ describe(
groupMetadata = cubesContent.group.metadata;
expect(groupMetadata).toBeDefined();
expect(groupMetadata.getProperty("color")).toEqual(
- new Cartesian3(0, 255, 127),
+ new Cartesian3(0, 255, 127)
);
expect(groupMetadata.getProperty("priority")).toBe(5);
expect(groupMetadata.getProperty("isInstanced")).toBe(true);
@@ -511,7 +511,7 @@ describe(
function (tileset) {
const content = tileset.root.content;
expect(content.metadata).not.toBeDefined();
- },
+ }
);
});
@@ -522,14 +522,14 @@ describe(
const content = tileset.root.content;
content.metadata = {};
}).toThrowDeveloperError();
- },
+ }
);
});
it("initializes explicit content metadata for inner contents", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- withExplicitContentMetadataUrl,
+ withExplicitContentMetadataUrl
).then(function (tileset) {
const multipleContents = tileset.root.content;
const innerContents = multipleContents.innerContents;
@@ -538,7 +538,7 @@ describe(
const batchedMetadata = batchedContent.metadata;
expect(batchedMetadata).toBeDefined();
expect(batchedMetadata.getProperty("highlightColor")).toEqual(
- new Cartesian3(0, 0, 255),
+ new Cartesian3(0, 0, 255)
);
expect(batchedMetadata.getProperty("author")).toEqual("Cesium");
@@ -546,10 +546,10 @@ describe(
const instancedMetadata = instancedContent.metadata;
expect(instancedMetadata).toBeDefined();
expect(instancedMetadata.getProperty("numberOfInstances")).toEqual(
- 50,
+ 50
);
expect(instancedMetadata.getProperty("author")).toEqual(
- "Sample Author",
+ "Sample Author"
);
});
});
@@ -557,7 +557,7 @@ describe(
it("initializes explicit content metadata for inner contents (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- withExplicitContentMetadataLegacyUrl,
+ withExplicitContentMetadataLegacyUrl
).then(function (tileset) {
const multipleContents = tileset.root.content;
const innerContents = multipleContents.innerContents;
@@ -566,7 +566,7 @@ describe(
const batchedMetadata = batchedContent.metadata;
expect(batchedMetadata).toBeDefined();
expect(batchedMetadata.getProperty("highlightColor")).toEqual(
- new Cartesian3(0, 0, 255),
+ new Cartesian3(0, 0, 255)
);
expect(batchedMetadata.getProperty("author")).toEqual("Cesium");
@@ -574,10 +574,10 @@ describe(
const instancedMetadata = instancedContent.metadata;
expect(instancedMetadata).toBeDefined();
expect(instancedMetadata.getProperty("numberOfInstances")).toEqual(
- 50,
+ 50
);
expect(instancedMetadata.getProperty("author")).toEqual(
- "Sample Author",
+ "Sample Author"
);
});
});
@@ -585,7 +585,7 @@ describe(
it("initializes implicit content metadata for inner contents", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- withImplicitContentMetadataUrl,
+ withImplicitContentMetadataUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
const subtreeRootTile = placeholderTile.children[0];
@@ -601,7 +601,7 @@ describe(
expect(buildingMetadata).toBeDefined();
expect(buildingMetadata.getProperty("height")).toEqual(50);
expect(buildingMetadata.getProperty("color")).toEqual(
- new Cartesian3(0, 0, 255),
+ new Cartesian3(0, 0, 255)
);
const treeContent = innerContents[1];
@@ -614,7 +614,7 @@ describe(
it("initializes implicit content metadata for inner contents (legacy)", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- withImplicitContentMetadataLegacyUrl,
+ withImplicitContentMetadataLegacyUrl
).then(function (tileset) {
const placeholderTile = tileset.root;
const subtreeRootTile = placeholderTile.children[0];
@@ -630,7 +630,7 @@ describe(
expect(buildingMetadata).toBeDefined();
expect(buildingMetadata.getProperty("height")).toEqual(50);
expect(buildingMetadata.getProperty("color")).toEqual(
- new Cartesian3(0, 0, 255),
+ new Cartesian3(0, 0, 255)
);
const treeContent = innerContents[1];
@@ -641,5 +641,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/OpenStreetMapImageryProviderSpec.js b/packages/engine/Specs/Scene/OpenStreetMapImageryProviderSpec.js
index 238e58b117cf..b097f2c020e1 100644
--- a/packages/engine/Specs/Scene/OpenStreetMapImageryProviderSpec.js
+++ b/packages/engine/Specs/Scene/OpenStreetMapImageryProviderSpec.js
@@ -46,18 +46,20 @@ describe("Scene/OpenStreetMapImageryProvider", function () {
url: resource,
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).not.toContain("//");
-
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).not.toContain("//");
+
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -70,18 +72,20 @@ describe("Scene/OpenStreetMapImageryProvider", function () {
url: "made/up/osm/server/",
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).not.toContain("//");
-
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).not.toContain("//");
+
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -94,18 +98,20 @@ describe("Scene/OpenStreetMapImageryProvider", function () {
url: "made/up/osm/server",
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toContain("made/up/osm/server/");
-
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toContain("made/up/osm/server/");
+
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -125,16 +131,18 @@ describe("Scene/OpenStreetMapImageryProvider", function () {
expect(provider.tilingScheme).toBeInstanceOf(WebMercatorTilingScheme);
expect(provider.rectangle).toEqual(new WebMercatorTilingScheme().rectangle);
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -170,34 +178,36 @@ describe("Scene/OpenStreetMapImageryProvider", function () {
expect(provider.tilingScheme).toBeInstanceOf(WebMercatorTilingScheme);
expect(provider.rectangle.west).toBeCloseTo(
rectangle.west,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(provider.rectangle.south).toBeCloseTo(
rectangle.south,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(provider.rectangle.east).toBeCloseTo(
rectangle.east,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(provider.rectangle.north).toBeCloseTo(
rectangle.north,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(provider.tileDiscardPolicy).toBeUndefined();
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toContain("/0/0/0");
-
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toContain("/0/0/0");
+
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -227,18 +237,20 @@ describe("Scene/OpenStreetMapImageryProvider", function () {
retinaTiles: true,
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toContain("0/0/0@2x.png");
-
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toContain("0/0/0@2x.png");
+
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
const image = await provider.requestImage(0, 0, 0);
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -267,14 +279,14 @@ describe("Scene/OpenStreetMapImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
if (tries === 2) {
// Succeed after 2 tries
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
} else {
// fail
@@ -303,7 +315,7 @@ describe("Scene/OpenStreetMapImageryProvider", function () {
0.0,
0.0,
CesiumMath.toRadians(1.0),
- CesiumMath.toRadians(1.0),
+ CesiumMath.toRadians(1.0)
);
expect(function () {
diff --git a/packages/engine/Specs/Scene/ParticleSpec.js b/packages/engine/Specs/Scene/ParticleSpec.js
index 5b25e9c092bd..2a7a27462337 100644
--- a/packages/engine/Specs/Scene/ParticleSpec.js
+++ b/packages/engine/Specs/Scene/ParticleSpec.js
@@ -45,7 +45,7 @@ describe("Scene/Particle", function () {
const position = new Cartesian3(1.0, 2.0, 3.0);
const velocity = Cartesian3.normalize(
new Cartesian3(-1.0, 1.0, 1.0),
- new Cartesian3(),
+ new Cartesian3()
);
const p = new Particle({
life: 15.0,
@@ -57,7 +57,7 @@ describe("Scene/Particle", function () {
const expectedPosition = Cartesian3.add(
p.position,
Cartesian3.multiplyByScalar(p.velocity, dt, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
expect(p.update(dt)).toEqual(true);
@@ -77,7 +77,7 @@ describe("Scene/Particle", function () {
const position = new Cartesian3(1.0, 2.0, 3.0);
const velocity = Cartesian3.normalize(
new Cartesian3(-1.0, 1.0, 1.0),
- new Cartesian3(),
+ new Cartesian3()
);
const p = new Particle({
life: 15.0,
@@ -90,7 +90,7 @@ describe("Scene/Particle", function () {
const expectedPosition = Cartesian3.add(
p.position,
Cartesian3.multiplyByScalar(p.velocity, dt, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
expect(p.update(dt, forces)).toEqual(true);
diff --git a/packages/engine/Specs/Scene/ParticleSystemSpec.js b/packages/engine/Specs/Scene/ParticleSystemSpec.js
index fa38951f7125..288934593706 100644
--- a/packages/engine/Specs/Scene/ParticleSystemSpec.js
+++ b/packages/engine/Specs/Scene/ParticleSystemSpec.js
@@ -18,11 +18,11 @@ describe("Scene/ParticleSystem", function () {
beforeAll(function () {
scene = createScene();
- return Resource.fetchImage("./Data/Images/Green2x2.png").then(
- function (result) {
- greenImage = result;
- },
- );
+ return Resource.fetchImage("./Data/Images/Green2x2.png").then(function (
+ result
+ ) {
+ greenImage = result;
+ });
});
afterAll(function () {
@@ -77,7 +77,7 @@ describe("Scene/ParticleSystem", function () {
15.0,
16.0,
17.0,
- 18.0,
+ 18.0
),
startColor: Color.MAGENTA,
endColor: Color.LAVENDAR_BLUSH,
@@ -143,7 +143,7 @@ describe("Scene/ParticleSystem", function () {
6.0,
7.0,
8.0,
- 9.0,
+ 9.0
);
const emitterModelMatrix = new Matrix4(
10.0,
@@ -154,7 +154,7 @@ describe("Scene/ParticleSystem", function () {
15.0,
16.0,
17.0,
- 18.0,
+ 18.0
);
const startColor = Color.MAGENTA;
const endColor = Color.LAVENDAR_BLUSH;
@@ -372,7 +372,7 @@ describe("Scene/ParticleSystem", function () {
emitter: new CircleEmitter(1.0),
emissionRate: 10000,
imageSize: new Cartesian2(100, 100),
- }),
+ })
);
scene.camera.position = new Cartesian3(0.0, 0.0, 20.0);
scene.camera.direction = new Cartesian3(0.0, 0.0, -1.0);
diff --git a/packages/engine/Specs/Scene/PerInstanceColorAppearanceSpec.js b/packages/engine/Specs/Scene/PerInstanceColorAppearanceSpec.js
index 9f9e8207c87e..663913967c99 100644
--- a/packages/engine/Specs/Scene/PerInstanceColorAppearanceSpec.js
+++ b/packages/engine/Specs/Scene/PerInstanceColorAppearanceSpec.js
@@ -55,7 +55,7 @@ describe(
expect(a.vertexShaderSource).toBeDefined();
expect(a.fragmentShaderSource).toBeDefined();
expect(a.renderState).toEqual(
- Appearance.getDefaultRenderState(true, false),
+ Appearance.getDefaultRenderState(true, false)
);
expect(a.vertexFormat).toEqual(PerInstanceColorAppearance.VERTEX_FORMAT);
expect(a.flat).toEqual(false);
@@ -86,5 +86,5 @@ describe(
expect(scene).notToRender([0, 0, 0, 255]);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/PickingSpec.js b/packages/engine/Specs/Scene/PickingSpec.js
index 42b4bdc401c7..362fb4ca53b6 100644
--- a/packages/engine/Specs/Scene/PickingSpec.js
+++ b/packages/engine/Specs/Scene/PickingSpec.js
@@ -44,13 +44,13 @@ describe(
-0.0001,
-0.0001,
0.0001,
- 0.0001,
+ 0.0001
);
const offscreenRectangle = Rectangle.fromDegrees(
-45.0002,
-1.0002,
-45.0001,
- -1.0001,
+ -1.0001
);
let primitiveRay;
let offscreenRay;
@@ -145,7 +145,7 @@ describe(
const tileset = await Cesium3DTilesTester.loadTileset(
scene,
url,
- options,
+ options
);
// The tilesets used in these tests have transforms that are not
// what we want for our camera setup. Re-position the tileset
@@ -243,14 +243,15 @@ describe(
});
it("picks a voxel coordinate from a VoxelPrimitive", async function () {
- const provider =
- await Cesium3DTilesVoxelProvider.fromUrl(voxelTilesetUrl);
+ const provider = await Cesium3DTilesVoxelProvider.fromUrl(
+ voxelTilesetUrl
+ );
const primitive = new VoxelPrimitive({ provider });
scene.primitives.add(primitive);
scene.renderForSpecs();
const voxelCoordinate = scene._picking.pickVoxelCoordinate(
scene,
- new Cartesian2(0, 0),
+ new Cartesian2(0, 0)
);
expect(voxelCoordinate).toEqual(new Uint8Array(4));
});
@@ -264,10 +265,11 @@ describe(
});
it("picks a voxel cell from a VoxelPrimitive", async function () {
- const provider =
- await Cesium3DTilesVoxelProvider.fromUrl(voxelTilesetUrl);
+ const provider = await Cesium3DTilesVoxelProvider.fromUrl(
+ voxelTilesetUrl
+ );
const modelMatrix = Matrix4.fromUniformScale(
- Ellipsoid.WGS84.maximumRadius,
+ Ellipsoid.WGS84.maximumRadius
);
const primitive = new VoxelPrimitive({ provider, modelMatrix });
scene.primitives.add(primitive);
@@ -383,7 +385,7 @@ describe(
geometryInstances: [instance1, instance2, instance3],
asynchronous: false,
appearance: new EllipsoidSurfaceAppearance(),
- }),
+ })
);
expect(scene).toDrillPickAndCall(function (pickedObjects) {
@@ -421,7 +423,7 @@ describe(
geometryInstances: [instance1, instance2],
asynchronous: false,
appearance: new EllipsoidSurfaceAppearance(),
- }),
+ })
);
expect(scene).toDrillPickAndCall(function (pickedObjects) {
@@ -465,7 +467,7 @@ describe(
geometryInstances: [instance1, instance2, instance3],
asynchronous: false,
appearance: new EllipsoidSurfaceAppearance(),
- }),
+ })
);
expect(scene).toDrillPickAndCall(function (pickedObjects) {
@@ -531,7 +533,7 @@ describe(
expect(result.object).toBeUndefined();
expect(result.position).toBeDefined();
expect(result.position.x).toBeGreaterThan(
- Ellipsoid.WGS84.minimumRadius,
+ Ellipsoid.WGS84.minimumRadius
);
expect(result.position.y).toEqualEpsilon(0.0, CesiumMath.EPSILON5);
expect(result.position.z).toEqualEpsilon(0.0, CesiumMath.EPSILON5);
@@ -550,7 +552,7 @@ describe(
const expectedPosition = Cartesian3.fromRadians(0.0, 0.0);
expect(position).toEqualEpsilon(
expectedPosition,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
}
}, primitiveRay);
@@ -599,7 +601,7 @@ describe(
expect(result.object.primitive).toBe(rectangle1);
},
primitiveRay,
- [rectangle2, rectangle3, rectangle4],
+ [rectangle2, rectangle3, rectangle4]
);
// Tests that rectangle4 does not get un-hidden
@@ -621,7 +623,7 @@ describe(
},
primitiveRay,
[],
- 0.01,
+ 0.01
);
});
@@ -633,7 +635,7 @@ describe(
},
primitiveRay,
[],
- 0.1,
+ 0.1
);
expect(scene).toPickFromRayAndCall(
function (result) {
@@ -641,7 +643,7 @@ describe(
},
primitiveRay,
[],
- 1.0,
+ 1.0
);
});
@@ -681,7 +683,7 @@ describe(
const expectedPosition = Cartesian3.fromRadians(0.0, 0.0);
expect(position).toEqualEpsilon(
expectedPosition,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
} else {
expect(position).toBeUndefined();
@@ -704,11 +706,11 @@ describe(
const rectangleCenter2 = Cartesian3.fromRadians(0.0, 0.0, 1.0);
expect(results[0].position).toEqualEpsilon(
rectangleCenter2,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
expect(results[1].position).toEqualEpsilon(
rectangleCenter1,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
} else {
expect(results[0].position).toBeUndefined();
@@ -789,7 +791,7 @@ describe(
geometryInstances: [instance1, instance2, instance3],
asynchronous: false,
appearance: new EllipsoidSurfaceAppearance(),
- }),
+ })
);
expect(scene).toDrillPickFromRayAndCall(function (results) {
@@ -827,7 +829,7 @@ describe(
geometryInstances: [instance1, instance2],
asynchronous: false,
appearance: new EllipsoidSurfaceAppearance(),
- }),
+ })
);
expect(scene).toDrillPickFromRayAndCall(function (results) {
@@ -871,7 +873,7 @@ describe(
geometryInstances: [instance1, instance2, instance3],
asynchronous: false,
appearance: new EllipsoidSurfaceAppearance(),
- }),
+ })
);
expect(scene).toDrillPickFromRayAndCall(function (results) {
@@ -895,7 +897,7 @@ describe(
expect(results[2].object.primitive).toEqual(rectangle2);
},
primitiveRay,
- 3,
+ 3
);
});
@@ -913,7 +915,7 @@ describe(
},
primitiveRay,
2,
- [rectangle5, rectangle3],
+ [rectangle5, rectangle3]
);
});
@@ -925,7 +927,7 @@ describe(
},
primitiveRay,
[],
- 0.1,
+ 0.1
);
expect(scene).toDrillPickFromRayAndCall(
function (result) {
@@ -934,7 +936,7 @@ describe(
primitiveRay,
Number.POSITIVE_INFINITY,
[],
- 1.0,
+ 1.0
);
});
@@ -1036,7 +1038,7 @@ describe(
expect(height).toEqualEpsilon(0.0, CesiumMath.EPSILON3);
},
cartographic,
- [rectangle2, rectangle3],
+ [rectangle2, rectangle3]
);
});
@@ -1081,7 +1083,7 @@ describe(
},
cartographic,
[],
- 0.1,
+ 0.1
);
expect(scene).toSampleHeightAndCall(
function (height) {
@@ -1089,7 +1091,7 @@ describe(
},
cartographic,
[],
- 1.0,
+ 1.0
);
});
@@ -1186,7 +1188,7 @@ describe(
const expectedCartesian = Cartesian3.fromRadians(0.0, 0.0);
expect(cartesian).toEqualEpsilon(
expectedCartesian,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
}, cartesian);
});
@@ -1203,7 +1205,7 @@ describe(
const expectedCartesian = Cartesian3.fromRadians(0.0, 0.0, 1.0);
expect(cartesian).toEqualEpsilon(
expectedCartesian,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
}, cartesian);
});
@@ -1234,11 +1236,11 @@ describe(
const expectedCartesian = Cartesian3.fromRadians(0.0, 0.0);
expect(cartesian).toEqualEpsilon(
expectedCartesian,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
},
cartesian,
- [rectangle2, rectangle3],
+ [rectangle2, rectangle3]
);
});
@@ -1257,7 +1259,7 @@ describe(
expect(scene).toClampToHeightAndCall(function (clampedCartesian) {
expect(clampedCartesian).toEqualEpsilon(
cartesian,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
}, cartesian);
@@ -1265,7 +1267,7 @@ describe(
expect(scene).toClampToHeightAndCall(function (clampedCartesian) {
expect(clampedCartesian).toEqualEpsilon(
cartesian,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
}, cartesian);
@@ -1288,7 +1290,7 @@ describe(
},
cartesian,
[],
- 0.1,
+ 0.1
);
expect(scene).toClampToHeightAndCall(
function (clampedCartesian) {
@@ -1296,7 +1298,7 @@ describe(
},
cartesian,
[],
- 1.0,
+ 1.0
);
});
@@ -1456,7 +1458,7 @@ describe(
const objectsToExclude = [tileset];
const result = await pickFromRayMostDetailed(
primitiveRay,
- objectsToExclude,
+ objectsToExclude
);
expect(result).toBeUndefined();
});
@@ -1488,7 +1490,7 @@ describe(
const expectedPosition = Cartesian3.fromRadians(0.0, 0.0);
expect(position).toEqualEpsilon(
expectedPosition,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
}
});
@@ -1602,7 +1604,7 @@ describe(
const expectedPosition = Cartesian3.fromRadians(0.0, 0.0);
expect(position).toEqualEpsilon(
expectedPosition,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
} else {
expect(position).toBeUndefined();
@@ -1628,11 +1630,11 @@ describe(
const rectangleCenter2 = Cartesian3.fromRadians(0.0, 0.0, 1.0);
expect(results[0].position).toEqualEpsilon(
rectangleCenter2,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
expect(results[1].position).toEqualEpsilon(
rectangleCenter1,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
} else {
expect(results[0].position).toBeUndefined();
@@ -1724,7 +1726,7 @@ describe(
geometryInstances: [instance1, instance2, instance3],
asynchronous: false,
appearance: new EllipsoidSurfaceAppearance(),
- }),
+ })
);
scene.camera.setView({ destination: offscreenRectangle });
@@ -1765,7 +1767,7 @@ describe(
geometryInstances: [instance1, instance2],
asynchronous: false,
appearance: new EllipsoidSurfaceAppearance(),
- }),
+ })
);
scene.camera.setView({ destination: offscreenRectangle });
@@ -1812,7 +1814,7 @@ describe(
geometryInstances: [instance1, instance2, instance3],
asynchronous: false,
appearance: new EllipsoidSurfaceAppearance(),
- }),
+ })
);
scene.camera.setView({ destination: offscreenRectangle });
@@ -1867,14 +1869,14 @@ describe(
primitiveRay,
1,
[],
- 0.1,
+ 0.1
);
expect(result1.length).toBe(0);
const result2 = await drillPickFromRayMostDetailed(
primitiveRay,
1,
[],
- 1.0,
+ 1.0
);
expect(result2.length).toBe(1);
});
@@ -1908,8 +1910,9 @@ describe(
const cartographics = [new Cartographic(0.0, 0.0)];
await createTileset(batchedTilesetUrl);
- const updatedCartographics =
- await sampleHeightMostDetailed(cartographics);
+ const updatedCartographics = await sampleHeightMostDetailed(
+ cartographics
+ );
const height = updatedCartographics[0].height;
expect(height).toBeGreaterThan(0.0);
expect(height).toBeLessThan(20.0); // Rough height of tile
@@ -1931,8 +1934,9 @@ describe(
new Cartographic(0.0002, 0.0002),
];
await createGlobe();
- const updatedCartographics =
- await sampleHeightMostDetailed(cartographics);
+ const updatedCartographics = await sampleHeightMostDetailed(
+ cartographics
+ );
expect(updatedCartographics).toBe(cartographics);
expect(updatedCartographics.length).toBe(3);
let previousHeight;
@@ -1956,8 +1960,9 @@ describe(
const cartographics = [new Cartographic(0.0, 0.0)];
scene.camera.setView({ destination: offscreenRectangle });
await createGlobe();
- const updatedCartographics =
- await sampleHeightMostDetailed(cartographics);
+ const updatedCartographics = await sampleHeightMostDetailed(
+ cartographics
+ );
expect(updatedCartographics[0].height).toBeUndefined();
});
@@ -1975,8 +1980,9 @@ describe(
new Cartographic(-2.0, -2.0),
];
scene.camera.setView({ destination: offscreenRectangle });
- const updatedCartographics =
- await sampleHeightMostDetailed(cartographics);
+ const updatedCartographics = await sampleHeightMostDetailed(
+ cartographics
+ );
expect(updatedCartographics[0].height).toBeDefined();
expect(updatedCartographics[1].height).toBeDefined();
expect(updatedCartographics[2].height).toBeUndefined(); // No primitive occupies this space
@@ -1994,8 +2000,9 @@ describe(
new Cartographic(0.0000005, 0.0000005),
];
scene.camera.setView({ destination: offscreenRectangle });
- const updatedCartographics =
- await sampleHeightMostDetailed(cartographics);
+ const updatedCartographics = await sampleHeightMostDetailed(
+ cartographics
+ );
let previousHeight;
for (let i = 0; i < 3; ++i) {
const height = updatedCartographics[i].height;
@@ -2013,11 +2020,12 @@ describe(
createSmallRectangle(1.0);
const cartographics = [new Cartographic(0.0, 0.0)];
scene.camera.setView({ destination: offscreenRectangle });
- const updatedCartographics =
- await sampleHeightMostDetailed(cartographics);
+ const updatedCartographics = await sampleHeightMostDetailed(
+ cartographics
+ );
expect(updatedCartographics[0].height).toEqualEpsilon(
1.0,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
});
@@ -2038,12 +2046,12 @@ describe(
scene.camera.setView({ destination: offscreenRectangle });
const updatedCartographics = await sampleHeightMostDetailed(
cartographics,
- [rectangle1, rectangle3],
+ [rectangle1, rectangle3]
);
expect(updatedCartographics[0].height).toBeUndefined(); // This rectangle was excluded
expect(updatedCartographics[1].height).toEqualEpsilon(
0.0,
- CesiumMath.EPSILON2,
+ CesiumMath.EPSILON2
);
expect(updatedCartographics[2].height).toBeUndefined(); // No primitive occupies this space
});
@@ -2063,17 +2071,18 @@ describe(
});
scene.camera.setView({ destination: offscreenRectangle });
- let updatedCartographics =
- await sampleHeightMostDetailed(cartographics);
+ let updatedCartographics = await sampleHeightMostDetailed(
+ cartographics
+ );
expect(updatedCartographics[0].height).toEqualEpsilon(
height,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
point.disableDepthTestDistance = Number.POSITIVE_INFINITY;
updatedCartographics = await sampleHeightMostDetailed(cartographics);
expect(updatedCartographics[0].height).toEqualEpsilon(
0.0,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
rectangle.show = false;
updatedCartographics = await sampleHeightMostDetailed(cartographics);
@@ -2091,13 +2100,13 @@ describe(
const updatedCartographics1 = await sampleHeightMostDetailed(
cartographics1,
[],
- 0.1,
+ 0.1
);
expect(updatedCartographics1[0].height).toBeUndefined();
const updatedCartographics2 = await sampleHeightMostDetailed(
cartographics2,
[],
- 1.0,
+ 1.0
);
expect(updatedCartographics2[0].height).toBeDefined();
});
@@ -2108,8 +2117,9 @@ describe(
}
const cartographics = [];
- const updatedCartographics =
- await sampleHeightMostDetailed(cartographics);
+ const updatedCartographics = await sampleHeightMostDetailed(
+ cartographics
+ );
expect(updatedCartographics.length).toBe(0);
});
@@ -2264,7 +2274,7 @@ describe(
for (let i = 0; i < 3; ++i) {
expect(updatedCartesians[i]).toEqualEpsilon(
expectedCartesians[i],
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
expect(updatedCartesians[i]).not.toEqual(previousCartesian);
previousCartesian = updatedCartesians[i];
@@ -2283,7 +2293,7 @@ describe(
const expectedCartesian = Cartesian3.fromRadians(0.0, 0.0, 1.0);
expect(updatedCartesians[0]).toEqualEpsilon(
expectedCartesian,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
});
@@ -2307,12 +2317,12 @@ describe(
rectangle3,
]);
const expectedCartesian = Cartographic.toCartesian(
- Rectangle.center(offscreenRectangle),
+ Rectangle.center(offscreenRectangle)
);
expect(updatedCartesians[0]).toBeUndefined(); // This rectangle was excluded
expect(updatedCartesians[1]).toEqualEpsilon(
expectedCartesian,
- CesiumMath.EPSILON2,
+ CesiumMath.EPSILON2
);
expect(updatedCartesians[2]).toBeUndefined(); // No primitive occupies this space
});
@@ -2338,13 +2348,13 @@ describe(
let updatedCartesians = await clampToHeightMostDetailed(cartesians1);
expect(updatedCartesians[0]).toEqualEpsilon(
cartesian,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
point.disableDepthTestDistance = Number.POSITIVE_INFINITY;
updatedCartesians = await clampToHeightMostDetailed(cartesians2);
expect(updatedCartesians[0]).toEqualEpsilon(
cartesian,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
rectangle.show = false;
updatedCartesians = await clampToHeightMostDetailed(cartesians3);
@@ -2363,13 +2373,13 @@ describe(
const clampedCartesians1 = await clampToHeightMostDetailed(
cartesians1,
[],
- 0.1,
+ 0.1
);
expect(clampedCartesians1[0]).toBeUndefined();
const clampedCartesians2 = await clampToHeightMostDetailed(
cartesians2,
[],
- 1.0,
+ 1.0
);
expect(clampedCartesians2[0]).toBeDefined();
});
@@ -2444,10 +2454,14 @@ describe(
createSmallRectangle(0.0);
const offscreenRectanglePrimitive = createRectangle(
0.0,
- offscreenRectangle,
+ offscreenRectangle
+ );
+ offscreenRectanglePrimitive.appearance.material.uniforms.color = new Color(
+ 1.0,
+ 0.0,
+ 0.0,
+ 1.0
);
- offscreenRectanglePrimitive.appearance.material.uniforms.color =
- new Color(1.0, 0.0, 0.0, 1.0);
scene.camera.setView({ destination: offscreenRectangle });
@@ -2464,18 +2478,18 @@ describe(
const expectedCartesian = Cartesian3.fromRadians(0.0, 0.0);
expect(cartesian).toEqualEpsilon(
expectedCartesian,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
}, cartesian);
// Call pickPosition
expect(scene).toPickPositionAndCall(function (cartesian) {
const expectedCartesian = Cartographic.toCartesian(
- Rectangle.center(offscreenRectangle),
+ Rectangle.center(offscreenRectangle)
);
expect(cartesian).toEqualEpsilon(
expectedCartesian,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
});
@@ -2484,7 +2498,7 @@ describe(
const expectedCartesian = Cartesian3.fromRadians(0.0, 0.0);
expect(cartesian).toEqualEpsilon(
expectedCartesian,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
}, cartesian);
@@ -2496,13 +2510,17 @@ describe(
const expectedCartesian = Cartesian3.fromRadians(0.0, 0.0);
expect(cartesian).toEqualEpsilon(
expectedCartesian,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
}, cartesian);
// Call pickPosition on translucent primitive and returns undefined
- offscreenRectanglePrimitive.appearance.material.uniforms.color =
- new Color(1.0, 0.0, 0.0, 0.5);
+ offscreenRectanglePrimitive.appearance.material.uniforms.color = new Color(
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.5
+ );
scene.renderForSpecs();
expect(scene).toPickPositionAndCall(function (cartesian) {
expect(cartesian).toBeUndefined();
@@ -2513,7 +2531,7 @@ describe(
const expectedCartesian = Cartesian3.fromRadians(0.0, 0.0);
expect(cartesian).toEqualEpsilon(
expectedCartesian,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
}, cartesian);
@@ -2522,11 +2540,11 @@ describe(
scene.renderForSpecs();
expect(scene).toPickPositionAndCall(function (cartesian) {
const expectedCartesian = Cartographic.toCartesian(
- Rectangle.center(offscreenRectangle),
+ Rectangle.center(offscreenRectangle)
);
expect(cartesian).toEqualEpsilon(
expectedCartesian,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
});
@@ -2551,7 +2569,7 @@ describe(
const expectedCartesian = Cartesian3.fromRadians(0.0, 0.0);
expect(cartesian).toEqualEpsilon(
expectedCartesian,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
}, cartesian);
@@ -2565,5 +2583,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/PointCloudEyeDomeLightingSpec.js b/packages/engine/Specs/Scene/PointCloudEyeDomeLightingSpec.js
index ae47e5ee4d37..7668c5c4d02c 100644
--- a/packages/engine/Specs/Scene/PointCloudEyeDomeLightingSpec.js
+++ b/packages/engine/Specs/Scene/PointCloudEyeDomeLightingSpec.js
@@ -64,7 +64,7 @@ describe(
scene.renderForSpecs();
const newLength = scene.frameState.commandList.length;
expect(newLength).toEqual(originalLength + 2);
- },
+ }
);
});
@@ -84,7 +84,7 @@ describe(
scene.pickForSpecs();
const newLength = scene.frameState.commandList.length;
expect(newLength).toEqual(originalLength);
- },
+ }
);
});
@@ -118,9 +118,9 @@ describe(
scene.renderForSpecs();
expect(scene.frameState.commandList.length).toBe(3);
- },
+ }
);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/PointCloudShadingSpec.js b/packages/engine/Specs/Scene/PointCloudShadingSpec.js
index 32b47597051e..134de14ba7a5 100644
--- a/packages/engine/Specs/Scene/PointCloudShadingSpec.js
+++ b/packages/engine/Specs/Scene/PointCloudShadingSpec.js
@@ -26,18 +26,18 @@ describe("Scene/PointCloudShading", function () {
pointCloudShading = new PointCloudShading(options);
expect(pointCloudShading.attenuation).toEqual(false);
expect(pointCloudShading.geometricErrorScale).toEqual(
- options.geometricErrorScale,
+ options.geometricErrorScale
);
expect(pointCloudShading.maximumAttenuation).toEqual(
- options.maximumAttenuation,
+ options.maximumAttenuation
);
expect(pointCloudShading.baseResolution).toEqual(options.baseResolution);
expect(pointCloudShading.eyeDomeLighting).toEqual(true);
expect(pointCloudShading.eyeDomeLightingStrength).toEqual(
- options.eyeDomeLightingStrength,
+ options.eyeDomeLightingStrength
);
expect(pointCloudShading.eyeDomeLightingRadius).toEqual(
- options.eyeDomeLightingRadius,
+ options.eyeDomeLightingRadius
);
expect(pointCloudShading.backFaceCulling).toEqual(options.backFaceCulling);
expect(pointCloudShading.normalShading).toEqual(options.normalShading);
diff --git a/packages/engine/Specs/Scene/PointPrimitiveCollectionSpec.js b/packages/engine/Specs/Scene/PointPrimitiveCollectionSpec.js
index 036b44416502..def2b35abfa9 100644
--- a/packages/engine/Specs/Scene/PointPrimitiveCollectionSpec.js
+++ b/packages/engine/Specs/Scene/PointPrimitiveCollectionSpec.js
@@ -113,13 +113,13 @@ describe(
expect(p.outlineColor.alpha).toEqual(0.8);
expect(p.outlineWidth).toEqual(4.0);
expect(p.scaleByDistance).toEqual(
- new NearFarScalar(1.0, 3.0, 1.0e6, 0.0),
+ new NearFarScalar(1.0, 3.0, 1.0e6, 0.0)
);
expect(p.translucencyByDistance).toEqual(
- new NearFarScalar(1.0, 1.0, 1.0e6, 0.0),
+ new NearFarScalar(1.0, 1.0, 1.0e6, 0.0)
);
expect(p.distanceDisplayCondition).toEqual(
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
expect(p.disableDepthTestDistance).toEqual(10.0);
expect(p.id).toEqual("id");
@@ -153,13 +153,13 @@ describe(
expect(p.outlineColor.alpha).toEqual(0.8);
expect(p.outlineWidth).toEqual(4.0);
expect(p.scaleByDistance).toEqual(
- new NearFarScalar(1.0e6, 3.0, 1.0e8, 0.0),
+ new NearFarScalar(1.0e6, 3.0, 1.0e8, 0.0)
);
expect(p.translucencyByDistance).toEqual(
- new NearFarScalar(1.0e6, 1.0, 1.0e8, 0.0),
+ new NearFarScalar(1.0e6, 1.0, 1.0e8, 0.0)
);
expect(p.distanceDisplayCondition).toEqual(
- new DistanceDisplayCondition(10.0, 100.0),
+ new DistanceDisplayCondition(10.0, 100.0)
);
expect(p.disableDepthTestDistance).toEqual(10.0);
expect(p.splitDirection).toEqual(SplitDirection.LEFT);
@@ -775,7 +775,7 @@ describe(
scene.renderForSpecs();
expect(p.computeScreenSpacePosition(scene)).toEqualEpsilon(
new Cartesian2(0.5, 0.5),
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
});
@@ -789,7 +789,7 @@ describe(
expect(actual).toEqual(result);
expect(result).toEqualEpsilon(
new Cartesian2(0.5, 0.5),
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
});
@@ -842,7 +842,7 @@ describe(
const bbox = PointPrimitive.getScreenSpaceBoundingBox(
p,
Cartesian2.ZERO,
- result,
+ result
);
expect(bbox.x).toEqual(-halfWidth);
expect(bbox.y).toEqual(-halfHeight);
@@ -940,11 +940,11 @@ describe(
expected.center = new Cartesian3(
0.0,
expected.center.x,
- expected.center.y,
+ expected.center.y
);
expect(actual.center).toEqualEpsilon(
expected.center,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(actual.radius).toBeGreaterThanOrEqual(expected.radius);
});
@@ -980,14 +980,14 @@ describe(
expected.center = new Cartesian3(
0.0,
expected.center.x,
- expected.center.y,
+ expected.center.y
);
expect(actual.center).toEqualEpsilon(
expected.center,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(actual.radius).toBeGreaterThan(expected.radius);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/PolylineCollectionSpec.js b/packages/engine/Specs/Scene/PolylineCollectionSpec.js
index 85c4b026bb8b..f237f0a4aef3 100644
--- a/packages/engine/Specs/Scene/PolylineCollectionSpec.js
+++ b/packages/engine/Specs/Scene/PolylineCollectionSpec.js
@@ -77,10 +77,10 @@ describe(
expect(p.width).toEqual(2);
expect(p.material.uniforms.color).toEqual(material.uniforms.color);
expect(p.material.uniforms.outlineColor).toEqual(
- material.uniforms.outlineColor,
+ material.uniforms.outlineColor
);
expect(p.material.uniforms.outlineWidth).toEqual(
- material.uniforms.outlineWidth,
+ material.uniforms.outlineWidth
);
expect(p.id).toEqual("id");
});
@@ -107,10 +107,10 @@ describe(
expect(p.width).toEqual(2);
expect(p.material.uniforms.color).toEqual(material.uniforms.color);
expect(p.material.uniforms.outlineColor).toEqual(
- material.uniforms.outlineColor,
+ material.uniforms.outlineColor
);
expect(p.material.uniforms.outlineWidth).toEqual(
- material.uniforms.outlineWidth,
+ material.uniforms.outlineWidth
);
});
@@ -1276,7 +1276,7 @@ describe(
x: -1000000.0,
y: -1000000.0,
z: 0.0,
- },
+ }
);
}
polylines.add({
@@ -1325,7 +1325,7 @@ describe(
x: -1000000.0,
y: -1000000.0,
z: 0.0,
- },
+ }
);
}
polylines.add({
@@ -1422,28 +1422,20 @@ describe(
new HeadingPitchRange(
0.0,
-CesiumMath.PI_OVER_TWO,
- radius + near - 10.0,
- ),
+ radius + near - 10.0
+ )
);
expect(scene).toRender([0, 0, 0, 255]);
scene.camera.lookAt(
center,
- new HeadingPitchRange(
- 0.0,
- -CesiumMath.PI_OVER_TWO,
- radius + near + 1.0,
- ),
+ new HeadingPitchRange(0.0, -CesiumMath.PI_OVER_TWO, radius + near + 1.0)
);
expect(scene).notToRender([0, 0, 0, 255]);
scene.camera.lookAt(
center,
- new HeadingPitchRange(
- 0.0,
- -CesiumMath.PI_OVER_TWO,
- radius + far + 10.0,
- ),
+ new HeadingPitchRange(0.0, -CesiumMath.PI_OVER_TWO, radius + far + 10.0)
);
expect(scene).toRender([0, 0, 0, 255]);
});
@@ -1482,28 +1474,20 @@ describe(
new HeadingPitchRange(
0.0,
-CesiumMath.PI_OVER_TWO,
- radius + near - 10.0,
- ),
+ radius + near - 10.0
+ )
);
expect(scene).toRender([0, 0, 0, 255]);
scene.camera.lookAt(
center,
- new HeadingPitchRange(
- 0.0,
- -CesiumMath.PI_OVER_TWO,
- radius + near + 1.0,
- ),
+ new HeadingPitchRange(0.0, -CesiumMath.PI_OVER_TWO, radius + near + 1.0)
);
expect(scene).notToRender([0, 0, 0, 255]);
scene.camera.lookAt(
center,
- new HeadingPitchRange(
- 0.0,
- -CesiumMath.PI_OVER_TWO,
- radius + far + 10.0,
- ),
+ new HeadingPitchRange(0.0, -CesiumMath.PI_OVER_TWO, radius + far + 10.0)
);
expect(scene).toRender([0, 0, 0, 255]);
});
@@ -1521,7 +1505,7 @@ describe(
x: 0.0,
y: -1000000.0,
z: 0.0,
- },
+ }
);
}
const p = polylines.add({
@@ -1611,7 +1595,7 @@ describe(
expect(scene).toRender([0, 0, 0, 255]);
polylines.modelMatrix = Matrix4.fromUniformScale(
1000000.0,
- polylines.modelMatrix,
+ polylines.modelMatrix
);
expect(scene).notToRender([0, 0, 0, 255]);
});
@@ -1773,19 +1757,19 @@ describe(
const boundingVolume = scene.frameState.commandList[0].boundingVolume;
expect(one._boundingVolume).toEqual(
- BoundingSphere.fromPoints(one.positions),
+ BoundingSphere.fromPoints(one.positions)
);
expect(two._boundingVolume).toEqual(
- BoundingSphere.fromPoints(two.positions),
+ BoundingSphere.fromPoints(two.positions)
);
expect(three._boundingVolume).toEqual(
- BoundingSphere.fromPoints(three.positions),
+ BoundingSphere.fromPoints(three.positions)
);
expect(boundingVolume).toEqual(
BoundingSphere.union(
BoundingSphere.union(one._boundingVolume, two._boundingVolume),
- three._boundingVolume,
- ),
+ three._boundingVolume
+ )
);
});
@@ -1809,49 +1793,49 @@ describe(
let i;
for (i = 0; i < positions.length; ++i) {
projectedPositions.push(
- projection.project(ellipsoid.cartesianToCartographic(positions[i])),
+ projection.project(ellipsoid.cartesianToCartographic(positions[i]))
);
}
let bs = BoundingSphere.fromPoints(projectedPositions);
bs.center = new Cartesian3(bs.center.z, bs.center.x, bs.center.y);
expect(one._boundingVolume2D.center).toEqualEpsilon(
bs.center,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(one._boundingVolume2D.radius).toEqualEpsilon(
bs.radius,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
positions = two.positions;
projectedPositions = [];
for (i = 0; i < positions.length; ++i) {
projectedPositions.push(
- projection.project(ellipsoid.cartesianToCartographic(positions[i])),
+ projection.project(ellipsoid.cartesianToCartographic(positions[i]))
);
}
bs = BoundingSphere.fromPoints(projectedPositions);
bs.center = new Cartesian3(bs.center.z, bs.center.x, bs.center.y);
expect(two._boundingVolume2D.center).toEqualEpsilon(
bs.center,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(two._boundingVolume2D.radius).toEqualEpsilon(
bs.radius,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
const expected = BoundingSphere.union(
one._boundingVolume2D,
- two._boundingVolume2D,
+ two._boundingVolume2D
);
expect(boundingVolume.center).toEqualEpsilon(
expected.center,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
expect(boundingVolume.radius).toEqualEpsilon(
expected.radius,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
}
@@ -1902,10 +1886,10 @@ describe(
scene.render();
expect(scene.frameState.commandList[0].boundingVolume).toEqual(
- one._boundingVolume,
+ one._boundingVolume
);
expect(scene.frameState.commandList[1].boundingVolume).toEqual(
- two._boundingVolume,
+ two._boundingVolume
);
});
@@ -1915,5 +1899,5 @@ describe(
expect(polylines.isDestroyed()).toEqual(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/PolylineColorAppearanceSpec.js b/packages/engine/Specs/Scene/PolylineColorAppearanceSpec.js
index 234a14376505..97fcc3ddb371 100644
--- a/packages/engine/Specs/Scene/PolylineColorAppearanceSpec.js
+++ b/packages/engine/Specs/Scene/PolylineColorAppearanceSpec.js
@@ -39,7 +39,7 @@ describe(
expect(a.vertexShaderSource).toBeDefined();
expect(a.fragmentShaderSource).toBeDefined();
expect(a.renderState).toEqual(
- Appearance.getDefaultRenderState(true, false),
+ Appearance.getDefaultRenderState(true, false)
);
expect(a.vertexFormat).toEqual(PolylineColorAppearance.VERTEX_FORMAT);
expect(a.translucent).toEqual(true);
@@ -60,7 +60,7 @@ describe(
}),
attributes: {
color: ColorGeometryInstanceAttribute.fromColor(
- new Color(1.0, 1.0, 0.0, 1.0),
+ new Color(1.0, 1.0, 0.0, 1.0)
),
},
}),
@@ -76,5 +76,5 @@ describe(
expect(scene).notToRender([0, 0, 0, 255]);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/PolylineMaterialAppearanceSpec.js b/packages/engine/Specs/Scene/PolylineMaterialAppearanceSpec.js
index 93200f8cd4cf..7ffae11984dc 100644
--- a/packages/engine/Specs/Scene/PolylineMaterialAppearanceSpec.js
+++ b/packages/engine/Specs/Scene/PolylineMaterialAppearanceSpec.js
@@ -39,7 +39,7 @@ describe(
expect(a.vertexShaderSource).toBeDefined();
expect(a.fragmentShaderSource).toBeDefined();
expect(a.renderState).toEqual(
- Appearance.getDefaultRenderState(true, false),
+ Appearance.getDefaultRenderState(true, false)
);
expect(a.vertexFormat).toEqual(PolylineMaterialAppearance.VERTEX_FORMAT);
expect(a.translucent).toEqual(true);
@@ -72,5 +72,5 @@ describe(
expect(scene).notToRender([0, 0, 0, 255]);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/PostProcessStageCollectionSpec.js b/packages/engine/Specs/Scene/PostProcessStageCollectionSpec.js
index 501181fccadd..20f2260bb231 100644
--- a/packages/engine/Specs/Scene/PostProcessStageCollectionSpec.js
+++ b/packages/engine/Specs/Scene/PostProcessStageCollectionSpec.js
@@ -47,7 +47,7 @@ describe(
new PostProcessStage({
fragmentShader:
"void main() { out_FragColor = vec4(1.0, 1.0, 0.0, 1.0); }",
- }),
+ })
);
expect(scene.postProcessStages.length).toEqual(1);
@@ -63,7 +63,7 @@ describe(
" vec4 color = texture(colorTexture, v_textureCoordinates);\n" +
" out_FragColor = vec4(color.r, 0.0, 1.0, 1.0);\n" +
"}",
- }),
+ })
);
expect(scene.postProcessStages.length).toEqual(2);
@@ -87,7 +87,7 @@ describe(
new PostProcessStage({
fragmentShader:
"void main() { out_FragColor = vec4(1.0, 1.0, 0.0, 1.0); }",
- }),
+ })
);
scene.renderForSpecs();
expect(scene).toRender([255, 255, 0, 255]);
@@ -104,7 +104,7 @@ describe(
new PostProcessStage({
fragmentShader:
"void main() { out_FragColor = vec4(1.0, 1.0, 0.0, 1.0); }",
- }),
+ })
);
const stage2 = scene.postProcessStages.add(
new PostProcessStage({
@@ -115,7 +115,7 @@ describe(
" vec4 color = texture(colorTexture, v_textureCoordinates);\n" +
" out_FragColor = vec4(color.r, 0.0, 1.0, 1.0);\n" +
"}",
- }),
+ })
);
expect(scene.postProcessStages.length).toEqual(2);
@@ -147,7 +147,7 @@ describe(
new PostProcessStage({
fragmentShader:
"void main() { out_FragColor = vec4(1.0, 1.0, 0.0, 1.0); }",
- }),
+ })
);
const stage2 = scene.postProcessStages.add(
new PostProcessStage({
@@ -158,7 +158,7 @@ describe(
" vec4 color = texture(colorTexture, v_textureCoordinates);\n" +
" out_FragColor = vec4(color.r, 0.0, 1.0, 1.0);\n" +
"}",
- }),
+ })
);
expect(scene.postProcessStages.length).toEqual(2);
@@ -177,7 +177,7 @@ describe(
new PostProcessStage({
fragmentShader:
"void main() { out_FragColor = vec4(1.0, 1.0, 0.0, 1.0); }",
- }),
+ })
);
expect(function () {
return scene.postProcessStages.get(-1);
@@ -194,7 +194,7 @@ describe(
new PostProcessStage({
fragmentShader:
"void main() { out_FragColor = vec4(1.0, 1.0, 0.0, 1.0); }",
- }),
+ })
);
const stage2 = scene.postProcessStages.add(
new PostProcessStage({
@@ -205,7 +205,7 @@ describe(
" vec4 color = texture(colorTexture, v_textureCoordinates);\n" +
" out_FragColor = vec4(color.r, 0.0, 1.0, 1.0);\n" +
"}",
- }),
+ })
);
expect(scene.postProcessStages.length).toEqual(2);
@@ -230,7 +230,7 @@ describe(
new PostProcessStage({
fragmentShader:
"void main() { out_FragColor = vec4(1.0, 1.0, 0.0, 1.0); }",
- }),
+ })
);
const stage2 = scene.postProcessStages.add(
new PostProcessStage({
@@ -241,17 +241,17 @@ describe(
" vec4 color = texture(colorTexture, v_textureCoordinates);\n" +
" out_FragColor = vec4(color.r, 0.0, 1.0, 1.0);\n" +
"}",
- }),
+ })
);
expect(scene.postProcessStages.getStageByName(stage1.name)).toEqual(
- stage1,
+ stage1
);
expect(scene.postProcessStages.getStageByName(stage2.name)).toEqual(
- stage2,
+ stage2
);
expect(
- scene.postProcessStages.getStageByName("invalid"),
+ scene.postProcessStages.getStageByName("invalid")
).not.toBeDefined();
});
@@ -260,7 +260,7 @@ describe(
new PostProcessStage({
fragmentShader:
"void main() { out_FragColor = vec4(1.0, 1.0, 0.0, 1.0); }",
- }),
+ })
);
const stage2 = scene.postProcessStages.add(
new PostProcessStage({
@@ -271,32 +271,32 @@ describe(
" vec4 color = texture(colorTexture, v_textureCoordinates);\n" +
" out_FragColor = vec4(color.r, 0.0, 1.0, 1.0);\n" +
"}",
- }),
+ })
);
scene.postProcessStages.fxaa.enabled = true;
scene.renderForSpecs();
expect(
- scene.postProcessStages.getOutputTexture(stage1.name),
+ scene.postProcessStages.getOutputTexture(stage1.name)
).toBeDefined();
expect(
- scene.postProcessStages.getOutputTexture(stage2.name),
+ scene.postProcessStages.getOutputTexture(stage2.name)
).toBeDefined();
expect(
scene.postProcessStages.getOutputTexture(
- scene.postProcessStages.fxaa.name,
- ),
+ scene.postProcessStages.fxaa.name
+ )
).toBeDefined();
expect(
scene.postProcessStages.getOutputTexture(
- scene.postProcessStages.fxaa.name,
- ),
+ scene.postProcessStages.fxaa.name
+ )
).toEqual(scene.postProcessStages.getOutputTexture(stage1.name));
scene.postProcessStages.remove(stage1);
expect(
- scene.postProcessStages.getOutputTexture(stage1.name),
+ scene.postProcessStages.getOutputTexture(stage1.name)
).not.toBeDefined();
});
@@ -305,7 +305,7 @@ describe(
new PostProcessStage({
fragmentShader:
"void main() { out_FragColor = vec4(1.0, 0.0, 1.0, 1.0); }",
- }),
+ })
);
scene.renderForSpecs();
expect(scene).toRender([255, 0, 255, 255]);
@@ -321,7 +321,7 @@ describe(
new PostProcessStage({
fragmentShader:
"void main() { out_FragColor = vec4(1.0, 0.0, 1.0, 1.0); }",
- }),
+ })
);
stage.enabled = false;
@@ -339,13 +339,13 @@ describe(
new PostProcessStage({
fragmentShader:
"void main() { out_FragColor = vec4(1.0, 0.0, 1.0, 1.0); }",
- }),
+ })
);
const stage = scene.postProcessStages.add(
new PostProcessStage({
fragmentShader:
"void main() { out_FragColor = vec4(0.0, 1.0, 1.0, 1.0); }",
- }),
+ })
);
scene.renderForSpecs();
@@ -362,13 +362,13 @@ describe(
new PostProcessStage({
fragmentShader:
"void main() { out_FragColor = vec4(1.0, 0.0, 1.0, 1.0); }",
- }),
+ })
);
const stage = scene.postProcessStages.add(
new PostProcessStage({
fragmentShader:
"void main() { out_FragColor = vec4(0.0, 1.0, 1.0, 1.0); }",
- }),
+ })
);
stage.enabled = false;
@@ -402,7 +402,7 @@ describe(
scene.postProcessStages.tonemapper = tonemapper;
const inputColorRgb = inputFragColor.map((n) =>
- Math.floor(Math.min(Math.max(n * 255, 0), 255)),
+ Math.floor(Math.min(Math.max(n * 255, 0), 255))
);
const fs =
"void main() { \n" +
@@ -488,28 +488,28 @@ describe(
validateTonemapper(
Tonemapper.MODIFIED_REINHARD,
[0.5, 0.5, 0.5, 1.0],
- [186, 186, 186, 255],
+ [186, 186, 186, 255]
);
});
it("red", () => {
validateTonemapper(
Tonemapper.MODIFIED_REINHARD,
[0.5, 0.0, 0.0, 1.0],
- [186, 0, 0, 255],
+ [186, 0, 0, 255]
);
});
it("green", () => {
validateTonemapper(
Tonemapper.MODIFIED_REINHARD,
[0.0, 0.5, 0.0, 1.0],
- [0, 186, 0, 255],
+ [0, 186, 0, 255]
);
});
it("blue", () => {
validateTonemapper(
Tonemapper.MODIFIED_REINHARD,
[0.0, 0.0, 0.5, 1.0],
- [0, 0, 186, 255],
+ [0, 0, 186, 255]
);
});
});
@@ -552,35 +552,39 @@ describe(
describe("PBR Neutral", () => {
it("white", () => {
- validateTonemapper(
- Tonemapper.PBR_NEUTRAL,
- white,
- [253, 253, 253, 255],
- );
+ validateTonemapper(Tonemapper.PBR_NEUTRAL, white, [
+ 253,
+ 253,
+ 253,
+ 255,
+ ]);
});
it("grey", () => {
- validateTonemapper(
- Tonemapper.PBR_NEUTRAL,
- grey,
- [179, 179, 179, 255],
- );
+ validateTonemapper(Tonemapper.PBR_NEUTRAL, grey, [
+ 179,
+ 179,
+ 179,
+ 255,
+ ]);
});
it("red", () => {
validateTonemapper(Tonemapper.PBR_NEUTRAL, red, [253, 149, 149, 255]);
});
it("green", () => {
- validateTonemapper(
- Tonemapper.PBR_NEUTRAL,
- green,
- [149, 253, 149, 255],
- );
+ validateTonemapper(Tonemapper.PBR_NEUTRAL, green, [
+ 149,
+ 253,
+ 149,
+ 255,
+ ]);
});
it("blue", () => {
- validateTonemapper(
- Tonemapper.PBR_NEUTRAL,
- blue,
- [149, 149, 253, 255],
- );
+ validateTonemapper(Tonemapper.PBR_NEUTRAL, blue, [
+ 149,
+ 149,
+ 253,
+ 255,
+ ]);
});
});
});
@@ -590,7 +594,7 @@ describe(
const stage = stages.add(
new PostProcessStage({
fragmentShader: "void main() { out_FragColor = vec4(1.0); }",
- }),
+ })
);
expect(stages.isDestroyed()).toEqual(false);
stages.destroy();
@@ -598,5 +602,5 @@ describe(
expect(stage.isDestroyed()).toEqual(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/PostProcessStageCompositeSpec.js b/packages/engine/Specs/Scene/PostProcessStageCompositeSpec.js
index f5df1b810c52..442373b1e412 100644
--- a/packages/engine/Specs/Scene/PostProcessStageCompositeSpec.js
+++ b/packages/engine/Specs/Scene/PostProcessStageCompositeSpec.js
@@ -56,7 +56,7 @@ describe(
expect(composite.enabled).toEqual(true);
expect(composite.uniforms).toEqual(uniforms);
expect(composite.inputPreviousStageTexture).toEqual(
- inputPreviousStageTexture,
+ inputPreviousStageTexture
);
expect(composite.length).toEqual(1);
});
@@ -195,7 +195,7 @@ describe(
fragmentShader: `void main() { out_FragColor = vec4(vec3(${
bgColor / 255
}), 1.0); }`,
- }),
+ })
);
//Stage we expect to not run
@@ -207,7 +207,7 @@ describe(
"uniform sampler2D depthTexture; void main() { out_FragColor = vec4(1.0); }",
}),
],
- }),
+ })
);
return pollToPromise(function () {
s.renderForSpecs();
@@ -244,5 +244,5 @@ describe(
expect(stage2.isDestroyed()).toEqual(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/PostProcessStageLibrarySpec.js b/packages/engine/Specs/Scene/PostProcessStageLibrarySpec.js
index 3350a5a2eb54..5031f55d01b0 100644
--- a/packages/engine/Specs/Scene/PostProcessStageLibrarySpec.js
+++ b/packages/engine/Specs/Scene/PostProcessStageLibrarySpec.js
@@ -40,8 +40,7 @@ describe(
scene.postProcessStages.fxaa.enabled = false;
scene.postProcessStages.bloom.enabled = false;
- scene.postProcessStages.bloom.uniforms.brightness =
- originalBloomBrightness;
+ scene.postProcessStages.bloom.uniforms.brightness = originalBloomBrightness;
scene.postProcessStages.ambientOcclusion.enabled = false;
scene.renderForSpecs();
});
@@ -66,7 +65,7 @@ describe(
});
scene.postProcessStages.add(
- PostProcessStageLibrary.createBlackAndWhiteStage(),
+ PostProcessStageLibrary.createBlackAndWhiteStage()
);
scene.renderForSpecs();
expect(scene).toRenderAndCall(function (rgba) {
@@ -92,10 +91,10 @@ describe(
{
url: boxTexturedUrl,
},
- scene,
+ scene
).then(function (model) {
const stage = scene.postProcessStages.add(
- PostProcessStageLibrary.createBlackAndWhiteStage(),
+ PostProcessStageLibrary.createBlackAndWhiteStage()
);
stage.selected = [];
@@ -146,7 +145,7 @@ describe(
});
scene.postProcessStages.add(
- PostProcessStageLibrary.createBrightnessStage(),
+ PostProcessStageLibrary.createBrightnessStage()
);
scene.renderForSpecs();
expect(scene).toRenderAndCall(function (rgba) {
@@ -187,7 +186,7 @@ describe(
});
scene.postProcessStages.add(
- PostProcessStageLibrary.createNightVisionStage(),
+ PostProcessStageLibrary.createNightVisionStage()
);
scene.renderForSpecs();
expect(scene).toRenderAndCall(function (rgba) {
@@ -227,7 +226,7 @@ describe(
});
scene.postProcessStages.add(
- PostProcessStageLibrary.createDepthViewStage(),
+ PostProcessStageLibrary.createDepthViewStage()
);
scene.renderForSpecs();
expect(scene).toRenderAndCall(function (rgba) {
@@ -303,7 +302,7 @@ describe(
const origin = Cartesian3.fromDegrees(-123.0744619, 44.0503706, 100.0);
const modelMatrix = Transforms.headingPitchRollToFixedFrame(
origin,
- new HeadingPitchRoll(),
+ new HeadingPitchRoll()
);
return loadAndZoomToModelAsync(
@@ -313,7 +312,7 @@ describe(
incrementallyLoadTextures: false,
modelMatrix: modelMatrix,
},
- scene,
+ scene
).then(function () {
// The range is chosen carefully here. If it's too small and log depth
// is off, the model may clip out of view. If it is too large, the
@@ -335,7 +334,7 @@ describe(
// Render with depth of field and compare
scene.postProcessStages.add(
- PostProcessStageLibrary.createDepthOfFieldStage(),
+ PostProcessStageLibrary.createDepthOfFieldStage()
);
scene.renderForSpecs();
expect(scene).toRenderAndCall(function (rgba) {
@@ -424,7 +423,7 @@ describe(
const origin = Cartesian3.fromDegrees(-123.0744619, 44.0503706, 100.0);
const modelMatrix = Transforms.headingPitchRollToFixedFrame(
origin,
- new HeadingPitchRoll(),
+ new HeadingPitchRoll()
);
return loadAndZoomToModelAsync(
@@ -434,7 +433,7 @@ describe(
incrementallyLoadTextures: false,
modelMatrix: modelMatrix,
},
- scene,
+ scene
).then(function () {
// The range is chosen carefully here. If it's too small and log depth
// is off, the model may clip out of view. If it is too large, the
@@ -496,5 +495,5 @@ describe(
expect(bloom.uniforms.stepSize).toEqual(2.0);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/PostProcessStageSpec.js b/packages/engine/Specs/Scene/PostProcessStageSpec.js
index 9d18a7d0e214..f88864496f65 100644
--- a/packages/engine/Specs/Scene/PostProcessStageSpec.js
+++ b/packages/engine/Specs/Scene/PostProcessStageSpec.js
@@ -127,7 +127,7 @@ describe(
new PostProcessStage({
fragmentShader:
"void main() { out_FragColor = vec4(1.0, 1.0, 0.0, 1.0); }",
- }),
+ })
);
scene.renderForSpecs(); // render one frame so the stage is ready
expect(scene).toRender([255, 255, 0, 255]);
@@ -142,7 +142,7 @@ describe(
uniforms: {
inputTexture: "./Data/Images/Green2x2.png",
},
- }),
+ })
);
return pollToPromise(function () {
scene.renderForSpecs();
@@ -178,7 +178,7 @@ describe(
uniforms: {
inputTexture: image,
},
- }),
+ })
);
return pollToPromise(function () {
scene.renderForSpecs();
@@ -214,14 +214,14 @@ describe(
fragmentShader: `void main() { out_FragColor = vec4(vec3(${
bgColor / 255
}), 1.0); }`,
- }),
+ })
);
const stage = s.postProcessStages.add(
new PostProcessStage({
fragmentShader:
"uniform sampler2D depthTexture; void main() { out_FragColor = vec4(1.0); }",
- }),
+ })
);
return pollToPromise(function () {
s.renderForSpecs();
@@ -249,7 +249,7 @@ describe(
offset: offset,
incrementallyLoadTextures: false,
},
- scene,
+ scene
).then(function (model) {
const fs =
"uniform sampler2D colorTexture; \n" +
@@ -264,7 +264,7 @@ describe(
const stage = scene.postProcessStages.add(
new PostProcessStage({
fragmentShader: fs,
- }),
+ })
);
stage.selected = [];
return pollToPromise(function () {
@@ -289,5 +289,5 @@ describe(
expect(stage.isDestroyed()).toEqual(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/PrimitiveCollectionSpec.js b/packages/engine/Specs/Scene/PrimitiveCollectionSpec.js
index 2a3394e1274f..014af1452113 100644
--- a/packages/engine/Specs/Scene/PrimitiveCollectionSpec.js
+++ b/packages/engine/Specs/Scene/PrimitiveCollectionSpec.js
@@ -49,8 +49,9 @@ describe(
// render until all labels have been updated
return pollToPromise(function () {
scene.renderForSpecs();
- const backgroundBillboard =
- labels._backgroundBillboardCollection.get(0);
+ const backgroundBillboard = labels._backgroundBillboardCollection.get(
+ 0
+ );
return (
(!defined(backgroundBillboard) || backgroundBillboard.ready) &&
labels._labelsToUpdate.length === 0
@@ -694,5 +695,5 @@ describe(
p2.destroy();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/PrimitiveCullingSpec.js b/packages/engine/Specs/Scene/PrimitiveCullingSpec.js
index de04c8934e0c..e9f311e4b55e 100644
--- a/packages/engine/Specs/Scene/PrimitiveCullingSpec.js
+++ b/packages/engine/Specs/Scene/PrimitiveCullingSpec.js
@@ -38,11 +38,11 @@ describe(
scene = createScene();
scene.primitives.destroyPrimitives = false;
- return Resource.fetchImage("./Data/Images/Green.png").then(
- function (image) {
- greenImage = image;
- },
- );
+ return Resource.fetchImage("./Data/Images/Green.png").then(function (
+ image
+ ) {
+ greenImage = image;
+ });
});
afterAll(function () {
@@ -158,8 +158,9 @@ describe(
// render until all labels have been updated
return pollToPromise(function () {
scene.renderForSpecs();
- const backgroundBillboard =
- labels._backgroundBillboardCollection.get(0);
+ const backgroundBillboard = labels._backgroundBillboardCollection.get(
+ 0
+ );
return (
(!defined(backgroundBillboard) || backgroundBillboard.ready) &&
labels._labelsToUpdate.length === 0
@@ -336,5 +337,5 @@ describe(
testOcclusionCull(primitive);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/PrimitivePipelineSpec.js b/packages/engine/Specs/Scene/PrimitivePipelineSpec.js
index 16b4423b747c..63465acd4b42 100644
--- a/packages/engine/Specs/Scene/PrimitivePipelineSpec.js
+++ b/packages/engine/Specs/Scene/PrimitivePipelineSpec.js
@@ -17,23 +17,24 @@ describe(
const boxGeometry = BoxGeometry.createGeometry(
BoxGeometry.fromDimensions({
dimensions: new Cartesian3(1, 2, 3),
- }),
+ })
);
const boxGeometry2 = BoxGeometry.createGeometry(
BoxGeometry.fromDimensions({
dimensions: new Cartesian3(3, 4, 7),
- }),
+ })
);
const geometryToPack = [boxGeometry, boxGeometry2];
const transferableObjects = [];
const results = PrimitivePipeline.packCreateGeometryResults(
geometryToPack,
- transferableObjects,
+ transferableObjects
+ );
+ const unpackedGeometry = PrimitivePipeline.unpackCreateGeometryResults(
+ results
);
- const unpackedGeometry =
- PrimitivePipeline.unpackCreateGeometryResults(results);
expect(transferableObjects.length).toBe(1);
expect(geometryToPack).toEqual(unpackedGeometry);
@@ -58,14 +59,15 @@ describe(
const transferableObjects = [];
const results = PrimitivePipeline.packCreateGeometryResults(
geometryToPack,
- transferableObjects,
+ transferableObjects
+ );
+ const unpackedGeometry = PrimitivePipeline.unpackCreateGeometryResults(
+ results
);
- const unpackedGeometry =
- PrimitivePipeline.unpackCreateGeometryResults(results);
expect(transferableObjects.length).toBe(1);
expect(geometryToPack).toEqual(unpackedGeometry);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/PrimitiveSpec.js b/packages/engine/Specs/Scene/PrimitiveSpec.js
index 010108e6905d..c218d4443153 100644
--- a/packages/engine/Specs/Scene/PrimitiveSpec.js
+++ b/packages/engine/Specs/Scene/PrimitiveSpec.js
@@ -89,10 +89,10 @@ describe(
let translation = Cartesian3.multiplyByScalar(
Cartesian3.normalize(
ellipsoid.cartographicToCartesian(Rectangle.center(rectangle1)),
- new Cartesian3(),
+ new Cartesian3()
),
2.0,
- new Cartesian3(),
+ new Cartesian3()
);
rectangleInstance1 = new GeometryInstance({
geometry: new RectangleGeometry({
@@ -111,10 +111,10 @@ describe(
translation = Cartesian3.multiplyByScalar(
Cartesian3.normalize(
ellipsoid.cartographicToCartesian(Rectangle.center(rectangle2)),
- new Cartesian3(),
+ new Cartesian3()
),
3.0,
- new Cartesian3(),
+ new Cartesian3()
);
rectangleInstance2 = new GeometryInstance({
geometry: new RectangleGeometry({
@@ -360,14 +360,14 @@ describe(
const boxModelMatrix = Matrix4.multiplyByTranslation(
Transforms.eastNorthUpToFixedFrame(positionOnEllipsoid),
new Cartesian3(0.0, 0.0, dimensions.z * 0.5),
- new Matrix4(),
+ new Matrix4()
);
const boxGeometry = BoxGeometry.createGeometry(
BoxGeometry.fromDimensions({
vertexFormat: PerInstanceColorAppearance.VERTEX_FORMAT,
dimensions: dimensions,
- }),
+ })
);
const positions = boxGeometry.attributes.position.values;
@@ -382,7 +382,7 @@ describe(
BoundingSphere.transform(
boxGeometry.boundingSphere,
boxModelMatrix,
- boxGeometry.boundingSphere,
+ boxGeometry.boundingSphere
);
const boxGeometryInstance = new GeometryInstance({
@@ -419,10 +419,10 @@ describe(
const translation = Cartesian3.multiplyByScalar(
Cartesian3.normalize(
ellipsoid.cartographicToCartesian(Rectangle.center(rect)),
- new Cartesian3(),
+ new Cartesian3()
),
100.0,
- new Cartesian3(),
+ new Cartesian3()
);
const rectInstance = new GeometryInstance({
geometry: new RectangleGeometry({
@@ -457,7 +457,7 @@ describe(
1.0,
0.0,
1.0,
- 1.0,
+ 1.0
),
},
});
@@ -485,10 +485,10 @@ describe(
const translation = Cartesian3.multiplyByScalar(
Cartesian3.normalize(
ellipsoid.cartographicToCartesian(Rectangle.center(rect)),
- new Cartesian3(),
+ new Cartesian3()
),
100.0,
- new Cartesian3(),
+ new Cartesian3()
);
const rectInstance = new GeometryInstance({
geometry: new RectangleGeometry({
@@ -523,7 +523,7 @@ describe(
1.0,
0.0,
1.0,
- 1.0,
+ 1.0
),
},
});
@@ -637,7 +637,7 @@ describe(
const primitiveModelMatrix = Matrix4.multiplyByTranslation(
Transforms.eastNorthUpToFixedFrame(positionOnEllipsoid),
new Cartesian3(0.0, 0.0, dimensions.z * 0.5),
- new Matrix4(),
+ new Matrix4()
);
const boxGeometry = BoxGeometry.fromDimensions({
@@ -664,7 +664,7 @@ describe(
const expectedModelMatrix = Matrix4.multiplyTransformation(
primitiveModelMatrix,
instanceModelMatrix,
- new Matrix4(),
+ new Matrix4()
);
frameState.scene3DOnly = true;
@@ -757,7 +757,7 @@ describe(
it("does not transform to world coordinates", function () {
rectangleInstance2.modelMatrix = Matrix4.clone(
- rectangleInstance1.modelMatrix,
+ rectangleInstance1.modelMatrix
);
primitive = new Primitive({
geometryInstances: [rectangleInstance1, rectangleInstance2],
@@ -865,10 +865,10 @@ describe(
const translation = Cartesian3.multiplyByScalar(
Cartesian3.normalize(
ellipsoid.cartographicToCartesian(Rectangle.center(rect)),
- new Cartesian3(),
+ new Cartesian3()
),
2.0,
- new Cartesian3(),
+ new Cartesian3()
);
const rectInstance = new GeometryInstance({
geometry: new RectangleGeometry({
@@ -880,8 +880,10 @@ describe(
id: "rect",
attributes: {
color: new ColorGeometryInstanceAttribute(1.0, 1.0, 0.0, 1.0),
- distanceDisplayCondition:
- new DistanceDisplayConditionGeometryInstanceAttribute(near, far),
+ distanceDisplayCondition: new DistanceDisplayConditionGeometryInstanceAttribute(
+ near,
+ far
+ ),
},
});
@@ -895,30 +897,26 @@ describe(
scene.camera.setView({ destination: rect });
scene.renderForSpecs();
- const boundingSphere =
- primitive.getGeometryInstanceAttributes("rect").boundingSphere;
+ const boundingSphere = primitive.getGeometryInstanceAttributes("rect")
+ .boundingSphere;
const center = boundingSphere.center;
const radius = boundingSphere.radius;
scene.camera.lookAt(
center,
- new HeadingPitchRange(0.0, -CesiumMath.PI_OVER_TWO, radius),
+ new HeadingPitchRange(0.0, -CesiumMath.PI_OVER_TWO, radius)
);
expect(scene).toRender([0, 0, 0, 255]);
scene.camera.lookAt(
center,
- new HeadingPitchRange(
- 0.0,
- -CesiumMath.PI_OVER_TWO,
- radius + near + 1.0,
- ),
+ new HeadingPitchRange(0.0, -CesiumMath.PI_OVER_TWO, radius + near + 1.0)
);
expect(scene).notToRender([0, 0, 0, 255]);
scene.camera.lookAt(
center,
- new HeadingPitchRange(0.0, -CesiumMath.PI_OVER_TWO, radius + far + 1.0),
+ new HeadingPitchRange(0.0, -CesiumMath.PI_OVER_TWO, radius + far + 1.0)
);
expect(scene).toRender([0, 0, 0, 255]);
});
@@ -939,8 +937,10 @@ describe(
attributes: {
color: new ColorGeometryInstanceAttribute(1.0, 1.0, 0.0, 1.0),
show: new ShowGeometryInstanceAttribute(true),
- distanceDisplayCondition:
- new DistanceDisplayConditionGeometryInstanceAttribute(near, far),
+ distanceDisplayCondition: new DistanceDisplayConditionGeometryInstanceAttribute(
+ near,
+ far
+ ),
},
});
@@ -955,8 +955,8 @@ describe(
scene.frameState.scene3DOnly = true;
scene.renderForSpecs();
- const boundingSphere =
- primitive.getGeometryInstanceAttributes("cylinder").boundingSphere;
+ const boundingSphere = primitive.getGeometryInstanceAttributes("cylinder")
+ .boundingSphere;
const center = boundingSphere.center;
expect(center).toEqual(translation);
});
@@ -989,8 +989,8 @@ describe(
scene.frameState.scene3DOnly = true;
scene.renderForSpecs();
- const boundingSphere =
- primitive.getGeometryInstanceAttributes("cylinder").boundingSphere;
+ const boundingSphere = primitive.getGeometryInstanceAttributes("cylinder")
+ .boundingSphere;
const center = boundingSphere.center;
expect(center).toEqual(translation);
});
@@ -1197,7 +1197,7 @@ describe(
color: new ColorGeometryInstanceAttribute(1.0, 0.0, 1.0, 1.0),
},
id: "invalid",
- }),
+ })
);
instances.push(rectangleInstance2);
@@ -1216,13 +1216,13 @@ describe(
return primitive.ready;
}).then(function () {
expect(
- primitive.getGeometryInstanceAttributes("rectangle1").boundingSphere,
+ primitive.getGeometryInstanceAttributes("rectangle1").boundingSphere
).toBeDefined();
expect(
- primitive.getGeometryInstanceAttributes("rectangle2").boundingSphere,
+ primitive.getGeometryInstanceAttributes("rectangle2").boundingSphere
).toBeDefined();
expect(
- primitive.getGeometryInstanceAttributes("invalid").boundingSphere,
+ primitive.getGeometryInstanceAttributes("invalid").boundingSphere
).not.toBeDefined();
});
});
@@ -1279,8 +1279,9 @@ describe(
scene.render();
return primitive.ready;
}).then(function () {
- const attributes =
- primitive.getGeometryInstanceAttributes("rectangle1");
+ const attributes = primitive.getGeometryInstanceAttributes(
+ "rectangle1"
+ );
expect(function () {
attributes.color = undefined;
}).toThrowDeveloperError();
@@ -1325,7 +1326,7 @@ describe(
scene.renderForSpecs();
expect(
- primitive.getGeometryInstanceAttributes("unknown"),
+ primitive.getGeometryInstanceAttributes("unknown")
).not.toBeDefined();
});
@@ -1368,5 +1369,5 @@ describe(
expect(primitive.isDestroyed()).toEqual(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/PropertyAttributeSpec.js b/packages/engine/Specs/Scene/PropertyAttributeSpec.js
index d397f452d9b6..997316c6d720 100644
--- a/packages/engine/Specs/Scene/PropertyAttributeSpec.js
+++ b/packages/engine/Specs/Scene/PropertyAttributeSpec.js
@@ -87,10 +87,10 @@ describe("Scene/PropertyAttribute", function () {
it("getProperty returns property attribute property", function () {
expect(propertyAttribute.getProperty("color").attribute).toBe("_COLOR");
expect(propertyAttribute.getProperty("intensity").attribute).toBe(
- "_INTENSITY",
+ "_INTENSITY"
);
expect(propertyAttribute.getProperty("pointSize").attribute).toBe(
- "_POINT_SIZE",
+ "_POINT_SIZE"
);
});
diff --git a/packages/engine/Specs/Scene/PropertyTableSpec.js b/packages/engine/Specs/Scene/PropertyTableSpec.js
index dbad6bc989a9..eeeb6d360612 100644
--- a/packages/engine/Specs/Scene/PropertyTableSpec.js
+++ b/packages/engine/Specs/Scene/PropertyTableSpec.js
@@ -202,7 +202,7 @@ describe("Scene/PropertyTable", function () {
it("getPropertyBySemantic returns the property value", function () {
const propertyTable = createPropertyTable();
expect(propertyTable.getPropertyBySemantic(0, "NAME")).toEqual(
- "Building A",
+ "Building A"
);
});
@@ -216,10 +216,10 @@ describe("Scene/PropertyTable", function () {
it("setPropertyBySemantic sets property value", function () {
const propertyTable = createPropertyTable();
expect(propertyTable.getPropertyBySemantic(0, "NAME")).toEqual(
- "Building A",
+ "Building A"
);
expect(propertyTable.setPropertyBySemantic(0, "NAME", "Building New")).toBe(
- true,
+ true
);
});
@@ -240,7 +240,7 @@ describe("Scene/PropertyTable", function () {
const expectedTypedArray = new Float32Array([10.0, 20.0, 30.0]);
expect(propertyTable.getPropertyTypedArray("height")).toEqual(
- expectedTypedArray,
+ expectedTypedArray
);
});
@@ -263,7 +263,7 @@ describe("Scene/PropertyTable", function () {
const expectedTypedArray = new Float32Array([10.0, 20.0, 30.0]);
expect(propertyTable.getPropertyTypedArrayBySemantic("HEIGHT")).toEqual(
- expectedTypedArray,
+ expectedTypedArray
);
});
@@ -545,19 +545,19 @@ describe("Scene/PropertyTable", function () {
expect(batchTable.getPropertyTypedArray("itemId")).toBeDefined();
expect(batchTable.getPropertyTypedArray("priority")).not.toBeDefined();
expect(
- batchTable.getPropertyTypedArray("tireLocation"),
+ batchTable.getPropertyTypedArray("tireLocation")
).not.toBeDefined();
});
it("getPropertyTypedArray returns undefined when there is no metadata table", function () {
expect(
- batchTableJsonOnly.getPropertyTypedArray("priority"),
+ batchTableJsonOnly.getPropertyTypedArray("priority")
).not.toBeDefined();
});
it("getPropertyTypedArrayBySemantic returns undefined when there is no metadata table", function () {
expect(
- batchTableJsonOnly.getPropertyTypedArrayBySemantic("PRIORITY"),
+ batchTableJsonOnly.getPropertyTypedArrayBySemantic("PRIORITY")
).not.toBeDefined();
});
diff --git a/packages/engine/Specs/Scene/PropertyTexturePropertySpec.js b/packages/engine/Specs/Scene/PropertyTexturePropertySpec.js
index 0bdb4bc5bea5..3fd3c2aec10c 100644
--- a/packages/engine/Specs/Scene/PropertyTexturePropertySpec.js
+++ b/packages/engine/Specs/Scene/PropertyTexturePropertySpec.js
@@ -373,5 +373,5 @@ describe(
}
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/PropertyTextureSpec.js b/packages/engine/Specs/Scene/PropertyTextureSpec.js
index bbcbeca060da..ded2465c4efe 100644
--- a/packages/engine/Specs/Scene/PropertyTextureSpec.js
+++ b/packages/engine/Specs/Scene/PropertyTextureSpec.js
@@ -160,5 +160,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/QuadtreePrimitiveSpec.js b/packages/engine/Specs/Scene/QuadtreePrimitiveSpec.js
index 0e282f7be60c..1a2e3fc2d3b3 100644
--- a/packages/engine/Specs/Scene/QuadtreePrimitiveSpec.js
+++ b/packages/engine/Specs/Scene/QuadtreePrimitiveSpec.js
@@ -73,7 +73,7 @@ describe("Scene/QuadtreePrimitive", function () {
};
frameState.cullingVolume.computeVisibility.and.returnValue(
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
imageryLayerCollection = new ImageryLayerCollection();
@@ -93,7 +93,7 @@ describe("Scene/QuadtreePrimitive", function () {
processor = new TerrainTileProcessor(
frameState,
mockTerrain,
- imageryLayerCollection,
+ imageryLayerCollection
);
quadtree.render(frameState);
@@ -152,7 +152,7 @@ describe("Scene/QuadtreePrimitive", function () {
expect(
quadtree._tilesToRender.filter(function (tile) {
return tile.level === 0;
- }).length,
+ }).length
).toBe(quadtree._tilesToRender.length);
});
});
@@ -181,7 +181,7 @@ describe("Scene/QuadtreePrimitive", function () {
expect(
quadtree._tilesToRender.filter(function (tile) {
return tile.level === 0;
- }).length,
+ }).length
).toBe(quadtree._tilesToRender.length);
// Allow the child tiles to load.
@@ -192,16 +192,16 @@ describe("Scene/QuadtreePrimitive", function () {
// Now child tiles should be rendered too.
expect(quadtree._tilesToRender).toContain(
- rootTiles[0].southwestChild,
+ rootTiles[0].southwestChild
);
expect(quadtree._tilesToRender).toContain(
- rootTiles[0].southeastChild,
+ rootTiles[0].southeastChild
);
expect(quadtree._tilesToRender).toContain(
- rootTiles[0].northwestChild,
+ rootTiles[0].northwestChild
);
expect(quadtree._tilesToRender).toContain(
- rootTiles[0].northeastChild,
+ rootTiles[0].northeastChild
);
});
});
@@ -240,7 +240,7 @@ describe("Scene/QuadtreePrimitive", function () {
quadtree,
frameState,
Rectangle.center(lookAtTile.rectangle),
- lookAtTile.level,
+ lookAtTile.level
);
spyOn(mockTerrain, "requestTileGeometry").and.callThrough();
@@ -306,7 +306,7 @@ describe("Scene/QuadtreePrimitive", function () {
quadtree,
frameState,
Rectangle.center(lookAtTile.rectangle),
- lookAtTile.level,
+ lookAtTile.level
);
spyOn(mockTerrain, "requestTileGeometry").and.callThrough();
@@ -335,7 +335,7 @@ describe("Scene/QuadtreePrimitive", function () {
call[1] === parent.y &&
call[2] === parent.level
);
- })[0],
+ })[0]
);
const lookAtArgsIndex = allArgs.indexOf(
allArgs.filter(function (call) {
@@ -344,7 +344,7 @@ describe("Scene/QuadtreePrimitive", function () {
call[1] === lookAtTile.y &&
call[2] === lookAtTile.level
);
- })[0],
+ })[0]
);
expect(parentArgsIndex).toBeLessThan(lookAtArgsIndex);
});
@@ -385,7 +385,7 @@ describe("Scene/QuadtreePrimitive", function () {
quadtree,
frameState,
Rectangle.center(lookAtTile.rectangle),
- lookAtTile.level,
+ lookAtTile.level
);
spyOn(mockTerrain, "requestTileGeometry").and.callThrough();
@@ -453,7 +453,7 @@ describe("Scene/QuadtreePrimitive", function () {
quadtree,
frameState,
Rectangle.center(lookAtTile.rectangle),
- lookAtTile.level,
+ lookAtTile.level
);
spyOn(mockTerrain, "requestTileGeometry").and.callThrough();
@@ -473,7 +473,7 @@ describe("Scene/QuadtreePrimitive", function () {
quadtree,
frameState,
Rectangle.center(lookAtTile.rectangle),
- lookAtTile.parent.level,
+ lookAtTile.parent.level
);
// Select new tiles
@@ -530,33 +530,32 @@ describe("Scene/QuadtreePrimitive", function () {
const visibleTile = rootTiles[0].southwestChild.northeastChild;
const notVisibleTile = rootTiles[0].southwestChild.northwestChild;
- frameState.cullingVolume.computeVisibility.and.callFake(
- function (boundingVolume) {
- if (!defined(visibleTile.data)) {
- return Intersect.INTERSECTING;
- }
+ frameState.cullingVolume.computeVisibility.and.callFake(function (
+ boundingVolume
+ ) {
+ if (!defined(visibleTile.data)) {
+ return Intersect.INTERSECTING;
+ }
- if (
- boundingVolume ===
- visibleTile.data.tileBoundingRegion.boundingVolume
- ) {
- return Intersect.INTERSECTING;
- } else if (
- boundingVolume ===
- notVisibleTile.data.tileBoundingRegion.boundingVolume
- ) {
- return Intersect.OUTSIDE;
- }
+ if (
+ boundingVolume === visibleTile.data.tileBoundingRegion.boundingVolume
+ ) {
return Intersect.INTERSECTING;
- },
- );
+ } else if (
+ boundingVolume ===
+ notVisibleTile.data.tileBoundingRegion.boundingVolume
+ ) {
+ return Intersect.OUTSIDE;
+ }
+ return Intersect.INTERSECTING;
+ });
// Look down at the center of the visible tile.
setCameraPosition(
quadtree,
frameState,
Rectangle.center(visibleTile.rectangle),
- visibleTile.level,
+ visibleTile.level
);
spyOn(mockTerrain, "requestTileGeometry").and.callThrough();
@@ -572,7 +571,7 @@ describe("Scene/QuadtreePrimitive", function () {
// Now treat the not-visible-tile as visible.
frameState.cullingVolume.computeVisibility.and.returnValue(
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
// Select new tiles
@@ -867,7 +866,7 @@ describe("Scene/QuadtreePrimitive", function () {
const removeFunc = quadtree.updateHeight(
Cartographic.fromDegrees(-72.0, 40.0),
- function (position) {},
+ function (position) {}
);
// determine what tiles to load
@@ -940,12 +939,11 @@ describe("Scene/QuadtreePrimitive", function () {
tileProvider: tileProvider,
});
- quadtree.updateHeight(
- Cartographic.fromDegrees(-72.0, 40.0),
- function (p) {
- Cartesian3.clone(p, position);
- },
- );
+ quadtree.updateHeight(Cartographic.fromDegrees(-72.0, 40.0), function (
+ p
+ ) {
+ Cartesian3.clone(p, position);
+ });
// determine what tiles to load
quadtree.update(scene.frameState);
@@ -988,10 +986,10 @@ describe("Scene/QuadtreePrimitive", function () {
// The root tiles should be in the high priority load queue
expect(quadtree._tileLoadQueueHigh.length).toBe(2);
expect(quadtree._tileLoadQueueHigh).toContain(
- quadtree._levelZeroTiles[0],
+ quadtree._levelZeroTiles[0]
);
expect(quadtree._tileLoadQueueHigh).toContain(
- quadtree._levelZeroTiles[1],
+ quadtree._levelZeroTiles[1]
);
expect(quadtree._tileLoadQueueMedium.length).toBe(0);
expect(quadtree._tileLoadQueueLow.length).toBe(0);
@@ -1007,24 +1005,24 @@ describe("Scene/QuadtreePrimitive", function () {
// That root tile should now load with low priority while its children should load with high.
expect(quadtree._tileLoadQueueHigh.length).toBe(5);
expect(quadtree._tileLoadQueueHigh).toContain(
- quadtree._levelZeroTiles[1],
+ quadtree._levelZeroTiles[1]
);
expect(quadtree._tileLoadQueueHigh).toContain(
- quadtree._levelZeroTiles[0].children[0],
+ quadtree._levelZeroTiles[0].children[0]
);
expect(quadtree._tileLoadQueueHigh).toContain(
- quadtree._levelZeroTiles[0].children[1],
+ quadtree._levelZeroTiles[0].children[1]
);
expect(quadtree._tileLoadQueueHigh).toContain(
- quadtree._levelZeroTiles[0].children[2],
+ quadtree._levelZeroTiles[0].children[2]
);
expect(quadtree._tileLoadQueueHigh).toContain(
- quadtree._levelZeroTiles[0].children[3],
+ quadtree._levelZeroTiles[0].children[3]
);
expect(quadtree._tileLoadQueueMedium.length).toBe(0);
expect(quadtree._tileLoadQueueLow.length).toBe(1);
expect(quadtree._tileLoadQueueLow).toContain(
- quadtree._levelZeroTiles[0],
+ quadtree._levelZeroTiles[0]
);
// Mark the children of that root tile renderable too, so we can refine it
@@ -1040,36 +1038,36 @@ describe("Scene/QuadtreePrimitive", function () {
expect(quadtree._tileLoadQueueHigh.length).toBe(17); // levelZeroTiles[1] plus levelZeroTiles[0]'s 16 grandchildren
expect(quadtree._tileLoadQueueHigh).toContain(
- quadtree._levelZeroTiles[1],
+ quadtree._levelZeroTiles[1]
);
expect(quadtree._tileLoadQueueHigh).toContain(
- quadtree._levelZeroTiles[0].children[0].children[0],
+ quadtree._levelZeroTiles[0].children[0].children[0]
);
expect(quadtree._tileLoadQueueHigh).toContain(
- quadtree._levelZeroTiles[0].children[0].children[1],
+ quadtree._levelZeroTiles[0].children[0].children[1]
);
expect(quadtree._tileLoadQueueHigh).toContain(
- quadtree._levelZeroTiles[0].children[0].children[2],
+ quadtree._levelZeroTiles[0].children[0].children[2]
);
expect(quadtree._tileLoadQueueHigh).toContain(
- quadtree._levelZeroTiles[0].children[0].children[3],
+ quadtree._levelZeroTiles[0].children[0].children[3]
);
expect(quadtree._tileLoadQueueMedium.length).toBe(0);
expect(quadtree._tileLoadQueueLow.length).toBe(5);
expect(quadtree._tileLoadQueueLow).toContain(
- quadtree._levelZeroTiles[0],
+ quadtree._levelZeroTiles[0]
);
expect(quadtree._tileLoadQueueLow).toContain(
- quadtree._levelZeroTiles[0].children[0],
+ quadtree._levelZeroTiles[0].children[0]
);
expect(quadtree._tileLoadQueueLow).toContain(
- quadtree._levelZeroTiles[0].children[1],
+ quadtree._levelZeroTiles[0].children[1]
);
expect(quadtree._tileLoadQueueLow).toContain(
- quadtree._levelZeroTiles[0].children[2],
+ quadtree._levelZeroTiles[0].children[2]
);
expect(quadtree._tileLoadQueueLow).toContain(
- quadtree._levelZeroTiles[0].children[3],
+ quadtree._levelZeroTiles[0].children[3]
);
// Mark the children of levelZeroTiles[0] upsampled
@@ -1086,11 +1084,11 @@ describe("Scene/QuadtreePrimitive", function () {
// levelZeroTiles[0] should move to medium priority.
expect(quadtree._tileLoadQueueHigh.length).toBe(1);
expect(quadtree._tileLoadQueueHigh).toContain(
- quadtree._levelZeroTiles[1],
+ quadtree._levelZeroTiles[1]
);
expect(quadtree._tileLoadQueueMedium.length).toBe(1);
expect(quadtree._tileLoadQueueMedium).toContain(
- quadtree._levelZeroTiles[0],
+ quadtree._levelZeroTiles[0]
);
expect(quadtree._tileLoadQueueLow.length).toBe(0);
});
@@ -1150,27 +1148,27 @@ describe("Scene/QuadtreePrimitive", function () {
expect(quadtree._tilesToRender[0]).toBe(east.northwestChild);
expect(
quadtree._tilesToRender[1] === east.southwestChild ||
- quadtree._tilesToRender[1] === east.northeastChild,
+ quadtree._tilesToRender[1] === east.northeastChild
).toBe(true);
expect(
quadtree._tilesToRender[2] === east.southwestChild ||
- quadtree._tilesToRender[2] === east.northeastChild,
+ quadtree._tilesToRender[2] === east.northeastChild
).toBe(true);
expect(quadtree._tilesToRender[3]).toBe(east.southeastChild);
expect(quadtree._tilesToRender[4]).toBe(west.northeastChild);
expect(
quadtree._tilesToRender[5] === west.northwestChild ||
- quadtree._tilesToRender[5] === west.southeastChild,
+ quadtree._tilesToRender[5] === west.southeastChild
).toBe(true);
expect(
quadtree._tilesToRender[6] === west.northwestChild ||
- quadtree._tilesToRender[6] === west.southeastChild,
+ quadtree._tilesToRender[6] === west.southeastChild
).toBe(true);
expect(quadtree._tilesToRender[7]).toBe(west.southwestChild);
});
});
},
- "WebGL",
+ "WebGL"
);
// Sets the camera to look at a given cartographic position from a distance
@@ -1178,8 +1176,9 @@ describe("Scene/QuadtreePrimitive", function () {
// a given tile level and no further.
function setCameraPosition(quadtree, frameState, position, level) {
const camera = frameState.camera;
- const geometricError =
- quadtree.tileProvider.getLevelMaximumGeometricError(level);
+ const geometricError = quadtree.tileProvider.getLevelMaximumGeometricError(
+ level
+ );
const sse = quadtree.maximumScreenSpaceError * 0.8;
const sseDenominator = camera.frustum.sseDenominator;
const height = frameState.context.drawingBufferHeight;
diff --git a/packages/engine/Specs/Scene/QuadtreeTileSpec.js b/packages/engine/Specs/Scene/QuadtreeTileSpec.js
index 5a315ef2dc30..2e6d6c7edcb9 100644
--- a/packages/engine/Specs/Scene/QuadtreeTileSpec.js
+++ b/packages/engine/Specs/Scene/QuadtreeTileSpec.js
@@ -29,7 +29,7 @@ describe("Scene/QuadtreeTile", function () {
-CesiumMath.PI_OVER_FOUR,
0.0,
CesiumMath.PI_OVER_FOUR,
- CesiumMath.PI_OVER_FOUR,
+ CesiumMath.PI_OVER_FOUR
),
x: 0,
y: 0,
@@ -58,7 +58,7 @@ describe("Scene/QuadtreeTile", function () {
const rectangle = desc.tilingScheme.tileXYToRectangle(
desc.x,
desc.y,
- desc.level,
+ desc.level
);
expect(tile.rectangle).toEqual(rectangle);
});
@@ -365,16 +365,16 @@ describe("Scene/QuadtreeTile", function () {
const southeast = tiles[3];
expect(northeast.rectangle.west).toBeGreaterThan(
- northwest.rectangle.west,
+ northwest.rectangle.west
);
expect(southeast.rectangle.west).toBeGreaterThan(
- southwest.rectangle.west,
+ southwest.rectangle.west
);
expect(northeast.rectangle.south).toBeGreaterThan(
- southeast.rectangle.south,
+ southeast.rectangle.south
);
expect(northwest.rectangle.south).toBeGreaterThan(
- southwest.rectangle.south,
+ southwest.rectangle.south
);
});
});
diff --git a/packages/engine/Specs/Scene/ResourceCacheKeySpec.js b/packages/engine/Specs/Scene/ResourceCacheKeySpec.js
index ef57c948ffa3..3195ee6c71e3 100644
--- a/packages/engine/Specs/Scene/ResourceCacheKeySpec.js
+++ b/packages/engine/Specs/Scene/ResourceCacheKeySpec.js
@@ -369,7 +369,7 @@ describe("ResourceCacheKey", function () {
});
expect(cacheKey).toBe(
- "buffer-view:https://example.com/resources/external.bin-range-0-100",
+ "buffer-view:https://example.com/resources/external.bin-range-0-100"
);
});
@@ -440,7 +440,7 @@ describe("ResourceCacheKey", function () {
});
expect(cacheKey).toBe(
- "draco:https://example.com/resources/external.bin-range-0-100",
+ "draco:https://example.com/resources/external.bin-range-0-100"
);
});
@@ -508,7 +508,7 @@ describe("ResourceCacheKey", function () {
});
expect(cacheKey).toBe(
- "vertex-buffer:https://example.com/resources/external.bin-range-0-40-buffer-context-01234",
+ "vertex-buffer:https://example.com/resources/external.bin-range-0-40-buffer-context-01234"
);
});
@@ -527,7 +527,7 @@ describe("ResourceCacheKey", function () {
});
expect(cacheKey).toBe(
- "vertex-buffer:https://example.com/resources/external.bin-range-0-100-draco-POSITION-buffer-context-01234",
+ "vertex-buffer:https://example.com/resources/external.bin-range-0-100-draco-POSITION-buffer-context-01234"
);
});
@@ -543,7 +543,7 @@ describe("ResourceCacheKey", function () {
});
expect(cacheKey).toBe(
- "vertex-buffer:https://example.com/resources/external.bin-range-0-40-dequantize-buffer-context-01234",
+ "vertex-buffer:https://example.com/resources/external.bin-range-0-40-dequantize-buffer-context-01234"
);
});
@@ -558,7 +558,7 @@ describe("ResourceCacheKey", function () {
});
expect(cacheKey).toBe(
- "vertex-buffer:https://example.com/resources/external.bin-range-0-40-typed-array",
+ "vertex-buffer:https://example.com/resources/external.bin-range-0-40-typed-array"
);
});
@@ -574,7 +574,7 @@ describe("ResourceCacheKey", function () {
});
expect(cacheKey).toBe(
- "vertex-buffer:https://example.com/resources/external.bin-range-0-40-buffer-context-01234-typed-array",
+ "vertex-buffer:https://example.com/resources/external.bin-range-0-40-buffer-context-01234-typed-array"
);
});
@@ -695,7 +695,7 @@ describe("ResourceCacheKey", function () {
});
expect(cacheKey).toBe(
- "index-buffer:https://example.com/resources/external.bin-accessor-80-5123-SCALAR-36-buffer-context-01234",
+ "index-buffer:https://example.com/resources/external.bin-accessor-80-5123-SCALAR-36-buffer-context-01234"
);
});
@@ -714,7 +714,7 @@ describe("ResourceCacheKey", function () {
});
expect(cacheKey).toBe(
- "index-buffer:https://example.com/resources/external.bin-range-0-100-draco-buffer-context-01234",
+ "index-buffer:https://example.com/resources/external.bin-range-0-100-draco-buffer-context-01234"
);
});
@@ -729,7 +729,7 @@ describe("ResourceCacheKey", function () {
});
expect(cacheKey).toBe(
- "index-buffer:https://example.com/resources/external.bin-accessor-80-5123-SCALAR-36-typed-array",
+ "index-buffer:https://example.com/resources/external.bin-accessor-80-5123-SCALAR-36-typed-array"
);
});
@@ -745,7 +745,7 @@ describe("ResourceCacheKey", function () {
});
expect(cacheKey).toBe(
- "index-buffer:https://example.com/resources/external.bin-accessor-80-5123-SCALAR-36-buffer-context-01234-typed-array",
+ "index-buffer:https://example.com/resources/external.bin-accessor-80-5123-SCALAR-36-buffer-context-01234-typed-array"
);
});
@@ -835,7 +835,7 @@ describe("ResourceCacheKey", function () {
});
expect(cacheKey).toBe(
- "image:https://example.com/resources/external.bin-range-0-100",
+ "image:https://example.com/resources/external.bin-range-0-100"
);
});
@@ -897,7 +897,7 @@ describe("ResourceCacheKey", function () {
});
expect(cacheKey).toBe(
- "texture:https://example.com/resources/image.png-sampler-10497-10497-9729-9729-context-01234",
+ "texture:https://example.com/resources/image.png-sampler-10497-10497-9729-9729-context-01234"
);
});
@@ -915,7 +915,7 @@ describe("ResourceCacheKey", function () {
});
expect(cacheKey).toBe(
- "texture:https://example.com/resources/external.bin-range-0-100-sampler-33071-33648-9984-9728-context-01234",
+ "texture:https://example.com/resources/external.bin-range-0-100-sampler-33071-33648-9984-9728-context-01234"
);
});
@@ -935,7 +935,7 @@ describe("ResourceCacheKey", function () {
});
expect(cacheKey).toBe(
- "texture:https://example.com/resources/image.webp-sampler-10497-10497-9729-9729-context-01234",
+ "texture:https://example.com/resources/image.webp-sampler-10497-10497-9729-9729-context-01234"
);
});
@@ -953,7 +953,7 @@ describe("ResourceCacheKey", function () {
});
expect(cacheKey).toBe(
- "texture:https://example.com/resources/image.png-sampler-10497-10497-9729-9729-context-01234",
+ "texture:https://example.com/resources/image.png-sampler-10497-10497-9729-9729-context-01234"
);
});
@@ -973,7 +973,7 @@ describe("ResourceCacheKey", function () {
});
expect(cacheKey).toBe(
- "texture:https://example.com/resources/image.ktx2-sampler-10497-10497-9729-9729-context-01234",
+ "texture:https://example.com/resources/image.ktx2-sampler-10497-10497-9729-9729-context-01234"
);
});
@@ -991,7 +991,7 @@ describe("ResourceCacheKey", function () {
});
expect(cacheKey).toBe(
- "texture:https://example.com/resources/image.png-sampler-10497-10497-9729-9729-context-01234",
+ "texture:https://example.com/resources/image.png-sampler-10497-10497-9729-9729-context-01234"
);
});
diff --git a/packages/engine/Specs/Scene/ResourceCacheSpec.js b/packages/engine/Specs/Scene/ResourceCacheSpec.js
index bf1540d4e976..aaded214a56a 100644
--- a/packages/engine/Specs/Scene/ResourceCacheSpec.js
+++ b/packages/engine/Specs/Scene/ResourceCacheSpec.js
@@ -263,7 +263,7 @@ describe("ResourceCache", function () {
it("destroys resource when reference count reaches 0", function () {
const destroy = spyOn(
MetadataSchemaLoader.prototype,
- "destroy",
+ "destroy"
).and.callThrough();
const cacheKey = ResourceCacheKey.getSchemaCacheKey({
@@ -373,7 +373,7 @@ describe("ResourceCache", function () {
expect(
ResourceCache.getSchemaLoader({
schema: schemaJson,
- }),
+ })
).toBe(schemaLoader);
expect(cacheEntry.referenceCount).toBe(2);
@@ -400,7 +400,7 @@ describe("ResourceCache", function () {
parentResource: bufferParentResource,
bufferId: 0,
typedArray: bufferTypedArray,
- }),
+ })
).toBe(bufferLoader);
expect(cacheEntry.referenceCount).toBe(2);
@@ -411,7 +411,7 @@ describe("ResourceCache", function () {
ResourceCache.getEmbeddedBufferLoader({
bufferId: 0,
typedArray: bufferTypedArray,
- }),
+ })
).toThrowDeveloperError();
});
@@ -420,7 +420,7 @@ describe("ResourceCache", function () {
ResourceCache.getEmbeddedBufferLoader({
parentResource: bufferParentResource,
typedArray: bufferTypedArray,
- }),
+ })
).toThrowDeveloperError();
});
@@ -429,7 +429,7 @@ describe("ResourceCache", function () {
ResourceCache.getEmbeddedBufferLoader({
parentResource: bufferParentResource,
bufferId: 0,
- }),
+ })
).toThrowDeveloperError();
});
@@ -449,7 +449,7 @@ describe("ResourceCache", function () {
expect(
ResourceCache.getExternalBufferLoader({
resource: bufferResource,
- }),
+ })
).toBe(bufferLoader);
expect(cacheEntry.referenceCount).toBe(2);
@@ -459,7 +459,7 @@ describe("ResourceCache", function () {
expect(() =>
ResourceCache.getExternalBufferLoader({
resource: undefined,
- }),
+ })
).toThrowDeveloperError();
});
@@ -481,7 +481,7 @@ describe("ResourceCache", function () {
ResourceCache.getGltfJsonLoader({
gltfResource: gltfResource,
baseResource: gltfResource,
- }),
+ })
).toBe(gltfJsonLoader);
expect(cacheEntry.referenceCount).toBe(2);
@@ -492,7 +492,7 @@ describe("ResourceCache", function () {
ResourceCache.getGltfJsonLoader({
gltfResource: undefined,
baseResource: gltfResource,
- }),
+ })
).toThrowDeveloperError();
});
@@ -501,7 +501,7 @@ describe("ResourceCache", function () {
ResourceCache.getGltfJsonLoader({
gltfResource: gltfResource,
baseResource: undefined,
- }),
+ })
).toThrowDeveloperError();
});
@@ -530,7 +530,7 @@ describe("ResourceCache", function () {
bufferViewId: 0,
gltfResource: gltfResource,
baseResource: gltfResource,
- }),
+ })
).toBe(bufferViewLoader);
expect(cacheEntry.referenceCount).toBe(2);
@@ -543,7 +543,7 @@ describe("ResourceCache", function () {
bufferViewId: 0,
gltfResource: gltfResource,
baseResource: gltfResource,
- }),
+ })
).toThrowDeveloperError();
});
@@ -554,7 +554,7 @@ describe("ResourceCache", function () {
bufferViewId: undefined,
gltfResource: gltfResource,
baseResource: gltfResource,
- }),
+ })
).toThrowDeveloperError();
});
@@ -565,7 +565,7 @@ describe("ResourceCache", function () {
bufferViewId: 0,
gltfResource: undefined,
baseResource: gltfResource,
- }),
+ })
).toThrowDeveloperError();
});
@@ -576,7 +576,7 @@ describe("ResourceCache", function () {
bufferViewId: 0,
gltfResource: gltfResource,
baseResource: undefined,
- }),
+ })
).toThrowDeveloperError();
});
@@ -606,7 +606,7 @@ describe("ResourceCache", function () {
draco: dracoExtension,
gltfResource: gltfResource,
baseResource: gltfResource,
- }),
+ })
).toBe(dracoLoader);
expect(cacheEntry.referenceCount).toBe(2);
@@ -619,7 +619,7 @@ describe("ResourceCache", function () {
draco: dracoExtension,
gltfResource: gltfResource,
baseResource: gltfResource,
- }),
+ })
).toThrowDeveloperError();
});
@@ -630,7 +630,7 @@ describe("ResourceCache", function () {
draco: undefined,
gltfResource: gltfResource,
baseResource: gltfResource,
- }),
+ })
).toThrowDeveloperError();
});
@@ -641,7 +641,7 @@ describe("ResourceCache", function () {
draco: dracoExtension,
gltfResource: undefined,
baseResource: gltfResource,
- }),
+ })
).toThrowDeveloperError();
});
@@ -652,7 +652,7 @@ describe("ResourceCache", function () {
draco: dracoExtension,
gltfResource: gltfResource,
baseResource: undefined,
- }),
+ })
).toThrowDeveloperError();
});
@@ -689,7 +689,7 @@ describe("ResourceCache", function () {
frameState: mockFrameState,
bufferViewId: 0,
loadBuffer: true,
- }),
+ })
).toBe(vertexBufferLoader);
expect(cacheEntry.referenceCount).toBe(2);
@@ -732,7 +732,7 @@ describe("ResourceCache", function () {
attributeSemantic: "POSITION",
accessorId: 0,
loadBuffer: true,
- }),
+ })
).toBe(vertexBufferLoader);
expect(cacheEntry.referenceCount).toBe(2);
@@ -774,7 +774,7 @@ describe("ResourceCache", function () {
frameState: mockFrameState,
bufferViewId: 0,
loadBuffer: true,
- }),
+ })
).toThrowDeveloperError();
});
@@ -787,7 +787,7 @@ describe("ResourceCache", function () {
frameState: mockFrameState,
bufferViewId: 0,
loadBuffer: true,
- }),
+ })
).toThrowDeveloperError();
});
@@ -800,7 +800,7 @@ describe("ResourceCache", function () {
frameState: mockFrameState,
bufferViewId: 0,
loadBuffer: true,
- }),
+ })
).toThrowDeveloperError();
});
@@ -813,7 +813,7 @@ describe("ResourceCache", function () {
frameState: undefined,
bufferViewId: 0,
loadBuffer: true,
- }),
+ })
).toThrowDeveloperError();
});
@@ -829,7 +829,7 @@ describe("ResourceCache", function () {
attributeSemantic: "POSITION",
accessorId: 0,
loadBuffer: true,
- }),
+ })
).toThrowDeveloperError();
});
@@ -841,7 +841,7 @@ describe("ResourceCache", function () {
baseResource: gltfResource,
frameState: mockFrameState,
loadBuffer: true,
- }),
+ })
).toThrowDeveloperError();
});
@@ -856,7 +856,7 @@ describe("ResourceCache", function () {
attributeSemantic: undefined,
accessorId: 0,
loadBuffer: true,
- }),
+ })
).toThrowDeveloperError();
});
@@ -871,7 +871,7 @@ describe("ResourceCache", function () {
attributeSemantic: "POSITION",
accessorId: undefined,
loadBuffer: true,
- }),
+ })
).toThrowDeveloperError();
});
@@ -885,7 +885,7 @@ describe("ResourceCache", function () {
bufferViewId: 0,
loadBuffer: false,
loadTypedArray: false,
- }),
+ })
).toThrowDeveloperError();
});
@@ -921,7 +921,7 @@ describe("ResourceCache", function () {
baseResource: gltfResource,
frameState: mockFrameState,
loadBuffer: true,
- }),
+ })
).toBe(indexBufferLoader);
expect(cacheEntry.referenceCount).toBe(2);
@@ -962,7 +962,7 @@ describe("ResourceCache", function () {
frameState: mockFrameState,
draco: dracoExtension,
loadBuffer: true,
- }),
+ })
).toBe(indexBufferLoader);
expect(cacheEntry.referenceCount).toBe(2);
@@ -1002,7 +1002,7 @@ describe("ResourceCache", function () {
baseResource: gltfResource,
frameState: mockFrameState,
loadBuffer: true,
- }),
+ })
).toThrowDeveloperError();
});
@@ -1015,7 +1015,7 @@ describe("ResourceCache", function () {
baseResource: gltfResource,
frameState: mockFrameState,
loadBuffer: true,
- }),
+ })
).toThrowDeveloperError();
});
@@ -1028,7 +1028,7 @@ describe("ResourceCache", function () {
baseResource: gltfResource,
frameState: mockFrameState,
loadBuffer: true,
- }),
+ })
).toThrowDeveloperError();
});
@@ -1041,7 +1041,7 @@ describe("ResourceCache", function () {
baseResource: undefined,
frameState: mockFrameState,
loadBuffer: true,
- }),
+ })
).toThrowDeveloperError();
});
@@ -1054,7 +1054,7 @@ describe("ResourceCache", function () {
baseResource: gltfResource,
frameState: undefined,
loadBuffer: true,
- }),
+ })
).toThrowDeveloperError();
});
@@ -1068,7 +1068,7 @@ describe("ResourceCache", function () {
frameState: mockFrameState,
loadBuffer: false,
loadTypedArray: false,
- }),
+ })
).toThrowDeveloperError();
});
@@ -1097,7 +1097,7 @@ describe("ResourceCache", function () {
imageId: 0,
gltfResource: gltfResource,
baseResource: gltfResource,
- }),
+ })
).toBe(imageLoader);
expect(cacheEntry.referenceCount).toBe(2);
@@ -1110,7 +1110,7 @@ describe("ResourceCache", function () {
imageId: 0,
gltfResource: gltfResource,
baseResource: gltfResource,
- }),
+ })
).toThrowDeveloperError();
});
@@ -1121,7 +1121,7 @@ describe("ResourceCache", function () {
imageId: undefined,
gltfResource: gltfResource,
baseResource: gltfResource,
- }),
+ })
).toThrowDeveloperError();
});
@@ -1132,7 +1132,7 @@ describe("ResourceCache", function () {
imageId: 0,
gltfResource: undefined,
baseResource: gltfResource,
- }),
+ })
).toThrowDeveloperError();
});
@@ -1143,7 +1143,7 @@ describe("ResourceCache", function () {
imageId: 0,
gltfResource: gltfResource,
baseResource: undefined,
- }),
+ })
).toThrowDeveloperError();
});
@@ -1178,7 +1178,7 @@ describe("ResourceCache", function () {
baseResource: gltfResource,
frameState: mockFrameState,
supportedImageFormats: new SupportedImageFormats(),
- }),
+ })
).toBe(textureLoader);
expect(cacheEntry.referenceCount).toBe(2);
@@ -1218,7 +1218,7 @@ describe("ResourceCache", function () {
baseResource: gltfResource,
supportedImageFormats: new SupportedImageFormats(),
frameState: mockFrameState,
- }),
+ })
).toThrowDeveloperError();
});
@@ -1231,7 +1231,7 @@ describe("ResourceCache", function () {
baseResource: gltfResource,
supportedImageFormats: new SupportedImageFormats(),
frameState: mockFrameState,
- }),
+ })
).toThrowDeveloperError();
});
@@ -1244,7 +1244,7 @@ describe("ResourceCache", function () {
baseResource: gltfResource,
supportedImageFormats: new SupportedImageFormats(),
frameState: mockFrameState,
- }),
+ })
).toThrowDeveloperError();
});
@@ -1257,7 +1257,7 @@ describe("ResourceCache", function () {
baseResource: undefined,
supportedImageFormats: new SupportedImageFormats(),
frameState: mockFrameState,
- }),
+ })
).toThrowDeveloperError();
});
@@ -1270,7 +1270,7 @@ describe("ResourceCache", function () {
baseResource: gltfResource,
supportedImageFormats: undefined,
frameState: mockFrameState,
- }),
+ })
).toThrowDeveloperError();
});
@@ -1283,7 +1283,7 @@ describe("ResourceCache", function () {
baseResource: gltfResource,
supportedImageFormats: new SupportedImageFormats(),
frameState: undefined,
- }),
+ })
).toThrowDeveloperError();
});
});
diff --git a/packages/engine/Specs/Scene/SceneSpec.js b/packages/engine/Specs/Scene/SceneSpec.js
index a2f21c789697..5a6a69a34928 100644
--- a/packages/engine/Specs/Scene/SceneSpec.js
+++ b/packages/engine/Specs/Scene/SceneSpec.js
@@ -85,7 +85,7 @@ const propertyValueEpsilon = 0.01;
*/
function createEmbeddedGltfWithPropertyTexture(
schema,
- propertyTextureProperties,
+ propertyTextureProperties
) {
const result = {
extensions: {
@@ -144,7 +144,8 @@ function createEmbeddedGltfWithPropertyTexture(
},
buffers: [
{
- uri: "data:application/gltf-buffer;base64,AAABAAIAAQADAAIAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAA",
+ uri:
+ "data:application/gltf-buffer;base64,AAABAAIAAQADAAIAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAA",
byteLength: 156,
},
],
@@ -167,7 +168,8 @@ function createEmbeddedGltfWithPropertyTexture(
{
// A 16x16 pixels image that contains all combinations of
// (0, 127, 255) in its upper-left 9x9 pixels
- uri: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAi0lEQVR42u2RUQ6AMAhDd3OO/qQt8VP8NRHjNpf0leI5ruqXbNVL4c9Dn+E8ljV+iLaXaoAY1YDaADaynBg2gFZLR1+wAdJEWZpW1AIVqmjCruqybw4qnEJbbQBHdWoS2XIUXdp+F8DNUOpM0tIZCusQJrzHNTnsOy2pFTZ7xpKhYFUu4M1v+OvrdQGABqEpS2kSLgAAAABJRU5ErkJggg==",
+ uri:
+ "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAi0lEQVR42u2RUQ6AMAhDd3OO/qQt8VP8NRHjNpf0leI5ruqXbNVL4c9Dn+E8ljV+iLaXaoAY1YDaADaynBg2gFZLR1+wAdJEWZpW1AIVqmjCruqybw4qnEJbbQBHdWoS2XIUXdp+F8DNUOpM0tIZCusQJrzHNTnsOy2pFTZ7xpKhYFUu4M1v+OvrdQGABqEpS2kSLgAAAABJRU5ErkJggg==",
mimeType: "image/png",
},
],
@@ -309,7 +311,8 @@ function createPropertyTextureGltfScalarArray() {
name: "Example class",
properties: {
example_fixed_length_UINT8_SCALAR_array: {
- name: "Example fixed-length SCALAR array property with UINT8 components",
+ name:
+ "Example fixed-length SCALAR array property with UINT8 components",
type: "SCALAR",
componentType: "UINT8",
array: true,
@@ -477,7 +480,7 @@ async function loadAsModel(scene, gltf) {
scene.renderForSpecs();
return model.ready;
},
- { timeout: 10000 },
+ { timeout: 10000 }
);
}
@@ -521,7 +524,7 @@ function pickMetadataAt(scene, schemaId, className, propertyName, x, y) {
screenPosition,
schemaId,
className,
- propertyName,
+ propertyName
);
return metadataValue;
}
@@ -563,7 +566,7 @@ describe(
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
Resource._DefaultImplementations.loadWithXhr(
path,
@@ -571,14 +574,14 @@ describe(
method,
data,
headers,
- deferred,
+ deferred
);
};
}
function returnQuantizedMeshTileJson() {
return returnTileJson(
- "Data/CesiumTerrainTileJson/QuantizedMesh.tile.json",
+ "Data/CesiumTerrainTileJson/QuantizedMesh.tile.json"
);
}
@@ -608,7 +611,7 @@ describe(
expect(scene.primitives).toBeInstanceOf(PrimitiveCollection);
expect(scene.camera).toBeInstanceOf(Camera);
expect(scene.screenSpaceCameraController).toBeInstanceOf(
- ScreenSpaceCameraController,
+ ScreenSpaceCameraController
);
expect(scene.mapProjection).toBeInstanceOf(GeographicProjection);
expect(scene.frameState).toBeInstanceOf(FrameState);
@@ -660,14 +663,14 @@ describe(
expect(contextAttributes.stencil).toEqual(webglOptions.stencil);
expect(contextAttributes.antialias).toEqual(webglOptions.antialias);
expect(contextAttributes.premultipliedAlpha).toEqual(
- webglOptions.premultipliedAlpha,
+ webglOptions.premultipliedAlpha
);
expect(contextAttributes.preserveDrawingBuffer).toEqual(
- webglOptions.preserveDrawingBuffer,
+ webglOptions.preserveDrawingBuffer
);
expect(s.mapProjection).toEqual(mapProjection);
expect(s._depthPlane._ellipsoidOffset).toEqual(
- Number.POSITIVE_INFINITY,
+ Number.POSITIVE_INFINITY
);
s.destroyForSpecs();
@@ -767,7 +770,7 @@ describe(
const center = Cartesian3.add(
scene.camera.position,
scene.camera.direction,
- new Cartesian3(),
+ new Cartesian3()
);
const c = new DrawCommand({
@@ -801,15 +804,16 @@ describe(
c.execute = function () {};
const originalShallowClone = DrawCommand.shallowClone;
- spyOn(DrawCommand, "shallowClone").and.callFake(
- function (command, result) {
- result = originalShallowClone(command, result);
- result.execute = function () {
- result.uniformMap.debugShowCommandsColor();
- };
- return result;
- },
- );
+ spyOn(DrawCommand, "shallowClone").and.callFake(function (
+ command,
+ result
+ ) {
+ result = originalShallowClone(command, result);
+ result.execute = function () {
+ result.uniformMap.debugShowCommandsColor();
+ };
+ return result;
+ });
scene.primitives.add(new CommandMockPrimitive(c));
@@ -836,7 +840,7 @@ describe(
1.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const rectanglePrimitive2 = createRectangle(rectangle, 1000.0);
@@ -844,7 +848,7 @@ describe(
0.0,
1.0,
0.0,
- 0.5,
+ 0.5
);
const primitives = scene.primitives;
@@ -874,7 +878,7 @@ describe(
1.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const rectanglePrimitive2 = createRectangle(rectangle);
@@ -882,7 +886,7 @@ describe(
0.0,
1.0,
0.0,
- 0.5,
+ 0.5
);
const primitives = scene.primitives;
@@ -912,7 +916,7 @@ describe(
1.0,
0.0,
0.0,
- 0.5,
+ 0.5
);
const primitives = scene.primitives;
@@ -975,7 +979,7 @@ describe(
1.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const primitives = scene.primitives;
@@ -1036,7 +1040,7 @@ describe(
s.camera.up = Cartesian3.clone(Cartesian3.UNIT_Z);
s.camera.direction = Cartesian3.negate(
Cartesian3.normalize(s.camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
return expect(s).toRenderAndCall(function () {
@@ -1054,7 +1058,7 @@ describe(
s.camera.up = Cartesian3.clone(Cartesian3.UNIT_Z);
s.camera.direction = Cartesian3.negate(
Cartesian3.normalize(s.camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
return expect(s).toRenderAndCall(function () {
@@ -1072,7 +1076,7 @@ describe(
s.camera.up = Cartesian3.clone(Cartesian3.UNIT_Z);
s.camera.direction = Cartesian3.negate(
Cartesian3.normalize(s.camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
return expect(s).toRenderAndCall(function () {
@@ -1090,7 +1094,7 @@ describe(
s.camera.up = Cartesian3.clone(Cartesian3.UNIT_Z);
s.camera.direction = Cartesian3.negate(
Cartesian3.normalize(s.camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
return expect(s).toRenderAndCall(function () {
@@ -1108,7 +1112,7 @@ describe(
s.camera.up = Cartesian3.clone(Cartesian3.UNIT_Z);
s.camera.direction = Cartesian3.negate(
Cartesian3.normalize(s.camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
return expect(s).toRenderAndCall(function () {
render(s.frameState, s.globe);
@@ -1125,7 +1129,7 @@ describe(
s.camera.up = Cartesian3.clone(Cartesian3.UNIT_Z);
s.camera.direction = Cartesian3.negate(
Cartesian3.normalize(s.camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
return expect(s).toRenderAndCall(function () {
@@ -1143,7 +1147,7 @@ describe(
s.camera.up = Cartesian3.clone(Cartesian3.UNIT_Z);
s.camera.direction = Cartesian3.negate(
Cartesian3.normalize(s.camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
return expect(s).toRenderAndCall(function () {
@@ -1169,7 +1173,7 @@ describe(
1.0,
0.0,
0.0,
- 0.5,
+ 0.5
);
const primitives = scene.primitives;
@@ -1198,7 +1202,7 @@ describe(
1.0,
0.0,
0.0,
- 0.5,
+ 0.5
);
const primitives = scene.primitives;
@@ -1223,7 +1227,7 @@ describe(
1.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const primitives = scene.primitives;
@@ -1233,7 +1237,7 @@ describe(
destination: new Cartesian3(
Ellipsoid.WGS84.maximumRadius * Math.PI + 10000.0,
0.0,
- 10.0,
+ 10.0
),
convert: false,
});
@@ -1258,7 +1262,7 @@ describe(
1.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const primitives = s.primitives;
@@ -1268,7 +1272,7 @@ describe(
destination: new Cartesian3(
Ellipsoid.WGS84.maximumRadius * Math.PI,
0.0,
- 10.0,
+ 10.0
),
convert: false,
});
@@ -1296,7 +1300,7 @@ describe(
4.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const primitives = scene.primitives;
@@ -1323,7 +1327,7 @@ describe(
1.0,
0.0,
0.0,
- 0.5,
+ 0.5
);
const primitives = scene.primitives;
@@ -1349,7 +1353,7 @@ describe(
const canvas = scene.canvas;
const windowPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
expect(scene).toRenderAndCall(function () {
@@ -1361,7 +1365,7 @@ describe(
1.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const primitives = scene.primitives;
@@ -1389,7 +1393,7 @@ describe(
const canvas = scene.canvas;
const windowPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
expect(scene).toRenderAndCall(function () {
@@ -1401,7 +1405,7 @@ describe(
1.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const primitives = scene.primitives;
@@ -1429,7 +1433,7 @@ describe(
const canvas = scene.canvas;
const windowPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
expect(scene).toRenderAndCall(function () {
@@ -1441,7 +1445,7 @@ describe(
1.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const primitives = scene.primitives;
@@ -1469,7 +1473,7 @@ describe(
const canvas = scene.canvas;
const windowPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const rectanglePrimitive = createRectangle(rectangle);
@@ -1477,7 +1481,7 @@ describe(
1.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const primitives = scene.primitives;
@@ -1509,17 +1513,17 @@ describe(
const canvas = scene.canvas;
const windowPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const rectanglePrimitive = scene.primitives.add(
- createRectangle(rectangle),
+ createRectangle(rectangle)
);
rectanglePrimitive.appearance.material.uniforms.color = new Color(
1.0,
0.0,
0.0,
- 0.5,
+ 0.5
);
scene.useDepthPicking = true;
@@ -1547,22 +1551,22 @@ describe(
const canvas = scene.canvas;
const windowPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
spyOn(
SceneTransforms,
- "transformWindowToDrawingBuffer",
+ "transformWindowToDrawingBuffer"
).and.callThrough();
expect(scene).toRenderAndCall(function () {
scene.pickPosition(windowPosition);
expect(
- SceneTransforms.transformWindowToDrawingBuffer,
+ SceneTransforms.transformWindowToDrawingBuffer
).toHaveBeenCalled();
scene.pickPosition(windowPosition);
expect(
- SceneTransforms.transformWindowToDrawingBuffer.calls.count(),
+ SceneTransforms.transformWindowToDrawingBuffer.calls.count()
).toEqual(1);
const rectanglePrimitive = createRectangle(rectangle);
@@ -1570,7 +1574,7 @@ describe(
1.0,
0.0,
0.0,
- 1.0,
+ 1.0
);
const primitives = scene.primitives;
@@ -1580,12 +1584,12 @@ describe(
expect(scene).toRenderAndCall(function () {
scene.pickPosition(windowPosition);
expect(
- SceneTransforms.transformWindowToDrawingBuffer.calls.count(),
+ SceneTransforms.transformWindowToDrawingBuffer.calls.count()
).toEqual(2);
scene.pickPosition(windowPosition);
expect(
- SceneTransforms.transformWindowToDrawingBuffer.calls.count(),
+ SceneTransforms.transformWindowToDrawingBuffer.calls.count()
).toEqual(2);
});
});
@@ -1743,7 +1747,7 @@ describe(
scene.render();
scene.camera.lookLeft(
- scene.camera.frustum.fov * (scene.camera.percentageChanged + 0.1),
+ scene.camera.frustum.fov * (scene.camera.percentageChanged + 0.1)
);
scene.initializeFrame();
@@ -1767,7 +1771,7 @@ describe(
scene.render();
scene.camera.twistLeft(
- CesiumMath.PI * (scene.camera.percentageChanged + 0.1),
+ CesiumMath.PI * (scene.camera.percentageChanged + 0.1)
);
scene.initializeFrame();
@@ -1788,7 +1792,7 @@ describe(
scene.render();
scene.camera.twistLeft(
- CesiumMath.PI * (scene.camera.percentageChanged + 0.1),
+ CesiumMath.PI * (scene.camera.percentageChanged + 0.1)
);
scene.initializeFrame();
@@ -1810,7 +1814,7 @@ describe(
scene.camera.moveUp(
scene.camera.positionCartographic.height *
- (scene.camera.percentageChanged + 0.1),
+ (scene.camera.percentageChanged + 0.1)
);
scene.initializeFrame();
@@ -1835,7 +1839,7 @@ describe(
scene.camera.moveLeft(
scene.camera.positionCartographic.height *
- (scene.camera.percentageChanged + 0.1),
+ (scene.camera.percentageChanged + 0.1)
);
scene.initializeFrame();
@@ -1870,7 +1874,7 @@ describe(
1.0,
0.0,
0.0,
- 0.5,
+ 0.5
);
const primitives = scene.primitives;
@@ -1896,7 +1900,7 @@ describe(
1.0,
0.0,
0.0,
- 0.5,
+ 0.5
);
const primitives = scene.primitives;
@@ -1923,7 +1927,7 @@ describe(
expect(SceneTransforms.worldToWindowCoordinates).toHaveBeenCalledWith(
scene,
mockPosition,
- undefined,
+ undefined
);
});
@@ -1936,7 +1940,7 @@ describe(
expect(SceneTransforms.worldToWindowCoordinates).toHaveBeenCalledWith(
scene,
mockPosition,
- result,
+ result
);
});
@@ -1960,13 +1964,15 @@ describe(
returnQuantizedMeshTileJson();
const globe = (scene.globe = new Globe(Ellipsoid.UNIT_SPHERE));
- scene.terrainProvider =
- await CesiumTerrainProvider.fromUrl("//terrain/tiles");
+ scene.terrainProvider = await CesiumTerrainProvider.fromUrl(
+ "//terrain/tiles"
+ );
expect(scene.terrainProvider).toBe(globe.terrainProvider);
scene.globe = undefined;
- const newProvider =
- await CesiumTerrainProvider.fromUrl("//newTerrain/tiles");
+ const newProvider = await CesiumTerrainProvider.fromUrl(
+ "//newTerrain/tiles"
+ );
expect(function () {
scene.terrainProvider = newProvider;
}).not.toThrow();
@@ -2241,7 +2247,7 @@ describe(
scene.morphTo2D(1.0);
scene.renderForSpecs(
- JulianDate.addSeconds(lastRenderTime, 0.5, new JulianDate()),
+ JulianDate.addSeconds(lastRenderTime, 0.5, new JulianDate())
);
expect(scene.frameState.frameNumber).not.toEqual(lastFrameNumber);
@@ -2256,7 +2262,7 @@ describe(
scene.morphToColumbusView(1.0);
scene.renderForSpecs(
- JulianDate.addSeconds(lastRenderTime, 0.5, new JulianDate()),
+ JulianDate.addSeconds(lastRenderTime, 0.5, new JulianDate())
);
expect(scene.frameState.frameNumber).not.toEqual(lastFrameNumber);
@@ -2271,7 +2277,7 @@ describe(
scene.morphTo3D(1.0);
scene.renderForSpecs(
- JulianDate.addSeconds(lastRenderTime, 0.5, new JulianDate()),
+ JulianDate.addSeconds(lastRenderTime, 0.5, new JulianDate())
);
expect(scene.frameState.frameNumber).not.toEqual(lastFrameNumber);
@@ -2289,7 +2295,7 @@ describe(
const lastFrameNumber = scene.frameState.frameNumber;
const lastRenderTime = JulianDate.clone(
scene.lastRenderTime,
- scratchTime,
+ scratchTime
);
expect(lastRenderTime).toBeDefined();
expect(scene._renderRequested).toBe(false);
@@ -2302,12 +2308,12 @@ describe(
scene.maximumRenderTimeChange = 100.0;
scene.renderForSpecs(
- JulianDate.addSeconds(lastRenderTime, 50.0, new JulianDate()),
+ JulianDate.addSeconds(lastRenderTime, 50.0, new JulianDate())
);
expect(scene.frameState.frameNumber).toEqual(lastFrameNumber);
scene.renderForSpecs(
- JulianDate.addSeconds(lastRenderTime, 150.0, new JulianDate()),
+ JulianDate.addSeconds(lastRenderTime, 150.0, new JulianDate())
);
expect(scene.frameState.frameNumber).not.toEqual(lastFrameNumber);
});
@@ -2318,7 +2324,7 @@ describe(
const lastFrameNumber = scene.frameState.frameNumber;
const lastRenderTime = JulianDate.clone(
scene.lastRenderTime,
- scratchTime,
+ scratchTime
);
expect(lastRenderTime).toBeDefined();
expect(scene._renderRequested).toBe(false);
@@ -2329,7 +2335,7 @@ describe(
const farFuture = JulianDate.addDays(
lastRenderTime,
10000,
- new JulianDate(),
+ new JulianDate()
);
scene.renderForSpecs();
@@ -2377,12 +2383,12 @@ describe(
destination: new Cartesian3(
-588536.1057451078,
-10512475.371849751,
- 6737159.100747835,
+ 6737159.100747835
),
orientation: new HeadingPitchRoll(
6.283185307179586,
-1.5688261558859757,
- 0.0,
+ 0.0
),
});
scene.renderForSpecs();
@@ -2392,12 +2398,12 @@ describe(
destination: new Cartesian3(
-5754647.167415793,
14907694.100240812,
- -483807.2406259497,
+ -483807.2406259497
),
orientation: new HeadingPitchRoll(
6.283185307179586,
-1.5698869547885104,
- 0.0,
+ 0.0
),
});
scene.renderForSpecs();
@@ -2423,12 +2429,12 @@ describe(
destination: new Cartesian3(
-5754647.167415793,
14907694.100240812,
- -483807.2406259497,
+ -483807.2406259497
),
orientation: new HeadingPitchRoll(
6.283185307179586,
-1.5698869547885104,
- 0.0,
+ 0.0
),
});
scene.renderForSpecs();
@@ -2499,12 +2505,12 @@ describe(
destination: new Cartesian3(
-746658.0557573901,
-5644191.0002196245,
- 2863585.099969967,
+ 2863585.099969967
),
orientation: new HeadingPitchRoll(
0.3019699121236403,
0.07316306869231592,
- 0.0007089903642230055,
+ 0.0007089903642230055
),
});
await updateGlobeUntilDone(scene);
@@ -2539,12 +2545,12 @@ describe(
destination: new Cartesian3(
-4643042.379120885,
4314056.579506199,
- -451828.8968118975,
+ -451828.8968118975
),
orientation: new HeadingPitchRoll(
6.283185307179586,
-0.7855491933100796,
- 6.283185307179586,
+ 6.283185307179586
),
});
scene.morphToColumbusView(0.0);
@@ -2563,7 +2569,7 @@ describe(
2.3929070618374535,
-0.07149851443375346,
-25000.0,
- globe.ellipsoid,
+ globe.ellipsoid
);
const radius = 10.0;
@@ -2586,12 +2592,12 @@ describe(
destination: new Cartesian3(
-4643042.379120885,
4314056.579506199,
- -451828.8968118975,
+ -451828.8968118975
),
orientation: new HeadingPitchRoll(
6.283185307179586,
-0.7855491933100796,
- 6.283185307179586,
+ 6.283185307179586
),
});
await updateGlobeUntilDone(scene);
@@ -2608,7 +2614,7 @@ describe(
2.3929070618374535,
-0.07149851443375346,
-25000.0,
- globe.ellipsoid,
+ globe.ellipsoid
);
const radius = 10.0;
@@ -2643,18 +2649,18 @@ describe(
destination: new Cartesian3(
2838477.9315700866,
-4939120.816857662,
- 1978094.4576285738,
+ 1978094.4576285738
),
orientation: new HeadingPitchRoll(
5.955798516387474,
-1.0556025616093283,
- 0.39098563693868016,
+ 0.39098563693868016
),
});
await updateGlobeUntilDone(scene);
const time = JulianDate.fromIso8601(
- "2020-04-25T03:07:26.04924034334544558Z",
+ "2020-04-25T03:07:26.04924034334544558Z"
);
globe.translucency.enabled = true;
globe.translucency.frontFaceAlpha = 0.5;
@@ -2674,12 +2680,12 @@ describe(
destination: new Cartesian3(
2764681.3022502237,
-20999839.371941473,
- 14894754.464869803,
+ 14894754.464869803
),
orientation: new HeadingPitchRoll(
6.283185307179586,
-1.5687983447998315,
- 0,
+ 0
),
});
@@ -2708,12 +2714,12 @@ describe(
destination: new Cartesian3(
-557278.4840232887,
-6744284.200717078,
- 2794079.461722868,
+ 2794079.461722868
),
orientation: new HeadingPitchRoll(
6.283185307179586,
-1.5687983448015541,
- 0,
+ 0
),
});
@@ -2724,7 +2730,7 @@ describe(
}),
attributes: {
color: ColorGeometryInstanceAttribute.fromColor(
- new Color(1.0, 0.0, 0.0, 0.5),
+ new Color(1.0, 0.0, 0.0, 0.5)
),
},
});
@@ -2736,7 +2742,7 @@ describe(
closed: true,
}),
asynchronous: false,
- }),
+ })
);
await updateGlobeUntilDone(scene);
@@ -2756,12 +2762,12 @@ describe(
destination: new Cartesian3(
-557278.4840232887,
-6744284.200717078,
- 2794079.461722868,
+ 2794079.461722868
),
orientation: new HeadingPitchRoll(
6.283185307179586,
-1.5687983448015541,
- 0,
+ 0
),
});
@@ -2772,7 +2778,7 @@ describe(
}),
attributes: {
color: ColorGeometryInstanceAttribute.fromColor(
- new Color(1.0, 0.0, 0.0, 0.5),
+ new Color(1.0, 0.0, 0.0, 0.5)
),
},
});
@@ -2784,7 +2790,7 @@ describe(
closed: true,
}),
asynchronous: false,
- }),
+ })
);
await updateGlobeUntilDone(scene);
@@ -2846,7 +2852,7 @@ describe(
const webglStub = !!window.webglStub;
const defaultDate = JulianDate.fromDate(
- new Date("January 1, 2014 12:00:00 UTC"),
+ new Date("January 1, 2014 12:00:00 UTC")
);
it("throws without windowPosition", async function () {
@@ -2938,13 +2944,13 @@ describe(
const windowPosition = new Cartesian2(
Math.floor(canvasSizeX / 2),
- Math.floor(canvasSizeY / 2),
+ Math.floor(canvasSizeY / 2)
);
const actualMetadataValue = scene.pickMetadata(
windowPosition,
schemaId,
className,
- propertyName,
+ propertyName
);
expect(actualMetadataValue).toBeUndefined();
scene.destroyForSpecs();
@@ -2968,13 +2974,13 @@ describe(
const windowPosition = new Cartesian2(
Math.floor(canvasSizeX / 2),
- Math.floor(canvasSizeY / 2),
+ Math.floor(canvasSizeY / 2)
);
const actualMetadataValue = scene.pickMetadata(
windowPosition,
schemaId,
className,
- propertyName,
+ propertyName
);
expect(actualMetadataValue).toBeUndefined();
scene.destroyForSpecs();
@@ -2994,7 +3000,7 @@ describe(
const windowPosition = new Cartesian2(
Math.floor(canvasSizeX / 2),
- Math.floor(canvasSizeY / 2),
+ Math.floor(canvasSizeY / 2)
);
const metadataSchema = scene.pickMetadataSchema(windowPosition);
@@ -3026,7 +3032,7 @@ describe(
const windowPosition = new Cartesian2(
Math.floor(canvasSizeX / 2),
- Math.floor(canvasSizeY / 2),
+ Math.floor(canvasSizeY / 2)
);
// The pickMetadataSchema call should return the schema that
@@ -3070,7 +3076,7 @@ describe(
className,
propertyName,
0,
- 0,
+ 0
);
const actualMetadataValue1 = pickMetadataAt(
scene,
@@ -3078,7 +3084,7 @@ describe(
className,
propertyName,
0,
- 1,
+ 1
);
const actualMetadataValue2 = pickMetadataAt(
scene,
@@ -3086,7 +3092,7 @@ describe(
className,
propertyName,
0,
- 2,
+ 2
);
const expectedMetadataValue0 = 0;
const expectedMetadataValue1 = 127;
@@ -3094,15 +3100,15 @@ describe(
expect(actualMetadataValue0).toEqualEpsilon(
expectedMetadataValue0,
- propertyValueEpsilon,
+ propertyValueEpsilon
);
expect(actualMetadataValue1).toEqualEpsilon(
expectedMetadataValue1,
- propertyValueEpsilon,
+ propertyValueEpsilon
);
expect(actualMetadataValue2).toEqualEpsilon(
expectedMetadataValue2,
- propertyValueEpsilon,
+ propertyValueEpsilon
);
scene.destroyForSpecs();
});
@@ -3137,7 +3143,7 @@ describe(
className,
propertyName,
0,
- 0,
+ 0
);
const actualMetadataValue1 = pickMetadataAt(
scene,
@@ -3145,7 +3151,7 @@ describe(
className,
propertyName,
3,
- 0,
+ 0
);
const actualMetadataValue2 = pickMetadataAt(
scene,
@@ -3153,7 +3159,7 @@ describe(
className,
propertyName,
6,
- 0,
+ 0
);
const expectedMetadataValue0 = 0.0;
const expectedMetadataValue1 = 0.5;
@@ -3161,15 +3167,15 @@ describe(
expect(actualMetadataValue0).toEqualEpsilon(
expectedMetadataValue0,
- propertyValueEpsilon,
+ propertyValueEpsilon
);
expect(actualMetadataValue1).toEqualEpsilon(
expectedMetadataValue1,
- propertyValueEpsilon,
+ propertyValueEpsilon
);
expect(actualMetadataValue2).toEqualEpsilon(
expectedMetadataValue2,
- propertyValueEpsilon,
+ propertyValueEpsilon
);
scene.destroyForSpecs();
});
@@ -3204,7 +3210,7 @@ describe(
className,
propertyName,
0,
- 0,
+ 0
);
const actualMetadataValue1 = pickMetadataAt(
scene,
@@ -3212,7 +3218,7 @@ describe(
className,
propertyName,
1,
- 1,
+ 1
);
const actualMetadataValue2 = pickMetadataAt(
scene,
@@ -3220,7 +3226,7 @@ describe(
className,
propertyName,
2,
- 2,
+ 2
);
const expectedMetadataValue0 = [0, 0, 0];
const expectedMetadataValue1 = [127, 0, 127];
@@ -3228,15 +3234,15 @@ describe(
expect(actualMetadataValue0).toEqualEpsilon(
expectedMetadataValue0,
- propertyValueEpsilon,
+ propertyValueEpsilon
);
expect(actualMetadataValue1).toEqualEpsilon(
expectedMetadataValue1,
- propertyValueEpsilon,
+ propertyValueEpsilon
);
expect(actualMetadataValue2).toEqualEpsilon(
expectedMetadataValue2,
- propertyValueEpsilon,
+ propertyValueEpsilon
);
scene.destroyForSpecs();
});
@@ -3272,7 +3278,7 @@ describe(
className,
propertyName,
0,
- 0,
+ 0
);
const actualMetadataValue1 = pickMetadataAt(
scene,
@@ -3280,7 +3286,7 @@ describe(
className,
propertyName,
1,
- 1,
+ 1
);
const actualMetadataValue2 = pickMetadataAt(
scene,
@@ -3288,7 +3294,7 @@ describe(
className,
propertyName,
2,
- 2,
+ 2
);
const expectedMetadataValue0 = new Cartesian2(0, 0);
const expectedMetadataValue1 = new Cartesian2(127, 0);
@@ -3296,15 +3302,15 @@ describe(
expect(actualMetadataValue0).toEqualEpsilon(
expectedMetadataValue0,
- propertyValueEpsilon,
+ propertyValueEpsilon
);
expect(actualMetadataValue1).toEqualEpsilon(
expectedMetadataValue1,
- propertyValueEpsilon,
+ propertyValueEpsilon
);
expect(actualMetadataValue2).toEqualEpsilon(
expectedMetadataValue2,
- propertyValueEpsilon,
+ propertyValueEpsilon
);
scene.destroyForSpecs();
});
@@ -3340,7 +3346,7 @@ describe(
className,
propertyName,
0,
- 0,
+ 0
);
const actualMetadataValue1 = pickMetadataAt(
scene,
@@ -3348,7 +3354,7 @@ describe(
className,
propertyName,
1,
- 1,
+ 1
);
const actualMetadataValue2 = pickMetadataAt(
scene,
@@ -3356,7 +3362,7 @@ describe(
className,
propertyName,
2,
- 2,
+ 2
);
const expectedMetadataValue0 = new Cartesian2(0.0, 0.0);
@@ -3365,15 +3371,15 @@ describe(
expect(actualMetadataValue0).toEqualEpsilon(
expectedMetadataValue0,
- propertyValueEpsilon,
+ propertyValueEpsilon
);
expect(actualMetadataValue1).toEqualEpsilon(
expectedMetadataValue1,
- propertyValueEpsilon,
+ propertyValueEpsilon
);
expect(actualMetadataValue2).toEqualEpsilon(
expectedMetadataValue2,
- propertyValueEpsilon,
+ propertyValueEpsilon
);
scene.destroyForSpecs();
});
@@ -3409,7 +3415,7 @@ describe(
className,
propertyName,
0,
- 0,
+ 0
);
const actualMetadataValue1 = pickMetadataAt(
scene,
@@ -3417,7 +3423,7 @@ describe(
className,
propertyName,
1,
- 1,
+ 1
);
const actualMetadataValue2 = pickMetadataAt(
scene,
@@ -3425,7 +3431,7 @@ describe(
className,
propertyName,
2,
- 2,
+ 2
);
const expectedMetadataValue0 = new Cartesian3(0, 0, 0);
const expectedMetadataValue1 = new Cartesian3(127, 0, 127);
@@ -3433,15 +3439,15 @@ describe(
expect(actualMetadataValue0).toEqualEpsilon(
expectedMetadataValue0,
- propertyValueEpsilon,
+ propertyValueEpsilon
);
expect(actualMetadataValue1).toEqualEpsilon(
expectedMetadataValue1,
- propertyValueEpsilon,
+ propertyValueEpsilon
);
expect(actualMetadataValue2).toEqualEpsilon(
expectedMetadataValue2,
- propertyValueEpsilon,
+ propertyValueEpsilon
);
scene.destroyForSpecs();
});
@@ -3477,7 +3483,7 @@ describe(
className,
propertyName,
0,
- 0,
+ 0
);
const actualMetadataValue1 = pickMetadataAt(
scene,
@@ -3485,7 +3491,7 @@ describe(
className,
propertyName,
1,
- 1,
+ 1
);
const actualMetadataValue2 = pickMetadataAt(
scene,
@@ -3493,7 +3499,7 @@ describe(
className,
propertyName,
2,
- 2,
+ 2
);
const expectedMetadataValue0 = new Cartesian4(0, 0, 0, 0);
@@ -3502,18 +3508,18 @@ describe(
expect(actualMetadataValue0).toEqualEpsilon(
expectedMetadataValue0,
- propertyValueEpsilon,
+ propertyValueEpsilon
);
expect(actualMetadataValue1).toEqualEpsilon(
expectedMetadataValue1,
- propertyValueEpsilon,
+ propertyValueEpsilon
);
expect(actualMetadataValue2).toEqualEpsilon(
expectedMetadataValue2,
- propertyValueEpsilon,
+ propertyValueEpsilon
);
scene.destroyForSpecs();
});
}),
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/SceneTransformsSpec.js b/packages/engine/Specs/Scene/SceneTransformsSpec.js
index a9a09c190ec5..180a57ed4451 100644
--- a/packages/engine/Specs/Scene/SceneTransformsSpec.js
+++ b/packages/engine/Specs/Scene/SceneTransformsSpec.js
@@ -53,7 +53,7 @@ describe(
it("returns correct window position in 3D", function () {
const ellipsoid = Ellipsoid.WGS84;
const positionCartographic = ellipsoid.cartesianToCartographic(
- scene.camera.position,
+ scene.camera.position
);
positionCartographic.height = 0.0;
const position = ellipsoid.cartographicToCartesian(positionCartographic);
@@ -63,7 +63,7 @@ describe(
const windowCoordinates = SceneTransforms.worldToWindowCoordinates(
scene,
- position,
+ position
);
expect(windowCoordinates.x).toEqualEpsilon(0.5, CesiumMath.EPSILON2);
expect(windowCoordinates.y).toEqualEpsilon(0.5, CesiumMath.EPSILON2);
@@ -72,7 +72,7 @@ describe(
it("returns correct drawing buffer position in 3D", function () {
const ellipsoid = Ellipsoid.WGS84;
const positionCartographic = ellipsoid.cartesianToCartographic(
- scene.camera.position,
+ scene.camera.position
);
positionCartographic.height = 0.0;
const position = ellipsoid.cartographicToCartesian(positionCartographic);
@@ -80,22 +80,24 @@ describe(
// Update scene state
scene.renderForSpecs();
- const drawingBufferCoordinates =
- SceneTransforms.worldToDrawingBufferCoordinates(scene, position);
+ const drawingBufferCoordinates = SceneTransforms.worldToDrawingBufferCoordinates(
+ scene,
+ position
+ );
expect(drawingBufferCoordinates.x).toEqualEpsilon(
0.5,
- CesiumMath.EPSILON2,
+ CesiumMath.EPSILON2
);
expect(drawingBufferCoordinates.y).toEqualEpsilon(
0.5,
- CesiumMath.EPSILON2,
+ CesiumMath.EPSILON2
);
});
it("returns undefined for window position behind camera in 3D", function () {
const ellipsoid = Ellipsoid.WGS84;
const positionCartographic = ellipsoid.cartesianToCartographic(
- scene.camera.position,
+ scene.camera.position
);
positionCartographic.height *= 1.1;
const position = ellipsoid.cartographicToCartesian(positionCartographic);
@@ -105,7 +107,7 @@ describe(
const windowCoordinates = SceneTransforms.worldToWindowCoordinates(
scene,
- position,
+ position
);
expect(windowCoordinates).not.toBeDefined();
});
@@ -113,7 +115,7 @@ describe(
it("returns undefined for drawing buffer position behind camera in 3D", function () {
const ellipsoid = Ellipsoid.WGS84;
const positionCartographic = ellipsoid.cartesianToCartographic(
- scene.camera.position,
+ scene.camera.position
);
positionCartographic.height *= 1.1;
const position = ellipsoid.cartographicToCartesian(positionCartographic);
@@ -121,8 +123,10 @@ describe(
// Update scene state
scene.renderForSpecs();
- const drawingBufferCoordinates =
- SceneTransforms.worldToDrawingBufferCoordinates(scene, position);
+ const drawingBufferCoordinates = SceneTransforms.worldToDrawingBufferCoordinates(
+ scene,
+ position
+ );
expect(drawingBufferCoordinates).not.toBeDefined();
});
@@ -136,11 +140,11 @@ describe(
const windowCoordinates = SceneTransforms.worldToWindowCoordinates(
scene,
- position,
+ position
);
expect(windowCoordinates).toEqualEpsilon(
actualWindowCoordinates,
- CesiumMath.EPSILON2,
+ CesiumMath.EPSILON2
);
});
@@ -151,14 +155,16 @@ describe(
const actualDrawingBufferCoordinates = new Cartesian2(0.5, 0.5);
const position = scene.camera.pickEllipsoid(
- actualDrawingBufferCoordinates,
+ actualDrawingBufferCoordinates
);
- const drawingBufferCoordinates =
- SceneTransforms.worldToDrawingBufferCoordinates(scene, position);
+ const drawingBufferCoordinates = SceneTransforms.worldToDrawingBufferCoordinates(
+ scene,
+ position
+ );
expect(drawingBufferCoordinates).toEqualEpsilon(
actualDrawingBufferCoordinates,
- CesiumMath.EPSILON2,
+ CesiumMath.EPSILON2
);
});
@@ -173,12 +179,12 @@ describe(
Cartesian3.multiplyByScalar(
scene.camera.direction,
-1,
- scene.camera.direction,
+ scene.camera.direction
);
const windowCoordinates = SceneTransforms.worldToWindowCoordinates(
scene,
- position,
+ position
);
expect(windowCoordinates).not.toBeDefined();
});
@@ -194,11 +200,13 @@ describe(
Cartesian3.multiplyByScalar(
scene.camera.direction,
-1,
- scene.camera.direction,
+ scene.camera.direction
);
- const drawingBufferCoordinates =
- SceneTransforms.worldToDrawingBufferCoordinates(scene, position);
+ const drawingBufferCoordinates = SceneTransforms.worldToDrawingBufferCoordinates(
+ scene,
+ position
+ );
expect(drawingBufferCoordinates).not.toBeDefined();
});
@@ -208,7 +216,7 @@ describe(
-0.000001,
-0.000001,
0.000001,
- 0.000001,
+ 0.000001
),
});
@@ -219,7 +227,7 @@ describe(
const position = Cartesian3.fromDegrees(0, 0);
const windowCoordinates = SceneTransforms.worldToWindowCoordinates(
scene,
- position,
+ position
);
expect(windowCoordinates.x).toBeGreaterThan(0.0);
@@ -243,14 +251,14 @@ describe(
-0.000001,
-0.000001,
0.000001,
- 0.000001,
+ 0.000001
),
});
const position = Cartesian3.fromDegrees(0, 0);
const windowCoordinates = SceneTransforms.worldToWindowCoordinates(
scene,
- position,
+ position
);
expect(windowCoordinates.x).toBeGreaterThan(0.0);
@@ -266,7 +274,7 @@ describe(
-0.000001,
-0.000001,
0.000001,
- 0.000001,
+ 0.000001
),
});
@@ -275,8 +283,10 @@ describe(
scene.renderForSpecs();
const position = Cartesian3.fromDegrees(0, 0);
- const drawingBufferCoordinates =
- SceneTransforms.worldToDrawingBufferCoordinates(scene, position);
+ const drawingBufferCoordinates = SceneTransforms.worldToDrawingBufferCoordinates(
+ scene,
+ position
+ );
expect(drawingBufferCoordinates.x).toBeGreaterThan(0.0);
expect(drawingBufferCoordinates.y).toBeGreaterThan(0.0);
@@ -298,11 +308,11 @@ describe(
const position = Cartesian3.fromDegrees(-80, 25);
const windowCoordinates = SceneTransforms.worldToWindowCoordinates(
scene,
- position,
+ position
);
expect(windowCoordinates).toBeDefined();
scene.destroyForSpecs();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/ScreenSpaceCameraControllerSpec.js b/packages/engine/Specs/Scene/ScreenSpaceCameraControllerSpec.js
index 593ca54b10f9..d5367349c33a 100644
--- a/packages/engine/Specs/Scene/ScreenSpaceCameraControllerSpec.js
+++ b/packages/engine/Specs/Scene/ScreenSpaceCameraControllerSpec.js
@@ -77,7 +77,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
const offset = Cartesian3.multiplyByScalar(
Cartesian3.normalize(new Cartesian3(0.0, -2.0, 1.0), new Cartesian3()),
2.5 * maxRadii,
- new Cartesian3(),
+ new Cartesian3()
);
camera = createCamera({
@@ -112,7 +112,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
canvas,
combine(options, {
pointerType: "mouse",
- }),
+ })
);
} else {
DomEventSimulator.fireMouseDown(canvas, options);
@@ -125,7 +125,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
canvas,
combine(options, {
pointerType: "mouse",
- }),
+ })
);
} else {
DomEventSimulator.fireMouseUp(document, options);
@@ -138,7 +138,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
canvas,
combine(options, {
pointerType: "mouse",
- }),
+ })
);
} else {
DomEventSimulator.fireMouseMove(document, options);
@@ -151,14 +151,14 @@ describe("Scene/ScreenSpaceCameraController", function () {
canvas,
combine({
deltaY: -wheelDelta,
- }),
+ })
);
} else if (document.onmousewheel !== undefined) {
DomEventSimulator.fireMouseWheel(
canvas,
combine({
wheelDelta: wheelDelta,
- }),
+ })
);
}
}
@@ -250,7 +250,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
}
@@ -277,7 +277,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
camera.setView({ destination: Camera.DEFAULT_VIEW_RECTANGLE });
const positionCart = Ellipsoid.WGS84.cartesianToCartographic(
- camera.position,
+ camera.position
);
positionCart.height = -100.0;
camera.position = Ellipsoid.WGS84.cartographicToCartesian(positionCart);
@@ -299,11 +299,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const endPosition = new Cartesian2(
canvas.clientWidth / 4,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.LEFT, startPosition, endPosition);
@@ -318,11 +318,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 4,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.LEFT, startPosition, endPosition);
@@ -337,11 +337,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
moveMouse(MouseButtons.LEFT, startPosition, endPosition);
@@ -356,11 +356,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.LEFT, startPosition, endPosition);
@@ -375,11 +375,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
camera.up = Cartesian3.negate(Cartesian3.UNIT_X, new Cartesian3());
@@ -398,11 +398,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const frustumDiff = camera.frustum.right - camera.frustum.left;
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
@@ -411,7 +411,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
expect(position.y).toEqual(camera.position.y);
expect(position.z).toEqual(camera.position.z);
expect(frustumDiff).toBeGreaterThan(
- camera.frustum.right - camera.frustum.left,
+ camera.frustum.right - camera.frustum.left
);
});
@@ -428,11 +428,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const frustumDiff = frustum.right - frustum.left;
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
@@ -441,7 +441,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
expect(position.y).toEqual(camera.position.y);
expect(position.z).toEqual(camera.position.z);
expect(frustumDiff).toBeLessThan(
- camera.frustum.right - camera.frustum.left,
+ camera.frustum.right - camera.frustum.left
);
});
@@ -456,7 +456,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
expect(position.y).toEqual(camera.position.y);
expect(position.z).toEqual(camera.position.z);
expect(frustumDiff).toBeGreaterThan(
- camera.frustum.right - camera.frustum.left,
+ camera.frustum.right - camera.frustum.left
);
});
@@ -478,7 +478,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
expect(position.y).toEqual(camera.position.y);
expect(position.z).toEqual(camera.position.z);
expect(frustumDiff).toBeLessThan(
- camera.frustum.right - camera.frustum.left,
+ camera.frustum.right - camera.frustum.left
);
});
@@ -495,11 +495,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const frustumDiff = camera.frustum.right - camera.frustum.left;
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
@@ -508,7 +508,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
expect(position.y).toEqual(camera.position.y);
expect(position.z).toEqual(camera.position.z);
expect(frustumDiff).toBeGreaterThan(
- camera.frustum.right - camera.frustum.left,
+ camera.frustum.right - camera.frustum.left
);
});
@@ -518,11 +518,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const frustumDiff = camera.frustum.right - camera.frustum.left;
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
@@ -547,11 +547,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const frustumDiff = camera.frustum.right - camera.frustum.left;
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
@@ -579,7 +579,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight,
+ canvas.clientHeight
);
const endPosition = new Cartesian2(canvas.clientWidth / 2, 0);
@@ -587,12 +587,12 @@ describe("Scene/ScreenSpaceCameraController", function () {
updateController();
expect(camera.frustum.right).toEqualEpsilon(
maxZoom * 0.5,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.frustum.left).toEqual(-camera.frustum.right);
expect(camera.frustum.top).toEqualEpsilon(
maxZoom * 0.25,
- CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
);
expect(camera.frustum.bottom).toEqual(-camera.frustum.top);
});
@@ -604,11 +604,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 4,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
moveMouse(MouseButtons.MIDDLE, startPosition, endPosition);
@@ -619,15 +619,15 @@ describe("Scene/ScreenSpaceCameraController", function () {
expect(camera.direction).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.up).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_X, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.right).toEqualEpsilon(
Cartesian3.UNIT_Y,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -638,11 +638,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 4,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.MIDDLE, startPosition, endPosition);
@@ -653,12 +653,12 @@ describe("Scene/ScreenSpaceCameraController", function () {
expect(camera.direction).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.up).toEqualEpsilon(Cartesian3.UNIT_X, CesiumMath.EPSILON15);
expect(camera.right).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_Y, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -669,11 +669,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
(3 * canvas.clientWidth) / 4,
- (3 * canvas.clientHeight) / 4,
+ (3 * canvas.clientHeight) / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 4,
- (3 * canvas.clientHeight) / 4,
+ (3 * canvas.clientHeight) / 4
);
moveMouse(MouseButtons.MIDDLE, startPosition, endPosition);
@@ -684,15 +684,15 @@ describe("Scene/ScreenSpaceCameraController", function () {
expect(camera.direction).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_Z, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.up).toEqualEpsilon(
Cartesian3.negate(Cartesian3.UNIT_X, new Cartesian3()),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(camera.right).toEqualEpsilon(
Cartesian3.UNIT_Y,
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
});
@@ -701,11 +701,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const endPosition = new Cartesian2(
canvas.clientWidth / 4,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.LEFT, startPosition, endPosition);
@@ -720,11 +720,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 4,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.LEFT, startPosition, endPosition);
@@ -739,11 +739,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
moveMouse(MouseButtons.LEFT, startPosition, endPosition);
@@ -758,11 +758,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.LEFT, startPosition, endPosition);
@@ -778,11 +778,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.LEFT, startPosition, endPosition);
@@ -797,24 +797,24 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
moveMouse(MouseButtons.LEFT, startPosition, endPosition, true);
updateController();
expect(camera.position).toEqual(position);
expect(
- Cartesian3.cross(camera.direction, camera.up, new Cartesian3()),
+ Cartesian3.cross(camera.direction, camera.up, new Cartesian3())
).toEqualEpsilon(camera.right, CesiumMath.EPSILON12);
expect(
- Cartesian3.cross(camera.up, camera.right, new Cartesian3()),
+ Cartesian3.cross(camera.up, camera.right, new Cartesian3())
).toEqualEpsilon(camera.direction, CesiumMath.EPSILON12);
expect(
- Cartesian3.cross(camera.right, camera.direction, new Cartesian3()),
+ Cartesian3.cross(camera.right, camera.direction, new Cartesian3())
).toEqualEpsilon(camera.up, CesiumMath.EPSILON12);
});
@@ -823,11 +823,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
@@ -842,11 +842,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
@@ -884,11 +884,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
@@ -900,11 +900,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
setUpCV();
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const endPosition = new Cartesian2(
(3 * canvas.clientWidth) / 8,
- (3 * canvas.clientHeight) / 8,
+ (3 * canvas.clientHeight) / 8
);
camera.position.y = -100.0;
@@ -914,15 +914,15 @@ describe("Scene/ScreenSpaceCameraController", function () {
expect(
Cartesian3.dot(
Cartesian3.normalize(camera.position, new Cartesian3()),
- Cartesian3.UNIT_Z,
- ),
+ Cartesian3.UNIT_Z
+ )
).toBeGreaterThan(0.0);
expect(Cartesian3.dot(camera.direction, Cartesian3.UNIT_Z)).toBeLessThan(
- 0.0,
+ 0.0
);
expect(Cartesian3.dot(camera.up, Cartesian3.UNIT_Z)).toBeGreaterThan(0.0);
expect(Cartesian3.dot(camera.right, Cartesian3.UNIT_Z)).toBeLessThan(
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
});
@@ -932,14 +932,14 @@ describe("Scene/ScreenSpaceCameraController", function () {
const origin = Cartesian3.fromDegrees(-72.0, 40.0);
camera.lookAtTransform(
Transforms.eastNorthUpToFixedFrame(origin),
- new Cartesian3(1.0, 0.0, 0.0),
+ new Cartesian3(1.0, 0.0, 0.0)
);
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(0, 0);
const endPosition = new Cartesian2(
canvas.clientWidth / 4,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
moveMouse(MouseButtons.LEFT, startPosition, endPosition);
@@ -949,15 +949,15 @@ describe("Scene/ScreenSpaceCameraController", function () {
expect(camera.direction).toEqualEpsilon(
Cartesian3.normalize(
Cartesian3.negate(camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(
- Cartesian3.cross(camera.direction, camera.up, new Cartesian3()),
+ Cartesian3.cross(camera.direction, camera.up, new Cartesian3())
).toEqualEpsilon(camera.right, CesiumMath.EPSILON14);
expect(
- Cartesian3.cross(camera.right, camera.direction, new Cartesian3()),
+ Cartesian3.cross(camera.right, camera.direction, new Cartesian3())
).toEqualEpsilon(camera.up, CesiumMath.EPSILON14);
});
@@ -968,11 +968,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const endPosition = new Cartesian2(
(3 * canvas.clientWidth) / 8,
- (3 * canvas.clientHeight) / 8,
+ (3 * canvas.clientHeight) / 8
);
moveMouse(MouseButtons.MIDDLE, startPosition, endPosition);
@@ -989,11 +989,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
@@ -1024,7 +1024,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
const startPosition = new Cartesian2(0, canvas.clientHeight / 2);
const endPosition = new Cartesian2(
4.0 * canvas.clientWidth,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.LEFT, startPosition, endPosition);
@@ -1041,11 +1041,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const endPosition = new Cartesian2(
(3 * canvas.clientWidth) / 8,
- (3 * canvas.clientHeight) / 8,
+ (3 * canvas.clientHeight) / 8
);
moveMouse(MouseButtons.LEFT, startPosition, endPosition);
@@ -1055,15 +1055,15 @@ describe("Scene/ScreenSpaceCameraController", function () {
expect(camera.direction).toEqualEpsilon(
Cartesian3.normalize(
Cartesian3.negate(camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(
- Cartesian3.cross(camera.direction, camera.up, new Cartesian3()),
+ Cartesian3.cross(camera.direction, camera.up, new Cartesian3())
).toEqualEpsilon(camera.right, CesiumMath.EPSILON12);
expect(
- Cartesian3.cross(camera.right, camera.direction, new Cartesian3()),
+ Cartesian3.cross(camera.right, camera.direction, new Cartesian3())
).toEqualEpsilon(camera.up, CesiumMath.EPSILON12);
});
@@ -1072,11 +1072,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const endPosition = new Cartesian2(
(3 * canvas.clientWidth) / 8,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
camera.constrainedAxis = Cartesian3.clone(Cartesian3.UNIT_Z);
@@ -1087,15 +1087,15 @@ describe("Scene/ScreenSpaceCameraController", function () {
expect(camera.direction).toEqualEpsilon(
Cartesian3.normalize(
Cartesian3.negate(camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(
- Cartesian3.cross(camera.direction, camera.up, new Cartesian3()),
+ Cartesian3.cross(camera.direction, camera.up, new Cartesian3())
).toEqualEpsilon(camera.right, CesiumMath.EPSILON14);
expect(
- Cartesian3.cross(camera.right, camera.direction, new Cartesian3()),
+ Cartesian3.cross(camera.right, camera.direction, new Cartesian3())
).toEqualEpsilon(camera.up, CesiumMath.EPSILON14);
});
@@ -1107,11 +1107,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const endPosition = new Cartesian2(
(3 * canvas.clientWidth) / 8,
- (3 * canvas.clientHeight) / 8,
+ (3 * canvas.clientHeight) / 8
);
moveMouse(MouseButtons.LEFT, startPosition, endPosition);
@@ -1127,7 +1127,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
const startPosition = new Cartesian2(0, 0);
const endPosition = new Cartesian2(
canvas.clientWidth / 4,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
moveMouse(MouseButtons.LEFT, startPosition, endPosition);
@@ -1137,15 +1137,15 @@ describe("Scene/ScreenSpaceCameraController", function () {
expect(camera.direction).toEqualEpsilon(
Cartesian3.normalize(
Cartesian3.negate(camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(
- Cartesian3.cross(camera.direction, camera.up, new Cartesian3()),
+ Cartesian3.cross(camera.direction, camera.up, new Cartesian3())
).toEqualEpsilon(camera.right, CesiumMath.EPSILON15);
expect(
- Cartesian3.cross(camera.right, camera.direction, new Cartesian3()),
+ Cartesian3.cross(camera.right, camera.direction, new Cartesian3())
).toEqualEpsilon(camera.up, CesiumMath.EPSILON15);
});
@@ -1163,16 +1163,16 @@ describe("Scene/ScreenSpaceCameraController", function () {
expect(camera.position.z).toEqualEpsilon(
Cartesian3.magnitude(camera.position),
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
expect(camera.direction).toEqualEpsilon(
Cartesian3.negate(axis, new Cartesian3()),
- CesiumMath.EPSILON4,
+ CesiumMath.EPSILON4
);
expect(Cartesian3.dot(camera.up, axis)).toBeLessThan(CesiumMath.EPSILON2);
expect(camera.right).toEqualEpsilon(
Cartesian3.cross(camera.direction, camera.up, new Cartesian3()),
- CesiumMath.EPSILON4,
+ CesiumMath.EPSILON4
);
});
@@ -1181,17 +1181,17 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
updateController();
expect(Cartesian3.magnitude(position)).toBeGreaterThan(
- Cartesian3.magnitude(camera.position),
+ Cartesian3.magnitude(camera.position)
);
});
@@ -1222,7 +1222,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
updateController();
expect(Cartesian3.magnitude(position)).toBeGreaterThan(
- Cartesian3.magnitude(camera.position),
+ Cartesian3.magnitude(camera.position)
);
});
@@ -1255,7 +1255,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
updateController();
expect(Cartesian3.magnitude(position)).toBeGreaterThan(
- Cartesian3.magnitude(camera.position),
+ Cartesian3.magnitude(camera.position)
);
});
@@ -1278,7 +1278,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
updateController();
expect(Cartesian3.magnitude(position)).toBeGreaterThan(
- Cartesian3.magnitude(camera.position),
+ Cartesian3.magnitude(camera.position)
);
});
@@ -1287,17 +1287,17 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
updateController();
expect(Cartesian3.magnitude(position)).toBeLessThan(
- Cartesian3.magnitude(camera.position),
+ Cartesian3.magnitude(camera.position)
);
});
@@ -1305,7 +1305,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
setUp3D();
const positionCart = Ellipsoid.WGS84.cartesianToCartographic(
- camera.position,
+ camera.position
);
positionCart.height = 0.0;
camera.position = Ellipsoid.WGS84.cartographicToCartesian(positionCart);
@@ -1316,16 +1316,15 @@ describe("Scene/ScreenSpaceCameraController", function () {
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight * 50,
+ canvas.clientHeight * 50
);
const endPosition = new Cartesian2(canvas.clientWidth / 2, 0);
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
updateController();
- const height = Ellipsoid.WGS84.cartesianToCartographic(
- camera.position,
- ).height;
+ const height = Ellipsoid.WGS84.cartesianToCartographic(camera.position)
+ .height;
expect(height).toEqualEpsilon(maxDist, CesiumMath.EPSILON2);
});
@@ -1339,7 +1338,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
simulateMouseWheel(120);
updateController();
expect(Cartesian3.magnitude(position)).toBeGreaterThan(
- Cartesian3.magnitude(camera.position),
+ Cartesian3.magnitude(camera.position)
);
expect(camera.heading).toBeCloseTo(heading, 10);
expect(camera.pitch).toBeCloseTo(pitch, 10);
@@ -1356,7 +1355,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
simulateMouseWheel(-120);
updateController();
expect(Cartesian3.magnitude(position)).toBeLessThan(
- Cartesian3.magnitude(camera.position),
+ Cartesian3.magnitude(camera.position)
);
expect(camera.heading).toBeCloseTo(heading, 10);
expect(camera.pitch).toBeCloseTo(pitch, 10);
@@ -1379,17 +1378,17 @@ describe("Scene/ScreenSpaceCameraController", function () {
const frustumWidth = camera.frustum.width;
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
updateController();
expect(Cartesian3.magnitude(position)).toBeGreaterThan(
- Cartesian3.magnitude(camera.position),
+ Cartesian3.magnitude(camera.position)
);
expect(frustumWidth).toBeGreaterThan(camera.frustum.width);
});
@@ -1410,17 +1409,17 @@ describe("Scene/ScreenSpaceCameraController", function () {
const frustumWidth = camera.frustum.width;
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
updateController();
expect(Cartesian3.magnitude(position)).toBeLessThan(
- Cartesian3.magnitude(camera.position),
+ Cartesian3.magnitude(camera.position)
);
expect(frustumWidth).toBeLessThan(camera.frustum.width);
});
@@ -1433,11 +1432,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
@@ -1445,7 +1444,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
const vector = Cartesian3.subtract(
camera.position,
position,
- new Cartesian3(),
+ new Cartesian3()
);
const normalizedVector = Cartesian3.normalize(vector, vector);
@@ -1458,11 +1457,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
moveMouse(MouseButtons.MIDDLE, startPosition, endPosition);
@@ -1471,15 +1470,15 @@ describe("Scene/ScreenSpaceCameraController", function () {
expect(camera.direction).not.toEqualEpsilon(
Cartesian3.normalize(
Cartesian3.negate(camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(
- Cartesian3.cross(camera.direction, camera.up, new Cartesian3()),
+ Cartesian3.cross(camera.direction, camera.up, new Cartesian3())
).toEqualEpsilon(camera.right, CesiumMath.EPSILON14);
expect(
- Cartesian3.cross(camera.right, camera.direction, new Cartesian3()),
+ Cartesian3.cross(camera.right, camera.direction, new Cartesian3())
).toEqualEpsilon(camera.up, CesiumMath.EPSILON14);
const ray = new Ray(camera.positionWC, camera.directionWC);
@@ -1492,11 +1491,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- (3 * canvas.clientHeight) / 4,
+ (3 * canvas.clientHeight) / 4
);
moveMouse(MouseButtons.MIDDLE, startPosition, endPosition);
@@ -1505,15 +1504,15 @@ describe("Scene/ScreenSpaceCameraController", function () {
expect(camera.direction).toEqualEpsilon(
Cartesian3.normalize(
Cartesian3.negate(camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON15,
+ CesiumMath.EPSILON15
);
expect(
- Cartesian3.cross(camera.direction, camera.up, new Cartesian3()),
+ Cartesian3.cross(camera.direction, camera.up, new Cartesian3())
).toEqualEpsilon(camera.right, CesiumMath.EPSILON14);
expect(
- Cartesian3.cross(camera.right, camera.direction, new Cartesian3()),
+ Cartesian3.cross(camera.right, camera.direction, new Cartesian3())
).toEqualEpsilon(camera.up, CesiumMath.EPSILON15);
});
@@ -1521,29 +1520,28 @@ describe("Scene/ScreenSpaceCameraController", function () {
setUp3D();
const positionCart = Ellipsoid.WGS84.cartesianToCartographic(
- camera.position,
+ camera.position
);
positionCart.height = controller.minimumZoomDistance;
camera.position = Ellipsoid.WGS84.cartographicToCartesian(positionCart);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight,
+ canvas.clientHeight
);
const endPosition = new Cartesian2(canvas.clientWidth / 2, 0);
moveMouse(MouseButtons.MIDDLE, startPosition, endPosition);
updateController();
- const height = Ellipsoid.WGS84.cartesianToCartographic(
- camera.position,
- ).height;
+ const height = Ellipsoid.WGS84.cartesianToCartographic(camera.position)
+ .height;
expect(height).toBeLessThan(controller.minimumZoomDistance + 10.0);
expect(
- Cartesian3.cross(camera.direction, camera.up, new Cartesian3()),
+ Cartesian3.cross(camera.direction, camera.up, new Cartesian3())
).toEqualEpsilon(camera.right, CesiumMath.EPSILON14);
expect(
- Cartesian3.cross(camera.right, camera.direction, new Cartesian3()),
+ Cartesian3.cross(camera.right, camera.direction, new Cartesian3())
).toEqualEpsilon(camera.up, CesiumMath.EPSILON14);
});
@@ -1555,11 +1553,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
moveMouse(MouseButtons.MIDDLE, startPosition, endPosition);
@@ -1573,11 +1571,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
moveMouse(MouseButtons.LEFT, startPosition, endPosition, true);
@@ -1586,17 +1584,17 @@ describe("Scene/ScreenSpaceCameraController", function () {
expect(camera.direction).not.toEqual(
Cartesian3.normalize(
Cartesian3.negate(camera.position, new Cartesian3()),
- new Cartesian3(),
- ),
+ new Cartesian3()
+ )
);
expect(
- Cartesian3.cross(camera.direction, camera.up, new Cartesian3()),
+ Cartesian3.cross(camera.direction, camera.up, new Cartesian3())
).toEqualEpsilon(camera.right, CesiumMath.EPSILON12);
expect(
- Cartesian3.cross(camera.up, camera.right, new Cartesian3()),
+ Cartesian3.cross(camera.up, camera.right, new Cartesian3())
).toEqualEpsilon(camera.direction, CesiumMath.EPSILON12);
expect(
- Cartesian3.cross(camera.right, camera.direction, new Cartesian3()),
+ Cartesian3.cross(camera.right, camera.direction, new Cartesian3())
).toEqualEpsilon(camera.up, CesiumMath.EPSILON12);
});
@@ -1605,17 +1603,17 @@ describe("Scene/ScreenSpaceCameraController", function () {
camera.position = new Cartesian3(
0.0,
2.0 * Ellipsoid.WGS84.maximumRadius,
- 0.0,
+ 0.0
);
camera.direction = Cartesian3.normalize(
Cartesian3.negate(camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
camera.up = Cartesian3.clone(Cartesian3.UNIT_X);
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
const axis = Cartesian3.clone(Cartesian3.UNIT_X);
@@ -1623,11 +1621,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.LEFT, startPosition, endPosition);
@@ -1636,20 +1634,20 @@ describe("Scene/ScreenSpaceCameraController", function () {
expect(camera.direction).toEqualEpsilon(
Cartesian3.normalize(
Cartesian3.negate(camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(camera.right).toEqualEpsilon(
Cartesian3.normalize(
Cartesian3.cross(axis, camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(camera.up).toEqualEpsilon(
Cartesian3.cross(camera.right, camera.direction, new Cartesian3()),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
});
@@ -1658,17 +1656,17 @@ describe("Scene/ScreenSpaceCameraController", function () {
camera.position = new Cartesian3(
0.0,
2.0 * Ellipsoid.WGS84.maximumRadius,
- 0.0,
+ 0.0
);
camera.direction = Cartesian3.negate(
Cartesian3.normalize(camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
);
camera.up = Cartesian3.clone(Cartesian3.UNIT_X);
camera.right = Cartesian3.cross(
camera.direction,
camera.up,
- new Cartesian3(),
+ new Cartesian3()
);
const axis = Cartesian3.clone(Cartesian3.UNIT_Z);
@@ -1676,30 +1674,30 @@ describe("Scene/ScreenSpaceCameraController", function () {
const startPosition = new Cartesian2(
canvas.clientWidth * 0.5,
- canvas.clientHeight * 0.25,
+ canvas.clientHeight * 0.25
);
const endPosition = new Cartesian2(
canvas.clientWidth * 0.5,
- canvas.clientHeight * 0.75,
+ canvas.clientHeight * 0.75
);
moveMouse(MouseButtons.LEFT, startPosition, endPosition);
updateController();
expect(Cartesian3.dot(camera.position, axis)).toBeLessThan(
- CesiumMath.EPSILON2,
+ CesiumMath.EPSILON2
);
expect(camera.direction).toEqualEpsilon(
Cartesian3.negate(
Cartesian3.normalize(camera.position, new Cartesian3()),
- new Cartesian3(),
+ new Cartesian3()
),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(camera.right).toEqualEpsilon(axis, CesiumMath.EPSILON12);
expect(camera.up).toEqualEpsilon(
Cartesian3.cross(camera.right, camera.direction, new Cartesian3()),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -1738,11 +1736,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
const position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
@@ -1760,18 +1758,18 @@ describe("Scene/ScreenSpaceCameraController", function () {
let position = Cartesian3.clone(camera.position);
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
controller.zoomEventTypes = CameraEventType.LEFT_DRAG;
moveMouse(MouseButtons.LEFT, startPosition, endPosition);
updateController();
expect(Cartesian3.magnitude(camera.position)).toBeLessThan(
- Cartesian3.magnitude(position),
+ Cartesian3.magnitude(position)
);
position = Cartesian3.clone(camera.position);
@@ -1782,7 +1780,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
moveMouse(MouseButtons.LEFT, endPosition, startPosition, true);
updateController();
expect(Cartesian3.magnitude(camera.position)).toBeGreaterThan(
- Cartesian3.magnitude(position),
+ Cartesian3.magnitude(position)
);
position = Cartesian3.clone(camera.position);
@@ -1796,14 +1794,14 @@ describe("Scene/ScreenSpaceCameraController", function () {
moveMouse(MouseButtons.MIDDLE, startPosition, endPosition);
updateController();
expect(Cartesian3.magnitude(camera.position)).toBeLessThan(
- Cartesian3.magnitude(position),
+ Cartesian3.magnitude(position)
);
position = Cartesian3.clone(camera.position);
moveMouse(MouseButtons.LEFT, endPosition, startPosition, true);
updateController();
expect(Cartesian3.magnitude(camera.position)).toBeGreaterThan(
- Cartesian3.magnitude(position),
+ Cartesian3.magnitude(position)
);
});
@@ -1820,11 +1818,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
// Trigger terrain adjustment with a small mouse movement
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
@@ -1832,7 +1830,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
expect(camera.positionCartographic.height).toEqualEpsilon(
controller.minimumZoomDistance,
- CesiumMath.EPSILON5,
+ CesiumMath.EPSILON5
);
});
@@ -1849,11 +1847,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
// Trigger terrain adjustment with a small mouse movement
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
@@ -1861,7 +1859,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
expect(camera.position.z).toEqualEpsilon(
controller.minimumZoomDistance,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -1879,18 +1877,18 @@ describe("Scene/ScreenSpaceCameraController", function () {
// Trigger terrain adjustment with a small mouse movement
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
updateController();
expect(camera.positionCartographic.height).toBeLessThan(
- controller.minimumZoomDistance,
+ controller.minimumZoomDistance
);
});
@@ -1908,11 +1906,11 @@ describe("Scene/ScreenSpaceCameraController", function () {
// Trigger terrain adjustment with a small mouse movement
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
@@ -1929,24 +1927,24 @@ describe("Scene/ScreenSpaceCameraController", function () {
camera.lookAt(
Cartesian3.fromDegrees(-72.0, 40.0, 1.0),
- new Cartesian3(1.0, 1.0, -10.0),
+ new Cartesian3(1.0, 1.0, -10.0)
);
// Trigger terrain adjustment with a small mouse movement
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
updateController();
expect(camera.positionCartographic.height).toBeGreaterThanOrEqual(
- controller.minimumZoomDistance,
+ controller.minimumZoomDistance
);
});
@@ -1958,17 +1956,17 @@ describe("Scene/ScreenSpaceCameraController", function () {
camera.lookAt(
Cartesian3.fromDegrees(-72.0, 40.0, 1.0),
- new Cartesian3(1.0, 1.0, -10.0),
+ new Cartesian3(1.0, 1.0, -10.0)
);
// Trigger terrain adjustment with a small mouse movement
const startPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 4,
+ canvas.clientHeight / 4
);
const endPosition = new Cartesian2(
canvas.clientWidth / 2,
- canvas.clientHeight / 2,
+ canvas.clientHeight / 2
);
moveMouse(MouseButtons.RIGHT, startPosition, endPosition);
@@ -1976,7 +1974,7 @@ describe("Scene/ScreenSpaceCameraController", function () {
expect(camera.positionWC.x).toEqualEpsilon(
controller.minimumZoomDistance,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
});
diff --git a/packages/engine/Specs/Scene/ShadowMapSpec.js b/packages/engine/Specs/Scene/ShadowMapSpec.js
index 00d862e26af7..762791743a0d 100644
--- a/packages/engine/Specs/Scene/ShadowMapSpec.js
+++ b/packages/engine/Specs/Scene/ShadowMapSpec.js
@@ -84,11 +84,11 @@ describe(
const boxOrigin = new Cartesian3.fromRadians(
longitude,
latitude,
- boxHeight,
+ boxHeight
);
const boxTransform = Transforms.headingPitchRollToFixedFrame(
boxOrigin,
- new HeadingPitchRoll(),
+ new HeadingPitchRoll()
);
const boxScale = 0.5;
@@ -99,21 +99,21 @@ describe(
const floorOrigin = new Cartesian3.fromRadians(
longitude,
latitude,
- floorHeight,
+ floorHeight
);
const floorTransform = Transforms.headingPitchRollToFixedFrame(
floorOrigin,
- new HeadingPitchRoll(),
+ new HeadingPitchRoll()
);
const roomOrigin = new Cartesian3.fromRadians(
longitude,
latitude,
- height,
+ height
);
const roomTransform = Transforms.headingPitchRollToFixedFrame(
roomOrigin,
- new HeadingPitchRoll(),
+ new HeadingPitchRoll()
);
const modelPromises = [];
@@ -125,7 +125,7 @@ describe(
show: false,
}).then(function (model) {
box = model;
- }),
+ })
);
modelPromises.push(
loadModel({
@@ -135,7 +135,7 @@ describe(
show: false,
}).then(function (model) {
boxTranslucent = model;
- }),
+ })
);
modelPromises.push(
loadModel({
@@ -145,7 +145,7 @@ describe(
show: false,
}).then(function (model) {
boxPointLights = model;
- }),
+ })
);
modelPromises.push(
loadModel({
@@ -156,7 +156,7 @@ describe(
show: false,
}).then(function (model) {
boxCutout = model;
- }),
+ })
);
modelPromises.push(
loadModel({
@@ -165,7 +165,7 @@ describe(
show: false,
}).then(function (model) {
boxNoNormals = model;
- }),
+ })
);
modelPromises.push(
loadModel({
@@ -175,7 +175,7 @@ describe(
show: false,
}).then(function (model) {
floor = model;
- }),
+ })
);
modelPromises.push(
loadModel({
@@ -185,7 +185,7 @@ describe(
show: false,
}).then(function (model) {
floorTranslucent = model;
- }),
+ })
);
modelPromises.push(
loadModel({
@@ -195,7 +195,7 @@ describe(
show: false,
}).then(function (model) {
room = model;
- }),
+ })
);
primitiveBox = createPrimitive(boxTransform, 0.5, Color.RED);
@@ -203,7 +203,7 @@ describe(
primitiveBoxTranslucent = createPrimitive(
boxTransform,
0.5,
- Color.RED.withAlpha(0.5),
+ Color.RED.withAlpha(0.5)
);
primitiveFloor = createPrimitive(floorTransform, 2.0, Color.RED);
primitiveFloorRTC = createPrimitiveRTC(floorTransform, 2.0, Color.RED);
@@ -231,7 +231,7 @@ describe(
asynchronous: false,
show: false,
shadows: ShadowMode.ENABLED,
- }),
+ })
);
}
@@ -240,7 +240,7 @@ describe(
BoxGeometry.fromDimensions({
vertexFormat: PerInstanceColorAppearance.VERTEX_FORMAT,
dimensions: new Cartesian3(size, size, size),
- }),
+ })
);
const positions = boxGeometry.attributes.position.values;
@@ -255,7 +255,7 @@ describe(
BoundingSphere.transform(
boxGeometry.boundingSphere,
transform,
- boxGeometry.boundingSphere,
+ boxGeometry.boundingSphere
);
const boxGeometryInstance = new GeometryInstance({
@@ -276,7 +276,7 @@ describe(
rtcCenter: boxGeometry.boundingSphere.center,
show: false,
shadows: ShadowMode.ENABLED,
- }),
+ })
);
}
@@ -288,7 +288,7 @@ describe(
scene.render();
return model.ready;
},
- { timeout: 10000 },
+ { timeout: 10000 }
);
return model;
}
@@ -328,7 +328,7 @@ describe(
const center = new Cartesian3.fromRadians(longitude, latitude, height);
scene.camera.lookAt(
center,
- new HeadingPitchRange(0.0, CesiumMath.toRadians(-70.0), 5.0),
+ new HeadingPitchRange(0.0, CesiumMath.toRadians(-70.0), 5.0)
);
// Create light camera pointing straight down
@@ -345,7 +345,7 @@ describe(
const center = new Cartesian3.fromRadians(longitude, latitude, height);
scene.camera.lookAt(
center,
- new HeadingPitchRange(0.0, CesiumMath.toRadians(-70.0), 5.0),
+ new HeadingPitchRange(0.0, CesiumMath.toRadians(-70.0), 5.0)
);
// Create light camera pointing straight down
@@ -363,7 +363,7 @@ describe(
const center = new Cartesian3.fromRadians(longitude, latitude, height);
scene.camera.lookAt(
center,
- new HeadingPitchRange(0.0, CesiumMath.toRadians(-70.0), 5.0),
+ new HeadingPitchRange(0.0, CesiumMath.toRadians(-70.0), 5.0)
);
const frustum = new OrthographicOffCenterFrustum();
@@ -390,7 +390,7 @@ describe(
const center = new Cartesian3.fromRadians(longitude, latitude, height);
scene.camera.lookAt(
center,
- new HeadingPitchRange(0.0, CesiumMath.toRadians(-70.0), 5.0),
+ new HeadingPitchRange(0.0, CesiumMath.toRadians(-70.0), 5.0)
);
const lightCamera = new Camera(scene);
@@ -411,7 +411,7 @@ describe(
const center = new Cartesian3.fromRadians(longitude, latitude, height);
scene.camera.lookAt(
center,
- new HeadingPitchRange(0.0, CesiumMath.toRadians(-70.0), 5.0),
+ new HeadingPitchRange(0.0, CesiumMath.toRadians(-70.0), 5.0)
);
const lightCamera = new Camera(scene);
@@ -625,7 +625,7 @@ describe(
const center = new Cartesian3.fromRadians(longitude, latitude, height);
scene.camera.lookAt(
center,
- new HeadingPitchRange(0.0, CesiumMath.toRadians(-70.0), 5.0),
+ new HeadingPitchRange(0.0, CesiumMath.toRadians(-70.0), 5.0)
);
// Create light camera that is angled horizontally
@@ -640,7 +640,7 @@ describe(
// Instead of the default flat tile, add a ridge that will cast shadows
spyOn(
EllipsoidTerrainProvider.prototype,
- "requestTileGeometry",
+ "requestTileGeometry"
).and.callFake(function () {
const width = 16;
const height = 16;
@@ -689,7 +689,7 @@ describe(
const center = new Cartesian3.fromRadians(longitude, latitude, height);
scene.camera.lookAt(
center,
- new HeadingPitchRange(0.0, CesiumMath.toRadians(-70.0), 5.0),
+ new HeadingPitchRange(0.0, CesiumMath.toRadians(-70.0), 5.0)
);
// Create light camera pointing straight down
@@ -726,7 +726,7 @@ describe(
const center = new Cartesian3.fromRadians(longitude, latitude, height);
scene.camera.lookAt(
center,
- new HeadingPitchRange(0.0, CesiumMath.toRadians(-90.0), 2.0),
+ new HeadingPitchRange(0.0, CesiumMath.toRadians(-90.0), 2.0)
);
// Use the default shadow map which uses the sun as a light source
@@ -783,18 +783,18 @@ describe(
const lightDirectionAbove = new Cartesian3(
-0.22562675028973597,
0.8893549458095356,
- -0.3976686433675793,
+ -0.3976686433675793
); // Light pointing straight above
const lightDirectionAngle = new Cartesian3(
0.14370705890272903,
0.9062077731227641,
- -0.3976628636840613,
+ -0.3976628636840613
); // Light at an angle
const center = new Cartesian3.fromRadians(longitude, latitude, height);
scene.camera.lookAt(
center,
- new HeadingPitchRange(0.0, CesiumMath.toRadians(-90.0), 2.0),
+ new HeadingPitchRange(0.0, CesiumMath.toRadians(-90.0), 2.0)
);
// Use the default shadow map which uses the scene's light source
@@ -903,7 +903,7 @@ describe(
for (let i = 0; i < 6; ++i) {
boxPointLights.modelMatrix = Transforms.headingPitchRollToFixedFrame(
origins[i],
- new HeadingPitchRoll(),
+ new HeadingPitchRoll()
);
scene.render(); // Model is pre-loaded, render one frame to update the model matrix
@@ -1028,7 +1028,7 @@ describe(
const center = new Cartesian3.fromRadians(longitude, latitude, height);
scene.camera.lookAt(
center,
- new HeadingPitchRange(0.0, CesiumMath.toRadians(-70.0), 5.0),
+ new HeadingPitchRange(0.0, CesiumMath.toRadians(-70.0), 5.0)
);
// Create light camera pointing straight down
@@ -1094,19 +1094,19 @@ describe(
if (depthFramebufferSupported(sceneWithWebgl1)) {
expect(sceneWithWebgl1.shadowMap._usesDepthTexture).toBe(true);
expect(
- sceneWithWebgl1.shadowMap._shadowMapTexture.pixelFormat,
+ sceneWithWebgl1.shadowMap._shadowMapTexture.pixelFormat
).toEqual(PixelFormat.DEPTH_STENCIL);
} else {
// Depth texture extension is supported, but it fails to create create a depth-only FBO
expect(sceneWithWebgl1.shadowMap._usesDepthTexture).toBe(false);
expect(
- sceneWithWebgl1.shadowMap._shadowMapTexture.pixelFormat,
+ sceneWithWebgl1.shadowMap._shadowMapTexture.pixelFormat
).toEqual(PixelFormat.RGBA);
}
}
},
undefined,
- sceneWithWebgl1,
+ sceneWithWebgl1
);
sceneWithWebgl1.shadowMap =
@@ -1124,11 +1124,11 @@ describe(
function (rgba) {
expect(sceneWithWebgl1.shadowMap._usesDepthTexture).toBe(false);
expect(
- sceneWithWebgl1.shadowMap._shadowMapTexture.pixelFormat,
+ sceneWithWebgl1.shadowMap._shadowMapTexture.pixelFormat
).toEqual(PixelFormat.RGBA);
},
undefined,
- sceneWithWebgl1,
+ sceneWithWebgl1
);
sceneWithWebgl1.destroyForSpecs();
@@ -1146,7 +1146,7 @@ describe(
const center = new Cartesian3.fromRadians(longitude, latitude, 200000);
scene.camera.lookAt(
center,
- new HeadingPitchRange(0.0, CesiumMath.toRadians(-70.0), 5.0),
+ new HeadingPitchRange(0.0, CesiumMath.toRadians(-70.0), 5.0)
);
renderAndCall(function (rgba) {
@@ -1161,7 +1161,7 @@ describe(
const center = new Cartesian3.fromRadians(longitude, latitude, height);
scene.camera.lookAt(
center,
- new HeadingPitchRange(0.0, CesiumMath.toRadians(-70.0), 5.0),
+ new HeadingPitchRange(0.0, CesiumMath.toRadians(-70.0), 5.0)
);
// Create light camera pointing straight down
@@ -1316,8 +1316,8 @@ describe(
if (defined(owner) && owner instanceof Model) {
expect(
drawCommand.shaderProgram._fragmentShaderText.indexOf(
- "czm_shadow",
- ) !== -1,
+ "czm_shadow"
+ ) !== -1
).toBe(true);
}
}
@@ -1334,8 +1334,8 @@ describe(
if (defined(owner) && owner instanceof Model) {
expect(
drawCommand.shaderProgram._fragmentShaderText.indexOf(
- "czm_shadow",
- ) !== -1,
+ "czm_shadow"
+ ) !== -1
).toBe(false);
}
}
@@ -1345,11 +1345,11 @@ describe(
it("Model updates derived commands when the shadow map is dirty", function () {
const spy1 = spyOn(
ShadowMap,
- "createReceiveDerivedCommand",
+ "createReceiveDerivedCommand"
).and.callThrough();
const spy2 = spyOn(
ShadowMap,
- "createCastDerivedCommand",
+ "createCastDerivedCommand"
).and.callThrough();
box.show = true;
@@ -1477,5 +1477,5 @@ describe(
scene.shadowMap = undefined;
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/ShadowVolumeAppearanceSpec.js b/packages/engine/Specs/Scene/ShadowVolumeAppearanceSpec.js
index 060940e59475..8eba7af6b61f 100644
--- a/packages/engine/Specs/Scene/ShadowVolumeAppearanceSpec.js
+++ b/packages/engine/Specs/Scene/ShadowVolumeAppearanceSpec.js
@@ -31,26 +31,24 @@ describe("Scene/ShadowVolumeAppearance", function () {
const largeTestRectangle = Rectangle.fromDegrees(-45.0, -45.0, 45.0, 45.0);
const smallTestRectangle = Rectangle.fromDegrees(-0.1, -0.1, 0.1, 0.1);
- const largeRectangleAttributes =
- ShadowVolumeAppearance.getSphericalExtentGeometryInstanceAttributes(
- largeTestRectangle,
- [0, 0, 0, 1, 1, 0],
- unitSphereEllipsoid,
- projection,
- );
- const smallRectangleAttributes =
- ShadowVolumeAppearance.getPlanarTextureCoordinateAttributes(
- smallTestRectangle,
- [0, 0, 0, 1, 1, 0],
- unitSphereEllipsoid,
- projection,
- );
+ const largeRectangleAttributes = ShadowVolumeAppearance.getSphericalExtentGeometryInstanceAttributes(
+ largeTestRectangle,
+ [0, 0, 0, 1, 1, 0],
+ unitSphereEllipsoid,
+ projection
+ );
+ const smallRectangleAttributes = ShadowVolumeAppearance.getPlanarTextureCoordinateAttributes(
+ smallTestRectangle,
+ [0, 0, 0, 1, 1, 0],
+ unitSphereEllipsoid,
+ projection
+ );
const perInstanceColorMaterialAppearance = new PerInstanceColorAppearance();
const flatPerInstanceColorMaterialAppearance = new PerInstanceColorAppearance(
{
flat: true,
- },
+ }
);
const textureMaterialAppearance = new MaterialAppearance({
@@ -83,13 +81,13 @@ describe("Scene/ShadowVolumeAppearance", function () {
const eastMostCartesian = projection.project(eastMostCartographic);
let encoded = EncodedCartesian3.encode(
eastMostCartesian.x,
- longitudeExtentsEncodeScratch,
+ longitudeExtentsEncodeScratch
);
const eastMostYhighDefine = `EAST_MOST_X_HIGH ${encoded.high.toFixed(
- `${encoded.high}`.length + 1,
+ `${encoded.high}`.length + 1
)}`;
const eastMostYlowDefine = `EAST_MOST_X_LOW ${encoded.low.toFixed(
- `${encoded.low}`.length + 1,
+ `${encoded.low}`.length + 1
)}`;
const westMostCartographic = new Cartographic();
@@ -99,13 +97,13 @@ describe("Scene/ShadowVolumeAppearance", function () {
const westMostCartesian = projection.project(westMostCartographic);
encoded = EncodedCartesian3.encode(
westMostCartesian.x,
- longitudeExtentsEncodeScratch,
+ longitudeExtentsEncodeScratch
);
const westMostYhighDefine = `WEST_MOST_X_HIGH ${encoded.high.toFixed(
- `${encoded.high}`.length + 1,
+ `${encoded.high}`.length + 1
)}`;
const westMostYlowDefine = `WEST_MOST_X_LOW ${encoded.low.toFixed(
- `${encoded.low}`.length + 1,
+ `${encoded.low}`.length + 1
)}`;
it("provides attributes for computing texture coordinates from Spherical extents", function () {
@@ -118,24 +116,24 @@ describe("Scene/ShadowVolumeAppearance", function () {
let value = sphericalExtents.value;
expect(value[0]).toEqualEpsilon(
-CesiumMath.PI_OVER_FOUR,
- CesiumMath.EPSILON4,
+ CesiumMath.EPSILON4
);
expect(value[1]).toEqualEpsilon(
-CesiumMath.PI_OVER_FOUR,
- CesiumMath.EPSILON4,
+ CesiumMath.EPSILON4
);
expect(value[2]).toEqualEpsilon(
1.0 / CesiumMath.PI_OVER_TWO,
- CesiumMath.EPSILON4,
+ CesiumMath.EPSILON4
);
expect(value[3]).toEqualEpsilon(
1.0 / CesiumMath.PI_OVER_TWO,
- CesiumMath.EPSILON4,
+ CesiumMath.EPSILON4
);
const longitudeRotation = attributes.longitudeRotation;
expect(longitudeRotation.componentDatatype).toEqual(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(longitudeRotation.componentsPerAttribute).toEqual(1);
expect(longitudeRotation.normalize).toEqual(false);
@@ -169,46 +167,46 @@ describe("Scene/ShadowVolumeAppearance", function () {
expect(southWest_HIGH.value[2]).toEqualEpsilon(0.0, CesiumMath.EPSILON7);
expect(southWest_LOW.value[0]).toBeGreaterThan(
- Math.cos(CesiumMath.toRadians(0.2)),
+ Math.cos(CesiumMath.toRadians(0.2))
);
// Expect eastward and northward to be unit-direction vectors in the ENU coordinate system at the rectangle center
const smallRectangleCenter = Cartographic.toCartesian(
Rectangle.center(smallTestRectangle),
- unitSphereEllipsoid,
+ unitSphereEllipsoid
);
const enuMatrix = Transforms.eastNorthUpToFixedFrame(
smallRectangleCenter,
- unitSphereEllipsoid,
+ unitSphereEllipsoid
);
const inverseEnu = Matrix4.inverse(enuMatrix, new Matrix4());
let eastwardENU = Matrix4.multiplyByPointAsVector(
inverseEnu,
Cartesian3.fromArray(eastward.value),
- new Cartesian3(),
+ new Cartesian3()
);
eastwardENU = Cartesian3.normalize(eastwardENU, eastwardENU);
expect(
Cartesian3.equalsEpsilon(
eastwardENU,
Cartesian3.UNIT_X,
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toBe(true);
let northwardENU = Matrix4.multiplyByPointAsVector(
inverseEnu,
Cartesian3.fromArray(northward.value),
- new Cartesian3(),
+ new Cartesian3()
);
northwardENU = Cartesian3.normalize(northwardENU, northwardENU);
expect(
Cartesian3.equalsEpsilon(
northwardENU,
Cartesian3.UNIT_Y,
- CesiumMath.EPSILON7,
- ),
+ CesiumMath.EPSILON7
+ )
).toBe(true);
});
@@ -236,19 +234,19 @@ describe("Scene/ShadowVolumeAppearance", function () {
let lowValue = planes2D_LOW.value;
expect(lowValue[0]).toEqualEpsilon(
southwestCartesian.x,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(lowValue[1]).toEqualEpsilon(
southwestCartesian.y,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(lowValue[2]).toEqualEpsilon(
-southwestCartesian.y,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(lowValue[3]).toEqualEpsilon(
-southwestCartesian.x,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
// Small case
@@ -264,32 +262,31 @@ describe("Scene/ShadowVolumeAppearance", function () {
lowValue = smallRectangleAttributes.planes2D_LOW.value;
expect(lowValue[0]).toEqualEpsilon(
southwestCartesian.x,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(lowValue[1]).toEqualEpsilon(
southwestCartesian.y,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(lowValue[2]).toEqualEpsilon(
-southwestCartesian.y,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(lowValue[3]).toEqualEpsilon(
-southwestCartesian.x,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
it("provides attributes for rotating texture coordinates", function () {
// 90 degree rotation of a square, so "max" in Y direction is (0,0), "max" in X direction is (1,1)
- const attributes =
- ShadowVolumeAppearance.getPlanarTextureCoordinateAttributes(
- smallTestRectangle,
- [1, 0, 0, 0, 1, 1],
- unitSphereEllipsoid,
- projection,
- 0.0,
- );
+ const attributes = ShadowVolumeAppearance.getPlanarTextureCoordinateAttributes(
+ smallTestRectangle,
+ [1, 0, 0, 0, 1, 1],
+ unitSphereEllipsoid,
+ projection,
+ 0.0
+ );
const uMaxVmax = attributes.uMaxVmax;
const uvMinAndExtents = attributes.uvMinAndExtents;
@@ -318,35 +315,35 @@ describe("Scene/ShadowVolumeAppearance", function () {
it("checks for spherical extent attributes", function () {
expect(
ShadowVolumeAppearance.hasAttributesForSphericalExtents(
- smallRectangleAttributes,
- ),
+ smallRectangleAttributes
+ )
).toBe(false);
expect(
ShadowVolumeAppearance.hasAttributesForSphericalExtents(
- largeRectangleAttributes,
- ),
+ largeRectangleAttributes
+ )
).toBe(true);
});
it("checks for planar texture coordinate attributes", function () {
expect(
ShadowVolumeAppearance.hasAttributesForTextureCoordinatePlanes(
- smallRectangleAttributes,
- ),
+ smallRectangleAttributes
+ )
).toBe(true);
expect(
ShadowVolumeAppearance.hasAttributesForTextureCoordinatePlanes(
- largeRectangleAttributes,
- ),
+ largeRectangleAttributes
+ )
).toBe(false);
});
it("checks if a rectangle should use spherical texture coordinates", function () {
expect(
- ShadowVolumeAppearance.shouldUseSphericalCoordinates(smallTestRectangle),
+ ShadowVolumeAppearance.shouldUseSphericalCoordinates(smallTestRectangle)
).toBe(false);
expect(
- ShadowVolumeAppearance.shouldUseSphericalCoordinates(largeTestRectangle),
+ ShadowVolumeAppearance.shouldUseSphericalCoordinates(largeTestRectangle)
).toBe(true);
});
@@ -355,13 +352,13 @@ describe("Scene/ShadowVolumeAppearance", function () {
const sphericalTexturedAppearance = new ShadowVolumeAppearance(
true,
false,
- textureMaterialAppearance,
+ textureMaterialAppearance
);
let shaderSource = sphericalTexturedAppearance.createVertexShader(
[],
testVs,
false,
- projection,
+ projection
);
let defines = shaderSource.defines;
expect(defines.length).toEqual(2);
@@ -373,7 +370,7 @@ describe("Scene/ShadowVolumeAppearance", function () {
[],
testVs,
true,
- projection,
+ projection
);
defines = shaderSource.defines;
expect(defines.length).toEqual(6);
@@ -389,13 +386,13 @@ describe("Scene/ShadowVolumeAppearance", function () {
const sphericalUnculledColorAppearance = new ShadowVolumeAppearance(
false,
false,
- perInstanceColorMaterialAppearance,
+ perInstanceColorMaterialAppearance
);
shaderSource = sphericalUnculledColorAppearance.createVertexShader(
[],
testVs,
false,
- projection,
+ projection
);
defines = shaderSource.defines;
expect(defines.length).toEqual(1);
@@ -406,7 +403,7 @@ describe("Scene/ShadowVolumeAppearance", function () {
[],
testVs,
true,
- projection,
+ projection
);
defines = shaderSource.defines;
expect(defines.length).toEqual(5);
@@ -422,13 +419,13 @@ describe("Scene/ShadowVolumeAppearance", function () {
const planarTexturedAppearance = new ShadowVolumeAppearance(
false,
true,
- textureMaterialAppearance,
+ textureMaterialAppearance
);
shaderSource = planarTexturedAppearance.createVertexShader(
[],
testVs,
false,
- projection,
+ projection
);
defines = shaderSource.defines;
expect(defines.indexOf("TEXTURE_COORDINATES")).not.toEqual(-1);
@@ -438,7 +435,7 @@ describe("Scene/ShadowVolumeAppearance", function () {
[],
testVs,
true,
- projection,
+ projection
);
defines = shaderSource.defines;
expect(defines.indexOf("TEXTURE_COORDINATES")).not.toEqual(-1);
@@ -457,13 +454,13 @@ describe("Scene/ShadowVolumeAppearance", function () {
const sphericalTexturedAppearance = new ShadowVolumeAppearance(
true,
false,
- textureMaterialAppearance,
+ textureMaterialAppearance
);
let shaderSource = sphericalTexturedAppearance.createPickVertexShader(
[],
testVs,
false,
- projection,
+ projection
);
let defines = shaderSource.defines;
expect(defines.length).toEqual(2);
@@ -475,7 +472,7 @@ describe("Scene/ShadowVolumeAppearance", function () {
[],
testVs,
true,
- projection,
+ projection
);
defines = shaderSource.defines;
expect(defines.length).toEqual(6);
@@ -491,13 +488,13 @@ describe("Scene/ShadowVolumeAppearance", function () {
const sphericalUnculledColorAppearance = new ShadowVolumeAppearance(
false,
false,
- perInstanceColorMaterialAppearance,
+ perInstanceColorMaterialAppearance
);
shaderSource = sphericalUnculledColorAppearance.createPickVertexShader(
[],
testVs,
false,
- projection,
+ projection
);
defines = shaderSource.defines;
expect(defines.length).toEqual(0);
@@ -507,7 +504,7 @@ describe("Scene/ShadowVolumeAppearance", function () {
[],
testVs,
true,
- projection,
+ projection
);
defines = shaderSource.defines;
@@ -522,13 +519,13 @@ describe("Scene/ShadowVolumeAppearance", function () {
const planarTexturedAppearance = new ShadowVolumeAppearance(
false,
true,
- textureMaterialAppearance,
+ textureMaterialAppearance
);
shaderSource = planarTexturedAppearance.createPickVertexShader(
[],
testVs,
false,
- projection,
+ projection
);
defines = shaderSource.defines;
expect(defines.length).toEqual(0);
@@ -537,7 +534,7 @@ describe("Scene/ShadowVolumeAppearance", function () {
[],
testVs,
true,
- projection,
+ projection
);
defines = shaderSource.defines;
@@ -554,7 +551,7 @@ describe("Scene/ShadowVolumeAppearance", function () {
const sphericalTexturedAppearance = new ShadowVolumeAppearance(
true,
false,
- textureMaterialAppearance,
+ textureMaterialAppearance
);
let shaderSource = sphericalTexturedAppearance.createFragmentShader(false);
let defines = shaderSource.defines;
@@ -591,7 +588,7 @@ describe("Scene/ShadowVolumeAppearance", function () {
const planarColorAppearance = new ShadowVolumeAppearance(
true,
true,
- perInstanceColorMaterialAppearance,
+ perInstanceColorMaterialAppearance
);
shaderSource = planarColorAppearance.createFragmentShader(false);
defines = shaderSource.defines;
@@ -619,7 +616,7 @@ describe("Scene/ShadowVolumeAppearance", function () {
const flatSphericalTexturedAppearance = new ShadowVolumeAppearance(
true,
false,
- flatTextureMaterialAppearance,
+ flatTextureMaterialAppearance
);
shaderSource = flatSphericalTexturedAppearance.createFragmentShader(false);
defines = shaderSource.defines;
@@ -638,7 +635,7 @@ describe("Scene/ShadowVolumeAppearance", function () {
const flatSphericalColorAppearance = new ShadowVolumeAppearance(
false,
false,
- flatPerInstanceColorMaterialAppearance,
+ flatPerInstanceColorMaterialAppearance
);
shaderSource = flatSphericalColorAppearance.createFragmentShader(false);
defines = shaderSource.defines;
diff --git a/packages/engine/Specs/Scene/SingleTileImageryProviderSpec.js b/packages/engine/Specs/Scene/SingleTileImageryProviderSpec.js
index f1cc95c6848f..41205f38c341 100644
--- a/packages/engine/Specs/Scene/SingleTileImageryProviderSpec.js
+++ b/packages/engine/Specs/Scene/SingleTileImageryProviderSpec.js
@@ -34,7 +34,7 @@ describe("Scene/SingleTileImageryProvider", function () {
new SingleTileImageryProvider({
url: "Data/Images/Red16x16.png",
tileWidth: 16,
- }),
+ })
).toThrowDeveloperError();
expect(
@@ -42,19 +42,19 @@ describe("Scene/SingleTileImageryProvider", function () {
new SingleTileImageryProvider({
url: "Data/Images/Red16x16.png",
tileHeight: 16,
- }),
+ })
).toThrowDeveloperError();
});
it("fromUrl throws without url", async function () {
await expectAsync(
- SingleTileImageryProvider.fromUrl(),
+ SingleTileImageryProvider.fromUrl()
).toBeRejectedWithDeveloperError();
});
it("fromUrl resolves to created provider", async function () {
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
expect(provider).toBeInstanceOf(SingleTileImageryProvider);
});
@@ -70,16 +70,16 @@ describe("Scene/SingleTileImageryProvider", function () {
it("fromUrl throws on failed request", async function () {
await expectAsync(
- SingleTileImageryProvider.fromUrl("invalid.image.url"),
+ SingleTileImageryProvider.fromUrl("invalid.image.url")
).toBeRejectedWithError(
RuntimeError,
- "Failed to load image invalid.image.url",
+ "Failed to load image invalid.image.url"
);
});
it("returns valid value for hasAlphaChannel", async function () {
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
expect(typeof provider.hasAlphaChannel).toBe("boolean");
@@ -112,7 +112,7 @@ describe("Scene/SingleTileImageryProvider", function () {
"Data/Images/Red16x16.png",
{
ellipsoid: ellipsoid,
- },
+ }
);
expect(provider.tilingScheme.ellipsoid).toEqual(ellipsoid);
@@ -121,17 +121,19 @@ describe("Scene/SingleTileImageryProvider", function () {
it("requests the single image immediately upon construction", async function () {
const imageUrl = "Data/Images/Red16x16.png";
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const url = request.url;
- expect(url).toEqual(imageUrl);
- Resource._DefaultImplementations.createImage(
- request,
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const url = request.url;
+ expect(url).toEqual(imageUrl);
+ Resource._DefaultImplementations.createImage(
+ request,
+ crossOrigin,
+ deferred
+ );
+ });
const provider = await SingleTileImageryProvider.fromUrl(imageUrl);
@@ -144,17 +146,19 @@ describe("Scene/SingleTileImageryProvider", function () {
it("lazy loads image when constructed with tile height and tile width", async function () {
const imageUrl = "Data/Images/Red16x16.png";
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const url = request.url;
- expect(url).toEqual(imageUrl);
- Resource._DefaultImplementations.createImage(
- request,
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const url = request.url;
+ expect(url).toEqual(imageUrl);
+ Resource._DefaultImplementations.createImage(
+ request,
+ crossOrigin,
+ deferred
+ );
+ });
const provider = new SingleTileImageryProvider({
url: imageUrl,
@@ -171,7 +175,7 @@ describe("Scene/SingleTileImageryProvider", function () {
it("turns the supplied credit into a logo", async function () {
const provider = await SingleTileImageryProvider.fromUrl(
- "Data/Images/Red16x16.png",
+ "Data/Images/Red16x16.png"
);
expect(provider.credit).toBeUndefined();
@@ -180,7 +184,7 @@ describe("Scene/SingleTileImageryProvider", function () {
"Data/Images/Red16x16.png",
{
credit: "Thanks to our awesome made up source of this imagery!",
- },
+ }
);
expect(providerWithCredit.credit).toBeDefined();
@@ -207,14 +211,14 @@ describe("Scene/SingleTileImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
if (tries === 2) {
// Succeed after 2 tries
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
} else {
// fail
diff --git a/packages/engine/Specs/Scene/SkyAtmosphereSpec.js b/packages/engine/Specs/Scene/SkyAtmosphereSpec.js
index 6f0622a80d15..71a215cff6cb 100644
--- a/packages/engine/Specs/Scene/SkyAtmosphereSpec.js
+++ b/packages/engine/Specs/Scene/SkyAtmosphereSpec.js
@@ -172,5 +172,5 @@ describe(
expect(s.isDestroyed()).toEqual(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/SkyBoxSpec.js b/packages/engine/Specs/Scene/SkyBoxSpec.js
index 4db7c8702d18..435fff1d6b17 100644
--- a/packages/engine/Specs/Scene/SkyBoxSpec.js
+++ b/packages/engine/Specs/Scene/SkyBoxSpec.js
@@ -12,11 +12,11 @@ describe(
beforeAll(function () {
scene = createScene();
- return Resource.fetchImage("./Data/Images/Blue.png").then(
- function (image) {
- loadedImage = image;
- },
- );
+ return Resource.fetchImage("./Data/Images/Blue.png").then(function (
+ image
+ ) {
+ loadedImage = image;
+ });
});
afterAll(function () {
@@ -356,5 +356,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/SpecularEnvironmentCubeMapSpec.js b/packages/engine/Specs/Scene/SpecularEnvironmentCubeMapSpec.js
index e264444a9fd0..500386e89389 100644
--- a/packages/engine/Specs/Scene/SpecularEnvironmentCubeMapSpec.js
+++ b/packages/engine/Specs/Scene/SpecularEnvironmentCubeMapSpec.js
@@ -178,14 +178,11 @@ describe(
const direction = directions[key];
const expectedColor = directionalColors[mipLevel][key];
- sampleCubeMap(
- cubeMap,
- direction,
- mipLevel,
- function (cubeMapColor) {
- expect(cubeMapColor).toEqualEpsilon(expectedColor, 1);
- },
- );
+ sampleCubeMap(cubeMap, direction, mipLevel, function (
+ cubeMapColor
+ ) {
+ expect(cubeMapColor).toEqualEpsilon(expectedColor, 1);
+ });
}
}
}
@@ -235,9 +232,9 @@ describe(
cubeMap.update(frameState);
return defined(error);
},
- { timeout: 10000 },
+ { timeout: 10000 }
);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/SphereEmitterSpec.js b/packages/engine/Specs/Scene/SphereEmitterSpec.js
index 122605274517..7b050fecc814 100644
--- a/packages/engine/Specs/Scene/SphereEmitterSpec.js
+++ b/packages/engine/Specs/Scene/SphereEmitterSpec.js
@@ -48,10 +48,10 @@ describe("Scene/SphereEmitter", function () {
for (let i = 0; i < 1000; ++i) {
emitter.emit(particle);
expect(Cartesian3.magnitude(particle.position)).toBeLessThanOrEqual(
- emitter.radius,
+ emitter.radius
);
expect(particle.velocity).toEqual(
- Cartesian3.normalize(particle.position, new Cartesian3()),
+ Cartesian3.normalize(particle.position, new Cartesian3())
);
}
});
diff --git a/packages/engine/Specs/Scene/StructuralMetadataSpec.js b/packages/engine/Specs/Scene/StructuralMetadataSpec.js
index d1853327fa84..1b396273f39b 100644
--- a/packages/engine/Specs/Scene/StructuralMetadataSpec.js
+++ b/packages/engine/Specs/Scene/StructuralMetadataSpec.js
@@ -195,10 +195,10 @@ describe("Scene/StructuralMetadata", function () {
expect(propertyAttribute.class).toBe(pointsClass);
expect(propertyAttribute.getProperty("color").attribute).toBe("_COLOR");
expect(propertyAttribute.getProperty("intensity").attribute).toBe(
- "_INTENSITY",
+ "_INTENSITY"
);
expect(propertyAttribute.getProperty("pointSize").attribute).toBe(
- "_POINT_SIZE",
+ "_POINT_SIZE"
);
expect(metadata.propertyTablesByteLength).toBe(0);
diff --git a/packages/engine/Specs/Scene/SunSpec.js b/packages/engine/Specs/Scene/SunSpec.js
index 9637568d61e4..caa9fd397934 100644
--- a/packages/engine/Specs/Scene/SunSpec.js
+++ b/packages/engine/Specs/Scene/SunSpec.js
@@ -112,5 +112,5 @@ describe(
expect(sun.isDestroyed()).toEqual(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/TerrainFillMeshSpec.js b/packages/engine/Specs/Scene/TerrainFillMeshSpec.js
index 9726006d3c12..cf3589dd19af 100644
--- a/packages/engine/Specs/Scene/TerrainFillMeshSpec.js
+++ b/packages/engine/Specs/Scene/TerrainFillMeshSpec.js
@@ -70,7 +70,7 @@ describe("Scene/TerrainFillMesh", function () {
};
frameState.cullingVolume.computeVisibility.and.returnValue(
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
imageryLayerCollection = new ImageryLayerCollection();
@@ -90,7 +90,7 @@ describe("Scene/TerrainFillMesh", function () {
processor = new TerrainTileProcessor(
frameState,
mockTerrain,
- imageryLayerCollection,
+ imageryLayerCollection
);
processor.mockWebGL();
@@ -115,10 +115,18 @@ describe("Scene/TerrainFillMesh", function () {
height: 3,
createdByUpsampling: false,
buffer: new Float32Array([
- 15.0, 16.0, 17.0, 22.0, 23.0, 24.0, 29.0, 30.0, 31.0,
+ 15.0,
+ 16.0,
+ 17.0,
+ 22.0,
+ 23.0,
+ 24.0,
+ 29.0,
+ 30.0,
+ 31.0,
]),
}),
- west,
+ west
)
.createMeshWillSucceed(west);
@@ -129,10 +137,18 @@ describe("Scene/TerrainFillMesh", function () {
height: 3,
createdByUpsampling: false,
buffer: new Float32Array([
- 31.0, 32.0, 33.0, 38.0, 39.0, 40.0, 45.0, 46.0, 47.0,
+ 31.0,
+ 32.0,
+ 33.0,
+ 38.0,
+ 39.0,
+ 40.0,
+ 45.0,
+ 46.0,
+ 47.0,
]),
}),
- south,
+ south
)
.createMeshWillSucceed(south);
@@ -143,10 +159,18 @@ describe("Scene/TerrainFillMesh", function () {
height: 3,
createdByUpsampling: false,
buffer: new Float32Array([
- 19.0, 20.0, 21.0, 26.0, 27.0, 28.0, 33.0, 34.0, 35.0,
+ 19.0,
+ 20.0,
+ 21.0,
+ 26.0,
+ 27.0,
+ 28.0,
+ 33.0,
+ 34.0,
+ 35.0,
]),
}),
- east,
+ east
)
.createMeshWillSucceed(east);
@@ -157,10 +181,18 @@ describe("Scene/TerrainFillMesh", function () {
height: 3,
createdByUpsampling: false,
buffer: new Float32Array([
- 3.0, 4.0, 5.0, 10.0, 11.0, 12.0, 17.0, 18.0, 19.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 10.0,
+ 11.0,
+ 12.0,
+ 17.0,
+ 18.0,
+ 19.0,
]),
}),
- north,
+ north
)
.createMeshWillSucceed(north);
@@ -171,10 +203,18 @@ describe("Scene/TerrainFillMesh", function () {
height: 3,
createdByUpsampling: false,
buffer: new Float32Array([
- 29.0, 30.0, 31.0, 36.0, 37.0, 38.0, 43.0, 44.0, 45.0,
+ 29.0,
+ 30.0,
+ 31.0,
+ 36.0,
+ 37.0,
+ 38.0,
+ 43.0,
+ 44.0,
+ 45.0,
]),
}),
- southwest,
+ southwest
)
.createMeshWillSucceed(southwest);
@@ -185,10 +225,18 @@ describe("Scene/TerrainFillMesh", function () {
height: 3,
createdByUpsampling: false,
buffer: new Float32Array([
- 33.0, 34.0, 35.0, 40.0, 41.0, 42.0, 47.0, 48.0, 49.0,
+ 33.0,
+ 34.0,
+ 35.0,
+ 40.0,
+ 41.0,
+ 42.0,
+ 47.0,
+ 48.0,
+ 49.0,
]),
}),
- southeast,
+ southeast
)
.createMeshWillSucceed(southeast);
@@ -199,10 +247,18 @@ describe("Scene/TerrainFillMesh", function () {
height: 3,
createdByUpsampling: false,
buffer: new Float32Array([
- 1.0, 2.0, 3.0, 8.0, 9.0, 10.0, 15.0, 16.0, 17.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 8.0,
+ 9.0,
+ 10.0,
+ 15.0,
+ 16.0,
+ 17.0,
]),
}),
- northwest,
+ northwest
)
.createMeshWillSucceed(northwest);
@@ -213,10 +269,18 @@ describe("Scene/TerrainFillMesh", function () {
height: 3,
createdByUpsampling: false,
buffer: new Float32Array([
- 5.0, 6.0, 7.0, 12.0, 13.0, 14.0, 19.0, 20.0, 21.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 12.0,
+ 13.0,
+ 14.0,
+ 19.0,
+ 20.0,
+ 21.0,
]),
}),
- northeast,
+ northeast
)
.createMeshWillSucceed(northeast);
});
@@ -351,24 +415,24 @@ describe("Scene/TerrainFillMesh", function () {
expect(ne.northwestMesh).toBeUndefined();
expect(
- sw.eastTiles[0] === centerSE || se.westTiles[0] === centerSW,
+ sw.eastTiles[0] === centerSE || se.westTiles[0] === centerSW
).toBe(true);
expect(
- nw.eastTiles[0] === centerNE || ne.westTiles[0] === centerNW,
+ nw.eastTiles[0] === centerNE || ne.westTiles[0] === centerNW
).toBe(true);
expect(
- sw.northTiles[0] === centerNW || nw.southTiles[0] === centerSW,
+ sw.northTiles[0] === centerNW || nw.southTiles[0] === centerSW
).toBe(true);
expect(
- se.northTiles[0] === centerNE || ne.southTiles[0] === centerSE,
+ se.northTiles[0] === centerNE || ne.southTiles[0] === centerSE
).toBe(true);
expect(
- sw.northeastTile === centerNE || ne.southwestTile === centerSW,
+ sw.northeastTile === centerNE || ne.southwestTile === centerSW
).toBe(true);
expect(
- nw.southeastTile === centerSE || se.northwestTile === centerNW,
+ nw.southeastTile === centerSE || se.northwestTile === centerNW
).toBe(true);
});
});
@@ -492,7 +556,7 @@ describe("Scene/TerrainFillMesh", function () {
it("adjusts existing fill tiles when an adjacent fill tile changes", function () {
const dontLoad = [east, south, southeast];
dontLoad.forEach(
- mockTerrain.requestTileGeometryWillDefer.bind(mockTerrain),
+ mockTerrain.requestTileGeometryWillDefer.bind(mockTerrain)
);
const tiles = [
@@ -538,22 +602,22 @@ describe("Scene/TerrainFillMesh", function () {
expectVertexCount(southeast.data.fill, 5);
expect(getHeight(center.data.fill, 1.0, 0.0)).toBe(
- getHeight(southeast.data.fill, 0.0, 1.0),
+ getHeight(southeast.data.fill, 0.0, 1.0)
);
expect(getHeight(center.data.fill, 1.0, 0.0)).toBe(
- getHeight(south.data.fill, 1.0, 1.0),
+ getHeight(south.data.fill, 1.0, 1.0)
);
expect(getHeight(center.data.fill, 1.0, 0.0)).toBe(
- getHeight(east.data.fill, 0.0, 0.0),
+ getHeight(east.data.fill, 0.0, 0.0)
);
expect(getHeight(center.data.fill, 1.0, 1.0)).toBe(
- getHeight(east.data.fill, 0.0, 1.0),
+ getHeight(east.data.fill, 0.0, 1.0)
);
expect(getHeight(east.data.fill, 1.0, 0.0)).toBe(
- getHeight(southeast.data.fill, 1.0, 1.0),
+ getHeight(southeast.data.fill, 1.0, 1.0)
);
expect(getHeight(south.data.fill, 1.0, 0.0)).toBe(
- getHeight(southeast.data.fill, 0.0, 0.0),
+ getHeight(southeast.data.fill, 0.0, 0.0)
);
// Now load the south tile.
@@ -564,10 +628,18 @@ describe("Scene/TerrainFillMesh", function () {
height: 3,
createdByUpsampling: false,
buffer: new Float32Array([
- 31.0, 32.0, 33.0, 38.0, 39.0, 40.0, 45.0, 46.0, 47.0,
+ 31.0,
+ 32.0,
+ 33.0,
+ 38.0,
+ 39.0,
+ 40.0,
+ 45.0,
+ 46.0,
+ 47.0,
]),
}),
- south,
+ south
)
.createMeshWillSucceed(south);
@@ -603,7 +675,7 @@ describe("Scene/TerrainFillMesh", function () {
expectVertex(southeast.data.fill, 0.0, 1.0, 33.0);
expect(getHeight(east.data.fill, 1.0, 0.0)).toBe(
- getHeight(southeast.data.fill, 1.0, 1.0),
+ getHeight(southeast.data.fill, 1.0, 1.0)
);
});
});
@@ -833,13 +905,13 @@ describe("Scene/TerrainFillMesh", function () {
fillSW,
1.0,
1.0,
- ((31.0 + 32.0) / 2 + (31.0 + 24.0) / 2) / 2,
+ ((31.0 + 32.0) / 2 + (31.0 + 24.0) / 2) / 2
);
expectVertex(
fillSW,
0.5,
0.5,
- ((31.0 + 32.0) / 2 + (31.0 + 24.0) / 2) / 2,
+ ((31.0 + 32.0) / 2 + (31.0 + 24.0) / 2) / 2
);
expectVertexCount(fillSE, 5);
@@ -849,7 +921,7 @@ describe("Scene/TerrainFillMesh", function () {
fillSE,
0.0,
1.0,
- ((32.0 + 33.0) / 2 + (33.0 + 26.0) / 2) / 2,
+ ((32.0 + 33.0) / 2 + (33.0 + 26.0) / 2) / 2
);
expectVertex(fillSE, 1.0, 1.0, (33.0 + 26.0) / 2);
expectVertex(fillSE, 0.5, 0.5, (33.0 + (33.0 + 26.0) / 2) / 2);
@@ -860,7 +932,7 @@ describe("Scene/TerrainFillMesh", function () {
fillNW,
1.0,
0.0,
- ((17.0 + 18.0) / 2 + (17.0 + 24.0) / 2) / 2,
+ ((17.0 + 18.0) / 2 + (17.0 + 24.0) / 2) / 2
);
expectVertex(fillNW, 0.0, 1.0, 17.0);
expectVertex(fillNW, 1.0, 1.0, (17.0 + 18.0) / 2);
@@ -871,7 +943,7 @@ describe("Scene/TerrainFillMesh", function () {
fillNE,
0.0,
0.0,
- ((19.0 + 26.0) / 2 + (18.0 + 19.0) / 2) / 2,
+ ((19.0 + 26.0) / 2 + (18.0 + 19.0) / 2) / 2
);
expectVertex(fillNE, 1.0, 0.0, (19.0 + 26.0) / 2);
expectVertex(fillNE, 0.0, 1.0, (18.0 + 19.0) / 2);
@@ -880,7 +952,7 @@ describe("Scene/TerrainFillMesh", function () {
fillNE,
0.5,
0.5,
- ((18.0 + 19.0) / 2 + (19.0 + 26.0) / 2) / 2,
+ ((18.0 + 19.0) / 2 + (19.0 + 26.0) / 2) / 2
);
});
});
@@ -903,7 +975,7 @@ describe("Scene/TerrainFillMesh", function () {
createdByUpsampling: false,
buffer: new Float32Array([1.0, 1.0, 1.5, 1.5]),
}),
- westN,
+ westN
)
.createMeshWillSucceed(westN);
@@ -915,7 +987,7 @@ describe("Scene/TerrainFillMesh", function () {
createdByUpsampling: false,
buffer: new Float32Array([1.5, 1.5, 2.0, 2.0]),
}),
- westS,
+ westS
)
.createMeshWillSucceed(westS);
@@ -927,7 +999,7 @@ describe("Scene/TerrainFillMesh", function () {
createdByUpsampling: false,
buffer: new Float32Array([3.0, 3.0, 3.5, 3.5]),
}),
- eastN,
+ eastN
)
.createMeshWillSucceed(eastN);
@@ -939,7 +1011,7 @@ describe("Scene/TerrainFillMesh", function () {
createdByUpsampling: false,
buffer: new Float32Array([3.5, 3.5, 4.0, 4.0]),
}),
- eastS,
+ eastS
)
.createMeshWillSucceed(eastS);
@@ -951,7 +1023,7 @@ describe("Scene/TerrainFillMesh", function () {
createdByUpsampling: false,
buffer: new Float32Array([5.0, 5.5, 5.0, 5.5]),
}),
- northW,
+ northW
)
.createMeshWillSucceed(northW);
@@ -963,7 +1035,7 @@ describe("Scene/TerrainFillMesh", function () {
createdByUpsampling: false,
buffer: new Float32Array([5.5, 6.0, 6.5, 6.0]),
}),
- northE,
+ northE
)
.createMeshWillSucceed(northE);
@@ -975,7 +1047,7 @@ describe("Scene/TerrainFillMesh", function () {
createdByUpsampling: false,
buffer: new Float32Array([7.0, 7.5, 7.0, 7.5]),
}),
- southW,
+ southW
)
.createMeshWillSucceed(southW);
@@ -987,7 +1059,7 @@ describe("Scene/TerrainFillMesh", function () {
createdByUpsampling: false,
buffer: new Float32Array([7.5, 8.0, 7.5, 8.0]),
}),
- southE,
+ southE
)
.createMeshWillSucceed(southE);
@@ -1059,10 +1131,18 @@ describe("Scene/TerrainFillMesh", function () {
height: 3,
createdByUpsampling: false,
buffer: new Float32Array([
- 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0,
]),
}),
- westernHemisphere,
+ westernHemisphere
)
.createMeshWillSucceed(westernHemisphere);
@@ -1070,7 +1150,7 @@ describe("Scene/TerrainFillMesh", function () {
.process([westernHemisphere, easternHemisphere])
.then(function () {
const fill = (easternHemisphere.data.fill = new TerrainFillMesh(
- easternHemisphere,
+ easternHemisphere
));
fill.eastTiles.push(westernHemisphere);
@@ -1093,10 +1173,18 @@ describe("Scene/TerrainFillMesh", function () {
height: 3,
createdByUpsampling: false,
buffer: new Float32Array([
- 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0,
+ 10.0,
+ 11.0,
+ 12.0,
+ 13.0,
+ 14.0,
+ 15.0,
+ 16.0,
+ 17.0,
+ 18.0,
]),
}),
- easternHemisphere,
+ easternHemisphere
)
.createMeshWillSucceed(easternHemisphere);
mockTerrain.requestTileGeometryWillDefer(westernHemisphere);
@@ -1105,7 +1193,7 @@ describe("Scene/TerrainFillMesh", function () {
.process([westernHemisphere, easternHemisphere])
.then(function () {
const fill = (westernHemisphere.data.fill = new TerrainFillMesh(
- westernHemisphere,
+ westernHemisphere
));
fill.westTiles.push(easternHemisphere);
@@ -1138,13 +1226,13 @@ describe("Scene/TerrainFillMesh", function () {
const tc = encoding.decodeTextureCoordinates(
vertices,
i,
- textureCoordinateScratch,
+ textureCoordinateScratch
);
const vertexHeight = encoding.decodeHeight(vertices, i);
const vertexPosition = encoding.decodePosition(
vertices,
i,
- positionScratch,
+ positionScratch
);
if (
Math.abs(u - tc.x) < 1e-5 &&
@@ -1157,7 +1245,7 @@ describe("Scene/TerrainFillMesh", function () {
latitude,
vertexHeight,
undefined,
- expectedPositionScratch,
+ expectedPositionScratch
);
expect(vertexPosition).toEqualEpsilon(expectedPosition, 1);
return vertexHeight;
diff --git a/packages/engine/Specs/Scene/TextureAtlasSpec.js b/packages/engine/Specs/Scene/TextureAtlasSpec.js
index 4d67dc7f3fd0..5b93cc1eca42 100644
--- a/packages/engine/Specs/Scene/TextureAtlasSpec.js
+++ b/packages/engine/Specs/Scene/TextureAtlasSpec.js
@@ -37,34 +37,34 @@ describe(
greenImage = image;
greenGuid = createGuid();
}),
- Resource.fetchImage("./Data/Images/Green1x4.png").then(
- function (image) {
- tallGreenImage = image;
- tallGreenGuid = createGuid();
- },
- ),
+ Resource.fetchImage("./Data/Images/Green1x4.png").then(function (
+ image
+ ) {
+ tallGreenImage = image;
+ tallGreenGuid = createGuid();
+ }),
Resource.fetchImage("./Data/Images/Blue.png").then(function (image) {
blueImage = image;
blueGuid = createGuid();
}),
- Resource.fetchImage("./Data/Images/Red16x16.png").then(
- function (image) {
- bigRedImage = image;
- bigRedGuid = createGuid();
- },
- ),
- Resource.fetchImage("./Data/Images/Blue10x10.png").then(
- function (image) {
- bigBlueImage = image;
- bigBlueGuid = createGuid();
- },
- ),
- Resource.fetchImage("./Data/Images/Green4x4.png").then(
- function (image) {
- bigGreenImage = image;
- bigGreenGuid = createGuid();
- },
- ),
+ Resource.fetchImage("./Data/Images/Red16x16.png").then(function (
+ image
+ ) {
+ bigRedImage = image;
+ bigRedGuid = createGuid();
+ }),
+ Resource.fetchImage("./Data/Images/Blue10x10.png").then(function (
+ image
+ ) {
+ bigBlueImage = image;
+ bigBlueGuid = createGuid();
+ }),
+ Resource.fetchImage("./Data/Images/Green4x4.png").then(function (
+ image
+ ) {
+ bigGreenImage = image;
+ bigGreenGuid = createGuid();
+ }),
]);
});
@@ -331,53 +331,53 @@ describe(
expect(c0.y).toEqualEpsilon(2.0 / atlasHeight, CesiumMath.EPSILON16);
expect(c0.width).toEqualEpsilon(
greenImage.width / atlasWidth,
- CesiumMath.EPSILON16,
+ CesiumMath.EPSILON16
);
expect(c0.height).toEqualEpsilon(
greenImage.height / atlasHeight,
- CesiumMath.EPSILON16,
+ CesiumMath.EPSILON16
);
expect(c1.x).toEqualEpsilon(
(greenImage.width + 2 * atlas.borderWidthInPixels) / atlasWidth,
- CesiumMath.EPSILON16,
+ CesiumMath.EPSILON16
);
expect(c1.y).toEqualEpsilon(2.0 / atlasHeight, CesiumMath.EPSILON16);
expect(c1.width).toEqualEpsilon(
blueImage.width / atlasWidth,
- CesiumMath.EPSILON16,
+ CesiumMath.EPSILON16
);
expect(c1.height).toEqualEpsilon(
blueImage.width / atlasHeight,
- CesiumMath.EPSILON16,
+ CesiumMath.EPSILON16
);
expect(c2.x).toEqualEpsilon(2.0 / atlasWidth, CesiumMath.EPSILON16);
expect(c2.y).toEqualEpsilon(
(bigRedImage.height + atlas.borderWidthInPixels) / atlasHeight,
- CesiumMath.EPSILON16,
+ CesiumMath.EPSILON16
);
expect(c2.width).toEqualEpsilon(
bigRedImage.width / atlasWidth,
- CesiumMath.EPSILON16,
+ CesiumMath.EPSILON16
);
expect(c2.height).toEqualEpsilon(
bigRedImage.height / atlasHeight,
- CesiumMath.EPSILON16,
+ CesiumMath.EPSILON16
);
expect(c3.x).toEqualEpsilon(2.0 / atlasWidth, CesiumMath.EPSILON16);
expect(c3.y).toEqualEpsilon(
(greenImage.height + 2 * atlas.borderWidthInPixels) / atlasHeight,
- CesiumMath.EPSILON16,
+ CesiumMath.EPSILON16
);
expect(c3.width).toEqualEpsilon(
bigBlueImage.width / atlasWidth,
- CesiumMath.EPSILON16,
+ CesiumMath.EPSILON16
);
expect(c3.height).toEqualEpsilon(
bigBlueImage.height / atlasHeight,
- CesiumMath.EPSILON16,
+ CesiumMath.EPSILON16
);
});
@@ -553,10 +553,10 @@ describe(
expect(texture.height).toEqual(atlasHeight);
expect(coordinates[greenIndex].x).toEqual(
- atlas.borderWidthInPixels / atlasWidth,
+ atlas.borderWidthInPixels / atlasWidth
);
expect(coordinates[greenIndex].y).toEqual(
- atlas.borderWidthInPixels / atlasHeight,
+ atlas.borderWidthInPixels / atlasHeight
);
expect(coordinates[greenIndex].width).toEqual(1.0 / atlasWidth);
expect(coordinates[greenIndex].height).toEqual(1.0 / atlasHeight);
@@ -610,10 +610,10 @@ describe(
expect(coordinates[index].x).toEqual(0.0 / atlasWidth);
expect(coordinates[index].y).toEqual(0.0 / atlasHeight);
expect(coordinates[index].width).toEqual(
- tallGreenImage.width / atlasWidth,
+ tallGreenImage.width / atlasWidth
);
expect(coordinates[index].height).toEqual(
- tallGreenImage.height / atlasHeight,
+ tallGreenImage.height / atlasHeight
);
});
});
@@ -700,19 +700,19 @@ describe(
const index1 = await atlas.addSubRegion(
greenGuid,
- new BoundingRectangle(0.0, 0.0, 0.5, 0.5),
+ new BoundingRectangle(0.0, 0.0, 0.5, 0.5)
);
const index2 = await atlas.addSubRegion(
greenGuid,
- new BoundingRectangle(0.0, 0.5, 0.5, 0.5),
+ new BoundingRectangle(0.0, 0.5, 0.5, 0.5)
);
const index3 = await atlas.addSubRegion(
greenGuid,
- new BoundingRectangle(0.5, 0.0, 0.5, 0.5),
+ new BoundingRectangle(0.5, 0.0, 0.5, 0.5)
);
const index4 = await atlas.addSubRegion(
greenGuid,
- new BoundingRectangle(0.5, 0.5, 0.5, 0.5),
+ new BoundingRectangle(0.5, 0.5, 0.5, 0.5)
);
expect(atlas.numberOfImages).toEqual(5);
@@ -755,19 +755,19 @@ describe(
const index1 = await atlas.addSubRegion(
greenGuid,
- new BoundingRectangle(0.0, 0.0, 0.5, 0.5),
+ new BoundingRectangle(0.0, 0.0, 0.5, 0.5)
);
const index2 = await atlas.addSubRegion(
greenGuid,
- new BoundingRectangle(0.0, 0.5, 0.5, 0.5),
+ new BoundingRectangle(0.0, 0.5, 0.5, 0.5)
);
const index3 = await atlas.addSubRegion(
greenGuid,
- new BoundingRectangle(0.5, 0.0, 0.5, 0.5),
+ new BoundingRectangle(0.5, 0.0, 0.5, 0.5)
);
const index4 = await atlas.addSubRegion(
greenGuid,
- new BoundingRectangle(0.5, 0.5, 0.5, 0.5),
+ new BoundingRectangle(0.5, 0.5, 0.5, 0.5)
);
expect(atlas.numberOfImages).toEqual(5);
@@ -914,5 +914,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/TileBoundingRegionSpec.js b/packages/engine/Specs/Scene/TileBoundingRegionSpec.js
index 99f0a8e6c101..92beba6e486f 100644
--- a/packages/engine/Specs/Scene/TileBoundingRegionSpec.js
+++ b/packages/engine/Specs/Scene/TileBoundingRegionSpec.js
@@ -22,7 +22,7 @@ describe("Scene/TileBoundingRegion", function () {
regionBox[0],
regionBox[1],
regionBox[2],
- regionBox[3],
+ regionBox[3]
);
const tileBoundingRegion = new TileBoundingRegion({
maximumHeight: boundingVolumeRegion[5],
@@ -92,7 +92,7 @@ describe("Scene/TileBoundingRegion", function () {
camera.position = Cartesian3.fromRadians(
regionBox[0] + CesiumMath.EPSILON6,
regionBox[1],
- 0,
+ 0
);
expect(tileBoundingRegion.distanceToCamera(frameState)).toEqual(0.0);
});
@@ -101,7 +101,7 @@ describe("Scene/TileBoundingRegion", function () {
camera.position = Cartesian3.fromRadians(regionBox[0], regionBox[1], 2.0);
expect(tileBoundingRegion.distanceToCamera(frameState)).toEqualEpsilon(
1.0,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
});
@@ -122,7 +122,7 @@ describe("Scene/TileBoundingRegion", function () {
camera.position = Cartesian3.fromRadians(0.0, 0.0, 20.0);
expect(tile.distanceToCamera(frameState)).toEqualEpsilon(
10.0,
- CesiumMath.EPSILON3,
+ CesiumMath.EPSILON3
);
// Inside rectangle, below height
@@ -133,29 +133,29 @@ describe("Scene/TileBoundingRegion", function () {
camera.position = Cartesian3.fromRadians(
west - offset,
south - offset,
- 0.0,
+ 0.0
);
const southwestPosition = Cartesian3.fromRadians(west, south);
let expectedDistance = Cartesian3.distance(
camera.position,
- southwestPosition,
+ southwestPosition
);
expect(tile.distanceToCamera(frameState)).toEqualEpsilon(
expectedDistance,
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
// From northeast
camera.position = Cartesian3.fromRadians(
east + offset,
north + offset,
- 0.0,
+ 0.0
);
const northeastPosition = Cartesian3.fromRadians(east, north);
expectedDistance = Cartesian3.distance(camera.position, northeastPosition);
expect(tile.distanceToCamera(frameState)).toEqualEpsilon(
expectedDistance,
- CesiumMath.EPSILON1,
+ CesiumMath.EPSILON1
);
});
@@ -168,7 +168,7 @@ describe("Scene/TileBoundingRegion", function () {
const cameraPositionCartographic = new Cartographic(
(rectangle.west + rectangle.east) * 0.5,
rectangle.south,
- 0.0,
+ 0.0
);
cameraPositionCartographic.south -= CesiumMath.EPSILON8;
@@ -181,10 +181,10 @@ describe("Scene/TileBoundingRegion", function () {
camera.position = ellipsoid.cartographicToCartesian(
cameraPositionCartographic,
- new Cartesian3(),
+ new Cartesian3()
);
expect(tile.distanceToCamera(frameState)).toBeLessThan(
- CesiumMath.EPSILON8 * ellipsoid.maximumRadius,
+ CesiumMath.EPSILON8 * ellipsoid.maximumRadius
);
});
@@ -197,7 +197,7 @@ describe("Scene/TileBoundingRegion", function () {
const cameraPositionCartographic = new Cartographic(
(rectangle.west + rectangle.east) * 0.5,
rectangle.north,
- 0.0,
+ 0.0
);
cameraPositionCartographic.north += CesiumMath.EPSILON8;
@@ -210,10 +210,10 @@ describe("Scene/TileBoundingRegion", function () {
camera.position = ellipsoid.cartographicToCartesian(
cameraPositionCartographic,
- new Cartesian3(),
+ new Cartesian3()
);
expect(tile.distanceToCamera(frameState)).toBeLessThan(
- CesiumMath.EPSILON8 * ellipsoid.maximumRadius,
+ CesiumMath.EPSILON8 * ellipsoid.maximumRadius
);
});
@@ -244,16 +244,16 @@ describe("Scene/TileBoundingRegion", function () {
const distance2D = Cartesian2.distance(southwest2D, position2D);
const height = Ellipsoid.WGS84.radii.x;
const expectedDistance = Math.sqrt(
- distance2D * distance2D + height * height,
+ distance2D * distance2D + height * height
);
camera.position = Cartesian3.fromRadians(
position3D.longitude,
- position3D.latitude,
+ position3D.latitude
);
expect(tile.distanceToCamera(frameState)).toEqualEpsilon(
expectedDistance,
- 10.0,
+ 10.0
);
});
@@ -279,11 +279,11 @@ describe("Scene/TileBoundingRegion", function () {
Cartesian3.normalize(Cartesian3.fromRadians(0.0, 0.0, 1.0), normal);
const distanceFromCenter = Cartesian3.distance(
new Cartesian3(0.0, 0.0, 0.0),
- Cartesian3.fromRadians(0.0, 0.0, 0.0),
+ Cartesian3.fromRadians(0.0, 0.0, 0.0)
);
const plane = new Plane(normal, -distanceFromCenter);
expect(tileBoundingRegion.intersectPlane(plane)).toEqual(
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
});
});
diff --git a/packages/engine/Specs/Scene/TileBoundingS2CellSpec.js b/packages/engine/Specs/Scene/TileBoundingS2CellSpec.js
index 54f955f3fef8..61f0d8f20f1b 100644
--- a/packages/engine/Specs/Scene/TileBoundingS2CellSpec.js
+++ b/packages/engine/Specs/Scene/TileBoundingS2CellSpec.js
@@ -82,30 +82,30 @@ describe("Scene/TileBoundingS2Cell", function () {
// Test against the top plane.
const topPlane = Plane.clone(
tileS2Cell._boundingPlanes[0],
- topPlaneScratch,
+ topPlaneScratch
);
topPlane.distance -= testDistance;
camera.position = Plane.projectPointOntoPlane(topPlane, tileS2Cell.center);
expect(tileS2Cell.distanceToCamera(frameState)).toEqualEpsilon(
testDistance,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
// Test against the first side plane.
const sidePlane0 = Plane.clone(
tileS2Cell._boundingPlanes[2],
- sidePlane0Scratch,
+ sidePlane0Scratch
);
const edgeOne = Cartesian3.midpoint(
tileS2Cell._vertices[0],
tileS2Cell._vertices[1],
- edgeOneScratch,
+ edgeOneScratch
);
const edgeTwo = Cartesian3.midpoint(
tileS2Cell._vertices[4],
tileS2Cell._vertices[5],
- edgeTwoScratch,
+ edgeTwoScratch
);
const faceCenter = Cartesian3.midpoint(edgeOne, edgeTwo, faceCenterScratch);
@@ -114,7 +114,7 @@ describe("Scene/TileBoundingS2Cell", function () {
camera.position = Plane.projectPointOntoPlane(sidePlane0, faceCenter);
expect(tileS2Cell.distanceToCamera(frameState)).toEqualEpsilon(
testDistance,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -127,38 +127,38 @@ describe("Scene/TileBoundingS2Cell", function () {
camera.position = Cartesian3.midpoint(
tileS2Cell._vertices[0],
tileS2Cell._vertices[1],
- edgeMidpointScratch,
+ edgeMidpointScratch
);
camera.position.z -= testDistance;
expect(tileS2Cell.distanceToCamera(frameState)).toEqualEpsilon(
testDistance,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
// Test with first and second side planes.
camera.position = Cartesian3.midpoint(
tileS2Cell._vertices[0],
tileS2Cell._vertices[4],
- edgeMidpointScratch,
+ edgeMidpointScratch
);
camera.position.x -= 1;
camera.position.z -= 1;
expect(tileS2Cell.distanceToCamera(frameState)).toEqualEpsilon(
Math.SQRT2,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
// Test with bottom plane and second side plane. Handles the obtuse dihedral angle case.
camera.position = Cartesian3.midpoint(
tileS2Cell._vertices[5],
tileS2Cell._vertices[6],
- edgeMidpointScratch,
+ edgeMidpointScratch
);
camera.position.x -= 10000;
camera.position.y -= 1;
expect(tileS2Cell.distanceToCamera(frameState)).toEqualEpsilon(
10000,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -171,7 +171,7 @@ describe("Scene/TileBoundingS2Cell", function () {
camera.position.z += 1;
expect(tileS2Cell.distanceToCamera(frameState)).toEqualEpsilon(
Math.sqrt(3),
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -180,7 +180,7 @@ describe("Scene/TileBoundingS2Cell", function () {
camera.position = new Cartesian3(-Ellipsoid.WGS84.maximumRadius, 0, 0);
expect(tileS2Cell.distanceToCamera(frameState)).toEqualEpsilon(
Ellipsoid.WGS84.maximumRadius + tileS2Cell._boundingPlanes[1].distance,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
@@ -203,7 +203,7 @@ describe("Scene/TileBoundingS2Cell", function () {
it("intersects plane", function () {
expect(tileS2Cell.intersectPlane(Plane.ORIGIN_ZX_PLANE)).toEqual(
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
const outsidePlane = Plane.clone(Plane.ORIGIN_YZ_PLANE);
@@ -211,7 +211,7 @@ describe("Scene/TileBoundingS2Cell", function () {
expect(tileS2Cell.intersectPlane(outsidePlane)).toEqual(Intersect.OUTSIDE);
expect(tileS2Cell.intersectPlane(Plane.ORIGIN_YZ_PLANE)).toEqual(
- Intersect.INSIDE,
+ Intersect.INSIDE
);
});
});
diff --git a/packages/engine/Specs/Scene/TileBoundingSphereSpec.js b/packages/engine/Specs/Scene/TileBoundingSphereSpec.js
index 02cf2668b452..32c87cb0078f 100644
--- a/packages/engine/Specs/Scene/TileBoundingSphereSpec.js
+++ b/packages/engine/Specs/Scene/TileBoundingSphereSpec.js
@@ -12,7 +12,7 @@ import createFrameState from "../../../../Specs/createFrameState.js";
describe("Scene/TileBoundingSphere", function () {
const tileBoundingSphere = new TileBoundingSphere(
new Cartesian3(0.0, 0.0, 0.0),
- 1.0,
+ 1.0
);
const frameState = createFrameState();
@@ -64,7 +64,7 @@ describe("Scene/TileBoundingSphere", function () {
const normal = new Cartesian3(0.0, 0.0, 1.0);
const plane = new Plane(normal, CesiumMath.EPSILON6);
expect(tileBoundingSphere.intersectPlane(plane)).toEqual(
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
});
});
diff --git a/packages/engine/Specs/Scene/TileCoordinatesImageryProviderSpec.js b/packages/engine/Specs/Scene/TileCoordinatesImageryProviderSpec.js
index 60e793aa9990..b4af4378078b 100644
--- a/packages/engine/Specs/Scene/TileCoordinatesImageryProviderSpec.js
+++ b/packages/engine/Specs/Scene/TileCoordinatesImageryProviderSpec.js
@@ -9,7 +9,7 @@ import {
describe("Scene/TileCoordinatesImageryProvider", function () {
it("conforms to ImageryProvider interface", function () {
expect(TileCoordinatesImageryProvider).toConformToInterface(
- ImageryProvider,
+ ImageryProvider
);
});
@@ -37,11 +37,11 @@ describe("Scene/TileCoordinatesImageryProvider", function () {
expect(provider.tileDiscardPolicy).toBeUndefined();
expect(provider.rectangle).toEqual(new GeographicTilingScheme().rectangle);
- return Promise.resolve(provider.requestImage(0, 0, 0)).then(
- function (image) {
- expect(image).toBeDefined();
- },
- );
+ return Promise.resolve(provider.requestImage(0, 0, 0)).then(function (
+ image
+ ) {
+ expect(image).toBeDefined();
+ });
});
it("uses alternate tiling scheme if provided", function () {
diff --git a/packages/engine/Specs/Scene/TileMapServiceImageryProviderSpec.js b/packages/engine/Specs/Scene/TileMapServiceImageryProviderSpec.js
index 0e766f18b399..72494dceb68c 100644
--- a/packages/engine/Specs/Scene/TileMapServiceImageryProviderSpec.js
+++ b/packages/engine/Specs/Scene/TileMapServiceImageryProviderSpec.js
@@ -47,7 +47,7 @@ describe("Scene/TileMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
// We can't resolve the promise immediately, because then the error would be raised
// before we could subscribe to it. This a problem particular to tests.
@@ -67,7 +67,7 @@ describe("Scene/TileMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
// We can't resolve the promise immediately, because then the error would be raised
// before we could subscribe to it. This a problem particular to tests.
@@ -97,14 +97,14 @@ describe("Scene/TileMapServiceImageryProvider", function () {
it("fromUrl throws without url", async function () {
await expectAsync(
- TileMapServiceImageryProvider.fromUrl(),
+ TileMapServiceImageryProvider.fromUrl()
).toBeRejectedWithDeveloperError();
});
it("fromUrl resolves to created provider", async function () {
patchRequestScheduler(validSampleXmlString);
const provider = await TileMapServiceImageryProvider.fromUrl(
- "made/up/tms/server/",
+ "made/up/tms/server/"
);
expect(provider).toBeInstanceOf(TileMapServiceImageryProvider);
});
@@ -135,12 +135,12 @@ describe("Scene/TileMapServiceImageryProvider", function () {
"";
patchRequestScheduler(xmlString);
await expectAsync(
- TileMapServiceImageryProvider.fromUrl("made/up/tms/server"),
+ TileMapServiceImageryProvider.fromUrl("made/up/tms/server")
).toBeRejectedWithError(
RuntimeError,
new RegExp(
- "made/up/tms/server/tilemapresource.xml specifies an unsupported profile attribute, foobar.",
- ),
+ "made/up/tms/server/tilemapresource.xml specifies an unsupported profile attribute, foobar."
+ )
);
});
@@ -159,17 +159,17 @@ describe("Scene/TileMapServiceImageryProvider", function () {
"";
patchRequestScheduler(xmlString);
await expectAsync(
- TileMapServiceImageryProvider.fromUrl("made/up/tms/server"),
+ TileMapServiceImageryProvider.fromUrl("made/up/tms/server")
).toBeRejectedWithError(
RuntimeError,
- new RegExp("Unable to find expected tilesets or bbox attributes"),
+ new RegExp("Unable to find expected tilesets or bbox attributes")
);
});
it("returns valid value for hasAlphaChannel", async function () {
patchRequestScheduler(validSampleXmlString);
const provider = await TileMapServiceImageryProvider.fromUrl(
- "made/up/tms/server/",
+ "made/up/tms/server/"
);
expect(typeof provider.hasAlphaChannel).toBe("boolean");
@@ -180,18 +180,20 @@ describe("Scene/TileMapServiceImageryProvider", function () {
const baseUrl = "made/up/tms/server/";
const provider = await TileMapServiceImageryProvider.fromUrl(baseUrl);
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toStartWith(getAbsoluteUri(baseUrl));
-
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toStartWith(getAbsoluteUri(baseUrl));
+
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
const image = await provider.requestImage(0, 0, 0);
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -201,21 +203,23 @@ describe("Scene/TileMapServiceImageryProvider", function () {
it("supports no slash at the end of the URL", async function () {
patchRequestScheduler(validSampleXmlString);
const provider = await TileMapServiceImageryProvider.fromUrl(
- "http://made/up/tms/server",
+ "http://made/up/tms/server"
);
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toContain("made/up/tms/server/");
-
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toContain("made/up/tms/server/");
+
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
const image = await provider.requestImage(0, 0, 0);
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -226,21 +230,23 @@ describe("Scene/TileMapServiceImageryProvider", function () {
patchRequestScheduler(validSampleXmlString);
const baseUrl = "made/up/tms/server/";
const provider = await TileMapServiceImageryProvider.fromUrl(
- `${baseUrl}?a=some&b=query`,
+ `${baseUrl}?a=some&b=query`
);
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toStartWith(getAbsoluteUri(baseUrl));
- expect(request.url).toContain("?a=some&b=query");
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toStartWith(getAbsoluteUri(baseUrl));
+ expect(request.url).toContain("?a=some&b=query");
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
const image = await provider.requestImage(0, 0, 0);
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -250,7 +256,7 @@ describe("Scene/TileMapServiceImageryProvider", function () {
it("requestImage returns a promise for an image and loads it for cross-origin use", async function () {
patchRequestScheduler(validSampleXmlString);
const provider = await TileMapServiceImageryProvider.fromUrl(
- "made/up/tms/server/",
+ "made/up/tms/server/"
);
// check some details about the tilemapresource.xml so we know we got parsed/configured properly
@@ -261,16 +267,18 @@ describe("Scene/TileMapServiceImageryProvider", function () {
expect(provider.tileWidth).toEqual(256);
expect(provider.tileHeight).toEqual(256);
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
const image = await provider.requestImage(0, 0, 0);
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -280,7 +288,7 @@ describe("Scene/TileMapServiceImageryProvider", function () {
it("when no credit is supplied, the provider has no logo", async function () {
patchRequestScheduler(validSampleXmlString);
const provider = await TileMapServiceImageryProvider.fromUrl(
- "made/up/tms/server/",
+ "made/up/tms/server/"
);
expect(provider.credit).toBeUndefined();
});
@@ -291,30 +299,28 @@ describe("Scene/TileMapServiceImageryProvider", function () {
"made/up/gms/server",
{
credit: "Thanks to our awesome made up source of this imagery!",
- },
+ }
);
expect(provider.credit).toBeDefined();
});
it("resource request takes a query string", async function () {
/*eslint-disable no-unused-vars*/
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- url,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- expect(/\?query=1$/.test(url)).toEqual(true);
- deferred.reject(new RequestErrorEvent(404)); //since the TMS server doesn't exist (and doesn't need too) we can just reject here.
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ expect(/\?query=1$/.test(url)).toEqual(true);
+ deferred.reject(new RequestErrorEvent(404)); //since the TMS server doesn't exist (and doesn't need too) we can just reject here.
+ });
const provider = await TileMapServiceImageryProvider.fromUrl(
- "http://server.invalid?query=1",
+ "http://server.invalid?query=1"
);
});
@@ -326,7 +332,7 @@ describe("Scene/TileMapServiceImageryProvider", function () {
"made/up/tms/server",
{
rectangle: rectangle,
- },
+ }
);
// check some values coming from tilemapresource.xml
@@ -337,34 +343,36 @@ describe("Scene/TileMapServiceImageryProvider", function () {
// check our rectangle from the constructor is correctly used
expect(provider.rectangle.west).toEqualEpsilon(
rectangle.west,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(provider.rectangle.east).toEqualEpsilon(
rectangle.east,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(provider.rectangle.north).toEqualEpsilon(
rectangle.north,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(provider.rectangle.south).toEqualEpsilon(
rectangle.south,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(provider.tileDiscardPolicy).toBeUndefined();
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toContain("/0/0/0");
-
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toContain("/0/0/0");
+
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
const image = await provider.requestImage(0, 0, 0);
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -377,7 +385,7 @@ describe("Scene/TileMapServiceImageryProvider", function () {
"made/up/tms/server",
{
maximumLevel: 5,
- },
+ }
);
expect(provider.maximumLevel).toEqual(5);
@@ -385,8 +393,9 @@ describe("Scene/TileMapServiceImageryProvider", function () {
it("raises error event when image cannot be loaded", async function () {
patchRequestScheduler(validSampleXmlString);
- const provider =
- await TileMapServiceImageryProvider.fromUrl("made/up/tms/server");
+ const provider = await TileMapServiceImageryProvider.fromUrl(
+ "made/up/tms/server"
+ );
const layer = new ImageryLayer(provider);
@@ -405,14 +414,14 @@ describe("Scene/TileMapServiceImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
if (tries === 2) {
// Succeed after 2 tries
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
} else {
// fail
@@ -450,36 +459,37 @@ describe("Scene/TileMapServiceImageryProvider", function () {
" " +
"";
patchRequestScheduler(xmlString);
- const provider =
- await TileMapServiceImageryProvider.fromUrl("made/up/tms/server");
+ const provider = await TileMapServiceImageryProvider.fromUrl(
+ "made/up/tms/server"
+ );
expect(provider.rectangle.west).toEqualEpsilon(
CesiumMath.toRadians(-180.0),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(provider.rectangle.west).toBeGreaterThanOrEqual(
- provider.tilingScheme.rectangle.west,
+ provider.tilingScheme.rectangle.west
);
expect(provider.rectangle.east).toEqualEpsilon(
CesiumMath.toRadians(180.0),
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(provider.rectangle.east).toBeLessThanOrEqual(
- provider.tilingScheme.rectangle.east,
+ provider.tilingScheme.rectangle.east
);
expect(provider.rectangle.south).toEqualEpsilon(
-WebMercatorProjection.MaximumLatitude,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(provider.rectangle.south).toBeGreaterThanOrEqual(
- provider.tilingScheme.rectangle.south,
+ provider.tilingScheme.rectangle.south
);
expect(provider.rectangle.north).toEqualEpsilon(
WebMercatorProjection.MaximumLatitude,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(provider.rectangle.north).toBeLessThanOrEqual(
- provider.tilingScheme.rectangle.north,
+ provider.tilingScheme.rectangle.north
);
});
@@ -499,8 +509,9 @@ describe("Scene/TileMapServiceImageryProvider", function () {
"";
patchRequestScheduler(xmlString);
- const provider =
- await TileMapServiceImageryProvider.fromUrl("made/up/tms/server");
+ const provider = await TileMapServiceImageryProvider.fromUrl(
+ "made/up/tms/server"
+ );
expect(provider.maximumLevel).toBe(8);
expect(provider.minimumLevel).toBe(7);
@@ -522,8 +533,9 @@ describe("Scene/TileMapServiceImageryProvider", function () {
"";
patchRequestScheduler(xmlString);
- const provider =
- await TileMapServiceImageryProvider.fromUrl("made/up/tms/server");
+ const provider = await TileMapServiceImageryProvider.fromUrl(
+ "made/up/tms/server"
+ );
expect(provider.maximumLevel).toBe(8);
expect(provider.minimumLevel).toBe(0);
@@ -545,8 +557,9 @@ describe("Scene/TileMapServiceImageryProvider", function () {
"";
patchRequestScheduler(xmlString);
- const provider =
- await TileMapServiceImageryProvider.fromUrl("made/up/tms/server");
+ const provider = await TileMapServiceImageryProvider.fromUrl(
+ "made/up/tms/server"
+ );
expect(provider.maximumLevel).toBe(8);
expect(provider.minimumLevel).toBe(7);
@@ -568,27 +581,28 @@ describe("Scene/TileMapServiceImageryProvider", function () {
"";
patchRequestScheduler(xmlString);
- const provider =
- await TileMapServiceImageryProvider.fromUrl("made/up/tms/server");
+ const provider = await TileMapServiceImageryProvider.fromUrl(
+ "made/up/tms/server"
+ );
expect(provider.tilingScheme).toBeInstanceOf(WebMercatorTilingScheme);
expect(provider.tilingScheme.projection).toBeInstanceOf(
- WebMercatorProjection,
+ WebMercatorProjection
);
const projection = provider.tilingScheme.projection;
const expectedSW = projection.unproject(
- new Cartesian2(-11877789.667642293, 1707163.7595205167),
+ new Cartesian2(-11877789.667642293, 1707163.7595205167)
);
const expectedNE = projection.unproject(
- new Cartesian2(-4696205.4540757351, 7952627.0736533012),
+ new Cartesian2(-4696205.4540757351, 7952627.0736533012)
);
expect(provider.rectangle.west).toEqual(expectedSW.longitude);
expect(provider.rectangle.south).toEqual(expectedSW.latitude);
expect(provider.rectangle.east).toBeCloseTo(
expectedNE.longitude,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(provider.rectangle.north).toEqual(expectedNE.latitude);
});
@@ -609,12 +623,13 @@ describe("Scene/TileMapServiceImageryProvider", function () {
"";
patchRequestScheduler(xmlString);
- const provider =
- await TileMapServiceImageryProvider.fromUrl("made/up/tms/server");
+ const provider = await TileMapServiceImageryProvider.fromUrl(
+ "made/up/tms/server"
+ );
expect(provider.tilingScheme).toBeInstanceOf(GeographicTilingScheme);
expect(provider.tilingScheme.projection).toBeInstanceOf(
- GeographicProjection,
+ GeographicProjection
);
const expectedSW = Cartographic.fromDegrees(-123.0, -10.0);
@@ -622,12 +637,12 @@ describe("Scene/TileMapServiceImageryProvider", function () {
expect(provider.rectangle.west).toBeCloseTo(
expectedSW.longitude,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(provider.rectangle.south).toEqual(expectedSW.latitude);
expect(provider.rectangle.east).toBeCloseTo(
expectedNE.longitude,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(provider.rectangle.north).toEqual(expectedNE.latitude);
});
@@ -652,12 +667,12 @@ describe("Scene/TileMapServiceImageryProvider", function () {
"made/up/tms/server",
{
flipXY: true,
- },
+ }
);
expect(provider.tilingScheme).toBeInstanceOf(WebMercatorTilingScheme);
expect(provider.tilingScheme.projection).toBeInstanceOf(
- WebMercatorProjection,
+ WebMercatorProjection
);
const expectedSW = Cartographic.fromDegrees(-123.0, -10.0);
@@ -665,12 +680,12 @@ describe("Scene/TileMapServiceImageryProvider", function () {
expect(provider.rectangle.west).toBeCloseTo(
expectedSW.longitude,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(provider.rectangle.south).toEqual(expectedSW.latitude);
expect(provider.rectangle.east).toBeCloseTo(
expectedNE.longitude,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(provider.rectangle.north).toEqual(expectedNE.latitude);
});
@@ -695,12 +710,12 @@ describe("Scene/TileMapServiceImageryProvider", function () {
"made/up/tms/server",
{
flipXY: true,
- },
+ }
);
expect(provider.tilingScheme).toBeInstanceOf(GeographicTilingScheme);
expect(provider.tilingScheme.projection).toBeInstanceOf(
- GeographicProjection,
+ GeographicProjection
);
const expectedSW = Cartographic.fromDegrees(-123.0, -10.0);
@@ -708,12 +723,12 @@ describe("Scene/TileMapServiceImageryProvider", function () {
expect(provider.rectangle.west).toBeCloseTo(
expectedSW.longitude,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(provider.rectangle.south).toEqual(expectedSW.latitude);
expect(provider.rectangle.east).toBeCloseTo(
expectedNE.longitude,
- CesiumMath.EPSILON14,
+ CesiumMath.EPSILON14
);
expect(provider.rectangle.north).toEqual(expectedNE.latitude);
});
@@ -724,7 +739,7 @@ describe("Scene/TileMapServiceImageryProvider", function () {
"made/up/tms/server",
{
minimumLevel: 10,
- },
+ }
);
// we expect that our minimum detail level was forced to 0, even though we requested 10.
@@ -746,9 +761,9 @@ describe("Scene/TileMapServiceImageryProvider", function () {
CesiumMath.toRadians(131.020889),
CesiumMath.toRadians(-25.35473),
CesiumMath.toRadians(131.054363),
- CesiumMath.toRadians(-25.335803),
+ CesiumMath.toRadians(-25.335803)
),
- },
+ }
);
// we expect that our minimum detail level remains at 12, which is quite high, but that's okay
diff --git a/packages/engine/Specs/Scene/TileMetadataSpec.js b/packages/engine/Specs/Scene/TileMetadataSpec.js
index 249e7de0419c..ccfd5cfae0cb 100644
--- a/packages/engine/Specs/Scene/TileMetadataSpec.js
+++ b/packages/engine/Specs/Scene/TileMetadataSpec.js
@@ -144,25 +144,31 @@ describe("Scene/TileMetadata", function () {
it("getPropertyBySemantic returns undefined when there's no property with the given semantic", function () {
expect(
- tileMetadata.getPropertyBySemantic("HORIZON_OCCLUSION_POINT"),
+ tileMetadata.getPropertyBySemantic("HORIZON_OCCLUSION_POINT")
).not.toBeDefined();
});
it("getPropertyBySemantic returns the property value", function () {
expect(tileMetadata.getPropertyBySemantic("COLOR")).toEqual([
- 1.0, 0.5, 0.0,
+ 1.0,
+ 0.5,
+ 0.0,
]);
});
it("setPropertyBySemantic sets property value", function () {
expect(tileMetadata.getPropertyBySemantic("COLOR")).toEqual([
- 1.0, 0.5, 0.0,
+ 1.0,
+ 0.5,
+ 0.0,
]);
expect(tileMetadata.setPropertyBySemantic("COLOR", [0.0, 0.0, 0.0])).toBe(
- true,
+ true
);
expect(tileMetadata.getPropertyBySemantic("COLOR")).toEqual([
- 0.0, 0.0, 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
]);
});
diff --git a/packages/engine/Specs/Scene/TileOrientedBoundingBoxSpec.js b/packages/engine/Specs/Scene/TileOrientedBoundingBoxSpec.js
index 463cb2548489..91ad1dbfc720 100644
--- a/packages/engine/Specs/Scene/TileOrientedBoundingBoxSpec.js
+++ b/packages/engine/Specs/Scene/TileOrientedBoundingBoxSpec.js
@@ -14,7 +14,7 @@ describe("Scene/TileOrientedBoundingBox", function () {
const center = new Cartesian3(0.0, 0.0, 0.0);
const halfAxes = Matrix3.fromScale(
new Cartesian3(0.5, 0.5, 0.5),
- new Matrix3(),
+ new Matrix3()
);
const tileBoundingVolume = new TileOrientedBoundingBox(center, halfAxes);
@@ -62,7 +62,7 @@ describe("Scene/TileOrientedBoundingBox", function () {
expect(tileBoundingVolume.distanceToCamera(frameState)).not.toEqual(0.0);
frameState.camera.position = new Cartesian3(100.5, 100.5, 100.5);
expect(tileBoundingVolume.distanceToCamera(frameState)).toEqual(
- Math.sqrt(30000.0),
+ Math.sqrt(30000.0)
);
});
@@ -70,11 +70,11 @@ describe("Scene/TileOrientedBoundingBox", function () {
frameState.camera.position = new Cartesian3(
2170456.713380141,
-36351235.19646463,
- 28403328.27058654,
+ 28403328.27058654
);
expect(tileBoundingVolume.distanceToCamera(frameState)).toEqualEpsilon(
46183029.05370139,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
});
@@ -87,15 +87,15 @@ describe("Scene/TileOrientedBoundingBox", function () {
it("intersects plane", function () {
let plane = new Plane(Cartesian3.UNIT_X, 0.0);
expect(tileBoundingVolume.intersectPlane(plane)).toEqual(
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
plane = new Plane(Cartesian3.UNIT_X, 0.5 - CesiumMath.EPSILON6);
expect(tileBoundingVolume.intersectPlane(plane)).toEqual(
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
plane = new Plane(Cartesian3.UNIT_X, -0.5 + CesiumMath.EPSILON6);
expect(tileBoundingVolume.intersectPlane(plane)).toEqual(
- Intersect.INTERSECTING,
+ Intersect.INTERSECTING
);
});
diff --git a/packages/engine/Specs/Scene/Tileset3DTileContentSpec.js b/packages/engine/Specs/Scene/Tileset3DTileContentSpec.js
index 4f3ac5e47abe..f161f7dbe494 100644
--- a/packages/engine/Specs/Scene/Tileset3DTileContentSpec.js
+++ b/packages/engine/Specs/Scene/Tileset3DTileContentSpec.js
@@ -38,7 +38,7 @@ describe(
it("becomes ready", async function () {
const tileset = await Cesium3DTilesTester.loadTileset(
scene,
- tilesetOfTilesetsUrl,
+ tilesetOfTilesetsUrl
);
expect(tileset.root.contentReady).toBeTrue();
expect(tileset.root.content).toBeDefined();
@@ -66,7 +66,7 @@ describe(
expect(content.batchTable).toBeUndefined();
expect(content.hasProperty(0, "name")).toBe(false);
expect(content.getFeature(0)).toBeUndefined();
- },
+ }
);
});
@@ -132,7 +132,7 @@ describe(
it("assigns group metadata", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetOfTilesetsUrl,
+ tilesetOfTilesetsUrl
).then(function (tileset) {
const content = tileset.root.content;
content.group = new Cesium3DContentGroup({ metadata: groupMetadata });
@@ -143,7 +143,7 @@ describe(
it("assigns metadata", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- tilesetOfTilesetsUrl,
+ tilesetOfTilesetsUrl
).then(function (tileset) {
const content = tileset.root.content;
content.metadata = contentMetadata;
@@ -152,5 +152,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/TilesetMetadataSpec.js b/packages/engine/Specs/Scene/TilesetMetadataSpec.js
index ad164a4c3937..6fdfdd92cb55 100644
--- a/packages/engine/Specs/Scene/TilesetMetadataSpec.js
+++ b/packages/engine/Specs/Scene/TilesetMetadataSpec.js
@@ -48,7 +48,7 @@ describe("Scene/TilesetMetadata", function () {
expect(tilesetMetadata.extras).toBe(extras);
expect(tilesetMetadata.extensions).toBe(extensions);
expect(tilesetMetadata.getProperty("neighborhoods")).toEqual(
- properties.neighborhoods,
+ properties.neighborhoods
);
});
diff --git a/packages/engine/Specs/Scene/TimeDynamicImagerySpec.js b/packages/engine/Specs/Scene/TimeDynamicImagerySpec.js
index 96697a41448e..08e08d9a34ef 100644
--- a/packages/engine/Specs/Scene/TimeDynamicImagerySpec.js
+++ b/packages/engine/Specs/Scene/TimeDynamicImagerySpec.js
@@ -84,7 +84,7 @@ describe("Scene/TimeDynamicImagery", function () {
expect(timeDynamicImagery._clock).toBe(options.clock);
expect(timeDynamicImagery._times).toBe(options.times);
expect(timeDynamicImagery._requestImageFunction).toBe(
- options.requestImageFunction,
+ options.requestImageFunction
);
expect(timeDynamicImagery._reloadFunction).toBe(options.reloadFunction);
expect(timeDynamicImagery._currentIntervalIndex).toEqual(0);
@@ -159,7 +159,7 @@ describe("Scene/TimeDynamicImagery", function () {
1,
2,
request,
- times.get(1),
+ times.get(1)
);
expect(timeDynamicImagery._tileCache[1]["0-1-2"]).toBeDefined();
expect(options.reloadFunction).not.toHaveBeenCalled();
@@ -191,7 +191,7 @@ describe("Scene/TimeDynamicImagery", function () {
1,
2,
request,
- times.get(1),
+ times.get(1)
);
expect(timeDynamicImagery._tileCache[1]["0-1-2"]).toBeDefined();
expect(options.reloadFunction).not.toHaveBeenCalled();
@@ -226,10 +226,10 @@ describe("Scene/TimeDynamicImagery", function () {
}
expect(timeDynamicImagery._tilesRequestedForInterval.length).toEqual(
- count,
+ count
);
expect(
- timeDynamicImagery._tilesRequestedForInterval[count - 1].key,
+ timeDynamicImagery._tilesRequestedForInterval[count - 1].key
).toEqual(`${x}-${y}-${level}`);
}
}
diff --git a/packages/engine/Specs/Scene/TimeDynamicPointCloudSpec.js b/packages/engine/Specs/Scene/TimeDynamicPointCloudSpec.js
index d43be3ed576e..e7861ac54faa 100644
--- a/packages/engine/Specs/Scene/TimeDynamicPointCloudSpec.js
+++ b/packages/engine/Specs/Scene/TimeDynamicPointCloudSpec.js
@@ -33,7 +33,7 @@ describe(
const center = new Cartesian3(
1215012.8828876738,
-4736313.051199594,
- 4081605.22126042,
+ 4081605.22126042
);
const clock = new Clock({
@@ -52,34 +52,94 @@ describe(
const transforms = [
Matrix4.fromColumnMajorArray([
- 0.968635634376879, 0.24848542777253735, 0, 0, -0.15986460794399626,
- 0.6231776137472074, 0.7655670897127491, 0, 0.190232265775849,
- -0.7415555636019701, 0.6433560687121489, 0, 1215012.8828876738,
- -4736313.051199594, 4081605.22126042, 1,
+ 0.968635634376879,
+ 0.24848542777253735,
+ 0,
+ 0,
+ -0.15986460794399626,
+ 0.6231776137472074,
+ 0.7655670897127491,
+ 0,
+ 0.190232265775849,
+ -0.7415555636019701,
+ 0.6433560687121489,
+ 0,
+ 1215012.8828876738,
+ -4736313.051199594,
+ 4081605.22126042,
+ 1,
]),
Matrix4.fromColumnMajorArray([
- 0.968634888916237, 0.24848833367832227, 0, 0, -0.1598664774761181,
- 0.6231771341505793, 0.7655670897127493, 0, 0.19023449044168372,
- -0.7415549929018358, 0.6433560687121489, 0, 1215027.0918213597,
- -4736309.406139632, 4081605.22126042, 1,
+ 0.968634888916237,
+ 0.24848833367832227,
+ 0,
+ 0,
+ -0.1598664774761181,
+ 0.6231771341505793,
+ 0.7655670897127493,
+ 0,
+ 0.19023449044168372,
+ -0.7415549929018358,
+ 0.6433560687121489,
+ 0,
+ 1215027.0918213597,
+ -4736309.406139632,
+ 4081605.22126042,
+ 1,
]),
Matrix4.fromColumnMajorArray([
- 0.9686341434468771, 0.24849123958187078, 0, 0, -0.1598683470068011,
- 0.6231766545483426, 0.7655670897127493, 0, 0.19023671510580634,
- -0.7415544221950274, 0.6433560687121489, 0, 1215041.3007441103,
- -4736305.761037043, 4081605.22126042, 1,
+ 0.9686341434468771,
+ 0.24849123958187078,
+ 0,
+ 0,
+ -0.1598683470068011,
+ 0.6231766545483426,
+ 0.7655670897127493,
+ 0,
+ 0.19023671510580634,
+ -0.7415544221950274,
+ 0.6433560687121489,
+ 0,
+ 1215041.3007441103,
+ -4736305.761037043,
+ 4081605.22126042,
+ 1,
]),
Matrix4.fromColumnMajorArray([
- 0.9686333979687994, 0.24849414548318288, 0, 0, -0.15987021653604533,
- 0.6231761749404972, 0.7655670897127491, 0, 0.19023893976821685,
- -0.7415538514815451, 0.6433560687121489, 0, 1215055.5096559257,
- -4736302.115891827, 4081605.22126042, 1,
+ 0.9686333979687994,
+ 0.24849414548318288,
+ 0,
+ 0,
+ -0.15987021653604533,
+ 0.6231761749404972,
+ 0.7655670897127491,
+ 0,
+ 0.19023893976821685,
+ -0.7415538514815451,
+ 0.6433560687121489,
+ 0,
+ 1215055.5096559257,
+ -4736302.115891827,
+ 4081605.22126042,
+ 1,
]),
Matrix4.fromColumnMajorArray([
- 0.9686326524820043, 0.2484970513822586, 0, 0, -0.15987208606385075,
- 0.6231756953270434, 0.7655670897127492, 0, 0.19024116442891523,
- -0.7415532807613887, 0.6433560687121489, 0, 1215069.7185568055,
- -4736298.470703985, 4081605.22126042, 1,
+ 0.9686326524820043,
+ 0.2484970513822586,
+ 0,
+ 0,
+ -0.15987208606385075,
+ 0.6231756953270434,
+ 0.7655670897127492,
+ 0,
+ 0.19024116442891523,
+ -0.7415532807613887,
+ 0.6433560687121489,
+ 0,
+ 1215069.7185568055,
+ -4736298.470703985,
+ 4081605.22126042,
+ 1,
]),
];
@@ -261,7 +321,7 @@ describe(
const boundingSphereFrame1 = pointCloud.boundingSphere;
expect(boundingSphereFrame1).toBeDefined();
expect(
- BoundingSphere.equals(boundingSphereFrame0, boundingSphereFrame1),
+ BoundingSphere.equals(boundingSphereFrame0, boundingSphereFrame1)
).toBe(false);
});
});
@@ -316,7 +376,7 @@ describe(
const frames = pointCloud._frames;
const framesLength = frames.length;
expect(pointCloud.totalMemoryUsageInBytes).toBe(
- singleFrameMemoryUsage * framesLength,
+ singleFrameMemoryUsage * framesLength
);
pointCloud.maximumMemoryUsage = 0;
@@ -338,7 +398,7 @@ describe(
// The loaded frame is the only one loaded
return loadFrame(pointCloud, 1).then(function () {
expect(pointCloud.totalMemoryUsageInBytes).toBe(
- singleFrameMemoryUsage,
+ singleFrameMemoryUsage
);
expect(frames[0]).toBeUndefined();
expect(frames[1].ready).toBe(true);
@@ -433,7 +493,7 @@ describe(
it("sets clipping planes", function () {
const modelMatrix = new Transforms.headingPitchRollToFixedFrame(
center,
- new HeadingPitchRoll(0, 0, 0),
+ new HeadingPitchRoll(0, 0, 0)
);
const clippingPlanesX = new ClippingPlaneCollection({
modelMatrix: modelMatrix,
@@ -540,7 +600,7 @@ describe(
clock.currentTime = JulianDate.addSeconds(
dates[0],
-10.0,
- new JulianDate(),
+ new JulianDate()
);
scene.renderForSpecs();
expect(scene.frameState.commandList.length).toBe(0);
@@ -552,7 +612,7 @@ describe(
clock.currentTime = JulianDate.addSeconds(
dates[5],
10.0,
- new JulianDate(),
+ new JulianDate()
);
scene.renderForSpecs();
expect(scene.frameState.commandList.length).toBe(0);
@@ -713,25 +773,23 @@ describe(
it("frame failed event is raised from request failure", function () {
const pointCloud = createTimeDynamicPointCloud();
let frameRejectedCount = 0;
- spyOn(Resource._Implementations, "loadWithXhr").and.callFake(
- function (
- request,
- responseType,
- method,
- data,
- headers,
- deferred,
- overrideMimeType,
- ) {
- if (request.toString().includes("PointCloudTimeDynamic")) {
- deferred.reject("404");
- // Allow the promise a frame to resolve
- deferred.promise.catch(function () {
- frameRejectedCount++;
- });
- }
- },
- );
+ spyOn(Resource._Implementations, "loadWithXhr").and.callFake(function (
+ request,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ ) {
+ if (request.toString().includes("PointCloudTimeDynamic")) {
+ deferred.reject("404");
+ // Allow the promise a frame to resolve
+ deferred.promise.catch(function () {
+ frameRejectedCount++;
+ });
+ }
+ });
const spyUpdate = jasmine.createSpy("listener");
pointCloud.frameFailed.addEventListener(spyUpdate);
@@ -797,7 +855,7 @@ describe(
clock.currentTime = JulianDate.addSeconds(
dates[0],
-10.0,
- new JulianDate(),
+ new JulianDate()
);
scene.renderForSpecs();
expect(spyFrameChanged.calls.count()).toBe(6);
@@ -820,5 +878,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/TranslucentTileClassificationSpec.js b/packages/engine/Specs/Scene/TranslucentTileClassificationSpec.js
index 410234e577c4..36ea7dcf2459 100644
--- a/packages/engine/Specs/Scene/TranslucentTileClassificationSpec.js
+++ b/packages/engine/Specs/Scene/TranslucentTileClassificationSpec.js
@@ -82,8 +82,7 @@ describe(
for (let i = startLength; i < commandList.length; ++i) {
const command = commandList[i];
command.pass = this._pass;
- command.depthForTranslucentClassification =
- this._depthForTranslucentClassification;
+ command.depthForTranslucentClassification = this._depthForTranslucentClassification;
this.commands.push(command);
}
};
@@ -119,7 +118,7 @@ describe(
}),
attributes: {
color: ColorGeometryInstanceAttribute.fromColor(
- new Color(0.0, 0.0, 1.0, 0.5),
+ new Color(0.0, 0.0, 1.0, 0.5)
),
},
}),
@@ -150,7 +149,7 @@ describe(
groundPolylinePrimitive = new SpecPrimitive(
primitive,
- Pass.CESIUM_3D_TILE_CLASSIFICATION,
+ Pass.CESIUM_3D_TILE_CLASSIFICATION
);
scene.groundPrimitives.add(groundPolylinePrimitive);
});
@@ -188,37 +187,37 @@ describe(
function expectResources(translucentTileClassification, toBeDefined) {
expect(
defined(
- translucentTileClassification._drawClassificationFBO.framebuffer,
- ),
+ translucentTileClassification._drawClassificationFBO.framebuffer
+ )
).toBe(toBeDefined);
expect(defined(translucentTileClassification._packFBO.framebuffer)).toBe(
- toBeDefined,
+ toBeDefined
);
expect(
- defined(translucentTileClassification._opaqueDepthStencilTexture),
+ defined(translucentTileClassification._opaqueDepthStencilTexture)
).toBe(toBeDefined);
expect(
defined(
- translucentTileClassification._drawClassificationFBO.getColorTexture(),
- ),
+ translucentTileClassification._drawClassificationFBO.getColorTexture()
+ )
).toBe(toBeDefined);
expect(
- defined(translucentTileClassification._translucentDepthStencilTexture),
+ defined(translucentTileClassification._translucentDepthStencilTexture)
).toBe(toBeDefined);
expect(
- defined(translucentTileClassification._packFBO.getColorTexture()),
+ defined(translucentTileClassification._packFBO.getColorTexture())
).toBe(toBeDefined);
expect(defined(translucentTileClassification._packDepthCommand)).toBe(
- toBeDefined,
+ toBeDefined
);
expect(defined(translucentTileClassification._accumulateCommand)).toBe(
- toBeDefined,
+ toBeDefined
);
expect(defined(translucentTileClassification._compositeCommand)).toBe(
- toBeDefined,
+ toBeDefined
);
expect(defined(translucentTileClassification._copyCommand)).toBe(
- toBeDefined,
+ toBeDefined
);
}
@@ -234,7 +233,7 @@ describe(
executeCommand,
passState,
translucentPrimitive.commands,
- undefined,
+ undefined
);
expectResources(translucentTileClassification, false);
@@ -244,7 +243,7 @@ describe(
it("creates resources on demand", function () {
const translucentTileClassification = new TranslucentTileClassification(
- context,
+ context
);
if (!translucentTileClassification.isSupported()) {
return; // don't fail because of lack of support
@@ -259,7 +258,7 @@ describe(
executeCommand,
passState,
[],
- globeDepthFramebuffer.depthStencilTexture,
+ globeDepthFramebuffer.depthStencilTexture
);
expectResources(translucentTileClassification, false);
@@ -269,7 +268,7 @@ describe(
executeCommand,
passState,
translucentPrimitive.commands,
- globeDepthFramebuffer.depthStencilTexture,
+ globeDepthFramebuffer.depthStencilTexture
);
expectResources(translucentTileClassification, true);
@@ -289,7 +288,7 @@ describe(
it("draws translucent commands into a buffer for depth", function () {
const translucentTileClassification = new TranslucentTileClassification(
- context,
+ context
);
if (!translucentTileClassification.isSupported()) {
return; // don't fail because of lack of support
@@ -303,7 +302,7 @@ describe(
executeCommand,
passState,
translucentPrimitive.commands,
- globeDepthFramebuffer.depthStencilTexture,
+ globeDepthFramebuffer.depthStencilTexture
);
expect(translucentTileClassification.hasTranslucentDepth).toBe(true);
@@ -316,7 +315,7 @@ describe(
it("draws classification commands into a buffer", function () {
const translucentTileClassification = new TranslucentTileClassification(
- context,
+ context
);
if (!translucentTileClassification.isSupported()) {
return; // don't fail because of lack of support
@@ -328,7 +327,7 @@ describe(
executeCommand,
passState,
translucentPrimitive.commands,
- globeDepthFramebuffer.depthStencilTexture,
+ globeDepthFramebuffer.depthStencilTexture
);
const drawClassificationFBO =
@@ -347,7 +346,7 @@ describe(
scene,
executeCommand,
passState,
- frustumCommands,
+ frustumCommands
);
const postClassifyPixels = readPixels(drawClassificationFBO);
@@ -358,7 +357,7 @@ describe(
it("draws classification commands into a separate accumulation buffer for multifrustum", function () {
const translucentTileClassification = new TranslucentTileClassification(
- context,
+ context
);
if (!translucentTileClassification.isSupported()) {
return; // don't fail because of lack of support
@@ -370,7 +369,7 @@ describe(
executeCommand,
passState,
translucentPrimitive.commands,
- globeDepthFramebuffer.depthStencilTexture,
+ globeDepthFramebuffer.depthStencilTexture
);
const accumulationFBO =
@@ -390,7 +389,7 @@ describe(
scene,
executeCommand,
passState,
- frustumCommands,
+ frustumCommands
);
expect(readPixels(accumulationFBO)).toEqual([0, 0, 0, 0]);
@@ -400,13 +399,13 @@ describe(
executeCommand,
passState,
translucentPrimitive.commands,
- globeDepthFramebuffer.depthStencilTexture,
+ globeDepthFramebuffer.depthStencilTexture
);
translucentTileClassification.executeClassificationCommands(
scene,
executeCommand,
passState,
- frustumCommands,
+ frustumCommands
);
const secondFrustumAccumulation = accumulationFBO;
@@ -428,7 +427,7 @@ describe(
it("does not draw classification commands if there is no translucent depth", function () {
const translucentTileClassification = new TranslucentTileClassification(
- context,
+ context
);
if (!translucentTileClassification.isSupported()) {
return; // don't fail because of lack of support
@@ -443,7 +442,7 @@ describe(
executeCommand,
passState,
[],
- globeDepthFramebuffer.depthStencilTexture,
+ globeDepthFramebuffer.depthStencilTexture
);
const preClassifyPixels = readPixels(drawClassificationFBO);
@@ -460,7 +459,7 @@ describe(
scene,
executeCommand,
passState,
- frustumCommands,
+ frustumCommands
);
const postClassifyPixels = readPixels(drawClassificationFBO);
@@ -471,7 +470,7 @@ describe(
it("composites classification into a buffer", function () {
const translucentTileClassification = new TranslucentTileClassification(
- context,
+ context
);
if (!translucentTileClassification.isSupported()) {
return; // don't fail because of lack of support
@@ -497,7 +496,7 @@ describe(
executeCommand,
passState,
translucentPrimitive.commands,
- globeDepthFramebuffer.depthStencilTexture,
+ globeDepthFramebuffer.depthStencilTexture
);
const frustumCommands = {
@@ -512,12 +511,12 @@ describe(
scene,
executeCommand,
passState,
- frustumCommands,
+ frustumCommands
);
const preCompositePixels = readPixels(targetColorFBO);
const pixelsToComposite = readPixels(
- translucentTileClassification._drawClassificationFBO.framebuffer,
+ translucentTileClassification._drawClassificationFBO.framebuffer
);
const framebuffer = passState.framebuffer;
@@ -544,7 +543,7 @@ describe(
it("composites from an accumulation texture when there are multiple frustums", function () {
const translucentTileClassification = new TranslucentTileClassification(
- context,
+ context
);
if (!translucentTileClassification.isSupported()) {
return; // don't fail because of lack of support
@@ -578,7 +577,7 @@ describe(
executeCommand,
passState,
translucentPrimitive.commands,
- globeDepthFramebuffer.depthStencilTexture,
+ globeDepthFramebuffer.depthStencilTexture
);
const frustumCommands = {
@@ -595,7 +594,7 @@ describe(
scene,
executeCommand,
passState,
- frustumCommands,
+ frustumCommands
);
// Second Frustum
@@ -604,14 +603,14 @@ describe(
executeCommand,
passState,
translucentPrimitive.commands,
- globeDepthFramebuffer.depthStencilTexture,
+ globeDepthFramebuffer.depthStencilTexture
);
translucentTileClassification.executeClassificationCommands(
scene,
executeCommand,
passState,
- frustumCommands,
+ frustumCommands
);
const framebuffer = passState.framebuffer;
@@ -637,7 +636,7 @@ describe(
it("does not composite classification if there is no translucent depth", function () {
const translucentTileClassification = new TranslucentTileClassification(
- context,
+ context
);
if (!translucentTileClassification.isSupported()) {
return; // don't fail because of lack of support
@@ -663,7 +662,7 @@ describe(
executeCommand,
passState,
[],
- globeDepthFramebuffer.depthStencilTexture,
+ globeDepthFramebuffer.depthStencilTexture
);
const frustumCommands = {
@@ -678,7 +677,7 @@ describe(
scene,
executeCommand,
passState,
- frustumCommands,
+ frustumCommands
);
const preCompositePixels = readPixels(targetColorFBO);
@@ -697,7 +696,7 @@ describe(
it("clears the classification buffer", function () {
const translucentTileClassification = new TranslucentTileClassification(
- context,
+ context
);
if (!translucentTileClassification.isSupported()) {
return; // don't fail because of lack of support
@@ -709,7 +708,7 @@ describe(
executeCommand,
passState,
translucentPrimitive.commands,
- globeDepthFramebuffer.depthStencilTexture,
+ globeDepthFramebuffer.depthStencilTexture
);
const drawClassificationFBO =
@@ -728,7 +727,7 @@ describe(
scene,
executeCommand,
passState,
- frustumCommands,
+ frustumCommands
);
const postClassifyPixels = readPixels(drawClassificationFBO);
@@ -745,7 +744,7 @@ describe(
it("does not clear the classification buffer if there is no translucent depth", function () {
const translucentTileClassification = new TranslucentTileClassification(
- context,
+ context
);
if (!translucentTileClassification.isSupported()) {
return; // don't fail because of lack of support
@@ -756,10 +755,10 @@ describe(
translucentTileClassification.execute(scene, passState);
expect(
- translucentTileClassification._clearColorCommand.execute,
+ translucentTileClassification._clearColorCommand.execute
).not.toHaveBeenCalled();
translucentTileClassification.destroy();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/TweenCollectionSpec.js b/packages/engine/Specs/Scene/TweenCollectionSpec.js
index 57850a44648d..db639dbcec62 100644
--- a/packages/engine/Specs/Scene/TweenCollectionSpec.js
+++ b/packages/engine/Specs/Scene/TweenCollectionSpec.js
@@ -401,5 +401,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/UrlTemplateImageryProviderSpec.js b/packages/engine/Specs/Scene/UrlTemplateImageryProviderSpec.js
index 1e52aa3b70ef..a7e6e2a3761b 100644
--- a/packages/engine/Specs/Scene/UrlTemplateImageryProviderSpec.js
+++ b/packages/engine/Specs/Scene/UrlTemplateImageryProviderSpec.js
@@ -60,16 +60,18 @@ describe("Scene/UrlTemplateImageryProvider", function () {
expect(provider.tilingScheme).toBeInstanceOf(WebMercatorTilingScheme);
expect(provider.rectangle).toEqual(new WebMercatorTilingScheme().rectangle);
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -107,18 +109,20 @@ describe("Scene/UrlTemplateImageryProvider", function () {
expect(provider.rectangle).toEqualEpsilon(rectangle, CesiumMath.EPSILON14);
expect(provider.tileDiscardPolicy).toBeUndefined();
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toContain("/0/0/0");
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toContain("/0/0/0");
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -159,14 +163,14 @@ describe("Scene/UrlTemplateImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
if (tries === 2) {
// Succeed after 2 tries
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
} else {
// fail
@@ -192,23 +196,26 @@ describe("Scene/UrlTemplateImageryProvider", function () {
it("evaluation of pattern X Y reverseX reverseY Z reverseZ", function () {
const provider = new UrlTemplateImageryProvider({
- url: "made/up/tms/server/{z}/{reverseZ}/{reverseY}/{y}/{reverseX}/{x}.PNG",
+ url:
+ "made/up/tms/server/{z}/{reverseZ}/{reverseY}/{y}/{reverseX}/{x}.PNG",
tilingScheme: new GeographicTilingScheme(),
maximumLevel: 6,
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toEqual("made/up/tms/server/2/3/2/1/4/3.PNG");
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toEqual("made/up/tms/server/2/3/2/1/4/3.PNG");
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(3, 1, 2).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -218,7 +225,8 @@ describe("Scene/UrlTemplateImageryProvider", function () {
it("evaluation of schema zero padding for X Y Z as 0000", function () {
const provider = new UrlTemplateImageryProvider({
- url: "made/up/tms/server/{z}/{reverseZ}/{reverseY}/{y}/{reverseX}/{x}.PNG",
+ url:
+ "made/up/tms/server/{z}/{reverseZ}/{reverseY}/{y}/{reverseX}/{x}.PNG",
urlSchemeZeroPadding: {
"{x}": "0000",
"{y}": "0000",
@@ -228,20 +236,22 @@ describe("Scene/UrlTemplateImageryProvider", function () {
maximumLevel: 6,
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toEqual(
- "made/up/tms/server/0002/3/2/0001/4/0003.PNG",
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toEqual(
+ "made/up/tms/server/0002/3/2/0001/4/0003.PNG"
+ );
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(3, 1, 2).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -251,7 +261,8 @@ describe("Scene/UrlTemplateImageryProvider", function () {
it("evaluation of schema zero padding for reverseX reverseY reverseZ as 0000", function () {
const provider = new UrlTemplateImageryProvider({
- url: "made/up/tms/server/{z}/{reverseZ}/{reverseY}/{y}/{reverseX}/{x}.PNG",
+ url:
+ "made/up/tms/server/{z}/{reverseZ}/{reverseY}/{y}/{reverseX}/{x}.PNG",
urlSchemeZeroPadding: {
"{reverseX}": "0000",
"{reverseY}": "0000",
@@ -261,20 +272,22 @@ describe("Scene/UrlTemplateImageryProvider", function () {
maximumLevel: 6,
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toEqual(
- "made/up/tms/server/2/0003/0002/1/0004/3.PNG",
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toEqual(
+ "made/up/tms/server/2/0003/0002/1/0004/3.PNG"
+ );
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(3, 1, 2).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -284,7 +297,8 @@ describe("Scene/UrlTemplateImageryProvider", function () {
it("evaluation of schema zero padding for x y z as 0000 and large x and y", function () {
const provider = new UrlTemplateImageryProvider({
- url: "made/up/tms/server/{z}/{reverseZ}/{reverseY}/{y}/{reverseX}/{x}.PNG",
+ url:
+ "made/up/tms/server/{z}/{reverseZ}/{reverseY}/{y}/{reverseX}/{x}.PNG",
urlSchemeZeroPadding: {
"{x}": "0000",
"{y}": "0000",
@@ -294,20 +308,22 @@ describe("Scene/UrlTemplateImageryProvider", function () {
maximumLevel: 6,
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toEqual(
- "made/up/tms/server/0005/0/21/0010/51/0012.PNG",
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toEqual(
+ "made/up/tms/server/0005/0/21/0010/51/0012.PNG"
+ );
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(12, 10, 5).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -321,18 +337,20 @@ describe("Scene/UrlTemplateImageryProvider", function () {
tilingScheme: new GeographicTilingScheme(),
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toEqualEpsilon(45.0, CesiumMath.EPSILON11);
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toEqualEpsilon(45.0, CesiumMath.EPSILON11);
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(3, 1, 2).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -346,18 +364,20 @@ describe("Scene/UrlTemplateImageryProvider", function () {
tilingScheme: new GeographicTilingScheme(),
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toEqualEpsilon(0.0, CesiumMath.EPSILON11);
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toEqualEpsilon(0.0, CesiumMath.EPSILON11);
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(3, 1, 2).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -371,18 +391,20 @@ describe("Scene/UrlTemplateImageryProvider", function () {
tilingScheme: new GeographicTilingScheme(),
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toEqualEpsilon(0.0, CesiumMath.EPSILON11);
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toEqualEpsilon(0.0, CesiumMath.EPSILON11);
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(3, 1, 2).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -396,18 +418,20 @@ describe("Scene/UrlTemplateImageryProvider", function () {
tilingScheme: new GeographicTilingScheme(),
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toEqualEpsilon(-45.0, CesiumMath.EPSILON11);
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toEqualEpsilon(-45.0, CesiumMath.EPSILON11);
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(3, 1, 2).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -421,21 +445,23 @@ describe("Scene/UrlTemplateImageryProvider", function () {
tilingScheme: new WebMercatorTilingScheme(),
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toEqualEpsilon(
- (Math.PI * Ellipsoid.WGS84.maximumRadius) / 2.0,
- CesiumMath.EPSILON11,
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toEqualEpsilon(
+ (Math.PI * Ellipsoid.WGS84.maximumRadius) / 2.0,
+ CesiumMath.EPSILON11
+ );
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(3, 1, 2).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -448,21 +474,23 @@ describe("Scene/UrlTemplateImageryProvider", function () {
url: "{southProjected}",
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toEqualEpsilon(
- (Math.PI * Ellipsoid.WGS84.maximumRadius) / 2.0,
- CesiumMath.EPSILON11,
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toEqualEpsilon(
+ (Math.PI * Ellipsoid.WGS84.maximumRadius) / 2.0,
+ CesiumMath.EPSILON11
+ );
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(3, 0, 2).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -475,21 +503,23 @@ describe("Scene/UrlTemplateImageryProvider", function () {
url: "{eastProjected}",
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toEqualEpsilon(
- (-Math.PI * Ellipsoid.WGS84.maximumRadius) / 2.0,
- CesiumMath.EPSILON11,
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toEqualEpsilon(
+ (-Math.PI * Ellipsoid.WGS84.maximumRadius) / 2.0,
+ CesiumMath.EPSILON11
+ );
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 1, 2).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -502,21 +532,23 @@ describe("Scene/UrlTemplateImageryProvider", function () {
url: "{westProjected}",
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toEqualEpsilon(
- (-Math.PI * Ellipsoid.WGS84.maximumRadius) / 2.0,
- CesiumMath.EPSILON11,
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toEqualEpsilon(
+ (-Math.PI * Ellipsoid.WGS84.maximumRadius) / 2.0,
+ CesiumMath.EPSILON11
+ );
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(1, 1, 2).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -526,31 +558,32 @@ describe("Scene/UrlTemplateImageryProvider", function () {
it("evaluates multiple coordinate patterns", function () {
const provider = new UrlTemplateImageryProvider({
- url: "{westDegrees} {westProjected} {southProjected} {southDegrees} {eastProjected} {eastDegrees} {northDegrees} {northProjected}",
- });
-
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toEqual(
- `-90 ${(-Math.PI * Ellipsoid.WGS84.maximumRadius) / 2.0} ` +
- `0 ` +
- `0 ` +
- `0 ` +
- `0 ${CesiumMath.toDegrees(
- WebMercatorProjection.mercatorAngleToGeodeticLatitude(
- Math.PI / 2,
- ),
- )} ${(Math.PI * Ellipsoid.WGS84.maximumRadius) / 2.0}`,
- );
+ url:
+ "{westDegrees} {westProjected} {southProjected} {southDegrees} {eastProjected} {eastDegrees} {northDegrees} {northProjected}",
+ });
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toEqual(
+ `-90 ${(-Math.PI * Ellipsoid.WGS84.maximumRadius) / 2.0} ` +
+ `0 ` +
+ `0 ` +
+ `0 ` +
+ `0 ${CesiumMath.toDegrees(
+ WebMercatorProjection.mercatorAngleToGeodeticLatitude(Math.PI / 2)
+ )} ${(Math.PI * Ellipsoid.WGS84.maximumRadius) / 2.0}`
+ );
+
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(1, 1, 2).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -563,18 +596,20 @@ describe("Scene/UrlTemplateImageryProvider", function () {
url: "{s}",
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(["a", "b", "c"].indexOf(request.url)).toBeGreaterThanOrEqual(0);
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(["a", "b", "c"].indexOf(request.url)).toBeGreaterThanOrEqual(0);
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(3, 1, 2).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -588,18 +623,20 @@ describe("Scene/UrlTemplateImageryProvider", function () {
subdomains: "123",
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(["1", "2", "3"].indexOf(request.url)).toBeGreaterThanOrEqual(0);
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(["1", "2", "3"].indexOf(request.url)).toBeGreaterThanOrEqual(0);
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(3, 1, 2).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -613,18 +650,20 @@ describe("Scene/UrlTemplateImageryProvider", function () {
subdomains: ["foo", "bar"],
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(["foo", "bar"].indexOf(request.url)).toBeGreaterThanOrEqual(0);
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(["foo", "bar"].indexOf(request.url)).toBeGreaterThanOrEqual(0);
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(3, 1, 2).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -647,18 +686,20 @@ describe("Scene/UrlTemplateImageryProvider", function () {
},
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- expect(request.url).toEqual("made/up/tms/server/foo/bar/2/1/3.PNG");
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ expect(request.url).toEqual("made/up/tms/server/foo/bar/2/1/3.PNG");
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(3, 1, 2).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
diff --git a/packages/engine/Specs/Scene/Vector3DTileClampedPolylinesSpec.js b/packages/engine/Specs/Scene/Vector3DTileClampedPolylinesSpec.js
index c5e071e372d2..0e6ca02f10d1 100644
--- a/packages/engine/Specs/Scene/Vector3DTileClampedPolylinesSpec.js
+++ b/packages/engine/Specs/Scene/Vector3DTileClampedPolylinesSpec.js
@@ -65,8 +65,9 @@ describe(
beforeEach(function () {
rectangle = Rectangle.fromDegrees(-40.0, -40.0, 40.0, 40.0);
- const depthpolylineColorAttribute =
- ColorGeometryInstanceAttribute.fromColor(new Color(0.0, 0.0, 1.0, 1.0));
+ const depthpolylineColorAttribute = ColorGeometryInstanceAttribute.fromColor(
+ new Color(0.0, 0.0, 1.0, 1.0)
+ );
const primitive = new Primitive({
geometryInstances: new GeometryInstance({
geometry: new RectangleGeometry({
@@ -97,7 +98,7 @@ describe(
xit("renders clamped polylines", function () {
scene.camera.lookAt(
Cartesian3.fromDegrees(0.0, 0.0, 1.5),
- new Cartesian3(0.0, 0.0, 1.0),
+ new Cartesian3(0.0, 0.0, 1.0)
);
return Cesium3DTilesTester.loadTileset(scene, vectorPolylines, {
classificationType: ClassificationType.TERRAIN,
@@ -114,7 +115,7 @@ describe(
xit("picks a clamped polyline", function () {
scene.camera.lookAt(
Cartesian3.fromDegrees(0.0, 0.0, 1.5),
- new Cartesian3(0.0, 0.0, 1.0),
+ new Cartesian3(0.0, 0.0, 1.0)
);
return Cesium3DTilesTester.loadTileset(scene, vectorPolylines, {
classificationType: ClassificationType.TERRAIN,
@@ -137,5 +138,5 @@ describe(
expect(polylines.isDestroyed()).toEqual(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Vector3DTileContentSpec.js b/packages/engine/Specs/Scene/Vector3DTileContentSpec.js
index 22581023dd11..4106b41aa0ed 100644
--- a/packages/engine/Specs/Scene/Vector3DTileContentSpec.js
+++ b/packages/engine/Specs/Scene/Vector3DTileContentSpec.js
@@ -83,7 +83,7 @@ describe(
}
const depthColorAttribute = ColorGeometryInstanceAttribute.fromColor(
- new Color(1.0, 0.0, 0.0, 1.0),
+ new Color(1.0, 0.0, 0.0, 1.0)
);
depthColor = depthColorAttribute.value;
return new Primitive({
@@ -117,25 +117,25 @@ describe(
tilesetRectangle.west,
center.latitude,
center.longitude,
- tilesetRectangle.north,
+ tilesetRectangle.north
);
const urRect = new Rectangle(
center.longitude,
center.longitude,
tilesetRectangle.east,
- tilesetRectangle.north,
+ tilesetRectangle.north
);
const lrRect = new Rectangle(
center.longitude,
tilesetRectangle.south,
tilesetRectangle.east,
- center.latitude,
+ center.latitude
);
const llRect = new Rectangle(
tilesetRectangle.west,
tilesetRectangle.south,
center.longitude,
- center.latitude,
+ center.latitude
);
return [ulRect, urRect, lrRect, llRect];
}
@@ -160,14 +160,14 @@ describe(
globeMockPrimitive = new MockPrimitive(globePrimitive, Pass.GLOBE);
tilesetMockPrimitive = new MockPrimitive(
tilesetPrimitive,
- Pass.CESIUM_3D_TILE,
+ Pass.CESIUM_3D_TILE
);
// Add the globe mock primitive to the scene.
scene.primitives.add(globeMockPrimitive);
scene.camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(tilesetRectangle)),
- new Cartesian3(0.0, 0.0, 0.01),
+ new Cartesian3(0.0, 0.0, 0.01)
);
});
@@ -198,29 +198,30 @@ describe(
it("renders points", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePointsTileset,
+ vectorTilePointsTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
});
@@ -229,13 +230,14 @@ describe(
it("picks points", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePointsTileset,
+ vectorTilePointsTileset
).then((tileset) => {
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -243,7 +245,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -251,7 +253,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -259,7 +261,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -271,11 +273,12 @@ describe(
it("styles points for show", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePointsTileset,
+ vectorTilePointsTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
// Set show to true.
@@ -284,22 +287,22 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
@@ -308,22 +311,22 @@ describe(
tileset.style = undefined;
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
});
@@ -332,11 +335,12 @@ describe(
it("styles points for color", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePointsTileset,
+ vectorTilePointsTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
return new Promise((resolve) => {
tileset.style = new Cesium3DTileStyle({
@@ -349,22 +353,22 @@ describe(
}).then(() => {
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(blackPixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(blackPixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(blackPixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(blackPixel);
@@ -373,22 +377,22 @@ describe(
tileset.style = undefined;
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
});
@@ -398,29 +402,30 @@ describe(
it("renders batched points with batch ids", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePointsWithBatchIdsTileset,
+ vectorTilePointsWithBatchIdsTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
});
@@ -429,14 +434,15 @@ describe(
it("picks batched points with batch ids", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePointsWithBatchIdsTileset,
+ vectorTilePointsWithBatchIdsTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -445,7 +451,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -454,7 +460,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -463,7 +469,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -476,29 +482,30 @@ describe(
it("renders batched points with batch table", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePointsWithBatchTableTileset,
+ vectorTilePointsWithBatchTableTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
});
@@ -507,14 +514,15 @@ describe(
it("picks batched points with batch table", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePointsWithBatchTableTileset,
+ vectorTilePointsWithBatchTableTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -523,7 +531,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -532,7 +540,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -541,7 +549,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -554,29 +562,30 @@ describe(
it("renders batched points with children", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePointsBatchedChildrenTileset,
+ vectorTilePointsBatchedChildrenTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
});
@@ -585,29 +594,30 @@ describe(
it("renders batched polygons with children with batch table", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePointsBatchedChildrenWithBatchTableTileset,
+ vectorTilePointsBatchedChildrenWithBatchTableTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
});
@@ -627,29 +637,30 @@ describe(
it("renders polygons", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePolygonsTileset,
+ vectorTilePolygonsTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
});
@@ -658,13 +669,13 @@ describe(
it("picks polygons", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePolygonsTileset,
+ vectorTilePolygonsTileset
).then((tileset) => {
camera.lookAt(
ellipsoid.cartographicToCartesian(
- Rectangle.center(tilesetRectangle),
+ Rectangle.center(tilesetRectangle)
),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -676,11 +687,12 @@ describe(
it("styles polygons for show", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePolygonsTileset,
+ vectorTilePolygonsTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
// Set show to false.
@@ -689,22 +701,22 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender([255.0, 0.0, 0.0, 255.0]);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender([255.0, 0.0, 0.0, 255.0]);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender([255.0, 0.0, 0.0, 255.0]);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender([255.0, 0.0, 0.0, 255.0]);
@@ -715,22 +727,22 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
@@ -739,22 +751,22 @@ describe(
tileset.style = undefined;
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
});
@@ -763,11 +775,12 @@ describe(
it("styles polygons for color", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePolygonsTileset,
+ vectorTilePolygonsTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
// Set color to black.
@@ -776,22 +789,22 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(blackPixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(blackPixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(blackPixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(blackPixel);
@@ -800,22 +813,22 @@ describe(
tileset.style = undefined;
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
});
@@ -828,13 +841,13 @@ describe(
vectorTilePolygonsTileset,
{
classificationType: ClassificationType.CESIUM_3D_TILE,
- },
+ }
).then((tileset) => {
camera.lookAt(
ellipsoid.cartographicToCartesian(
- Rectangle.center(tilesetRectangle),
+ Rectangle.center(tilesetRectangle)
),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
globeMockPrimitive.show = false;
@@ -854,13 +867,13 @@ describe(
vectorTilePolygonsTileset,
{
classificationType: ClassificationType.TERRAIN,
- },
+ }
).then((tileset) => {
camera.lookAt(
ellipsoid.cartographicToCartesian(
- Rectangle.center(tilesetRectangle),
+ Rectangle.center(tilesetRectangle)
),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
globeMockPrimitive.show = false;
@@ -880,13 +893,13 @@ describe(
vectorTilePolygonsTileset,
{
classificationType: ClassificationType.BOTH,
- },
+ }
).then((tileset) => {
camera.lookAt(
ellipsoid.cartographicToCartesian(
- Rectangle.center(tilesetRectangle),
+ Rectangle.center(tilesetRectangle)
),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
globeMockPrimitive.show = false;
@@ -902,29 +915,30 @@ describe(
it("renders batched polygons with batch ids", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePolygonsWithBatchIdsTileset,
+ vectorTilePolygonsWithBatchIdsTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
});
@@ -933,14 +947,15 @@ describe(
it("picks batched polygons with batch ids", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePolygonsWithBatchIdsTileset,
+ vectorTilePolygonsWithBatchIdsTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -949,7 +964,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -958,7 +973,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -967,7 +982,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -980,29 +995,30 @@ describe(
it("renders batched polygons with batch table", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePolygonsWithBatchTableTileset,
+ vectorTilePolygonsWithBatchTableTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
});
@@ -1011,14 +1027,15 @@ describe(
it("picks batched polygons with batch table", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePolygonsWithBatchTableTileset,
+ vectorTilePolygonsWithBatchTableTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -1027,7 +1044,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -1036,7 +1053,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -1045,7 +1062,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -1058,29 +1075,30 @@ describe(
it("renders batched polygons with children", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePolygonsBatchedChildrenTileset,
+ vectorTilePolygonsBatchedChildrenTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
});
@@ -1089,29 +1107,30 @@ describe(
it("renders batched polygons with children with batch table", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePolygonsBatchedChildrenWithBatchTable,
+ vectorTilePolygonsBatchedChildrenWithBatchTable
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
});
@@ -1133,22 +1152,23 @@ describe(
it("renders polylines", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePolylinesTileset,
+ vectorTilePolylinesTileset
).then((tileset) => {
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
const nwCorner = ellipsoid.cartographicToCartesian(
- Rectangle.northwest(ulRect),
+ Rectangle.northwest(ulRect)
);
const neCorner = ellipsoid.cartographicToCartesian(
- Rectangle.northeast(urRect),
+ Rectangle.northeast(urRect)
);
const seCorner = ellipsoid.cartographicToCartesian(
- Rectangle.southeast(lrRect),
+ Rectangle.southeast(lrRect)
);
const swCorner = ellipsoid.cartographicToCartesian(
- Rectangle.southwest(llRect),
+ Rectangle.southwest(llRect)
);
camera.lookAt(nwCorner, new Cartesian3(0.0, 0.0, 5.0));
@@ -1192,14 +1212,15 @@ describe(
it("picks polylines", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePolylinesTileset,
+ vectorTilePolylinesTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.northwest(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -1207,7 +1228,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.northeast(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -1215,7 +1236,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.southeast(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -1223,7 +1244,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.southwest(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -1235,22 +1256,23 @@ describe(
it("styles polylines for show", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePolylinesTileset,
+ vectorTilePolylinesTileset
).then((tileset) => {
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
const nwCorner = ellipsoid.cartographicToCartesian(
- Rectangle.northwest(ulRect),
+ Rectangle.northwest(ulRect)
);
const neCorner = ellipsoid.cartographicToCartesian(
- Rectangle.northeast(urRect),
+ Rectangle.northeast(urRect)
);
const seCorner = ellipsoid.cartographicToCartesian(
- Rectangle.southeast(lrRect),
+ Rectangle.southeast(lrRect)
);
const swCorner = ellipsoid.cartographicToCartesian(
- Rectangle.southwest(llRect),
+ Rectangle.southwest(llRect)
);
// Set show to false.
@@ -1358,22 +1380,23 @@ describe(
it("styles polylines for color", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePolylinesTileset,
+ vectorTilePolylinesTileset
).then((tileset) => {
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
const nwCorner = ellipsoid.cartographicToCartesian(
- Rectangle.northwest(ulRect),
+ Rectangle.northwest(ulRect)
);
const neCorner = ellipsoid.cartographicToCartesian(
- Rectangle.northeast(urRect),
+ Rectangle.northeast(urRect)
);
const seCorner = ellipsoid.cartographicToCartesian(
- Rectangle.southeast(lrRect),
+ Rectangle.southeast(lrRect)
);
const swCorner = ellipsoid.cartographicToCartesian(
- Rectangle.southwest(llRect),
+ Rectangle.southwest(llRect)
);
// Set color to black.
@@ -1443,13 +1466,13 @@ describe(
vectorTilePolylinesTileset,
{
classificationType: ClassificationType.CESIUM_3D_TILE,
- },
+ }
).then((tileset) => {
camera.lookAt(
ellipsoid.cartographicToCartesian(
- Rectangle.northeast(tilesetRectangle),
+ Rectangle.northeast(tilesetRectangle)
),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
globeMockPrimitive.show = false;
@@ -1469,13 +1492,13 @@ describe(
vectorTilePolylinesTileset,
{
classificationType: ClassificationType.TERRAIN,
- },
+ }
).then((tileset) => {
camera.lookAt(
ellipsoid.cartographicToCartesian(
- Rectangle.northeast(tilesetRectangle),
+ Rectangle.northeast(tilesetRectangle)
),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
globeMockPrimitive.show = false;
@@ -1495,13 +1518,13 @@ describe(
vectorTilePolylinesTileset,
{
classificationType: ClassificationType.BOTH,
- },
+ }
).then((tileset) => {
camera.lookAt(
ellipsoid.cartographicToCartesian(
- Rectangle.northeast(tilesetRectangle),
+ Rectangle.northeast(tilesetRectangle)
),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
globeMockPrimitive.show = false;
@@ -1517,23 +1540,24 @@ describe(
it("renders polylines with batch ids", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePolylinesWithBatchIdsTileset,
+ vectorTilePolylinesWithBatchIdsTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
const nwCorner = ellipsoid.cartographicToCartesian(
- Rectangle.northwest(ulRect),
+ Rectangle.northwest(ulRect)
);
const neCorner = ellipsoid.cartographicToCartesian(
- Rectangle.northeast(urRect),
+ Rectangle.northeast(urRect)
);
const seCorner = ellipsoid.cartographicToCartesian(
- Rectangle.southeast(lrRect),
+ Rectangle.southeast(lrRect)
);
const swCorner = ellipsoid.cartographicToCartesian(
- Rectangle.southwest(llRect),
+ Rectangle.southwest(llRect)
);
camera.lookAt(nwCorner, new Cartesian3(0.0, 0.0, 5.0));
@@ -1577,14 +1601,15 @@ describe(
it("picks polylines with batch ids", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePolylinesWithBatchIdsTileset,
+ vectorTilePolylinesWithBatchIdsTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.northwest(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -1593,7 +1618,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.northeast(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -1602,7 +1627,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.southeast(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -1611,7 +1636,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.southwest(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -1624,23 +1649,24 @@ describe(
it("renders polylines with batch table", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePolylinesWithBatchTableTileset,
+ vectorTilePolylinesWithBatchTableTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
const nwCorner = ellipsoid.cartographicToCartesian(
- Rectangle.northwest(ulRect),
+ Rectangle.northwest(ulRect)
);
const neCorner = ellipsoid.cartographicToCartesian(
- Rectangle.northeast(urRect),
+ Rectangle.northeast(urRect)
);
const seCorner = ellipsoid.cartographicToCartesian(
- Rectangle.southeast(lrRect),
+ Rectangle.southeast(lrRect)
);
const swCorner = ellipsoid.cartographicToCartesian(
- Rectangle.southwest(llRect),
+ Rectangle.southwest(llRect)
);
camera.lookAt(nwCorner, new Cartesian3(0.0, 0.0, 5.0));
@@ -1684,14 +1710,15 @@ describe(
it("picks polylines with batch table", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePolylinesWithBatchTableTileset,
+ vectorTilePolylinesWithBatchTableTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.northwest(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -1700,7 +1727,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.northeast(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -1709,7 +1736,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.southeast(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -1718,7 +1745,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.southwest(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -1731,14 +1758,15 @@ describe(
it("renders batched polylines with children", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePolylinesBatchedChildrenTileset,
+ vectorTilePolylinesBatchedChildrenTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.northwest(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRenderAndCall((rgba) => {
// Account for mitering at the corners.
@@ -1749,7 +1777,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.northeast(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRenderAndCall((rgba) => {
// Account for mitering at the corners.
@@ -1760,7 +1788,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.southeast(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRenderAndCall((rgba) => {
// Account for mitering at the corners.
@@ -1771,7 +1799,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.southwest(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRenderAndCall((rgba) => {
// Account for mitering at the corners.
@@ -1786,14 +1814,15 @@ describe(
it("renders batched polylines with children with batch table", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePolylinesBatchedChildrenWithBatchTableTileset,
+ vectorTilePolylinesBatchedChildrenWithBatchTableTileset
).then((tileset) => {
// Subdivide the rectangle into 4, and look at the center of each sub-rectangle.
- const [ulRect, urRect, lrRect, llRect] =
- subdivideRectangle(tilesetRectangle);
+ const [ulRect, urRect, lrRect, llRect] = subdivideRectangle(
+ tilesetRectangle
+ );
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.northwest(ulRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRenderAndCall((rgba) => {
// Account for mitering at the corners.
@@ -1804,7 +1833,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.northeast(urRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRenderAndCall((rgba) => {
// Account for mitering at the corners.
@@ -1815,7 +1844,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.southeast(lrRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRenderAndCall((rgba) => {
// Account for mitering at the corners.
@@ -1826,7 +1855,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.southwest(llRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRenderAndCall((rgba) => {
// Account for mitering at the corners.
@@ -1845,22 +1874,22 @@ describe(
vectorTilePolylinesWithBatchIdsTileset,
{
vectorKeepDecodedPositions: true,
- },
+ }
).then(function (tileset) {
const content = tileset.root.content;
const polylinePositions = content.getPolylinePositions(0);
expect(polylinePositions.length).toBe(60);
expect(polylinePositions[0]).toEqualEpsilon(
6378136.806372941,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polylinePositions[1]).toEqualEpsilon(
-1113.194885441724,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polylinePositions[2]).toEqualEpsilon(
1105.675261474196,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
});
@@ -1871,7 +1900,7 @@ describe(
vectorTilePolylinesBatchedChildrenTileset,
{
vectorKeepDecodedPositions: true,
- },
+ }
).then(function (tileset) {
const content = tileset.root.children[0].content;
expect(content.getPolylinePositions(0).length).toBe(60);
@@ -1888,22 +1917,22 @@ describe(
{
vectorKeepDecodedPositions: true,
classificationType: ClassificationType.TERRAIN,
- },
+ }
).then(function (tileset) {
const content = tileset.root.content;
const polylinePositions = content.getPolylinePositions(0);
expect(polylinePositions.length).toBe(54); // duplicate positions are removed
expect(polylinePositions[0]).toEqualEpsilon(
6378136.806372941,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polylinePositions[1]).toEqualEpsilon(
-1113.194885441724,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
expect(polylinePositions[2]).toEqualEpsilon(
1105.675261474196,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
);
});
});
@@ -1914,7 +1943,7 @@ describe(
vectorTilePolylinesWithBatchIdsTileset,
{
vectorKeepDecodedPositions: true,
- },
+ }
).then(function (tileset) {
const content = tileset.root.content;
const polylinePositions = content.getPolylinePositions(1);
@@ -1928,7 +1957,7 @@ describe(
vectorTilePolygonsWithBatchTableTileset,
{
vectorKeepDecodedPositions: true,
- },
+ }
).then(function (tileset) {
const content = tileset.root.content;
const polylinePositions = content.getPolylinePositions(0);
@@ -1942,7 +1971,7 @@ describe(
vectorTilePolylinesWithBatchIdsTileset,
{
vectorKeepDecodedPositions: false,
- },
+ }
).then(function (tileset) {
const content = tileset.root.content;
const polylinePositions = content.getPolylinePositions(0);
@@ -1962,7 +1991,7 @@ describe(
-0.02,
-0.01,
0.02,
- 0.01,
+ 0.01
);
const width = combinedTilesetRectangle.width;
const step = width / 3;
@@ -1975,30 +2004,30 @@ describe(
west + step,
south,
west + step * 2,
- north,
+ north
);
const pointRect = new Rectangle(
west + step * 2,
south,
west + step * 3,
- north,
+ north
);
it("renders", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTileCombinedTileset,
+ vectorTileCombinedTileset
).then((tileset) => {
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(polygonRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(
- Rectangle.southeast(polylineRect),
+ Rectangle.southeast(polylineRect)
),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRenderAndCall((rgba) => {
// Account for mitering at the corners.
@@ -2009,7 +2038,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(pointRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
});
@@ -2018,11 +2047,11 @@ describe(
it("picks", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTileCombinedTileset,
+ vectorTileCombinedTileset
).then((tileset) => {
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(polygonRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -2030,9 +2059,9 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(
- Rectangle.southeast(polylineRect),
+ Rectangle.southeast(polylineRect)
),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -2040,7 +2069,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(pointRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -2052,19 +2081,19 @@ describe(
it("renders with batch ids", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTileCombinedWithBatchIdsTileset,
+ vectorTileCombinedWithBatchIdsTileset
).then((tileset) => {
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(polygonRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
camera.lookAt(
ellipsoid.cartographicToCartesian(
- Rectangle.southeast(polylineRect),
+ Rectangle.southeast(polylineRect)
),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRenderAndCall((rgba) => {
// Account for mitering at the corners.
@@ -2075,7 +2104,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(pointRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toRender(whitePixel);
});
@@ -2084,11 +2113,11 @@ describe(
it("picks with batch ids", () => {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTileCombinedWithBatchIdsTileset,
+ vectorTileCombinedWithBatchIdsTileset
).then((tileset) => {
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(polygonRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -2097,9 +2126,9 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(
- Rectangle.southeast(polylineRect),
+ Rectangle.southeast(polylineRect)
),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -2108,7 +2137,7 @@ describe(
});
camera.lookAt(
ellipsoid.cartographicToCartesian(Rectangle.center(pointRect)),
- new Cartesian3(0.0, 0.0, 5.0),
+ new Cartesian3(0.0, 0.0, 5.0)
);
expect(scene).toPickAndCall((result) => {
expect(result).toBeDefined();
@@ -2122,7 +2151,7 @@ describe(
it("throws when calling getFeature with invalid index", function () {
return Cesium3DTilesTester.loadTileset(
scene,
- vectorTilePolygonsWithBatchTableTileset,
+ vectorTilePolygonsWithBatchTableTileset
).then(function (tileset) {
const content = tileset.root.content;
expect(function () {
@@ -2142,10 +2171,10 @@ describe(
version: 2,
});
await expectAsync(
- Cesium3DTilesTester.createContentForMockTile(arrayBuffer, "vctr"),
+ Cesium3DTilesTester.createContentForMockTile(arrayBuffer, "vctr")
).toBeRejectedWithError(
RuntimeError,
- "Only Vector tile version 1 is supported. Version 2 is not.",
+ "Only Vector tile version 1 is supported. Version 2 is not."
);
});
@@ -2154,10 +2183,10 @@ describe(
defineFeatureTable: false,
});
await expectAsync(
- Cesium3DTilesTester.createContentForMockTile(arrayBuffer, "vctr"),
+ Cesium3DTilesTester.createContentForMockTile(arrayBuffer, "vctr")
).toBeRejectedWithError(
RuntimeError,
- "Feature table must have a byte length greater than zero",
+ "Feature table must have a byte length greater than zero"
);
});
@@ -2167,10 +2196,10 @@ describe(
polygonsLength: 1,
});
await expectAsync(
- Cesium3DTilesTester.createContentForMockTile(arrayBuffer, "vctr"),
+ Cesium3DTilesTester.createContentForMockTile(arrayBuffer, "vctr")
).toBeRejectedWithError(
RuntimeError,
- "Feature table global property: REGION must be defined",
+ "Feature table global property: REGION must be defined"
);
});
@@ -2183,21 +2212,21 @@ describe(
pointBatchIds: [0],
});
await expectAsync(
- Cesium3DTilesTester.createContentForMockTile(arrayBuffer, "vctr"),
+ Cesium3DTilesTester.createContentForMockTile(arrayBuffer, "vctr")
).toBeRejectedWithError(
RuntimeError,
- "If one group of batch ids is defined, then all batch ids must be defined",
+ "If one group of batch ids is defined, then all batch ids must be defined"
);
});
it("destroys", async function () {
const tileset = await Cesium3DTileset.fromUrl(
- vectorTilePolygonsWithBatchTableTileset,
+ vectorTilePolygonsWithBatchTableTileset
);
expect(tileset.isDestroyed()).toEqual(false);
tileset.destroy();
expect(tileset.isDestroyed()).toEqual(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Vector3DTileGeometrySpec.js b/packages/engine/Specs/Scene/Vector3DTileGeometrySpec.js
index bce78da0c63f..32d9365f8e18 100644
--- a/packages/engine/Specs/Scene/Vector3DTileGeometrySpec.js
+++ b/packages/engine/Specs/Scene/Vector3DTileGeometrySpec.js
@@ -69,7 +69,7 @@ describe(
});
}
const depthColorAttribute = ColorGeometryInstanceAttribute.fromColor(
- new Color(1.0, 0.0, 0.0, 1.0),
+ new Color(1.0, 0.0, 0.0, 1.0)
);
return new Primitive({
geometryInstances: new GeometryInstance({
@@ -127,7 +127,7 @@ describe(
reusableGlobePrimitive = createPrimitive(rectangle, Pass.GLOBE);
reusableTilesetPrimitive = createPrimitive(
rectangle,
- Pass.CESIUM_3D_TILE,
+ Pass.CESIUM_3D_TILE
);
});
@@ -142,7 +142,7 @@ describe(
globePrimitive = new MockPrimitive(reusableGlobePrimitive, Pass.GLOBE);
tilesetPrimitive = new MockPrimitive(
reusableTilesetPrimitive,
- Pass.CESIUM_3D_TILE,
+ Pass.CESIUM_3D_TILE
);
});
@@ -170,7 +170,7 @@ describe(
function packBoxes(boxes) {
const length = boxes.length;
const packedBoxes = new Float32Array(
- length * Vector3DTileGeometry.packedBoxLength,
+ length * Vector3DTileGeometry.packedBoxLength
);
let offset = 0;
for (let i = 0; i < length; ++i) {
@@ -186,7 +186,7 @@ describe(
function packCylinders(cylinders) {
const length = cylinders.length;
const packedCylinders = new Float32Array(
- length * Vector3DTileGeometry.packedCylinderLength,
+ length * Vector3DTileGeometry.packedCylinderLength
);
let offset = 0;
for (let i = 0; i < length; ++i) {
@@ -202,7 +202,7 @@ describe(
function packEllipsoids(ellipsoids) {
const length = ellipsoids.length;
const packedEllipsoids = new Float32Array(
- length * Vector3DTileGeometry.packedEllipsoidLength,
+ length * Vector3DTileGeometry.packedEllipsoidLength
);
let offset = 0;
for (let i = 0; i < length; ++i) {
@@ -218,7 +218,7 @@ describe(
function packSpheres(spheres) {
const length = spheres.length;
const packedSpheres = new Float32Array(
- length * Vector3DTileGeometry.packedSphereLength,
+ length * Vector3DTileGeometry.packedSphereLength
);
let offset = 0;
for (let i = 0; i < length; ++i) {
@@ -227,7 +227,7 @@ describe(
Cartesian3.pack(
Matrix4.getTranslation(sphere.modelMatrix, new Cartesian3()),
packedSpheres,
- offset,
+ offset
);
offset += Cartesian3.packedLength;
}
@@ -252,8 +252,8 @@ describe(
center: center,
modelMatrix: modelMatrix,
batchTable: batchTable,
- }),
- ),
+ })
+ )
);
return loadGeometries(geometry).then(function () {
scene.camera.setView({
@@ -288,8 +288,8 @@ describe(
center: center,
modelMatrix: modelMatrix,
batchTable: batchTable,
- }),
- ),
+ })
+ )
);
return loadGeometries(geometry).then(function () {
let i;
@@ -301,11 +301,11 @@ describe(
const transform = Matrix4.multiply(
modelMatrix,
modelMatrices[i],
- new Matrix4(),
+ new Matrix4()
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, 10.0),
+ new Cartesian3(0.0, 0.0, 10.0)
);
batchTable.setShow(i, true);
@@ -333,7 +333,7 @@ describe(
const boxBatchIds = new Uint16Array([0]);
const bv = new BoundingSphere(
undefined,
- Math.sqrt(3.0 * dimensions.x * dimensions.x),
+ Math.sqrt(3.0 * dimensions.x * dimensions.x)
);
return verifySingleRender({
boxes: boxes,
@@ -361,7 +361,7 @@ describe(
const boxBatchIds = new Uint16Array([0, 1]);
const bv = new BoundingSphere(
undefined,
- Math.sqrt(3.0 * 2.0 * dimensions.x * dimensions.x),
+ Math.sqrt(3.0 * 2.0 * dimensions.x * dimensions.x)
);
return verifyMultipleRender(modelMatrices, {
boxes: boxes,
@@ -383,7 +383,7 @@ describe(
const cylinderBatchIds = new Uint16Array([0]);
const bv = new BoundingSphere(
undefined,
- Math.sqrt(radius * radius + length * length),
+ Math.sqrt(radius * radius + length * length)
);
return verifySingleRender({
cylinders: cylinders,
@@ -414,7 +414,7 @@ describe(
const cylinderBatchIds = new Uint16Array([0, 1]);
const bv = new BoundingSphere(
undefined,
- Math.sqrt(2.0 * (radius * radius + length * length)),
+ Math.sqrt(2.0 * (radius * radius + length * length))
);
return verifyMultipleRender(modelMatrices, {
cylinders: cylinders,
@@ -434,7 +434,7 @@ describe(
const ellipsoidBatchIds = new Uint16Array([0]);
const bv = new BoundingSphere(
undefined,
- Cartesian3.maximumComponent(radii),
+ Cartesian3.maximumComponent(radii)
);
return verifySingleRender({
ellipsoids: ellipsoid,
@@ -462,7 +462,7 @@ describe(
const ellipsoidBatchIds = new Uint16Array([0, 1]);
const bv = new BoundingSphere(
undefined,
- 2.0 * Cartesian3.maximumComponent(radii),
+ 2.0 * Cartesian3.maximumComponent(radii)
);
return verifyMultipleRender(modelMatrices, {
ellipsoids: ellipsoids,
@@ -535,7 +535,7 @@ describe(
const length = 125000.0;
modelMatrices.push(
Matrix4.fromTranslation(new Cartesian3(radius, 0.0, 0.0)),
- Matrix4.fromTranslation(new Cartesian3(-radius, 0.0, 0.0)),
+ Matrix4.fromTranslation(new Cartesian3(-radius, 0.0, 0.0))
);
const cylinders = packCylinders([
{
@@ -554,7 +554,7 @@ describe(
const radii = new Cartesian3(125000.0, 125000.0, 125000.0);
modelMatrices.push(
Matrix4.fromTranslation(new Cartesian3(radii.x, 0.0, 0.0)),
- Matrix4.fromTranslation(new Cartesian3(-radii.x, 0.0, 0.0)),
+ Matrix4.fromTranslation(new Cartesian3(-radii.x, 0.0, 0.0))
);
const ellipsoids = packEllipsoids([
{
@@ -570,7 +570,7 @@ describe(
modelMatrices.push(
Matrix4.fromTranslation(new Cartesian3(radius, 0.0, 0.0)),
- Matrix4.fromTranslation(new Cartesian3(-radius, 0.0, 0.0)),
+ Matrix4.fromTranslation(new Cartesian3(-radius, 0.0, 0.0))
);
const spheres = packSpheres([
{
@@ -621,7 +621,7 @@ describe(
let length = 125000.0;
modelMatrices.push(
Matrix4.fromTranslation(new Cartesian3(radius, 0.0, 0.0)),
- Matrix4.fromTranslation(new Cartesian3(-radius, 0.0, 0.0)),
+ Matrix4.fromTranslation(new Cartesian3(-radius, 0.0, 0.0))
);
const cylinders = packCylinders([
{
@@ -659,7 +659,7 @@ describe(
modelMatrix: modelMatrix,
batchTable: batchTable,
boundingVolume: bv,
- }),
+ })
);
geometry.forceRebatch = true;
return loadGeometries(geometry).then(function () {
@@ -672,11 +672,11 @@ describe(
const transform = Matrix4.multiply(
modelMatrix,
modelMatrices[i],
- new Matrix4(),
+ new Matrix4()
);
scene.camera.lookAtTransform(
transform,
- new Cartesian3(0.0, 0.0, 10.0),
+ new Cartesian3(0.0, 0.0, 10.0)
);
batchTable.setShow(i, true);
@@ -709,7 +709,7 @@ describe(
const bv = new BoundingSphere(
center,
- Cartesian3.maximumComponent(radii),
+ Cartesian3.maximumComponent(radii)
);
const batchTable = new Cesium3DTileBatchTable(mockTileset, 1);
@@ -725,18 +725,18 @@ describe(
center: center,
modelMatrix: modelMatrix,
batchTable: batchTable,
- }),
+ })
);
return loadGeometries(geometry).then(function () {
scene.camera.lookAtTransform(
modelMatrix,
- new Cartesian3(0.0, 0.0, 1.0),
+ new Cartesian3(0.0, 0.0, 1.0)
);
expect(scene).toRender([255, 255, 255, 255]);
scene.camera.lookAtTransform(
modelMatrix,
- new Cartesian3(radii.x, 0.0, 1.0),
+ new Cartesian3(radii.x, 0.0, 1.0)
);
expect(scene).toRender([255, 0, 0, 255]);
@@ -771,7 +771,7 @@ describe(
modelMatrix: modelMatrix,
batchTable: batchTable,
boundingVolume: new BoundingSphere(center, 1000000.0),
- }),
+ })
);
geometry.debugWireframe = true;
return loadGeometries(geometry).then(function () {
@@ -804,7 +804,7 @@ describe(
const bv = new BoundingSphere(
center,
- Cartesian3.maximumComponent(radii),
+ Cartesian3.maximumComponent(radii)
);
const batchTable = new Cesium3DTileBatchTable(mockTileset, 1);
@@ -821,12 +821,12 @@ describe(
center: center,
modelMatrix: modelMatrix,
batchTable: batchTable,
- }),
+ })
);
return loadGeometries(geometry).then(function () {
scene.camera.lookAtTransform(
modelMatrix,
- new Cartesian3(0.0, 0.0, 1.0),
+ new Cartesian3(0.0, 0.0, 1.0)
);
geometry.classificationType = ClassificationType.CESIUM_3D_TILE;
@@ -880,7 +880,7 @@ describe(
modelMatrix: modelMatrix,
batchTable: batchTable,
boundingVolume: new BoundingSphere(center, 500000.0),
- }),
+ })
);
return loadGeometries(geometry).then(function () {
scene.camera.setView({
@@ -914,5 +914,5 @@ describe(
});
}
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Vector3DTilePointsSpec.js b/packages/engine/Specs/Scene/Vector3DTilePointsSpec.js
index b171cc95684b..b04ec5f92b67 100644
--- a/packages/engine/Specs/Scene/Vector3DTilePointsSpec.js
+++ b/packages/engine/Specs/Scene/Vector3DTilePointsSpec.js
@@ -70,8 +70,9 @@ describe(
// render until all labels have been updated
return pollToPromise(function () {
scene.renderForSpecs();
- const backgroundBillboard =
- points._labelCollection._backgroundBillboardCollection.get(0);
+ const backgroundBillboard = points._labelCollection._backgroundBillboardCollection.get(
+ 0
+ );
return (
(!defined(backgroundBillboard) || backgroundBillboard.ready) &&
points._labelCollection._labelsToUpdate.length === 0 &&
@@ -99,7 +100,7 @@ describe(
rectangle,
minimumHeight,
maximumHeight,
- positions,
+ positions
) {
const length = positions.length;
const buffer = new Uint16Array(length * 3);
@@ -144,7 +145,7 @@ describe(
rectangle,
minHeight,
maxHeight,
- cartoPositions,
+ cartoPositions
);
const batchTable = new Cesium3DTileBatchTable(mockTileset, 1);
@@ -158,7 +159,7 @@ describe(
rectangle: rectangle,
minimumHeight: minHeight,
maximumHeight: maxHeight,
- }),
+ })
);
return loadPoints(points)
.then(function () {
@@ -168,7 +169,7 @@ describe(
scene.camera.lookAt(
Cartesian3.fromDegrees(0.0, 0.0, 30.0),
- new Cartesian3(0.0, 0.0, 50.0),
+ new Cartesian3(0.0, 0.0, 50.0)
);
return allPrimitivesReady(points);
})
@@ -191,7 +192,7 @@ describe(
rectangle,
minHeight,
maxHeight,
- cartoPositions,
+ cartoPositions
);
const batchTable = new Cesium3DTileBatchTable(mockTileset, 5);
@@ -205,7 +206,7 @@ describe(
rectangle: rectangle,
minimumHeight: minHeight,
maximumHeight: maxHeight,
- }),
+ })
);
const style = new Cesium3DTileStyle({
verticalOrigin: VerticalOrigin.BOTTOM,
@@ -224,7 +225,7 @@ describe(
.then(function () {
for (let i = 0; i < cartoPositions.length; ++i) {
const position = ellipsoid.cartographicToCartesian(
- cartoPositions[i],
+ cartoPositions[i]
);
scene.camera.lookAt(position, new Cartesian3(0.0, 0.0, 50.0));
expect(scene).toRenderAndCall(function (rgba) {
@@ -245,7 +246,7 @@ describe(
rectangle,
minHeight,
maxHeight,
- cartoPositions,
+ cartoPositions
);
const batchTable = new Cesium3DTileBatchTable(mockTileset, 1);
@@ -258,7 +259,7 @@ describe(
rectangle: rectangle,
minimumHeight: minHeight,
maximumHeight: maxHeight,
- }),
+ })
);
const features = [];
const getFeature = mockTileset.getFeature;
@@ -266,7 +267,7 @@ describe(
.then(function () {
scene.camera.lookAt(
Cartesian3.fromDegrees(0.0, 0.0, 10.0),
- new Cartesian3(0.0, 0.0, 50.0),
+ new Cartesian3(0.0, 0.0, 50.0)
);
points.createFeatures(mockTileset, features);
@@ -304,7 +305,7 @@ describe(
rectangle,
minHeight,
maxHeight,
- cartoPositions,
+ cartoPositions
);
const mockTilesetClone = clone(mockTileset);
@@ -324,7 +325,7 @@ describe(
rectangle: rectangle,
minimumHeight: minHeight,
maximumHeight: maxHeight,
- }),
+ })
);
const style = new Cesium3DTileStyle({
@@ -368,41 +369,41 @@ describe(
expect(feature.pointSize).toEqual(10.0);
expect(feature.color).toEqual(new Color(1.0, 1.0, 0.0, 0.5));
expect(feature.pointOutlineColor).toEqual(
- new Color(1.0, 1.0, 0.0, 1.0),
+ new Color(1.0, 1.0, 0.0, 1.0)
);
expect(feature.pointOutlineWidth).toEqual(11.0 * i);
expect(feature.labelColor).toEqual(new Color(1.0, 1.0, 0.0, 1.0));
expect(feature.labelOutlineColor).toEqual(
- new Color(1.0, 1.0, 0.0, 0.5),
+ new Color(1.0, 1.0, 0.0, 0.5)
);
expect(feature.labelOutlineWidth).toEqual(1.0);
expect(feature.font).toEqual("30px sans-serif");
expect(feature.labelStyle).toEqual(LabelStyle.FILL_AND_OUTLINE);
expect(feature.labelText).toEqual("test");
expect(feature.backgroundColor).toEqual(
- new Color(1.0, 1.0, 0.0, 0.2),
+ new Color(1.0, 1.0, 0.0, 0.2)
);
expect(feature.backgroundPadding).toEqual(new Cartesian2(10, 11));
expect(feature.backgroundEnabled).toEqual(true);
expect(feature.scaleByDistance).toEqual(
- new NearFarScalar(1.0e4, 1.0, 1.0e6, 0.0),
+ new NearFarScalar(1.0e4, 1.0, 1.0e6, 0.0)
);
expect(feature.translucencyByDistance).toEqual(
- new NearFarScalar(1.0e4, 1.0, 1.0e6, 0.0),
+ new NearFarScalar(1.0e4, 1.0, 1.0e6, 0.0)
);
expect(feature.distanceDisplayCondition).toEqual(
- new DistanceDisplayCondition(0.1, 1.0e6),
+ new DistanceDisplayCondition(0.1, 1.0e6)
);
expect(feature.heightOffset).toEqual(0.0);
expect(feature.anchorLineEnabled).toEqual(true);
expect(feature.anchorLineColor).toEqual(
- new Color(1.0, 1.0, 0.0, 1.0),
+ new Color(1.0, 1.0, 0.0, 1.0)
);
expect(feature.disableDepthTestDistance).toEqual(1.0e6);
expect(feature.horizontalOrigin).toEqual(HorizontalOrigin.CENTER);
expect(feature.verticalOrigin).toEqual(VerticalOrigin.CENTER);
expect(feature.labelHorizontalOrigin).toEqual(
- HorizontalOrigin.RIGHT,
+ HorizontalOrigin.RIGHT
);
expect(feature.labelVerticalOrigin).toEqual(VerticalOrigin.BOTTOM);
}
@@ -476,13 +477,13 @@ describe(
rectangle,
minHeight,
maxHeight,
- cartoPositions,
+ cartoPositions
);
const mockTilesetClone = clone(mockTileset);
const batchTable = new Cesium3DTileBatchTable(
mockTilesetClone,
- testOptions.length,
+ testOptions.length
);
mockTilesetClone.batchTable = batchTable;
@@ -501,7 +502,7 @@ describe(
rectangle: rectangle,
minimumHeight: minHeight,
maximumHeight: maxHeight,
- }),
+ })
);
const styleOptions = {};
@@ -553,7 +554,7 @@ describe(
if (defined(expectedCesium3DTileFeaturePropertyValue)) {
expect(feature[cesium3DTileFeaturePropertyName]).toBeDefined();
expect(feature[cesium3DTileFeaturePropertyName]).toEqual(
- expectedCesium3DTileFeaturePropertyValue,
+ expectedCesium3DTileFeaturePropertyValue
);
} else {
expect(feature[cesium3DTileFeaturePropertyName]).toBeUndefined();
@@ -575,7 +576,7 @@ describe(
rectangle,
minHeight,
maxHeight,
- cartoPositions,
+ cartoPositions
);
const batchTable = new Cesium3DTileBatchTable(mockTileset, 1);
@@ -589,7 +590,7 @@ describe(
rectangle: rectangle,
minimumHeight: minHeight,
maximumHeight: maxHeight,
- }),
+ })
);
const style = new Cesium3DTileStyle({
@@ -608,7 +609,7 @@ describe(
scene.camera.lookAt(
Cartesian3.fromDegrees(0.0, 0.0, 10.0),
- new Cartesian3(0.0, 0.0, 50.0),
+ new Cartesian3(0.0, 0.0, 50.0)
);
return pollToPromise(function () {
scene.renderForSpecs();
@@ -634,7 +635,7 @@ describe(
rectangle,
minHeight,
maxHeight,
- cartoPositions,
+ cartoPositions
);
const batchTable = new Cesium3DTileBatchTable(mockTileset, 5);
@@ -648,7 +649,7 @@ describe(
rectangle: rectangle,
minimumHeight: minHeight,
maximumHeight: maxHeight,
- }),
+ })
);
const style = new Cesium3DTileStyle({
verticalOrigin: VerticalOrigin.BOTTOM,
@@ -698,5 +699,5 @@ describe(
expect(points.isDestroyed()).toEqual(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Vector3DTilePolygonsSpec.js b/packages/engine/Specs/Scene/Vector3DTilePolygonsSpec.js
index 784e3f383c5e..ef14b4d4b60c 100644
--- a/packages/engine/Specs/Scene/Vector3DTilePolygonsSpec.js
+++ b/packages/engine/Specs/Scene/Vector3DTilePolygonsSpec.js
@@ -74,7 +74,7 @@ describe(
});
}
const depthColorAttribute = ColorGeometryInstanceAttribute.fromColor(
- new Color(1.0, 0.0, 0.0, 1.0),
+ new Color(1.0, 0.0, 0.0, 1.0)
);
return new Primitive({
geometryInstances: new GeometryInstance({
@@ -132,7 +132,7 @@ describe(
reusableGlobePrimitive = createPrimitive(rectangle, Pass.GLOBE);
reusableTilesetPrimitive = createPrimitive(
rectangle,
- Pass.CESIUM_3D_TILE,
+ Pass.CESIUM_3D_TILE
);
});
@@ -147,7 +147,7 @@ describe(
globePrimitive = new MockPrimitive(reusableGlobePrimitive, Pass.GLOBE);
tilesetPrimitive = new MockPrimitive(
reusableTilesetPrimitive,
- Pass.CESIUM_3D_TILE,
+ Pass.CESIUM_3D_TILE
);
});
@@ -232,7 +232,7 @@ describe(
scene.primitives.add(globePrimitive);
const center = ellipsoid.cartographicToCartesian(
- Rectangle.center(rectangle),
+ Rectangle.center(rectangle)
);
polygons = scene.primitives.add(
new Vector3DTilePolygons(
@@ -245,8 +245,8 @@ describe(
batchTable: batchTable,
batchIds: new Uint32Array([0]),
isCartographic: true,
- }),
- ),
+ })
+ )
);
return loadPolygons(polygons).then(function () {
scene.camera.setView({
@@ -283,7 +283,7 @@ describe(
scene.primitives.add(globePrimitive);
const center = ellipsoid.cartographicToCartesian(
- Rectangle.center(rectangle),
+ Rectangle.center(rectangle)
);
polygons = scene.primitives.add(
new Vector3DTilePolygons({
@@ -299,7 +299,7 @@ describe(
batchTable: batchTable,
batchIds: new Uint32Array([0, 1]),
isCartographic: true,
- }),
+ })
);
return loadPolygons(polygons).then(function () {
scene.camera.setView({
@@ -347,7 +347,7 @@ describe(
scene.primitives.add(globePrimitive);
const center = ellipsoid.cartographicToCartesian(
- Rectangle.center(rectangle),
+ Rectangle.center(rectangle)
);
polygons = scene.primitives.add(
new Vector3DTilePolygons({
@@ -363,7 +363,7 @@ describe(
batchTable: batchTable,
batchIds: new Uint32Array([0, 1]),
isCartographic: true,
- }),
+ })
);
polygons.forceRebatch = true;
return loadPolygons(polygons).then(function () {
@@ -412,7 +412,7 @@ describe(
scene.primitives.add(globePrimitive);
const center = ellipsoid.cartographicToCartesian(
- Rectangle.center(rectangle),
+ Rectangle.center(rectangle)
);
polygons = scene.primitives.add(
new Vector3DTilePolygons({
@@ -430,7 +430,7 @@ describe(
batchTable: batchTable,
batchIds: new Uint32Array([0, 1]),
isCartographic: true,
- }),
+ })
);
polygons.forceRebatch = true;
return loadPolygons(polygons).then(function () {
@@ -463,7 +463,7 @@ describe(
scene.primitives.add(tilesetPrimitive);
const center = ellipsoid.cartographicToCartesian(
- Rectangle.center(rectangle),
+ Rectangle.center(rectangle)
);
polygons = scene.primitives.add(
new Vector3DTilePolygons(
@@ -476,8 +476,8 @@ describe(
batchTable: batchTable,
batchIds: new Uint32Array([0]),
isCartographic: true,
- }),
- ),
+ })
+ )
);
return loadPolygons(polygons).then(function () {
scene.camera.setView({
@@ -510,7 +510,7 @@ describe(
scene.primitives.add(globePrimitive);
const center = ellipsoid.cartographicToCartesian(
- Rectangle.center(rectangle),
+ Rectangle.center(rectangle)
);
polygons = scene.primitives.add(
new Vector3DTilePolygons(
@@ -523,8 +523,8 @@ describe(
batchTable: batchTable,
batchIds: new Uint32Array([0]),
isCartographic: true,
- }),
- ),
+ })
+ )
);
polygons.debugWireframe = true;
return loadPolygons(polygons).then(function () {
@@ -552,7 +552,7 @@ describe(
scene.primitives.add(tilesetPrimitive);
const center = ellipsoid.cartographicToCartesian(
- Rectangle.center(rectangle),
+ Rectangle.center(rectangle)
);
polygons = scene.primitives.add(
new Vector3DTilePolygons(
@@ -565,8 +565,8 @@ describe(
batchTable: batchTable,
batchIds: new Uint32Array([0]),
isCartographic: true,
- }),
- ),
+ })
+ )
);
return loadPolygons(polygons).then(function () {
scene.camera.setView({
@@ -611,7 +611,7 @@ describe(
scene.primitives.add(globePrimitive);
const center = ellipsoid.cartographicToCartesian(
- Rectangle.center(rectangle),
+ Rectangle.center(rectangle)
);
polygons = scene.primitives.add(
new Vector3DTilePolygons(
@@ -624,8 +624,8 @@ describe(
batchTable: batchTable,
batchIds: new Uint32Array([0]),
isCartographic: true,
- }),
- ),
+ })
+ )
);
polygons.debugWireframe = true;
return loadPolygons(polygons).then(function () {
@@ -659,5 +659,5 @@ describe(
});
}
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/Vector3DTilePolylinesSpec.js b/packages/engine/Specs/Scene/Vector3DTilePolylinesSpec.js
index 7626e6cc86d2..1ca2cffad46b 100644
--- a/packages/engine/Specs/Scene/Vector3DTilePolylinesSpec.js
+++ b/packages/engine/Specs/Scene/Vector3DTilePolylinesSpec.js
@@ -72,7 +72,7 @@ describe(
rectangle,
minimumHeight,
maximumHeight,
- positions,
+ positions
) {
const length = positions.length;
const buffer = new Uint16Array(length * 3);
@@ -120,14 +120,14 @@ describe(
rectangle,
minHeight,
maxHeight,
- cartoPositions,
+ cartoPositions
);
const batchTable = new Cesium3DTileBatchTable(mockTileset, 1);
batchTable.update(mockTileset, scene.frameState);
const center = ellipsoid.cartographicToCartesian(
- Rectangle.center(rectangle),
+ Rectangle.center(rectangle)
);
polylines = scene.primitives.add(
@@ -143,12 +143,12 @@ describe(
boundingVolume: new BoundingSphere(center, 1000000.0),
batchTable: batchTable,
keepDecodedPositions: false,
- }),
+ })
);
return loadPolylines(polylines).then(function () {
scene.camera.lookAt(
Cartesian3.fromDegrees(0.5, 0.0, 1.5),
- new Cartesian3(0.0, 0.0, 1.0),
+ new Cartesian3(0.0, 0.0, 1.0)
);
expect(scene).toRender([255, 255, 255, 255]);
});
@@ -171,14 +171,14 @@ describe(
rectangle,
minHeight,
maxHeight,
- cartoPositions,
+ cartoPositions
);
const batchTable = new Cesium3DTileBatchTable(mockTileset, 1);
batchTable.update(mockTileset, scene.frameState);
const center = ellipsoid.cartographicToCartesian(
- Rectangle.center(rectangle),
+ Rectangle.center(rectangle)
);
polylines = scene.primitives.add(
@@ -194,7 +194,7 @@ describe(
boundingVolume: new BoundingSphere(center, 1000000.0),
batchTable: batchTable,
keepDecodedPositions: false,
- }),
+ })
);
return loadPolylines(polylines).then(function () {
for (let i = 0; i < cartoPositions.length; i += 2) {
@@ -222,13 +222,13 @@ describe(
rectangle,
minHeight,
maxHeight,
- cartoPositions,
+ cartoPositions
);
const batchTable = new Cesium3DTileBatchTable(mockTileset, 1);
const center = ellipsoid.cartographicToCartesian(
- Rectangle.center(rectangle),
+ Rectangle.center(rectangle)
);
polylines = scene.primitives.add(
@@ -244,12 +244,12 @@ describe(
boundingVolume: new BoundingSphere(center, 1000000.0),
batchTable: batchTable,
keepDecodedPositions: false,
- }),
+ })
);
return loadPolylines(polylines).then(function () {
scene.camera.lookAt(
Cartesian3.fromDegrees(0.5, 0.0, 1.5),
- new Cartesian3(0.0, 0.0, 1.0),
+ new Cartesian3(0.0, 0.0, 1.0)
);
const features = [];
@@ -277,5 +277,5 @@ describe(
expect(polylines.isDestroyed()).toEqual(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/VertexAttributeSemanticSpec.js b/packages/engine/Specs/Scene/VertexAttributeSemanticSpec.js
index 3806abc4facd..b400be14e290 100644
--- a/packages/engine/Specs/Scene/VertexAttributeSemanticSpec.js
+++ b/packages/engine/Specs/Scene/VertexAttributeSemanticSpec.js
@@ -18,7 +18,7 @@ describe("Scene/VertexAttributeSemantic", function () {
const semanticsLength = semantics.length;
for (let i = 0; i < semanticsLength; ++i) {
expect(VertexAttributeSemantic.hasSetIndex(semantics[i])).toBe(
- hasSetIndex[i],
+ hasSetIndex[i]
);
}
});
@@ -73,7 +73,7 @@ describe("Scene/VertexAttributeSemantic", function () {
const semanticsLength = gltfSemantics.length;
for (let i = 0; i < semanticsLength; ++i) {
expect(VertexAttributeSemantic.fromGltfSemantic(gltfSemantics[i])).toBe(
- expectedSemantics[i],
+ expectedSemantics[i]
);
}
});
@@ -110,7 +110,7 @@ describe("Scene/VertexAttributeSemantic", function () {
const semanticsLength = pntsSemantics.length;
for (let i = 0; i < semanticsLength; ++i) {
expect(VertexAttributeSemantic.fromPntsSemantic(pntsSemantics[i])).toBe(
- expectedSemantics[i],
+ expectedSemantics[i]
);
}
});
@@ -153,7 +153,7 @@ describe("Scene/VertexAttributeSemantic", function () {
const semanticsLength = semantics.length;
for (let i = 0; i < semanticsLength; ++i) {
expect(VertexAttributeSemantic.getGlslType(semantics[i])).toBe(
- expectedShaderTypes[i],
+ expectedShaderTypes[i]
);
}
});
@@ -196,7 +196,7 @@ describe("Scene/VertexAttributeSemantic", function () {
const semanticsLength = semantics.length;
for (let i = 0; i < semanticsLength; ++i) {
expect(VertexAttributeSemantic.getVariableName(semantics[i])).toBe(
- expectedVariableName[i],
+ expectedVariableName[i]
);
}
});
@@ -205,8 +205,8 @@ describe("Scene/VertexAttributeSemantic", function () {
expect(
VertexAttributeSemantic.getVariableName(
VertexAttributeSemantic.FEATURE_ID,
- 0,
- ),
+ 0
+ )
).toBe("featureId_0");
});
diff --git a/packages/engine/Specs/Scene/ViewportQuadSpec.js b/packages/engine/Specs/Scene/ViewportQuadSpec.js
index c4ed9d8d417c..64673c2fadbe 100644
--- a/packages/engine/Specs/Scene/ViewportQuadSpec.js
+++ b/packages/engine/Specs/Scene/ViewportQuadSpec.js
@@ -18,11 +18,11 @@ describe(
beforeAll(function () {
scene = createScene();
- return Resource.fetchImage("./Data/Images/Red16x16.png").then(
- function (image) {
- testImage = image;
- },
- );
+ return Resource.fetchImage("./Data/Images/Red16x16.png").then(function (
+ image
+ ) {
+ testImage = image;
+ });
});
afterAll(function () {
@@ -52,7 +52,7 @@ describe(
it("gets the default color", function () {
expect(viewportQuad.material.uniforms.color).toEqual(
- new Color(1.0, 1.0, 1.0, 1.0),
+ new Color(1.0, 1.0, 1.0, 1.0)
);
});
@@ -110,7 +110,7 @@ describe(
viewportQuad.rectangle = otherRectangle;
scene.renderForSpecs();
expect(scene.frameState.commandList[0].renderState.viewport).toEqual(
- otherRectangle,
+ otherRectangle
);
});
@@ -123,5 +123,5 @@ describe(
expect(vq.isDestroyed()).toEqual(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/VoxelBoxShapeSpec.js b/packages/engine/Specs/Scene/VoxelBoxShapeSpec.js
index fb52f06ddd46..339aa5ffefef 100644
--- a/packages/engine/Specs/Scene/VoxelBoxShapeSpec.js
+++ b/packages/engine/Specs/Scene/VoxelBoxShapeSpec.js
@@ -32,7 +32,7 @@ describe("Scene/VoxelBoxShape", function () {
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
const minBounds = VoxelBoxShape.DefaultMinBounds;
const maxBounds = VoxelBoxShape.DefaultMaxBounds;
@@ -49,22 +49,22 @@ describe("Scene/VoxelBoxShape", function () {
0.0,
0.0,
scale.z,
- ]),
+ ])
);
const expectedBoundingSphere = new BoundingSphere(
translation,
- Cartesian3.magnitude(scale),
+ Cartesian3.magnitude(scale)
);
const visible = shape.update(modelMatrix, minBounds, maxBounds);
expect(shape.orientedBoundingBox.center).toEqual(
- expectedOrientedBoundingBox.center,
+ expectedOrientedBoundingBox.center
);
expect(shape.orientedBoundingBox.halfAxes).toEqualEpsilon(
expectedOrientedBoundingBox.halfAxes,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(shape.boundingSphere).toEqual(expectedBoundingSphere);
expect(shape.boundTransform).toEqual(modelMatrix);
@@ -81,7 +81,7 @@ describe("Scene/VoxelBoxShape", function () {
translation,
rotation,
scale,
- new Matrix4(),
+ new Matrix4()
);
const minBounds = new Cartesian3(-0.75, -0.75, -0.75);
const maxBounds = new Cartesian3(-0.25, -0.25, -0.25);
@@ -90,7 +90,7 @@ describe("Scene/VoxelBoxShape", function () {
minBounds,
maxBounds,
minBounds,
- maxBounds,
+ maxBounds
);
const expectedTranslation = new Cartesian3(0.0, 0.5, 1);
@@ -100,15 +100,15 @@ describe("Scene/VoxelBoxShape", function () {
expectedTranslation,
expectedRotation,
expectedScale,
- new Matrix4(),
+ new Matrix4()
);
const expectedOrientedBoundingBox = new OrientedBoundingBox(
expectedTranslation,
- Matrix3.fromScale(expectedScale),
+ Matrix3.fromScale(expectedScale)
);
const expectedBoundingSphere = new BoundingSphere(
expectedTranslation,
- Cartesian3.magnitude(expectedScale),
+ Cartesian3.magnitude(expectedScale)
);
expect(shape.orientedBoundingBox).toEqual(expectedOrientedBoundingBox);
@@ -135,7 +135,7 @@ describe("Scene/VoxelBoxShape", function () {
modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
visible = shape.update(modelMatrix, minBounds, maxBounds);
expect(visible).toBeTrue();
@@ -145,7 +145,7 @@ describe("Scene/VoxelBoxShape", function () {
modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
visible = shape.update(modelMatrix, minBounds, maxBounds);
expect(visible).toBeTrue();
@@ -155,7 +155,7 @@ describe("Scene/VoxelBoxShape", function () {
modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
visible = shape.update(modelMatrix, minBounds, maxBounds);
expect(visible).toBeTrue();
@@ -177,7 +177,7 @@ describe("Scene/VoxelBoxShape", function () {
modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
visible = shape.update(modelMatrix, minBounds, maxBounds);
expect(visible).toBeFalse();
@@ -187,7 +187,7 @@ describe("Scene/VoxelBoxShape", function () {
modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
visible = shape.update(modelMatrix, minBounds, maxBounds);
expect(visible).toBeFalse();
@@ -197,7 +197,7 @@ describe("Scene/VoxelBoxShape", function () {
modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
visible = shape.update(modelMatrix, minBounds, maxBounds);
expect(visible).toBeFalse();
@@ -207,7 +207,7 @@ describe("Scene/VoxelBoxShape", function () {
modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
visible = shape.update(modelMatrix, minBounds, maxBounds);
expect(visible).toBeFalse();
@@ -221,7 +221,7 @@ describe("Scene/VoxelBoxShape", function () {
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
let minBounds;
@@ -244,12 +244,12 @@ describe("Scene/VoxelBoxShape", function () {
minBounds,
maxBounds,
clipMinBounds,
- clipMaxBounds,
+ clipMaxBounds
);
actualScale = Matrix4.getScale(shape.boundTransform, new Cartesian3());
actualTranslation = Matrix4.getTranslation(
shape.shapeTransform,
- new Cartesian3(),
+ new Cartesian3()
);
expect(visible).toBeTrue();
expect(actualScale).toEqual(expectedScale);
@@ -265,12 +265,12 @@ describe("Scene/VoxelBoxShape", function () {
minBounds,
maxBounds,
clipMinBounds,
- clipMaxBounds,
+ clipMaxBounds
);
actualScale = Matrix4.getScale(shape.boundTransform, new Cartesian3());
actualTranslation = Matrix4.getTranslation(
shape.shapeTransform,
- new Cartesian3(),
+ new Cartesian3()
);
expect(visible).toBeTrue();
expect(actualScale).toEqual(expectedScale);
@@ -286,12 +286,12 @@ describe("Scene/VoxelBoxShape", function () {
minBounds,
maxBounds,
clipMinBounds,
- clipMaxBounds,
+ clipMaxBounds
);
actualScale = Matrix4.getScale(shape.boundTransform, new Cartesian3());
actualTranslation = Matrix4.getTranslation(
shape.shapeTransform,
- new Cartesian3(),
+ new Cartesian3()
);
expect(visible).toBeTrue();
expect(actualScale).toEqual(expectedScale);
@@ -306,7 +306,7 @@ describe("Scene/VoxelBoxShape", function () {
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
let minBounds;
@@ -327,7 +327,7 @@ describe("Scene/VoxelBoxShape", function () {
minBounds,
maxBounds,
minBounds,
- maxBounds,
+ maxBounds
);
expect(visible).toBeFalse();
@@ -352,7 +352,7 @@ describe("Scene/VoxelBoxShape", function () {
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
let visible;
@@ -370,7 +370,7 @@ describe("Scene/VoxelBoxShape", function () {
minBounds,
maxBounds,
clipMinBounds,
- clipMaxBounds,
+ clipMaxBounds
);
expect(visible).toBeFalse();
@@ -382,7 +382,7 @@ describe("Scene/VoxelBoxShape", function () {
minBounds,
maxBounds,
clipMinBounds,
- clipMaxBounds,
+ clipMaxBounds
);
expect(visible).toBeFalse();
@@ -394,7 +394,7 @@ describe("Scene/VoxelBoxShape", function () {
minBounds,
maxBounds,
clipMinBounds,
- clipMaxBounds,
+ clipMaxBounds
);
expect(visible).toBeFalse();
});
@@ -417,7 +417,7 @@ describe("Scene/VoxelBoxShape", function () {
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
const maxBounds = VoxelBoxShape.DefaultMaxBounds;
@@ -434,7 +434,7 @@ describe("Scene/VoxelBoxShape", function () {
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
const minBounds = VoxelBoxShape.DefaultMinBounds;
@@ -451,7 +451,7 @@ describe("Scene/VoxelBoxShape", function () {
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
const minBounds = VoxelBoxShape.DefaultMinBounds;
const maxBounds = VoxelBoxShape.DefaultMaxBounds;
@@ -466,7 +466,7 @@ describe("Scene/VoxelBoxShape", function () {
tileX,
tileY,
tileZ,
- new OrientedBoundingBox(),
+ new OrientedBoundingBox()
);
const expectedOrientedBoundingBox = shape.orientedBoundingBox;
@@ -481,7 +481,7 @@ describe("Scene/VoxelBoxShape", function () {
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
const minBounds = VoxelBoxShape.DefaultMinBounds;
const maxBounds = VoxelBoxShape.DefaultMaxBounds;
@@ -506,14 +506,14 @@ describe("Scene/VoxelBoxShape", function () {
tileX,
tileY,
tileZ,
- new OrientedBoundingBox(),
+ new OrientedBoundingBox()
);
expectedTranslation = new Cartesian3(-0.5, -0.5, -0.5);
expect(orientedBoundingBox).toEqual(
new OrientedBoundingBox(
expectedTranslation,
- Matrix3.fromScale(expectedScale, new Matrix3()),
- ),
+ Matrix3.fromScale(expectedScale, new Matrix3())
+ )
);
// Child (1, 0, 0)
@@ -525,14 +525,14 @@ describe("Scene/VoxelBoxShape", function () {
tileX,
tileY,
tileZ,
- new OrientedBoundingBox(),
+ new OrientedBoundingBox()
);
expectedTranslation = new Cartesian3(+0.5, -0.5, -0.5);
expect(orientedBoundingBox).toEqual(
new OrientedBoundingBox(
expectedTranslation,
- Matrix3.fromScale(expectedScale, new Matrix3()),
- ),
+ Matrix3.fromScale(expectedScale, new Matrix3())
+ )
);
// Child (0, 1, 0)
@@ -544,14 +544,14 @@ describe("Scene/VoxelBoxShape", function () {
tileX,
tileY,
tileZ,
- new OrientedBoundingBox(),
+ new OrientedBoundingBox()
);
expectedTranslation = new Cartesian3(-0.5, +0.5, -0.5);
expect(orientedBoundingBox).toEqual(
new OrientedBoundingBox(
expectedTranslation,
- Matrix3.fromScale(expectedScale, new Matrix3()),
- ),
+ Matrix3.fromScale(expectedScale, new Matrix3())
+ )
);
// Child (0, 0, 1)
@@ -563,14 +563,14 @@ describe("Scene/VoxelBoxShape", function () {
tileX,
tileY,
tileZ,
- new OrientedBoundingBox(),
+ new OrientedBoundingBox()
);
expectedTranslation = new Cartesian3(-0.5, -0.5, +0.5);
expect(orientedBoundingBox).toEqual(
new OrientedBoundingBox(
expectedTranslation,
- Matrix3.fromScale(expectedScale, new Matrix3()),
- ),
+ Matrix3.fromScale(expectedScale, new Matrix3())
+ )
);
// Child (1, 1, 0)
@@ -582,14 +582,14 @@ describe("Scene/VoxelBoxShape", function () {
tileX,
tileY,
tileZ,
- new OrientedBoundingBox(),
+ new OrientedBoundingBox()
);
expectedTranslation = new Cartesian3(+0.5, +0.5, -0.5);
expect(orientedBoundingBox).toEqual(
new OrientedBoundingBox(
expectedTranslation,
- Matrix3.fromScale(expectedScale, new Matrix3()),
- ),
+ Matrix3.fromScale(expectedScale, new Matrix3())
+ )
);
// Child (1, 0, 1)
@@ -601,14 +601,14 @@ describe("Scene/VoxelBoxShape", function () {
tileX,
tileY,
tileZ,
- new OrientedBoundingBox(),
+ new OrientedBoundingBox()
);
expectedTranslation = new Cartesian3(+0.5, -0.5, +0.5);
expect(orientedBoundingBox).toEqual(
new OrientedBoundingBox(
expectedTranslation,
- Matrix3.fromScale(expectedScale, new Matrix3()),
- ),
+ Matrix3.fromScale(expectedScale, new Matrix3())
+ )
);
// Child (1, 1, 1)
@@ -620,14 +620,14 @@ describe("Scene/VoxelBoxShape", function () {
tileX,
tileY,
tileZ,
- new OrientedBoundingBox(),
+ new OrientedBoundingBox()
);
expectedTranslation = new Cartesian3(+0.5, +0.5, +0.5);
expect(orientedBoundingBox).toEqual(
new OrientedBoundingBox(
expectedTranslation,
- Matrix3.fromScale(expectedScale, new Matrix3()),
- ),
+ Matrix3.fromScale(expectedScale, new Matrix3())
+ )
);
});
@@ -639,7 +639,7 @@ describe("Scene/VoxelBoxShape", function () {
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
const minBounds = VoxelBoxShape.DefaultMinBounds;
const maxBounds = VoxelBoxShape.DefaultMaxBounds;
@@ -656,7 +656,7 @@ describe("Scene/VoxelBoxShape", function () {
tileX,
tileY,
tileZ,
- new OrientedBoundingBox(),
+ new OrientedBoundingBox()
);
}).toThrowDeveloperError();
@@ -666,7 +666,7 @@ describe("Scene/VoxelBoxShape", function () {
undefined,
tileY,
tileZ,
- new OrientedBoundingBox(),
+ new OrientedBoundingBox()
);
}).toThrowDeveloperError();
@@ -676,7 +676,7 @@ describe("Scene/VoxelBoxShape", function () {
tileX,
undefined,
tileZ,
- new OrientedBoundingBox(),
+ new OrientedBoundingBox()
);
}).toThrowDeveloperError();
@@ -686,7 +686,7 @@ describe("Scene/VoxelBoxShape", function () {
tileX,
tileY,
undefined,
- new OrientedBoundingBox(),
+ new OrientedBoundingBox()
);
}).toThrowDeveloperError();
});
@@ -699,7 +699,7 @@ describe("Scene/VoxelBoxShape", function () {
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
const minBounds = VoxelBoxShape.DefaultMinBounds;
const maxBounds = VoxelBoxShape.DefaultMaxBounds;
@@ -716,7 +716,7 @@ describe("Scene/VoxelBoxShape", function () {
tileX,
tileY,
tileZ,
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
@@ -729,7 +729,7 @@ describe("Scene/VoxelBoxShape", function () {
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
const minBounds = VoxelBoxShape.DefaultMinBounds;
const maxBounds = VoxelBoxShape.DefaultMaxBounds;
@@ -748,7 +748,7 @@ describe("Scene/VoxelBoxShape", function () {
tileZ,
undefined,
shape,
- paddedDimensions,
+ paddedDimensions
);
const tileUv = new Cartesian3(0.5, 0.5, 0.5);
@@ -756,12 +756,12 @@ describe("Scene/VoxelBoxShape", function () {
spatialNode,
tileDimensions,
tileUv,
- new OrientedBoundingBox(),
+ new OrientedBoundingBox()
);
const expectedCenter = new Cartesian3(0.125, 0.125, 0.125);
expect(sampleBoundingBox.center).toEqual(expectedCenter);
expect(sampleBoundingBox.halfAxes).toEqual(
- Matrix3.fromScale(new Cartesian3(0.125, 0.125, 0.125)),
+ Matrix3.fromScale(new Cartesian3(0.125, 0.125, 0.125))
);
});
@@ -773,7 +773,7 @@ describe("Scene/VoxelBoxShape", function () {
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
const minBounds = VoxelBoxShape.DefaultMinBounds;
const maxBounds = VoxelBoxShape.DefaultMaxBounds;
@@ -792,7 +792,7 @@ describe("Scene/VoxelBoxShape", function () {
tileZ,
undefined,
shape,
- paddedDimensions,
+ paddedDimensions
);
const tileUv = new Cartesian3(0.5, 0.5, 0.5);
@@ -801,7 +801,7 @@ describe("Scene/VoxelBoxShape", function () {
undefined,
tileDimensions,
tileUv,
- new OrientedBoundingBox(),
+ new OrientedBoundingBox()
);
}).toThrowDeveloperError();
expect(function () {
@@ -809,7 +809,7 @@ describe("Scene/VoxelBoxShape", function () {
spatialNode,
undefined,
tileUv,
- new OrientedBoundingBox(),
+ new OrientedBoundingBox()
);
}).toThrowDeveloperError();
expect(function () {
@@ -817,7 +817,7 @@ describe("Scene/VoxelBoxShape", function () {
spatialNode,
tileDimensions,
undefined,
- new OrientedBoundingBox(),
+ new OrientedBoundingBox()
);
}).toThrowDeveloperError();
expect(function () {
@@ -825,7 +825,7 @@ describe("Scene/VoxelBoxShape", function () {
spatialNode,
tileDimensions,
tileUv,
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
diff --git a/packages/engine/Specs/Scene/VoxelCellSpec.js b/packages/engine/Specs/Scene/VoxelCellSpec.js
index a18af60b5e2f..7ffeffb0e214 100644
--- a/packages/engine/Specs/Scene/VoxelCellSpec.js
+++ b/packages/engine/Specs/Scene/VoxelCellSpec.js
@@ -51,7 +51,7 @@ describe("Scene/VoxelCell", function () {
voxelPrimitive,
tileIndex,
sampleIndex,
- keyframeNode,
+ keyframeNode
);
expect(voxelCell instanceof VoxelCell).toBe(true);
expect(voxelCell.primitive).toBe(voxelPrimitive);
@@ -68,7 +68,7 @@ describe("Scene/VoxelCell", function () {
undefined,
tileIndex,
sampleIndex,
- keyframeNode,
+ keyframeNode
);
}).toThrowDeveloperError();
expect(function () {
@@ -76,7 +76,7 @@ describe("Scene/VoxelCell", function () {
voxelPrimitive,
tileIndex,
undefined,
- keyframeNode,
+ keyframeNode
);
}).toThrowDeveloperError();
expect(function () {
@@ -84,7 +84,7 @@ describe("Scene/VoxelCell", function () {
undefined,
tileIndex,
sampleIndex,
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
@@ -97,7 +97,7 @@ describe("Scene/VoxelCell", function () {
voxelPrimitive,
tileIndex,
sampleIndex,
- keyframeNode,
+ keyframeNode
);
expect(voxelCell.getNames()).toEqual(["a"]);
expect(voxelCell.hasProperty("a")).toBe(true);
@@ -112,19 +112,19 @@ describe("Scene/VoxelCell", function () {
voxelPrimitive,
tileIndex,
sampleIndex,
- keyframeNode,
+ keyframeNode
);
const orientedBoundingBox = voxelCell.orientedBoundingBox;
expect(orientedBoundingBox instanceof OrientedBoundingBox).toBe(true);
const expectedCenter = new Cartesian3(0.5, 0.5, 0.5);
expect(orientedBoundingBox.center).toEqualEpsilon(
expectedCenter,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
const expectedHalfAxes = new Matrix3.fromUniformScale(0.5);
expect(orientedBoundingBox.halfAxes).toEqualEpsilon(
expectedHalfAxes,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
});
});
diff --git a/packages/engine/Specs/Scene/VoxelCylinderShapeSpec.js b/packages/engine/Specs/Scene/VoxelCylinderShapeSpec.js
index 224fbc926397..943eb8d6b0cc 100644
--- a/packages/engine/Specs/Scene/VoxelCylinderShapeSpec.js
+++ b/packages/engine/Specs/Scene/VoxelCylinderShapeSpec.js
@@ -31,7 +31,7 @@ describe("Scene/VoxelCylinderShape", function () {
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
const minBounds = VoxelCylinderShape.DefaultMinBounds;
const maxBounds = VoxelCylinderShape.DefaultMaxBounds;
@@ -50,19 +50,19 @@ describe("Scene/VoxelCylinderShape", function () {
0.0,
0.0,
scale.z,
- ]),
+ ])
);
const expectedBoundingSphere = new BoundingSphere(
translation,
- Cartesian3.magnitude(scale),
+ Cartesian3.magnitude(scale)
);
expect(shape.orientedBoundingBox.center).toEqual(
- expectedOrientedBoundingBox.center,
+ expectedOrientedBoundingBox.center
);
expect(shape.orientedBoundingBox.halfAxes).toEqualEpsilon(
expectedOrientedBoundingBox.halfAxes,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(shape.boundingSphere).toEqual(expectedBoundingSphere);
expect(shape.boundTransform).toEqual(modelMatrix);
@@ -79,7 +79,7 @@ describe("Scene/VoxelCylinderShape", function () {
translation,
rotation,
scale,
- new Matrix4(),
+ new Matrix4()
);
// Half revolution
@@ -104,50 +104,50 @@ describe("Scene/VoxelCylinderShape", function () {
const expectedScale = new Cartesian3(
0.5 * (expectedMaxY - expectedMinY),
0.5 * (expectedMaxX - expectedMinX),
- 0.5 * (expectedMaxZ - expectedMinZ),
+ 0.5 * (expectedMaxZ - expectedMinZ)
);
const expectedTranslation = new Cartesian3(
0.5 * (expectedMaxX + expectedMinX),
0.5 * (expectedMaxY + expectedMinY),
- 0.5 * (expectedMaxZ + expectedMinZ),
+ 0.5 * (expectedMaxZ + expectedMinZ)
);
const expectedRotation = Matrix3.fromRotationZ(-CesiumMath.PI_OVER_TWO);
const expectedHalfAxes = Matrix3.multiplyByScale(
expectedRotation,
expectedScale,
- new Matrix3(),
+ new Matrix3()
);
const expectedOrientedBoundingBox = new OrientedBoundingBox(
expectedTranslation,
- expectedHalfAxes,
+ expectedHalfAxes
);
const expectedBoundingSphere = new BoundingSphere(
expectedTranslation,
- Cartesian3.magnitude(expectedScale),
+ Cartesian3.magnitude(expectedScale)
);
const expectedBoundTransform = Matrix4.setTranslation(
Matrix4.fromRotation(expectedHalfAxes),
expectedTranslation,
- new Matrix4(),
+ new Matrix4()
);
expect(shape.orientedBoundingBox.center).toEqualEpsilon(
expectedOrientedBoundingBox.center,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(shape.orientedBoundingBox.halfAxes).toEqualEpsilon(
expectedOrientedBoundingBox.halfAxes,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(shape.boundingSphere).toEqualEpsilon(
expectedBoundingSphere,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(shape.boundTransform).toEqualEpsilon(
expectedBoundTransform,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(shape.shapeTransform).toEqual(modelMatrix);
expect(visible).toBeTrue();
@@ -162,7 +162,7 @@ describe("Scene/VoxelCylinderShape", function () {
translation,
rotation,
scale,
- new Matrix4(),
+ new Matrix4()
);
// Half revolution around 180th meridian
@@ -173,12 +173,12 @@ describe("Scene/VoxelCylinderShape", function () {
const minBounds = new Cartesian3(
defaultMinBounds.x,
defaultMinBounds.y,
- minAngle,
+ minAngle
);
const maxBounds = new Cartesian3(
defaultMaxBounds.x,
defaultMaxBounds.y,
- maxAngle,
+ maxAngle
);
const visible = shape.update(modelMatrix, minBounds, maxBounds);
@@ -188,38 +188,38 @@ describe("Scene/VoxelCylinderShape", function () {
const expectedHalfAxes = Matrix3.multiplyByScale(
expectedRotation,
expectedScale,
- new Matrix3(),
+ new Matrix3()
);
const expectedOrientedBoundingBox = new OrientedBoundingBox(
expectedTranslation,
- expectedHalfAxes,
+ expectedHalfAxes
);
const expectedBoundingSphere = new BoundingSphere(
expectedTranslation,
- Cartesian3.magnitude(expectedScale),
+ Cartesian3.magnitude(expectedScale)
);
const expectedBoundTransform = Matrix4.setTranslation(
Matrix4.fromRotation(expectedHalfAxes),
expectedTranslation,
- new Matrix4(),
+ new Matrix4()
);
expect(shape.orientedBoundingBox.center).toEqualEpsilon(
expectedOrientedBoundingBox.center,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(shape.orientedBoundingBox.halfAxes).toEqualEpsilon(
expectedOrientedBoundingBox.halfAxes,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(shape.boundingSphere).toEqualEpsilon(
expectedBoundingSphere,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(shape.boundTransform).toEqualEpsilon(
expectedBoundTransform,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
expect(shape.shapeTransform).toEqual(modelMatrix);
expect(visible).toBeTrue();
@@ -235,7 +235,7 @@ describe("Scene/VoxelCylinderShape", function () {
translation,
rotation,
scale,
- new Matrix4(),
+ new Matrix4()
);
// Half revolution
@@ -254,7 +254,7 @@ describe("Scene/VoxelCylinderShape", function () {
expect(result.center.z).toEqual(3.0);
expect(result.halfAxes).toEqualEpsilon(
new Matrix3(0, 1.5, 0, -1.125, 0, 0, 0, 0, 2),
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -266,7 +266,7 @@ describe("Scene/VoxelCylinderShape", function () {
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
const minBounds = VoxelCylinderShape.DefaultMinBounds;
const maxBounds = VoxelCylinderShape.DefaultMaxBounds;
@@ -298,7 +298,7 @@ describe("Scene/VoxelCylinderShape", function () {
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
const minBounds = VoxelCylinderShape.DefaultMinBounds;
const maxBounds = VoxelCylinderShape.DefaultMaxBounds;
@@ -317,7 +317,7 @@ describe("Scene/VoxelCylinderShape", function () {
tileZ,
undefined,
shape,
- paddedDimensions,
+ paddedDimensions
);
const tileUv = new Cartesian3(0.5, 0.5, 0.5);
@@ -325,18 +325,18 @@ describe("Scene/VoxelCylinderShape", function () {
spatialNode,
tileDimensions,
tileUv,
- new OrientedBoundingBox(),
+ new OrientedBoundingBox()
);
const centerAngle = Math.PI / 8.0;
const centerRadius = 0.5434699;
const expectedCenter = new Cartesian3(
centerRadius * Math.cos(centerAngle),
centerRadius * Math.sin(centerAngle),
- 0.125,
+ 0.125
);
expect(sampleBoundingBox.center).toEqualEpsilon(
expectedCenter,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
const expectedHalfAxes = new Matrix3(
0.075324,
@@ -347,11 +347,11 @@ describe("Scene/VoxelCylinderShape", function () {
0.0,
0.0,
0.0,
- 0.125,
+ 0.125
);
expect(sampleBoundingBox.halfAxes).toEqualEpsilon(
expectedHalfAxes,
- CesiumMath.EPSILON6,
+ CesiumMath.EPSILON6
);
});
@@ -363,7 +363,7 @@ describe("Scene/VoxelCylinderShape", function () {
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
const minBounds = VoxelCylinderShape.DefaultMinBounds;
const maxBounds = VoxelCylinderShape.DefaultMaxBounds;
@@ -382,7 +382,7 @@ describe("Scene/VoxelCylinderShape", function () {
tileZ,
undefined,
shape,
- paddedDimensions,
+ paddedDimensions
);
const tileUv = new Cartesian3(0.5, 0.5, 0.5);
@@ -391,7 +391,7 @@ describe("Scene/VoxelCylinderShape", function () {
undefined,
tileDimensions,
tileUv,
- new OrientedBoundingBox(),
+ new OrientedBoundingBox()
);
}).toThrowDeveloperError();
expect(function () {
@@ -399,7 +399,7 @@ describe("Scene/VoxelCylinderShape", function () {
spatialNode,
undefined,
tileUv,
- new OrientedBoundingBox(),
+ new OrientedBoundingBox()
);
}).toThrowDeveloperError();
expect(function () {
@@ -407,7 +407,7 @@ describe("Scene/VoxelCylinderShape", function () {
spatialNode,
tileDimensions,
undefined,
- new OrientedBoundingBox(),
+ new OrientedBoundingBox()
);
}).toThrowDeveloperError();
expect(function () {
@@ -415,7 +415,7 @@ describe("Scene/VoxelCylinderShape", function () {
spatialNode,
tileDimensions,
tileUv,
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
diff --git a/packages/engine/Specs/Scene/VoxelEllipsoidShapeSpec.js b/packages/engine/Specs/Scene/VoxelEllipsoidShapeSpec.js
index bfd80ac66e58..22aeedcd5b54 100644
--- a/packages/engine/Specs/Scene/VoxelEllipsoidShapeSpec.js
+++ b/packages/engine/Specs/Scene/VoxelEllipsoidShapeSpec.js
@@ -31,18 +31,18 @@ describe("Scene/VoxelEllipsoidShape", function () {
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
const minBounds = new Cartesian3(
-CesiumMath.PI,
-CesiumMath.PI_OVER_TWO,
- 0.0,
+ 0.0
);
const maxBounds = new Cartesian3(
+CesiumMath.PI,
+CesiumMath.PI_OVER_TWO,
- 100000,
+ 100000
);
const maxHeight = maxBounds.z;
@@ -58,35 +58,35 @@ describe("Scene/VoxelEllipsoidShape", function () {
(scale.x + maxHeight) * Math.sin(angle),
(scale.y + maxHeight) * Math.cos(angle),
0.0,
- ]),
+ ])
);
const expectedBoundingSphere = BoundingSphere.fromOrientedBoundingBox(
expectedOrientedBoundingBox,
- new BoundingSphere(),
+ new BoundingSphere()
);
const visible = shape.update(modelMatrix, minBounds, maxBounds);
expect(shape.orientedBoundingBox.center).toEqual(
- expectedOrientedBoundingBox.center,
+ expectedOrientedBoundingBox.center
);
expect(shape.orientedBoundingBox.halfAxes).toEqualEpsilon(
expectedOrientedBoundingBox.halfAxes,
- CesiumMath.EPSILON9,
+ CesiumMath.EPSILON9
);
expect(shape.boundingSphere).toEqual(expectedBoundingSphere);
expect(
- Matrix4.getTranslation(shape.boundTransform, new Cartesian3()),
+ Matrix4.getTranslation(shape.boundTransform, new Cartesian3())
).toEqualEpsilon(expectedOrientedBoundingBox.center, CesiumMath.EPSILON12);
expect(
- Matrix4.getMatrix3(shape.boundTransform, new Matrix3()),
+ Matrix4.getMatrix3(shape.boundTransform, new Matrix3())
).toEqualEpsilon(expectedOrientedBoundingBox.halfAxes, CesiumMath.EPSILON9);
expect(
- Matrix4.getTranslation(shape.shapeTransform, new Cartesian3()),
+ Matrix4.getTranslation(shape.shapeTransform, new Cartesian3())
).toEqualEpsilon(expectedOrientedBoundingBox.center, CesiumMath.EPSILON12);
const expectedShapeTransform = Matrix4.fromRowMajorArray([
@@ -109,7 +109,7 @@ describe("Scene/VoxelEllipsoidShape", function () {
]);
expect(shape.shapeTransform).toEqualEpsilon(
expectedShapeTransform,
- CesiumMath.EPSILON9,
+ CesiumMath.EPSILON9
);
expect(visible).toBeTrue();
});
@@ -122,18 +122,18 @@ describe("Scene/VoxelEllipsoidShape", function () {
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
const minBounds = new Cartesian3(
-CesiumMath.PI,
-CesiumMath.PI_OVER_TWO,
- -0.5,
+ -0.5
);
const maxBounds = new Cartesian3(
CesiumMath.PI,
CesiumMath.PI_OVER_TWO,
- 0.0,
+ 0.0
);
shape.update(modelMatrix, minBounds, maxBounds);
let result = new OrientedBoundingBox();
@@ -143,7 +143,7 @@ describe("Scene/VoxelEllipsoidShape", function () {
const expectedHalfAxes = new Matrix3(0, 0, 1, 1, 0, 0, 0, 1, 0);
expect(result.halfAxes).toEqualEpsilon(
expectedHalfAxes,
- CesiumMath.EPSILON12,
+ CesiumMath.EPSILON12
);
});
@@ -155,7 +155,7 @@ describe("Scene/VoxelEllipsoidShape", function () {
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
const minBounds = VoxelEllipsoidShape.DefaultMinBounds;
const maxBounds = VoxelEllipsoidShape.DefaultMaxBounds;
@@ -187,17 +187,17 @@ describe("Scene/VoxelEllipsoidShape", function () {
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
const minBounds = new Cartesian3(
-CesiumMath.PI,
-CesiumMath.PI_OVER_TWO,
- -1.0,
+ -1.0
);
const maxBounds = new Cartesian3(
CesiumMath.PI,
CesiumMath.PI_OVER_TWO,
- 0.0,
+ 0.0
);
shape.update(modelMatrix, minBounds, maxBounds);
@@ -214,7 +214,7 @@ describe("Scene/VoxelEllipsoidShape", function () {
tileZ,
undefined,
shape,
- paddedDimensions,
+ paddedDimensions
);
const tileUv = new Cartesian3(0.5, 0.5, 0.5);
@@ -222,7 +222,7 @@ describe("Scene/VoxelEllipsoidShape", function () {
spatialNode,
tileDimensions,
tileUv,
- new OrientedBoundingBox(),
+ new OrientedBoundingBox()
);
const centerLongitude = Math.PI / 16.0;
@@ -231,11 +231,11 @@ describe("Scene/VoxelEllipsoidShape", function () {
const expectedCenter = new Cartesian3(
centerRadius * Math.cos(centerLongitude) * Math.cos(centerLatitude),
centerRadius * Math.sin(centerLongitude) * Math.cos(centerLatitude),
- centerRadius * Math.sin(centerLatitude),
+ centerRadius * Math.sin(centerLatitude)
);
expect(sampleBoundingBox.center).toEqualEpsilon(
expectedCenter,
- CesiumMath.EPSILON2,
+ CesiumMath.EPSILON2
);
});
@@ -247,17 +247,17 @@ describe("Scene/VoxelEllipsoidShape", function () {
const modelMatrix = Matrix4.fromTranslationQuaternionRotationScale(
translation,
rotation,
- scale,
+ scale
);
const minBounds = new Cartesian3(
-CesiumMath.PI,
-CesiumMath.PI_OVER_TWO,
- -1.0,
+ -1.0
);
const maxBounds = new Cartesian3(
CesiumMath.PI,
CesiumMath.PI_OVER_TWO,
- 0.0,
+ 0.0
);
shape.update(modelMatrix, minBounds, maxBounds);
@@ -274,7 +274,7 @@ describe("Scene/VoxelEllipsoidShape", function () {
tileZ,
undefined,
shape,
- paddedDimensions,
+ paddedDimensions
);
const tileUv = new Cartesian3(0.5, 0.5, 0.5);
@@ -284,7 +284,7 @@ describe("Scene/VoxelEllipsoidShape", function () {
undefined,
tileDimensions,
tileUv,
- result,
+ result
);
}).toThrowDeveloperError();
expect(function () {
@@ -292,7 +292,7 @@ describe("Scene/VoxelEllipsoidShape", function () {
spatialNode,
undefined,
tileUv,
- result,
+ result
);
}).toThrowDeveloperError();
expect(function () {
@@ -300,7 +300,7 @@ describe("Scene/VoxelEllipsoidShape", function () {
spatialNode,
tileDimensions,
undefined,
- result,
+ result
);
}).toThrowDeveloperError();
expect(function () {
@@ -308,7 +308,7 @@ describe("Scene/VoxelEllipsoidShape", function () {
spatialNode,
tileDimensions,
tileUv,
- undefined,
+ undefined
);
}).toThrowDeveloperError();
});
diff --git a/packages/engine/Specs/Scene/VoxelPrimitiveSpec.js b/packages/engine/Specs/Scene/VoxelPrimitiveSpec.js
index 3c55516d198b..d41713eca959 100644
--- a/packages/engine/Specs/Scene/VoxelPrimitiveSpec.js
+++ b/packages/engine/Specs/Scene/VoxelPrimitiveSpec.js
@@ -22,7 +22,7 @@ describe(
camera.direction = Cartesian3.fromElements(1, 1, 1);
provider = await Cesium3DTilesVoxelProvider.fromUrl(
- "./Data/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/tileset.json",
+ "./Data/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/tileset.json"
);
return provider;
});
@@ -140,7 +140,7 @@ describe(
it("applies vertical exaggeration to box-shaped voxels by scaling the model matrix", async function () {
const boxProvider = await Cesium3DTilesVoxelProvider.fromUrl(
- "./Data/Cesium3DTiles/Voxel/VoxelBox3DTiles/tileset.json",
+ "./Data/Cesium3DTiles/Voxel/VoxelBox3DTiles/tileset.json"
);
const primitive = new VoxelPrimitive({ provider: boxProvider });
scene.primitives.add(primitive);
@@ -156,7 +156,7 @@ describe(
const expectedModelMatrix = Matrix4.multiplyByScale(
modelMatrix,
scalar,
- new Matrix4(),
+ new Matrix4()
);
expect(primitive._exaggeratedModelMatrix).toEqual(expectedModelMatrix);
});
@@ -220,5 +220,5 @@ describe(
expect(primitive._traversal).toBeUndefined();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/VoxelShapeTypeSpec.js b/packages/engine/Specs/Scene/VoxelShapeTypeSpec.js
index 965c256bcb1d..94762a25d0c6 100644
--- a/packages/engine/Specs/Scene/VoxelShapeTypeSpec.js
+++ b/packages/engine/Specs/Scene/VoxelShapeTypeSpec.js
@@ -8,13 +8,13 @@ import {
describe("Scene/VoxelShapeType", function () {
it("getMinBounds works", function () {
expect(VoxelShapeType.getMinBounds(VoxelShapeType.BOX)).toEqual(
- VoxelBoxShape.DefaultMinBounds,
+ VoxelBoxShape.DefaultMinBounds
);
expect(VoxelShapeType.getMinBounds(VoxelShapeType.ELLIPSOID)).toEqual(
- VoxelEllipsoidShape.DefaultMinBounds,
+ VoxelEllipsoidShape.DefaultMinBounds
);
expect(VoxelShapeType.getMinBounds(VoxelShapeType.CYLINDER)).toEqual(
- VoxelCylinderShape.DefaultMinBounds,
+ VoxelCylinderShape.DefaultMinBounds
);
});
@@ -26,13 +26,13 @@ describe("Scene/VoxelShapeType", function () {
it("getMaxBounds works", function () {
expect(VoxelShapeType.getMaxBounds(VoxelShapeType.BOX)).toEqual(
- VoxelBoxShape.DefaultMaxBounds,
+ VoxelBoxShape.DefaultMaxBounds
);
expect(VoxelShapeType.getMaxBounds(VoxelShapeType.ELLIPSOID)).toEqual(
- VoxelEllipsoidShape.DefaultMaxBounds,
+ VoxelEllipsoidShape.DefaultMaxBounds
);
expect(VoxelShapeType.getMaxBounds(VoxelShapeType.CYLINDER)).toEqual(
- VoxelCylinderShape.DefaultMaxBounds,
+ VoxelCylinderShape.DefaultMaxBounds
);
});
@@ -44,13 +44,13 @@ describe("Scene/VoxelShapeType", function () {
it("getShapeConstructor works", function () {
expect(VoxelShapeType.getShapeConstructor(VoxelShapeType.BOX)).toBe(
- VoxelBoxShape,
+ VoxelBoxShape
);
expect(VoxelShapeType.getShapeConstructor(VoxelShapeType.ELLIPSOID)).toBe(
- VoxelEllipsoidShape,
+ VoxelEllipsoidShape
);
expect(VoxelShapeType.getShapeConstructor(VoxelShapeType.CYLINDER)).toBe(
- VoxelCylinderShape,
+ VoxelCylinderShape
);
});
diff --git a/packages/engine/Specs/Scene/VoxelTraversalSpec.js b/packages/engine/Specs/Scene/VoxelTraversalSpec.js
index c70e0dc1b73c..cd61469689eb 100644
--- a/packages/engine/Specs/Scene/VoxelTraversalSpec.js
+++ b/packages/engine/Specs/Scene/VoxelTraversalSpec.js
@@ -36,7 +36,7 @@ describe(
beforeEach(async function () {
scene = createScene();
provider = await Cesium3DTilesVoxelProvider.fromUrl(
- "./Data/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/tileset.json",
+ "./Data/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/tileset.json"
);
camera = scene.camera;
@@ -55,7 +55,7 @@ describe(
provider.types,
provider.componentTypes,
keyframeCount,
- textureMemory,
+ textureMemory
);
});
@@ -80,7 +80,7 @@ describe(
shape.update(
modelMatrix,
VoxelEllipsoidShape.DefaultMinBounds,
- VoxelEllipsoidShape.DefaultMaxBounds,
+ VoxelEllipsoidShape.DefaultMaxBounds
);
const keyFrameLocation = 0;
const recomputeBoundingVolumes = true;
@@ -89,14 +89,14 @@ describe(
scene.frameState,
keyFrameLocation,
recomputeBoundingVolumes,
- pauseUpdate,
+ pauseUpdate
);
const newOrientedBoundingBox = rootNode.orientedBoundingBox.clone();
expect(
OrientedBoundingBox.equals(
oldOrientedBoundingBox,
- newOrientedBoundingBox,
- ),
+ newOrientedBoundingBox
+ )
).toBe(false);
expect(newOrientedBoundingBox.center.equals(translation)).toBe(true);
});
@@ -109,11 +109,11 @@ describe(
const rootNode = traversal.rootNode;
rootNode.computeScreenSpaceError(
camera.positionWC,
- screenSpaceErrorMultiplier,
+ screenSpaceErrorMultiplier
);
let distanceToCamera = Math.sqrt(
- rootNode.orientedBoundingBox.distanceSquaredTo(camera.positionWC),
+ rootNode.orientedBoundingBox.distanceSquaredTo(camera.positionWC)
);
distanceToCamera = Math.max(distanceToCamera, CesiumMath.EPSILON7);
const error =
@@ -128,7 +128,7 @@ describe(
const visibilityWhenLookingAtRoot = rootNode.visibility(
scene.frameState,
- visibilityPlaneMask,
+ visibilityPlaneMask
);
expect(visibilityWhenLookingAtRoot).toBe(CullingVolume.MASK_INSIDE);
// expect(traversal.isRenderable(rootNode)).toBe(true);
@@ -136,7 +136,7 @@ describe(
turnCameraAround(scene);
const visibilityWhenLookingAway = rootNode.visibility(
scene.frameState,
- visibilityPlaneMask,
+ visibilityPlaneMask
);
expect(visibilityWhenLookingAway).toBe(CullingVolume.MASK_OUTSIDE);
});
@@ -156,7 +156,7 @@ describe(
scene.frameState,
keyFrameLocation,
recomputeBoundingVolumes,
- pauseUpdate,
+ pauseUpdate
);
scene.renderForSpecs();
return traversal.megatextures[0].occupiedCount > 0;
@@ -175,7 +175,7 @@ describe(
scene.frameState,
keyFrameLocation,
recomputeBoundingVolumes,
- pauseUpdate,
+ pauseUpdate
);
scene.renderForSpecs();
return traversal.megatextures[0].occupiedCount > 0;
@@ -200,7 +200,7 @@ describe(
scene.frameState,
keyFrameLocation,
recomputeBoundingVolumes,
- pauseUpdate,
+ pauseUpdate
);
}
for (let i = 0; i < 10; i++) {
@@ -212,12 +212,12 @@ describe(
const bottomLeftNearCorner = Cartesian3.fromElements(
-0.5 - eps,
-0.5 - eps,
- -0.5 - eps,
+ -0.5 - eps
);
const topRightFarCorner = Cartesian3.fromElements(
0.5 + eps,
0.5 + eps,
- 0.5 + eps,
+ 0.5 + eps
);
scene.camera.position = bottomLeftNearCorner;
updateTraversalTenTimes();
@@ -245,5 +245,5 @@ describe(
expect(nodeNoLongerInMegatexture).toBe(true);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/WebMapServiceImageryProviderSpec.js b/packages/engine/Specs/Scene/WebMapServiceImageryProviderSpec.js
index 70835d7063b5..fe750f3c4347 100644
--- a/packages/engine/Specs/Scene/WebMapServiceImageryProviderSpec.js
+++ b/packages/engine/Specs/Scene/WebMapServiceImageryProviderSpec.js
@@ -91,18 +91,20 @@ describe("Scene/WebMapServiceImageryProvider", function () {
},
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const uri = new Uri(request.url);
- const params = queryToObject(uri.query());
- expect(params.something).toEqual("foo");
- expect(params.another).toEqual("false");
- expect(params.version).toEqual("1.3.0");
-
- // Don't need to actually load image, but satisfy the request.
- deferred.resolve(true);
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const uri = new Uri(request.url);
+ const params = queryToObject(uri.query());
+ expect(params.something).toEqual("foo");
+ expect(params.another).toEqual("false");
+ expect(params.version).toEqual("1.3.0");
+
+ // Don't need to actually load image, but satisfy the request.
+ deferred.resolve(true);
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -119,17 +121,19 @@ describe("Scene/WebMapServiceImageryProvider", function () {
},
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const uri = new Uri(request.url);
- const params = queryToObject(uri.query());
- expect(params.crs).toEqual("CRS:27");
- expect(params.version).toEqual("1.3.0");
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const uri = new Uri(request.url);
+ const params = queryToObject(uri.query());
+ expect(params.crs).toEqual("CRS:27");
+ expect(params.version).toEqual("1.3.0");
- // Don't need to actually load image, but satisfy the request.
- deferred.resolve(true);
- },
- );
+ // Don't need to actually load image, but satisfy the request.
+ deferred.resolve(true);
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -146,18 +150,20 @@ describe("Scene/WebMapServiceImageryProvider", function () {
},
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const uri = new Uri(request.url);
- const params = queryToObject(uri.query());
- expect(params.crs).toEqual("EPSG:4326");
- expect(params.version).toEqual("1.3.0");
- expect(params.bbox).toEqual("-90,-180,90,0");
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const uri = new Uri(request.url);
+ const params = queryToObject(uri.query());
+ expect(params.crs).toEqual("EPSG:4326");
+ expect(params.version).toEqual("1.3.0");
+ expect(params.bbox).toEqual("-90,-180,90,0");
- // Don't need to actually load image, but satisfy the request.
- deferred.resolve(true);
- },
- );
+ // Don't need to actually load image, but satisfy the request.
+ deferred.resolve(true);
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -174,18 +180,20 @@ describe("Scene/WebMapServiceImageryProvider", function () {
},
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const uri = new Uri(request.url);
- const params = queryToObject(uri.query());
- expect(params.crs).toEqual("EPSG:4321");
- expect(params.version).toEqual("1.3.0");
- expect(params.bbox).toEqual("-90,-180,90,0");
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const uri = new Uri(request.url);
+ const params = queryToObject(uri.query());
+ expect(params.crs).toEqual("EPSG:4321");
+ expect(params.version).toEqual("1.3.0");
+ expect(params.bbox).toEqual("-90,-180,90,0");
- // Don't need to actually load image, but satisfy the request.
- deferred.resolve(true);
- },
- );
+ // Don't need to actually load image, but satisfy the request.
+ deferred.resolve(true);
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -202,18 +210,20 @@ describe("Scene/WebMapServiceImageryProvider", function () {
},
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const uri = new Uri(request.url);
- const params = queryToObject(uri.query());
- expect(params.crs).toEqual("EPSG:3035");
- expect(params.version).toEqual("1.3.0");
- expect(params.bbox).toEqual("-90,-180,90,0");
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const uri = new Uri(request.url);
+ const params = queryToObject(uri.query());
+ expect(params.crs).toEqual("EPSG:3035");
+ expect(params.version).toEqual("1.3.0");
+ expect(params.bbox).toEqual("-90,-180,90,0");
- // Don't need to actually load image, but satisfy the request.
- deferred.resolve(true);
- },
- );
+ // Don't need to actually load image, but satisfy the request.
+ deferred.resolve(true);
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -230,18 +240,20 @@ describe("Scene/WebMapServiceImageryProvider", function () {
},
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const uri = new Uri(request.url);
- const params = queryToObject(uri.query());
- expect(params.crs).toEqual("EPSG:4559");
- expect(params.version).toEqual("1.3.0");
- expect(params.bbox).toEqual("-180,-90,0,90");
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const uri = new Uri(request.url);
+ const params = queryToObject(uri.query());
+ expect(params.crs).toEqual("EPSG:4559");
+ expect(params.version).toEqual("1.3.0");
+ expect(params.bbox).toEqual("-180,-90,0,90");
- // Don't need to actually load image, but satisfy the request.
- deferred.resolve(true);
- },
- );
+ // Don't need to actually load image, but satisfy the request.
+ deferred.resolve(true);
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -258,17 +270,19 @@ describe("Scene/WebMapServiceImageryProvider", function () {
},
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const uri = new Uri(request.url);
- const params = queryToObject(uri.query());
- expect(params.srs).toEqual("EPSG:4326");
- expect(params.version).toEqual("1.1.0");
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const uri = new Uri(request.url);
+ const params = queryToObject(uri.query());
+ expect(params.srs).toEqual("EPSG:4326");
+ expect(params.version).toEqual("1.1.0");
- // Don't need to actually load image, but satisfy the request.
- deferred.resolve(true);
- },
- );
+ // Don't need to actually load image, but satisfy the request.
+ deferred.resolve(true);
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -285,17 +299,19 @@ describe("Scene/WebMapServiceImageryProvider", function () {
},
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const uri = new Uri(request.url);
- const params = queryToObject(uri.query());
- expect(params.srs).toEqual("IAU2000:30118");
- expect(params.version).toEqual("1.1.0");
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const uri = new Uri(request.url);
+ const params = queryToObject(uri.query());
+ expect(params.srs).toEqual("IAU2000:30118");
+ expect(params.version).toEqual("1.1.0");
- // Don't need to actually load image, but satisfy the request.
- deferred.resolve(true);
- },
- );
+ // Don't need to actually load image, but satisfy the request.
+ deferred.resolve(true);
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -312,18 +328,20 @@ describe("Scene/WebMapServiceImageryProvider", function () {
},
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const uri = new Uri(request.url);
- const params = queryToObject(uri.query());
- expect(params.srs).toEqual("EPSG:4326");
- expect(params.version).toEqual("1.1.0");
- expect(params.bbox).toEqual("-180,-90,0,90");
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const uri = new Uri(request.url);
+ const params = queryToObject(uri.query());
+ expect(params.srs).toEqual("EPSG:4326");
+ expect(params.version).toEqual("1.1.0");
+ expect(params.bbox).toEqual("-180,-90,0,90");
- // Don't need to actually load image, but satisfy the request.
- deferred.resolve(true);
- },
- );
+ // Don't need to actually load image, but satisfy the request.
+ deferred.resolve(true);
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -355,7 +373,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
provider.requestImage(0, 0, 0);
const url = ImageryProvider.loadImage.calls.mostRecent().args[1].url;
expect(["foo", "bar"].indexOf(url.substring(0, 3))).toBeGreaterThanOrEqual(
- 0,
+ 0
);
});
@@ -365,15 +383,17 @@ describe("Scene/WebMapServiceImageryProvider", function () {
layers: "someLayer",
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const questionMarkCount = request.url.match(/\?/g).length;
- expect(questionMarkCount).toEqual(1);
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const questionMarkCount = request.url.match(/\?/g).length;
+ expect(questionMarkCount).toEqual(1);
- // Don't need to actually load image, but satisfy the request.
- deferred.resolve(true);
- },
- );
+ // Don't need to actually load image, but satisfy the request.
+ deferred.resolve(true);
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -386,17 +406,19 @@ describe("Scene/WebMapServiceImageryProvider", function () {
layers: "someLayer",
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const url = request.url;
- const questionMarkCount = url.match(/\?/g).length;
- expect(questionMarkCount).toEqual(1);
- expect(url).not.toContain("&&");
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const url = request.url;
+ const questionMarkCount = url.match(/\?/g).length;
+ expect(questionMarkCount).toEqual(1);
+ expect(url).not.toContain("&&");
- // Don't need to actually load image, but satisfy the request.
- deferred.resolve(true);
- },
- );
+ // Don't need to actually load image, but satisfy the request.
+ deferred.resolve(true);
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -409,20 +431,22 @@ describe("Scene/WebMapServiceImageryProvider", function () {
layers: "someLayer",
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const url = request.url;
- const questionMarkCount = url.match(/\?/g).length;
- expect(questionMarkCount).toEqual(1);
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const url = request.url;
+ const questionMarkCount = url.match(/\?/g).length;
+ expect(questionMarkCount).toEqual(1);
- const uri = new Uri(url);
- const params = queryToObject(uri.query());
- expect(params.foo).toEqual("bar");
+ const uri = new Uri(url);
+ const params = queryToObject(uri.query());
+ expect(params.foo).toEqual("bar");
- // Don't need to actually load image, but satisfy the request.
- deferred.resolve(true);
- },
- );
+ // Don't need to actually load image, but satisfy the request.
+ deferred.resolve(true);
+ });
provider.requestImage(0, 0, 0);
@@ -435,17 +459,19 @@ describe("Scene/WebMapServiceImageryProvider", function () {
layers: "someLayer",
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const url = request.url;
- const uri = new Uri(url);
- const params = queryToObject(uri.query());
- expect(params.version).toEqual("1.1.1");
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const url = request.url;
+ const uri = new Uri(url);
+ const params = queryToObject(uri.query());
+ expect(params.version).toEqual("1.1.1");
- // Don't need to actually load image, but satisfy the request.
- deferred.resolve(true);
- },
- );
+ // Don't need to actually load image, but satisfy the request.
+ deferred.resolve(true);
+ });
provider.requestImage(0, 0, 0);
@@ -467,16 +493,18 @@ describe("Scene/WebMapServiceImageryProvider", function () {
expect(provider.tilingScheme).toBeInstanceOf(GeographicTilingScheme);
expect(provider.rectangle).toEqual(new GeographicTilingScheme().rectangle);
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -501,26 +529,28 @@ describe("Scene/WebMapServiceImageryProvider", function () {
expect(provider.tilingScheme).toBeInstanceOf(WebMercatorTilingScheme);
expect(provider.rectangle).toEqual(new WebMercatorTilingScheme().rectangle);
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const uri = new Uri(request.url);
- const params = queryToObject(uri.query());
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const uri = new Uri(request.url);
+ const params = queryToObject(uri.query());
- expect(params.srs).toEqual("EPSG:3857");
- expect(params.version).toEqual("1.1.1");
+ expect(params.srs).toEqual("EPSG:3857");
+ expect(params.version).toEqual("1.1.1");
- const rect = tilingScheme.tileXYToNativeRectangle(0, 0, 0);
- expect(params.bbox).toEqual(
- `${rect.west},${rect.south},${rect.east},${rect.north}`,
- );
+ const rect = tilingScheme.tileXYToNativeRectangle(0, 0, 0);
+ expect(params.bbox).toEqual(
+ `${rect.west},${rect.south},${rect.east},${rect.north}`
+ );
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -548,26 +578,28 @@ describe("Scene/WebMapServiceImageryProvider", function () {
expect(provider.tilingScheme).toBeInstanceOf(WebMercatorTilingScheme);
expect(provider.rectangle).toEqual(new WebMercatorTilingScheme().rectangle);
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const uri = new Uri(request.url);
- const params = queryToObject(uri.query());
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const uri = new Uri(request.url);
+ const params = queryToObject(uri.query());
- expect(params.crs).toEqual("EPSG:3857");
- expect(params.version).toEqual("1.3.0");
+ expect(params.crs).toEqual("EPSG:3857");
+ expect(params.version).toEqual("1.3.0");
- const rect = tilingScheme.tileXYToNativeRectangle(0, 0, 0);
- expect(params.bbox).toEqual(
- `${rect.west},${rect.south},${rect.east},${rect.north}`,
- );
+ const rect = tilingScheme.tileXYToNativeRectangle(0, 0, 0);
+ expect(params.bbox).toEqual(
+ `${rect.west},${rect.south},${rect.east},${rect.north}`
+ );
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -592,26 +624,28 @@ describe("Scene/WebMapServiceImageryProvider", function () {
expect(provider.tilingScheme).toBeInstanceOf(GeographicTilingScheme);
expect(provider.rectangle).toEqual(new GeographicTilingScheme().rectangle);
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const uri = new Uri(request.url);
- const params = queryToObject(uri.query());
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const uri = new Uri(request.url);
+ const params = queryToObject(uri.query());
- expect(params.srs).toEqual("EPSG:4326");
- expect(params.version).toEqual("1.1.1");
+ expect(params.srs).toEqual("EPSG:4326");
+ expect(params.version).toEqual("1.1.1");
- const rect = tilingScheme.tileXYToNativeRectangle(0, 0, 0);
- expect(params.bbox).toEqual(
- `${rect.west},${rect.south},${rect.east},${rect.north}`,
- );
+ const rect = tilingScheme.tileXYToNativeRectangle(0, 0, 0);
+ expect(params.bbox).toEqual(
+ `${rect.west},${rect.south},${rect.east},${rect.north}`
+ );
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -639,26 +673,28 @@ describe("Scene/WebMapServiceImageryProvider", function () {
expect(provider.tilingScheme).toBeInstanceOf(GeographicTilingScheme);
expect(provider.rectangle).toEqual(new GeographicTilingScheme().rectangle);
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const uri = new Uri(request.url);
- const params = queryToObject(uri.query());
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const uri = new Uri(request.url);
+ const params = queryToObject(uri.query());
- expect(params.srs).toEqual("EPSG:4326");
- expect(params.version).toEqual("1.1.0");
+ expect(params.srs).toEqual("EPSG:4326");
+ expect(params.version).toEqual("1.1.0");
- const rect = tilingScheme.tileXYToNativeRectangle(0, 0, 0);
- expect(params.bbox).toEqual(
- `${rect.west},${rect.south},${rect.east},${rect.north}`,
- );
+ const rect = tilingScheme.tileXYToNativeRectangle(0, 0, 0);
+ expect(params.bbox).toEqual(
+ `${rect.west},${rect.south},${rect.east},${rect.north}`
+ );
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -686,26 +722,28 @@ describe("Scene/WebMapServiceImageryProvider", function () {
expect(provider.tilingScheme).toBeInstanceOf(GeographicTilingScheme);
expect(provider.rectangle).toEqual(new GeographicTilingScheme().rectangle);
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const uri = new Uri(request.url);
- const params = queryToObject(uri.query());
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const uri = new Uri(request.url);
+ const params = queryToObject(uri.query());
- expect(params.crs).toEqual("CRS:84");
- expect(params.version).toEqual("1.3.0");
+ expect(params.crs).toEqual("CRS:84");
+ expect(params.version).toEqual("1.3.0");
- const rect = tilingScheme.tileXYToNativeRectangle(0, 0, 0);
- expect(params.bbox).toEqual(
- `${rect.west},${rect.south},${rect.east},${rect.north}`,
- );
+ const rect = tilingScheme.tileXYToNativeRectangle(0, 0, 0);
+ expect(params.bbox).toEqual(
+ `${rect.west},${rect.south},${rect.east},${rect.north}`
+ );
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -733,26 +771,28 @@ describe("Scene/WebMapServiceImageryProvider", function () {
expect(provider.tilingScheme).toBeInstanceOf(GeographicTilingScheme);
expect(provider.rectangle).toEqual(new GeographicTilingScheme().rectangle);
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const uri = new Uri(request.url);
- const params = queryToObject(uri.query());
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const uri = new Uri(request.url);
+ const params = queryToObject(uri.query());
- expect(params.crs).toEqual("CRS:84");
- expect(params.version).toEqual("1.3.1");
+ expect(params.crs).toEqual("CRS:84");
+ expect(params.version).toEqual("1.3.1");
- const rect = tilingScheme.tileXYToNativeRectangle(0, 0, 0);
- expect(params.bbox).toEqual(
- `${rect.west},${rect.south},${rect.east},${rect.north}`,
- );
+ const rect = tilingScheme.tileXYToNativeRectangle(0, 0, 0);
+ expect(params.bbox).toEqual(
+ `${rect.west},${rect.south},${rect.east},${rect.north}`
+ );
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -769,22 +809,24 @@ describe("Scene/WebMapServiceImageryProvider", function () {
},
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- const uri = new Uri(request.url);
- const params = queryToObject(uri.query());
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ const uri = new Uri(request.url);
+ const params = queryToObject(uri.query());
- expect(params.format).toEqual("foo");
- expect(params.format).not.toEqual("image/jpeg");
+ expect(params.format).toEqual("foo");
+ expect(params.format).not.toEqual("image/jpeg");
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -891,14 +933,14 @@ describe("Scene/WebMapServiceImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
if (tries === 2) {
// Succeed after 2 tries
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
} else {
// fail
@@ -936,7 +978,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
expect(url).toContain("GetFeatureInfo");
Resource._DefaultImplementations.loadWithXhr(
@@ -946,7 +988,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
};
@@ -960,7 +1002,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
expect(firstResult.name).toBe("TOP TANK");
expect(firstResult.description).toContain("GEOSCIENCE AUSTRALIA");
expect(firstResult.position).toEqual(
- Cartographic.fromDegrees(145.91299, -30.19445),
+ Cartographic.fromDegrees(145.91299, -30.19445)
);
});
});
@@ -978,7 +1020,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
expect(url).toContain("GetFeatureInfo");
Resource._DefaultImplementations.loadWithXhr(
@@ -988,7 +1030,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
};
@@ -1017,7 +1059,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
expect(url).toContain("GetFeatureInfo");
Resource._DefaultImplementations.loadWithXhr(
@@ -1027,7 +1069,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
};
@@ -1056,7 +1098,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
expect(url).toContain("GetFeatureInfo");
Resource._DefaultImplementations.loadWithXhr(
@@ -1066,7 +1108,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
};
@@ -1095,7 +1137,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
expect(url).toContain("GetFeatureInfo");
Resource._DefaultImplementations.loadWithXhr(
@@ -1105,7 +1147,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
};
@@ -1134,7 +1176,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
expect(url).toContain("GetFeatureInfo");
Resource._DefaultImplementations.loadWithXhr(
@@ -1144,7 +1186,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
};
@@ -1173,7 +1215,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
expect(url).toContain("GetFeatureInfo");
Resource._DefaultImplementations.loadWithXhr(
@@ -1183,7 +1225,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
};
@@ -1251,7 +1293,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
expect(url).toContain("GetFeatureInfo");
expect(url).not.toContain("json");
@@ -1262,7 +1304,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
};
@@ -1292,7 +1334,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
expect(url).toContain("GetFeatureInfo");
@@ -1307,7 +1349,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
}
};
@@ -1336,7 +1378,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
expect(url).toContain("GetFeatureInfo");
expect(url).toContain("1.1.1");
@@ -1352,7 +1394,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
};
@@ -1375,7 +1417,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
expect(url).toContain("GetFeatureInfo");
expect(url).not.toContain("1.1.1");
@@ -1391,7 +1433,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
};
@@ -1411,7 +1453,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
expect(url).toContain("GetFeatureInfo");
expect(url).toContain("1.1.1");
@@ -1427,7 +1469,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
};
return provider.pickFeatures(0, 0, 0, 0.5, 0.5);
@@ -1457,7 +1499,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
expect(url).toContain("GetFeatureInfo");
@@ -1472,7 +1514,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
};
@@ -1495,7 +1537,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
) {
expect(url).toContain("GetFeatureInfo");
if (url.indexOf(encodeURIComponent("text/html")) < 0) {
@@ -1508,7 +1550,7 @@ describe("Scene/WebMapServiceImageryProvider", function () {
data,
headers,
deferred,
- overrideMimeType,
+ overrideMimeType
);
};
@@ -1563,12 +1605,12 @@ describe("Scene/WebMapServiceImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
};
@@ -1618,12 +1660,12 @@ describe("Scene/WebMapServiceImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
};
@@ -1671,12 +1713,12 @@ describe("Scene/WebMapServiceImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
};
@@ -1729,12 +1771,12 @@ describe("Scene/WebMapServiceImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
};
diff --git a/packages/engine/Specs/Scene/WebMapTileServiceImageryProviderSpec.js b/packages/engine/Specs/Scene/WebMapTileServiceImageryProviderSpec.js
index f16abebc577c..755c238ad9f9 100644
--- a/packages/engine/Specs/Scene/WebMapTileServiceImageryProviderSpec.js
+++ b/packages/engine/Specs/Scene/WebMapTileServiceImageryProviderSpec.js
@@ -34,7 +34,7 @@ describe("Scene/WebMapTileServiceImageryProvider", function () {
it("conforms to ImageryProvider interface", function () {
expect(WebMapTileServiceImageryProvider).toConformToInterface(
- ImageryProvider,
+ ImageryProvider
);
});
@@ -190,7 +190,8 @@ describe("Scene/WebMapTileServiceImageryProvider", function () {
it("generates expected tile urls from template", function () {
const options = {
- url: "http://wmts.invalid/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png",
+ url:
+ "http://wmts.invalid/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png",
format: "image/png",
layer: "someLayer",
style: "someStyle",
@@ -207,10 +208,10 @@ describe("Scene/WebMapTileServiceImageryProvider", function () {
const level = 1;
provider.requestImage(tilecol, tilerow, level);
const uri = new Uri(
- ImageryProvider.loadImage.calls.mostRecent().args[1].getUrlComponent(),
+ ImageryProvider.loadImage.calls.mostRecent().args[1].getUrlComponent()
);
expect(uri.toString()).toEqual(
- "http://wmts.invalid/someStyle/someTMS/second/5/12.png",
+ "http://wmts.invalid/someStyle/someTMS/second/5/12.png"
);
});
@@ -338,16 +339,18 @@ describe("Scene/WebMapTileServiceImageryProvider", function () {
tileMatrixSetID: "someTMS",
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider1.requestImage(0, 0, 0).then(function (image) {
return provider2.requestImage(0, 0, 0).then(function (image) {
@@ -367,16 +370,18 @@ describe("Scene/WebMapTileServiceImageryProvider", function () {
tileMatrixSetID: "someTMS",
});
- spyOn(Resource._Implementations, "createImage").and.callFake(
- function (request, crossOrigin, deferred) {
- // Just return any old image.
- Resource._DefaultImplementations.createImage(
- new Request({ url: "Data/Images/Red16x16.png" }),
- crossOrigin,
- deferred,
- );
- },
- );
+ spyOn(Resource._Implementations, "createImage").and.callFake(function (
+ request,
+ crossOrigin,
+ deferred
+ ) {
+ // Just return any old image.
+ Resource._DefaultImplementations.createImage(
+ new Request({ url: "Data/Images/Red16x16.png" }),
+ crossOrigin,
+ deferred
+ );
+ });
return provider.requestImage(0, 0, 0).then(function (image) {
expect(Resource._Implementations.createImage).toHaveBeenCalled();
@@ -409,14 +414,14 @@ describe("Scene/WebMapTileServiceImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
if (tries === 2) {
// Succeed after 2 tries
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
} else {
// fail
@@ -466,12 +471,12 @@ describe("Scene/WebMapTileServiceImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
};
@@ -522,12 +527,12 @@ describe("Scene/WebMapTileServiceImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
};
@@ -575,12 +580,12 @@ describe("Scene/WebMapTileServiceImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
};
@@ -620,13 +625,13 @@ describe("Scene/WebMapTileServiceImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
lastUrl = request.url;
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
};
@@ -663,13 +668,13 @@ describe("Scene/WebMapTileServiceImageryProvider", function () {
Resource._Implementations.createImage = function (
request,
crossOrigin,
- deferred,
+ deferred
) {
lastUrl = request.url;
Resource._DefaultImplementations.createImage(
new Request({ url: "Data/Images/Red16x16.png" }),
crossOrigin,
- deferred,
+ deferred
);
};
diff --git a/packages/engine/Specs/Scene/buildVoxelDrawCommandsSpec.js b/packages/engine/Specs/Scene/buildVoxelDrawCommandsSpec.js
index d1aea9c50b59..7ba353984ca8 100644
--- a/packages/engine/Specs/Scene/buildVoxelDrawCommandsSpec.js
+++ b/packages/engine/Specs/Scene/buildVoxelDrawCommandsSpec.js
@@ -16,7 +16,7 @@ describe("Scene/buildVoxelDrawCommands", function () {
scene = createScene();
provider = await Cesium3DTilesVoxelProvider.fromUrl(
- "./Data/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/tileset.json",
+ "./Data/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/tileset.json"
);
});
diff --git a/packages/engine/Specs/Scene/computeFlyToLocationForRectangleSpec.js b/packages/engine/Specs/Scene/computeFlyToLocationForRectangleSpec.js
index 0786e1f6b4f9..b4e849b001f8 100644
--- a/packages/engine/Specs/Scene/computeFlyToLocationForRectangleSpec.js
+++ b/packages/engine/Specs/Scene/computeFlyToLocationForRectangleSpec.js
@@ -53,30 +53,30 @@ describe("Scene/computeFlyToLocationForRectangle", function () {
spyOn(
computeFlyToLocationForRectangle,
- "_sampleTerrainMostDetailed",
+ "_sampleTerrainMostDetailed"
).and.returnValue(Promise.resolve(sampledResults));
// Basically do the computation ourselves with our known values;
let expectedResult;
if (sceneMode === SceneMode.SCENE3D) {
expectedResult = scene.ellipsoid.cartesianToCartographic(
- scene.camera.getRectangleCameraCoordinates(rectangle),
+ scene.camera.getRectangleCameraCoordinates(rectangle)
);
} else {
expectedResult = scene.mapProjection.unproject(
- scene.camera.getRectangleCameraCoordinates(rectangle),
+ scene.camera.getRectangleCameraCoordinates(rectangle)
);
}
expectedResult.height += maxHeight;
- return computeFlyToLocationForRectangle(rectangle, scene).then(
- function (result) {
- expect(result).toEqual(expectedResult);
- expect(
- computeFlyToLocationForRectangle._sampleTerrainMostDetailed,
- ).toHaveBeenCalledWith(terrainProvider, cartographics);
- },
- );
+ return computeFlyToLocationForRectangle(rectangle, scene).then(function (
+ result
+ ) {
+ expect(result).toEqual(expectedResult);
+ expect(
+ computeFlyToLocationForRectangle._sampleTerrainMostDetailed
+ ).toHaveBeenCalledWith(terrainProvider, cartographics);
+ });
}
it("samples terrain and returns expected result in 3D", function () {
@@ -97,18 +97,18 @@ describe("Scene/computeFlyToLocationForRectangle", function () {
const rectangle = new Rectangle(0.2, 0.4, 0.6, 0.8);
const expectedResult = scene.mapProjection.unproject(
- scene.camera.getRectangleCameraCoordinates(rectangle),
+ scene.camera.getRectangleCameraCoordinates(rectangle)
);
spyOn(computeFlyToLocationForRectangle, "_sampleTerrainMostDetailed");
- return computeFlyToLocationForRectangle(rectangle, scene).then(
- function (result) {
- expect(result).toEqual(expectedResult);
- expect(
- computeFlyToLocationForRectangle._sampleTerrainMostDetailed,
- ).not.toHaveBeenCalled();
- },
- );
+ return computeFlyToLocationForRectangle(rectangle, scene).then(function (
+ result
+ ) {
+ expect(result).toEqual(expectedResult);
+ expect(
+ computeFlyToLocationForRectangle._sampleTerrainMostDetailed
+ ).not.toHaveBeenCalled();
+ });
});
it("returns height above ellipsoid when terrain not available", function () {
@@ -119,16 +119,16 @@ describe("Scene/computeFlyToLocationForRectangle", function () {
spyOn(computeFlyToLocationForRectangle, "_sampleTerrainMostDetailed");
const expectedResult = scene.ellipsoid.cartesianToCartographic(
- scene.camera.getRectangleCameraCoordinates(rectangle),
- );
- return computeFlyToLocationForRectangle(rectangle, scene).then(
- function (result) {
- expect(result).toEqual(expectedResult);
- expect(
- computeFlyToLocationForRectangle._sampleTerrainMostDetailed,
- ).not.toHaveBeenCalled();
- },
+ scene.camera.getRectangleCameraCoordinates(rectangle)
);
+ return computeFlyToLocationForRectangle(rectangle, scene).then(function (
+ result
+ ) {
+ expect(result).toEqual(expectedResult);
+ expect(
+ computeFlyToLocationForRectangle._sampleTerrainMostDetailed
+ ).not.toHaveBeenCalled();
+ });
});
it("returns height above ellipsoid when terrain undefined", function () {
@@ -137,15 +137,15 @@ describe("Scene/computeFlyToLocationForRectangle", function () {
spyOn(computeFlyToLocationForRectangle, "_sampleTerrainMostDetailed");
const expectedResult = scene.ellipsoid.cartesianToCartographic(
- scene.camera.getRectangleCameraCoordinates(rectangle),
- );
- return computeFlyToLocationForRectangle(rectangle, scene).then(
- function (result) {
- expect(result).toEqual(expectedResult);
- expect(
- computeFlyToLocationForRectangle._sampleTerrainMostDetailed,
- ).not.toHaveBeenCalled();
- },
+ scene.camera.getRectangleCameraCoordinates(rectangle)
);
+ return computeFlyToLocationForRectangle(rectangle, scene).then(function (
+ result
+ ) {
+ expect(result).toEqual(expectedResult);
+ expect(
+ computeFlyToLocationForRectangle._sampleTerrainMostDetailed
+ ).not.toHaveBeenCalled();
+ });
});
});
diff --git a/packages/engine/Specs/Scene/createElevationBandMaterialSpec.js b/packages/engine/Specs/Scene/createElevationBandMaterialSpec.js
index a67c0b57d2c9..1b1ee0ee4a7a 100644
--- a/packages/engine/Specs/Scene/createElevationBandMaterialSpec.js
+++ b/packages/engine/Specs/Scene/createElevationBandMaterialSpec.js
@@ -1149,7 +1149,7 @@ describe("Scene/createElevationBandMaterial", function () {
checkTexel(
0,
new Color(0, 0, 0, 1),
- createElevationBandMaterial._minimumHeight,
+ createElevationBandMaterial._minimumHeight
);
});
@@ -1170,7 +1170,7 @@ describe("Scene/createElevationBandMaterial", function () {
];
spyOn(createElevationBandMaterial, "_useFloatTexture").and.returnValue(
- false,
+ false
);
createElevationBandMaterial({
scene: scene,
@@ -1199,7 +1199,7 @@ describe("Scene/createElevationBandMaterial", function () {
];
spyOn(createElevationBandMaterial, "_useFloatTexture").and.returnValue(
- true,
+ true
);
createElevationBandMaterial({
scene: scene,
diff --git a/packages/engine/Specs/Scene/createTangentSpaceDebugPrimitiveSpec.js b/packages/engine/Specs/Scene/createTangentSpaceDebugPrimitiveSpec.js
index 95373c5a6aa5..baf821b911ba 100644
--- a/packages/engine/Specs/Scene/createTangentSpaceDebugPrimitiveSpec.js
+++ b/packages/engine/Specs/Scene/createTangentSpaceDebugPrimitiveSpec.js
@@ -16,7 +16,7 @@ describe("Scene/createTangentSpaceDebugPrimitive", function () {
const modelMatrix = Matrix4.multiplyByTranslation(
Matrix4.IDENTITY,
new Cartesian3(0.0, 0.0, 11000000.0),
- new Matrix4(),
+ new Matrix4()
);
const primitive = createTangentSpaceDebugPrimitive({
diff --git a/packages/engine/Specs/Scene/createWorldImageryAsyncSpec.js b/packages/engine/Specs/Scene/createWorldImageryAsyncSpec.js
index 83698881426f..085fe985cecc 100644
--- a/packages/engine/Specs/Scene/createWorldImageryAsyncSpec.js
+++ b/packages/engine/Specs/Scene/createWorldImageryAsyncSpec.js
@@ -10,7 +10,7 @@ import createFakeBingMapsMetadataResponse from "../createFakeBingMapsMetadataRes
describe("Core/createWorldImageryAsync", function () {
it("resolves to IonImageryProvider instance with default parameters", async function () {
spyOn(Resource.prototype, "fetchJsonp").and.callFake(() =>
- Promise.resolve(createFakeBingMapsMetadataResponse(BingMapsStyle.AERIAL)),
+ Promise.resolve(createFakeBingMapsMetadataResponse(BingMapsStyle.AERIAL))
);
const provider = await createWorldImageryAsync();
diff --git a/packages/engine/Specs/Scene/parseBatchTableSpec.js b/packages/engine/Specs/Scene/parseBatchTableSpec.js
index df0e4d0c3502..06a29a30f4c5 100644
--- a/packages/engine/Specs/Scene/parseBatchTableSpec.js
+++ b/packages/engine/Specs/Scene/parseBatchTableSpec.js
@@ -137,28 +137,28 @@ describe("Scene/parseBatchTable", function () {
const properties = metadata.schema.classes[className].properties;
expect(properties.uint8Property.componentType).toBe(
- MetadataComponentType.UINT8,
+ MetadataComponentType.UINT8
);
expect(properties.uint16Property.componentType).toBe(
- MetadataComponentType.UINT16,
+ MetadataComponentType.UINT16
);
expect(properties.uint32Property.componentType).toBe(
- MetadataComponentType.UINT32,
+ MetadataComponentType.UINT32
);
expect(properties.int8Property.componentType).toBe(
- MetadataComponentType.INT8,
+ MetadataComponentType.INT8
);
expect(properties.int16Property.componentType).toBe(
- MetadataComponentType.INT16,
+ MetadataComponentType.INT16
);
expect(properties.int32Property.componentType).toBe(
- MetadataComponentType.INT32,
+ MetadataComponentType.INT32
);
expect(properties.floatProperty.componentType).toBe(
- MetadataComponentType.FLOAT32,
+ MetadataComponentType.FLOAT32
);
expect(properties.doubleProperty.componentType).toBe(
- MetadataComponentType.FLOAT64,
+ MetadataComponentType.FLOAT64
);
const propertyTable = metadata.getPropertyTable(0);
@@ -204,24 +204,24 @@ describe("Scene/parseBatchTable", function () {
expect(properties.uvec3Property.type).toBe(MetadataType.VEC3);
expect(properties.dvec4Property.type).toBe(MetadataType.VEC4);
expect(properties.vec2Property.componentType).toBe(
- MetadataComponentType.FLOAT32,
+ MetadataComponentType.FLOAT32
);
expect(properties.uvec3Property.componentType).toBe(
- MetadataComponentType.UINT32,
+ MetadataComponentType.UINT32
);
expect(properties.dvec4Property.componentType).toBe(
- MetadataComponentType.FLOAT64,
+ MetadataComponentType.FLOAT64
);
const propertyTable = metadata.getPropertyTable(0);
expect(propertyTable.getProperty(0, "vec2Property")).toEqual(
- new Cartesian2(0.0, 0.0),
+ new Cartesian2(0.0, 0.0)
);
expect(propertyTable.getProperty(0, "uvec3Property")).toEqual(
- new Cartesian3(0, 0, 0),
+ new Cartesian3(0, 0, 0)
);
expect(propertyTable.getProperty(0, "dvec4Property")).toEqual(
- new Cartesian4(0.0, 0.0, 0.0, 0.0),
+ new Cartesian4(0.0, 0.0, 0.0, 0.0)
);
});
@@ -255,16 +255,16 @@ describe("Scene/parseBatchTable", function () {
const propertyTable = metadata.getPropertyTable(0);
expect(propertyTable.getProperty(0, "location")).toEqual(
- jsonBatchTable.location[0],
+ jsonBatchTable.location[0]
);
expect(propertyTable.getProperty(1, "location")).toEqual(
- jsonBatchTable.location[1],
+ jsonBatchTable.location[1]
);
expect(propertyTable.getProperty(0, "payload")).toEqual(
- jsonBatchTable.payload[0],
+ jsonBatchTable.payload[0]
);
expect(propertyTable.getProperty(1, "payload")).toEqual(
- jsonBatchTable.payload[1],
+ jsonBatchTable.payload[1]
);
});
@@ -476,8 +476,9 @@ describe("Scene/parseBatchTable", function () {
// Since the original properties is an unordered collection, sort
// to be sure of the order
- const [heightAttribute, windDirectionAttribute] =
- customAttributes.sort(sortByName);
+ const [heightAttribute, windDirectionAttribute] = customAttributes.sort(
+ sortByName
+ );
expect(heightAttribute.name).toBe("_HEIGHT");
expect(heightAttribute.count).toBe(3);
expect(heightAttribute.type).toBe("SCALAR");
@@ -488,7 +489,7 @@ describe("Scene/parseBatchTable", function () {
expect(windDirectionAttribute.count).toBe(3);
expect(windDirectionAttribute.type).toBe("VEC2");
expect(windDirectionAttribute.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(windDirectionAttribute.typedArray).toEqual(values.slice(3));
@@ -504,7 +505,7 @@ describe("Scene/parseBatchTable", function () {
expect(heightClassProperty.name).toBe("height");
expect(heightClassProperty.type).toBe(MetadataType.SCALAR);
expect(heightClassProperty.componentType).toBe(
- MetadataComponentType.FLOAT32,
+ MetadataComponentType.FLOAT32
);
const windClassProperty = metadataClass.properties["windDirection"];
expect(windClassProperty.name).toBe("windDirection");
@@ -558,8 +559,9 @@ describe("Scene/parseBatchTable", function () {
// Since the original properties is an unordered collection, sort
// to be sure of the order.
- const [numericAttribute, unicodeAttribute] =
- customAttributes.sort(sortByName);
+ const [numericAttribute, unicodeAttribute] = customAttributes.sort(
+ sortByName
+ );
// Attributes are converted to upper-case like glTF attributes.
expect(numericAttribute.name).toBe("_1234");
@@ -642,7 +644,7 @@ describe("Scene/parseBatchTable", function () {
return classProperty.name;
});
expect(classPropertyNames.sort()).toEqual(
- Object.keys(binaryBatchTable).sort(),
+ Object.keys(binaryBatchTable).sort()
);
const properties = propertyAttribute.properties;
@@ -696,24 +698,25 @@ describe("Scene/parseBatchTable", function () {
// Since the original properties is an unordered collection, sort
// to be sure of the order
- const [heightAttribute, windDirectionAttribute] =
- customAttributes.sort(sortByName);
+ const [heightAttribute, windDirectionAttribute] = customAttributes.sort(
+ sortByName
+ );
expect(heightAttribute.name).toBe("_HEIGHT");
expect(heightAttribute.count).toBe(3);
expect(heightAttribute.type).toBe("SCALAR");
expect(heightAttribute.componentDatatype).toBe(ComponentDatatype.FLOAT);
expect(heightAttribute.typedArray).toEqual(
- binaryBatchTable.height.typedArray,
+ binaryBatchTable.height.typedArray
);
expect(windDirectionAttribute.name).toBe("_WINDDIRECTION");
expect(windDirectionAttribute.count).toBe(3);
expect(windDirectionAttribute.type).toBe("VEC2");
expect(windDirectionAttribute.componentDatatype).toBe(
- ComponentDatatype.FLOAT,
+ ComponentDatatype.FLOAT
);
expect(windDirectionAttribute.typedArray).toEqual(
- binaryBatchTable.windDirection.typedArray,
+ binaryBatchTable.windDirection.typedArray
);
// No property table will be created.
@@ -728,7 +731,7 @@ describe("Scene/parseBatchTable", function () {
expect(heightClassProperty.name).toBe("height");
expect(heightClassProperty.type).toBe(MetadataType.SCALAR);
expect(heightClassProperty.componentType).toBe(
- MetadataComponentType.FLOAT32,
+ MetadataComponentType.FLOAT32
);
const windClassProperty = metadataClass.properties["windDirection"];
expect(windClassProperty.name).toBe("windDirection");
diff --git a/packages/engine/Specs/Scene/parseFeatureMetadataLegacySpec.js b/packages/engine/Specs/Scene/parseFeatureMetadataLegacySpec.js
index e0cfb1881cc0..0f351ba9ec6a 100644
--- a/packages/engine/Specs/Scene/parseFeatureMetadataLegacySpec.js
+++ b/packages/engine/Specs/Scene/parseFeatureMetadataLegacySpec.js
@@ -298,5 +298,5 @@ describe(
expect(metadata.extensions).toBe(extensions);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/parseStructuralMetadataSpec.js b/packages/engine/Specs/Scene/parseStructuralMetadataSpec.js
index e2b8c9383bdc..4b0915aa6f5e 100644
--- a/packages/engine/Specs/Scene/parseStructuralMetadataSpec.js
+++ b/packages/engine/Specs/Scene/parseStructuralMetadataSpec.js
@@ -306,10 +306,10 @@ describe(
expect(propertyAttribute.class).toBe(pointsClass);
expect(propertyAttribute.getProperty("color").attribute).toBe("_COLOR");
expect(propertyAttribute.getProperty("intensity").attribute).toBe(
- "_INTENSITY",
+ "_INTENSITY"
);
expect(propertyAttribute.getProperty("pointSize").attribute).toBe(
- "_POINT_SIZE",
+ "_POINT_SIZE"
);
});
@@ -366,5 +366,5 @@ describe(
expect(metadata.extensions).toBe(extensions);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/engine/Specs/Scene/processVoxelPropertiesSpec.js b/packages/engine/Specs/Scene/processVoxelPropertiesSpec.js
index 2e6ea2a90bb5..0be881a18ee3 100644
--- a/packages/engine/Specs/Scene/processVoxelPropertiesSpec.js
+++ b/packages/engine/Specs/Scene/processVoxelPropertiesSpec.js
@@ -15,7 +15,7 @@ describe("Scene/processVoxelProperties", function () {
scene = createScene();
provider = await Cesium3DTilesVoxelProvider.fromUrl(
- "./Data/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/tileset.json",
+ "./Data/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/tileset.json"
);
});
@@ -46,7 +46,7 @@ describe("Scene/processVoxelProperties", function () {
shaderBuilder,
"PropertyStatistics_a",
"PropertyStatistics_a",
- propertyStatisticsFields,
+ propertyStatisticsFields
);
// Check for Statistics struct
@@ -55,7 +55,7 @@ describe("Scene/processVoxelProperties", function () {
shaderBuilder,
"Statistics",
"Statistics",
- statisticsFields,
+ statisticsFields
);
// Check for Metadata struct
@@ -64,7 +64,7 @@ describe("Scene/processVoxelProperties", function () {
shaderBuilder,
"Metadata",
"Metadata",
- metadataFields,
+ metadataFields
);
// Check for VoxelProperty structs
@@ -78,7 +78,7 @@ describe("Scene/processVoxelProperties", function () {
shaderBuilder,
"VoxelProperty_a",
"VoxelProperty_a",
- voxelPropertyFields,
+ voxelPropertyFields
);
// Check for Voxel struct
@@ -100,7 +100,7 @@ describe("Scene/processVoxelProperties", function () {
shaderBuilder,
"Voxel",
"Voxel",
- voxelFields,
+ voxelFields
);
// Check for FragmentInput struct
@@ -109,7 +109,7 @@ describe("Scene/processVoxelProperties", function () {
shaderBuilder,
"FragmentInput",
"FragmentInput",
- fragmentInputFields,
+ fragmentInputFields
);
// Check for Properties struct
@@ -118,7 +118,7 @@ describe("Scene/processVoxelProperties", function () {
shaderBuilder,
"Properties",
"Properties",
- propertiesFields,
+ propertiesFields
);
// Check clearProperties function
diff --git a/packages/engine/Specs/Widget/CesiumWidgetSpec.js b/packages/engine/Specs/Widget/CesiumWidgetSpec.js
index 9c7720b086a7..b59261f86d4a 100644
--- a/packages/engine/Specs/Widget/CesiumWidgetSpec.js
+++ b/packages/engine/Specs/Widget/CesiumWidgetSpec.js
@@ -46,7 +46,7 @@ describe(
options.contextOptions = defaultValue(options.contextOptions, {});
options.contextOptions.webgl = defaultValue(
options.contextOptions.webgl,
- {},
+ {}
);
if (!!window.webglStub) {
options.contextOptions.getWebGLStub = getWebGLStub;
@@ -69,7 +69,7 @@ describe(
expect(widget.camera).toBeInstanceOf(Camera);
expect(widget.clock).toBeInstanceOf(Clock);
expect(widget.screenSpaceEventHandler).toBeInstanceOf(
- ScreenSpaceEventHandler,
+ ScreenSpaceEventHandler
);
expect(widget.useBrowserRecommendedResolution).toBe(true);
widget.render();
@@ -233,13 +233,13 @@ describe(
expect(contextAttributes.stencil).toEqual(webglOptions.stencil);
expect(contextAttributes.antialias).toEqual(webglOptions.antialias);
expect(contextAttributes.premultipliedAlpha).toEqual(
- webglOptions.premultipliedAlpha,
+ webglOptions.premultipliedAlpha
);
expect(contextAttributes.powerPreference).toEqual(
- webglOptions.powerPreference,
+ webglOptions.powerPreference
);
expect(contextAttributes.preserveDrawingBuffer).toEqual(
- webglOptions.preserveDrawingBuffer,
+ webglOptions.preserveDrawingBuffer
);
});
@@ -264,7 +264,7 @@ describe(
});
expect(widget.scene.maximumRenderTimeChange).toBe(
- Number.POSITIVE_INFINITY,
+ Number.POSITIVE_INFINITY
);
});
@@ -374,11 +374,11 @@ describe(
return !widget.useDefaultRenderLoop;
}).then(function () {
expect(
- widget._element.querySelector(".cesium-widget-errorPanel"),
+ widget._element.querySelector(".cesium-widget-errorPanel")
).not.toBeNull();
const messages = widget._element.querySelectorAll(
- ".cesium-widget-errorPanel-message",
+ ".cesium-widget-errorPanel-message"
);
let found = false;
@@ -392,11 +392,11 @@ describe(
// click the OK button to dismiss the panel
DomEventSimulator.fireClick(
- widget._element.querySelector(".cesium-button"),
+ widget._element.querySelector(".cesium-button")
);
expect(
- widget._element.querySelector(".cesium-widget-errorPanel"),
+ widget._element.querySelector(".cesium-widget-errorPanel")
).toBeNull();
});
});
@@ -415,10 +415,10 @@ describe(
return !widget.useDefaultRenderLoop;
}).then(function () {
expect(
- widget._element.querySelector(".cesium-widget-errorPanel"),
+ widget._element.querySelector(".cesium-widget-errorPanel")
).toBeNull();
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/widgets/Source/Animation/Animation.js b/packages/widgets/Source/Animation/Animation.js
index 2e9e5d04d0e4..5d2990993a0b 100644
--- a/packages/widgets/Source/Animation/Animation.js
+++ b/packages/widgets/Source/Animation/Animation.js
@@ -13,20 +13,20 @@ const xlinkNS = "http://www.w3.org/1999/xlink";
let widgetForDrag;
const gradientEnabledColor0 = Color.fromCssColorString(
- "rgba(247,250,255,0.384)",
+ "rgba(247,250,255,0.384)"
);
const gradientEnabledColor1 = Color.fromCssColorString(
- "rgba(143,191,255,0.216)",
+ "rgba(143,191,255,0.216)"
);
const gradientEnabledColor2 = Color.fromCssColorString(
- "rgba(153,197,255,0.098)",
+ "rgba(153,197,255,0.098)"
);
const gradientEnabledColor3 = Color.fromCssColorString(
- "rgba(255,255,255,0.086)",
+ "rgba(255,255,255,0.086)"
);
const gradientDisabledColor0 = Color.fromCssColorString(
- "rgba(255,255,255,0.267)",
+ "rgba(255,255,255,0.267)"
);
const gradientDisabledColor1 = Color.fromCssColorString("rgba(255,255,255,0)");
@@ -35,7 +35,7 @@ const gradientPointerColor = Color.fromCssColorString("rgba(0,0,0,0.5)");
function getElementColor(element) {
return Color.fromCssColorString(
- window.getComputedStyle(element).getPropertyValue("color"),
+ window.getComputedStyle(element).getPropertyValue("color")
);
}
@@ -43,7 +43,8 @@ const svgIconsById = {
animation_pathReset: {
tagName: "path",
transform: "translate(16,16) scale(0.85) translate(-16,-16)",
- d: "M24.316,5.318,9.833,13.682,9.833,5.5,5.5,5.5,5.5,25.5,9.833,25.5,9.833,17.318,24.316,25.682z",
+ d:
+ "M24.316,5.318,9.833,13.682,9.833,5.5,5.5,5.5,5.5,25.5,9.833,25.5,9.833,17.318,24.316,25.682z",
},
animation_pathPause: {
tagName: "path",
@@ -63,16 +64,19 @@ const svgIconsById = {
animation_pathLoop: {
tagName: "path",
transform: "translate(16,16) scale(0.85) translate(-16,-16)",
- d: "M24.249,15.499c-0.009,4.832-3.918,8.741-8.75,8.75c-2.515,0-4.768-1.064-6.365-2.763l2.068-1.442l-7.901-3.703l0.744,8.694l2.193-1.529c2.244,2.594,5.562,4.242,9.26,4.242c6.767,0,12.249-5.482,12.249-12.249H24.249zM15.499,6.75c2.516,0,4.769,1.065,6.367,2.764l-2.068,1.443l7.901,3.701l-0.746-8.693l-2.192,1.529c-2.245-2.594-5.562-4.245-9.262-4.245C8.734,3.25,3.25,8.734,3.249,15.499H6.75C6.758,10.668,10.668,6.758,15.499,6.75z",
+ d:
+ "M24.249,15.499c-0.009,4.832-3.918,8.741-8.75,8.75c-2.515,0-4.768-1.064-6.365-2.763l2.068-1.442l-7.901-3.703l0.744,8.694l2.193-1.529c2.244,2.594,5.562,4.242,9.26,4.242c6.767,0,12.249-5.482,12.249-12.249H24.249zM15.499,6.75c2.516,0,4.769,1.065,6.367,2.764l-2.068,1.443l7.901,3.701l-0.746-8.693l-2.192,1.529c-2.245-2.594-5.562-4.245-9.262-4.245C8.734,3.25,3.25,8.734,3.249,15.499H6.75C6.758,10.668,10.668,6.758,15.499,6.75z",
},
animation_pathClock: {
tagName: "path",
transform: "translate(16,16) scale(0.85) translate(-16,-15.5)",
- d: "M15.5,2.374C8.251,2.375,2.376,8.251,2.374,15.5C2.376,22.748,8.251,28.623,15.5,28.627c7.249-0.004,13.124-5.879,13.125-13.127C28.624,8.251,22.749,2.375,15.5,2.374zM15.5,25.623C9.909,25.615,5.385,21.09,5.375,15.5C5.385,9.909,9.909,5.384,15.5,5.374c5.59,0.01,10.115,4.535,10.124,10.125C25.615,21.09,21.091,25.615,15.5,25.623zM8.625,15.5c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,16.5,8.624,16.053,8.625,15.5zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.887,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM22.822,12.428c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,12.54,22.344,12.705,22.822,12.428zM12.062,21.455c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,22.344,12.54,21.732,12.062,21.455zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM22.823,18.572c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.092,0.367,1.367c0.477,0.275,1.089,0.113,1.365-0.365C23.464,19.461,23.3,18.848,22.823,18.572zM19.938,7.813c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM23.378,14.5c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,14.949,23.929,14.5,23.378,14.5zM15.501,6.624c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.365c0.275,0.479,0.889,0.643,1.365,0.367l3.305-1.676C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876C16.501,7.072,16.053,6.624,15.501,6.624zM15.501,22.377c-0.552,0-1,0.447-1,1s0.448,1,1,1s1-0.447,1-1S16.053,22.377,15.501,22.377zM18.939,21.455c-0.479,0.277-0.643,0.889-0.366,1.367c0.275,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.889,0.366-1.365C20.028,21.344,19.417,21.18,18.939,21.455z",
+ d:
+ "M15.5,2.374C8.251,2.375,2.376,8.251,2.374,15.5C2.376,22.748,8.251,28.623,15.5,28.627c7.249-0.004,13.124-5.879,13.125-13.127C28.624,8.251,22.749,2.375,15.5,2.374zM15.5,25.623C9.909,25.615,5.385,21.09,5.375,15.5C5.385,9.909,9.909,5.384,15.5,5.374c5.59,0.01,10.115,4.535,10.124,10.125C25.615,21.09,21.091,25.615,15.5,25.623zM8.625,15.5c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,16.5,8.624,16.053,8.625,15.5zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.887,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM22.822,12.428c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,12.54,22.344,12.705,22.822,12.428zM12.062,21.455c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,22.344,12.54,21.732,12.062,21.455zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM22.823,18.572c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.092,0.367,1.367c0.477,0.275,1.089,0.113,1.365-0.365C23.464,19.461,23.3,18.848,22.823,18.572zM19.938,7.813c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM23.378,14.5c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,14.949,23.929,14.5,23.378,14.5zM15.501,6.624c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.365c0.275,0.479,0.889,0.643,1.365,0.367l3.305-1.676C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876C16.501,7.072,16.053,6.624,15.501,6.624zM15.501,22.377c-0.552,0-1,0.447-1,1s0.448,1,1,1s1-0.447,1-1S16.053,22.377,15.501,22.377zM18.939,21.455c-0.479,0.277-0.643,0.889-0.366,1.367c0.275,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.889,0.366-1.365C20.028,21.344,19.417,21.18,18.939,21.455z",
},
animation_pathWingButton: {
tagName: "path",
- d: "m 4.5,0.5 c -2.216,0 -4,1.784 -4,4 l 0,24 c 0,2.216 1.784,4 4,4 l 13.71875,0 C 22.478584,27.272785 27.273681,22.511272 32.5,18.25 l 0,-13.75 c 0,-2.216 -1.784,-4 -4,-4 l -24,0 z",
+ d:
+ "m 4.5,0.5 c -2.216,0 -4,1.784 -4,4 l 0,24 c 0,2.216 1.784,4 4,4 l 13.71875,0 C 22.478584,27.272785 27.273681,22.511272 32.5,18.25 l 0,-13.75 c 0,-2.216 -1.784,-4 -4,-4 l -24,0 z",
},
animation_pathPointer: {
tagName: "path",
@@ -80,7 +84,8 @@ const svgIconsById = {
},
animation_pathSwooshFX: {
tagName: "path",
- d: "m 85,0 c 0,16.617 -4.813944,35.356 -13.131081,48.4508 h 6.099803 c 8.317138,-13.0948 13.13322,-28.5955 13.13322,-45.2124 0,-46.94483 -38.402714,-85.00262 -85.7743869,-85.00262 -1.0218522,0 -2.0373001,0.0241 -3.0506131,0.0589 45.958443,1.59437 82.723058,35.77285 82.723058,81.70532 z",
+ d:
+ "m 85,0 c 0,16.617 -4.813944,35.356 -13.131081,48.4508 h 6.099803 c 8.317138,-13.0948 13.13322,-28.5955 13.13322,-45.2124 0,-46.94483 -38.402714,-85.00262 -85.7743869,-85.00262 -1.0218522,0 -2.0373001,0.0241 -3.0506131,0.0589 45.958443,1.59437 82.723058,35.77285 82.723058,81.70532 z",
},
};
@@ -121,7 +126,7 @@ function svgText(x, y, msg) {
function setShuttleRingPointer(shuttleRingPointer, knobOuter, angle) {
shuttleRingPointer.setAttribute(
"transform",
- `translate(100,100) rotate(${angle})`,
+ `translate(100,100) rotate(${angle})`
);
knobOuter.setAttribute("transform", `rotate(${angle})`);
}
@@ -319,7 +324,7 @@ function SvgButton(svgElement, viewModel) {
viewModel.command,
"canExecute",
this.setEnabled,
- this,
+ this
),
];
}
@@ -349,7 +354,7 @@ SvgButton.prototype.setEnabled = function (enabled) {
if (this._toggled) {
this.svgElement.setAttribute(
"class",
- "cesium-animation-rectButton cesium-animation-buttonToggled",
+ "cesium-animation-rectButton cesium-animation-buttonToggled"
);
return;
}
@@ -366,7 +371,7 @@ SvgButton.prototype.setToggled = function (toggled) {
if (toggled) {
this.svgElement.setAttribute(
"class",
- "cesium-animation-rectButton cesium-animation-buttonToggled",
+ "cesium-animation-rectButton cesium-animation-buttonToggled"
);
} else {
this.svgElement.setAttribute("class", "cesium-animation-rectButton");
@@ -502,19 +507,19 @@ function Animation(container, viewModel) {
this._realtimeSVG = new SvgButton(
wingButton(3, 4, "animation_pathClock"),
- viewModel.playRealtimeViewModel,
+ viewModel.playRealtimeViewModel
);
this._playReverseSVG = new SvgButton(
rectButton(44, 99, "animation_pathPlayReverse"),
- viewModel.playReverseViewModel,
+ viewModel.playReverseViewModel
);
this._playForwardSVG = new SvgButton(
rectButton(124, 99, "animation_pathPlay"),
- viewModel.playForwardViewModel,
+ viewModel.playForwardViewModel
);
this._pauseSVG = new SvgButton(
rectButton(84, 99, "animation_pathPause"),
- viewModel.pauseViewModel,
+ viewModel.pauseViewModel
);
const buttonsG = document.createElementNS(svgNS, "g");
@@ -664,12 +669,12 @@ function Animation(container, viewModel) {
if (isPaused) {
that._shuttleRingPointer.setAttribute(
"class",
- "cesium-animation-shuttleRingPausePointer",
+ "cesium-animation-shuttleRingPausePointer"
);
} else {
that._shuttleRingPointer.setAttribute(
"class",
- "cesium-animation-shuttleRingPointer",
+ "cesium-animation-shuttleRingPointer"
);
}
}
@@ -753,22 +758,22 @@ Animation.prototype.destroy = function () {
this._shuttleRingBackPanel.removeEventListener(
"mousedown",
mouseCallback,
- true,
+ true
);
this._shuttleRingBackPanel.removeEventListener(
"touchstart",
mouseCallback,
- true,
+ true
);
this._shuttleRingSwooshG.removeEventListener(
"mousedown",
mouseCallback,
- true,
+ true
);
this._shuttleRingSwooshG.removeEventListener(
"touchstart",
mouseCallback,
- true,
+ true
);
doc.removeEventListener("mousemove", mouseCallback, true);
doc.removeEventListener("touchmove", mouseCallback, true);
@@ -778,12 +783,12 @@ Animation.prototype.destroy = function () {
this._shuttleRingPointer.removeEventListener(
"mousedown",
mouseCallback,
- true,
+ true
);
this._shuttleRingPointer.removeEventListener(
"touchstart",
mouseCallback,
- true,
+ true
);
this._knobOuter.removeEventListener("mousedown", mouseCallback, true);
this._knobOuter.removeEventListener("touchstart", mouseCallback, true);
@@ -910,7 +915,7 @@ Animation.prototype.applyThemeChanges = function () {
offset: "0%",
"stop-color": makeColorString(
buttonNormalBackColor,
- gradientEnabledColor0,
+ gradientEnabledColor0
),
},
{
@@ -918,7 +923,7 @@ Animation.prototype.applyThemeChanges = function () {
offset: "12%",
"stop-color": makeColorString(
buttonNormalBackColor,
- gradientEnabledColor1,
+ gradientEnabledColor1
),
},
{
@@ -926,7 +931,7 @@ Animation.prototype.applyThemeChanges = function () {
offset: "46%",
"stop-color": makeColorString(
buttonNormalBackColor,
- gradientEnabledColor2,
+ gradientEnabledColor2
),
},
{
@@ -934,7 +939,7 @@ Animation.prototype.applyThemeChanges = function () {
offset: "81%",
"stop-color": makeColorString(
buttonNormalBackColor,
- gradientEnabledColor3,
+ gradientEnabledColor3
),
},
],
@@ -952,7 +957,7 @@ Animation.prototype.applyThemeChanges = function () {
offset: "0%",
"stop-color": makeColorString(
buttonHoverBackColor,
- gradientEnabledColor0,
+ gradientEnabledColor0
),
},
{
@@ -960,7 +965,7 @@ Animation.prototype.applyThemeChanges = function () {
offset: "12%",
"stop-color": makeColorString(
buttonHoverBackColor,
- gradientEnabledColor1,
+ gradientEnabledColor1
),
},
{
@@ -968,7 +973,7 @@ Animation.prototype.applyThemeChanges = function () {
offset: "46%",
"stop-color": makeColorString(
buttonHoverBackColor,
- gradientEnabledColor2,
+ gradientEnabledColor2
),
},
{
@@ -976,7 +981,7 @@ Animation.prototype.applyThemeChanges = function () {
offset: "81%",
"stop-color": makeColorString(
buttonHoverBackColor,
- gradientEnabledColor3,
+ gradientEnabledColor3
),
},
],
@@ -994,7 +999,7 @@ Animation.prototype.applyThemeChanges = function () {
offset: "0%",
"stop-color": makeColorString(
buttonToggledBackColor,
- gradientEnabledColor0,
+ gradientEnabledColor0
),
},
{
@@ -1002,7 +1007,7 @@ Animation.prototype.applyThemeChanges = function () {
offset: "12%",
"stop-color": makeColorString(
buttonToggledBackColor,
- gradientEnabledColor1,
+ gradientEnabledColor1
),
},
{
@@ -1010,7 +1015,7 @@ Animation.prototype.applyThemeChanges = function () {
offset: "46%",
"stop-color": makeColorString(
buttonToggledBackColor,
- gradientEnabledColor2,
+ gradientEnabledColor2
),
},
{
@@ -1018,7 +1023,7 @@ Animation.prototype.applyThemeChanges = function () {
offset: "81%",
"stop-color": makeColorString(
buttonToggledBackColor,
- gradientEnabledColor3,
+ gradientEnabledColor3
),
},
],
@@ -1036,7 +1041,7 @@ Animation.prototype.applyThemeChanges = function () {
offset: "0%",
"stop-color": makeColorString(
buttonDisabledBackColor,
- gradientDisabledColor0,
+ gradientDisabledColor0
),
},
{
@@ -1044,7 +1049,7 @@ Animation.prototype.applyThemeChanges = function () {
offset: "75%",
"stop-color": makeColorString(
buttonDisabledBackColor,
- gradientDisabledColor1,
+ gradientDisabledColor1
),
},
],
diff --git a/packages/widgets/Source/Animation/AnimationViewModel.js b/packages/widgets/Source/Animation/AnimationViewModel.js
index f00e762cd677..864b0bc51e6f 100644
--- a/packages/widgets/Source/Animation/AnimationViewModel.js
+++ b/packages/widgets/Source/Animation/AnimationViewModel.js
@@ -192,13 +192,13 @@ function AnimationViewModel(clockViewModel) {
return multiplierToAngle(
clockViewModel.multiplier,
that._allShuttleRingTicks,
- clockViewModel,
+ clockViewModel
);
},
set: function (angle) {
angle = Math.max(
Math.min(angle, maxShuttleRingAngle),
- -maxShuttleRingAngle,
+ -maxShuttleRingAngle
);
const ticks = that._allShuttleRingTicks;
@@ -342,12 +342,9 @@ function AnimationViewModel(clockViewModel) {
tooltip: "Play Forward",
});
- const playRealtimeCommand = createCommand(
- function () {
- that._clockViewModel.clockStep = ClockStep.SYSTEM_CLOCK;
- },
- knockout.getObservable(this, "_isSystemTimeAvailable"),
- );
+ const playRealtimeCommand = createCommand(function () {
+ that._clockViewModel.clockStep = ClockStep.SYSTEM_CLOCK;
+ }, knockout.getObservable(this, "_isSystemTimeAvailable"));
this._playRealtimeViewModel = new ToggleButtonViewModel(playRealtimeCommand, {
toggled: knockout.computed(function () {
diff --git a/packages/widgets/Source/BaseLayerPicker/BaseLayerPicker.css b/packages/widgets/Source/BaseLayerPicker/BaseLayerPicker.css
index 4c96ecb200f5..8f623f369e49 100644
--- a/packages/widgets/Source/BaseLayerPicker/BaseLayerPicker.css
+++ b/packages/widgets/Source/BaseLayerPicker/BaseLayerPicker.css
@@ -28,19 +28,14 @@
transform: translate(0, -20%);
visibility: hidden;
opacity: 0;
- transition:
- visibility 0s 0.2s,
- opacity 0.2s ease-in,
- transform 0.2s ease-in;
+ transition: visibility 0s 0.2s, opacity 0.2s ease-in, transform 0.2s ease-in;
}
.cesium-baseLayerPicker-dropDown-visible {
transform: translate(0, 0);
visibility: visible;
opacity: 1;
- transition:
- opacity 0.2s ease-out,
- transform 0.2s ease-out;
+ transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
.cesium-baseLayerPicker-sectionTitle {
@@ -110,9 +105,7 @@
.cesium-baseLayerPicker-item:hover .cesium-baseLayerPicker-itemIcon {
border-color: #fff;
- box-shadow:
- 0 0 8px #fff,
- 0 0 8px #fff;
+ box-shadow: 0 0 8px #fff, 0 0 8px #fff;
}
.cesium-baseLayerPicker-selectedItem .cesium-baseLayerPicker-itemLabel {
diff --git a/packages/widgets/Source/BaseLayerPicker/BaseLayerPicker.js b/packages/widgets/Source/BaseLayerPicker/BaseLayerPicker.js
index 0748df1688d2..a1ec026cca76 100644
--- a/packages/widgets/Source/BaseLayerPicker/BaseLayerPicker.js
+++ b/packages/widgets/Source/BaseLayerPicker/BaseLayerPicker.js
@@ -111,7 +111,7 @@ function BaseLayerPicker(container, options) {
"data-bind",
"\
attr: { title: buttonTooltip },\
-click: toggleDropDown",
+click: toggleDropDown"
);
container.appendChild(element);
@@ -121,7 +121,7 @@ click: toggleDropDown",
imgElement.setAttribute(
"data-bind",
"\
-attr: { src: buttonImageUrl }, visible: !!buttonImageUrl",
+attr: { src: buttonImageUrl }, visible: !!buttonImageUrl"
);
element.appendChild(imgElement);
@@ -130,7 +130,7 @@ attr: { src: buttonImageUrl }, visible: !!buttonImageUrl",
dropPanel.setAttribute(
"data-bind",
'\
-css: { "cesium-baseLayerPicker-dropDown-visible" : dropDownVisible }',
+css: { "cesium-baseLayerPicker-dropDown-visible" : dropDownVisible }'
);
container.appendChild(dropPanel);
@@ -138,7 +138,7 @@ css: { "cesium-baseLayerPicker-dropDown-visible" : dropDownVisible }',
imageryTitle.className = "cesium-baseLayerPicker-sectionTitle";
imageryTitle.setAttribute(
"data-bind",
- "visible: imageryProviderViewModels.length > 0",
+ "visible: imageryProviderViewModels.length > 0"
);
imageryTitle.innerHTML = "Imagery";
dropPanel.appendChild(imageryTitle);
@@ -170,7 +170,7 @@ css: { "cesium-baseLayerPicker-dropDown-visible" : dropDownVisible }',
css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedImagery },\
attr: { title: tooltip },\
visible: creationCommand.canExecute,\
-click: function($data) { $parents[1].selectedImagery = $data; }',
+click: function($data) { $parents[1].selectedImagery = $data; }'
);
imageryChoices.appendChild(imageryProvider);
@@ -189,7 +189,7 @@ click: function($data) { $parents[1].selectedImagery = $data; }',
terrainTitle.className = "cesium-baseLayerPicker-sectionTitle";
terrainTitle.setAttribute(
"data-bind",
- "visible: terrainProviderViewModels.length > 0",
+ "visible: terrainProviderViewModels.length > 0"
);
terrainTitle.innerHTML = "Terrain";
dropPanel.appendChild(terrainTitle);
@@ -221,7 +221,7 @@ click: function($data) { $parents[1].selectedImagery = $data; }',
css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedTerrain },\
attr: { title: tooltip },\
visible: creationCommand.canExecute,\
-click: function($data) { $parents[1].selectedTerrain = $data; }',
+click: function($data) { $parents[1].selectedTerrain = $data; }'
);
terrainChoices.appendChild(terrainProvider);
diff --git a/packages/widgets/Source/BaseLayerPicker/BaseLayerPickerViewModel.js b/packages/widgets/Source/BaseLayerPicker/BaseLayerPickerViewModel.js
index 3297b1f97a56..1e35d2f25a9d 100644
--- a/packages/widgets/Source/BaseLayerPicker/BaseLayerPickerViewModel.js
+++ b/packages/widgets/Source/BaseLayerPicker/BaseLayerPickerViewModel.js
@@ -30,11 +30,11 @@ function BaseLayerPickerViewModel(options) {
const globe = options.globe;
const imageryProviderViewModels = defaultValue(
options.imageryProviderViewModels,
- [],
+ []
);
const terrainProviderViewModels = defaultValue(
options.terrainProviderViewModels,
- [],
+ []
);
//>>includeStart('debug', pragmas.debug);
@@ -74,7 +74,7 @@ function BaseLayerPickerViewModel(options) {
const imageryObservable = knockout.getObservable(
this,
- "imageryProviderViewModels",
+ "imageryProviderViewModels"
);
const imageryProviders = knockout.pureComputed(function () {
const providers = imageryObservable();
@@ -105,7 +105,7 @@ function BaseLayerPickerViewModel(options) {
const terrainObservable = knockout.getObservable(
this,
- "terrainProviderViewModels",
+ "terrainProviderViewModels"
);
const terrainProviders = knockout.pureComputed(function () {
const providers = terrainObservable();
@@ -269,11 +269,12 @@ function BaseLayerPickerViewModel(options) {
this._globe.terrainProvider = newProvider;
} else if (defined(newProvider)) {
let cancelUpdate = false;
- const removeCancelListener =
- this._globe.terrainProviderChanged.addEventListener(() => {
+ const removeCancelListener = this._globe.terrainProviderChanged.addEventListener(
+ () => {
cancelUpdate = true;
removeCancelListener();
- });
+ }
+ );
const terrain = new Terrain(newProvider);
const removeEventListener = terrain.readyEvent.addEventListener(
@@ -288,7 +289,7 @@ function BaseLayerPickerViewModel(options) {
);
this._globe.terrainProvider = terrainProvider;
removeEventListener();
- },
+ }
);
}
@@ -304,7 +305,7 @@ function BaseLayerPickerViewModel(options) {
this.selectedImagery = defaultValue(
options.selectedImageryProviderViewModel,
- imageryProviderViewModels[0],
+ imageryProviderViewModels[0]
);
this.selectedTerrain = options.selectedTerrainProviderViewModel;
}
diff --git a/packages/widgets/Source/BaseLayerPicker/createDefaultImageryProviderViewModels.js b/packages/widgets/Source/BaseLayerPicker/createDefaultImageryProviderViewModels.js
index 4238fdb61446..ab5d7c60079c 100644
--- a/packages/widgets/Source/BaseLayerPicker/createDefaultImageryProviderViewModels.js
+++ b/packages/widgets/Source/BaseLayerPicker/createDefaultImageryProviderViewModels.js
@@ -27,14 +27,14 @@ function createDefaultImageryProviderViewModels() {
style: IonWorldImageryStyle.AERIAL,
});
},
- }),
+ })
);
providerViewModels.push(
new ProviderViewModel({
name: "Bing Maps Aerial with Labels",
iconUrl: buildModuleUrl(
- "Widgets/Images/ImageryProviders/bingAerialLabels.png",
+ "Widgets/Images/ImageryProviders/bingAerialLabels.png"
),
tooltip: "Bing Maps aerial imagery with labels, provided by Cesium ion",
category: "Cesium ion",
@@ -43,7 +43,7 @@ function createDefaultImageryProviderViewModels() {
style: IonWorldImageryStyle.AERIAL_WITH_LABELS,
});
},
- }),
+ })
);
providerViewModels.push(
@@ -57,14 +57,14 @@ function createDefaultImageryProviderViewModels() {
style: IonWorldImageryStyle.ROAD,
});
},
- }),
+ })
);
providerViewModels.push(
new ProviderViewModel({
name: "ArcGIS World Imagery",
iconUrl: buildModuleUrl(
- "Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png",
+ "Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png"
),
tooltip:
"\
@@ -82,17 +82,17 @@ https://www.arcgis.com/home/item.html?id=10df2279f9684e4a9f6a7f08febac2a9",
ArcGisBaseMapType.SATELLITE,
{
enablePickFeatures: false,
- },
+ }
);
},
- }),
+ })
);
providerViewModels.push(
new ProviderViewModel({
name: "ArcGIS World Hillshade",
iconUrl: buildModuleUrl(
- "Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png",
+ "Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png"
),
tooltip:
"\
@@ -107,17 +107,17 @@ https://www.arcgis.com/home/item.html?id=1b243539f4514b6ba35e7d995890db1d",
ArcGisBaseMapType.HILLSHADE,
{
enablePickFeatures: false,
- },
+ }
);
},
- }),
+ })
);
providerViewModels.push(
new ProviderViewModel({
name: "Esri World Ocean",
iconUrl: buildModuleUrl(
- "Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png",
+ "Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png"
),
tooltip:
"\
@@ -135,17 +135,17 @@ https://www.arcgis.com/home/item.html?id=1e126e7520f9466c9ca28b8f28b5e500",
ArcGisBaseMapType.OCEANS,
{
enablePickFeatures: false,
- },
+ }
);
},
- }),
+ })
);
providerViewModels.push(
new ProviderViewModel({
name: "Open\u00adStreet\u00adMap",
iconUrl: buildModuleUrl(
- "Widgets/Images/ImageryProviders/openStreetMap.png",
+ "Widgets/Images/ImageryProviders/openStreetMap.png"
),
tooltip:
"OpenStreetMap (OSM) is a collaborative project to create a free editable map \
@@ -156,14 +156,14 @@ of the world.\nhttp://www.openstreetmap.org",
url: "https://tile.openstreetmap.org/",
});
},
- }),
+ })
);
providerViewModels.push(
new ProviderViewModel({
name: "Stadia x Stamen Watercolor",
iconUrl: buildModuleUrl(
- "Widgets/Images/ImageryProviders/stamenWatercolor.png",
+ "Widgets/Images/ImageryProviders/stamenWatercolor.png"
),
tooltip:
"Based on the original basemaps created for the Knight Foundation and reminiscent of hand drawn maps, the watercolor maps from Stamen Design apply raster effect area washes and organic edges over a paper texture to add warm pop to any map.\nhttps://docs.stadiamaps.com/map-styles/stamen-watercolor/",
@@ -178,14 +178,14 @@ of the world.\nhttp://www.openstreetmap.org",
© OpenStreetMap contributors `,
});
},
- }),
+ })
);
providerViewModels.push(
new ProviderViewModel({
name: "Stadia x Stamen Toner",
iconUrl: buildModuleUrl(
- "Widgets/Images/ImageryProviders/stamenToner.png",
+ "Widgets/Images/ImageryProviders/stamenToner.png"
),
tooltip:
"Based on the original basemaps created for the Knight Foundation and the most popular of the excellent styles from Stamen Design, these high-contrast B+W (black and white) maps are the perfect backdrop for your colorful and eye-catching overlays.\nhttps://docs.stadiamaps.com/map-styles/stamen-toner/",
@@ -200,14 +200,14 @@ of the world.\nhttp://www.openstreetmap.org",
© OpenStreetMap contributors `,
});
},
- }),
+ })
);
providerViewModels.push(
new ProviderViewModel({
name: "Stadia Alidade Smooth",
iconUrl: buildModuleUrl(
- "Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png",
+ "Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png"
),
tooltip:
"Stadia's custom Alidade Smooth style is designed for maps that use a lot of markers or overlays. It features a muted color scheme and fewer points of interest to allow your added data to shine.\nhttps://docs.stadiamaps.com/map-styles/alidade-smooth/",
@@ -221,14 +221,14 @@ of the world.\nhttp://www.openstreetmap.org",
© OpenStreetMap contributors `,
});
},
- }),
+ })
);
providerViewModels.push(
new ProviderViewModel({
name: "Stadia Alidade Smooth Dark",
iconUrl: buildModuleUrl(
- "Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png",
+ "Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png"
),
tooltip:
"Stadia Alidade Smooth Dark, like its lighter cousin, is also designed to stay out of the way. It just flips the dark mode switch on the color scheme. With the lights out, your data can now literally shine.\nhttps://docs.stadiamaps.com/map-styles/alidade-smooth-dark/",
@@ -242,7 +242,7 @@ of the world.\nhttp://www.openstreetmap.org",
© OpenStreetMap contributors `,
});
},
- }),
+ })
);
providerViewModels.push(
@@ -255,7 +255,7 @@ of the world.\nhttp://www.openstreetmap.org",
creationFunction: function () {
return IonImageryProvider.fromAssetId(3954);
},
- }),
+ })
);
providerViewModels.push(
@@ -267,14 +267,14 @@ of the world.\nhttp://www.openstreetmap.org",
creationFunction: function () {
return IonImageryProvider.fromAssetId(3845);
},
- }),
+ })
);
providerViewModels.push(
new ProviderViewModel({
name: "Earth at night",
iconUrl: buildModuleUrl(
- "Widgets/Images/ImageryProviders/earthAtNight.png",
+ "Widgets/Images/ImageryProviders/earthAtNight.png"
),
tooltip:
"The Earth at night, also known as The Black Marble, is a 500 meter resolution global composite imagery layer released by NASA.",
@@ -282,24 +282,24 @@ of the world.\nhttp://www.openstreetmap.org",
creationFunction: function () {
return IonImageryProvider.fromAssetId(3812);
},
- }),
+ })
);
providerViewModels.push(
new ProviderViewModel({
name: "Natural Earth\u00a0II",
iconUrl: buildModuleUrl(
- "Widgets/Images/ImageryProviders/naturalEarthII.png",
+ "Widgets/Images/ImageryProviders/naturalEarthII.png"
),
tooltip:
"Natural Earth II, darkened for contrast.\nhttp://www.naturalearthdata.com/",
category: "Cesium ion",
creationFunction: function () {
return TileMapServiceImageryProvider.fromUrl(
- buildModuleUrl("Assets/Textures/NaturalEarthII"),
+ buildModuleUrl("Assets/Textures/NaturalEarthII")
);
},
- }),
+ })
);
return providerViewModels;
diff --git a/packages/widgets/Source/BaseLayerPicker/createDefaultTerrainProviderViewModels.js b/packages/widgets/Source/BaseLayerPicker/createDefaultTerrainProviderViewModels.js
index 2cf4b667b1cf..ca9e7b2be41b 100644
--- a/packages/widgets/Source/BaseLayerPicker/createDefaultTerrainProviderViewModels.js
+++ b/packages/widgets/Source/BaseLayerPicker/createDefaultTerrainProviderViewModels.js
@@ -20,14 +20,14 @@ function createDefaultTerrainProviderViewModels() {
creationFunction: function () {
return new EllipsoidTerrainProvider({ ellipsoid: Ellipsoid.WGS84 });
},
- }),
+ })
);
providerViewModels.push(
new ProviderViewModel({
name: "Cesium World Terrain",
iconUrl: buildModuleUrl(
- "Widgets/Images/TerrainProviders/CesiumWorldTerrain.png",
+ "Widgets/Images/TerrainProviders/CesiumWorldTerrain.png"
),
tooltip:
"High-resolution global terrain tileset curated from several datasources and hosted by Cesium ion",
@@ -38,7 +38,7 @@ function createDefaultTerrainProviderViewModels() {
requestVertexNormals: true,
});
},
- }),
+ })
);
return providerViewModels;
diff --git a/packages/widgets/Source/Cesium3DTilesInspector/Cesium3DTilesInspector.js b/packages/widgets/Source/Cesium3DTilesInspector/Cesium3DTilesInspector.js
index 9cd5cacff3bf..742434dc7361 100644
--- a/packages/widgets/Source/Cesium3DTilesInspector/Cesium3DTilesInspector.js
+++ b/packages/widgets/Source/Cesium3DTilesInspector/Cesium3DTilesInspector.js
@@ -24,7 +24,7 @@ function Cesium3DTilesInspector(container, scene) {
performanceContainer.setAttribute("data-bind", "visible: performance");
const viewModel = new Cesium3DTilesInspectorViewModel(
scene,
- performanceContainer,
+ performanceContainer
);
this._viewModel = viewModel;
@@ -39,7 +39,7 @@ function Cesium3DTilesInspector(container, scene) {
element.className = "cesium-cesiumInspector cesium-3DTilesInspector";
element.setAttribute(
"data-bind",
- 'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}',
+ 'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'
);
container.appendChild(element);
@@ -56,43 +56,43 @@ function Cesium3DTilesInspector(container, scene) {
panel,
"Tileset",
"tilesetVisible",
- "toggleTileset",
+ "toggleTileset"
);
const displayPanelContents = createSection(
panel,
"Display",
"displayVisible",
- "toggleDisplay",
+ "toggleDisplay"
);
const updatePanelContents = createSection(
panel,
"Update",
"updateVisible",
- "toggleUpdate",
+ "toggleUpdate"
);
const loggingPanelContents = createSection(
panel,
"Logging",
"loggingVisible",
- "toggleLogging",
+ "toggleLogging"
);
const tileDebugLabelsPanelContents = createSection(
panel,
"Tile Debug Labels",
"tileDebugLabelsVisible",
- "toggleTileDebugLabels",
+ "toggleTileDebugLabels"
);
const stylePanelContents = createSection(
panel,
"Style",
"styleVisible",
- "toggleStyle",
+ "toggleStyle"
);
const optimizationPanelContents = createSection(
panel,
"Optimization",
"optimizationVisible",
- "toggleOptimization",
+ "toggleOptimization"
);
const properties = document.createElement("div");
@@ -106,10 +106,10 @@ function Cesium3DTilesInspector(container, scene) {
properties.appendChild(propertiesField);
tilesetPanelContents.appendChild(properties);
tilesetPanelContents.appendChild(
- createButton("Pick Tileset", "togglePickTileset", "pickActive"),
+ createButton("Pick Tileset", "togglePickTileset", "pickActive")
);
tilesetPanelContents.appendChild(
- createButton("Trim Tiles Cache", "trimTilesCache"),
+ createButton("Trim Tiles Cache", "trimTilesCache")
);
tilesetPanelContents.appendChild(createCheckbox("Enable Picking", "picking"));
@@ -118,77 +118,71 @@ function Cesium3DTilesInspector(container, scene) {
createCheckbox(
"Wireframe",
"wireframe",
- "_tileset === undefined || hasEnabledWireframe",
- ),
+ "_tileset === undefined || hasEnabledWireframe"
+ )
);
// Create warning text when the Wireframe checkbox is disabled
const warningText = document.createElement("p");
warningText.setAttribute(
"data-bind",
- "visible: _tileset !== undefined && !hasEnabledWireframe",
+ "visible: _tileset !== undefined && !hasEnabledWireframe"
);
warningText.setAttribute(
"class",
- "cesium-3DTilesInspector-disabledElementsInfo",
+ "cesium-3DTilesInspector-disabledElementsInfo"
);
warningText.innerText =
"Set enableDebugWireframe to true in the tileset constructor to enable this option.";
wireframeCheckbox.appendChild(warningText);
displayPanelContents.appendChild(
- createCheckbox("Bounding Volumes", "showBoundingVolumes"),
+ createCheckbox("Bounding Volumes", "showBoundingVolumes")
);
displayPanelContents.appendChild(
- createCheckbox("Content Volumes", "showContentBoundingVolumes"),
+ createCheckbox("Content Volumes", "showContentBoundingVolumes")
);
displayPanelContents.appendChild(
- createCheckbox("Request Volumes", "showRequestVolumes"),
+ createCheckbox("Request Volumes", "showRequestVolumes")
);
displayPanelContents.appendChild(
- createCheckbox("Point Cloud Shading", "pointCloudShading"),
+ createCheckbox("Point Cloud Shading", "pointCloudShading")
);
const pointCloudShadingContainer = document.createElement("div");
pointCloudShadingContainer.setAttribute(
"data-bind",
- "visible: pointCloudShading",
+ "visible: pointCloudShading"
);
pointCloudShadingContainer.appendChild(
- createRangeInput(
- "Geometric Error Scale",
- "geometricErrorScale",
- 0,
- 2,
- 0.01,
- ),
+ createRangeInput("Geometric Error Scale", "geometricErrorScale", 0, 2, 0.01)
);
pointCloudShadingContainer.appendChild(
- createRangeInput("Maximum Attenuation", "maximumAttenuation", 0, 32, 1),
+ createRangeInput("Maximum Attenuation", "maximumAttenuation", 0, 32, 1)
);
pointCloudShadingContainer.appendChild(
- createRangeInput("Base Resolution", "baseResolution", 0, 1, 0.01),
+ createRangeInput("Base Resolution", "baseResolution", 0, 1, 0.01)
);
pointCloudShadingContainer.appendChild(
- createCheckbox("Eye Dome Lighting (EDL)", "eyeDomeLighting"),
+ createCheckbox("Eye Dome Lighting (EDL)", "eyeDomeLighting")
);
displayPanelContents.appendChild(pointCloudShadingContainer);
const edlContainer = document.createElement("div");
edlContainer.setAttribute("data-bind", "visible: eyeDomeLighting");
edlContainer.appendChild(
- createRangeInput("EDL Strength", "eyeDomeLightingStrength", 0, 2.0, 0.1),
+ createRangeInput("EDL Strength", "eyeDomeLightingStrength", 0, 2.0, 0.1)
);
edlContainer.appendChild(
- createRangeInput("EDL Radius", "eyeDomeLightingRadius", 0, 4.0, 0.1),
+ createRangeInput("EDL Radius", "eyeDomeLightingRadius", 0, 4.0, 0.1)
);
pointCloudShadingContainer.appendChild(edlContainer);
updatePanelContents.appendChild(
- createCheckbox("Freeze Frame", "freezeFrame"),
+ createCheckbox("Freeze Frame", "freezeFrame")
);
updatePanelContents.appendChild(
- createCheckbox("Dynamic Screen Space Error", "dynamicScreenSpaceError"),
+ createCheckbox("Dynamic Screen Space Error", "dynamicScreenSpaceError")
);
const sseContainer = document.createElement("div");
sseContainer.appendChild(
@@ -197,14 +191,14 @@ function Cesium3DTilesInspector(container, scene) {
"maximumScreenSpaceError",
0,
128,
- 1,
- ),
+ 1
+ )
);
updatePanelContents.appendChild(sseContainer);
const dynamicScreenSpaceErrorContainer = document.createElement("div");
dynamicScreenSpaceErrorContainer.setAttribute(
"data-bind",
- "visible: dynamicScreenSpaceError",
+ "visible: dynamicScreenSpaceError"
);
dynamicScreenSpaceErrorContainer.appendChild(
createRangeInput(
@@ -213,8 +207,8 @@ function Cesium3DTilesInspector(container, scene) {
0,
1,
0.005,
- "dynamicScreenSpaceErrorDensity",
- ),
+ "dynamicScreenSpaceErrorDensity"
+ )
);
dynamicScreenSpaceErrorContainer.appendChild(
createRangeInput(
@@ -222,43 +216,43 @@ function Cesium3DTilesInspector(container, scene) {
"dynamicScreenSpaceErrorFactor",
1,
32,
- 0.1,
- ),
+ 0.1
+ )
);
updatePanelContents.appendChild(dynamicScreenSpaceErrorContainer);
loggingPanelContents.appendChild(
- createCheckbox("Performance", "performance"),
+ createCheckbox("Performance", "performance")
);
loggingPanelContents.appendChild(performanceContainer);
loggingPanelContents.appendChild(
- createCheckbox("Statistics", "showStatistics"),
+ createCheckbox("Statistics", "showStatistics")
);
const statistics = document.createElement("div");
statistics.className = "cesium-3dTilesInspector-statistics";
statistics.setAttribute(
"data-bind",
- "html: statisticsText, visible: showStatistics",
+ "html: statisticsText, visible: showStatistics"
);
loggingPanelContents.appendChild(statistics);
loggingPanelContents.appendChild(
- createCheckbox("Pick Statistics", "showPickStatistics"),
+ createCheckbox("Pick Statistics", "showPickStatistics")
);
const pickStatistics = document.createElement("div");
pickStatistics.className = "cesium-3dTilesInspector-statistics";
pickStatistics.setAttribute(
"data-bind",
- "html: pickStatisticsText, visible: showPickStatistics",
+ "html: pickStatisticsText, visible: showPickStatistics"
);
loggingPanelContents.appendChild(pickStatistics);
loggingPanelContents.appendChild(
- createCheckbox("Resource Cache Statistics", "showResourceCacheStatistics"),
+ createCheckbox("Resource Cache Statistics", "showResourceCacheStatistics")
);
const resourceCacheStatistics = document.createElement("div");
resourceCacheStatistics.className = "cesium-3dTilesInspector-statistics";
resourceCacheStatistics.setAttribute(
"data-bind",
- "html: resourceCacheStatisticsText, visible: showResourceCacheStatistics",
+ "html: resourceCacheStatisticsText, visible: showResourceCacheStatistics"
);
loggingPanelContents.appendChild(resourceCacheStatistics);
@@ -271,13 +265,13 @@ function Cesium3DTilesInspector(container, scene) {
"options: colorBlendModes, " +
'optionsText: "text", ' +
'optionsValue: "value", ' +
- "value: colorBlendMode",
+ "value: colorBlendMode"
);
stylePanelEditor.appendChild(blendDropdown);
const styleEditor = document.createElement("textarea");
styleEditor.setAttribute(
"data-bind",
- "textInput: styleString, event: { keydown: styleEditorKeyPress }",
+ "textInput: styleString, event: { keydown: styleEditorKeyPress }"
);
stylePanelEditor.className = "cesium-cesiumInspector-styleEditor";
stylePanelEditor.appendChild(styleEditor);
@@ -289,25 +283,25 @@ function Cesium3DTilesInspector(container, scene) {
stylePanelEditor.appendChild(errorBox);
tileDebugLabelsPanelContents.appendChild(
- createCheckbox("Show Picked Only", "showOnlyPickedTileDebugLabel"),
+ createCheckbox("Show Picked Only", "showOnlyPickedTileDebugLabel")
);
tileDebugLabelsPanelContents.appendChild(
- createCheckbox("Geometric Error", "showGeometricError"),
+ createCheckbox("Geometric Error", "showGeometricError")
);
tileDebugLabelsPanelContents.appendChild(
- createCheckbox("Rendering Statistics", "showRenderingStatistics"),
+ createCheckbox("Rendering Statistics", "showRenderingStatistics")
);
tileDebugLabelsPanelContents.appendChild(
- createCheckbox("Memory Usage (MB)", "showMemoryUsage"),
+ createCheckbox("Memory Usage (MB)", "showMemoryUsage")
);
tileDebugLabelsPanelContents.appendChild(createCheckbox("Url", "showUrl"));
optimizationPanelContents.appendChild(
- createCheckbox("Skip Tile LODs", "skipLevelOfDetail"),
+ createCheckbox("Skip Tile LODs", "skipLevelOfDetail")
);
const skipScreenSpaceErrorFactorContainer = document.createElement("div");
skipScreenSpaceErrorFactorContainer.appendChild(
- createRangeInput("Skip SSE Factor", "skipScreenSpaceErrorFactor", 1, 50, 1),
+ createRangeInput("Skip SSE Factor", "skipScreenSpaceErrorFactor", 1, 50, 1)
);
optimizationPanelContents.appendChild(skipScreenSpaceErrorFactorContainer);
const baseScreenSpaceError = document.createElement("div");
@@ -317,23 +311,23 @@ function Cesium3DTilesInspector(container, scene) {
"baseScreenSpaceError",
0,
4096,
- 1,
- ),
+ 1
+ )
);
optimizationPanelContents.appendChild(baseScreenSpaceError);
const skipLevelsContainer = document.createElement("div");
skipLevelsContainer.appendChild(
- createRangeInput("Min. levels to skip", "skipLevels", 0, 10, 1),
+ createRangeInput("Min. levels to skip", "skipLevels", 0, 10, 1)
);
optimizationPanelContents.appendChild(skipLevelsContainer);
optimizationPanelContents.appendChild(
createCheckbox(
"Load only tiles that meet the max SSE.",
- "immediatelyLoadDesiredLevelOfDetail",
- ),
+ "immediatelyLoadDesiredLevelOfDetail"
+ )
);
optimizationPanelContents.appendChild(
- createCheckbox("Load siblings of visible tiles", "loadSiblings"),
+ createCheckbox("Load siblings of visible tiles", "loadSiblings")
);
knockout.applyBindings(viewModel, element);
diff --git a/packages/widgets/Source/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModel.js b/packages/widgets/Source/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModel.js
index 6c95c7aa9df3..093545e1572b 100644
--- a/packages/widgets/Source/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModel.js
+++ b/packages/widgets/Source/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModel.js
@@ -112,13 +112,13 @@ function getStatistics(tileset, isPick) {
s +=
// --- Memory statistics
`Geometry Memory (MB): ${formatMemoryString(
- statistics.geometryByteLength,
+ statistics.geometryByteLength
)} ` +
`Texture Memory (MB): ${formatMemoryString(
- statistics.texturesByteLength,
+ statistics.texturesByteLength
)} ` +
`Batch Table Memory (MB): ${formatMemoryString(
- statistics.batchTableByteLength,
+ statistics.batchTableByteLength
)} `;
s += "";
}
@@ -131,10 +131,10 @@ function getResourceCacheStatistics() {
return `
Geometry Memory (MB): ${formatMemoryString(
- statistics.geometryByteLength,
+ statistics.geometryByteLength
)}
Texture Memory (MB): ${formatMemoryString(
- statistics.texturesByteLength,
+ statistics.texturesByteLength
)}
`;
@@ -782,7 +782,7 @@ function Cesium3DTilesInspectorViewModel(scene, performanceContainer) {
if (value) {
that._eventHandler.setInputAction(
pickTileset,
- ScreenSpaceEventType.LEFT_CLICK,
+ ScreenSpaceEventType.LEFT_CLICK
);
} else {
that._eventHandler.removeInputAction(ScreenSpaceEventType.LEFT_CLICK);
@@ -1487,7 +1487,7 @@ Cesium3DTilesInspectorViewModel.prototype.compileStyle = function () {
*/
Cesium3DTilesInspectorViewModel.prototype.styleEditorKeyPress = function (
sender,
- event,
+ event
) {
if (event.keyCode === 9) {
//tab
diff --git a/packages/widgets/Source/CesiumInspector/CesiumInspector.js b/packages/widgets/Source/CesiumInspector/CesiumInspector.js
index 085db17089d3..54129b654178 100644
--- a/packages/widgets/Source/CesiumInspector/CesiumInspector.js
+++ b/packages/widgets/Source/CesiumInspector/CesiumInspector.js
@@ -48,7 +48,7 @@ function CesiumInspector(container, scene) {
element.className = "cesium-cesiumInspector";
element.setAttribute(
"data-bind",
- 'css: { "cesium-cesiumInspector-visible" : dropDownVisible, "cesium-cesiumInspector-hidden" : !dropDownVisible }',
+ 'css: { "cesium-cesiumInspector-visible" : dropDownVisible, "cesium-cesiumInspector-hidden" : !dropDownVisible }'
);
container.appendChild(this._element);
@@ -64,7 +64,7 @@ function CesiumInspector(container, scene) {
panel,
"General",
"generalVisible",
- "toggleGeneral",
+ "toggleGeneral"
);
const debugShowFrustums = createCheckbox("Show Frustums", "frustums");
@@ -72,16 +72,16 @@ function CesiumInspector(container, scene) {
frustumStatistics.className = "cesium-cesiumInspector-frustumStatistics";
frustumStatistics.setAttribute(
"data-bind",
- "visible: frustums, html: frustumStatisticText",
+ "visible: frustums, html: frustumStatisticText"
);
debugShowFrustums.appendChild(frustumStatistics);
generalSection.appendChild(debugShowFrustums);
generalSection.appendChild(
- createCheckbox("Show Frustum Planes", "frustumPlanes"),
+ createCheckbox("Show Frustum Planes", "frustumPlanes")
);
generalSection.appendChild(
- createCheckbox("Performance Display", "performance"),
+ createCheckbox("Performance Display", "performance")
);
performanceContainer.className = "cesium-cesiumInspector-performanceDisplay";
@@ -99,7 +99,7 @@ function CesiumInspector(container, scene) {
const gLabel = document.createElement("span");
gLabel.setAttribute(
"data-bind",
- 'html: " Frustum:"',
+ 'html: " Frustum:"'
);
depthFrustum.appendChild(gLabel);
@@ -126,7 +126,7 @@ function CesiumInspector(container, scene) {
panel,
"Primitives",
"primitivesVisible",
- "togglePrimitives",
+ "togglePrimitives"
);
const pickPrimRequired = document.createElement("div");
pickPrimRequired.className = "cesium-cesiumInspector-pickSection";
@@ -138,7 +138,7 @@ function CesiumInspector(container, scene) {
pickPrimitiveButton.className = "cesium-cesiumInspector-pickButton";
pickPrimitiveButton.setAttribute(
"data-bind",
- 'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive',
+ 'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive'
);
let buttonWrap = document.createElement("div");
buttonWrap.className = "cesium-cesiumInspector-center";
@@ -149,21 +149,21 @@ function CesiumInspector(container, scene) {
createCheckbox(
"Show bounding sphere",
"primitiveBoundingSphere",
- "hasPickedPrimitive",
- ),
+ "hasPickedPrimitive"
+ )
);
pickPrimRequired.appendChild(
createCheckbox(
"Show reference frame",
"primitiveReferenceFrame",
- "hasPickedPrimitive",
- ),
+ "hasPickedPrimitive"
+ )
);
this._primitiveOnly = createCheckbox(
"Show only selected",
"filterPrimitive",
- "hasPickedPrimitive",
+ "hasPickedPrimitive"
);
pickPrimRequired.appendChild(this._primitiveOnly);
@@ -172,7 +172,7 @@ function CesiumInspector(container, scene) {
panel,
"Terrain",
"terrainVisible",
- "toggleTerrain",
+ "toggleTerrain"
);
const pickTileRequired = document.createElement("div");
pickTileRequired.className = "cesium-cesiumInspector-pickSection";
@@ -183,7 +183,7 @@ function CesiumInspector(container, scene) {
pickTileButton.className = "cesium-cesiumInspector-pickButton";
pickTileButton.setAttribute(
"data-bind",
- 'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile',
+ 'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'
);
buttonWrap = document.createElement("div");
buttonWrap.appendChild(pickTileButton);
@@ -258,19 +258,19 @@ function CesiumInspector(container, scene) {
createCheckbox(
"Show bounding volume",
"tileBoundingSphere",
- "hasPickedTile",
- ),
+ "hasPickedTile"
+ )
);
pickTileRequired.appendChild(
- createCheckbox("Show only selected", "filterTile", "hasPickedTile"),
+ createCheckbox("Show only selected", "filterTile", "hasPickedTile")
);
terrainSection.appendChild(createCheckbox("Wireframe", "wireframe"));
terrainSection.appendChild(
- createCheckbox("Suspend LOD update", "suspendUpdates"),
+ createCheckbox("Suspend LOD update", "suspendUpdates")
);
terrainSection.appendChild(
- createCheckbox("Show tile coordinates", "tileCoordinates"),
+ createCheckbox("Show tile coordinates", "tileCoordinates")
);
knockout.applyBindings(viewModel, this._element);
diff --git a/packages/widgets/Source/CesiumInspector/CesiumInspectorViewModel.js b/packages/widgets/Source/CesiumInspector/CesiumInspectorViewModel.js
index e1c391af3644..25eb458a661d 100644
--- a/packages/widgets/Source/CesiumInspector/CesiumInspectorViewModel.js
+++ b/packages/widgets/Source/CesiumInspector/CesiumInspectorViewModel.js
@@ -432,7 +432,7 @@ function CesiumInspectorViewModel(scene, performanceContainer) {
tileBoundariesLayer = scene.imageryLayers.addImageryProvider(
new TileCoordinatesImageryProvider({
tilingScheme: scene.terrainProvider.tilingScheme,
- }),
+ })
);
} else if (!that.tileCoordinates && defined(tileBoundariesLayer)) {
scene.imageryLayers.remove(tileBoundariesLayer);
@@ -512,7 +512,7 @@ function CesiumInspectorViewModel(scene, performanceContainer) {
if (val) {
eventHandler.setInputAction(
pickPrimitive,
- ScreenSpaceEventType.LEFT_CLICK,
+ ScreenSpaceEventType.LEFT_CLICK
);
} else {
eventHandler.removeInputAction(ScreenSpaceEventType.LEFT_CLICK);
@@ -568,7 +568,7 @@ function CesiumInspectorViewModel(scene, performanceContainer) {
if (val) {
eventHandler.setInputAction(
selectTile,
- ScreenSpaceEventType.LEFT_CLICK,
+ ScreenSpaceEventType.LEFT_CLICK
);
} else {
eventHandler.removeInputAction(ScreenSpaceEventType.LEFT_CLICK);
@@ -925,7 +925,7 @@ Object.defineProperties(CesiumInspectorViewModel.prototype, {
CesiumInspectorViewModel.prototype._update = function () {
if (this.frustums) {
this.frustumStatisticText = frustumStatisticsToString(
- this._scene.debugFrustumStatistics,
+ this._scene.debugFrustumStatistics
);
}
diff --git a/packages/widgets/Source/FullscreenButton/FullscreenButton.js b/packages/widgets/Source/FullscreenButton/FullscreenButton.js
index b03b1b49fe2c..4dd5a677ae76 100644
--- a/packages/widgets/Source/FullscreenButton/FullscreenButton.js
+++ b/packages/widgets/Source/FullscreenButton/FullscreenButton.js
@@ -48,7 +48,7 @@ function FullscreenButton(container, fullscreenElement) {
attr: { title: tooltip },\
click: command,\
enable: isFullscreenEnabled,\
-cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }",
+cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"
);
container.appendChild(element);
diff --git a/packages/widgets/Source/FullscreenButton/FullscreenButtonViewModel.js b/packages/widgets/Source/FullscreenButton/FullscreenButtonViewModel.js
index eca4b52bce4e..15e01ec5ba1f 100644
--- a/packages/widgets/Source/FullscreenButton/FullscreenButtonViewModel.js
+++ b/packages/widgets/Source/FullscreenButton/FullscreenButtonViewModel.js
@@ -71,20 +71,17 @@ function FullscreenButtonViewModel(fullscreenElement, container) {
return tmpIsFullscreen() ? "Exit full screen" : "Full screen";
});
- this._command = createCommand(
- function () {
- if (Fullscreen.fullscreen) {
- Fullscreen.exitFullscreen();
- } else {
- Fullscreen.requestFullscreen(that._fullscreenElement);
- }
- },
- knockout.getObservable(this, "isFullscreenEnabled"),
- );
+ this._command = createCommand(function () {
+ if (Fullscreen.fullscreen) {
+ Fullscreen.exitFullscreen();
+ } else {
+ Fullscreen.requestFullscreen(that._fullscreenElement);
+ }
+ }, knockout.getObservable(this, "isFullscreenEnabled"));
this._fullscreenElement = defaultValue(
getElement(fullscreenElement),
- ownerDocument.body,
+ ownerDocument.body
);
this._callback = function () {
diff --git a/packages/widgets/Source/Geocoder/Geocoder.css b/packages/widgets/Source/Geocoder/Geocoder.css
index fbcff4fad24a..c7ade60dfcb8 100644
--- a/packages/widgets/Source/Geocoder/Geocoder.css
+++ b/packages/widgets/Source/Geocoder/Geocoder.css
@@ -10,9 +10,7 @@
padding: 0 32px 0 0;
border-radius: 0;
box-sizing: border-box;
- transition:
- width ease-in-out 0.25s,
- background-color 0.2s ease-in-out;
+ transition: width ease-in-out 0.25s, background-color 0.2s ease-in-out;
-webkit-appearance: none;
}
diff --git a/packages/widgets/Source/Geocoder/Geocoder.js b/packages/widgets/Source/Geocoder/Geocoder.js
index 37f438bb37e5..f6ab8080ea31 100644
--- a/packages/widgets/Source/Geocoder/Geocoder.js
+++ b/packages/widgets/Source/Geocoder/Geocoder.js
@@ -58,7 +58,7 @@ textInput: searchText,\
disable: isSearchInProgress,\
event: { keyup: handleKeyUp, keydown: handleKeyDown, mouseover: deselectSuggestion },\
css: { "cesium-geocoder-input-wide" : keepExpanded || searchText.length > 0 },\
-hasFocus: _focusTextbox',
+hasFocus: _focusTextbox'
);
this._onTextBoxFocus = function () {
@@ -79,7 +79,7 @@ hasFocus: _focusTextbox',
"data-bind",
"\
click: search,\
-cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }",
+cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"
);
form.appendChild(searchButton);
@@ -89,7 +89,7 @@ cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath,
searchSuggestionsContainer.className = "search-results";
searchSuggestionsContainer.setAttribute(
"data-bind",
- "visible: _suggestionsVisible",
+ "visible: _suggestionsVisible"
);
const suggestionsList = document.createElement("ul");
@@ -101,7 +101,7 @@ cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath,
"text: $data.displayName, \
click: $parent.activateSuggestion, \
event: { mouseover: $parent.handleMouseover}, \
-css: { active: $data === $parent._selectedSuggestion }",
+css: { active: $data === $parent._selectedSuggestion }"
);
searchSuggestionsContainer.appendChild(suggestionsList);
diff --git a/packages/widgets/Source/Geocoder/GeocoderViewModel.js b/packages/widgets/Source/Geocoder/GeocoderViewModel.js
index 441031338431..97b48677a014 100644
--- a/packages/widgets/Source/Geocoder/GeocoderViewModel.js
+++ b/packages/widgets/Source/Geocoder/GeocoderViewModel.js
@@ -161,7 +161,7 @@ function GeocoderViewModel(options) {
*/
this.destinationFound = defaultValue(
options.destinationFound,
- GeocoderViewModel.flyToDestination,
+ GeocoderViewModel.flyToDestination
);
this._focusTextbox = false;
@@ -318,7 +318,7 @@ function handleArrowUp(viewModel) {
return;
}
const currentIndex = viewModel._suggestions.indexOf(
- viewModel._selectedSuggestion,
+ viewModel._selectedSuggestion
);
if (currentIndex === -1 || currentIndex === 0) {
viewModel._selectedSuggestion = undefined;
@@ -335,7 +335,7 @@ function handleArrowDown(viewModel) {
}
const numberOfSuggestions = viewModel._suggestions.length;
const currentIndex = viewModel._suggestions.indexOf(
- viewModel._selectedSuggestion,
+ viewModel._selectedSuggestion
);
const next = (currentIndex + 1) % numberOfSuggestions;
viewModel._selectedSuggestion = viewModel._suggestions[next];
@@ -358,7 +358,7 @@ function computeFlyToLocationForCartographic(cartographic, terrainProvider) {
cartographic = positionOnTerrain[0];
cartographic.height += DEFAULT_HEIGHT;
return cartographic;
- },
+ }
);
}
@@ -377,12 +377,12 @@ function flyToDestination(viewModel, destination) {
CesiumMath.equalsEpsilon(
destination.south,
destination.north,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
) &&
CesiumMath.equalsEpsilon(
destination.east,
destination.west,
- CesiumMath.EPSILON7,
+ CesiumMath.EPSILON7
)
) {
// destination is now a Cartographic
@@ -474,7 +474,7 @@ async function geocode(viewModel, geocoderServices, geocodeType) {
viewModel.destinationFound(viewModel, geocoderResults[0].destination);
const credits = updateCredits(
viewModel,
- GeocoderService.getCreditsFromResult(geocoderResults[0]),
+ GeocoderService.getCreditsFromResult(geocoderResults[0])
);
// If the result does not contain any credits, default to the service credit.
if (!defined(credits)) {
diff --git a/packages/widgets/Source/HomeButton/HomeButton.js b/packages/widgets/Source/HomeButton/HomeButton.js
index 0f67ece61c05..342a7d8ab932 100644
--- a/packages/widgets/Source/HomeButton/HomeButton.js
+++ b/packages/widgets/Source/HomeButton/HomeButton.js
@@ -39,7 +39,7 @@ function HomeButton(container, scene, duration) {
"\
attr: { title: tooltip },\
click: command,\
-cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }",
+cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"
);
container.appendChild(element);
diff --git a/packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorerViewModel.js b/packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorerViewModel.js
index 47fbc6fd049f..f1ab2f4b1255 100644
--- a/packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorerViewModel.js
+++ b/packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorerViewModel.js
@@ -2,10 +2,9 @@ import { defined } from "@cesium/engine";
import knockout from "../ThirdParty/knockout.js";
function expandItemsHandler(data, event) {
- const nestedList =
- event.currentTarget.parentElement.parentElement.querySelector(
- `#${data.name}-expander`,
- );
+ const nestedList = event.currentTarget.parentElement.parentElement.querySelector(
+ `#${data.name}-expander`
+ );
nestedList.classList.toggle("active");
event.currentTarget.textContent =
event.currentTarget.textContent === "+" ? "-" : "+";
diff --git a/packages/widgets/Source/InfoBox/InfoBox.css b/packages/widgets/Source/InfoBox/InfoBox.css
index 26899af2a8b4..5041c550418e 100644
--- a/packages/widgets/Source/InfoBox/InfoBox.css
+++ b/packages/widgets/Source/InfoBox/InfoBox.css
@@ -15,19 +15,14 @@
transform: translate(100%, 0);
visibility: hidden;
opacity: 0;
- transition:
- visibility 0s 0.2s,
- opacity 0.2s ease-in,
- transform 0.2s ease-in;
+ transition: visibility 0s 0.2s, opacity 0.2s ease-in, transform 0.2s ease-in;
}
.cesium-infoBox-visible {
transform: translate(0, 0);
visibility: visible;
opacity: 1;
- transition:
- opacity 0.2s ease-out,
- transform 0.2s ease-out;
+ transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
.cesium-infoBox-title {
diff --git a/packages/widgets/Source/InfoBox/InfoBox.js b/packages/widgets/Source/InfoBox/InfoBox.js
index 5a4871249e28..82dda94f90c8 100644
--- a/packages/widgets/Source/InfoBox/InfoBox.js
+++ b/packages/widgets/Source/InfoBox/InfoBox.js
@@ -32,7 +32,7 @@ function InfoBox(container) {
infoElement.setAttribute(
"data-bind",
'\
-css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyless }',
+css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyless }'
);
container.appendChild(infoElement);
@@ -50,7 +50,7 @@ css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyles
attr: { title: "Focus camera on object" },\
click: function () { cameraClicked.raiseEvent(this); },\
enable: enableCamera,\
-cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }',
+cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'
);
infoElement.appendChild(cameraElement);
@@ -60,7 +60,7 @@ cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }',
closeElement.setAttribute(
"data-bind",
"\
-click: function () { closeClicked.raiseEvent(this); }",
+click: function () { closeClicked.raiseEvent(this); }"
);
closeElement.innerHTML = "×";
infoElement.appendChild(closeElement);
@@ -70,7 +70,7 @@ click: function () { closeClicked.raiseEvent(this); }",
frame.setAttribute("sandbox", "allow-same-origin allow-popups allow-forms"); //allow-pointer-lock allow-scripts allow-top-navigation
frame.setAttribute(
"data-bind",
- "style : { maxHeight : maxHeightOffset(40) }",
+ "style : { maxHeight : maxHeightOffset(40) }"
);
frame.setAttribute("allowfullscreen", true);
infoElement.appendChild(frame);
@@ -138,7 +138,7 @@ click: function () { closeClicked.raiseEvent(this); }",
// Measure and set the new custom height, based on text wrapped above.
const height = frameContent.getBoundingClientRect().height;
frame.style.height = `${height}px`;
- },
+ }
);
});
diff --git a/packages/widgets/Source/InspectorShared.js b/packages/widgets/Source/InspectorShared.js
index 8fe28ca7b7ca..25e4d1326b85 100644
--- a/packages/widgets/Source/InspectorShared.js
+++ b/packages/widgets/Source/InspectorShared.js
@@ -16,7 +16,7 @@ const InspectorShared = {};
InspectorShared.createCheckbox = function (
labelText,
checkedBinding,
- enableBinding,
+ enableBinding
) {
//>>includeStart('debug', pragmas.debug);
Check.typeOf.string("labelText", labelText);
@@ -50,7 +50,7 @@ InspectorShared.createSection = function (
panel,
headerText,
sectionVisibleBinding,
- toggleSectionVisibilityBinding,
+ toggleSectionVisibilityBinding
) {
//>>includeStart('debug', pragmas.debug);
Check.defined("panel", panel);
@@ -58,14 +58,14 @@ InspectorShared.createSection = function (
Check.typeOf.string("sectionVisibleBinding", sectionVisibleBinding);
Check.typeOf.string(
"toggleSectionVisibilityBinding",
- toggleSectionVisibilityBinding,
+ toggleSectionVisibilityBinding
);
//>>includeEnd('debug');
const section = document.createElement("div");
section.className = "cesium-cesiumInspector-section";
section.setAttribute(
"data-bind",
- `css: { "cesium-cesiumInspector-section-collapsed": !${sectionVisibleBinding} }`,
+ `css: { "cesium-cesiumInspector-section-collapsed": !${sectionVisibleBinding} }`
);
panel.appendChild(section);
@@ -74,7 +74,7 @@ InspectorShared.createSection = function (
sectionHeader.appendChild(document.createTextNode(headerText));
sectionHeader.setAttribute(
"data-bind",
- `click: ${toggleSectionVisibilityBinding}`,
+ `click: ${toggleSectionVisibilityBinding}`
);
section.appendChild(sectionHeader);
@@ -100,7 +100,7 @@ InspectorShared.createRangeInput = function (
min,
max,
step,
- inputValueBinding,
+ inputValueBinding
) {
//>>includeStart('debug', pragmas.debug);
Check.typeOf.string("rangeText", rangeText);
@@ -121,7 +121,7 @@ InspectorShared.createRangeInput = function (
slider.step = defaultValue(step, "any");
slider.setAttribute(
"data-bind",
- `valueUpdate: "input", value: ${sliderValueBinding}`,
+ `valueUpdate: "input", value: ${sliderValueBinding}`
);
const wrapper = document.createElement("div");
@@ -146,7 +146,7 @@ InspectorShared.createRangeInput = function (
InspectorShared.createButton = function (
buttonText,
clickedBinding,
- activeBinding,
+ activeBinding
) {
//>>includeStart('debug', pragmas.debug);
Check.typeOf.string("buttonText", buttonText);
diff --git a/packages/widgets/Source/NavigationHelpButton/NavigationHelpButton.css b/packages/widgets/Source/NavigationHelpButton/NavigationHelpButton.css
index beb556e803fc..736c4d2932d9 100644
--- a/packages/widgets/Source/NavigationHelpButton/NavigationHelpButton.css
+++ b/packages/widgets/Source/NavigationHelpButton/NavigationHelpButton.css
@@ -12,9 +12,7 @@
border-radius: 10px;
transform: scale(0.01);
transform-origin: 234px -10px;
- transition:
- visibility 0s 0.25s,
- transform 0.25s ease-in;
+ transition: visibility 0s 0.25s, transform 0.25s ease-in;
}
.cesium-navigation-help-visible {
diff --git a/packages/widgets/Source/NavigationHelpButton/NavigationHelpButton.js b/packages/widgets/Source/NavigationHelpButton/NavigationHelpButton.js
index 1babb8aa1c6d..05b7573eb54d 100644
--- a/packages/widgets/Source/NavigationHelpButton/NavigationHelpButton.js
+++ b/packages/widgets/Source/NavigationHelpButton/NavigationHelpButton.js
@@ -44,7 +44,7 @@ function NavigationHelpButton(options) {
const showInsructionsDefault = defaultValue(
options.instructionsInitiallyVisible,
- false,
+ false
);
viewModel.showInstructions = showInsructionsDefault;
@@ -64,7 +64,7 @@ function NavigationHelpButton(options) {
"\
attr: { title: tooltip },\
click: command,\
-cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }",
+cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"
);
wrapper.appendChild(button);
@@ -72,7 +72,7 @@ cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }",
instructionContainer.className = "cesium-navigation-help";
instructionContainer.setAttribute(
"data-bind",
- 'css: { "cesium-navigation-help-visible" : showInstructions}',
+ 'css: { "cesium-navigation-help-visible" : showInstructions}'
);
wrapper.appendChild(instructionContainer);
@@ -82,7 +82,7 @@ cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }",
"cesium-navigation-button cesium-navigation-button-left";
mouseButton.setAttribute(
"data-bind",
- 'click: showClick, css: {"cesium-navigation-button-selected": !_touch, "cesium-navigation-button-unselected": _touch}',
+ 'click: showClick, css: {"cesium-navigation-button-selected": !_touch, "cesium-navigation-button-unselected": _touch}'
);
const mouseIcon = document.createElement("img");
mouseIcon.src = buildModuleUrl("Widgets/Images/NavigationHelp/Mouse.svg");
@@ -98,7 +98,7 @@ cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }",
"cesium-navigation-button cesium-navigation-button-right";
touchButton.setAttribute(
"data-bind",
- 'click: showTouch, css: {"cesium-navigation-button-selected": _touch, "cesium-navigation-button-unselected": !_touch}',
+ 'click: showTouch, css: {"cesium-navigation-button-selected": _touch, "cesium-navigation-button-unselected": !_touch}'
);
const touchIcon = document.createElement("img");
touchIcon.src = buildModuleUrl("Widgets/Images/NavigationHelp/Touch.svg");
@@ -116,13 +116,13 @@ cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }",
"cesium-click-navigation-help cesium-navigation-help-instructions";
clickInstructions.setAttribute(
"data-bind",
- 'css: { "cesium-click-navigation-help-visible" : !_touch}',
+ 'css: { "cesium-click-navigation-help-visible" : !_touch}'
);
clickInstructions.innerHTML = `\
\
\
\
\
Pan view
\
@@ -131,7 +131,7 @@ cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }",
\
\
\
\
Zoom view
\
@@ -141,7 +141,7 @@ cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }",
\
\
\
\
Rotate view
\
@@ -158,13 +158,13 @@ cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }",
"cesium-touch-navigation-help cesium-navigation-help-instructions";
touchInstructions.setAttribute(
"data-bind",
- 'css: { "cesium-touch-navigation-help-visible" : _touch}',
+ 'css: { "cesium-touch-navigation-help-visible" : _touch}'
);
touchInstructions.innerHTML = `\
\
\
\
\
Pan view
\
@@ -173,7 +173,7 @@ cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }",
\
\
\
\
Zoom view
\
@@ -182,7 +182,7 @@ cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }",
\
\
\
\
Tilt view
\
@@ -191,7 +191,7 @@ cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }",
\
\
\
\
Rotate view
\
diff --git a/packages/widgets/Source/PerformanceWatchdog/PerformanceWatchdogViewModel.js b/packages/widgets/Source/PerformanceWatchdog/PerformanceWatchdogViewModel.js
index 653c344c088c..5f0fd411344b 100644
--- a/packages/widgets/Source/PerformanceWatchdog/PerformanceWatchdogViewModel.js
+++ b/packages/widgets/Source/PerformanceWatchdog/PerformanceWatchdogViewModel.js
@@ -35,7 +35,7 @@ function PerformanceWatchdogViewModel(options) {
*/
this.lowFrameRateMessage = defaultValue(
options.lowFrameRateMessage,
- "This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers.",
+ "This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers."
);
/**
@@ -70,13 +70,13 @@ function PerformanceWatchdogViewModel(options) {
if (!that.lowFrameRateMessageDismissed) {
that.showingLowFrameRateMessage = true;
}
- },
+ }
);
this._unsubscribeNominalFrameRate = monitor.nominalFrameRate.addEventListener(
function () {
that.showingLowFrameRateMessage = false;
- },
+ }
);
}
diff --git a/packages/widgets/Source/ProjectionPicker/ProjectionPicker.css b/packages/widgets/Source/ProjectionPicker/ProjectionPicker.css
index f9d26457d548..80e0ac1cf674 100644
--- a/packages/widgets/Source/ProjectionPicker/ProjectionPicker.css
+++ b/packages/widgets/Source/ProjectionPicker/ProjectionPicker.css
@@ -13,9 +13,7 @@ span.cesium-projectionPicker-wrapper {
.cesium-projectionPicker-hidden {
visibility: hidden;
opacity: 0;
- transition:
- visibility 0s 0.25s,
- opacity 0.25s linear;
+ transition: visibility 0s 0.25s, opacity 0.25s linear;
}
.cesium-projectionPicker-wrapper .cesium-projectionPicker-none {
@@ -47,7 +45,5 @@ span.cesium-projectionPicker-wrapper {
.cesium-projectionPicker-wrapper .cesium-projectionPicker-selected {
border-color: #2e2;
- box-shadow:
- 0 0 8px #fff,
- 0 0 8px #fff;
+ box-shadow: 0 0 8px #fff, 0 0 8px #fff;
}
diff --git a/packages/widgets/Source/ProjectionPicker/ProjectionPicker.js b/packages/widgets/Source/ProjectionPicker/ProjectionPicker.js
index c596245dc8fb..d1cc1dee8cae 100644
--- a/packages/widgets/Source/ProjectionPicker/ProjectionPicker.js
+++ b/packages/widgets/Source/ProjectionPicker/ProjectionPicker.js
@@ -63,7 +63,7 @@ css: { "cesium-projectionPicker-buttonPerspective": !_orthographic,\
"cesium-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress, \
"cesium-projectionPicker-selected": dropDownVisible },\
attr: { title: selectedTooltip },\
-click: toggleDropDown',
+click: toggleDropDown'
);
button.innerHTML =
'\
@@ -83,7 +83,7 @@ css: { "cesium-projectionPicker-visible" : (dropDownVisible && _orthographic),\
"cesium-projectionPicker-hidden" : !dropDownVisible },\
attr: { title: tooltipPerspective },\
click: switchToPerspective,\
-cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }',
+cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'
);
wrapper.appendChild(perspectiveButton);
@@ -99,7 +99,7 @@ css: { "cesium-projectionPicker-visible" : (dropDownVisible && !_orthographic),\
"cesium-projectionPicker-hidden" : !dropDownVisible},\
attr: { title: tooltipOrthographic },\
click: switchToOrthographic,\
-cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }',
+cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'
);
wrapper.appendChild(orthographicButton);
diff --git a/packages/widgets/Source/ProjectionPicker/ProjectionPickerViewModel.js b/packages/widgets/Source/ProjectionPicker/ProjectionPickerViewModel.js
index 7b370939c796..bf51b586a9af 100644
--- a/packages/widgets/Source/ProjectionPicker/ProjectionPickerViewModel.js
+++ b/packages/widgets/Source/ProjectionPicker/ProjectionPickerViewModel.js
@@ -86,15 +86,17 @@ function ProjectionPickerViewModel(scene) {
});
this._eventHelper = new EventHelper();
- this._eventHelper.add(
- scene.morphComplete,
- function (transitioner, oldMode, newMode, isMorphing) {
- that.sceneMode = newMode;
- that._orthographic =
- newMode === SceneMode.SCENE2D ||
- that._scene.camera.frustum instanceof OrthographicFrustum;
- },
- );
+ this._eventHelper.add(scene.morphComplete, function (
+ transitioner,
+ oldMode,
+ newMode,
+ isMorphing
+ ) {
+ that.sceneMode = newMode;
+ that._orthographic =
+ newMode === SceneMode.SCENE2D ||
+ that._scene.camera.frustum instanceof OrthographicFrustum;
+ });
this._eventHelper.add(scene.preRender, function () {
that._flightInProgress = defined(scene.camera._currentFlight);
});
diff --git a/packages/widgets/Source/SceneModePicker/SceneModePicker.css b/packages/widgets/Source/SceneModePicker/SceneModePicker.css
index eb74f6091914..85ea7272233c 100644
--- a/packages/widgets/Source/SceneModePicker/SceneModePicker.css
+++ b/packages/widgets/Source/SceneModePicker/SceneModePicker.css
@@ -13,9 +13,7 @@ span.cesium-sceneModePicker-wrapper {
.cesium-sceneModePicker-hidden {
visibility: hidden;
opacity: 0;
- transition:
- visibility 0s 0.25s,
- opacity 0.25s linear;
+ transition: visibility 0s 0.25s, opacity 0.25s linear;
}
.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-none {
@@ -78,7 +76,5 @@ span.cesium-sceneModePicker-wrapper {
.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-selected {
border-color: #2e2;
- box-shadow:
- 0 0 8px #fff,
- 0 0 8px #fff;
+ box-shadow: 0 0 8px #fff, 0 0 8px #fff;
}
diff --git a/packages/widgets/Source/SceneModePicker/SceneModePicker.js b/packages/widgets/Source/SceneModePicker/SceneModePicker.js
index 83c028afc48a..3ab0c6465ef9 100644
--- a/packages/widgets/Source/SceneModePicker/SceneModePicker.js
+++ b/packages/widgets/Source/SceneModePicker/SceneModePicker.js
@@ -77,7 +77,7 @@ css: { "cesium-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D,\
"cesium-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW,\
"cesium-sceneModePicker-selected": dropDownVisible },\
attr: { title: selectedTooltip },\
-click: toggleDropDown',
+click: toggleDropDown'
);
button.innerHTML =
'\
@@ -98,7 +98,7 @@ css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sc
"cesium-sceneModePicker-hidden" : !dropDownVisible },\
attr: { title: tooltip3D },\
click: morphTo3D,\
-cesiumSvgPath: { path: _globePath, width: 64, height: 64 }',
+cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'
);
wrapper.appendChild(morphTo3DButton);
@@ -114,7 +114,7 @@ css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sc
"cesium-sceneModePicker-hidden" : !dropDownVisible },\
attr: { title: tooltip2D },\
click: morphTo2D,\
-cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }',
+cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'
);
wrapper.appendChild(morphTo2DButton);
@@ -130,7 +130,7 @@ css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sc
"cesium-sceneModePicker-hidden" : !dropDownVisible},\
attr: { title: tooltipColumbusView },\
click: morphToColumbusView,\
-cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }',
+cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'
);
wrapper.appendChild(morphToCVButton);
diff --git a/packages/widgets/Source/SelectionIndicator/SelectionIndicator.css b/packages/widgets/Source/SelectionIndicator/SelectionIndicator.css
index e5c9fe1cfa7b..a73a8ce5a723 100644
--- a/packages/widgets/Source/SelectionIndicator/SelectionIndicator.css
+++ b/packages/widgets/Source/SelectionIndicator/SelectionIndicator.css
@@ -5,9 +5,7 @@
pointer-events: none;
visibility: hidden;
opacity: 0;
- transition:
- visibility 0s 0.2s,
- opacity 0.2s ease-in;
+ transition: visibility 0s 0.2s, opacity 0.2s ease-in;
}
.cesium-selection-wrapper-visible {
diff --git a/packages/widgets/Source/SelectionIndicator/SelectionIndicator.js b/packages/widgets/Source/SelectionIndicator/SelectionIndicator.js
index d123c03dc091..53c2ee83f9bf 100644
--- a/packages/widgets/Source/SelectionIndicator/SelectionIndicator.js
+++ b/packages/widgets/Source/SelectionIndicator/SelectionIndicator.js
@@ -35,7 +35,7 @@ function SelectionIndicator(container, scene) {
"data-bind",
'\
style: { "top" : _screenPositionY, "left" : _screenPositionX },\
-css: { "cesium-selection-wrapper-visible" : isVisible }',
+css: { "cesium-selection-wrapper-visible" : isVisible }'
);
container.appendChild(el);
this._element = el;
@@ -63,7 +63,7 @@ css: { "cesium-selection-wrapper-visible" : isVisible }',
const viewModel = new SelectionIndicatorViewModel(
scene,
this._element,
- this._container,
+ this._container
);
this._viewModel = viewModel;
diff --git a/packages/widgets/Source/SelectionIndicator/SelectionIndicatorViewModel.js b/packages/widgets/Source/SelectionIndicator/SelectionIndicatorViewModel.js
index e5d5c63137be..d6ba66c211ec 100644
--- a/packages/widgets/Source/SelectionIndicator/SelectionIndicatorViewModel.js
+++ b/packages/widgets/Source/SelectionIndicator/SelectionIndicatorViewModel.js
@@ -23,7 +23,7 @@ const offScreen = "-1000px";
function SelectionIndicatorViewModel(
scene,
selectionIndicatorElement,
- container,
+ container
) {
//>>includeStart('debug', pragmas.debug);
if (!defined(scene)) {
@@ -110,7 +110,7 @@ SelectionIndicatorViewModel.prototype.update = function () {
if (this.showSelection && defined(this.position)) {
const screenPosition = this.computeScreenSpacePosition(
this.position,
- screenSpacePos,
+ screenSpacePos
);
if (!defined(screenPosition)) {
this._screenPositionX = offScreen;
@@ -125,12 +125,12 @@ SelectionIndicatorViewModel.prototype.update = function () {
screenPosition.x =
Math.min(
Math.max(screenPosition.x, -indicatorSize),
- containerWidth + indicatorSize,
+ containerWidth + indicatorSize
) - halfSize;
screenPosition.y =
Math.min(
Math.max(screenPosition.y, -indicatorSize),
- containerHeight + indicatorSize,
+ containerHeight + indicatorSize
) - halfSize;
this._screenPositionX = `${Math.floor(screenPosition.x + 0.25)}px`;
diff --git a/packages/widgets/Source/SvgPathBindingHandler.js b/packages/widgets/Source/SvgPathBindingHandler.js
index 773f98dac73d..5ffe18660450 100644
--- a/packages/widgets/Source/SvgPathBindingHandler.js
+++ b/packages/widgets/Source/SvgPathBindingHandler.js
@@ -59,7 +59,7 @@ const SvgPathBindingHandler = {
if (value.css) {
svg.setAttribute(
"class",
- `${svgClassName} ${knockout.unwrap(value.css)}`,
+ `${svgClassName} ${knockout.unwrap(value.css)}`
);
}
},
diff --git a/packages/widgets/Source/Timeline/Timeline.js b/packages/widgets/Source/Timeline/Timeline.js
index c2eb1c40d21f..581bb7a33731 100644
--- a/packages/widgets/Source/Timeline/Timeline.js
+++ b/packages/widgets/Source/Timeline/Timeline.js
@@ -250,13 +250,13 @@ Timeline.prototype.addTrack = function (
interval,
heightInPx,
color,
- backgroundColor,
+ backgroundColor
) {
const newTrack = new TimelineTrack(
interval,
heightInPx,
color,
- backgroundColor,
+ backgroundColor
);
this._trackList.push(newTrack);
this._lastHeight = undefined;
@@ -294,7 +294,7 @@ Timeline.prototype.zoomTo = function (startTime, stopTime) {
const clockSpan = JulianDate.secondsDifference(clockEnd, clockStart);
const startOffset = JulianDate.secondsDifference(
clockStart,
- this._startJulian,
+ this._startJulian
);
const endOffset = JulianDate.secondsDifference(clockEnd, this._endJulian);
@@ -308,24 +308,24 @@ Timeline.prototype.zoomTo = function (startTime, stopTime) {
this._endJulian = JulianDate.addSeconds(
this._endJulian,
startOffset,
- new JulianDate(),
+ new JulianDate()
);
this._startJulian = clockStart;
this._timeBarSecondsSpan = JulianDate.secondsDifference(
this._endJulian,
- this._startJulian,
+ this._startJulian
);
} else if (endOffset < 0) {
// if timeline end is after clock end, shift left
this._startJulian = JulianDate.addSeconds(
this._startJulian,
endOffset,
- new JulianDate(),
+ new JulianDate()
);
this._endJulian = clockEnd;
this._timeBarSecondsSpan = JulianDate.secondsDifference(
this._endJulian,
- this._startJulian,
+ this._startJulian
);
}
}
@@ -348,7 +348,7 @@ Timeline.prototype.zoomTo = function (startTime, stopTime) {
Timeline.prototype.zoomFrom = function (amount) {
let centerSec = JulianDate.secondsDifference(
this._scrubJulian,
- this._startJulian,
+ this._startJulian
);
if (amount > 1 || centerSec < 0 || centerSec > this._timeBarSecondsSpan) {
centerSec = this._timeBarSecondsSpan * 0.5;
@@ -360,13 +360,13 @@ Timeline.prototype.zoomFrom = function (amount) {
JulianDate.addSeconds(
this._startJulian,
centerSec - centerSec * amount,
- new JulianDate(),
+ new JulianDate()
),
JulianDate.addSeconds(
this._endJulian,
centerSecFlip * amount - centerSecFlip,
- new JulianDate(),
- ),
+ new JulianDate()
+ )
);
};
@@ -392,7 +392,7 @@ Timeline.prototype.makeLabel = function (time) {
return `${timelineMonthNames[gregorian.month - 1]} ${gregorian.day} ${
gregorian.year
} ${twoDigits(gregorian.hour)}:${twoDigits(gregorian.minute)}:${twoDigits(
- gregorian.second,
+ gregorian.second
)}${millisecondString}`;
};
@@ -409,10 +409,10 @@ Timeline.prototype._makeTics = function () {
const seconds = JulianDate.secondsDifference(
this._scrubJulian,
- this._startJulian,
+ this._startJulian
);
const xPos = Math.round(
- (seconds * this._topDiv.clientWidth) / this._timeBarSecondsSpan,
+ (seconds * this._topDiv.clientWidth) / this._timeBarSecondsSpan
);
const scrubX = xPos - 8;
let tic;
@@ -436,7 +436,7 @@ Timeline.prototype._makeTics = function () {
this._endJulian = JulianDate.addSeconds(
this._startJulian,
minimumDuration,
- new JulianDate(),
+ new JulianDate()
);
} else if (duration > maximumDuration) {
duration = maximumDuration;
@@ -444,7 +444,7 @@ Timeline.prototype._makeTics = function () {
this._endJulian = JulianDate.addSeconds(
this._startJulian,
maximumDuration,
- new JulianDate(),
+ new JulianDate()
);
}
@@ -463,31 +463,31 @@ Timeline.prototype._makeTics = function () {
if (duration > 315360000) {
// 3650+ days visible, epoch is start of the first visible century.
epochJulian = JulianDate.fromDate(
- new Date(Date.UTC(Math.floor(gregorianDate.year / 100) * 100, 0)),
+ new Date(Date.UTC(Math.floor(gregorianDate.year / 100) * 100, 0))
);
} else if (duration > 31536000) {
// 365+ days visible, epoch is start of the first visible decade.
epochJulian = JulianDate.fromDate(
- new Date(Date.UTC(Math.floor(gregorianDate.year / 10) * 10, 0)),
+ new Date(Date.UTC(Math.floor(gregorianDate.year / 10) * 10, 0))
);
} else if (duration > 86400) {
// 1+ day(s) visible, epoch is start of the year.
epochJulian = JulianDate.fromDate(
- new Date(Date.UTC(gregorianDate.year, 0)),
+ new Date(Date.UTC(gregorianDate.year, 0))
);
} else {
// Less than a day on timeline, epoch is midnight of the visible day.
epochJulian = JulianDate.fromDate(
new Date(
- Date.UTC(gregorianDate.year, gregorianDate.month, gregorianDate.day),
- ),
+ Date.UTC(gregorianDate.year, gregorianDate.month, gregorianDate.day)
+ )
);
}
// startTime: Seconds offset of the left side of the timeline from epochJulian.
const startTime = JulianDate.secondsDifference(
this._startJulian,
- JulianDate.addSeconds(epochJulian, epsilonTime, new JulianDate()),
+ JulianDate.addSeconds(epochJulian, epsilonTime, new JulianDate())
);
// endTime: Seconds offset of the right side of the timeline from epochJulian.
let endTime = startTime + duration;
@@ -512,7 +512,7 @@ Timeline.prototype._makeTics = function () {
// Width in pixels of a typical label, plus padding
this._rulerEle.innerHTML = this.makeLabel(
- JulianDate.addSeconds(this._endJulian, -minimumDuration, new JulianDate()),
+ JulianDate.addSeconds(this._endJulian, -minimumDuration, new JulianDate())
);
let sampleWidth = this._rulerEle.offsetWidth + 20;
if (sampleWidth < 30) {
@@ -616,7 +616,7 @@ Timeline.prototype._makeTics = function () {
tic = getNextTic(tic, tinyTic)
) {
tics += ` `;
}
}
@@ -627,7 +627,7 @@ Timeline.prototype._makeTics = function () {
tic = getNextTic(tic, subTic)
) {
tics += ` `;
}
}
@@ -640,7 +640,7 @@ Timeline.prototype._makeTics = function () {
let ticTime = JulianDate.addSeconds(
startJulian,
tic - startTime,
- new JulianDate(),
+ new JulianDate()
);
if (mainTic > 2.1) {
const ticLeap = JulianDate.computeTaiMinusUtc(ticTime);
@@ -649,7 +649,7 @@ Timeline.prototype._makeTics = function () {
ticTime = JulianDate.addSeconds(
startJulian,
tic - startTime,
- new JulianDate(),
+ new JulianDate()
);
}
}
@@ -685,7 +685,7 @@ Timeline.prototype._makeTics = function () {
0,
0,
this._trackListEle.width,
- this._trackListEle.height,
+ this._trackListEle.height
);
renderState.y = 0;
@@ -704,10 +704,10 @@ Timeline.prototype.updateFromClock = function () {
if (defined(this._scrubElement)) {
const seconds = JulianDate.secondsDifference(
this._scrubJulian,
- this._startJulian,
+ this._startJulian
);
const xPos = Math.round(
- (seconds * this._topDiv.clientWidth) / this._timeBarSecondsSpan,
+ (seconds * this._topDiv.clientWidth) / this._timeBarSecondsSpan
);
if (this._lastXPos !== xPos) {
@@ -721,19 +721,19 @@ Timeline.prototype.updateFromClock = function () {
this._setTimeBarTime(
this._timelineDragLocation,
(this._timelineDragLocation * this._timeBarSecondsSpan) /
- this._topDiv.clientWidth,
+ this._topDiv.clientWidth
);
this.zoomTo(
JulianDate.addSeconds(
this._startJulian,
this._timelineDrag,
- new JulianDate(),
+ new JulianDate()
),
JulianDate.addSeconds(
this._endJulian,
this._timelineDrag,
- new JulianDate(),
- ),
+ new JulianDate()
+ )
);
}
};
@@ -746,7 +746,7 @@ Timeline.prototype._setTimeBarTime = function (xPos, seconds) {
this._scrubJulian = JulianDate.addSeconds(
this._startJulian,
seconds,
- new JulianDate(),
+ new JulianDate()
);
if (this._scrubElement) {
const scrubX = xPos - 8;
@@ -813,7 +813,7 @@ function createMouseMoveCallback(timeline) {
timeline._timelineDragLocation = undefined;
timeline._setTimeBarTime(
x,
- (x * timeline._timeBarSecondsSpan) / timeline._topDiv.clientWidth,
+ (x * timeline._timeBarSecondsSpan) / timeline._topDiv.clientWidth
);
}
} else if (timeline._mouseMode === timelineMouseMode.slide) {
@@ -824,7 +824,7 @@ function createMouseMoveCallback(timeline) {
(dx * timeline._timeBarSecondsSpan) / timeline._topDiv.clientWidth;
timeline.zoomTo(
JulianDate.addSeconds(timeline._startJulian, dsec, new JulianDate()),
- JulianDate.addSeconds(timeline._endJulian, dsec, new JulianDate()),
+ JulianDate.addSeconds(timeline._endJulian, dsec, new JulianDate())
);
}
} else if (timeline._mouseMode === timelineMouseMode.zoom) {
@@ -842,7 +842,7 @@ function createMouseWheelCallback(timeline) {
let dy = e.wheelDeltaY || e.wheelDelta || -e.detail;
timelineWheelDelta = Math.max(
Math.min(Math.abs(dy), timelineWheelDelta),
- 1,
+ 1
);
dy /= timelineWheelDelta;
timeline.zoomFrom(Math.pow(1.05, -dy));
@@ -859,12 +859,12 @@ function createTouchStartCallback(timeline) {
if (len === 1) {
seconds = JulianDate.secondsDifference(
timeline._scrubJulian,
- timeline._startJulian,
+ timeline._startJulian
);
xPos = Math.round(
(seconds * timeline._topDiv.clientWidth) /
timeline._timeBarSecondsSpan +
- leftX,
+ leftX
);
if (Math.abs(e.touches[0].clientX - xPos) < 50) {
timeline._touchMode = timelineTouchMode.scrub;
@@ -881,7 +881,7 @@ function createTouchStartCallback(timeline) {
timeline._touchState.centerX =
(e.touches[0].clientX + e.touches[1].clientX) * 0.5 - leftX;
timeline._touchState.spanX = Math.abs(
- e.touches[0].clientX - e.touches[1].clientX,
+ e.touches[0].clientX - e.touches[1].clientX
);
} else {
timeline._touchMode = timelineTouchMode.ignore;
@@ -933,7 +933,7 @@ function createTouchMoveCallback(timeline) {
if (x >= 0 && x <= timeline._topDiv.clientWidth) {
timeline._setTimeBarTime(
x,
- (x * timeline._timeBarSecondsSpan) / timeline._topDiv.clientWidth,
+ (x * timeline._timeBarSecondsSpan) / timeline._topDiv.clientWidth
);
}
}
@@ -956,7 +956,7 @@ function createTouchMoveCallback(timeline) {
(timeline._touchState.centerX * timeline._timeBarSecondsSpan -
newCenter * timeline._timeBarSecondsSpan * zoom) /
timeline._topDiv.clientWidth,
- new JulianDate(),
+ new JulianDate()
);
} else {
// Slide to newCenter
@@ -964,7 +964,7 @@ function createTouchMoveCallback(timeline) {
newStartTime = JulianDate.addSeconds(
timeline._startJulian,
(dx * timeline._timeBarSecondsSpan) / timeline._topDiv.clientWidth,
- new JulianDate(),
+ new JulianDate()
);
}
@@ -973,8 +973,8 @@ function createTouchMoveCallback(timeline) {
JulianDate.addSeconds(
newStartTime,
timeline._timeBarSecondsSpan * zoom,
- new JulianDate(),
- ),
+ new JulianDate()
+ )
);
timeline._touchState.centerX = newCenter;
timeline._touchState.spanX = newSpan;
diff --git a/packages/widgets/Source/Timeline/TimelineHighlightRange.js b/packages/widgets/Source/Timeline/TimelineHighlightRange.js
index de11a00d388d..0d2baec78599 100644
--- a/packages/widgets/Source/Timeline/TimelineHighlightRange.js
+++ b/packages/widgets/Source/Timeline/TimelineHighlightRange.js
@@ -35,18 +35,18 @@ TimelineHighlightRange.prototype.render = function (renderState) {
if (this._start && this._stop && this._color) {
const highlightStart = JulianDate.secondsDifference(
this._start,
- renderState.epochJulian,
+ renderState.epochJulian
);
let highlightLeft = Math.round(
- renderState.timeBarWidth * renderState.getAlpha(highlightStart),
+ renderState.timeBarWidth * renderState.getAlpha(highlightStart)
);
const highlightStop = JulianDate.secondsDifference(
this._stop,
- renderState.epochJulian,
+ renderState.epochJulian
);
let highlightWidth =
Math.round(
- renderState.timeBarWidth * renderState.getAlpha(highlightStop),
+ renderState.timeBarWidth * renderState.getAlpha(highlightStop)
) - highlightLeft;
if (highlightLeft < 0) {
highlightWidth += highlightLeft;
diff --git a/packages/widgets/Source/Timeline/TimelineTrack.js b/packages/widgets/Source/Timeline/TimelineTrack.js
index f9e0e26e697d..c661df9cbd71 100644
--- a/packages/widgets/Source/Timeline/TimelineTrack.js
+++ b/packages/widgets/Source/Timeline/TimelineTrack.js
@@ -18,7 +18,7 @@ TimelineTrack.prototype.render = function (context, renderState) {
const spanStop = JulianDate.addSeconds(
renderState.startJulian,
renderState.duration,
- new JulianDate(),
+ new JulianDate()
);
if (
@@ -39,7 +39,7 @@ TimelineTrack.prototype.render = function (context, renderState) {
const currentTime = JulianDate.addSeconds(
renderState.startJulian,
(x / renderState.timeBarWidth) * renderState.duration,
- new JulianDate(),
+ new JulianDate()
);
if (
!defined(start) &&
@@ -66,7 +66,7 @@ TimelineTrack.prototype.render = function (context, renderState) {
start,
renderState.y,
Math.max(stop - start, 1),
- this.height,
+ this.height
);
}
}
diff --git a/packages/widgets/Source/VRButton/VRButton.js b/packages/widgets/Source/VRButton/VRButton.js
index 48bc9b9b6e7a..0c22bf11d8b4 100644
--- a/packages/widgets/Source/VRButton/VRButton.js
+++ b/packages/widgets/Source/VRButton/VRButton.js
@@ -51,7 +51,7 @@ css: { "cesium-button-disabled" : _isOrthographic }, \
attr: { title: tooltip },\
click: command,\
enable: isVREnabled,\
-cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }',
+cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }'
);
container.appendChild(element);
diff --git a/packages/widgets/Source/VRButton/VRButtonViewModel.js b/packages/widgets/Source/VRButton/VRButtonViewModel.js
index 21cc736d0813..1f5697fbb39e 100644
--- a/packages/widgets/Source/VRButton/VRButtonViewModel.js
+++ b/packages/widgets/Source/VRButton/VRButtonViewModel.js
@@ -149,12 +149,9 @@ function VRButtonViewModel(scene, vrElement) {
this._locked = false;
this._noSleep = new NoSleep();
- this._command = createCommand(
- function () {
- toggleVR(that, scene, isVRMode, isOrthographic);
- },
- knockout.getObservable(this, "isVREnabled"),
- );
+ this._command = createCommand(function () {
+ toggleVR(that, scene, isVRMode, isOrthographic);
+ }, knockout.getObservable(this, "isVREnabled"));
this._vrElement = defaultValue(getElement(vrElement), document.body);
diff --git a/packages/widgets/Source/Viewer/Viewer.js b/packages/widgets/Source/Viewer/Viewer.js
index 26983bdc3819..4b4f8cf35e26 100644
--- a/packages/widgets/Source/Viewer/Viewer.js
+++ b/packages/widgets/Source/Viewer/Viewer.js
@@ -152,7 +152,7 @@ function trackDataSourceClock(timeline, clock, dataSource) {
stopTime = JulianDate.addSeconds(
startTime,
CesiumMath.EPSILON2,
- scratchStopTime,
+ scratchStopTime
);
}
timeline.updateFromClock();
@@ -167,8 +167,10 @@ const cartesian3Scratch = new Cartesian3();
function pickImageryLayerFeature(viewer, windowPosition) {
const scene = viewer.scene;
const pickRay = scene.camera.getPickRay(windowPosition);
- const imageryLayerFeaturePromise =
- scene.imageryLayers.pickImageryLayerFeatures(pickRay, scene);
+ const imageryLayerFeaturePromise = scene.imageryLayers.pickImageryLayerFeatures(
+ pickRay,
+ scene
+ );
if (!defined(imageryLayerFeaturePromise)) {
return;
}
@@ -202,7 +204,7 @@ function pickImageryLayerFeature(viewer, windowPosition) {
if (defined(feature.position)) {
const ecfPosition = viewer.scene.ellipsoid.cartographicToCartesian(
feature.position,
- cartesian3Scratch,
+ cartesian3Scratch
);
entity.position = new ConstantPositionProperty(ecfPosition);
}
@@ -215,7 +217,7 @@ function pickImageryLayerFeature(viewer, windowPosition) {
return;
}
viewer.selectedEntity = createNoFeaturesEntity();
- },
+ }
);
return loadingMessage;
@@ -430,7 +432,7 @@ function Viewer(container, options) {
) {
throw new DeveloperError(
"options.selectedImageryProviderViewModel is not available when not using the BaseLayerPicker widget. \
-Either specify options.baseLayer instead or set options.baseLayerPicker to true.",
+Either specify options.baseLayer instead or set options.baseLayerPicker to true."
);
}
@@ -441,7 +443,7 @@ Either specify options.baseLayer instead or set options.baseLayerPicker to true.
) {
throw new DeveloperError(
"options.selectedTerrainProviderViewModel is not available when not using the BaseLayerPicker widget. \
-Either specify options.terrainProvider instead or set options.baseLayerPicker to true.",
+Either specify options.terrainProvider instead or set options.baseLayerPicker to true."
);
}
//>>includeEnd('debug')
@@ -549,7 +551,7 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
viewerContainer.appendChild(selectionIndicatorContainer);
selectionIndicator = new SelectionIndicator(
selectionIndicatorContainer,
- scene,
+ scene
);
}
@@ -565,12 +567,12 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
eventHelper.add(
infoBoxViewModel.cameraClicked,
Viewer.prototype._onInfoBoxCameraClicked,
- this,
+ this
);
eventHelper.add(
infoBoxViewModel.closeClicked,
Viewer.prototype._onInfoBoxClockClicked,
- this,
+ this
);
}
@@ -600,7 +602,7 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
eventHelper.add(
geocoder.viewModel.search.beforeExecute,
Viewer.prototype._clearObjects,
- this,
+ this
);
}
@@ -621,7 +623,7 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
eventHelper.add(
homeButton.viewModel.command.beforeExecute,
Viewer.prototype._clearTrackedObject,
- this,
+ this
);
}
@@ -631,7 +633,7 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
//>>includeStart('debug', pragmas.debug);
if (options.sceneModePicker === true && scene3DOnly) {
throw new DeveloperError(
- "options.sceneModePicker is not available when options.scene3DOnly is set to true.",
+ "options.sceneModePicker is not available when options.scene3DOnly is set to true."
);
}
//>>includeEnd('debug');
@@ -655,11 +657,11 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
if (createBaseLayerPicker) {
const imageryProviderViewModels = defaultValue(
options.imageryProviderViewModels,
- createDefaultImageryProviderViewModels(),
+ createDefaultImageryProviderViewModels()
);
const terrainProviderViewModels = defaultValue(
options.terrainProviderViewModels,
- createDefaultTerrainProviderViewModels(),
+ createDefaultTerrainProviderViewModels()
);
baseLayerPicker = new BaseLayerPicker(toolbar, {
@@ -674,7 +676,7 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
//Grab the dropdown for resize code.
const elements = toolbar.getElementsByClassName(
- "cesium-baseLayerPicker-dropDown",
+ "cesium-baseLayerPicker-dropDown"
);
baseLayerPickerDropDown = elements[0];
}
@@ -699,7 +701,7 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
//>>includeStart('debug', pragmas.debug);
if (defined(options.terrainProvider)) {
throw new DeveloperError(
- "Specify either options.terrainProvider or options.terrain.",
+ "Specify either options.terrainProvider or options.terrain."
);
}
//>>includeEnd('debug')
@@ -723,7 +725,7 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
//window.localStorage is null if disabled in Firefox or undefined in browsers with implementation
if (defined(window.localStorage)) {
const hasSeenNavHelp = window.localStorage.getItem(
- "cesium-hasSeenNavHelp",
+ "cesium-hasSeenNavHelp"
);
if (defined(hasSeenNavHelp) && Boolean(hasSeenNavHelp)) {
showNavHelp = false;
@@ -739,7 +741,7 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
container: toolbar,
instructionsInitiallyVisible: defaultValue(
options.navigationInstructionsInitiallyVisible,
- showNavHelp,
+ showNavHelp
),
});
}
@@ -752,7 +754,7 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
viewerContainer.appendChild(animationContainer);
animation = new Animation(
animationContainer,
- new AnimationViewModel(clockViewModel),
+ new AnimationViewModel(clockViewModel)
);
}
@@ -780,7 +782,7 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
viewerContainer.appendChild(fullscreenContainer);
fullscreenButton = new FullscreenButton(
fullscreenContainer,
- options.fullscreenElement,
+ options.fullscreenElement
);
//Subscribe to fullscreenButton.viewModel.isFullscreenEnabled so
@@ -796,7 +798,7 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
timeline.container.style.right = `${fullscreenContainer.clientWidth}px`;
timeline.resize();
}
- },
+ }
);
}
@@ -822,7 +824,7 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
timeline.container.style.right = `${vrContainer.clientWidth}px`;
timeline.resize();
}
- },
+ }
);
vrModeSubscription = subscribeAndEvaluate(
@@ -830,7 +832,7 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
"isVRMode",
function (isVRMode) {
enableVRUI(that, isVRMode);
- },
+ }
);
}
@@ -843,7 +845,7 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
this._dataSourceChangedListeners = {};
this._automaticallyTrackDataSourceClocks = defaultValue(
options.automaticallyTrackDataSourceClocks,
- true,
+ true
);
this._container = container;
this._bottomContainer = bottomContainer;
@@ -894,12 +896,12 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
eventHelper.add(
dataSourceCollection.dataSourceAdded,
Viewer.prototype._onDataSourceAdded,
- this,
+ this
);
eventHelper.add(
dataSourceCollection.dataSourceRemoved,
Viewer.prototype._onDataSourceRemoved,
- this,
+ this
);
// Prior to each render, check if anything needs to be resized.
@@ -919,12 +921,12 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
eventHelper.add(
dataSourceCollection.dataSourceAdded,
Viewer.prototype._dataSourceAdded,
- this,
+ this
);
eventHelper.add(
dataSourceCollection.dataSourceRemoved,
Viewer.prototype._dataSourceRemoved,
- this,
+ this
);
// Subscribe to left clicks and zoom to the picked object.
@@ -950,11 +952,11 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
cesiumWidget.screenSpaceEventHandler.setInputAction(
pickAndSelectObject,
- ScreenSpaceEventType.LEFT_CLICK,
+ ScreenSpaceEventType.LEFT_CLICK
);
cesiumWidget.screenSpaceEventHandler.setInputAction(
pickAndTrackObject,
- ScreenSpaceEventType.LEFT_DOUBLE_CLICK,
+ ScreenSpaceEventType.LEFT_DOUBLE_CLICK
);
}
@@ -1744,10 +1746,10 @@ Viewer.prototype.destroy = function () {
!this.screenSpaceEventHandler.isDestroyed()
) {
this.screenSpaceEventHandler.removeInputAction(
- ScreenSpaceEventType.LEFT_CLICK,
+ ScreenSpaceEventType.LEFT_CLICK
);
this.screenSpaceEventHandler.removeInputAction(
- ScreenSpaceEventType.LEFT_DOUBLE_CLICK,
+ ScreenSpaceEventType.LEFT_DOUBLE_CLICK
);
}
@@ -1793,7 +1795,7 @@ Viewer.prototype.destroy = function () {
this._timeline.removeEventListener(
"settime",
onTimelineScrubfunction,
- false,
+ false
);
this._element.removeChild(this._timeline.container);
this._timeline = this._timeline.destroy();
@@ -1840,12 +1842,12 @@ Viewer.prototype.destroy = function () {
*/
Viewer.prototype._dataSourceAdded = function (
dataSourceCollection,
- dataSource,
+ dataSource
) {
const entityCollection = dataSource.entities;
entityCollection.collectionChanged.addEventListener(
Viewer.prototype._onEntityCollectionChanged,
- this,
+ this
);
};
@@ -1854,12 +1856,12 @@ Viewer.prototype._dataSourceAdded = function (
*/
Viewer.prototype._dataSourceRemoved = function (
dataSourceCollection,
- dataSource,
+ dataSource
) {
const entityCollection = dataSource.entities;
entityCollection.collectionChanged.removeEventListener(
Viewer.prototype._onEntityCollectionChanged,
- this,
+ this
);
if (defined(this.trackedEntity)) {
@@ -1896,7 +1898,7 @@ Viewer.prototype._onTick = function (clock) {
const trackedState = this._dataSourceDisplay.getBoundingSphere(
trackedEntity,
false,
- boundingSphereScratch,
+ boundingSphereScratch
);
if (trackedState === BoundingSphereState.DONE) {
entityView.update(time, boundingSphereScratch);
@@ -1916,7 +1918,7 @@ Viewer.prototype._onTick = function (clock) {
const state = this._dataSourceDisplay.getBoundingSphere(
selectedEntity,
true,
- boundingSphereScratch,
+ boundingSphereScratch
);
if (state !== BoundingSphereState.FAILED) {
position = boundingSphereScratch.center;
@@ -1932,7 +1934,7 @@ Viewer.prototype._onTick = function (clock) {
if (defined(selectionIndicatorViewModel)) {
selectionIndicatorViewModel.position = Cartesian3.clone(
position,
- selectionIndicatorViewModel.position,
+ selectionIndicatorViewModel.position
);
selectionIndicatorViewModel.showSelection = showSelection && enableCamera;
selectionIndicatorViewModel.update();
@@ -1950,12 +1952,12 @@ Viewer.prototype._onTick = function (clock) {
if (showSelection) {
infoBoxViewModel.titleText = defaultValue(
selectedEntity.name,
- selectedEntity.id,
+ selectedEntity.id
);
infoBoxViewModel.description = Property.getValueOrDefault(
selectedEntity.description,
time,
- "",
+ ""
);
} else {
infoBoxViewModel.titleText = "";
@@ -1970,7 +1972,7 @@ Viewer.prototype._onTick = function (clock) {
Viewer.prototype._onEntityCollectionChanged = function (
collection,
added,
- removed,
+ removed
) {
const length = removed.length;
for (let i = 0; i < length; i++) {
@@ -2040,7 +2042,7 @@ Viewer.prototype._onDataSourceChanged = function (dataSource) {
*/
Viewer.prototype._onDataSourceAdded = function (
dataSourceCollection,
- dataSource,
+ dataSource
) {
if (this._automaticallyTrackDataSourceClocks) {
this.clockTrackedDataSource = dataSource;
@@ -2049,7 +2051,7 @@ Viewer.prototype._onDataSourceAdded = function (
const removalFunc = this._eventHelper.add(
dataSource.changedEvent,
Viewer.prototype._onDataSourceChanged,
- this,
+ this
);
this._dataSourceChangedListeners[id] = removalFunc;
};
@@ -2059,7 +2061,7 @@ Viewer.prototype._onDataSourceAdded = function (
*/
Viewer.prototype._onDataSourceRemoved = function (
dataSourceCollection,
- dataSource,
+ dataSource
) {
const resetClock = this.clockTrackedDataSource === dataSource;
const id = dataSource.entities.id;
@@ -2069,7 +2071,7 @@ Viewer.prototype._onDataSourceRemoved = function (
const numDataSources = dataSourceCollection.length;
if (this._automaticallyTrackDataSourceClocks && numDataSources > 0) {
this.clockTrackedDataSource = dataSourceCollection.get(
- numDataSources - 1,
+ numDataSources - 1
);
} else {
this.clockTrackedDataSource = undefined;
@@ -2271,7 +2273,7 @@ function updateZoomTarget(viewer) {
zoomOptions.offset = new HeadingPitchRange(
0.0,
-0.5,
- boundingSphere.radius,
+ boundingSphere.radius
);
}
@@ -2307,12 +2309,12 @@ function updateZoomTarget(viewer) {
}
// Otherwise, the first "frame" needs to have been rendered
- const removeEventListener = target.frameChanged.addEventListener(
- function (timeDynamicPointCloud) {
- zoomToBoundingSphere(timeDynamicPointCloud.boundingSphere);
- removeEventListener();
- },
- );
+ const removeEventListener = target.frameChanged.addEventListener(function (
+ timeDynamicPointCloud
+ ) {
+ zoomToBoundingSphere(timeDynamicPointCloud.boundingSphere);
+ removeEventListener();
+ });
return;
}
@@ -2352,7 +2354,7 @@ function updateZoomTarget(viewer) {
const state = viewer._dataSourceDisplay.getBoundingSphere(
entities[i],
false,
- boundingSphereScratch,
+ boundingSphereScratch
);
if (state === BoundingSphereState.PENDING) {
@@ -2406,7 +2408,7 @@ function updateTrackedEntity(viewer) {
//computed. In this case, we will track the entity once it comes back into existence.
const currentPosition = Property.getValueOrUndefined(
trackedEntity.position,
- currentTime,
+ currentTime
);
if (!defined(currentPosition)) {
@@ -2418,7 +2420,7 @@ function updateTrackedEntity(viewer) {
const state = viewer._dataSourceDisplay.getBoundingSphere(
trackedEntity,
false,
- boundingSphereScratch,
+ boundingSphereScratch
);
if (state === BoundingSphereState.PENDING) {
return;
diff --git a/packages/widgets/Source/Viewer/viewerCesium3DTilesInspectorMixin.js b/packages/widgets/Source/Viewer/viewerCesium3DTilesInspectorMixin.js
index c8cf827bdb08..1d6e985adc31 100644
--- a/packages/widgets/Source/Viewer/viewerCesium3DTilesInspectorMixin.js
+++ b/packages/widgets/Source/Viewer/viewerCesium3DTilesInspectorMixin.js
@@ -23,7 +23,7 @@ function viewerCesium3DTilesInspectorMixin(viewer) {
viewer.container.appendChild(container);
const cesium3DTilesInspector = new Cesium3DTilesInspector(
container,
- viewer.scene,
+ viewer.scene
);
Object.defineProperties(viewer, {
diff --git a/packages/widgets/Source/Viewer/viewerCesiumInspectorMixin.js b/packages/widgets/Source/Viewer/viewerCesiumInspectorMixin.js
index a5e0afe8c9e6..3d1ad208b481 100644
--- a/packages/widgets/Source/Viewer/viewerCesiumInspectorMixin.js
+++ b/packages/widgets/Source/Viewer/viewerCesiumInspectorMixin.js
@@ -29,7 +29,7 @@ function viewerCesiumInspectorMixin(viewer) {
viewer.container.appendChild(cesiumInspectorContainer);
const cesiumInspector = new CesiumInspector(
cesiumInspectorContainer,
- viewer.scene,
+ viewer.scene
);
Object.defineProperties(viewer, {
diff --git a/packages/widgets/Source/Viewer/viewerDragDropMixin.js b/packages/widgets/Source/Viewer/viewerDragDropMixin.js
index 6e11d882c7b0..24f6b896f50c 100644
--- a/packages/widgets/Source/Viewer/viewerDragDropMixin.js
+++ b/packages/widgets/Source/Viewer/viewerDragDropMixin.js
@@ -48,7 +48,7 @@ function viewerDragDropMixin(viewer, options) {
}
if (viewer.hasOwnProperty("dropEnabled")) {
throw new DeveloperError(
- "dropEnabled is already defined by another mixin.",
+ "dropEnabled is already defined by another mixin."
);
}
if (viewer.hasOwnProperty("dropError")) {
@@ -56,12 +56,12 @@ function viewerDragDropMixin(viewer, options) {
}
if (viewer.hasOwnProperty("clearOnDrop")) {
throw new DeveloperError(
- "clearOnDrop is already defined by another mixin.",
+ "clearOnDrop is already defined by another mixin."
);
}
if (viewer.hasOwnProperty("flyToOnDrop")) {
throw new DeveloperError(
- "flyToOnDrop is already defined by another mixin.",
+ "flyToOnDrop is already defined by another mixin."
);
}
//>>includeEnd('debug');
@@ -283,7 +283,7 @@ function createOnLoadCallback(viewer, file, proxy, clampToGround) {
viewer.dropError.raiseEvent(
viewer,
fileName,
- `Unrecognized file: ${fileName}`,
+ `Unrecognized file: ${fileName}`
);
return;
}
diff --git a/packages/widgets/Source/VoxelInspector/VoxelInspector.js b/packages/widgets/Source/VoxelInspector/VoxelInspector.js
index 7cf771bc39e9..26871cfbe81e 100644
--- a/packages/widgets/Source/VoxelInspector/VoxelInspector.js
+++ b/packages/widgets/Source/VoxelInspector/VoxelInspector.js
@@ -42,7 +42,7 @@ function VoxelInspector(container, scene) {
element.className = "cesium-cesiumInspector cesium-VoxelInspector";
element.setAttribute(
"data-bind",
- 'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}',
+ 'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'
);
container.appendChild(element);
@@ -59,55 +59,55 @@ function VoxelInspector(container, scene) {
panel,
"Display",
"displayVisible",
- "toggleDisplay",
+ "toggleDisplay"
);
const transformPanelContents = createSection(
panel,
"Transform",
"transformVisible",
- "toggleTransform",
+ "toggleTransform"
);
const boundsPanelContents = createSection(
panel,
"Bounds",
"boundsVisible",
- "toggleBounds",
+ "toggleBounds"
);
const clippingPanelContents = createSection(
panel,
"Clipping",
"clippingVisible",
- "toggleClipping",
+ "toggleClipping"
);
const shaderPanelContents = createSection(
panel,
"Shader",
"shaderVisible",
- "toggleShader",
+ "toggleShader"
);
// Display
displayPanelContents.appendChild(createCheckbox("Depth Test", "depthTest"));
displayPanelContents.appendChild(createCheckbox("Show", "show"));
displayPanelContents.appendChild(
- createCheckbox("Disable Update", "disableUpdate"),
+ createCheckbox("Disable Update", "disableUpdate")
);
displayPanelContents.appendChild(createCheckbox("Debug Draw", "debugDraw"));
displayPanelContents.appendChild(createCheckbox("Jitter", "jitter"));
displayPanelContents.appendChild(
- createCheckbox("Nearest Sampling", "nearestSampling"),
+ createCheckbox("Nearest Sampling", "nearestSampling")
);
displayPanelContents.appendChild(
- createRangeInput("Screen Space Error", "screenSpaceError", 0, 128),
+ createRangeInput("Screen Space Error", "screenSpaceError", 0, 128)
);
displayPanelContents.appendChild(
- createRangeInput("Step Size", "stepSize", 0.0, 2.0),
+ createRangeInput("Step Size", "stepSize", 0.0, 2.0)
);
// Transform
@@ -116,31 +116,31 @@ function VoxelInspector(container, scene) {
const maxAngle = CesiumMath.PI;
transformPanelContents.appendChild(
- createRangeInput("Translation X", "translationX", -maxTrans, +maxTrans),
+ createRangeInput("Translation X", "translationX", -maxTrans, +maxTrans)
);
transformPanelContents.appendChild(
- createRangeInput("Translation Y", "translationY", -maxTrans, +maxTrans),
+ createRangeInput("Translation Y", "translationY", -maxTrans, +maxTrans)
);
transformPanelContents.appendChild(
- createRangeInput("Translation Z", "translationZ", -maxTrans, +maxTrans),
+ createRangeInput("Translation Z", "translationZ", -maxTrans, +maxTrans)
);
transformPanelContents.appendChild(
- createRangeInput("Scale X", "scaleX", 0, +maxScale),
+ createRangeInput("Scale X", "scaleX", 0, +maxScale)
);
transformPanelContents.appendChild(
- createRangeInput("Scale Y", "scaleY", 0, +maxScale),
+ createRangeInput("Scale Y", "scaleY", 0, +maxScale)
);
transformPanelContents.appendChild(
- createRangeInput("Scale Z", "scaleZ", 0, +maxScale),
+ createRangeInput("Scale Z", "scaleZ", 0, +maxScale)
);
transformPanelContents.appendChild(
- createRangeInput("Heading", "angleX", -maxAngle, +maxAngle),
+ createRangeInput("Heading", "angleX", -maxAngle, +maxAngle)
);
transformPanelContents.appendChild(
- createRangeInput("Pitch", "angleY", -maxAngle, +maxAngle),
+ createRangeInput("Pitch", "angleY", -maxAngle, +maxAngle)
);
transformPanelContents.appendChild(
- createRangeInput("Roll", "angleZ", -maxAngle, +maxAngle),
+ createRangeInput("Roll", "angleZ", -maxAngle, +maxAngle)
);
// Bounds
@@ -151,20 +151,20 @@ function VoxelInspector(container, scene) {
VoxelShapeType.getMinBounds(VoxelShapeType.ELLIPSOID).x,
VoxelShapeType.getMinBounds(VoxelShapeType.ELLIPSOID).y,
-Ellipsoid.WGS84.maximumRadius,
- new Cartesian3(),
+ new Cartesian3()
);
const ellipsoidMaxBounds = Cartesian3.fromElements(
VoxelShapeType.getMaxBounds(VoxelShapeType.ELLIPSOID).x,
VoxelShapeType.getMaxBounds(VoxelShapeType.ELLIPSOID).y,
+10000000.0,
- new Cartesian3(),
+ new Cartesian3()
);
const cylinderMinBounds = VoxelShapeType.getMinBounds(
- VoxelShapeType.CYLINDER,
+ VoxelShapeType.CYLINDER
);
const cylinderMaxBounds = VoxelShapeType.getMaxBounds(
- VoxelShapeType.CYLINDER,
+ VoxelShapeType.CYLINDER
);
makeCoordinateRange(
@@ -183,7 +183,7 @@ function VoxelInspector(container, scene) {
boxMinBounds,
boxMaxBounds,
"shapeIsBox",
- boundsPanelContents,
+ boundsPanelContents
);
makeCoordinateRange(
@@ -202,7 +202,7 @@ function VoxelInspector(container, scene) {
ellipsoidMinBounds,
ellipsoidMaxBounds,
"shapeIsEllipsoid",
- boundsPanelContents,
+ boundsPanelContents
);
makeCoordinateRange(
@@ -221,7 +221,7 @@ function VoxelInspector(container, scene) {
cylinderMinBounds,
cylinderMaxBounds,
"shapeIsCylinder",
- boundsPanelContents,
+ boundsPanelContents
);
// Clipping
@@ -241,7 +241,7 @@ function VoxelInspector(container, scene) {
boxMinBounds,
boxMaxBounds,
"shapeIsBox",
- clippingPanelContents,
+ clippingPanelContents
);
makeCoordinateRange(
@@ -260,7 +260,7 @@ function VoxelInspector(container, scene) {
ellipsoidMinBounds,
ellipsoidMaxBounds,
"shapeIsEllipsoid",
- clippingPanelContents,
+ clippingPanelContents
);
makeCoordinateRange(
@@ -279,7 +279,7 @@ function VoxelInspector(container, scene) {
cylinderMinBounds,
cylinderMaxBounds,
"shapeIsCylinder",
- clippingPanelContents,
+ clippingPanelContents
);
// Shader
@@ -289,13 +289,13 @@ function VoxelInspector(container, scene) {
const shaderEditor = document.createElement("textarea");
shaderEditor.setAttribute(
"data-bind",
- "textInput: shaderString, event: { keydown: shaderEditorKeyPress }",
+ "textInput: shaderString, event: { keydown: shaderEditorKeyPress }"
);
shaderPanelEditor.className = "cesium-cesiumInspector-styleEditor";
shaderPanelEditor.appendChild(shaderEditor);
const compileShaderButton = createButton(
"Compile (Ctrl+Enter)",
- "compileShader",
+ "compileShader"
);
shaderPanelEditor.appendChild(compileShaderButton);
@@ -303,7 +303,7 @@ function VoxelInspector(container, scene) {
compilationText.style.display = "block";
compilationText.setAttribute(
"data-bind",
- "text: shaderCompilationMessage, style: {color: shaderCompilationSuccess ? 'green' : 'red'}",
+ "text: shaderCompilationMessage, style: {color: shaderCompilationSuccess ? 'green' : 'red'}"
);
shaderPanelEditor.appendChild(compilationText);
@@ -371,14 +371,14 @@ function makeCoordinateRange(
defaultMinBounds,
defaultMaxBounds,
allowedShape,
- parentContainer,
+ parentContainer
) {
const createRangeInput = InspectorShared.createRangeInput;
const min = defaultMinBounds;
const max = defaultMaxBounds;
const boundsElement = parentContainer.appendChild(
- document.createElement("div"),
+ document.createElement("div")
);
boundsElement.setAttribute("data-bind", `if: ${allowedShape}`);
boundsElement.appendChild(createRangeInput(maxXTitle, maxXVar, min.x, max.x));
diff --git a/packages/widgets/Source/VoxelInspector/VoxelInspectorViewModel.js b/packages/widgets/Source/VoxelInspector/VoxelInspectorViewModel.js
index 8ecc04914113..317f57e6eed7 100644
--- a/packages/widgets/Source/VoxelInspector/VoxelInspectorViewModel.js
+++ b/packages/widgets/Source/VoxelInspector/VoxelInspectorViewModel.js
@@ -545,7 +545,7 @@ function VoxelInspectorViewModel(scene) {
getPrimitiveFunction: function () {
that.translationX = Matrix4.getTranslation(
that._voxelPrimitive.modelMatrix,
- new Cartesian3(),
+ new Cartesian3()
).x;
},
});
@@ -560,7 +560,7 @@ function VoxelInspectorViewModel(scene) {
getPrimitiveFunction: function () {
that.translationY = Matrix4.getTranslation(
that._voxelPrimitive.modelMatrix,
- new Cartesian3(),
+ new Cartesian3()
).y;
},
});
@@ -575,7 +575,7 @@ function VoxelInspectorViewModel(scene) {
getPrimitiveFunction: function () {
that.translationZ = Matrix4.getTranslation(
that._voxelPrimitive.modelMatrix,
- new Cartesian3(),
+ new Cartesian3()
).z;
},
});
@@ -591,7 +591,7 @@ function VoxelInspectorViewModel(scene) {
getPrimitiveFunction: function () {
that.scaleX = Matrix4.getScale(
that._voxelPrimitive.modelMatrix,
- new Cartesian3(),
+ new Cartesian3()
).x;
},
});
@@ -606,7 +606,7 @@ function VoxelInspectorViewModel(scene) {
getPrimitiveFunction: function () {
that.scaleY = Matrix4.getScale(
that._voxelPrimitive.modelMatrix,
- new Cartesian3(),
+ new Cartesian3()
).y;
},
});
@@ -621,7 +621,7 @@ function VoxelInspectorViewModel(scene) {
getPrimitiveFunction: function () {
that.scaleZ = Matrix4.getScale(
that._voxelPrimitive.modelMatrix,
- new Cartesian3(),
+ new Cartesian3()
).z;
},
});
@@ -667,13 +667,13 @@ function setModelMatrix(viewModel) {
viewModel.translationX,
viewModel.translationY,
viewModel.translationZ,
- scratchTranslation,
+ scratchTranslation
);
const scale = Cartesian3.fromElements(
viewModel.scaleX,
viewModel.scaleY,
viewModel.scaleZ,
- scratchScale,
+ scratchScale
);
const hpr = scratchHeadingPitchRoll;
hpr.heading = viewModel.angleX;
@@ -684,7 +684,7 @@ function setModelMatrix(viewModel) {
viewModel._voxelPrimitive.modelMatrix = Matrix4.fromRotationTranslation(
rotationScale,
translation,
- viewModel._voxelPrimitive.modelMatrix,
+ viewModel._voxelPrimitive.modelMatrix
);
}
@@ -720,22 +720,21 @@ Object.defineProperties(VoxelInspectorViewModel.prototype, {
this._voxelPrimitive = voxelPrimitive;
const that = this;
- that._customShaderCompilationRemoveCallback =
- that._voxelPrimitive.customShaderCompilationEvent.addEventListener(
- function (error) {
- const shaderString =
- that._voxelPrimitive.customShader.fragmentShaderText;
- that.shaderString = formatShaderString(shaderString);
-
- if (!defined(error)) {
- that.shaderCompilationMessage = "Shader compiled successfully!";
- that.shaderCompilationSuccess = true;
- } else {
- that.shaderCompilationMessage = error.message;
- that.shaderCompilationSuccess = false;
- }
- },
- );
+ that._customShaderCompilationRemoveCallback = that._voxelPrimitive.customShaderCompilationEvent.addEventListener(
+ function (error) {
+ const shaderString =
+ that._voxelPrimitive.customShader.fragmentShaderText;
+ that.shaderString = formatShaderString(shaderString);
+
+ if (!defined(error)) {
+ that.shaderCompilationMessage = "Shader compiled successfully!";
+ that.shaderCompilationSuccess = true;
+ } else {
+ that.shaderCompilationMessage = error.message;
+ that.shaderCompilationSuccess = false;
+ }
+ }
+ );
that._modelMatrixReady = false;
for (let i = 0; i < that._getPrimitiveFunctions.length; i++) {
that._getPrimitiveFunctions[i]();
@@ -807,7 +806,7 @@ VoxelInspectorViewModel.prototype.compileShader = function () {
*/
VoxelInspectorViewModel.prototype.shaderEditorKeyPress = function (
sender,
- event,
+ event
) {
if (event.keyCode === 9) {
//tab
diff --git a/packages/widgets/Source/subscribeAndEvaluate.js b/packages/widgets/Source/subscribeAndEvaluate.js
index 6d32a2800417..510615498a98 100644
--- a/packages/widgets/Source/subscribeAndEvaluate.js
+++ b/packages/widgets/Source/subscribeAndEvaluate.js
@@ -20,7 +20,7 @@ function subscribeAndEvaluate(
observablePropertyName,
callback,
target,
- event,
+ event
) {
callback.call(target, owner[observablePropertyName]);
return knockout
diff --git a/packages/widgets/Specs/Animation/AnimationViewModelSpec.js b/packages/widgets/Specs/Animation/AnimationViewModelSpec.js
index 751f31a47472..e90fc79319a5 100644
--- a/packages/widgets/Specs/Animation/AnimationViewModelSpec.js
+++ b/packages/widgets/Specs/Animation/AnimationViewModelSpec.js
@@ -35,7 +35,7 @@ describe("Widgets/Animation/AnimationViewModel", function () {
expect(viewModel.playForwardViewModel.toggled).toEqual(false);
expect(viewModel.playRealtimeViewModel.toggled).toEqual(true);
expect(viewModel.shuttleRingAngle).toEqual(
- AnimationViewModel._realtimeShuttleRingAngle,
+ AnimationViewModel._realtimeShuttleRingAngle
);
}
@@ -422,16 +422,16 @@ describe("Widgets/Animation/AnimationViewModel", function () {
clockViewModel.startTime = JulianDate.addSeconds(
clockViewModel.systemTime,
-60,
- new JulianDate(),
+ new JulianDate()
);
clockViewModel.stopTime = JulianDate.addSeconds(
clockViewModel.systemTime,
-30,
- new JulianDate(),
+ new JulianDate()
);
expect(viewModel.playRealtimeViewModel.command.canExecute).toEqual(true);
expect(viewModel.playRealtimeViewModel.tooltip).toEqual(
- "Today (real-time)",
+ "Today (real-time)"
);
//CLAMPED but unavailable when start/stop time does not include realtime
@@ -439,16 +439,16 @@ describe("Widgets/Animation/AnimationViewModel", function () {
clockViewModel.startTime = JulianDate.addSeconds(
clockViewModel.systemTime,
-60,
- new JulianDate(),
+ new JulianDate()
);
clockViewModel.stopTime = JulianDate.addSeconds(
clockViewModel.systemTime,
-30,
- new JulianDate(),
+ new JulianDate()
);
expect(viewModel.playRealtimeViewModel.command.canExecute).toEqual(false);
expect(viewModel.playRealtimeViewModel.tooltip).toEqual(
- "Current time not in range",
+ "Current time not in range"
);
//CLAMPED but available when start/stop time includes realtime
@@ -456,16 +456,16 @@ describe("Widgets/Animation/AnimationViewModel", function () {
clockViewModel.startTime = JulianDate.addSeconds(
clockViewModel.systemTime,
-60,
- new JulianDate(),
+ new JulianDate()
);
clockViewModel.stopTime = JulianDate.addSeconds(
clockViewModel.systemTime,
60,
- new JulianDate(),
+ new JulianDate()
);
expect(viewModel.playRealtimeViewModel.command.canExecute).toEqual(true);
expect(viewModel.playRealtimeViewModel.tooltip).toEqual(
- "Today (real-time)",
+ "Today (real-time)"
);
//LOOP_STOP but unavailable when start/stop time does not include realtime
@@ -473,16 +473,16 @@ describe("Widgets/Animation/AnimationViewModel", function () {
clockViewModel.startTime = JulianDate.addSeconds(
clockViewModel.systemTime,
-60,
- new JulianDate(),
+ new JulianDate()
);
clockViewModel.stopTime = JulianDate.addSeconds(
clockViewModel.systemTime,
-30,
- new JulianDate(),
+ new JulianDate()
);
expect(viewModel.playRealtimeViewModel.command.canExecute).toEqual(false);
expect(viewModel.playRealtimeViewModel.tooltip).toEqual(
- "Current time not in range",
+ "Current time not in range"
);
//LOOP_STOP but available when start/stop time includes realtime
@@ -490,16 +490,16 @@ describe("Widgets/Animation/AnimationViewModel", function () {
clockViewModel.startTime = JulianDate.addSeconds(
clockViewModel.systemTime,
-60,
- new JulianDate(),
+ new JulianDate()
);
clockViewModel.stopTime = JulianDate.addSeconds(
clockViewModel.systemTime,
60,
- new JulianDate(),
+ new JulianDate()
);
expect(viewModel.playRealtimeViewModel.command.canExecute).toEqual(true);
expect(viewModel.playRealtimeViewModel.tooltip).toEqual(
- "Today (real-time)",
+ "Today (real-time)"
);
});
@@ -619,7 +619,7 @@ describe("Widgets/Animation/AnimationViewModel", function () {
viewModel.shuttleRingAngle = 0.0;
expect(clockViewModel.multiplier).toEqual(
- AnimationViewModel.defaultTicks[0],
+ AnimationViewModel.defaultTicks[0]
);
});
@@ -667,7 +667,10 @@ describe("Widgets/Animation/AnimationViewModel", function () {
animationViewModel.setShuttleRingTicks(ticks);
expect(animationViewModel.getShuttleRingTicks()).toEqual([
- 0.0, 2.0, 4.0, 8.0,
+ 0.0,
+ 2.0,
+ 4.0,
+ 8.0,
]);
});
});
diff --git a/packages/widgets/Specs/BaseLayerPicker/BaseLayerPickerViewModelSpec.js b/packages/widgets/Specs/BaseLayerPicker/BaseLayerPickerViewModelSpec.js
index 13bcc3ab7eda..f4ab2aeddf71 100644
--- a/packages/widgets/Specs/BaseLayerPicker/BaseLayerPickerViewModelSpec.js
+++ b/packages/widgets/Specs/BaseLayerPicker/BaseLayerPickerViewModelSpec.js
@@ -211,7 +211,7 @@ describe("Widgets/BaseLayerPicker/BaseLayerPickerViewModel", function () {
viewModel.selectedTerrain = testProviderViewModel3;
await testProviderViewModel.creationCommand();
expect(viewModel.buttonTooltip).toEqual(
- `${testProviderViewModel.name}\n${testProviderViewModel3.name}`,
+ `${testProviderViewModel.name}\n${testProviderViewModel3.name}`
);
viewModel.selectedImagery = undefined;
diff --git a/packages/widgets/Specs/Cesium3DTilesInspector/Cesium3DTilesInspectorSpec.js b/packages/widgets/Specs/Cesium3DTilesInspector/Cesium3DTilesInspectorSpec.js
index 4a76b8ac8530..39ded525e04b 100644
--- a/packages/widgets/Specs/Cesium3DTilesInspector/Cesium3DTilesInspectorSpec.js
+++ b/packages/widgets/Specs/Cesium3DTilesInspector/Cesium3DTilesInspectorSpec.js
@@ -51,5 +51,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/widgets/Specs/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModelSpec.js b/packages/widgets/Specs/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModelSpec.js
index 0442fde73347..51267ff50f61 100644
--- a/packages/widgets/Specs/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModelSpec.js
+++ b/packages/widgets/Specs/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModelSpec.js
@@ -37,7 +37,7 @@ describe(
it("can create and destroy", function () {
const viewModel = new Cesium3DTilesInspectorViewModel(
scene,
- performanceContainer,
+ performanceContainer
);
expect(viewModel._scene).toBe(scene);
expect(viewModel.isDestroyed()).toEqual(false);
@@ -61,7 +61,7 @@ describe(
it("show properties", async function () {
viewModel = new Cesium3DTilesInspectorViewModel(
scene,
- performanceContainer,
+ performanceContainer
);
const tileset = await Cesium3DTileset.fromUrl(tilesetUrl);
viewModel.tileset = tileset;
@@ -77,7 +77,7 @@ describe(
beforeAll(async function () {
viewModel = new Cesium3DTilesInspectorViewModel(
scene,
- performanceContainer,
+ performanceContainer
);
const tileset = await Cesium3DTileset.fromUrl(tilesetUrl);
viewModel.tileset = tileset;
@@ -167,22 +167,22 @@ describe(
it("geometricErrorScale", function () {
viewModel.geometricErrorScale = 1.0;
expect(viewModel.tileset.pointCloudShading.geometricErrorScale).toBe(
- 1.0,
+ 1.0
);
viewModel.geometricErrorScale = 0.0;
expect(viewModel.tileset.pointCloudShading.geometricErrorScale).toBe(
- 0.0,
+ 0.0
);
});
it("maximumAttenuation", function () {
viewModel.maximumAttenuation = 1.0;
expect(viewModel.tileset.pointCloudShading.maximumAttenuation).toBe(
- 1.0,
+ 1.0
);
viewModel.maximumAttenuation = 0.0;
expect(
- viewModel.tileset.pointCloudShading.maximumAttenuation,
+ viewModel.tileset.pointCloudShading.maximumAttenuation
).not.toBeDefined();
});
@@ -191,7 +191,7 @@ describe(
expect(viewModel.tileset.pointCloudShading.baseResolution).toBe(1.0);
viewModel.baseResolution = 0.0;
expect(
- viewModel.tileset.pointCloudShading.baseResolution,
+ viewModel.tileset.pointCloudShading.baseResolution
).not.toBeDefined();
});
@@ -205,22 +205,22 @@ describe(
it("eyeDomeLightingStrength", function () {
viewModel.eyeDomeLightingStrength = 1.0;
expect(
- viewModel.tileset.pointCloudShading.eyeDomeLightingStrength,
+ viewModel.tileset.pointCloudShading.eyeDomeLightingStrength
).toBe(1.0);
viewModel.eyeDomeLightingStrength = 0.0;
expect(
- viewModel.tileset.pointCloudShading.eyeDomeLightingStrength,
+ viewModel.tileset.pointCloudShading.eyeDomeLightingStrength
).toBe(0.0);
});
it("eyeDomeLightingRadius", function () {
viewModel.eyeDomeLightingRadius = 1.0;
expect(viewModel.tileset.pointCloudShading.eyeDomeLightingRadius).toBe(
- 1.0,
+ 1.0
);
viewModel.eyeDomeLightingRadius = 0.0;
expect(viewModel.tileset.pointCloudShading.eyeDomeLightingRadius).toBe(
- 0.0,
+ 0.0
);
});
});
@@ -229,7 +229,7 @@ describe(
beforeAll(async function () {
viewModel = new Cesium3DTilesInspectorViewModel(
scene,
- performanceContainer,
+ performanceContainer
);
viewModel.tileset = await Cesium3DTileset.fromUrl(tilesetUrl);
});
@@ -269,12 +269,12 @@ describe(
viewModel.dynamicScreenSpaceErrorDensitySliderValue = rawSliderValue;
expect(
- viewModel.dynamicScreenSpaceErrorDensitySliderValue,
+ viewModel.dynamicScreenSpaceErrorDensitySliderValue
).toEqualEpsilon(rawSliderValue, CesiumMath.EPSILON8);
expect(viewModel.tileset.dynamicScreenSpaceErrorDensity).toEqualEpsilon(
scaledValue,
- CesiumMath.EPSILON8,
+ CesiumMath.EPSILON8
);
});
});
@@ -302,7 +302,7 @@ describe(
viewModel = new Cesium3DTilesInspectorViewModel(
scene,
- performanceContainer,
+ performanceContainer
);
viewModel.tileset = await Cesium3DTileset.fromUrl(tilesetUrl);
});
@@ -315,7 +315,7 @@ describe(
viewModel.tileset.style = style;
viewModel._update();
expect(JSON.stringify(style.style)).toBe(
- JSON.stringify(JSON.parse(viewModel.styleString)),
+ JSON.stringify(JSON.parse(viewModel.styleString))
);
});
@@ -336,7 +336,7 @@ describe(
viewModel._update();
expect(viewModel.tileset.style.style.color).toBe("color('red')");
expect(viewModel.tileset.style.style.meta.description).toBe(
- "'Building id ${id} has height ${Height}.'",
+ "'Building id ${id} has height ${Height}.'"
);
});
@@ -347,5 +347,5 @@ describe(
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/widgets/Specs/CesiumInspector/CesiumInspectorSpec.js b/packages/widgets/Specs/CesiumInspector/CesiumInspectorSpec.js
index 8250282dfff1..b372cf789d59 100644
--- a/packages/widgets/Specs/CesiumInspector/CesiumInspectorSpec.js
+++ b/packages/widgets/Specs/CesiumInspector/CesiumInspectorSpec.js
@@ -51,5 +51,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/widgets/Specs/CesiumInspector/CesiumInspectorViewModelSpec.js b/packages/widgets/Specs/CesiumInspector/CesiumInspectorViewModelSpec.js
index 29f535510379..b8d99c10c0a4 100644
--- a/packages/widgets/Specs/CesiumInspector/CesiumInspectorViewModelSpec.js
+++ b/packages/widgets/Specs/CesiumInspector/CesiumInspectorViewModelSpec.js
@@ -58,7 +58,7 @@ describe(
it("can create and destroy", function () {
const viewModel = new CesiumInspectorViewModel(
scene,
- performanceContainer,
+ performanceContainer
);
expect(viewModel.scene).toBe(scene);
expect(viewModel.performanceContainer).toBe(performanceContainer);
@@ -82,7 +82,7 @@ describe(
it("show frustums", function () {
const viewModel = new CesiumInspectorViewModel(
scene,
- performanceContainer,
+ performanceContainer
);
viewModel.frustums = true;
expect(viewModel.scene.debugShowFrustums).toBe(true);
@@ -96,7 +96,7 @@ describe(
it("show performance", function () {
const viewModel = new CesiumInspectorViewModel(
scene,
- performanceContainer,
+ performanceContainer
);
viewModel.performance = true;
scene.render();
@@ -114,14 +114,14 @@ describe(
CesiumMath.toRadians(-110.0),
CesiumMath.toRadians(0.0),
CesiumMath.toRadians(-90.0),
- CesiumMath.toRadians(20.0),
+ CesiumMath.toRadians(20.0)
),
- CesiumMath.toRadians(45),
- ),
+ CesiumMath.toRadians(45)
+ )
);
const viewModel = new CesiumInspectorViewModel(
scene,
- performanceContainer,
+ performanceContainer
);
scene.render();
viewModel.primitive = p;
@@ -140,10 +140,10 @@ describe(
CesiumMath.toRadians(-110.0),
CesiumMath.toRadians(0.0),
CesiumMath.toRadians(-90.0),
- CesiumMath.toRadians(20.0),
+ CesiumMath.toRadians(20.0)
),
- CesiumMath.toRadians(45),
- ),
+ CesiumMath.toRadians(45)
+ )
);
const q = scene.primitives.add(
@@ -152,14 +152,14 @@ describe(
CesiumMath.toRadians(-10.0),
CesiumMath.toRadians(0.0),
CesiumMath.toRadians(-9.0),
- CesiumMath.toRadians(20.0),
- ),
- ),
+ CesiumMath.toRadians(20.0)
+ )
+ )
);
const viewModel = new CesiumInspectorViewModel(
scene,
- performanceContainer,
+ performanceContainer
);
scene.render();
viewModel.primitive = p;
@@ -179,15 +179,15 @@ describe(
CesiumMath.toRadians(-110.0),
CesiumMath.toRadians(0.0),
CesiumMath.toRadians(-90.0),
- CesiumMath.toRadians(20.0),
+ CesiumMath.toRadians(20.0)
),
- CesiumMath.toRadians(45),
- ),
+ CesiumMath.toRadians(45)
+ )
);
const viewModel = new CesiumInspectorViewModel(
scene,
- performanceContainer,
+ performanceContainer
);
scene.render();
viewModel.primitive = p;
@@ -202,37 +202,37 @@ describe(
it("show wireframe", function () {
const viewModel = new CesiumInspectorViewModel(
scene,
- performanceContainer,
+ performanceContainer
);
viewModel.wireframe = true;
expect(viewModel.scene.globe._surface.tileProvider._debug.wireframe).toBe(
- true,
+ true
);
viewModel.wireframe = false;
expect(viewModel.scene.globe._surface.tileProvider._debug.wireframe).toBe(
- false,
+ false
);
});
it("suspend updates", function () {
const viewModel = new CesiumInspectorViewModel(
scene,
- performanceContainer,
+ performanceContainer
);
viewModel.suspendUpdates = true;
expect(viewModel.scene.globe._surface._debug.suspendLodUpdate).toBe(true);
viewModel.suspendUpdates = false;
expect(viewModel.scene.globe._surface._debug.suspendLodUpdate).toBe(
- false,
+ false
);
});
it("show tile coords", function () {
const viewModel = new CesiumInspectorViewModel(
scene,
- performanceContainer,
+ performanceContainer
);
expect(viewModel.scene.imageryLayers.length).toBe(0);
@@ -246,7 +246,7 @@ describe(
it("show tile bounding sphere", function () {
const viewModel = new CesiumInspectorViewModel(
scene,
- performanceContainer,
+ performanceContainer
);
const tile = new QuadtreeTile({
tilingScheme: new WebMercatorTilingScheme(),
@@ -259,19 +259,19 @@ describe(
viewModel.tileBoundingSphere = true;
expect(
- viewModel.scene.globe._surface.tileProvider._debug.boundingSphereTile,
+ viewModel.scene.globe._surface.tileProvider._debug.boundingSphereTile
).toBe(tile);
viewModel.tileBoundingSphere = false;
expect(
- viewModel.scene.globe._surface.tileProvider._debug.boundingSphereTile,
+ viewModel.scene.globe._surface.tileProvider._debug.boundingSphereTile
).toBe(undefined);
});
it("filter tile", function () {
const viewModel = new CesiumInspectorViewModel(
scene,
- performanceContainer,
+ performanceContainer
);
const tile = new QuadtreeTile({
tilingScheme: new WebMercatorTilingScheme(),
@@ -294,7 +294,7 @@ describe(
it("does not try to render a non-renderable tile", function () {
const viewModel = new CesiumInspectorViewModel(
scene,
- performanceContainer,
+ performanceContainer
);
const tile = new QuadtreeTile({
tilingScheme: new WebMercatorTilingScheme(),
@@ -313,5 +313,5 @@ describe(
expect(viewModel.suspendUpdates).toBe(false);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/widgets/Specs/Geocoder/GeocoderSpec.js b/packages/widgets/Specs/Geocoder/GeocoderSpec.js
index fbe1cd1b10d1..bcd1dded57a6 100644
--- a/packages/widgets/Specs/Geocoder/GeocoderSpec.js
+++ b/packages/widgets/Specs/Geocoder/GeocoderSpec.js
@@ -76,5 +76,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/widgets/Specs/Geocoder/GeocoderViewModelSpec.js b/packages/widgets/Specs/Geocoder/GeocoderViewModelSpec.js
index 350e4fd4e7ba..259763916407 100644
--- a/packages/widgets/Specs/Geocoder/GeocoderViewModelSpec.js
+++ b/packages/widgets/Specs/Geocoder/GeocoderViewModelSpec.js
@@ -141,7 +141,7 @@ describe(
const promise = new Promise((resolve) => {
destinationFoundCallback = function (viewModel, destination) {
GeocoderViewModel.flyToDestination(viewModel, destination).then(
- resolve,
+ resolve
);
};
});
@@ -212,7 +212,7 @@ describe(
expect(geocoderViewModel._searchText).toEqual("a");
expect(destinationFoundCallback).toHaveBeenCalledWith(
geocoderViewModel,
- destination,
+ destination
);
});
@@ -227,11 +227,11 @@ describe(
await geocoderViewModel.search();
expect(geocoderViewModel._searchText).toEqual(
- geocoderResults2[0].displayName,
+ geocoderResults2[0].displayName
);
expect(destinationFoundCallback).toHaveBeenCalledWith(
geocoderViewModel,
- mockDestination,
+ mockDestination
);
});
@@ -245,7 +245,7 @@ describe(
geocoderViewModel._searchText = "sthsnth"; // an empty query will prevent geocoding
await GeocoderViewModel._updateSearchSuggestions(geocoderViewModel);
expect(geocoderViewModel._suggestions.length).toEqual(
- geocoderResults1.length + geocoderResults2.length,
+ geocoderResults1.length + geocoderResults2.length
);
expect(destinationFoundCallback).not.toHaveBeenCalled();
});
@@ -263,12 +263,12 @@ describe(
await geocoderViewModel.search();
// await promise;
expect(geocoderViewModel._searchText).toEqual(
- geocoderResults2[0].displayName,
+ geocoderResults2[0].displayName
);
expect(GeocoderViewModel.flyToDestination).not.toHaveBeenCalled();
expect(destinationFoundCallback).toHaveBeenCalledWith(
geocoderViewModel,
- mockDestination,
+ mockDestination
);
});
@@ -286,26 +286,26 @@ describe(
expect(geocoderViewModel._selectedSuggestion).toEqual(undefined);
geocoderViewModel._handleArrowDown(geocoderViewModel);
expect(geocoderViewModel._selectedSuggestion.displayName).toEqual(
- "a",
+ "a"
);
geocoderViewModel._handleArrowDown(geocoderViewModel);
geocoderViewModel._handleArrowDown(geocoderViewModel);
expect(geocoderViewModel._selectedSuggestion.displayName).toEqual(
- "c",
+ "c"
);
geocoderViewModel._handleArrowDown(geocoderViewModel);
expect(geocoderViewModel._selectedSuggestion.displayName).toEqual(
- "a",
+ "a"
);
geocoderViewModel._handleArrowDown(geocoderViewModel);
geocoderViewModel._handleArrowUp(geocoderViewModel);
expect(geocoderViewModel._selectedSuggestion.displayName).toEqual(
- "a",
+ "a"
);
geocoderViewModel._handleArrowUp(geocoderViewModel);
expect(geocoderViewModel._selectedSuggestion).toBeUndefined();
expect(destinationFoundCallback).not.toHaveBeenCalled();
- },
+ }
);
});
@@ -388,5 +388,5 @@ describe(
expect(destinationFoundCallback).toHaveBeenCalled();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/widgets/Specs/HomeButton/HomeButtonSpec.js b/packages/widgets/Specs/HomeButton/HomeButtonSpec.js
index 10909d425e1a..23a6a84b2743 100644
--- a/packages/widgets/Specs/HomeButton/HomeButtonSpec.js
+++ b/packages/widgets/Specs/HomeButton/HomeButtonSpec.js
@@ -51,5 +51,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/widgets/Specs/HomeButton/HomeButtonViewModelSpec.js b/packages/widgets/Specs/HomeButton/HomeButtonViewModelSpec.js
index 4f2e5914947a..b66e9ee7b8a5 100644
--- a/packages/widgets/Specs/HomeButton/HomeButtonViewModelSpec.js
+++ b/packages/widgets/Specs/HomeButton/HomeButtonViewModelSpec.js
@@ -59,5 +59,5 @@ describe(
viewModel.command();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/widgets/Specs/I3SBSLExplorer/I3SBSLExplorerSpec.js b/packages/widgets/Specs/I3SBSLExplorer/I3SBSLExplorerSpec.js
index 7bc9ffff6d81..131ea187b0fb 100644
--- a/packages/widgets/Specs/I3SBSLExplorer/I3SBSLExplorerSpec.js
+++ b/packages/widgets/Specs/I3SBSLExplorer/I3SBSLExplorerSpec.js
@@ -48,11 +48,11 @@ describe("Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer",
expect(container.children[0].childElementCount).toEqual(3);
expect(container.children[0].children[0].localName).toEqual("h3");
expect(container.children[0].children[0].textContent).toEqual(
- "Building explorer",
+ "Building explorer"
);
expect(container.children[0].children[1].localName).toEqual("select");
expect(container.children[0].children[1].textContent).toEqual(
- "Building layers not found",
+ "Building layers not found"
);
expect(container.children[0].children[2].localName).toEqual("div");
expect(container.children[0].children[2].id).toEqual("bsl-wrapper");
@@ -85,13 +85,14 @@ describe("Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer",
i3sProvider.filterByAttributes = jasmine.createSpy();
const widget = new I3SBuildingSceneLayerExplorer(
"testContainer",
- i3sProvider,
+ i3sProvider
);
expect(widget).toBeInstanceOf(I3SBuildingSceneLayerExplorer);
const expander = document.querySelector(".expandItem");
- const nestedList =
- expander.parentElement.parentElement.querySelector("#Cat1-expander");
+ const nestedList = expander.parentElement.parentElement.querySelector(
+ "#Cat1-expander"
+ );
expect(expander.textContent).toEqual("+");
expect(nestedList.className).toEqual("nested");
DomEventSimulator.fireClick(expander);
diff --git a/packages/widgets/Specs/I3SBSLExplorer/I3SBSLExplorerViewModelSpec.js b/packages/widgets/Specs/I3SBSLExplorer/I3SBSLExplorerViewModelSpec.js
index 08f8c8b1a667..8d8c22af3c4f 100644
--- a/packages/widgets/Specs/I3SBSLExplorer/I3SBSLExplorerViewModelSpec.js
+++ b/packages/widgets/Specs/I3SBSLExplorer/I3SBSLExplorerViewModelSpec.js
@@ -67,22 +67,22 @@ describe("Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorerVie
expect(viewModel.sublayers[0].sublayers[0].visibility).toEqual(true);
expect(viewModel.sublayers[0].sublayers[0].sublayers.length).toEqual(2);
expect(viewModel.sublayers[0].sublayers[0].sublayers[0].name).toEqual(
- "SubCat1",
+ "SubCat1"
);
expect(viewModel.sublayers[0].sublayers[0].sublayers[0].visibility).toEqual(
- true,
+ true
);
expect(
- viewModel.sublayers[0].sublayers[0].sublayers[0].sublayers.length,
+ viewModel.sublayers[0].sublayers[0].sublayers[0].sublayers.length
).toEqual(0);
expect(viewModel.sublayers[0].sublayers[0].sublayers[1].name).toEqual(
- "SubCat2",
+ "SubCat2"
);
expect(viewModel.sublayers[0].sublayers[0].sublayers[1].visibility).toEqual(
- false,
+ false
);
expect(
- viewModel.sublayers[0].sublayers[0].sublayers[1].sublayers.length,
+ viewModel.sublayers[0].sublayers[0].sublayers[1].sublayers.length
).toEqual(0);
expect(viewModel.topLayers.length).toEqual(3);
@@ -91,7 +91,7 @@ describe("Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorerVie
it("can create bsl explorer ViewModel if no Overview", function () {
const viewModel = new I3SBuildingSceneLayerExplorerViewModel(
- i3sProviderWithoutOverview,
+ i3sProviderWithoutOverview
);
expect(viewModel.sublayers.length).toEqual(1);
expect(viewModel.sublayers[0].name).toEqual("Full Model");
@@ -102,22 +102,22 @@ describe("Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorerVie
expect(viewModel.sublayers[0].sublayers[0].visibility).toEqual(true);
expect(viewModel.sublayers[0].sublayers[0].sublayers.length).toEqual(2);
expect(viewModel.sublayers[0].sublayers[0].sublayers[0].name).toEqual(
- "SubCat1",
+ "SubCat1"
);
expect(viewModel.sublayers[0].sublayers[0].sublayers[0].visibility).toEqual(
- true,
+ true
);
expect(
- viewModel.sublayers[0].sublayers[0].sublayers[0].sublayers.length,
+ viewModel.sublayers[0].sublayers[0].sublayers[0].sublayers.length
).toEqual(0);
expect(viewModel.sublayers[0].sublayers[0].sublayers[1].name).toEqual(
- "SubCat2",
+ "SubCat2"
);
expect(viewModel.sublayers[0].sublayers[0].sublayers[1].visibility).toEqual(
- false,
+ false
);
expect(
- viewModel.sublayers[0].sublayers[0].sublayers[1].sublayers.length,
+ viewModel.sublayers[0].sublayers[0].sublayers[1].sublayers.length
).toEqual(0);
expect(viewModel.topLayers.length).toEqual(2);
@@ -187,7 +187,7 @@ describe("Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorerVie
i3sProviderWithoutOverview.filterByAttributes = jasmine.createSpy();
const viewModel = new I3SBuildingSceneLayerExplorerViewModel(
- i3sProviderWithoutOverview,
+ i3sProviderWithoutOverview
);
knockout.track(viewModel);
diff --git a/packages/widgets/Specs/InfoBox/InfoBoxSpec.js b/packages/widgets/Specs/InfoBox/InfoBoxSpec.js
index 87becab3ad41..eb3131693caa 100644
--- a/packages/widgets/Specs/InfoBox/InfoBoxSpec.js
+++ b/packages/widgets/Specs/InfoBox/InfoBoxSpec.js
@@ -49,7 +49,7 @@ describe("Widgets/InfoBox/InfoBox", function () {
infoBox.viewModel.description =
'Please do not crash
';
expect(infoElement.style["background-color"]).toEqual(
- "rgb(255, 255, 255)",
+ "rgb(255, 255, 255)"
);
return pollToPromise(function () {
return node.innerHTML === infoBox.viewModel.description;
diff --git a/packages/widgets/Specs/PerformanceWatchdog/PerformanceWatchdogSpec.js b/packages/widgets/Specs/PerformanceWatchdog/PerformanceWatchdogSpec.js
index 37392e430f2f..a6d37e6d4c36 100644
--- a/packages/widgets/Specs/PerformanceWatchdog/PerformanceWatchdogSpec.js
+++ b/packages/widgets/Specs/PerformanceWatchdog/PerformanceWatchdogSpec.js
@@ -70,5 +70,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/widgets/Specs/PerformanceWatchdog/PerformanceWatchdogViewModelSpec.js b/packages/widgets/Specs/PerformanceWatchdog/PerformanceWatchdogViewModelSpec.js
index 111844304a47..7f737d46927c 100644
--- a/packages/widgets/Specs/PerformanceWatchdog/PerformanceWatchdogViewModelSpec.js
+++ b/packages/widgets/Specs/PerformanceWatchdog/PerformanceWatchdogViewModelSpec.js
@@ -199,5 +199,5 @@ describe(
expect(viewModel.showingLowFrameRateMessage).toBe(false);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/widgets/Specs/ProjectionPicker/ProjectionPickerSpec.js b/packages/widgets/Specs/ProjectionPicker/ProjectionPickerSpec.js
index 5e422e037993..ce99a4b39cb3 100644
--- a/packages/widgets/Specs/ProjectionPicker/ProjectionPickerSpec.js
+++ b/packages/widgets/Specs/ProjectionPicker/ProjectionPickerSpec.js
@@ -96,7 +96,7 @@ describe(
addCloseOnInputSpec("pointerDown", DomEventSimulator.firePointerDown);
addDisabledDuringFlightSpec(
"pointerDown",
- DomEventSimulator.firePointerDown,
+ DomEventSimulator.firePointerDown
);
addDisabledIn2DSpec("pointerDown", DomEventSimulator.firePointerDown);
} else {
@@ -105,7 +105,7 @@ describe(
addDisabledDuringFlightSpec("mousedown", DomEventSimulator.fireMouseDown);
addDisabledDuringFlightSpec(
"touchstart",
- DomEventSimulator.fireTouchStart,
+ DomEventSimulator.fireTouchStart
);
addDisabledIn2DSpec("mousedown", DomEventSimulator.fireMouseDown);
addDisabledIn2DSpec("touchstart", DomEventSimulator.fireTouchStart);
@@ -129,5 +129,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/widgets/Specs/ProjectionPicker/ProjectionPickerViewModelSpec.js b/packages/widgets/Specs/ProjectionPicker/ProjectionPickerViewModelSpec.js
index aed794b5bed9..5982b23a72b7 100644
--- a/packages/widgets/Specs/ProjectionPicker/ProjectionPickerViewModelSpec.js
+++ b/packages/widgets/Specs/ProjectionPicker/ProjectionPickerViewModelSpec.js
@@ -94,5 +94,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/widgets/Specs/SceneModePicker/SceneModePickerSpec.js b/packages/widgets/Specs/SceneModePicker/SceneModePickerSpec.js
index 123e4a9f217c..a311999f575c 100644
--- a/packages/widgets/Specs/SceneModePicker/SceneModePickerSpec.js
+++ b/packages/widgets/Specs/SceneModePicker/SceneModePickerSpec.js
@@ -79,5 +79,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/widgets/Specs/SceneModePicker/SceneModePickerViewModelSpec.js b/packages/widgets/Specs/SceneModePicker/SceneModePickerViewModelSpec.js
index 81e1ca9ffeab..6bd6cefb22f4 100644
--- a/packages/widgets/Specs/SceneModePicker/SceneModePickerViewModelSpec.js
+++ b/packages/widgets/Specs/SceneModePicker/SceneModePickerViewModelSpec.js
@@ -101,5 +101,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/widgets/Specs/SelectionIndicator/SelectionIndicatorSpec.js b/packages/widgets/Specs/SelectionIndicator/SelectionIndicatorSpec.js
index fa768a458aab..c363ab246201 100644
--- a/packages/widgets/Specs/SelectionIndicator/SelectionIndicatorSpec.js
+++ b/packages/widgets/Specs/SelectionIndicator/SelectionIndicatorSpec.js
@@ -44,5 +44,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/widgets/Specs/SelectionIndicator/SelectionIndicatorViewModelSpec.js b/packages/widgets/Specs/SelectionIndicator/SelectionIndicatorViewModelSpec.js
index d68922c2afeb..360f38b9e8fc 100644
--- a/packages/widgets/Specs/SelectionIndicator/SelectionIndicatorViewModelSpec.js
+++ b/packages/widgets/Specs/SelectionIndicator/SelectionIndicatorViewModelSpec.js
@@ -25,11 +25,11 @@ describe(
const viewModel = new SelectionIndicatorViewModel(
scene,
selectionIndicatorElement,
- container,
+ container
);
expect(viewModel.scene).toBe(scene);
expect(viewModel.selectionIndicatorElement).toBe(
- selectionIndicatorElement,
+ selectionIndicatorElement
);
expect(viewModel.container).toBe(container);
expect(viewModel.computeScreenSpacePosition).toBeDefined();
@@ -51,7 +51,7 @@ describe(
expect(function () {
return new SelectionIndicatorViewModel(
scene,
- selectionIndicatorElement,
+ selectionIndicatorElement
);
}).toThrowDeveloperError();
});
@@ -60,7 +60,7 @@ describe(
const viewModel = new SelectionIndicatorViewModel(
scene,
selectionIndicatorElement,
- container,
+ container
);
viewModel.animateAppear();
viewModel.animateDepart();
@@ -71,7 +71,7 @@ describe(
const viewModel = new SelectionIndicatorViewModel(
scene,
selectionIndicatorElement,
- container,
+ container
);
viewModel.showSelection = true;
viewModel.position = new Cartesian3(1.0, 2.0, 3.0);
@@ -89,7 +89,7 @@ describe(
const viewModel = new SelectionIndicatorViewModel(
scene,
selectionIndicatorElement,
- container,
+ container
);
expect(viewModel.isVisible).toBe(false);
viewModel.showSelection = true;
@@ -105,7 +105,7 @@ describe(
const viewModel = new SelectionIndicatorViewModel(
scene,
selectionIndicatorElement,
- container,
+ container
);
viewModel.showSelection = true;
viewModel.position = new Cartesian3(1.0, 2.0, 3.0);
@@ -119,5 +119,5 @@ describe(
document.body.removeChild(container);
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/widgets/Specs/SvgPathBindingHandlerSpec.js b/packages/widgets/Specs/SvgPathBindingHandlerSpec.js
index ebb5ebab0197..ecc403fed5e8 100644
--- a/packages/widgets/Specs/SvgPathBindingHandlerSpec.js
+++ b/packages/widgets/Specs/SvgPathBindingHandlerSpec.js
@@ -6,7 +6,7 @@ describe("ThirdParty/knockout", function () {
div.setAttribute(
"data-bind",
'\
-cesiumSvgPath: { path: "M 100 100 L 300 100 L 200 300 Z", width: 28, height: 40, css: "someClass" }',
+cesiumSvgPath: { path: "M 100 100 L 300 100 L 200 300 Z", width: 28, height: 40, css: "someClass" }'
);
document.body.appendChild(div);
@@ -32,7 +32,7 @@ cesiumSvgPath: { path: "M 100 100 L 300 100 L 200 300 Z", width: 28, height: 40,
div.setAttribute(
"data-bind",
"\
-cesiumSvgPath: { path: p, width: w, height: h, css: c }",
+cesiumSvgPath: { path: p, width: w, height: h, css: c }"
);
document.body.appendChild(div);
@@ -44,7 +44,7 @@ cesiumSvgPath: { path: p, width: w, height: h, css: c }",
h: knockout.observable(40),
c: knockout.observable("someClass"),
},
- div,
+ div
);
const svg = div.querySelector("svg.cesium-svgPath-svg");
@@ -63,11 +63,8 @@ cesiumSvgPath: { path: p, width: w, height: h, css: c }",
it("check binding with observable parameter object", function () {
const div = document.createElement("div");
- div.setAttribute(
- "data-bind",
- "\
-cesiumSvgPath: svgPath",
- );
+ div.setAttribute("data-bind", "\
+cesiumSvgPath: svgPath");
document.body.appendChild(div);
diff --git a/packages/widgets/Specs/Viewer/ViewerSpec.js b/packages/widgets/Specs/Viewer/ViewerSpec.js
index a8428eae1a3e..dc313e43702b 100644
--- a/packages/widgets/Specs/Viewer/ViewerSpec.js
+++ b/packages/widgets/Specs/Viewer/ViewerSpec.js
@@ -106,7 +106,7 @@ describe(
expect(viewer.animation).toBeInstanceOf(Animation);
expect(viewer.clockViewModel).toBeInstanceOf(ClockViewModel);
expect(viewer.animation.viewModel.clockViewModel).toBe(
- viewer.clockViewModel,
+ viewer.clockViewModel
);
expect(viewer.timeline).toBeInstanceOf(Timeline);
expect(viewer.fullscreenButton).toBeInstanceOf(FullscreenButton);
@@ -120,7 +120,7 @@ describe(
expect(viewer.canvas).toBe(viewer.cesiumWidget.canvas);
expect(viewer.cesiumLogo).toBe(viewer.cesiumWidget.cesiumLogo);
expect(viewer.screenSpaceEventHandler).toBe(
- viewer.cesiumWidget.screenSpaceEventHandler,
+ viewer.cesiumWidget.screenSpaceEventHandler
);
expect(viewer.useBrowserRecommendedResolution).toBe(true);
expect(viewer.isDestroyed()).toEqual(false);
@@ -133,7 +133,7 @@ describe(
viewer = createViewer(container, { clockViewModel: clockViewModel });
expect(viewer.clockViewModel).toBe(clockViewModel);
expect(viewer.animation.viewModel.clockViewModel).toBe(
- viewer.clockViewModel,
+ viewer.clockViewModel
);
viewer.destroy();
expect(clockViewModel.isDestroyed()).toBe(false);
@@ -151,7 +151,7 @@ describe(
const clockViewModel = new ClockViewModel(
new Clock({
shouldAnimate: false,
- }),
+ })
);
viewer = createViewer(container, {
@@ -449,7 +449,7 @@ describe(
fullscreenElement: testElement,
});
expect(viewer.fullscreenButton.viewModel.fullscreenElement).toBe(
- testElement,
+ testElement
);
});
@@ -481,13 +481,13 @@ describe(
expect(contextAttributes.stencil).toEqual(webglOptions.stencil);
expect(contextAttributes.antialias).toEqual(webglOptions.antialias);
expect(contextAttributes.powerPreference).toEqual(
- webglOptions.powerPreference,
+ webglOptions.powerPreference
);
expect(contextAttributes.premultipliedAlpha).toEqual(
- webglOptions.premultipliedAlpha,
+ webglOptions.premultipliedAlpha
);
expect(contextAttributes.preserveDrawingBuffer).toEqual(
- webglOptions.preserveDrawingBuffer,
+ webglOptions.preserveDrawingBuffer
);
});
@@ -522,10 +522,10 @@ describe(
await pollToPromise(() => viewer.scene.imageryLayers.get(0).ready);
expect(viewer.scene.imageryLayers.length).toEqual(1);
expect(viewer.scene.imageryLayers.get(0).imageryProvider).toBe(
- testProvider,
+ testProvider
);
expect(viewer.baseLayerPicker.viewModel.selectedImagery).toBe(
- testProviderViewModel,
+ testProviderViewModel
);
});
@@ -539,16 +539,16 @@ describe(
await pollToPromise(() => viewer.scene.imageryLayers.get(0).ready);
expect(viewer.scene.imageryLayers.length).toEqual(1);
expect(viewer.scene.imageryLayers.get(0).imageryProvider).toBe(
- testProvider,
+ testProvider
);
expect(viewer.baseLayerPicker.viewModel.selectedImagery).toBe(
- testProviderViewModel,
+ testProviderViewModel
);
expect(
- viewer.baseLayerPicker.viewModel.imageryProviderViewModels.length,
+ viewer.baseLayerPicker.viewModel.imageryProviderViewModels.length
).toBe(models.length);
expect(
- viewer.baseLayerPicker.viewModel.imageryProviderViewModels[0],
+ viewer.baseLayerPicker.viewModel.imageryProviderViewModels[0]
).toEqual(models[0]);
});
@@ -559,7 +559,7 @@ describe(
});
expect(viewer.scene.imageryLayers.length).toEqual(1);
expect(viewer.scene.imageryLayers.get(0).imageryProvider).toBe(
- testProvider,
+ testProvider
);
});
@@ -726,8 +726,9 @@ describe(
dataSource.clock = new DataSourceClock();
dataSource.clock.startTime = JulianDate.fromIso8601("2013-08-01T18:00Z");
dataSource.clock.stopTime = JulianDate.fromIso8601("2013-08-21T02:00Z");
- dataSource.clock.currentTime =
- JulianDate.fromIso8601("2013-08-02T00:00Z");
+ dataSource.clock.currentTime = JulianDate.fromIso8601(
+ "2013-08-02T00:00Z"
+ );
dataSource.clock.clockRange = ClockRange.CLAMPED;
dataSource.clock.clockStep = ClockStep.TICK_DEPENDENT;
dataSource.clock.multiplier = 20.0;
@@ -748,8 +749,9 @@ describe(
dataSource1.clock = new DataSourceClock();
dataSource1.clock.startTime = JulianDate.fromIso8601("2013-08-01T18:00Z");
dataSource1.clock.stopTime = JulianDate.fromIso8601("2013-08-21T02:00Z");
- dataSource1.clock.currentTime =
- JulianDate.fromIso8601("2013-08-02T00:00Z");
+ dataSource1.clock.currentTime = JulianDate.fromIso8601(
+ "2013-08-02T00:00Z"
+ );
let dataSource2, dataSource3;
viewer = createViewer(container);
@@ -761,12 +763,15 @@ describe(
dataSource2 = new MockDataSource();
dataSource2.clock = new DataSourceClock();
- dataSource2.clock.startTime =
- JulianDate.fromIso8601("2014-08-01T18:00Z");
- dataSource2.clock.stopTime =
- JulianDate.fromIso8601("2014-08-21T02:00Z");
- dataSource2.clock.currentTime =
- JulianDate.fromIso8601("2014-08-02T00:00Z");
+ dataSource2.clock.startTime = JulianDate.fromIso8601(
+ "2014-08-01T18:00Z"
+ );
+ dataSource2.clock.stopTime = JulianDate.fromIso8601(
+ "2014-08-21T02:00Z"
+ );
+ dataSource2.clock.currentTime = JulianDate.fromIso8601(
+ "2014-08-02T00:00Z"
+ );
viewer.dataSources.add(dataSource2);
})
@@ -776,12 +781,15 @@ describe(
dataSource3 = new MockDataSource();
dataSource3.clock = new DataSourceClock();
- dataSource3.clock.startTime =
- JulianDate.fromIso8601("2015-08-01T18:00Z");
- dataSource3.clock.stopTime =
- JulianDate.fromIso8601("2015-08-21T02:00Z");
- dataSource3.clock.currentTime =
- JulianDate.fromIso8601("2015-08-02T00:00Z");
+ dataSource3.clock.startTime = JulianDate.fromIso8601(
+ "2015-08-01T18:00Z"
+ );
+ dataSource3.clock.stopTime = JulianDate.fromIso8601(
+ "2015-08-21T02:00Z"
+ );
+ dataSource3.clock.currentTime = JulianDate.fromIso8601(
+ "2015-08-02T00:00Z"
+ );
viewer.dataSources.add(dataSource3);
})
@@ -806,19 +814,22 @@ describe(
dataSource.clock = new DataSourceClock();
dataSource.clock.startTime = JulianDate.fromIso8601("2013-08-01T18:00Z");
dataSource.clock.stopTime = JulianDate.fromIso8601("2013-08-21T02:00Z");
- dataSource.clock.currentTime =
- JulianDate.fromIso8601("2013-08-02T00:00Z");
+ dataSource.clock.currentTime = JulianDate.fromIso8601(
+ "2013-08-02T00:00Z"
+ );
dataSource.clock.clockRange = ClockRange.CLAMPED;
dataSource.clock.clockStep = ClockStep.TICK_DEPENDENT;
dataSource.clock.multiplier = 20.0;
viewer = createViewer(container);
return viewer.dataSources.add(dataSource).then(function () {
- dataSource.clock.startTime =
- JulianDate.fromIso8601("2014-08-01T18:00Z");
+ dataSource.clock.startTime = JulianDate.fromIso8601(
+ "2014-08-01T18:00Z"
+ );
dataSource.clock.stopTime = JulianDate.fromIso8601("2014-08-21T02:00Z");
- dataSource.clock.currentTime =
- JulianDate.fromIso8601("2014-08-02T00:00Z");
+ dataSource.clock.currentTime = JulianDate.fromIso8601(
+ "2014-08-02T00:00Z"
+ );
dataSource.clock.clockRange = ClockRange.UNBOUNDED;
dataSource.clock.clockStep = ClockStep.SYSTEM_CLOCK_MULTIPLIER;
dataSource.clock.multiplier = 10.0;
@@ -846,8 +857,9 @@ describe(
dataSource1.clock = new DataSourceClock();
dataSource1.clock.startTime = JulianDate.fromIso8601("2013-08-01T18:00Z");
dataSource1.clock.stopTime = JulianDate.fromIso8601("2013-08-21T02:00Z");
- dataSource1.clock.currentTime =
- JulianDate.fromIso8601("2013-08-02T00:00Z");
+ dataSource1.clock.currentTime = JulianDate.fromIso8601(
+ "2013-08-02T00:00Z"
+ );
viewer = createViewer(container, {
automaticallyTrackDataSourceClocks: false,
@@ -862,7 +874,7 @@ describe(
expect(viewer.clockTrackedDataSource).not.toBeDefined();
// The mock data source time is in the past, so will not be the default time.
expect(viewer.clock.startTime).not.toEqual(
- dataSource1.clock.startTime,
+ dataSource1.clock.startTime
);
// Manually set the first data source as the tracked data source.
@@ -872,12 +884,15 @@ describe(
dataSource2 = new MockDataSource();
dataSource2.clock = new DataSourceClock();
- dataSource2.clock.startTime =
- JulianDate.fromIso8601("2014-08-01T18:00Z");
- dataSource2.clock.stopTime =
- JulianDate.fromIso8601("2014-08-21T02:00Z");
- dataSource2.clock.currentTime =
- JulianDate.fromIso8601("2014-08-02T00:00Z");
+ dataSource2.clock.startTime = JulianDate.fromIso8601(
+ "2014-08-01T18:00Z"
+ );
+ dataSource2.clock.stopTime = JulianDate.fromIso8601(
+ "2014-08-21T02:00Z"
+ );
+ dataSource2.clock.currentTime = JulianDate.fromIso8601(
+ "2014-08-02T00:00Z"
+ );
// Adding a second data source in manual mode still leaves the first one tracked.
viewer.dataSources.add(dataSource2);
@@ -905,11 +920,11 @@ describe(
return !viewer.useDefaultRenderLoop;
}).catch(function () {
expect(
- viewer._element.querySelector(".cesium-widget-errorPanel"),
+ viewer._element.querySelector(".cesium-widget-errorPanel")
).not.toBeNull();
const messages = viewer._element.querySelectorAll(
- ".cesium-widget-errorPanel-message",
+ ".cesium-widget-errorPanel-message"
);
let found = false;
@@ -923,11 +938,11 @@ describe(
// click the OK button to dismiss the panel
DomEventSimulator.fireClick(
- viewer._element.querySelector(".cesium-button"),
+ viewer._element.querySelector(".cesium-button")
);
expect(
- viewer._element.querySelector(".cesium-widget-errorPanel"),
+ viewer._element.querySelector(".cesium-widget-errorPanel")
).toBeNull();
});
});
@@ -946,7 +961,7 @@ describe(
return !viewer.useDefaultRenderLoop;
}).catch(function () {
expect(
- viewer._element.querySelector(".cesium-widget-errorPanel"),
+ viewer._element.querySelector(".cesium-widget-errorPanel")
).toBeNull();
});
});
@@ -965,7 +980,7 @@ describe(
});
expect(viewer.scene.maximumRenderTimeChange).toBe(
- Number.POSITIVE_INFINITY,
+ Number.POSITIVE_INFINITY
);
});
@@ -975,7 +990,7 @@ describe(
});
expect(viewer.scene._depthPlane._ellipsoidOffset).toBe(
- Number.POSITIVE_INFINITY,
+ Number.POSITIVE_INFINITY
);
});
@@ -984,7 +999,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantProperty(
- new Cartesian3(123456, 123456, 123456),
+ new Cartesian3(123456, 123456, 123456)
);
viewer.trackedEntity = entity;
@@ -1002,7 +1017,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- new Cartesian3(123456, 123456, 123456),
+ new Cartesian3(123456, 123456, 123456)
);
dataSource.entities.add(entity);
@@ -1024,7 +1039,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- new Cartesian3(123456, 123456, 123456),
+ new Cartesian3(123456, 123456, 123456)
);
dataSource.entities.add(entity);
@@ -1050,7 +1065,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantPositionProperty(
- new Cartesian3(123456, 123456, 123456),
+ new Cartesian3(123456, 123456, 123456)
);
dataSource.entities.add(entity);
@@ -1106,7 +1121,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantProperty(
- new Cartesian3(123456, 123456, 123456),
+ new Cartesian3(123456, 123456, 123456)
);
viewer.trackedEntity = entity;
@@ -1128,7 +1143,7 @@ describe(
const entity = new Entity();
entity.position = new ConstantProperty(
- new Cartesian3(123456, 123456, 123456),
+ new Cartesian3(123456, 123456, 123456)
);
const dataSource = new MockDataSource();
@@ -1144,9 +1159,9 @@ describe(
return Cartesian3.equals(
Matrix4.getTranslation(
viewer.scene.camera.transform,
- new Cartesian3(),
+ new Cartesian3()
),
- entity.position.getValue(),
+ entity.position.getValue()
);
}).then(function () {
dataSource.entities.remove(entity);
@@ -1165,9 +1180,9 @@ describe(
return Cartesian3.equals(
Matrix4.getTranslation(
viewer.scene.camera.transform,
- new Cartesian3(),
+ new Cartesian3()
),
- entity.position.getValue(),
+ entity.position.getValue()
);
}).then(function () {
viewer.dataSources.remove(dataSource);
@@ -1221,17 +1236,18 @@ describe(
const expectedOffset = new HeadingPitchRange(
0.0,
-0.5,
- expectedBoundingSphere.radius,
+ expectedBoundingSphere.radius
);
let wasCompleted = false;
- spyOn(viewer.camera, "viewBoundingSphere").and.callFake(
- function (boundingSphere, offset) {
- expect(boundingSphere).toEqual(expectedBoundingSphere);
- expect(offset).toEqual(expectedOffset);
- wasCompleted = true;
- },
- );
+ spyOn(viewer.camera, "viewBoundingSphere").and.callFake(function (
+ boundingSphere,
+ offset
+ ) {
+ expect(boundingSphere).toEqual(expectedBoundingSphere);
+ expect(offset).toEqual(expectedOffset);
+ wasCompleted = true;
+ });
const promise = viewer.zoomTo(tileset);
viewer._postRender();
@@ -1252,18 +1268,19 @@ describe(
const expectedOffset = new HeadingPitchRange(
0.4,
1.2,
- 4.0 * expectedBoundingSphere.radius,
+ 4.0 * expectedBoundingSphere.radius
);
const promise = viewer.zoomTo(tileset, expectedOffset);
let wasCompleted = false;
- spyOn(viewer.camera, "viewBoundingSphere").and.callFake(
- function (boundingSphere, offset) {
- expect(boundingSphere).toEqual(expectedBoundingSphere);
- expect(offset).toEqual(expectedOffset);
- wasCompleted = true;
- },
- );
+ spyOn(viewer.camera, "viewBoundingSphere").and.callFake(function (
+ boundingSphere,
+ offset
+ ) {
+ expect(boundingSphere).toEqual(expectedBoundingSphere);
+ expect(offset).toEqual(expectedOffset);
+ wasCompleted = true;
+ });
viewer._postRender();
@@ -1286,11 +1303,12 @@ describe(
};
}
- const timeIntervalCollection =
- TimeIntervalCollection.fromIso8601DateArray({
+ const timeIntervalCollection = TimeIntervalCollection.fromIso8601DateArray(
+ {
iso8601Dates: dates,
dataCallback: dataCallback,
- });
+ }
+ );
const pointCloud = new TimeDynamicPointCloud({
intervals: timeIntervalCollection,
@@ -1320,18 +1338,19 @@ describe(
const expectedOffset = new HeadingPitchRange(
0.0,
-0.5,
- expectedBoundingSphere.radius,
+ expectedBoundingSphere.radius
);
const promise = viewer.zoomTo(pointCloud);
let wasCompleted = false;
- spyOn(viewer.camera, "viewBoundingSphere").and.callFake(
- function (boundingSphere, offset) {
- expect(boundingSphere).toEqual(expectedBoundingSphere);
- expect(offset).toEqual(expectedOffset);
- wasCompleted = true;
- },
- );
+ spyOn(viewer.camera, "viewBoundingSphere").and.callFake(function (
+ boundingSphere,
+ offset
+ ) {
+ expect(boundingSphere).toEqual(expectedBoundingSphere);
+ expect(offset).toEqual(expectedOffset);
+ wasCompleted = true;
+ });
viewer._postRender();
@@ -1349,18 +1368,19 @@ describe(
const expectedOffset = new HeadingPitchRange(
0.4,
1.2,
- 4.0 * expectedBoundingSphere.radius,
+ 4.0 * expectedBoundingSphere.radius
);
const promise = viewer.zoomTo(pointCloud, expectedOffset);
let wasCompleted = false;
- spyOn(viewer.camera, "viewBoundingSphere").and.callFake(
- function (boundingSphere, offset) {
- expect(boundingSphere).toEqual(expectedBoundingSphere);
- expect(offset).toEqual(expectedOffset);
- wasCompleted = true;
- },
- );
+ spyOn(viewer.camera, "viewBoundingSphere").and.callFake(function (
+ boundingSphere,
+ offset
+ ) {
+ expect(boundingSphere).toEqual(expectedBoundingSphere);
+ expect(offset).toEqual(expectedOffset);
+ wasCompleted = true;
+ });
viewer._postRender();
@@ -1374,7 +1394,7 @@ describe(
async function loadVoxelPrimitive(viewer) {
const voxelPrimitive = new VoxelPrimitive({
provider: await Cesium3DTilesVoxelProvider.fromUrl(
- "./Data/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/tileset.json",
+ "./Data/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/tileset.json"
),
});
viewer.scene.primitives.add(voxelPrimitive);
@@ -1389,18 +1409,19 @@ describe(
const expectedOffset = new HeadingPitchRange(
0.0,
-0.5,
- expectedBoundingSphere.radius,
+ expectedBoundingSphere.radius
);
const promise = viewer.zoomTo(voxelPrimitive);
let wasCompleted = false;
- spyOn(viewer.camera, "viewBoundingSphere").and.callFake(
- function (boundingSphere, offset) {
- expect(boundingSphere).toEqual(expectedBoundingSphere);
- expect(offset).toEqual(expectedOffset);
- wasCompleted = true;
- },
- );
+ spyOn(viewer.camera, "viewBoundingSphere").and.callFake(function (
+ boundingSphere,
+ offset
+ ) {
+ expect(boundingSphere).toEqual(expectedBoundingSphere);
+ expect(offset).toEqual(expectedOffset);
+ wasCompleted = true;
+ });
viewer._postRender();
@@ -1418,18 +1439,19 @@ describe(
const expectedOffset = new HeadingPitchRange(
0.4,
1.2,
- 4.0 * expectedBoundingSphere.radius,
+ 4.0 * expectedBoundingSphere.radius
);
const promise = viewer.zoomTo(voxelPrimitive, expectedOffset);
let wasCompleted = false;
- spyOn(viewer.camera, "viewBoundingSphere").and.callFake(
- function (boundingSphere, offset) {
- expect(boundingSphere).toEqual(expectedBoundingSphere);
- expect(offset).toEqual(expectedOffset);
- wasCompleted = true;
- },
- );
+ spyOn(viewer.camera, "viewBoundingSphere").and.callFake(function (
+ boundingSphere,
+ offset
+ ) {
+ expect(boundingSphere).toEqual(expectedBoundingSphere);
+ expect(offset).toEqual(expectedOffset);
+ wasCompleted = true;
+ });
viewer._postRender();
@@ -1457,17 +1479,18 @@ describe(
spyOn(viewer._dataSourceDisplay, "getBoundingSphere").and.callFake(
function () {
return new BoundingSphere();
- },
+ }
);
- spyOn(viewer.camera, "viewBoundingSphere").and.callFake(
- function (boundingSphere, offset) {
- expect(boundingSphere).toBeDefined();
- // expect offset to be undefined - doesn't use default bc of how zoomTo for entities is set up
- expect(offset).toBeUndefined();
- wasCompleted = true;
- },
- );
+ spyOn(viewer.camera, "viewBoundingSphere").and.callFake(function (
+ boundingSphere,
+ offset
+ ) {
+ expect(boundingSphere).toBeDefined();
+ // expect offset to be undefined - doesn't use default bc of how zoomTo for entities is set up
+ expect(offset).toBeUndefined();
+ wasCompleted = true;
+ });
viewer._postRender();
@@ -1496,14 +1519,15 @@ describe(
spyOn(viewer._dataSourceDisplay, "getBoundingSphere").and.callFake(
function () {
return new BoundingSphere();
- },
- );
- spyOn(viewer.camera, "viewBoundingSphere").and.callFake(
- function (boundingSphere, offset) {
- expect(expectedOffset).toEqual(offset);
- wasCompleted = true;
- },
+ }
);
+ spyOn(viewer.camera, "viewBoundingSphere").and.callFake(function (
+ boundingSphere,
+ offset
+ ) {
+ expect(expectedOffset).toEqual(offset);
+ wasCompleted = true;
+ });
viewer._postRender();
@@ -1558,15 +1582,16 @@ describe(
const promise = viewer.flyTo(tileset);
let wasCompleted = false;
- spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(
- function (target, options) {
- expect(options.offset).toBeDefined();
- expect(options.duration).toBeUndefined();
- expect(options.maximumHeight).toBeUndefined();
- wasCompleted = true;
- options.complete();
- },
- );
+ spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(function (
+ target,
+ options
+ ) {
+ expect(options.offset).toBeDefined();
+ expect(options.duration).toBeUndefined();
+ expect(options.maximumHeight).toBeUndefined();
+ wasCompleted = true;
+ options.complete();
+ });
viewer._postRender();
@@ -1587,15 +1612,16 @@ describe(
const promise = viewer.flyTo(tileset, options);
let wasCompleted = false;
- spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(
- function (target, options) {
- expect(options.offset).toBeDefined();
- expect(options.duration).toBeUndefined();
- expect(options.maximumHeight).toBeUndefined();
- wasCompleted = true;
- options.complete();
- },
- );
+ spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(function (
+ target,
+ options
+ ) {
+ expect(options.offset).toBeDefined();
+ expect(options.duration).toBeUndefined();
+ expect(options.maximumHeight).toBeUndefined();
+ wasCompleted = true;
+ options.complete();
+ });
viewer._postRender();
@@ -1621,14 +1647,15 @@ describe(
const promise = viewer.flyTo(tileset, options);
let wasCompleted = false;
- spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(
- function (target, options) {
- expect(options.duration).toBeDefined();
- expect(options.maximumHeight).toBeDefined();
- wasCompleted = true;
- options.complete();
- },
- );
+ spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(function (
+ target,
+ options
+ ) {
+ expect(options.duration).toBeDefined();
+ expect(options.maximumHeight).toBeDefined();
+ wasCompleted = true;
+ options.complete();
+ });
viewer._postRender();
@@ -1643,15 +1670,16 @@ describe(
const promise = viewer.flyTo(pointCloud);
let wasCompleted = false;
- spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(
- function (target, options) {
- expect(options.offset).toBeDefined();
- expect(options.duration).toBeUndefined();
- expect(options.maximumHeight).toBeUndefined();
- wasCompleted = true;
- options.complete();
- },
- );
+ spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(function (
+ target,
+ options
+ ) {
+ expect(options.offset).toBeDefined();
+ expect(options.duration).toBeUndefined();
+ expect(options.maximumHeight).toBeUndefined();
+ wasCompleted = true;
+ options.complete();
+ });
viewer._postRender();
@@ -1669,15 +1697,16 @@ describe(
const promise = viewer.flyTo(pointCloud, options);
let wasCompleted = false;
- spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(
- function (target, options) {
- expect(options.offset).toBeDefined();
- expect(options.duration).toBeUndefined();
- expect(options.maximumHeight).toBeUndefined();
- wasCompleted = true;
- options.complete();
- },
- );
+ spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(function (
+ target,
+ options
+ ) {
+ expect(options.offset).toBeDefined();
+ expect(options.duration).toBeUndefined();
+ expect(options.maximumHeight).toBeUndefined();
+ wasCompleted = true;
+ options.complete();
+ });
viewer._postRender();
@@ -1700,14 +1729,15 @@ describe(
const promise = viewer.flyTo(pointCloud, options);
let wasCompleted = false;
- spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(
- function (target, options) {
- expect(options.duration).toBeDefined();
- expect(options.maximumHeight).toBeDefined();
- wasCompleted = true;
- options.complete();
- },
- );
+ spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(function (
+ target,
+ options
+ ) {
+ expect(options.duration).toBeDefined();
+ expect(options.maximumHeight).toBeDefined();
+ wasCompleted = true;
+ options.complete();
+ });
viewer._postRender();
@@ -1725,15 +1755,16 @@ describe(
const promise = viewer.flyTo(voxelPrimitive);
let wasCompleted = false;
- spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(
- function (target, options) {
- expect(options.offset).toBeDefined();
- expect(options.duration).toBeUndefined();
- expect(options.maximumHeight).toBeUndefined();
- wasCompleted = true;
- options.complete();
- },
- );
+ spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(function (
+ target,
+ options
+ ) {
+ expect(options.offset).toBeDefined();
+ expect(options.duration).toBeUndefined();
+ expect(options.maximumHeight).toBeUndefined();
+ wasCompleted = true;
+ options.complete();
+ });
viewer._postRender();
@@ -1751,15 +1782,16 @@ describe(
const promise = viewer.flyTo(voxelPrimitive, options);
let wasCompleted = false;
- spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(
- function (target, options) {
- expect(options.offset).toBeDefined();
- expect(options.duration).toBeUndefined();
- expect(options.maximumHeight).toBeUndefined();
- wasCompleted = true;
- options.complete();
- },
- );
+ spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(function (
+ target,
+ options
+ ) {
+ expect(options.offset).toBeDefined();
+ expect(options.duration).toBeUndefined();
+ expect(options.maximumHeight).toBeUndefined();
+ wasCompleted = true;
+ options.complete();
+ });
viewer._postRender();
@@ -1784,14 +1816,15 @@ describe(
const promise = viewer.flyTo(voxelPrimitive, options);
let wasCompleted = false;
- spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(
- function (target, options) {
- expect(options.duration).toBeDefined();
- expect(options.maximumHeight).toBeDefined();
- wasCompleted = true;
- options.complete();
- },
- );
+ spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(function (
+ target,
+ options
+ ) {
+ expect(options.duration).toBeDefined();
+ expect(options.maximumHeight).toBeDefined();
+ wasCompleted = true;
+ options.complete();
+ });
viewer._postRender();
@@ -1819,16 +1852,17 @@ describe(
spyOn(viewer._dataSourceDisplay, "getBoundingSphere").and.callFake(
function () {
return new BoundingSphere();
- },
- );
- spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(
- function (target, options) {
- expect(options.duration).toBeUndefined();
- expect(options.maximumHeight).toBeUndefined();
- wasCompleted = true;
- options.complete();
- },
+ }
);
+ spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(function (
+ target,
+ options
+ ) {
+ expect(options.duration).toBeUndefined();
+ expect(options.maximumHeight).toBeUndefined();
+ wasCompleted = true;
+ options.complete();
+ });
viewer._postRender();
@@ -1858,15 +1892,16 @@ describe(
const promise = viewer.flyTo(voxelPrimitive);
let wasCompleted = false;
- spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(
- function (target, options) {
- expect(options.offset).toBeDefined();
- expect(options.duration).toBeUndefined();
- expect(options.maximumHeight).toBeUndefined();
- wasCompleted = true;
- options.complete();
- },
- );
+ spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(function (
+ target,
+ options
+ ) {
+ expect(options.offset).toBeDefined();
+ expect(options.duration).toBeUndefined();
+ expect(options.maximumHeight).toBeUndefined();
+ wasCompleted = true;
+ options.complete();
+ });
viewer._postRender();
@@ -1884,15 +1919,16 @@ describe(
const promise = viewer.flyTo(voxelPrimitive, options);
let wasCompleted = false;
- spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(
- function (target, options) {
- expect(options.offset).toBeDefined();
- expect(options.duration).toBeUndefined();
- expect(options.maximumHeight).toBeUndefined();
- wasCompleted = true;
- options.complete();
- },
- );
+ spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(function (
+ target,
+ options
+ ) {
+ expect(options.offset).toBeDefined();
+ expect(options.duration).toBeUndefined();
+ expect(options.maximumHeight).toBeUndefined();
+ wasCompleted = true;
+ options.complete();
+ });
viewer._postRender();
@@ -1917,14 +1953,15 @@ describe(
const promise = viewer.flyTo(voxelPrimitive, options);
let wasCompleted = false;
- spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(
- function (target, options) {
- expect(options.duration).toBeDefined();
- expect(options.maximumHeight).toBeDefined();
- wasCompleted = true;
- options.complete();
- },
- );
+ spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(function (
+ target,
+ options
+ ) {
+ expect(options.duration).toBeDefined();
+ expect(options.maximumHeight).toBeDefined();
+ wasCompleted = true;
+ options.complete();
+ });
viewer._postRender();
@@ -1954,16 +1991,17 @@ describe(
spyOn(viewer._dataSourceDisplay, "getBoundingSphere").and.callFake(
function () {
return new BoundingSphere();
- },
- );
- spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(
- function (target, options) {
- expect(options.duration).toBeUndefined();
- expect(options.maximumHeight).toBeUndefined();
- wasCompleted = true;
- options.complete();
- },
+ }
);
+ spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(function (
+ target,
+ options
+ ) {
+ expect(options.duration).toBeUndefined();
+ expect(options.maximumHeight).toBeUndefined();
+ wasCompleted = true;
+ options.complete();
+ });
viewer._postRender();
@@ -1997,16 +2035,17 @@ describe(
spyOn(viewer._dataSourceDisplay, "getBoundingSphere").and.callFake(
function () {
return new BoundingSphere();
- },
- );
- spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(
- function (target, options) {
- expect(options.duration).toBeDefined();
- expect(options.maximumHeight).toBeDefined();
- wasCompleted = true;
- options.complete();
- },
+ }
);
+ spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(function (
+ target,
+ options
+ ) {
+ expect(options.duration).toBeDefined();
+ expect(options.maximumHeight).toBeDefined();
+ wasCompleted = true;
+ options.complete();
+ });
viewer._postRender();
@@ -2038,16 +2077,17 @@ describe(
spyOn(viewer._dataSourceDisplay, "getBoundingSphere").and.callFake(
function () {
return new BoundingSphere();
- },
- );
- spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(
- function (target, options) {
- expect(options.duration).toBeUndefined();
- expect(options.maximumHeight).toBeUndefined();
- wasCompleted = true;
- options.complete();
- },
+ }
);
+ spyOn(viewer.camera, "flyToBoundingSphere").and.callFake(function (
+ target,
+ options
+ ) {
+ expect(options.duration).toBeUndefined();
+ expect(options.maximumHeight).toBeUndefined();
+ wasCompleted = true;
+ options.complete();
+ });
viewer._postRender();
@@ -2077,13 +2117,13 @@ describe(
viewer = viewer.destroy();
expect(
- preMixinDataSource.entities.collectionChanged._listeners.length,
+ preMixinDataSource.entities.collectionChanged._listeners.length
).not.toEqual(preMixinListenerCount);
expect(
- postMixinDataSource.entities.collectionChanged._listeners.length,
+ postMixinDataSource.entities.collectionChanged._listeners.length
).not.toEqual(postMixinListenerCount);
});
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/widgets/Specs/Viewer/viewerDragDropMixinSpec.js b/packages/widgets/Specs/Viewer/viewerDragDropMixinSpec.js
index 882900e0b2b4..d730ac1f4136 100644
--- a/packages/widgets/Specs/Viewer/viewerDragDropMixinSpec.js
+++ b/packages/widgets/Specs/Viewer/viewerDragDropMixinSpec.js
@@ -285,7 +285,7 @@ describe(
expect(spyListener).toHaveBeenCalledWith(
viewer,
"czml1.czml",
- jasmine.any(SyntaxError),
+ jasmine.any(SyntaxError)
);
viewer.dropError.removeEventListener(spyListener);
@@ -320,7 +320,7 @@ describe(
expect(spyListener).toHaveBeenCalledWith(
viewer,
mockEvent.dataTransfer.files[0].name,
- mockEvent.dataTransfer.files[0].errorMessage,
+ mockEvent.dataTransfer.files[0].errorMessage
);
viewer.dropError.removeEventListener(spyListener);
@@ -471,5 +471,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/widgets/Specs/Viewer/viewerPerformanceWatchdogMixinSpec.js b/packages/widgets/Specs/Viewer/viewerPerformanceWatchdogMixinSpec.js
index fe64352157af..3526b0304dc5 100644
--- a/packages/widgets/Specs/Viewer/viewerPerformanceWatchdogMixinSpec.js
+++ b/packages/widgets/Specs/Viewer/viewerPerformanceWatchdogMixinSpec.js
@@ -36,7 +36,7 @@ describe(
lowFrameRateMessage: "Foo",
});
expect(viewer.performanceWatchdog.viewModel.lowFrameRateMessage).toBe(
- "Foo",
+ "Foo"
);
});
@@ -46,5 +46,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/packages/widgets/Specs/VoxelInspector/VoxelInspectorSpec.js b/packages/widgets/Specs/VoxelInspector/VoxelInspectorSpec.js
index b269e347787e..c2f12bd41369 100644
--- a/packages/widgets/Specs/VoxelInspector/VoxelInspectorSpec.js
+++ b/packages/widgets/Specs/VoxelInspector/VoxelInspectorSpec.js
@@ -51,5 +51,5 @@ describe(
}).toThrowDeveloperError();
});
},
- "WebGL",
+ "WebGL"
);
diff --git a/scripts/build.js b/scripts/build.js
index a28de85995a0..25c247c7210c 100644
--- a/scripts/build.js
+++ b/scripts/build.js
@@ -14,6 +14,7 @@ import { rimraf } from "rimraf";
import { mkdirp } from "mkdirp";
+
// Determines the scope of the workspace packages. If the scope is set to cesium, the workspaces should be @cesium/engine.
// This should match the scope of the dependencies of the root level package.json.
const scope = "cesium";
@@ -80,6 +81,7 @@ const stripPragmaPlugin = {
},
};
+
// Print an esbuild warning
function printBuildWarning({ location, text }) {
const { column, file, line, lineText, suggestion } = location;
@@ -111,7 +113,7 @@ export const defaultESBuildOptions = () => {
color: true,
legalComments: `inline`,
logLimit: 0,
- target: `es2020`,
+ target: `es2020`
};
};
@@ -200,7 +202,6 @@ export async function bundleCesiumJs(options) {
incremental: incremental,
write: options.write,
});
-
const iife = await build({
...buildConfig,
format: "iife",
@@ -330,6 +331,9 @@ export async function createCombinedSpecList() {
return contents;
}
+
+
+
/**
* @param {object} options
* @param {string} options.path output directory
@@ -1133,6 +1137,7 @@ export async function buildCesium(options) {
outbase: "packages/widgets/Source",
});
+
const workersContext = await bundleWorkers({
iife: false,
minify: minify,
diff --git a/server.js b/server.js
index b5092672ce6f..057beb0f0d98 100644
--- a/server.js
+++ b/server.js
@@ -104,7 +104,7 @@ async function generateDevelopmentBuild() {
});
console.log(
- `Cesium built in ${formatTimeSinceInSeconds(startTime)} seconds.`,
+ `Cesium built in ${formatTimeSinceInSeconds(startTime)} seconds.`
);
return contexts;
@@ -140,7 +140,7 @@ async function generateDevelopmentBuild() {
],
"text/plain": ["glsl"],
},
- true,
+ true
);
const app = express();
@@ -150,7 +150,7 @@ async function generateDevelopmentBuild() {
res.header("Access-Control-Allow-Origin", "*");
res.header(
"Access-Control-Allow-Headers",
- "Origin, X-Requested-With, Content-Type, Accept",
+ "Origin, X-Requested-With, Content-Type, Accept"
);
next();
});
@@ -193,19 +193,19 @@ async function generateDevelopmentBuild() {
"Cesium.js",
"/Build/CesiumUnminified/Cesium.js*",
contexts.iife,
- [iifeWorkersCache],
+ [iifeWorkersCache]
);
const esmCache = createRoute(
app,
"index.js",
"/Build/CesiumUnminified/index.js*",
- contexts.esm,
+ contexts.esm
);
const workersCache = createRoute(
app,
"Workers/*",
"/Build/CesiumUnminified/Workers/*.js",
- contexts.workers,
+ contexts.workers
);
const glslWatcher = chokidar.watch(shaderFiles, { ignoreInitial: true });
@@ -232,7 +232,7 @@ async function generateDevelopmentBuild() {
app,
"TestWorkers/*",
"/Build/Specs/TestWorkers/*",
- contexts.testWorkers,
+ contexts.testWorkers
);
chokidar
.watch(["Specs/TestWorkers/*.js"], { ignoreInitial: true })
@@ -242,7 +242,7 @@ async function generateDevelopmentBuild() {
app,
"Specs/*",
"/Build/Specs/*",
- contexts.specs,
+ contexts.specs
);
const specWatcher = chokidar.watch(specFiles, { ignoreInitial: true });
specWatcher.on("all", async (event) => {
@@ -254,24 +254,21 @@ async function generateDevelopmentBuild() {
});
// Rebuild jsHintOptions as needed and serve as-is
- app.get(
- "/Apps/Sandcastle/jsHintOptions.js",
- async function (
- //eslint-disable-next-line no-unused-vars
- req,
- res,
- //eslint-disable-next-line no-unused-vars
- next,
- ) {
- if (!jsHintOptionsCache) {
- jsHintOptionsCache = await createJsHintOptions();
- }
+ app.get("/Apps/Sandcastle/jsHintOptions.js", async function (
+ //eslint-disable-next-line no-unused-vars
+ req,
+ res,
+ //eslint-disable-next-line no-unused-vars
+ next
+ ) {
+ if (!jsHintOptionsCache) {
+ jsHintOptionsCache = await createJsHintOptions();
+ }
- res.append("Cache-Control", "max-age=0");
- res.append("Content-Type", "application/javascript");
- res.send(jsHintOptionsCache);
- },
- );
+ res.append("Cache-Control", "max-age=0");
+ res.append("Content-Type", "application/javascript");
+ res.send(jsHintOptionsCache);
+ });
// Serve any static files starting with "Build/CesiumUnminified" from the
// development build instead. That way, previous build output is preserved
@@ -296,8 +293,7 @@ async function generateDevelopmentBuild() {
return remoteUrl;
}
- const 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;
//eslint-disable-next-line no-unused-vars
function filterHeaders(req, headers) {
@@ -364,7 +360,7 @@ async function generateDevelopmentBuild() {
}
res.status(code).send(body);
- },
+ }
);
});
@@ -375,28 +371,28 @@ async function generateDevelopmentBuild() {
if (argv.public) {
console.log(
"Cesium development server running publicly. Connect to http://localhost:%d/",
- server.address().port,
+ server.address().port
);
} else {
console.log(
"Cesium development server running locally. Connect to http://localhost:%d/",
- server.address().port,
+ server.address().port
);
}
- },
+ }
);
server.on("error", function (e) {
if (e.code === "EADDRINUSE") {
console.log(
"Error: Port %d is already in use, select a different port.",
- argv.port,
+ argv.port
);
console.log("Example: node server.js --port %d", argv.port + 1);
} else if (e.code === "EACCES") {
console.log(
"Error: This process does not have permission to listen on port %d.",
- argv.port,
+ argv.port
);
if (argv.port < 1024) {
console.log("Try a port number higher than 1024.");
diff --git a/temp_wasm/cesiumjs-gsplat-utils/.appveyor.yml b/temp_wasm/cesiumjs-gsplat-utils/.appveyor.yml
new file mode 100644
index 000000000000..50910bd6f38b
--- /dev/null
+++ b/temp_wasm/cesiumjs-gsplat-utils/.appveyor.yml
@@ -0,0 +1,11 @@
+install:
+ - appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
+ - if not defined RUSTFLAGS rustup-init.exe -y --default-host x86_64-pc-windows-msvc --default-toolchain nightly
+ - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
+ - rustc -V
+ - cargo -V
+
+build: false
+
+test_script:
+ - cargo test --locked
diff --git a/temp_wasm/cesiumjs-gsplat-utils/.gitignore b/temp_wasm/cesiumjs-gsplat-utils/.gitignore
new file mode 100644
index 000000000000..8d60eedca108
--- /dev/null
+++ b/temp_wasm/cesiumjs-gsplat-utils/.gitignore
@@ -0,0 +1,6 @@
+/target
+**/*.rs.bk
+Cargo.lock
+bin/
+
+wasm-pack.log
diff --git a/temp_wasm/cesiumjs-gsplat-utils/.travis.yml b/temp_wasm/cesiumjs-gsplat-utils/.travis.yml
new file mode 100644
index 000000000000..7a913256e853
--- /dev/null
+++ b/temp_wasm/cesiumjs-gsplat-utils/.travis.yml
@@ -0,0 +1,69 @@
+language: rust
+sudo: false
+
+cache: cargo
+
+matrix:
+ include:
+
+ # Builds with wasm-pack.
+ - rust: beta
+ env: RUST_BACKTRACE=1
+ addons:
+ firefox: latest
+ chrome: stable
+ before_script:
+ - (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
+ - (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate)
+ - cargo install-update -a
+ - curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -f
+ script:
+ - cargo generate --git . --name testing
+ # Having a broken Cargo.toml (in that it has curlies in fields) anywhere
+ # in any of our parent dirs is problematic.
+ - mv Cargo.toml Cargo.toml.tmpl
+ - cd testing
+ - wasm-pack build
+ - wasm-pack test --chrome --firefox --headless
+
+ # Builds on nightly.
+ - rust: nightly
+ env: RUST_BACKTRACE=1
+ before_script:
+ - (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
+ - (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate)
+ - cargo install-update -a
+ - rustup target add wasm32-unknown-unknown
+ script:
+ - cargo generate --git . --name testing
+ - mv Cargo.toml Cargo.toml.tmpl
+ - cd testing
+ - cargo check
+ - cargo check --target wasm32-unknown-unknown
+ - cargo check --no-default-features
+ - cargo check --target wasm32-unknown-unknown --no-default-features
+ - cargo check --no-default-features --features console_error_panic_hook
+ - cargo check --target wasm32-unknown-unknown --no-default-features --features console_error_panic_hook
+ - cargo check --no-default-features --features "console_error_panic_hook wee_alloc"
+ - cargo check --target wasm32-unknown-unknown --no-default-features --features "console_error_panic_hook wee_alloc"
+
+ # Builds on beta.
+ - rust: beta
+ env: RUST_BACKTRACE=1
+ before_script:
+ - (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
+ - (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate)
+ - cargo install-update -a
+ - rustup target add wasm32-unknown-unknown
+ script:
+ - cargo generate --git . --name testing
+ - mv Cargo.toml Cargo.toml.tmpl
+ - cd testing
+ - cargo check
+ - cargo check --target wasm32-unknown-unknown
+ - cargo check --no-default-features
+ - cargo check --target wasm32-unknown-unknown --no-default-features
+ - cargo check --no-default-features --features console_error_panic_hook
+ - cargo check --target wasm32-unknown-unknown --no-default-features --features console_error_panic_hook
+ # Note: no enabling the `wee_alloc` feature here because it requires
+ # nightly for now.
diff --git a/temp_wasm/cesiumjs-gsplat-utils/Cargo.toml b/temp_wasm/cesiumjs-gsplat-utils/Cargo.toml
new file mode 100644
index 000000000000..d78f113f37af
--- /dev/null
+++ b/temp_wasm/cesiumjs-gsplat-utils/Cargo.toml
@@ -0,0 +1,32 @@
+[package]
+name = "cesiumjs-gsplat-utils"
+version = "0.1.0"
+authors = ["Jason Sobotka "]
+edition = "2021"
+
+
+[lib]
+crate-type = ["cdylib", "rlib"]
+
+[features]
+default = ["console_error_panic_hook"]
+
+[dependencies]
+wasm-bindgen = "0.2.84"
+js-sys = "0.3.72"
+web-sys = { version="0.3.72", features=["console"]}
+
+# The `console_error_panic_hook` crate provides better debugging of panics by
+# logging them with `console.error`. This is great for development, but requires
+# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
+# code size when deploying.
+console_error_panic_hook = { version = "0.1.7", optional = true }
+
+[dev-dependencies]
+wasm-bindgen-test = "0.3.34"
+
+[profile.release]
+# Tell `rustc` to optimize for small code size.
+opt-level = 3
+lto = true
+codegen-units = 1
diff --git a/temp_wasm/cesiumjs-gsplat-utils/LICENSE_APACHE b/temp_wasm/cesiumjs-gsplat-utils/LICENSE_APACHE
new file mode 100644
index 000000000000..11069edd7901
--- /dev/null
+++ b/temp_wasm/cesiumjs-gsplat-utils/LICENSE_APACHE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/temp_wasm/cesiumjs-gsplat-utils/LICENSE_MIT b/temp_wasm/cesiumjs-gsplat-utils/LICENSE_MIT
new file mode 100644
index 000000000000..cb6579ff34ee
--- /dev/null
+++ b/temp_wasm/cesiumjs-gsplat-utils/LICENSE_MIT
@@ -0,0 +1,25 @@
+Copyright (c) 2018 Jason Sobotka
+
+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/temp_wasm/cesiumjs-gsplat-utils/README.md b/temp_wasm/cesiumjs-gsplat-utils/README.md
new file mode 100644
index 000000000000..6b684085003f
--- /dev/null
+++ b/temp_wasm/cesiumjs-gsplat-utils/README.md
@@ -0,0 +1,84 @@
+
+
+## About
+
+[**📚 Read this template tutorial! 📚**][template-docs]
+
+This template is designed for compiling Rust libraries into WebAssembly and
+publishing the resulting package to NPM.
+
+Be sure to check out [other `wasm-pack` tutorials online][tutorials] for other
+templates and usages of `wasm-pack`.
+
+[tutorials]: https://rustwasm.github.io/docs/wasm-pack/tutorials/index.html
+[template-docs]: https://rustwasm.github.io/docs/wasm-pack/tutorials/npm-browser-packages/index.html
+
+## 🚴 Usage
+
+### 🐑 Use `cargo generate` to Clone this Template
+
+[Learn more about `cargo generate` here.](https://github.com/ashleygwilliams/cargo-generate)
+
+```
+cargo generate --git https://github.com/rustwasm/wasm-pack-template.git --name my-project
+cd my-project
+```
+
+### 🛠️ Build with `wasm-pack build`
+
+```
+wasm-pack build
+```
+
+### 🔬 Test in Headless Browsers with `wasm-pack test`
+
+```
+wasm-pack test --headless --firefox
+```
+
+### 🎁 Publish to NPM with `wasm-pack publish`
+
+```
+wasm-pack publish
+```
+
+## 🔋 Batteries Included
+
+* [`wasm-bindgen`](https://github.com/rustwasm/wasm-bindgen) for communicating
+ between WebAssembly and JavaScript.
+* [`console_error_panic_hook`](https://github.com/rustwasm/console_error_panic_hook)
+ for logging panic messages to the developer console.
+* `LICENSE-APACHE` and `LICENSE-MIT`: most Rust projects are licensed this way, so these are included for you
+
+## License
+
+Licensed under either of
+
+* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
+* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
+
+at your option.
+
+### Contribution
+
+Unless you explicitly state otherwise, any contribution intentionally
+submitted for inclusion in the work by you, as defined in the Apache-2.0
+license, shall be dual licensed as above, without any additional terms or
+conditions.
diff --git a/temp_wasm/cesiumjs-gsplat-utils/pkg/README.md b/temp_wasm/cesiumjs-gsplat-utils/pkg/README.md
new file mode 100644
index 000000000000..6b684085003f
--- /dev/null
+++ b/temp_wasm/cesiumjs-gsplat-utils/pkg/README.md
@@ -0,0 +1,84 @@
+
+
+## About
+
+[**📚 Read this template tutorial! 📚**][template-docs]
+
+This template is designed for compiling Rust libraries into WebAssembly and
+publishing the resulting package to NPM.
+
+Be sure to check out [other `wasm-pack` tutorials online][tutorials] for other
+templates and usages of `wasm-pack`.
+
+[tutorials]: https://rustwasm.github.io/docs/wasm-pack/tutorials/index.html
+[template-docs]: https://rustwasm.github.io/docs/wasm-pack/tutorials/npm-browser-packages/index.html
+
+## 🚴 Usage
+
+### 🐑 Use `cargo generate` to Clone this Template
+
+[Learn more about `cargo generate` here.](https://github.com/ashleygwilliams/cargo-generate)
+
+```
+cargo generate --git https://github.com/rustwasm/wasm-pack-template.git --name my-project
+cd my-project
+```
+
+### 🛠️ Build with `wasm-pack build`
+
+```
+wasm-pack build
+```
+
+### 🔬 Test in Headless Browsers with `wasm-pack test`
+
+```
+wasm-pack test --headless --firefox
+```
+
+### 🎁 Publish to NPM with `wasm-pack publish`
+
+```
+wasm-pack publish
+```
+
+## 🔋 Batteries Included
+
+* [`wasm-bindgen`](https://github.com/rustwasm/wasm-bindgen) for communicating
+ between WebAssembly and JavaScript.
+* [`console_error_panic_hook`](https://github.com/rustwasm/console_error_panic_hook)
+ for logging panic messages to the developer console.
+* `LICENSE-APACHE` and `LICENSE-MIT`: most Rust projects are licensed this way, so these are included for you
+
+## License
+
+Licensed under either of
+
+* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
+* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
+
+at your option.
+
+### Contribution
+
+Unless you explicitly state otherwise, any contribution intentionally
+submitted for inclusion in the work by you, as defined in the Apache-2.0
+license, shall be dual licensed as above, without any additional terms or
+conditions.
diff --git a/temp_wasm/cesiumjs-gsplat-utils/pkg/cesiumjs_gsplat_utils.d.ts b/temp_wasm/cesiumjs-gsplat-utils/pkg/cesiumjs_gsplat_utils.d.ts
new file mode 100644
index 000000000000..8dc04217ec97
--- /dev/null
+++ b/temp_wasm/cesiumjs-gsplat-utils/pkg/cesiumjs_gsplat_utils.d.ts
@@ -0,0 +1,164 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * @param {Float32Array} positions
+ * @param {Float32Array} scales
+ * @param {Float32Array} rots
+ * @param {Uint8Array} colors
+ * @param {number} count
+ * @returns {TextureData}
+ */
+export function generate_texture_from_attrs(positions: Float32Array, scales: Float32Array, rots: Float32Array, colors: Uint8Array, count: number): TextureData;
+/**
+ * @param {GSplatData} data
+ */
+export function radix_sort_simd(data: GSplatData): void;
+/**
+ * @param {Float32Array} positions
+ * @param {Float32Array} scales
+ * @param {Float32Array} rotations
+ * @param {Uint8Array} colors
+ * @param {Float32Array} model_view
+ * @param {number} count
+ * @returns {Array}
+ */
+export function radix_sort_gaussians_attrs(positions: Float32Array, scales: Float32Array, rotations: Float32Array, colors: Uint8Array, model_view: Float32Array, count: number): Array;
+/**
+ * @param {Float32Array} positions
+ * @param {Float32Array} model_view
+ * @param {number} texture_width
+ * @param {number} count
+ * @returns {Uint32Array}
+ */
+export function radix_sort_gaussians_indexes(positions: Float32Array, model_view: Float32Array, texture_width: number, count: number): Uint32Array;
+/**
+ * @param {Float32Array} positions
+ * @param {Float32Array} scales
+ * @param {Float32Array} rotations
+ * @param {Uint8Array} colors
+ * @param {number} count
+ * @returns {object}
+ */
+export function generate_splat_texture_from_attrs(positions: Float32Array, scales: Float32Array, rotations: Float32Array, colors: Uint8Array, count: number): object;
+export class GSplatData {
+ free(): void;
+ /**
+ * @param {Float32Array} positions
+ * @param {Float32Array} scales
+ * @param {Float32Array} rotations
+ * @param {Uint8Array} colors
+ * @param {Float32Array} model_view
+ * @param {number} count
+ */
+ constructor(positions: Float32Array, scales: Float32Array, rotations: Float32Array, colors: Uint8Array, model_view: Float32Array, count: number);
+ /**
+ * @param {Float32Array} positions
+ * @param {Float32Array} scales
+ * @param {Float32Array} rotations
+ * @param {Uint8Array} colors
+ * @param {Float32Array} model_view
+ * @param {number} count
+ * @returns {GSplatData}
+ */
+ static fromFloat32Arrays(positions: Float32Array, scales: Float32Array, rotations: Float32Array, colors: Uint8Array, model_view: Float32Array, count: number): GSplatData;
+ /**
+ * @returns {Float32Array}
+ */
+ getPositions(): Float32Array;
+ /**
+ * @returns {Float32Array}
+ */
+ getScales(): Float32Array;
+ /**
+ * @returns {Float32Array}
+ */
+ getRotations(): Float32Array;
+ /**
+ * @returns {Uint8Array}
+ */
+ getColors(): Uint8Array;
+}
+export class GaussianSorter {
+ free(): void;
+ /**
+ * @param {number} max_count
+ */
+ constructor(max_count: number);
+ /**
+ * @param {Uint8Array} memory_buffer
+ * @param {number} positions_offset
+ * @param {number} scales_offset
+ * @param {number} rotations_offset
+ * @param {number} colors_offset
+ * @param {Float32Array} model_view
+ * @param {number} count
+ */
+ sortGaussians(memory_buffer: Uint8Array, positions_offset: number, scales_offset: number, rotations_offset: number, colors_offset: number, model_view: Float32Array, count: number): void;
+}
+export class TextureData {
+ free(): void;
+ /**
+ * @param {Uint32Array} data
+ * @param {number} width
+ * @param {number} height
+ * @returns {TextureData}
+ */
+ static new(data: Uint32Array, width: number, height: number): TextureData;
+ readonly data: Uint32Array;
+ readonly height: number;
+ readonly width: number;
+}
+
+export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
+
+export interface InitOutput {
+ readonly memory: WebAssembly.Memory;
+ readonly __wbg_texturedata_free: (a: number, b: number) => void;
+ readonly texturedata_data: (a: number) => Array;
+ readonly texturedata_width: (a: number) => number;
+ readonly texturedata_height: (a: number) => number;
+ readonly texturedata_new: (a: number, b: number, c: number, d: number) => number;
+ readonly generate_texture_from_attrs: (a: number, b: number, c: number, d: number, e: number) => Array;
+ readonly __wbg_gsplatdata_free: (a: number, b: number) => void;
+ readonly gsplatdata_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => number;
+ readonly gsplatdata_fromFloat32Arrays: (a: number, b: number, c: number, d: number, e: number, f: number) => Array;
+ readonly gsplatdata_getPositions: (a: number) => number;
+ readonly gsplatdata_getScales: (a: number) => number;
+ readonly gsplatdata_getRotations: (a: number) => number;
+ readonly gsplatdata_getColors: (a: number) => number;
+ readonly radix_sort_simd: (a: number) => Array;
+ readonly radix_sort_gaussians_attrs: (a: number, b: number, c: number, d: number, e: number, f: number) => Array;
+ readonly radix_sort_gaussians_indexes: (a: number, b: number, c: number, d: number) => Array;
+ readonly __wbg_gaussiansorter_free: (a: number, b: number) => void;
+ readonly gaussiansorter_new: (a: number) => number;
+ readonly gaussiansorter_sortGaussians: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => Array;
+ readonly generate_splat_texture_from_attrs: (a: number, b: number, c: number, d: number, e: number) => Array;
+ readonly __wbindgen_export_0: WebAssembly.Table;
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
+ readonly __externref_table_dealloc: (a: number) => void;
+ readonly __wbindgen_exn_store: (a: number) => void;
+ readonly __externref_table_alloc: () => number;
+ readonly __wbindgen_start: () => void;
+}
+
+export type SyncInitInput = BufferSource | WebAssembly.Module;
+/**
+* Instantiates the given `module`, which can either be bytes or
+* a precompiled `WebAssembly.Module`.
+*
+* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
+*
+* @returns {InitOutput}
+*/
+export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
+
+/**
+* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
+* for everything else, calls `WebAssembly.instantiate` directly.
+*
+* @param {{ module_or_path: InitInput | Promise }} module_or_path - Passing `InitInput` directly is deprecated.
+*
+* @returns {Promise}
+*/
+export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise } | InitInput | Promise): Promise;
diff --git a/temp_wasm/cesiumjs-gsplat-utils/pkg/cesiumjs_gsplat_utils.js b/temp_wasm/cesiumjs-gsplat-utils/pkg/cesiumjs_gsplat_utils.js
new file mode 100644
index 000000000000..e5c808bbbe4d
--- /dev/null
+++ b/temp_wasm/cesiumjs-gsplat-utils/pkg/cesiumjs_gsplat_utils.js
@@ -0,0 +1,578 @@
+let wasm;
+
+const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
+
+if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
+
+let cachedUint8ArrayMemory0 = null;
+
+function getUint8ArrayMemory0() {
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
+ }
+ return cachedUint8ArrayMemory0;
+}
+
+function getStringFromWasm0(ptr, len) {
+ ptr = ptr >>> 0;
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
+}
+
+let cachedUint32ArrayMemory0 = null;
+
+function getUint32ArrayMemory0() {
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
+ }
+ return cachedUint32ArrayMemory0;
+}
+
+function getArrayU32FromWasm0(ptr, len) {
+ ptr = ptr >>> 0;
+ return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
+}
+
+let WASM_VECTOR_LEN = 0;
+
+function passArray32ToWasm0(arg, malloc) {
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
+ getUint32ArrayMemory0().set(arg, ptr / 4);
+ WASM_VECTOR_LEN = arg.length;
+ return ptr;
+}
+
+function takeFromExternrefTable0(idx) {
+ const value = wasm.__wbindgen_export_0.get(idx);
+ wasm.__externref_table_dealloc(idx);
+ return value;
+}
+/**
+ * @param {Float32Array} positions
+ * @param {Float32Array} scales
+ * @param {Float32Array} rots
+ * @param {Uint8Array} colors
+ * @param {number} count
+ * @returns {TextureData}
+ */
+export function generate_texture_from_attrs(positions, scales, rots, colors, count) {
+ const ret = wasm.generate_texture_from_attrs(positions, scales, rots, colors, count);
+ if (ret[2]) {
+ throw takeFromExternrefTable0(ret[1]);
+ }
+ return TextureData.__wrap(ret[0]);
+}
+
+let cachedFloat32ArrayMemory0 = null;
+
+function getFloat32ArrayMemory0() {
+ if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {
+ cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);
+ }
+ return cachedFloat32ArrayMemory0;
+}
+
+function passArrayF32ToWasm0(arg, malloc) {
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
+ getFloat32ArrayMemory0().set(arg, ptr / 4);
+ WASM_VECTOR_LEN = arg.length;
+ return ptr;
+}
+
+function passArray8ToWasm0(arg, malloc) {
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
+ getUint8ArrayMemory0().set(arg, ptr / 1);
+ WASM_VECTOR_LEN = arg.length;
+ return ptr;
+}
+
+function _assertClass(instance, klass) {
+ if (!(instance instanceof klass)) {
+ throw new Error(`expected instance of ${klass.name}`);
+ }
+ return instance.ptr;
+}
+/**
+ * @param {GSplatData} data
+ */
+export function radix_sort_simd(data) {
+ _assertClass(data, GSplatData);
+ const ret = wasm.radix_sort_simd(data.__wbg_ptr);
+ if (ret[1]) {
+ throw takeFromExternrefTable0(ret[0]);
+ }
+}
+
+/**
+ * @param {Float32Array} positions
+ * @param {Float32Array} scales
+ * @param {Float32Array} rotations
+ * @param {Uint8Array} colors
+ * @param {Float32Array} model_view
+ * @param {number} count
+ * @returns {Array}
+ */
+export function radix_sort_gaussians_attrs(positions, scales, rotations, colors, model_view, count) {
+ const ret = wasm.radix_sort_gaussians_attrs(positions, scales, rotations, colors, model_view, count);
+ if (ret[2]) {
+ throw takeFromExternrefTable0(ret[1]);
+ }
+ return takeFromExternrefTable0(ret[0]);
+}
+
+/**
+ * @param {Float32Array} positions
+ * @param {Float32Array} model_view
+ * @param {number} texture_width
+ * @param {number} count
+ * @returns {Uint32Array}
+ */
+export function radix_sort_gaussians_indexes(positions, model_view, texture_width, count) {
+ const ret = wasm.radix_sort_gaussians_indexes(positions, model_view, texture_width, count);
+ if (ret[2]) {
+ throw takeFromExternrefTable0(ret[1]);
+ }
+ return takeFromExternrefTable0(ret[0]);
+}
+
+/**
+ * @param {Float32Array} positions
+ * @param {Float32Array} scales
+ * @param {Float32Array} rotations
+ * @param {Uint8Array} colors
+ * @param {number} count
+ * @returns {object}
+ */
+export function generate_splat_texture_from_attrs(positions, scales, rotations, colors, count) {
+ const ret = wasm.generate_splat_texture_from_attrs(positions, scales, rotations, colors, count);
+ if (ret[2]) {
+ throw takeFromExternrefTable0(ret[1]);
+ }
+ return takeFromExternrefTable0(ret[0]);
+}
+
+function addToExternrefTable0(obj) {
+ const idx = wasm.__externref_table_alloc();
+ wasm.__wbindgen_export_0.set(idx, obj);
+ return idx;
+}
+
+function handleError(f, args) {
+ try {
+ return f.apply(this, args);
+ } catch (e) {
+ const idx = addToExternrefTable0(e);
+ wasm.__wbindgen_exn_store(idx);
+ }
+}
+
+const GSplatDataFinalization = (typeof FinalizationRegistry === 'undefined')
+ ? { register: () => {}, unregister: () => {} }
+ : new FinalizationRegistry(ptr => wasm.__wbg_gsplatdata_free(ptr >>> 0, 1));
+
+export class GSplatData {
+
+ static __wrap(ptr) {
+ ptr = ptr >>> 0;
+ const obj = Object.create(GSplatData.prototype);
+ obj.__wbg_ptr = ptr;
+ GSplatDataFinalization.register(obj, obj.__wbg_ptr, obj);
+ return obj;
+ }
+
+ __destroy_into_raw() {
+ const ptr = this.__wbg_ptr;
+ this.__wbg_ptr = 0;
+ GSplatDataFinalization.unregister(this);
+ return ptr;
+ }
+
+ free() {
+ const ptr = this.__destroy_into_raw();
+ wasm.__wbg_gsplatdata_free(ptr, 0);
+ }
+ /**
+ * @param {Float32Array} positions
+ * @param {Float32Array} scales
+ * @param {Float32Array} rotations
+ * @param {Uint8Array} colors
+ * @param {Float32Array} model_view
+ * @param {number} count
+ */
+ constructor(positions, scales, rotations, colors, model_view, count) {
+ const ptr0 = passArrayF32ToWasm0(positions, wasm.__wbindgen_malloc);
+ const len0 = WASM_VECTOR_LEN;
+ const ptr1 = passArrayF32ToWasm0(scales, wasm.__wbindgen_malloc);
+ const len1 = WASM_VECTOR_LEN;
+ const ptr2 = passArrayF32ToWasm0(rotations, wasm.__wbindgen_malloc);
+ const len2 = WASM_VECTOR_LEN;
+ const ptr3 = passArray8ToWasm0(colors, wasm.__wbindgen_malloc);
+ const len3 = WASM_VECTOR_LEN;
+ const ptr4 = passArrayF32ToWasm0(model_view, wasm.__wbindgen_malloc);
+ const len4 = WASM_VECTOR_LEN;
+ const ret = wasm.gsplatdata_new(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, count);
+ this.__wbg_ptr = ret >>> 0;
+ GSplatDataFinalization.register(this, this.__wbg_ptr, this);
+ return this;
+ }
+ /**
+ * @param {Float32Array} positions
+ * @param {Float32Array} scales
+ * @param {Float32Array} rotations
+ * @param {Uint8Array} colors
+ * @param {Float32Array} model_view
+ * @param {number} count
+ * @returns {GSplatData}
+ */
+ static fromFloat32Arrays(positions, scales, rotations, colors, model_view, count) {
+ const ret = wasm.gsplatdata_fromFloat32Arrays(positions, scales, rotations, colors, model_view, count);
+ if (ret[2]) {
+ throw takeFromExternrefTable0(ret[1]);
+ }
+ return GSplatData.__wrap(ret[0]);
+ }
+ /**
+ * @returns {Float32Array}
+ */
+ getPositions() {
+ const ret = wasm.gsplatdata_getPositions(this.__wbg_ptr);
+ return ret;
+ }
+ /**
+ * @returns {Float32Array}
+ */
+ getScales() {
+ const ret = wasm.gsplatdata_getScales(this.__wbg_ptr);
+ return ret;
+ }
+ /**
+ * @returns {Float32Array}
+ */
+ getRotations() {
+ const ret = wasm.gsplatdata_getRotations(this.__wbg_ptr);
+ return ret;
+ }
+ /**
+ * @returns {Uint8Array}
+ */
+ getColors() {
+ const ret = wasm.gsplatdata_getColors(this.__wbg_ptr);
+ return ret;
+ }
+}
+
+const GaussianSorterFinalization = (typeof FinalizationRegistry === 'undefined')
+ ? { register: () => {}, unregister: () => {} }
+ : new FinalizationRegistry(ptr => wasm.__wbg_gaussiansorter_free(ptr >>> 0, 1));
+
+export class GaussianSorter {
+
+ __destroy_into_raw() {
+ const ptr = this.__wbg_ptr;
+ this.__wbg_ptr = 0;
+ GaussianSorterFinalization.unregister(this);
+ return ptr;
+ }
+
+ free() {
+ const ptr = this.__destroy_into_raw();
+ wasm.__wbg_gaussiansorter_free(ptr, 0);
+ }
+ /**
+ * @param {number} max_count
+ */
+ constructor(max_count) {
+ const ret = wasm.gaussiansorter_new(max_count);
+ this.__wbg_ptr = ret >>> 0;
+ GaussianSorterFinalization.register(this, this.__wbg_ptr, this);
+ return this;
+ }
+ /**
+ * @param {Uint8Array} memory_buffer
+ * @param {number} positions_offset
+ * @param {number} scales_offset
+ * @param {number} rotations_offset
+ * @param {number} colors_offset
+ * @param {Float32Array} model_view
+ * @param {number} count
+ */
+ sortGaussians(memory_buffer, positions_offset, scales_offset, rotations_offset, colors_offset, model_view, count) {
+ const ptr0 = passArray8ToWasm0(memory_buffer, wasm.__wbindgen_malloc);
+ const len0 = WASM_VECTOR_LEN;
+ const ptr1 = passArrayF32ToWasm0(model_view, wasm.__wbindgen_malloc);
+ const len1 = WASM_VECTOR_LEN;
+ const ret = wasm.gaussiansorter_sortGaussians(this.__wbg_ptr, ptr0, len0, positions_offset, scales_offset, rotations_offset, colors_offset, ptr1, len1, count);
+ if (ret[1]) {
+ throw takeFromExternrefTable0(ret[0]);
+ }
+ }
+}
+
+const TextureDataFinalization = (typeof FinalizationRegistry === 'undefined')
+ ? { register: () => {}, unregister: () => {} }
+ : new FinalizationRegistry(ptr => wasm.__wbg_texturedata_free(ptr >>> 0, 1));
+
+export class TextureData {
+
+ static __wrap(ptr) {
+ ptr = ptr >>> 0;
+ const obj = Object.create(TextureData.prototype);
+ obj.__wbg_ptr = ptr;
+ TextureDataFinalization.register(obj, obj.__wbg_ptr, obj);
+ return obj;
+ }
+
+ __destroy_into_raw() {
+ const ptr = this.__wbg_ptr;
+ this.__wbg_ptr = 0;
+ TextureDataFinalization.unregister(this);
+ return ptr;
+ }
+
+ free() {
+ const ptr = this.__destroy_into_raw();
+ wasm.__wbg_texturedata_free(ptr, 0);
+ }
+ /**
+ * @returns {Uint32Array}
+ */
+ get data() {
+ const ret = wasm.texturedata_data(this.__wbg_ptr);
+ var v1 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
+ return v1;
+ }
+ /**
+ * @returns {number}
+ */
+ get width() {
+ const ret = wasm.texturedata_width(this.__wbg_ptr);
+ return ret >>> 0;
+ }
+ /**
+ * @returns {number}
+ */
+ get height() {
+ const ret = wasm.texturedata_height(this.__wbg_ptr);
+ return ret >>> 0;
+ }
+ /**
+ * @param {Uint32Array} data
+ * @param {number} width
+ * @param {number} height
+ * @returns {TextureData}
+ */
+ static new(data, width, height) {
+ const ptr0 = passArray32ToWasm0(data, wasm.__wbindgen_malloc);
+ const len0 = WASM_VECTOR_LEN;
+ const ret = wasm.texturedata_new(ptr0, len0, width, height);
+ return TextureData.__wrap(ret);
+ }
+}
+
+async function __wbg_load(module, imports) {
+ if (typeof Response === 'function' && module instanceof Response) {
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
+ try {
+ return await WebAssembly.instantiateStreaming(module, imports);
+
+ } catch (e) {
+ if (module.headers.get('Content-Type') != 'application/wasm') {
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
+
+ } else {
+ throw e;
+ }
+ }
+ }
+
+ const bytes = await module.arrayBuffer();
+ return await WebAssembly.instantiate(bytes, imports);
+
+ } else {
+ const instance = await WebAssembly.instantiate(module, imports);
+
+ if (instance instanceof WebAssembly.Instance) {
+ return { instance, module };
+
+ } else {
+ return instance;
+ }
+ }
+}
+
+function __wbg_get_imports() {
+ const imports = {};
+ imports.wbg = {};
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
+ const ret = getStringFromWasm0(arg0, arg1);
+ return ret;
+ };
+ imports.wbg.__wbindgen_number_new = function(arg0) {
+ const ret = arg0;
+ return ret;
+ };
+ imports.wbg.__wbg_new_034f913e7636e987 = function() {
+ const ret = new Array();
+ return ret;
+ };
+ imports.wbg.__wbg_new_e69b5f66fda8f13c = function() {
+ const ret = new Object();
+ return ret;
+ };
+ imports.wbg.__wbg_push_36cf4d81d7da33d1 = function(arg0, arg1) {
+ const ret = arg0.push(arg1);
+ return ret;
+ };
+ imports.wbg.__wbg_set_e864d25d9b399c9f = function() { return handleError(function (arg0, arg1, arg2) {
+ const ret = Reflect.set(arg0, arg1, arg2);
+ return ret;
+ }, arguments) };
+ imports.wbg.__wbg_buffer_ccaed51a635d8a2d = function(arg0) {
+ const ret = arg0.buffer;
+ return ret;
+ };
+ imports.wbg.__wbg_newwithbyteoffsetandlength_7e3eb787208af730 = function(arg0, arg1, arg2) {
+ const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
+ return ret;
+ };
+ imports.wbg.__wbg_new_fec2611eb9180f95 = function(arg0) {
+ const ret = new Uint8Array(arg0);
+ return ret;
+ };
+ imports.wbg.__wbg_set_ec2fcf81bc573fd9 = function(arg0, arg1, arg2) {
+ arg0.set(arg1, arg2 >>> 0);
+ };
+ imports.wbg.__wbg_length_9254c4bd3b9f23c4 = function(arg0) {
+ const ret = arg0.length;
+ return ret;
+ };
+ imports.wbg.__wbg_newwithbyteoffsetandlength_5f67057565ba35bf = function(arg0, arg1, arg2) {
+ const ret = new Uint32Array(arg0, arg1 >>> 0, arg2 >>> 0);
+ return ret;
+ };
+ imports.wbg.__wbg_set_ee2653838c0bd646 = function(arg0, arg1, arg2) {
+ arg0.set(arg1, arg2 >>> 0);
+ };
+ imports.wbg.__wbg_length_4fffde3ebafcc274 = function(arg0) {
+ const ret = arg0.length;
+ return ret;
+ };
+ imports.wbg.__wbg_newwithbyteoffsetandlength_fc445c2d308275d0 = function(arg0, arg1, arg2) {
+ const ret = new Float32Array(arg0, arg1 >>> 0, arg2 >>> 0);
+ return ret;
+ };
+ imports.wbg.__wbg_new_1da7377de0530afc = function(arg0) {
+ const ret = new Float32Array(arg0);
+ return ret;
+ };
+ imports.wbg.__wbg_set_7d71c7d52113586f = function(arg0, arg1, arg2) {
+ arg0.set(arg1, arg2 >>> 0);
+ };
+ imports.wbg.__wbg_length_366f583a1aad1dab = function(arg0) {
+ const ret = arg0.length;
+ return ret;
+ };
+ imports.wbg.__wbg_newwithlength_76462a666eca145f = function(arg0) {
+ const ret = new Uint8Array(arg0 >>> 0);
+ return ret;
+ };
+ imports.wbg.__wbg_newwithlength_45683f0f95fd0b21 = function(arg0) {
+ const ret = new Uint32Array(arg0 >>> 0);
+ return ret;
+ };
+ imports.wbg.__wbg_newwithlength_fb5c9bf9e513fa46 = function(arg0) {
+ const ret = new Float32Array(arg0 >>> 0);
+ return ret;
+ };
+ imports.wbg.__wbindgen_throw = function(arg0, arg1) {
+ throw new Error(getStringFromWasm0(arg0, arg1));
+ };
+ imports.wbg.__wbindgen_memory = function() {
+ const ret = wasm.memory;
+ return ret;
+ };
+ imports.wbg.__wbindgen_init_externref_table = function() {
+ const table = wasm.__wbindgen_export_0;
+ const offset = table.grow(4);
+ table.set(0, undefined);
+ table.set(offset + 0, undefined);
+ table.set(offset + 1, null);
+ table.set(offset + 2, true);
+ table.set(offset + 3, false);
+ ;
+ };
+
+ return imports;
+}
+
+function __wbg_init_memory(imports, memory) {
+
+}
+
+function __wbg_finalize_init(instance, module) {
+ wasm = instance.exports;
+ __wbg_init.__wbindgen_wasm_module = module;
+ cachedFloat32ArrayMemory0 = null;
+ cachedUint32ArrayMemory0 = null;
+ cachedUint8ArrayMemory0 = null;
+
+
+ wasm.__wbindgen_start();
+ return wasm;
+}
+
+function initSync(module) {
+ if (wasm !== undefined) return wasm;
+
+
+ if (typeof module !== 'undefined') {
+ if (Object.getPrototypeOf(module) === Object.prototype) {
+ ({module} = module)
+ } else {
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
+ }
+ }
+
+ const imports = __wbg_get_imports();
+
+ __wbg_init_memory(imports);
+
+ if (!(module instanceof WebAssembly.Module)) {
+ module = new WebAssembly.Module(module);
+ }
+
+ const instance = new WebAssembly.Instance(module, imports);
+
+ return __wbg_finalize_init(instance, module);
+}
+
+async function __wbg_init(module_or_path) {
+ if (wasm !== undefined) return wasm;
+
+
+ if (typeof module_or_path !== 'undefined') {
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
+ ({module_or_path} = module_or_path)
+ } else {
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
+ }
+ }
+
+ if (typeof module_or_path === 'undefined') {
+ module_or_path = new URL('cesiumjs_gsplat_utils_bg.wasm', import.meta.url);
+ }
+ const imports = __wbg_get_imports();
+
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
+ module_or_path = fetch(module_or_path);
+ }
+
+ __wbg_init_memory(imports);
+
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
+
+ return __wbg_finalize_init(instance, module);
+}
+
+export { initSync };
+export default __wbg_init;
diff --git a/temp_wasm/cesiumjs-gsplat-utils/pkg/cesiumjs_gsplat_utils_bg.js b/temp_wasm/cesiumjs-gsplat-utils/pkg/cesiumjs_gsplat_utils_bg.js
new file mode 100644
index 000000000000..65a175501152
--- /dev/null
+++ b/temp_wasm/cesiumjs-gsplat-utils/pkg/cesiumjs_gsplat_utils_bg.js
@@ -0,0 +1,380 @@
+let wasm;
+export function __wbg_set_wasm(val) {
+ wasm = val;
+}
+
+
+const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
+
+let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
+
+cachedTextDecoder.decode();
+
+let cachedUint8ArrayMemory0 = null;
+
+function getUint8ArrayMemory0() {
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
+ }
+ return cachedUint8ArrayMemory0;
+}
+
+function getStringFromWasm0(ptr, len) {
+ ptr = ptr >>> 0;
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
+}
+
+let cachedUint32ArrayMemory0 = null;
+
+function getUint32ArrayMemory0() {
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
+ }
+ return cachedUint32ArrayMemory0;
+}
+
+function getArrayU32FromWasm0(ptr, len) {
+ ptr = ptr >>> 0;
+ return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
+}
+
+let WASM_VECTOR_LEN = 0;
+
+function passArray32ToWasm0(arg, malloc) {
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
+ getUint32ArrayMemory0().set(arg, ptr / 4);
+ WASM_VECTOR_LEN = arg.length;
+ return ptr;
+}
+
+let cachedFloat32ArrayMemory0 = null;
+
+function getFloat32ArrayMemory0() {
+ if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {
+ cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);
+ }
+ return cachedFloat32ArrayMemory0;
+}
+
+function passArrayF32ToWasm0(arg, malloc) {
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
+ getFloat32ArrayMemory0().set(arg, ptr / 4);
+ WASM_VECTOR_LEN = arg.length;
+ return ptr;
+}
+
+function passArray8ToWasm0(arg, malloc) {
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
+ getUint8ArrayMemory0().set(arg, ptr / 1);
+ WASM_VECTOR_LEN = arg.length;
+ return ptr;
+}
+
+function takeFromExternrefTable0(idx) {
+ const value = wasm.__wbindgen_export_0.get(idx);
+ wasm.__externref_table_dealloc(idx);
+ return value;
+}
+/**
+ * @param {Float32Array} pos
+ * @param {Uint8Array} rgba
+ * @param {Float32Array} scale
+ * @param {Float32Array} rot
+ * @param {number} vertex_count
+ * @returns {TextureData}
+ */
+export function generate_texture_from_attrs(pos, rgba, scale, rot, vertex_count) {
+ const ptr0 = passArrayF32ToWasm0(pos, wasm.__wbindgen_malloc);
+ const len0 = WASM_VECTOR_LEN;
+ const ptr1 = passArray8ToWasm0(rgba, wasm.__wbindgen_malloc);
+ const len1 = WASM_VECTOR_LEN;
+ const ptr2 = passArrayF32ToWasm0(scale, wasm.__wbindgen_malloc);
+ const len2 = WASM_VECTOR_LEN;
+ const ptr3 = passArrayF32ToWasm0(rot, wasm.__wbindgen_malloc);
+ const len3 = WASM_VECTOR_LEN;
+ const ret = wasm.generate_texture_from_attrs(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, vertex_count);
+ if (ret[2]) {
+ throw takeFromExternrefTable0(ret[1]);
+ }
+ return TextureData.__wrap(ret[0]);
+}
+
+/**
+ * @param {Uint8Array} buffer
+ * @param {number} vertex_count
+ * @returns {TextureData}
+ */
+export function generate_texture(buffer, vertex_count) {
+ const ptr0 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc);
+ const len0 = WASM_VECTOR_LEN;
+ const ret = wasm.generate_texture(ptr0, len0, vertex_count);
+ if (ret[2]) {
+ throw takeFromExternrefTable0(ret[1]);
+ }
+ return TextureData.__wrap(ret[0]);
+}
+
+function _assertClass(instance, klass) {
+ if (!(instance instanceof klass)) {
+ throw new Error(`expected instance of ${klass.name}`);
+ }
+ return instance.ptr;
+}
+/**
+ * @param {GSplatData} data
+ */
+export function radix_sort_simd(data) {
+ _assertClass(data, GSplatData);
+ wasm.radix_sort_simd(data.__wbg_ptr);
+}
+
+/**
+ * @param {Float32Array} positions
+ * @param {Float32Array} scales
+ * @param {Float32Array} rotations
+ * @param {Float32Array} colors
+ * @param {Float32Array} model_view
+ * @param {number} count
+ * @returns {GSplatData}
+ */
+export function sort_graphics_data(positions, scales, rotations, colors, model_view, count) {
+ const ptr0 = passArrayF32ToWasm0(positions, wasm.__wbindgen_malloc);
+ const len0 = WASM_VECTOR_LEN;
+ const ptr1 = passArrayF32ToWasm0(scales, wasm.__wbindgen_malloc);
+ const len1 = WASM_VECTOR_LEN;
+ const ptr2 = passArrayF32ToWasm0(rotations, wasm.__wbindgen_malloc);
+ const len2 = WASM_VECTOR_LEN;
+ const ptr3 = passArrayF32ToWasm0(colors, wasm.__wbindgen_malloc);
+ const len3 = WASM_VECTOR_LEN;
+ const ptr4 = passArrayF32ToWasm0(model_view, wasm.__wbindgen_malloc);
+ const len4 = WASM_VECTOR_LEN;
+ const ret = wasm.sort_graphics_data(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, count);
+ return GSplatData.__wrap(ret);
+}
+
+export function greet() {
+ wasm.greet();
+}
+
+/**
+ * @param {SortParameters} params
+ */
+export function count_sort(params) {
+ _assertClass(params, SortParameters);
+ wasm.count_sort(params.__wbg_ptr);
+}
+
+/**
+ * @param {Uint8Array} buffer
+ * @param {number} vertex_count
+ * @returns {TextureData}
+ */
+export function generate_splat_texture(buffer, vertex_count) {
+ const ptr0 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc);
+ const len0 = WASM_VECTOR_LEN;
+ const ret = wasm.generate_splat_texture(ptr0, len0, vertex_count);
+ if (ret[2]) {
+ throw takeFromExternrefTable0(ret[1]);
+ }
+ return TextureData.__wrap(ret[0]);
+}
+
+/**
+ * @param {Float32Array} pos
+ * @param {Uint8Array} rgba
+ * @param {Float32Array} scale
+ * @param {Float32Array} rot
+ * @param {number} vertex_cnt
+ * @returns {TextureData}
+ */
+export function generate_splat_texture_from_attrs(pos, rgba, scale, rot, vertex_cnt) {
+ const ptr0 = passArrayF32ToWasm0(pos, wasm.__wbindgen_malloc);
+ const len0 = WASM_VECTOR_LEN;
+ const ptr1 = passArray8ToWasm0(rgba, wasm.__wbindgen_malloc);
+ const len1 = WASM_VECTOR_LEN;
+ const ptr2 = passArrayF32ToWasm0(scale, wasm.__wbindgen_malloc);
+ const len2 = WASM_VECTOR_LEN;
+ const ptr3 = passArrayF32ToWasm0(rot, wasm.__wbindgen_malloc);
+ const len3 = WASM_VECTOR_LEN;
+ const ret = wasm.generate_splat_texture_from_attrs(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, vertex_cnt);
+ if (ret[2]) {
+ throw takeFromExternrefTable0(ret[1]);
+ }
+ return TextureData.__wrap(ret[0]);
+}
+
+const GSplatDataFinalization = (typeof FinalizationRegistry === 'undefined')
+ ? { register: () => {}, unregister: () => {} }
+ : new FinalizationRegistry(ptr => wasm.__wbg_gsplatdata_free(ptr >>> 0, 1));
+
+export class GSplatData {
+
+ static __wrap(ptr) {
+ ptr = ptr >>> 0;
+ const obj = Object.create(GSplatData.prototype);
+ obj.__wbg_ptr = ptr;
+ GSplatDataFinalization.register(obj, obj.__wbg_ptr, obj);
+ return obj;
+ }
+
+ __destroy_into_raw() {
+ const ptr = this.__wbg_ptr;
+ this.__wbg_ptr = 0;
+ GSplatDataFinalization.unregister(this);
+ return ptr;
+ }
+
+ free() {
+ const ptr = this.__destroy_into_raw();
+ wasm.__wbg_gsplatdata_free(ptr, 0);
+ }
+ /**
+ * @param {Float32Array} positions
+ * @param {Float32Array} scales
+ * @param {Float32Array} rotations
+ * @param {Float32Array} colors
+ * @param {Float32Array} model_view
+ * @param {number} count
+ */
+ constructor(positions, scales, rotations, colors, model_view, count) {
+ const ptr0 = passArrayF32ToWasm0(positions, wasm.__wbindgen_malloc);
+ const len0 = WASM_VECTOR_LEN;
+ const ptr1 = passArrayF32ToWasm0(scales, wasm.__wbindgen_malloc);
+ const len1 = WASM_VECTOR_LEN;
+ const ptr2 = passArrayF32ToWasm0(rotations, wasm.__wbindgen_malloc);
+ const len2 = WASM_VECTOR_LEN;
+ const ptr3 = passArrayF32ToWasm0(colors, wasm.__wbindgen_malloc);
+ const len3 = WASM_VECTOR_LEN;
+ const ptr4 = passArrayF32ToWasm0(model_view, wasm.__wbindgen_malloc);
+ const len4 = WASM_VECTOR_LEN;
+ const ret = wasm.gsplatdata_new(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, count);
+ this.__wbg_ptr = ret >>> 0;
+ GSplatDataFinalization.register(this, this.__wbg_ptr, this);
+ return this;
+ }
+}
+
+const SortParametersFinalization = (typeof FinalizationRegistry === 'undefined')
+ ? { register: () => {}, unregister: () => {} }
+ : new FinalizationRegistry(ptr => wasm.__wbg_sortparameters_free(ptr >>> 0, 1));
+
+export class SortParameters {
+
+ __destroy_into_raw() {
+ const ptr = this.__wbg_ptr;
+ this.__wbg_ptr = 0;
+ SortParametersFinalization.unregister(this);
+ return ptr;
+ }
+
+ free() {
+ const ptr = this.__destroy_into_raw();
+ wasm.__wbg_sortparameters_free(ptr, 0);
+ }
+ /**
+ * @param {Float32Array} positions
+ * @param {Float32Array} scales
+ * @param {Float32Array} rotations
+ * @param {Float32Array} colors
+ * @param {Float32Array} model_view
+ * @param {number} count
+ */
+ constructor(positions, scales, rotations, colors, model_view, count) {
+ const ptr0 = passArrayF32ToWasm0(positions, wasm.__wbindgen_malloc);
+ const len0 = WASM_VECTOR_LEN;
+ const ptr1 = passArrayF32ToWasm0(scales, wasm.__wbindgen_malloc);
+ const len1 = WASM_VECTOR_LEN;
+ const ptr2 = passArrayF32ToWasm0(rotations, wasm.__wbindgen_malloc);
+ const len2 = WASM_VECTOR_LEN;
+ const ptr3 = passArrayF32ToWasm0(colors, wasm.__wbindgen_malloc);
+ const len3 = WASM_VECTOR_LEN;
+ const ptr4 = passArrayF32ToWasm0(model_view, wasm.__wbindgen_malloc);
+ const len4 = WASM_VECTOR_LEN;
+ const ret = wasm.sortparameters_new(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, count);
+ this.__wbg_ptr = ret >>> 0;
+ SortParametersFinalization.register(this, this.__wbg_ptr, this);
+ return this;
+ }
+}
+
+const TextureDataFinalization = (typeof FinalizationRegistry === 'undefined')
+ ? { register: () => {}, unregister: () => {} }
+ : new FinalizationRegistry(ptr => wasm.__wbg_texturedata_free(ptr >>> 0, 1));
+
+export class TextureData {
+
+ static __wrap(ptr) {
+ ptr = ptr >>> 0;
+ const obj = Object.create(TextureData.prototype);
+ obj.__wbg_ptr = ptr;
+ TextureDataFinalization.register(obj, obj.__wbg_ptr, obj);
+ return obj;
+ }
+
+ __destroy_into_raw() {
+ const ptr = this.__wbg_ptr;
+ this.__wbg_ptr = 0;
+ TextureDataFinalization.unregister(this);
+ return ptr;
+ }
+
+ free() {
+ const ptr = this.__destroy_into_raw();
+ wasm.__wbg_texturedata_free(ptr, 0);
+ }
+ /**
+ * @returns {Uint32Array}
+ */
+ get data() {
+ const ret = wasm.texturedata_data(this.__wbg_ptr);
+ var v1 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
+ return v1;
+ }
+ /**
+ * @returns {number}
+ */
+ get width() {
+ const ret = wasm.texturedata_width(this.__wbg_ptr);
+ return ret >>> 0;
+ }
+ /**
+ * @returns {number}
+ */
+ get height() {
+ const ret = wasm.texturedata_height(this.__wbg_ptr);
+ return ret >>> 0;
+ }
+ /**
+ * @param {Uint32Array} data
+ * @param {number} width
+ * @param {number} height
+ * @returns {TextureData}
+ */
+ static new(data, width, height) {
+ const ptr0 = passArray32ToWasm0(data, wasm.__wbindgen_malloc);
+ const len0 = WASM_VECTOR_LEN;
+ const ret = wasm.texturedata_new(ptr0, len0, width, height);
+ return TextureData.__wrap(ret);
+ }
+}
+
+export function __wbg_alert_abe635d522c06aef(arg0, arg1) {
+ alert(getStringFromWasm0(arg0, arg1));
+};
+
+export function __wbindgen_throw(arg0, arg1) {
+ throw new Error(getStringFromWasm0(arg0, arg1));
+};
+
+export function __wbindgen_init_externref_table() {
+ const table = wasm.__wbindgen_export_0;
+ const offset = table.grow(4);
+ table.set(0, undefined);
+ table.set(offset + 0, undefined);
+ table.set(offset + 1, null);
+ table.set(offset + 2, true);
+ table.set(offset + 3, false);
+ ;
+};
+
diff --git a/temp_wasm/cesiumjs-gsplat-utils/pkg/cesiumjs_gsplat_utils_bg.wasm b/temp_wasm/cesiumjs-gsplat-utils/pkg/cesiumjs_gsplat_utils_bg.wasm
new file mode 100644
index 000000000000..947fb2e18dbc
Binary files /dev/null and b/temp_wasm/cesiumjs-gsplat-utils/pkg/cesiumjs_gsplat_utils_bg.wasm differ
diff --git a/temp_wasm/cesiumjs-gsplat-utils/pkg/cesiumjs_gsplat_utils_bg.wasm.d.ts b/temp_wasm/cesiumjs-gsplat-utils/pkg/cesiumjs_gsplat_utils_bg.wasm.d.ts
new file mode 100644
index 000000000000..bcf54bed2cde
--- /dev/null
+++ b/temp_wasm/cesiumjs-gsplat-utils/pkg/cesiumjs_gsplat_utils_bg.wasm.d.ts
@@ -0,0 +1,30 @@
+/* tslint:disable */
+/* eslint-disable */
+export const memory: WebAssembly.Memory;
+export function __wbg_texturedata_free(a: number, b: number): void;
+export function texturedata_data(a: number): Array;
+export function texturedata_width(a: number): number;
+export function texturedata_height(a: number): number;
+export function texturedata_new(a: number, b: number, c: number, d: number): number;
+export function generate_texture_from_attrs(a: number, b: number, c: number, d: number, e: number): Array;
+export function __wbg_gsplatdata_free(a: number, b: number): void;
+export function gsplatdata_new(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number): number;
+export function gsplatdata_fromFloat32Arrays(a: number, b: number, c: number, d: number, e: number, f: number): Array;
+export function gsplatdata_getPositions(a: number): number;
+export function gsplatdata_getScales(a: number): number;
+export function gsplatdata_getRotations(a: number): number;
+export function gsplatdata_getColors(a: number): number;
+export function radix_sort_simd(a: number): Array;
+export function radix_sort_gaussians_attrs(a: number, b: number, c: number, d: number, e: number, f: number): Array;
+export function radix_sort_gaussians_indexes(a: number, b: number, c: number, d: number): Array;
+export function __wbg_gaussiansorter_free(a: number, b: number): void;
+export function gaussiansorter_new(a: number): number;
+export function gaussiansorter_sortGaussians(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number): Array;
+export function generate_splat_texture_from_attrs(a: number, b: number, c: number, d: number, e: number): Array;
+export const __wbindgen_export_0: WebAssembly.Table;
+export function __wbindgen_free(a: number, b: number, c: number): void;
+export function __wbindgen_malloc(a: number, b: number): number;
+export function __externref_table_dealloc(a: number): void;
+export function __wbindgen_exn_store(a: number): void;
+export function __externref_table_alloc(): number;
+export function __wbindgen_start(): void;
diff --git a/temp_wasm/cesiumjs-gsplat-utils/pkg/package.json b/temp_wasm/cesiumjs-gsplat-utils/pkg/package.json
new file mode 100644
index 000000000000..451a533fe2fa
--- /dev/null
+++ b/temp_wasm/cesiumjs-gsplat-utils/pkg/package.json
@@ -0,0 +1,18 @@
+{
+ "name": "cesiumjs-gsplat-utils",
+ "type": "module",
+ "collaborators": [
+ "Jason Sobotka "
+ ],
+ "version": "0.1.0",
+ "files": [
+ "cesiumjs_gsplat_utils_bg.wasm",
+ "cesiumjs_gsplat_utils.js",
+ "cesiumjs_gsplat_utils.d.ts"
+ ],
+ "main": "cesiumjs_gsplat_utils.js",
+ "types": "cesiumjs_gsplat_utils.d.ts",
+ "sideEffects": [
+ "./snippets/*"
+ ]
+}
\ No newline at end of file
diff --git a/temp_wasm/cesiumjs-gsplat-utils/src/lib.rs b/temp_wasm/cesiumjs-gsplat-utils/src/lib.rs
new file mode 100644
index 000000000000..f5d022df39d9
--- /dev/null
+++ b/temp_wasm/cesiumjs-gsplat-utils/src/lib.rs
@@ -0,0 +1,45 @@
+mod utils;
+mod perf_timer;
+mod textureGen;
+//mod textureGen_simd;
+mod radix_simd;
+
+use wasm_bindgen::prelude::*;
+use js_sys::{Float32Array, Uint8Array, Uint32Array, Object};
+
+#[wasm_bindgen]
+extern "C" {
+ fn alert(s: &str);
+}
+
+//reimplementation of our javascript count sort
+#[derive(Clone, Copy)]
+struct Matrix4([f32; 16]);
+
+#[wasm_bindgen]
+pub fn generate_splat_texture_from_attrs(
+ positions: &Float32Array,
+ scales: &Float32Array,
+ rotations: &Float32Array,
+ colors: &Uint8Array,
+ count: usize
+) -> Result {
+ let texture_data = textureGen::generate_texture_from_attrs(
+ positions,
+ scales,
+ rotations,
+ colors,
+ count
+ )?;
+
+ let js_data = Uint32Array::new_with_length((texture_data.width() * texture_data.height() * 4) as u32);
+ js_data.copy_from(&texture_data.data());
+
+ // Create a JavaScript object to hold both the data and dimensions
+ let result = Object::new();
+ js_sys::Reflect::set(&result, &"data".into(), &js_data)?;
+ js_sys::Reflect::set(&result, &"width".into(), &(texture_data.width() as f64).into())?;
+ js_sys::Reflect::set(&result, &"height".into(), &(texture_data.height() as f64).into())?;
+
+ Ok(result)
+}
\ No newline at end of file
diff --git a/temp_wasm/cesiumjs-gsplat-utils/src/perf_timer.rs b/temp_wasm/cesiumjs-gsplat-utils/src/perf_timer.rs
new file mode 100644
index 000000000000..4fa170ff285c
--- /dev/null
+++ b/temp_wasm/cesiumjs-gsplat-utils/src/perf_timer.rs
@@ -0,0 +1,76 @@
+use std::time::{Duration, Instant};
+use std::collections::HashMap;
+use std::fmt;
+
+#[derive(Debug)]
+pub struct Timer {
+ start: Instant,
+ splits: HashMap,
+ last_split: Instant,
+}
+
+impl Timer {
+ pub fn new() -> Self {
+ let now = Instant::now();
+ Timer {
+ start: now,
+ splits: HashMap::new(),
+ last_split: now,
+ }
+ }
+
+ pub fn split(&mut self, name: &str) {
+ let now = Instant::now();
+ let duration = now.duration_since(self.last_split);
+ self.splits.insert(name.to_string(), duration);
+ self.last_split = now;
+ }
+
+ pub fn elapsed(&self) -> Duration {
+ Instant::now().duration_since(self.start)
+ }
+
+ pub fn get_split(&self, name: &str) -> Option {
+ self.splits.get(name).copied()
+ }
+
+ pub fn reset(&mut self) {
+ let now = Instant::now();
+ self.start = now;
+ self.last_split = now;
+ self.splits.clear();
+ }
+}
+
+impl fmt::Display for Timer {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ writeln!(f, "Total time: {:?}", self.elapsed())?;
+ writeln!(f, "\nSplits:")?;
+ for (name, duration) in &self.splits {
+ writeln!(f, "{}: {:?}", name, duration)?;
+ }
+ Ok(())
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+ use std::thread::sleep;
+
+ #[test]
+ fn test_basic_timing() {
+ let mut timer = Timer::new();
+
+ // Simulate some work
+ sleep(Duration::from_millis(100));
+ timer.split("first_operation");
+
+ sleep(Duration::from_millis(50));
+ timer.split("second_operation");
+
+ assert!(timer.get_split("first_operation").unwrap().as_millis() >= 100);
+ assert!(timer.get_split("second_operation").unwrap().as_millis() >= 50);
+ assert!(timer.elapsed().as_millis() >= 150);
+ }
+}
\ No newline at end of file
diff --git a/temp_wasm/cesiumjs-gsplat-utils/src/radix.rs b/temp_wasm/cesiumjs-gsplat-utils/src/radix.rs
new file mode 100644
index 000000000000..a61912e5e840
--- /dev/null
+++ b/temp_wasm/cesiumjs-gsplat-utils/src/radix.rs
@@ -0,0 +1,121 @@
+use wasm_bindgen::prelude::*;
+mod radix_simd;
+
+#[wasm_bindgen]
+impl radix_simd::GSplatData {
+ pub fn radix_sort(&mut self) {
+ // Calculate depths and store as integers
+ let mut depth_values: Vec = Vec::with_capacity(self.count);
+ let mut max_depth = f32::NEG_INFINITY;
+ let mut min_depth = f32::INFINITY;
+
+ // Helper closure to calculate depth
+ let calc_depth = |i: usize| -> f32 {
+ let pos_idx = i * 3;
+ self.positions[pos_idx] * self.model_view[2] +
+ self.positions[pos_idx + 1] * self.model_view[6] +
+ self.positions[pos_idx + 2] * self.model_view[10]
+ };
+
+ // Calculate initial depths
+ for i in 0..self.count {
+ let depth = (calc_depth(i) * 4096.0) as i32;
+ depth_values.push(depth);
+ max_depth = max_depth.max(depth as f32);
+ min_depth = min_depth.min(depth as f32);
+ }
+
+ // Normalize depths to positive values
+ let depth_offset = (-min_depth as i32);
+ for depth in depth_values.iter_mut() {
+ *depth += depth_offset;
+ }
+
+ // Create index array to track original positions
+ let mut indices: Vec = (0..self.count as u32).collect();
+
+ // Temporary arrays for radix sort
+ let mut temp_depths = vec![0i32; self.count];
+ let mut temp_indices = vec![0u32; self.count];
+
+ // Sort for each byte (4 bytes for 32-bit integer)
+ for shift in (0..32).step_by(8) {
+ let mut counts = [0u32; 256];
+
+ // Count frequencies
+ for &depth in depth_values.iter() {
+ let byte = ((depth >> shift) & 0xFF) as usize;
+ counts[byte] += 1;
+ }
+
+ // Calculate starting positions
+ let mut total = 0;
+ for count in counts.iter_mut() {
+ let current = *count;
+ *count = total;
+ total += current;
+ }
+
+ // Move items to correct position
+ for i in 0..self.count {
+ let byte = ((depth_values[i] >> shift) & 0xFF) as usize;
+ let pos = counts[byte] as usize;
+ counts[byte] += 1;
+
+ temp_depths[pos] = depth_values[i];
+ temp_indices[pos] = indices[i];
+ }
+
+ // Copy back
+ depth_values.copy_from_slice(&temp_depths);
+ indices.copy_from_slice(&temp_indices);
+ }
+
+ // Create new arrays for sorted data
+ let mut new_positions = vec![0.0f32; self.positions.len()];
+ let mut new_scales = vec![0.0f32; self.scales.len()];
+ let mut new_rotations = vec![0.0f32; self.rotations.len()];
+ let mut new_colors = vec![0.0f32; self.colors.len()];
+
+ // Rearrange attribute arrays based on sorted indices
+ for (i, &idx) in indices.iter().enumerate() {
+ let j = idx as usize;
+
+ // Copy positions (3 components)
+ let pos_i = i * 3;
+ let pos_j = j * 3;
+ new_positions[pos_i] = self.positions[pos_j];
+ new_positions[pos_i + 1] = self.positions[pos_j + 1];
+ new_positions[pos_i + 2] = self.positions[pos_j + 2];
+
+ // Copy scales (3 components)
+ let scale_i = i * 3;
+ let scale_j = j * 3;
+ new_scales[scale_i] = self.scales[scale_j];
+ new_scales[scale_i + 1] = self.scales[scale_j + 1];
+ new_scales[scale_i + 2] = self.scales[scale_j + 2];
+
+ // Copy rotations (4 components)
+ let rot_i = i * 4;
+ let rot_j = j * 4;
+ new_rotations[rot_i] = self.rotations[rot_j];
+ new_rotations[rot_i + 1] = self.rotations[rot_j + 1];
+ new_rotations[rot_i + 2] = self.rotations[rot_j + 2];
+ new_rotations[rot_i + 3] = self.rotations[rot_j + 3];
+
+ // Copy colors (4 components)
+ let color_i = i * 4;
+ let color_j = j * 4;
+ new_colors[color_i] = self.colors[color_j];
+ new_colors[color_i + 1] = self.colors[color_j + 1];
+ new_colors[color_i + 2] = self.colors[color_j + 2];
+ new_colors[color_i + 3] = self.colors[color_j + 3];
+ }
+
+ // Update the original arrays with sorted data
+ self.positions = new_positions;
+ self.scales = new_scales;
+ self.rotations = new_rotations;
+ self.colors = new_colors;
+ }
+}
\ No newline at end of file
diff --git a/temp_wasm/cesiumjs-gsplat-utils/src/radix_simd.rs b/temp_wasm/cesiumjs-gsplat-utils/src/radix_simd.rs
new file mode 100644
index 000000000000..71d7ecfdfbf4
--- /dev/null
+++ b/temp_wasm/cesiumjs-gsplat-utils/src/radix_simd.rs
@@ -0,0 +1,808 @@
+use std::arch::wasm32::*;
+use wasm_bindgen::prelude::*;
+use js_sys::{Float32Array, Uint8Array, Uint32Array, WebAssembly};
+use wasm_bindgen::JsCast;
+use web_sys::console;
+
+use crate::perf_timer;
+
+#[wasm_bindgen]
+pub struct GSplatData {
+ positions: Vec,
+ scales: Vec,
+ rotations: Vec,
+ colors: Vec,
+ model_view: [f32; 16],
+ count: usize,
+}
+
+#[wasm_bindgen]
+impl GSplatData {
+ #[wasm_bindgen(constructor)]
+ pub fn new(
+ positions: Vec,
+ scales: Vec,
+ rotations: Vec,
+ colors: Vec,
+ model_view: Vec,
+ count: usize,
+ ) -> Self {
+ let mut model_view_array = [0.0; 16];
+ model_view_array.copy_from_slice(&model_view);
+
+ Self {
+ positions,
+ scales,
+ rotations,
+ colors,
+ model_view: model_view_array,
+ count,
+ }
+ }
+
+ #[wasm_bindgen(js_name = fromFloat32Arrays)]
+ pub fn from_float32_arrays(
+ positions: Float32Array,
+ scales: Float32Array,
+ rotations: Float32Array,
+ colors: Uint8Array,
+ model_view: Float32Array,
+ count: usize,
+ ) -> Result {
+ if positions.length() as usize != count * 3 {
+ return Err(JsValue::from_str("Invalid positions length"));
+ }
+ if scales.length() as usize != count * 3 {
+ return Err(JsValue::from_str("Invalid scales length"));
+ }
+ if rotations.length() as usize != count * 4 {
+ return Err(JsValue::from_str("Invalid rotations length"));
+ }
+ if colors.length() as usize != count * 4 {
+ return Err(JsValue::from_str("Invalid colors length"));
+ }
+ if model_view.length() != 16 {
+ return Err(JsValue::from_str("Model view matrix must have 16 elements"));
+ }
+
+ let positions: Vec = positions.to_vec();
+ let scales: Vec = scales.to_vec();
+ let rotations: Vec = rotations.to_vec();
+ let colors: Vec = colors.to_vec();
+ let model_view: Vec = model_view.to_vec();
+
+ Ok(GSplatData::new(
+ positions,
+ scales,
+ rotations,
+ colors,
+ model_view,
+ count,
+ ))
+ }
+
+ #[wasm_bindgen(js_name = getPositions)]
+ pub fn get_positions(&self) -> Float32Array {
+ let result = Float32Array::new_with_length(self.positions.len() as u32);
+ result.copy_from(&self.positions[..]);
+ result
+ }
+
+ #[wasm_bindgen(js_name = getScales)]
+ pub fn get_scales(&self) -> Float32Array {
+ let result = Float32Array::new_with_length(self.scales.len() as u32);
+ result.copy_from(&self.scales[..]);
+ result
+ }
+
+ #[wasm_bindgen(js_name = getRotations)]
+ pub fn get_rotations(&self) -> Float32Array {
+ let result = Float32Array::new_with_length(self.rotations.len() as u32);
+ result.copy_from(&self.rotations[..]);
+ result
+ }
+
+ #[wasm_bindgen(js_name = getColors)]
+ pub fn get_colors(&self) -> Uint8Array {
+ let result = Uint8Array::new_with_length(self.colors.len() as u32);
+ result.copy_from(&self.colors[..]);
+ result
+ }
+}
+
+#[target_feature(enable = "simd128")]
+unsafe fn compute_depths_simd(positions: &[f32], model_view: &[f32], count: usize) -> Vec {
+ let mut depths = Vec::with_capacity(count);
+ let simd_count = count - (count % 4);
+
+ let scale = f32x4(4096.0, 4096.0, 4096.0, 4096.0);
+ let mv2 = f32x4_splat(model_view[2]);
+ let mv6 = f32x4_splat(model_view[6]);
+ let mv10 = f32x4_splat(model_view[10]);
+
+ for chunk_idx in (0..simd_count).step_by(4) {
+ let base_idx = chunk_idx * 3;
+ if base_idx + 11 >= positions.len() {
+ break;
+ }
+
+ let pos = v128_load(positions[base_idx..].as_ptr() as *const v128);
+ let mut depth = f32x4_mul(pos, mv2);
+
+ let pos_y = v128_load(positions[base_idx + 4..].as_ptr() as *const v128);
+ depth = f32x4_add(depth, f32x4_mul(pos_y, mv6));
+
+ let pos_z = v128_load(positions[base_idx + 8..].as_ptr() as *const v128);
+ depth = f32x4_add(depth, f32x4_mul(pos_z, mv10));
+
+ let depth_scaled = f32x4_mul(depth, scale);
+ let depth_int = i32x4_trunc_sat_f32x4(depth_scaled);
+
+ let mut result = [0i32; 4];
+ v128_store(result.as_mut_ptr() as *mut v128, depth_int);
+ depths.extend_from_slice(&result);
+ }
+
+ let remainder_start = (count / 4) * 4;
+ for i in remainder_start..count {
+ let idx = i * 3;
+ if idx + 2 < positions.len() {
+ let depth = positions[idx] * model_view[2] +
+ positions[idx + 1] * model_view[6] +
+ positions[idx + 2] * model_view[10];
+ depths.push((depth * 4096.0) as i32);
+ }
+ }
+
+ depths.truncate(count);
+ depths
+}
+
+#[target_feature(enable = "simd128")]
+unsafe fn reorder_attributes_simd(data: &mut GSplatData, indices: &[u32]) {
+ let mut new_positions = vec![0.0; data.positions.len()];
+ let mut new_scales = vec![0.0; data.scales.len()];
+ let mut new_rotations = vec![0.0; data.rotations.len()];
+ let mut new_colors = vec![0; data.colors.len()];
+
+ for (new_idx, &old_idx) in indices.iter().enumerate() {
+ let old_idx = old_idx as usize;
+
+ if old_idx * 3 + 2 >= data.positions.len() ||
+ new_idx * 3 + 2 >= new_positions.len() {
+ break;
+ }
+
+ let pos_idx = new_idx * 3;
+ let old_pos_idx = old_idx * 3;
+ new_positions[pos_idx..pos_idx + 3]
+ .copy_from_slice(&data.positions[old_pos_idx..old_pos_idx + 3]);
+
+ if old_idx * 3 + 2 >= data.scales.len() ||
+ new_idx * 3 + 2 >= new_scales.len() {
+ break;
+ }
+
+ let scale_idx = new_idx * 3;
+ let old_scale_idx = old_idx * 3;
+ new_scales[scale_idx..scale_idx + 3]
+ .copy_from_slice(&data.scales[old_scale_idx..old_scale_idx + 3]);
+
+ if old_idx * 4 + 3 >= data.rotations.len() ||
+ new_idx * 4 + 3 >= new_rotations.len() {
+ break;
+ }
+
+ let rot_idx = new_idx * 4;
+ let old_rot_idx = old_idx * 4;
+ new_rotations[rot_idx..rot_idx + 4]
+ .copy_from_slice(&data.rotations[old_rot_idx..old_rot_idx + 4]);
+
+ if old_idx * 4 + 3 >= data.colors.len() ||
+ new_idx * 4 + 3 >= new_colors.len() {
+ break;
+ }
+
+ let color_idx = new_idx * 4;
+ let old_color_idx = old_idx * 4;
+ new_colors[color_idx..color_idx + 4]
+ .copy_from_slice(&data.colors[old_color_idx..old_color_idx + 4]);
+ }
+
+ data.positions = new_positions;
+ data.scales = new_scales;
+ data.rotations = new_rotations;
+ data.colors = new_colors;
+}
+
+#[wasm_bindgen]
+pub fn radix_sort_simd(data: &mut GSplatData) -> Result<(), JsValue> {
+ let count = data.count;
+
+ if count * 3 > data.positions.len() ||
+ count * 3 > data.scales.len() ||
+ count * 4 > data.rotations.len() ||
+ count * 4 > data.colors.len() {
+ return Err(JsValue::from_str("Invalid input sizes"));
+ }
+
+ let mut depths = unsafe {
+ compute_depths_simd(&data.positions, &data.model_view, count)
+ };
+ let mut indices: Vec = (0..count as u32).collect();
+
+ let mut temp_depths = vec![0i32; count];
+ let mut temp_indices = vec![0u32; count];
+
+ for shift in (0..32).step_by(8) {
+ let mut counts = [0u32; 256];
+
+ unsafe { count_frequencies_simd(&depths, shift, &mut counts) };
+
+ let mut total = 0u32;
+ for count in counts.iter_mut() {
+ let current = *count;
+ *count = total;
+ total += current;
+ }
+
+ unsafe {
+ scatter_elements_simd(
+ &depths,
+ &indices,
+ shift,
+ &counts,
+ &mut temp_depths,
+ &mut temp_indices
+ )
+ };
+ std::mem::swap(&mut depths, &mut temp_depths);
+ std::mem::swap(&mut indices, &mut temp_indices);
+ }
+
+ unsafe { reorder_attributes_simd(data, &indices) };
+ Ok(())
+}
+
+#[target_feature(enable = "simd128")]
+unsafe fn count_frequencies_simd(depths: &[i32], shift: u32, counts: &mut [u32; 256]) {
+ unsafe {
+ let mask = i32x4_splat(0xFF);
+
+ for chunk in depths.chunks_exact(4) {
+ let values = v128_load(chunk.as_ptr() as *const v128);
+ let shifted = i32x4_shr(values, shift);
+ let bytes = v128_and(shifted as v128, mask);
+
+ let mut result = [0i32; 4];
+ v128_store(result.as_mut_ptr() as *mut v128, bytes);
+
+ for &value in &result {
+ counts[value as usize] += 1;
+ }
+ }
+ }
+
+ for &depth in depths.chunks_exact(4).remainder() {
+ let byte = ((depth >> shift) & 0xFF) as usize;
+ counts[byte] += 1;
+ }
+}
+
+#[target_feature(enable = "simd128")]
+unsafe fn scatter_elements_simd(
+ depths: &[i32],
+ indices: &[u32],
+ shift: u32,
+ counts: &[u32; 256],
+ temp_depths: &mut [i32],
+ temp_indices: &mut [u32],
+) {
+ let mut offsets = counts.to_owned();
+
+ for (&depth, &index) in depths.iter().zip(indices.iter()) {
+ let byte = ((depth >> shift) & 0xFF) as usize;
+ let pos = offsets[byte] as usize;
+
+ temp_depths[pos] = depth;
+ temp_indices[pos] = index;
+
+ offsets[byte] += 1;
+ }
+}
+
+#[wasm_bindgen]
+pub fn radix_sort_gaussians_attrs(
+ positions: &Float32Array,
+ scales: &Float32Array,
+ rotations: &Float32Array,
+ colors: &Uint8Array,
+ model_view: &Float32Array,
+ count: usize,
+) -> Result {
+ if positions.length() as usize != count * 3
+ || scales.length() as usize != count * 3
+ || rotations.length() as usize != count * 4
+ || colors.length() as usize != count * 4
+ || model_view.length() != 16 {
+ return Err(JsValue::from_str("Invalid array lengths"));
+ }
+
+ //set capacity first
+ let positions_vec = positions.to_vec();
+ let model_view_vec = model_view.to_vec();
+
+ let mut depth_values = vec![0i32; count];
+ let mut max_depth = f32::NEG_INFINITY;
+ let mut min_depth = f32::INFINITY;
+
+ for i in 0..count {
+ let depth = positions_vec[i * 3] * model_view_vec[2] +
+ positions_vec[i * 3 + 1] * model_view_vec[6] +
+ positions_vec[i * 3 + 2] * model_view_vec[10];
+
+ let depth_int = (depth * 4096.0) as i32;
+ depth_values[i] = depth_int;
+ max_depth = max_depth.max(depth_int as f32);
+ min_depth = min_depth.min(depth_int as f32);
+ }
+
+ let depth_offset = (-min_depth) as i32;
+ for depth in depth_values.iter_mut() {
+ *depth += depth_offset;
+ }
+
+ let mut indices: Vec = (0..count as u32).collect();
+ let mut temp_depths = vec![0i32; count];
+ let mut temp_indices = vec![0u32; count];
+
+ for shift in (0..32).step_by(8) {
+ let mut counts = [0u32; 256];
+
+ for &depth in depth_values.iter() {
+ let byte = ((depth >> shift) & 0xFF) as usize;
+ counts[byte] += 1;
+ }
+
+ let mut total = 0;
+ for count in counts.iter_mut() {
+ let current = *count;
+ *count = total;
+ total += current;
+ }
+
+ for i in 0..count {
+ let byte = ((depth_values[i] >> shift) & 0xFF) as usize;
+ let pos = counts[byte] as usize;
+ counts[byte] += 1;
+
+ temp_depths[pos] = depth_values[i];
+ temp_indices[pos] = indices[i];
+ }
+
+ depth_values.copy_from_slice(&temp_depths);
+ indices.copy_from_slice(&temp_indices);
+ }
+
+ let mut new_positions: Vec = vec![0.0; count * 3];
+ let mut new_scales: Vec = vec![0.0; count * 3];
+ let mut new_rotations: Vec = vec![0.0; count * 4];
+ let mut new_colors: Vec = vec![0; count * 4];
+
+ let scales_vec = scales.to_vec();
+ let rotations_vec = rotations.to_vec();
+ let colors_vec = colors.to_vec();
+
+ for i in 0..count {
+ let j = indices[i] as usize;
+
+ new_positions[i * 3] = positions_vec[j * 3];
+ new_positions[i * 3 + 1] = positions_vec[j * 3 + 1];
+ new_positions[i * 3 + 2] = positions_vec[j * 3 + 2];
+
+ new_scales[i * 3] = scales_vec[j * 3];
+ new_scales[i * 3 + 1] = scales_vec[j * 3 + 1];
+ new_scales[i * 3 + 2] = scales_vec[j * 3 + 2];
+
+ new_rotations[i * 4] = rotations_vec[j * 4];
+ new_rotations[i * 4 + 1] = rotations_vec[j * 4 + 1];
+ new_rotations[i * 4 + 2] = rotations_vec[j * 4 + 2];
+ new_rotations[i * 4 + 3] = rotations_vec[j * 4 + 3];
+
+ new_colors[i * 4] = colors_vec[j * 4];
+ new_colors[i * 4 + 1] = colors_vec[j * 4 + 1];
+ new_colors[i * 4 + 2] = colors_vec[j * 4 + 2];
+ new_colors[i * 4 + 3] = colors_vec[j * 4 + 3];
+ }
+
+ let new_positions_array = Float32Array::new_with_length(count as u32 * 3);
+ new_positions_array.copy_from(&new_positions[..]);
+
+ let new_scales_array = Float32Array::new_with_length(count as u32 * 3);
+ new_scales_array.copy_from(&new_scales[..]);
+
+ let new_rotations_array = Float32Array::new_with_length(count as u32 * 4);
+ new_rotations_array.copy_from(&new_rotations[..]);
+
+ let new_colors_array = Uint8Array::new_with_length(count as u32 * 4);
+ new_colors_array.copy_from(&new_colors[..]);
+
+ let result = js_sys::Array::new();
+ result.push(&new_positions_array);
+ result.push(&new_scales_array);
+ result.push(&new_rotations_array);
+ result.push(&new_colors_array);
+
+ Ok(result)
+}
+
+
+#[wasm_bindgen]
+pub fn radix_sort_gaussians_indexes(
+ positions: &Float32Array,
+ model_view: &Float32Array,
+ texture_width: u32,
+ count: usize,
+) -> Result {
+ if positions.length() as usize != count * 3 {
+ return Err(JsValue::from_str("Invalid positions length"));
+ }
+ if model_view.length() != 16 {
+ return Err(JsValue::from_str("Invalid model_view length"));
+ }
+
+ let positions_vec = positions.to_vec();
+ let model_view_vec = model_view.to_vec();
+ let mut depth_values = vec![0i32; count];
+ let mut max_depth = f32::NEG_INFINITY;
+ let mut min_depth = f32::INFINITY;
+
+ for i in 0..count {
+ let depth = positions_vec[i * 3] * model_view_vec[2] +
+ positions_vec[i * 3 + 1] * model_view_vec[6] +
+ positions_vec[i * 3 + 2] * model_view_vec[10];
+
+ let depth_int = (depth * 4096.0) as i32;
+ depth_values[i] = depth_int;
+ max_depth = max_depth.max(depth_int as f32);
+ min_depth = min_depth.min(depth_int as f32);
+ }
+
+ let depth_offset = (-min_depth) as i32;
+ for depth in depth_values.iter_mut() {
+ *depth += depth_offset;
+ }
+
+ let mut indices: Vec = (0..count as u32).collect();
+ let mut temp_depths = vec![0i32; count];
+ let mut temp_indices = vec![0u32; count];
+
+ for shift in (0..32).step_by(8) {
+ let mut counts = [0u32; 256];
+
+ for &depth in depth_values.iter() {
+ let byte = ((depth >> shift) & 0xFF) as usize;
+ counts[byte] += 1;
+ }
+
+ let mut total = 0;
+ for count in counts.iter_mut() {
+ let current = *count;
+ *count = total;
+ total += current;
+ }
+
+ for i in 0..count {
+ let byte = ((depth_values[i] >> shift) & 0xFF) as usize;
+ let pos = counts[byte] as usize;
+ counts[byte] += 1;
+
+ temp_depths[pos] = depth_values[i];
+ temp_indices[pos] = indices[i];
+ }
+
+ depth_values.copy_from_slice(&temp_depths);
+ indices.copy_from_slice(&temp_indices);
+ }
+
+ let indices_array = Uint32Array::new_with_length(count as u32);
+ indices_array.copy_from(&indices);
+
+ Ok(indices_array)
+}
+
+#[wasm_bindgen]
+pub fn radix_sort_gaussians_indexes_simd(
+ positions: &Float32Array,
+ model_view: &Float32Array,
+ texture_width: u32,
+ count: usize,
+) -> Result {
+ if positions.length() as usize != count * 3 || model_view.length() != 16 {
+ return Err(JsValue::from_str("Invalid input lengths"));
+ }
+
+ let positions_vec = positions.to_vec();
+ let mv = model_view.to_vec();
+
+ // Convert positions to SIMD vectors
+ let mv_row = v128_load(&[mv[2], mv[6], mv[10], 0.0]);
+ let mut depth_values = vec![0i32; count];
+ let mut max_depth = f32::NEG_INFINITY;
+ let mut min_depth = f32::INFINITY;
+
+ // Process 4 points at a time
+ for chunk in (0..count).step_by(4) {
+ let remaining = count - chunk;
+ if remaining >= 4 {
+ let pos0 = v128_load(&positions_vec[chunk * 3..]);
+ let pos1 = v128_load(&positions_vec[chunk * 3 + 4..]);
+ let pos2 = v128_load(&positions_vec[chunk * 3 + 8..]);
+
+ // Compute depths using SIMD dot product
+ let depths = f32x4_dot_product(
+ v128_shuffle::<0, 1, 2, 2>(pos0, pos1),
+ mv_row
+ );
+
+ // Convert to fixed point and store
+ let depth_ints = f32x4_convert_to_i32x4(f32x4_mul(depths, f32x4_splat(4096.0)));
+ depth_values[chunk..chunk + 4].copy_from_slice(&i32x4_extract_values(depth_ints));
+
+ // Update min/max using SIMD
+ max_depth = f32x4_extract_lane::<0>(f32x4_max(f32x4_splat(max_depth), depths));
+ min_depth = f32x4_extract_lane::<0>(f32x4_min(f32x4_splat(min_depth), depths));
+ } else {
+ // Handle remaining points sequentially
+ for i in chunk..count {
+ let depth = positions_vec[i * 3] * mv[2] +
+ positions_vec[i * 3 + 1] * mv[6] +
+ positions_vec[i * 3 + 2] * mv[10];
+ depth_values[i] = (depth * 4096.0) as i32;
+ max_depth = max_depth.max(depth);
+ min_depth = min_depth.min(depth);
+ }
+ }
+ }
+
+ let depth_offset = (-min_depth * 4096.0) as i32;
+ for depth in depth_values.iter_mut() {
+ *depth += depth_offset;
+ }
+
+ let mut indices: Vec = (0..count as u32).collect();
+ let mut temp_depths = vec![0i32; count];
+ let mut temp_indices = vec![0u32; count];
+
+ for shift in (0..32).step_by(8) {
+ let mut counts = [0u32; 256];
+
+ for chunk in depth_values.chunks(4) {
+ let depths = if chunk.len() == 4 {
+ i32x4_load(chunk)
+ } else {
+ let mut padded = [0i32; 4];
+ padded[..chunk.len()].copy_from_slice(chunk);
+ i32x4_load(&padded)
+ };
+
+ // let bytes = i32x4_shr(depths, i32x4_splat(shift));
+ // let masked = v128_and(bytes, i32x4_splat(0xFF));
+
+ // i8x16_extract_lane::<0>()
+ // let b1 = i32x4_extract_lane::<0>(masked) & 0xFF;
+ // let b2 = i32x4_extract_lane::<0>(masked) & 0xFF;
+ // let b3 = i32x4_extract_lane::<0>(masked) & 0xFF;
+ // let b4 = i32x4_extract_lane::<0>(masked) & 0xFF;
+ // counts[b1] += 1;
+ // counts[b2] += 1;
+ // counts[b3] += 1;
+ // counts[b4] += 1;
+ // for i in 0..chunk.len() {
+ // let byte = i32x4_extract_lane::<0>(i32x4_shuffle::(masked, masked)) as usize;
+ // counts[byte] += 1;
+ // }
+ }
+
+ let mut total = 0;
+ for count in counts.iter_mut() {
+ let current = *count;
+ *count = total;
+ total += current;
+ }
+
+ for i in 0..count {
+ let byte = ((depth_values[i] >> shift) & 0xFF) as usize;
+ let pos = counts[byte] as usize;
+ counts[byte] += 1;
+
+ temp_depths[pos] = depth_values[i];
+ temp_indices[pos] = indices[i];
+ }
+
+ depth_values.copy_from_slice(&temp_depths);
+ indices.copy_from_slice(&temp_indices);
+ }
+
+ let indices_array = Uint32Array::new_with_length(count as u32);
+ indices_array.copy_from(&indices);
+ Ok(indices_array)
+}
+
+#[inline]
+fn v128_load(slice: &[f32]) -> v128 {
+ unsafe { v128_load(slice.as_ptr() as *const v128) }
+}
+
+#[inline]
+fn i32x4_load(slice: &[i32]) -> v128 {
+ unsafe { v128_load(slice.as_ptr() as *const v128) }
+}
+
+#[inline]
+fn f32x4_dot_product(a: v128, b: v128) -> v128 {
+ unsafe {
+ let mul = f32x4_mul(a, b);
+ f32x4_add(
+ f32x4_add(
+ f32x4_extract_lane::<0>(mul),
+ f32x4_extract_lane::<1>(mul)
+ ),
+ f32x4_add(
+ f32x4_extract_lane::<2>(mul),
+ f32x4_extract_lane::<3>(mul)
+ )
+ )
+ }
+}
+
+#[inline]
+fn i32x4_extract_values(v: v128) -> [i32; 4] {
+ unsafe {
+ [
+ i32x4_extract_lane::<0>(v),
+ i32x4_extract_lane::<1>(v),
+ i32x4_extract_lane::<2>(v),
+ i32x4_extract_lane::<3>(v)
+ ]
+ }
+}
+
+#[wasm_bindgen(js_name = "GaussianSorter")]
+pub struct GaussianSorter {
+ indices: Vec,
+ temp_indices: Vec,
+ depth_values: Vec,
+ counts: [u32; 256],
+ temp_positions: Vec,
+ temp_scales: Vec,
+ temp_rotations: Vec,
+ temp_colors: Vec,
+}
+
+#[wasm_bindgen(js_class = "GaussianSorter")]
+impl GaussianSorter {
+ #[wasm_bindgen(constructor)]
+ pub fn new(max_count: usize) -> Self {
+ Self {
+ indices: Vec::with_capacity(max_count),
+ temp_indices: vec![0u32; max_count],
+ depth_values: vec![0i32; max_count],
+ counts: [0u32; 256],
+ temp_positions: vec![0.0; max_count * 3],
+ temp_scales: vec![0.0; max_count * 3],
+ temp_rotations: vec![0.0; max_count * 4],
+ temp_colors: vec![0; max_count * 4],
+ }
+ }
+
+ //"in-place" attempt, memory buffer is in the wrong context
+ #[wasm_bindgen(js_name = "sortGaussians")]
+ pub fn sort_gaussians(
+ &mut self,
+ memory_buffer: &[u8],
+ positions_offset: u32,
+ scales_offset: u32,
+ rotations_offset: u32,
+ colors_offset: u32,
+ model_view: &[f32],
+ count: usize,
+ ) -> Result<(), JsValue> {
+ let positions = unsafe { std::slice::from_raw_parts(
+ memory_buffer.as_ptr().add(positions_offset as usize) as *const f32,
+ count * 3
+ )};
+ let scales = unsafe { std::slice::from_raw_parts(
+ memory_buffer.as_ptr().add(scales_offset as usize) as *const f32,
+ count * 3
+ )};
+ let rotations = unsafe { std::slice::from_raw_parts(
+ memory_buffer.as_ptr().add(rotations_offset as usize) as *const f32,
+ count * 4
+ )};
+ let colors = unsafe { std::slice::from_raw_parts(
+ memory_buffer.as_ptr().add(colors_offset as usize) as *const u8,
+ count * 4
+ )};
+
+ let mv2 = model_view[2];
+ let mv6 = model_view[6];
+ let mv10 = model_view[10];
+ let mv14 = model_view[14];
+
+ let mut max_depth = f32::NEG_INFINITY;
+ let mut min_depth = f32::INFINITY;
+
+ for i in 0..count {
+ let x = positions[i * 3];
+ let y = positions[i * 3 + 1];
+ let z = positions[i * 3 + 2];
+
+ let depth = x * mv2 + y * mv6 + z * mv10 + mv14;
+ let depth_int = (depth * 4096.0) as i32;
+ self.depth_values[i] = depth_int;
+ max_depth = max_depth.max(depth_int as f32);
+ min_depth = min_depth.min(depth_int as f32);
+ }
+
+ self.indices.clear();
+ self.indices.extend(0..count as u32);
+
+ for shift in (0..32).step_by(8) {
+ self.counts.fill(0);
+
+ for &depth in self.depth_values.iter().take(count) {
+ let byte = ((depth >> shift) & 0xFF) as usize;
+ self.counts[byte] += 1;
+ }
+
+ let mut total = 0;
+ for count in self.counts.iter_mut() {
+ let current = *count;
+ *count = total;
+ total += current;
+ }
+
+ for i in 0..count {
+ let byte = ((self.depth_values[i] >> shift) & 0xFF) as usize;
+ let pos = self.counts[byte] as usize;
+ self.counts[byte] += 1;
+ self.temp_indices[pos] = self.indices[i];
+ }
+
+ self.indices[..count].copy_from_slice(&self.temp_indices[..count]);
+ }
+
+ for i in 0..count {
+ let j = self.indices[i] as usize;
+ self.temp_positions[i * 3..(i + 1) * 3].copy_from_slice(&positions[j * 3..(j + 1) * 3]);
+ self.temp_scales[i * 3..(i + 1) * 3].copy_from_slice(&scales[j * 3..(j + 1) * 3]);
+ self.temp_rotations[i * 4..(i + 1) * 4].copy_from_slice(&rotations[j * 4..(j + 1) * 4]);
+ self.temp_colors[i * 4..(i + 1) * 4].copy_from_slice(&colors[j * 4..(j + 1) * 4]);
+ }
+
+ let positions_out = unsafe { std::slice::from_raw_parts_mut(
+ memory_buffer.as_ptr().add(positions_offset as usize) as *mut f32,
+ count * 3
+ )};
+ let scales_out = unsafe { std::slice::from_raw_parts_mut(
+ memory_buffer.as_ptr().add(scales_offset as usize) as *mut f32,
+ count * 3
+ )};
+ let rotations_out = unsafe { std::slice::from_raw_parts_mut(
+ memory_buffer.as_ptr().add(rotations_offset as usize) as *mut f32,
+ count * 4
+ )};
+ let colors_out = unsafe { std::slice::from_raw_parts_mut(
+ memory_buffer.as_ptr().add(colors_offset as usize) as *mut u8,
+ count * 4
+ )};
+
+ positions_out.copy_from_slice(&self.temp_positions[..count * 3]);
+ scales_out.copy_from_slice(&self.temp_scales[..count * 3]);
+ rotations_out.copy_from_slice(&self.temp_rotations[..count * 4]);
+ colors_out.copy_from_slice(&self.temp_colors[..count * 4]);
+
+ Ok(())
+ }
+}
\ No newline at end of file
diff --git a/temp_wasm/cesiumjs-gsplat-utils/src/textureGen.rs b/temp_wasm/cesiumjs-gsplat-utils/src/textureGen.rs
new file mode 100644
index 000000000000..e1ab9920f2bc
--- /dev/null
+++ b/temp_wasm/cesiumjs-gsplat-utils/src/textureGen.rs
@@ -0,0 +1,172 @@
+use wasm_bindgen::prelude::*;
+use std::mem;
+use js_sys::{Float32Array, Uint8Array, Uint32Array, Array};
+use web_sys::console::*;
+
+#[wasm_bindgen]
+pub struct TextureData {
+
+ data: Vec,
+ width: u32,
+ height: u32,
+}
+
+#[wasm_bindgen]
+impl TextureData {
+ #[wasm_bindgen(getter)]
+ pub fn data(&self) -> Vec {
+ self.data.clone()
+ }
+
+ #[wasm_bindgen(getter)]
+ pub fn width(&self) -> u32 {
+ self.width
+ }
+
+ #[wasm_bindgen(getter)]
+ pub fn height(&self) -> u32 {
+ self.height
+ }
+
+ pub fn new(data: Vec, width: u32, height: u32) -> Self {
+ TextureData {
+ data,
+ width,
+ height
+ }
+ }
+}
+
+//Algorithm from ILM
+//https://github.com/mitsuba-renderer/openexr/blob/master/IlmBase/Half/half.cpp
+fn float_to_half(f: f32) -> i16 {
+ let f_int = f.to_bits() as i32;
+ let sign = (f_int >> 16) & 0x00008000;
+ let mut exp = ((f_int >> 23) & 0x000000ff) - (127 - 15);
+ let mut frac = f_int & 0x007fffff;
+
+ if exp <= 0 {
+ if exp < -10 {
+ return sign as i16;
+ }
+
+ frac = frac | 0x00800000;
+
+ let t = 14 - exp;
+ let a = (1 << (t - 1)) - 1;
+ let b = (frac >> t) & 1;
+
+ frac = (frac + a + b) >> t;
+ return (sign | frac) as i16;
+ } else if exp == 0xff - (127 - 15) {
+ if frac == 0 {
+ return (sign | 0x7c00) as i16;
+ } else {
+ frac >>= 13;
+ return (sign | 0x7c00 | frac | ((frac == 0) as i32)) as i16;
+ }
+ }
+
+ frac = frac + 0x00000fff + ((frac >> 13) & 1);
+
+ if frac & 0x00800000 != 0 {
+ frac = 0;
+ exp += 1;
+ }
+
+ if exp > 30 {
+ //the original algo sets cpu overflow here
+ return (sign | 0x7c00) as i16;
+ }
+ (sign | (exp << 10) | (frac >> 13)) as i16
+}
+
+#[wasm_bindgen]
+pub fn generate_texture_from_attrs(
+ positions: &Float32Array,
+ scales: &Float32Array,
+ rots: &Float32Array,
+ colors: &Uint8Array,
+ count: usize
+) -> Result {
+ let tex_width = 2048;
+ let tex_height = ((2 * count) as f32 / tex_width as f32).ceil() as u32;
+ let mut tex_data = vec![0u32; (tex_width * tex_height * 4) as usize];
+
+ let tex_data_c = unsafe {
+ std::slice::from_raw_parts_mut(
+ tex_data.as_mut_ptr() as *mut u8,
+ tex_data.len() * 4,
+ )
+ };
+
+ let tex_data_f = unsafe {
+ std::slice::from_raw_parts_mut(
+ tex_data.as_mut_ptr() as *mut f32,
+ tex_data.len(),
+ )
+ };
+
+ let rotv: Vec = rots.to_vec();
+ let posv: Vec = positions.to_vec();
+ let clrv: Vec = colors.to_vec();
+ let sclv: Vec = scales.to_vec();
+
+ for i in 0..count {
+ tex_data_f[8 * i + 0] = posv[3 * i + 0];
+ tex_data_f[8 * i + 1] = posv[3 * i + 1];
+ tex_data_f[8 * i + 2] = posv[3 * i + 2];
+
+ //u8 offsets
+ tex_data_c[4 * (8 * i + 7) + 0] = clrv[4 * i + 0];
+ tex_data_c[4 * (8 * i + 7) + 1] = clrv[4 * i + 1];
+ tex_data_c[4 * (8 * i + 7) + 2] = clrv[4 * i + 2];
+ tex_data_c[4 * (8 * i + 7) + 3] = clrv[4 * i + 3];
+
+ let r = rotv[4*i+3];
+ let x = rotv[4*i+0];
+ let y = rotv[4*i+1];
+ let z = rotv[4*i+2];
+ let r_matrix = [
+ 1.0 - 2.0 * (y * y + z * z),
+ 2.0 * (x * y + r * z),
+ 2.0 * (x * z - r * y),
+
+ 2.0 * (x * y - r * z),
+ 1.0 - 2.0 * (x * x + z * z),
+ 2.0 * (y * z + r * x),
+
+ 2.0 * (x * z + r * y),
+ 2.0 * (y * z - r * x),
+ 1.0 - 2.0 * (x * x + y * y),
+ ];
+
+ // S * R multiplication
+ let s0 = 3 * i + 0;
+ let s1 = 3 * i + 1;
+ let s2 = 3 * i + 2;
+
+ let m = [
+ r_matrix[0] * sclv[s0], r_matrix[1] * sclv[s0], r_matrix[2] * sclv[s0],
+ r_matrix[3] * sclv[s1], r_matrix[4] * sclv[s1], r_matrix[5] * sclv[s1],
+ r_matrix[6] * sclv[s2], r_matrix[7] * sclv[s2], r_matrix[8] * sclv[s2],
+ ];
+ let sigma = [
+ m[0] * m[0] + m[3] * m[3] + m[6] * m[6],
+ m[0] * m[1] + m[3] * m[4] + m[6] * m[7],
+ m[0] * m[2] + m[3] * m[5] + m[6] * m[8],
+ m[1] * m[1] + m[4] * m[4] + m[7] * m[7],
+ m[1] * m[2] + m[4] * m[5] + m[7] * m[8],
+ m[2] * m[2] + m[5] * m[5] + m[8] * m[8],
+ ];
+ tex_data[8 * i + 4] = ( float_to_half(4.0 * sigma[0]) as u32 & 0xFFFF) | ((float_to_half(4.0 * sigma[1]) as u32 & 0xFFFF) << 16);
+ tex_data[8 * i + 5] = (float_to_half(4.0 * sigma[2]) as u32 & 0xFFFF) | ((float_to_half(4.0 * sigma[3]) as u32 & 0xFFFF) << 16);
+ tex_data[8 * i + 6] = (float_to_half(4.0 * sigma[4]) as u32 & 0xFFFF) | ((float_to_half(4.0 * sigma[5]) as u32 & 0xFFFF) << 16);
+ }
+
+ Ok(TextureData {
+ data: tex_data,
+ width: tex_width,
+ height: tex_height,
+ })
+}
\ No newline at end of file
diff --git a/temp_wasm/cesiumjs-gsplat-utils/src/textureGen_simd.rs b/temp_wasm/cesiumjs-gsplat-utils/src/textureGen_simd.rs
new file mode 100644
index 000000000000..845430f2652b
--- /dev/null
+++ b/temp_wasm/cesiumjs-gsplat-utils/src/textureGen_simd.rs
@@ -0,0 +1,202 @@
+#![feature(stdsimd)]
+
+use wasm_bindgen::prelude::*;
+use core::arch::wasm32::*;
+use std::mem;
+
+use crate::textureGen::TextureData;
+
+// Enable SIMD at the crate level
+#[cfg(target_arch = "wasm32")]
+#[cfg(target_feature = "simd128")]
+
+// #[wasm_bindgen]
+// pub struct TextureData {
+// data: Vec,
+// width: u32,
+// height: u32,
+// }
+
+#[wasm_bindgen]
+impl TextureData {
+ #[wasm_bindgen(getter)]
+ pub fn data(&self) -> Vec {
+ self.data.clone()
+ }
+
+ #[wasm_bindgen(getter)]
+ pub fn width(&self) -> u32 {
+ self.width
+ }
+
+ #[wasm_bindgen(getter)]
+ pub fn height(&self) -> u32 {
+ self.height
+ }
+}
+
+// SIMD optimized version of pack_half_2x16
+#[inline]
+unsafe fn pack_half_2x16_simd(a: v128, b: v128) -> v128 {
+ // Convert f32x4 to i32x4 with rounding
+ let a_int = i32x4_trunc_sat_f32x4(a);
+ let b_int = i32x4_trunc_sat_f32x4(b);
+
+ // Shift and pack
+ let packed = v128_and(
+ v128_or(
+ i32x4_shl(a_int, 16),
+ v128_and(b_int as v128, u32x4_splat(0xFFFF))
+ ),
+ u32x4_splat(0xFFFFFFFF)
+ );
+
+ packed
+}
+
+
+#[inline]
+unsafe fn matrix_multiply_simd(rot: &[f32; 4], scale: &[f32; 3]) -> [v128; 3] {
+ let quat = v128_load(rot.as_ptr() as *const v128);
+ let scale_vec = v128_load(scale.as_ptr() as *const v128);
+
+ let q_squared = f32x4_mul(quat, quat);
+ let two = f32x4_splat(2.0);
+ let one = f32x4_splat(1.0);
+
+ // First row of rotation matrix
+ let sum_yz0 = f32x4_add(
+ f32x4_replace_lane::<0>(f32x4_splat(0.0), f32x4_extract_lane::<1>(q_squared)), // y²
+ f32x4_replace_lane::<0>(f32x4_splat(0.0), f32x4_extract_lane::<2>(q_squared)) // z²
+ );
+ let row0 = f32x4_sub(one, f32x4_mul(two, sum_yz0));
+
+ // Second row - 2(xy + wz)
+ let xy = f32x4_mul(
+ f32x4_replace_lane::<0>(f32x4_splat(0.0), f32x4_extract_lane::<0>(quat)), // x
+ f32x4_replace_lane::<0>(f32x4_splat(0.0), f32x4_extract_lane::<1>(quat)) // y
+ );
+ let wz = f32x4_mul(
+ f32x4_replace_lane::<0>(f32x4_splat(0.0), f32x4_extract_lane::<3>(quat)), // w
+ f32x4_replace_lane::<0>(f32x4_splat(0.0), f32x4_extract_lane::<2>(quat)) // z
+ );
+ let row1 = f32x4_mul(
+ two,
+ f32x4_add(xy, wz)
+ );
+
+ // Third row - 2(xz - wy)
+ let xz = f32x4_mul(
+ f32x4_replace_lane::<0>(f32x4_splat(0.0), f32x4_extract_lane::<0>(quat)), // x
+ f32x4_replace_lane::<0>(f32x4_splat(0.0), f32x4_extract_lane::<2>(quat)) // z
+ );
+ let wy = f32x4_mul(
+ f32x4_replace_lane::<0>(f32x4_splat(0.0), f32x4_extract_lane::<3>(quat)), // w
+ f32x4_replace_lane::<0>(f32x4_splat(0.0), f32x4_extract_lane::<1>(quat)) // y
+ );
+ let row2 = f32x4_mul(
+ two,
+ f32x4_sub(xz, wy)
+ );
+
+ // Scale the row
+ let scaled_row0 = f32x4_mul(row0, f32x4_splat(f32x4_extract_lane::<0>(scale_vec)));
+ let scaled_row1 = f32x4_mul(row1, f32x4_splat(f32x4_extract_lane::<1>(scale_vec)));
+ let scaled_row2 = f32x4_mul(row2, f32x4_splat(f32x4_extract_lane::<2>(scale_vec)));
+ [scaled_row0, scaled_row1, scaled_row2]
+}
+
+#[wasm_bindgen]
+#[target_feature(enable = "simd128")]
+pub unsafe fn generate_texture_simd(
+ buffer: &[u8],
+ vertex_count: usize,
+) -> Result {
+ let f_buffer = std::slice::from_raw_parts(
+ buffer.as_ptr() as *const f32,
+ buffer.len() / 4,
+ );
+
+ let tex_width = 1024 * 2;
+ let tex_height = ((2 * vertex_count) as f32 / tex_width as f32).ceil() as u32;
+ let mut tex_data = vec![0u32; (tex_width * tex_height * 4) as usize];
+
+ let tex_data_c = std::slice::from_raw_parts_mut(
+ tex_data.as_mut_ptr() as *mut u8,
+ tex_data.len() * 4,
+ );
+
+ let tex_data_f = std::slice::from_raw_parts_mut(
+ tex_data.as_mut_ptr() as *mut f32,
+ tex_data.len(),
+ );
+
+ // Process vertices in SIMD-friendly chunks where possible
+ for i in 0..vertex_count {
+ let pos = v128_load(&f_buffer[8 * i] as *const f32 as *const v128);
+ v128_store(
+ &mut tex_data_f[8 * i] as *mut f32 as *mut v128,
+ pos
+ );
+
+ let color_offset = 32 * i + 24;
+ let color = v128_load32_zero(buffer[color_offset..].as_ptr() as *const u32);
+ v128_store(
+ tex_data_c[4 * (8 * i + 7)..].as_ptr() as *mut v128,
+ color
+ );
+
+ let scale = [
+ f_buffer[8 * i + 3],
+ f_buffer[8 * i + 4],
+ f_buffer[8 * i + 5],
+ ];
+
+ let rot = [
+ (buffer[32 * i + 28] as f32 - 128.0) / 128.0,
+ (buffer[32 * i + 29] as f32 - 128.0) / 128.0,
+ (buffer[32 * i + 30] as f32 - 128.0) / 128.0,
+ (buffer[32 * i + 31] as f32 - 128.0) / 128.0,
+ ];
+
+ let m_rows = matrix_multiply_simd(&rot, &scale);
+ let sigma0 = f32x4_add(
+ f32x4_add(
+ f32x4_mul(m_rows[0], m_rows[0]),
+ f32x4_mul(m_rows[1], m_rows[1])
+ ),
+ f32x4_mul(m_rows[2], m_rows[2])
+ );
+
+ let sigma1 = f32x4_add(
+ f32x4_add(
+ f32x4_mul(m_rows[0], i8x16_shuffle::<4,8,12,0,4,8,12,0,4,8,12,0,4,8,12,0>(
+ m_rows[0], m_rows[0]
+ )),
+ f32x4_mul(m_rows[1], i8x16_shuffle::<4,8,12,0,4,8,12,0,4,8,12,0,4,8,12,0>(
+ m_rows[1], m_rows[1]
+ ))
+ ),
+ f32x4_mul(m_rows[2], i8x16_shuffle::<4,8,12,0,4,8,12,0,4,8,12,0,4,8,12,0>(
+ m_rows[2], m_rows[2]
+ ))
+ );
+
+ // Pack results
+ let four = f32x4_splat(4.0);
+ let sigma0_scaled = f32x4_mul(sigma0, four);
+ let sigma1_scaled = f32x4_mul(sigma1, four);
+
+ let packed = pack_half_2x16_simd(sigma0_scaled, sigma1_scaled);
+ v128_store(
+ &mut tex_data[8 * i + 4] as *mut u32 as *mut v128,
+ packed
+ );
+ }
+
+ Ok(TextureData::new(
+ tex_data,
+ tex_width,
+ tex_height,
+ ))
+}
\ No newline at end of file
diff --git a/temp_wasm/cesiumjs-gsplat-utils/src/utils.rs b/temp_wasm/cesiumjs-gsplat-utils/src/utils.rs
new file mode 100644
index 000000000000..b1d7929dc9c4
--- /dev/null
+++ b/temp_wasm/cesiumjs-gsplat-utils/src/utils.rs
@@ -0,0 +1,10 @@
+pub fn set_panic_hook() {
+ // When the `console_error_panic_hook` feature is enabled, we can call the
+ // `set_panic_hook` function at least once during initialization, and then
+ // we will get better error messages if our code ever panics.
+ //
+ // For more details see
+ // https://github.com/rustwasm/console_error_panic_hook#readme
+ #[cfg(feature = "console_error_panic_hook")]
+ console_error_panic_hook::set_once();
+}
diff --git a/temp_wasm/cesiumjs-gsplat-utils/tests/web.rs b/temp_wasm/cesiumjs-gsplat-utils/tests/web.rs
new file mode 100644
index 000000000000..578bbb7ce5e4
--- /dev/null
+++ b/temp_wasm/cesiumjs-gsplat-utils/tests/web.rs
@@ -0,0 +1,21 @@
+//! Test suite for the Web and headless browsers.
+
+#![cfg(target_arch = "wasm32")]
+
+extern crate wasm_bindgen_test;
+use wasm_bindgen_test::*;
+
+wasm_bindgen_test_configure!(run_in_browser);
+
+#[wasm_bindgen_test]
+fn pass() {
+ assert_eq!(1 + 1, 2);
+}
+
+#[wasm_bindgen_test]
+fn testTexture() {
+ let buffer: u8[];
+ generate_splat_texture(
+
+ )
+}
\ No newline at end of file