@@ -85,11 +85,11 @@ define([
* var labels = new LabelCollection();
* labels.add({
* position : { x : 1.0, y : 2.0, z : 3.0 },
- * text : "A label"
+ * text : 'A label'
* });
* labels.add({
* position : { x : 4.0, y : 5.0, z : 6.0 },
- * text : "Another label"
+ * text : 'Another label'
* });
*/
function LabelCollection() {
@@ -116,19 +116,19 @@ define([
* labels.modelMatrix = Transforms.eastNorthUpToFixedFrame(center);
* labels.add({
* position : new Cartesian3(0.0, 0.0, 0.0),
- * text : "Center"
+ * text : 'Center'
* });
* labels.add({
* position : new Cartesian3(1000000.0, 0.0, 0.0),
- * text : "East"
+ * text : 'East'
* });
* labels.add({
* position : new Cartesian3(0.0, 1000000.0, 0.0),
- * text : "North"
+ * text : 'North'
* });
* labels.add({
* position : new Cartesian3(0.0, 0.0, 1000000.0),
- * text : "Up"
+ * text : 'Up'
* });
*/
this.modelMatrix = Matrix4.IDENTITY;
@@ -191,10 +191,10 @@ define([
* var l = labels.add({
* show : true,
* position : Cartesian3.ZERO,
- * text : "",
- * font : "30px sans-serif",
- * fillColor : "white",
- * outlineColor : "white",
+ * text : '',
+ * font : '30px sans-serif',
+ * fillColor : 'white',
+ * outlineColor : 'white',
* style : LabelStyle.FILL,
* pixelOffset : Cartesian2.ZERO,
* eyeOffset : Cartesian3.ZERO,
@@ -209,8 +209,8 @@ define([
* position : ellipsoid.toCartesian(
* CesiumMath.cartographic3ToRadians(
* new Cartographic3(longitude, latitude, height))),
- * text : "Hello World",
- * font : "24px Helvetica",
+ * text : 'Hello World',
+ * font : '24px Helvetica',
* });
*/
LabelCollection.prototype.add = function(label) {
@@ -359,8 +359,8 @@ define([
* }
*/
LabelCollection.prototype.get = function(index) {
- if (typeof index === "undefined") {
- throw new DeveloperError("index is required.");
+ if (typeof index === 'undefined') {
+ throw new DeveloperError('index is required.');
}
this._removeLabels();
diff --git a/Source/Scene/LabelStyle.js b/Source/Scene/LabelStyle.js
index c53be20f87d..cf19d17d31c 100644
--- a/Source/Scene/LabelStyle.js
+++ b/Source/Scene/LabelStyle.js
@@ -16,21 +16,21 @@ define(['../Core/Enumeration'], function(Enumeration) {
* @constant
* @type {Enumeration}
*/
- FILL : new Enumeration(0, "FILL"),
+ FILL : new Enumeration(0, 'FILL'),
/**
* DOC_TBA
*
* @constant
* @type {Enumeration}
*/
- OUTLINE : new Enumeration(1, "OUTLINE"),
+ OUTLINE : new Enumeration(1, 'OUTLINE'),
/**
* DOC_TBA
*
* @constant
* @type {Enumeration}
*/
- FILL_AND_OUTLINE : new Enumeration(2, "FILL_AND_OUTLINE")
+ FILL_AND_OUTLINE : new Enumeration(2, 'FILL_AND_OUTLINE')
};
return LabelStyle;
diff --git a/Source/Scene/OpenStreetMapTileProvider.js b/Source/Scene/OpenStreetMapTileProvider.js
index 209a76f93a2..613eac654d4 100644
--- a/Source/Scene/OpenStreetMapTileProvider.js
+++ b/Source/Scene/OpenStreetMapTileProvider.js
@@ -27,8 +27,8 @@ define([
* @see ArcGISTileProvider
* @see CompositeTileProvider
*
- * @see
*
* @example
* // OpenStreetMap tile provider
@@ -118,7 +118,7 @@ define([
*/
OpenStreetMapTileProvider.prototype.loadTileImage = function(tile, onload, onerror) {
if (tile.zoom < this.zoomMin || tile.zoom > this.zoomMax) {
- throw new DeveloperError("tile.zoom must be between in [zoomMin, zoomMax].");
+ throw new DeveloperError('tile.zoom must be between in [zoomMin, zoomMax].');
}
var image = new Image();
@@ -142,12 +142,12 @@ define([
*/
OpenStreetMapTileProvider.prototype.getLogo = function() {
if (!this._logo) {
- var canvas = document.createElement("canvas");
+ var canvas = document.createElement('canvas');
canvas.width = 800.0;
canvas.height = 20.0;
- var context = canvas.getContext("2d");
- context.fillStyle = "#fff";
+ var context = canvas.getContext('2d');
+ context.fillStyle = '#fff';
context.font = '12px sans-serif';
context.textBaseline = 'top';
context.fillText(this._credit, 0, 0);
diff --git a/Source/Scene/OrthographicFrustum.js b/Source/Scene/OrthographicFrustum.js
index 8ec8aa28bf7..7e3c588713d 100644
--- a/Source/Scene/OrthographicFrustum.js
+++ b/Source/Scene/OrthographicFrustum.js
@@ -101,20 +101,20 @@ define([
OrthographicFrustum.prototype._update = function() {
if (this.left === null || this.right === null || this.top === null || this.bottom === null || this.near === null || this.far === null) {
- throw new DeveloperError("left, right, top, bottom, near, or far frustum parameters are not set.");
+ throw new DeveloperError('left, right, top, bottom, near, or far frustum parameters are not set.');
}
if (this.left !== this._left || this.right !== this._right || this.top !== this._top || this.bottom !== this._bottom || this.near !== this._near || this.far !== this._far) {
if (this.left > this.right) {
- throw new DeveloperError("right must be greater than left.");
+ throw new DeveloperError('right must be greater than left.');
}
if (this.bottom > this.top) {
- throw new DeveloperError("top must be greater than bottom.");
+ throw new DeveloperError('top must be greater than bottom.');
}
if (this.near < 0 || this.near > this.far) {
- throw new DeveloperError("near must be greater than zero and less than far.");
+ throw new DeveloperError('near must be greater than zero and less than far.');
}
this._left = this.left;
@@ -147,15 +147,15 @@ define([
*/
OrthographicFrustum.prototype.getPlanes = function(position, direction, up) {
if (!position) {
- throw new DeveloperError("position is required.");
+ throw new DeveloperError('position is required.');
}
if (!direction) {
- throw new DeveloperError("direction is required.");
+ throw new DeveloperError('direction is required.');
}
if (!up) {
- throw new DeveloperError("up is required.");
+ throw new DeveloperError('up is required.');
}
var pos = Cartesian3.clone(position);
diff --git a/Source/Scene/Particle.js b/Source/Scene/Particle.js
index 10ca9399fdb..b5953461bb5 100644
--- a/Source/Scene/Particle.js
+++ b/Source/Scene/Particle.js
@@ -16,10 +16,10 @@ define([
template = template || {};
template.position = template.position || Cartesian3.ZERO;
template.velocity = template.velocity || Cartesian3.ZERO; // initial velocity
- template.mass = (typeof template.mass === "undefined") ? 1.0 : template.mass;
+ template.mass = (typeof template.mass === 'undefined') ? 1.0 : template.mass;
if (template.mass < 0) {
- throw new DeveloperError("template.mass must be positive.");
+ throw new DeveloperError('template.mass must be positive.');
}
this.position = new Cartesian3(template.position.x, template.position.y, template.position.z);
diff --git a/Source/Scene/ParticleSystem.js b/Source/Scene/ParticleSystem.js
index 35403cf97b8..a82c6a94712 100644
--- a/Source/Scene/ParticleSystem.js
+++ b/Source/Scene/ParticleSystem.js
@@ -113,7 +113,7 @@ define([
ParticleSystem.prototype.setState = function(state) {
if (state) {
if (state.length !== this.getDimension()) {
- throw new DeveloperError("The dimensions of the state vector does not equal the dimensions of this particle system. Call getDimension().");
+ throw new DeveloperError('The dimensions of the state vector does not equal the dimensions of this particle system. Call getDimension().');
}
var particles = this.particles;
diff --git a/Source/Scene/PerspectiveFrustum.js b/Source/Scene/PerspectiveFrustum.js
index 7fa5c744cc7..4b58971d3f8 100644
--- a/Source/Scene/PerspectiveFrustum.js
+++ b/Source/Scene/PerspectiveFrustum.js
@@ -94,20 +94,20 @@ define([
PerspectiveFrustum.prototype._update = function() {
if (this.fovy === null || this.aspectRatio === null || this.near === null || this.far === null) {
- throw new DeveloperError("fovy, aspectRatio, near, or far parameters are not set.");
+ throw new DeveloperError('fovy, aspectRatio, near, or far parameters are not set.');
}
if (this.fovy !== this._fovy || this.aspectRatio !== this._aspectRatio || this.near !== this._near || this.far !== this._far) {
if (this.fovy < 0 || this.fovy >= Math.PI) {
- throw new DeveloperError("fovy must be in the range [0, PI).");
+ throw new DeveloperError('fovy must be in the range [0, PI).');
}
if (this.aspectRatio < 0) {
- throw new DeveloperError("aspectRatio must be positive.");
+ throw new DeveloperError('aspectRatio must be positive.');
}
if (this.near < 0 || this.near > this.far) {
- throw new DeveloperError("near must be greater than zero and less than far.");
+ throw new DeveloperError('near must be greater than zero and less than far.');
}
this._fovy = this.fovy;
@@ -146,15 +146,15 @@ define([
*/
PerspectiveFrustum.prototype.getPlanes = function(position, direction, up) {
if (!position) {
- throw new DeveloperError("position is required.");
+ throw new DeveloperError('position is required.');
}
if (!direction) {
- throw new DeveloperError("direction is required.");
+ throw new DeveloperError('direction is required.');
}
if (!up) {
- throw new DeveloperError("up is required.");
+ throw new DeveloperError('up is required.');
}
var pos = Cartesian3.clone(position);
diff --git a/Source/Scene/Polygon.js b/Source/Scene/Polygon.js
index 229d64ddb9c..3559e706028 100644
--- a/Source/Scene/Polygon.js
+++ b/Source/Scene/Polygon.js
@@ -293,7 +293,7 @@ define([
Polygon.prototype.setPositions = function(positions, height) {
// positions can be undefined
if (typeof positions !== 'undefined' && (positions.length < 3)) {
- throw new DeveloperError("At least three positions are required.");
+ throw new DeveloperError('At least three positions are required.');
}
this.height = height || 0.0;
this._extent = undefined;
@@ -431,14 +431,14 @@ define([
*/
Polygon.prototype.update = function(context, sceneState) {
if (!this.ellipsoid) {
- throw new DeveloperError("this.ellipsoid must be defined.");
+ throw new DeveloperError('this.ellipsoid must be defined.');
}
var mode = sceneState.mode;
var granularity = this._getGranularity(mode);
if (granularity < 0.0) {
- throw new DeveloperError("this.granularity and scene2D/scene3D overrides must be greater than zero.");
+ throw new DeveloperError('this.granularity and scene2D/scene3D overrides must be greater than zero.');
}
if (this.show) {
@@ -480,11 +480,11 @@ define([
this._material = this.material || new ColorMaterial();
var fsSource =
- "#line 0\n" +
+ '#line 0\n' +
Noise +
- "#line 0\n" +
+ '#line 0\n' +
this.material._getShaderSource() +
- "#line 0\n" +
+ '#line 0\n' +
PolygonFS;
this._sp = this._sp && this._sp.release();
diff --git a/Source/Scene/Polyline.js b/Source/Scene/Polyline.js
index 6cd64f6d2b1..06e018b77bb 100644
--- a/Source/Scene/Polyline.js
+++ b/Source/Scene/Polyline.js
@@ -296,7 +296,7 @@ define([
var drawUniformsOne = {
u_color : function() {
- return that.color; // Doesn't matter; doesn't write color
+ return that.color; // does not matter; does not write color
},
u_morphTime : function() {
return that.morphTime;
@@ -749,8 +749,8 @@ define([
this._spGroundTrack =
this._spGroundTrack ||
context.getShaderCache().getShaderProgram(
- "#define GROUND_TRACK\n" +
- "#line 0\n" +
+ '#define GROUND_TRACK\n' +
+ '#line 0\n' +
PolylineVS, PolylineFS, attributeIndices);
} else {
this._spGroundTrack = this._spGroundTrack && this._spGroundTrack.release();
@@ -760,8 +760,8 @@ define([
this._spHeightTrack =
this._spHeightTrack ||
context.getShaderCache().getShaderProgram(
- "#define HEIGHT_TRACK\n" +
- "#line 0\n" +
+ '#define HEIGHT_TRACK\n' +
+ '#line 0\n' +
PolylineVS, PolylineFS, attributeIndices);
} else {
this._spHeightTrack = this._spHeightTrack && this._spHeightTrack.release();
diff --git a/Source/Scene/Projections.js b/Source/Scene/Projections.js
index 573d290cfc2..e2b64617cc9 100644
--- a/Source/Scene/Projections.js
+++ b/Source/Scene/Projections.js
@@ -13,19 +13,19 @@ define([
* @exports Projections
*/
var Projections = {
- WGS84 : new Enumeration(0, "WGS84", {
+ WGS84 : new Enumeration(0, 'WGS84', {
toWgs84 : function(extent, image) {
return image;
}
}),
- MERCATOR : new Enumeration(1, "MERCATOR", {
+ MERCATOR : new Enumeration(1, 'MERCATOR', {
toWgs84 : function(extent, image) {
- if (!extent || typeof extent.north === "undefined" || typeof extent.south === "undefined") {
- throw new DeveloperError("extent, extent.north and extent.south are required.");
+ if (!extent || typeof extent.north === 'undefined' || typeof extent.south === 'undefined') {
+ throw new DeveloperError('extent, extent.north and extent.south are required.');
}
if (!image) {
- throw new DeveloperError("image is required.");
+ throw new DeveloperError('image is required.');
}
var width = parseInt(image.width, 10);
@@ -33,10 +33,10 @@ define([
var wRowBytes = width * 4; // Always 4 bytes per pixel.
// draw image to canvas and get the pixels
- var canvas = document.createElement("canvas");
+ var canvas = document.createElement('canvas');
canvas.width = width;
canvas.height = height;
- var context = canvas.getContext("2d");
+ var context = canvas.getContext('2d');
context.drawImage(image, 0, 0);
var fromPixels = context.getImageData(0, 0, width, height).data;
diff --git a/Source/Scene/RectangularPyramidSensorVolume.js b/Source/Scene/RectangularPyramidSensorVolume.js
index 9a93ef79bf0..5fc12316efe 100644
--- a/Source/Scene/RectangularPyramidSensorVolume.js
+++ b/Source/Scene/RectangularPyramidSensorVolume.js
@@ -33,14 +33,14 @@ define([
*
* @type Boolean
*/
- this.show = (typeof t.show === "undefined") ? true : t.show;
+ this.show = (typeof t.show === 'undefined') ? true : t.show;
/**
* DOC_TBA
*
* @type Boolean
*/
- this.showIntersection = (typeof t.showIntersection === "undefined") ? true : t.showIntersection;
+ this.showIntersection = (typeof t.showIntersection === 'undefined') ? true : t.showIntersection;
/**
*
@@ -53,7 +53,7 @@ define([
*
* @type Boolean
*/
- this.showThroughEllipsoid = (typeof t.showThroughEllipsoid === "undefined") ? false : t.showThroughEllipsoid;
+ this.showThroughEllipsoid = (typeof t.showThroughEllipsoid === 'undefined') ? false : t.showThroughEllipsoid;
/**
* The 4x4 transformation matrix that transforms this sensor from model to world coordinates. In it's model
@@ -62,8 +62,8 @@ define([
* cross section. This matrix is available to GLSL vertex and fragment shaders via
* {@link agi_model} and derived uniforms.
*
- *
- *
+ *
+ *
* Model coordinate system for a sensor
*
*
@@ -91,7 +91,7 @@ define([
*
* @type Number
*/
- this.radius = (typeof t.radius === "undefined") ? Number.POSITIVE_INFINITY : t.radius;
+ this.radius = (typeof t.radius === 'undefined') ? Number.POSITIVE_INFINITY : t.radius;
/**
* DOC_TBA
@@ -100,7 +100,7 @@ define([
*
* @see RectangularPyramidSensorVolume#yHalfAngle
*/
- this.xHalfAngle = (typeof t.xHalfAngle === "undefined") ? CesiumMath.PI_OVER_TWO : t.xHalfAngle;
+ this.xHalfAngle = (typeof t.xHalfAngle === 'undefined') ? CesiumMath.PI_OVER_TWO : t.xHalfAngle;
this._xHalfAngle = undefined;
/**
@@ -110,7 +110,7 @@ define([
*
* @see RectangularPyramidSensorVolume#xHalfAngle
*/
- this.yHalfAngle = (typeof t.yHalfAngle === "undefined") ? CesiumMath.PI_OVER_TWO : t.yHalfAngle;
+ this.yHalfAngle = (typeof t.yHalfAngle === 'undefined') ? CesiumMath.PI_OVER_TWO : t.yHalfAngle;
this._yHalfAngle = undefined;
/**
@@ -133,7 +133,7 @@ define([
*
* @type Number
*/
- this.erosion = (typeof t.erosion === "undefined") ? 1.0 : t.erosion;
+ this.erosion = (typeof t.erosion === 'undefined') ? 1.0 : t.erosion;
t._pickIdThis = t._pickIdThis || this;
this._customSensor = new CustomSensorVolume(t);
@@ -149,7 +149,7 @@ define([
*/
RectangularPyramidSensorVolume.prototype.update = function(context, sceneState) {
if ((this.xHalfAngle > CesiumMath.PI_OVER_TWO) || (this.yHalfAngle > CesiumMath.PI_OVER_TWO)) {
- throw new DeveloperError("this.xHalfAngle and this.yHalfAngle must each be less than or equal to 90 degrees.");
+ throw new DeveloperError('this.xHalfAngle and this.yHalfAngle must each be less than or equal to 90 degrees.');
}
var s = this._customSensor;
diff --git a/Source/Scene/SceneMode.js b/Source/Scene/SceneMode.js
index 583e123f05f..8afdb27d7d3 100644
--- a/Source/Scene/SceneMode.js
+++ b/Source/Scene/SceneMode.js
@@ -14,7 +14,7 @@ define(['../Core/Enumeration'], function(Enumeration) {
* @constant
* @type {Enumeration}
*/
- SCENE2D : new Enumeration(0, "SCENE2D"),
+ SCENE2D : new Enumeration(0, 'SCENE2D'),
/**
* DOC_TBA
@@ -22,7 +22,7 @@ define(['../Core/Enumeration'], function(Enumeration) {
* @constant
* @type {Enumeration}
*/
- COLUMBUS_VIEW : new Enumeration(1, "COLUMBUS_VIEW"),
+ COLUMBUS_VIEW : new Enumeration(1, 'COLUMBUS_VIEW'),
/**
* DOC_TBA
@@ -30,7 +30,7 @@ define(['../Core/Enumeration'], function(Enumeration) {
* @constant
* @type {Enumeration}
*/
- SCENE3D : new Enumeration(2, "SCENE3D"),
+ SCENE3D : new Enumeration(2, 'SCENE3D'),
/**
* DOC_TBA
@@ -38,7 +38,7 @@ define(['../Core/Enumeration'], function(Enumeration) {
* @constant
* @type {Enumeration}
*/
- MORPHING : new Enumeration(3, "MORPHING")
+ MORPHING : new Enumeration(3, 'MORPHING')
};
return SceneMode;
diff --git a/Source/Scene/SensorVolumeCollection.js b/Source/Scene/SensorVolumeCollection.js
index aa0ad5576c7..aec5c2dae04 100644
--- a/Source/Scene/SensorVolumeCollection.js
+++ b/Source/Scene/SensorVolumeCollection.js
@@ -123,8 +123,8 @@ define([
* @see SensorVolumeCollection#getLength
*/
SensorVolumeCollection.prototype.get = function(index) {
- if (typeof index === "undefined") {
- throw new DeveloperError("index is required.");
+ if (typeof index === 'undefined') {
+ throw new DeveloperError('index is required.');
}
return this._sensors[index];
diff --git a/Source/Scene/SingleTileProvider.js b/Source/Scene/SingleTileProvider.js
index 8f54bab71af..dcdaf955ccf 100644
--- a/Source/Scene/SingleTileProvider.js
+++ b/Source/Scene/SingleTileProvider.js
@@ -29,7 +29,7 @@ define([
*/
function SingleTileProvider(url, proxy) {
if (typeof url === 'undefined') {
- throw new DeveloperError("url is required.");
+ throw new DeveloperError('url is required.');
}
this._url = url;
@@ -88,7 +88,7 @@ define([
*/
SingleTileProvider.prototype.loadTileImage = function(tile, onload, onerror) {
if (tile.zoom < this.zoomMin || tile.zoom > this.zoomMax) {
- throw new DeveloperError("tile.zoom must be between in [zoomMin, zoomMax].");
+ throw new DeveloperError('tile.zoom must be between in [zoomMin, zoomMax].');
}
var image = new Image();
diff --git a/Source/Scene/SolidColorTileProvider.js b/Source/Scene/SolidColorTileProvider.js
index f80ea0e826e..98614017cfc 100644
--- a/Source/Scene/SolidColorTileProvider.js
+++ b/Source/Scene/SolidColorTileProvider.js
@@ -105,12 +105,12 @@ define([
}
SolidColorTileProvider.prototype._createImage = function(color, width, height) {
- var canvas = document.createElement("canvas");
+ var canvas = document.createElement('canvas');
canvas.width = width;
canvas.height = height;
- var context = canvas.getContext("2d");
- context.fillStyle = "rgba(" + color.r + ", " + color.g + ", " + color.b + ", 1.0)";
+ var context = canvas.getContext('2d');
+ context.fillStyle = 'rgba(' + color.r + ', ' + color.g + ', ' + color.b + ', 1.0)';
context.fillRect(0, 0, width, height);
return canvas;
@@ -129,10 +129,10 @@ define([
*/
SolidColorTileProvider.prototype.loadTileImage = function(tile, onload, onerror) {
if (tile.zoom < this.zoomMin || tile.zoom > this.zoomMax) {
- throw new DeveloperError("tile.zoom must be in [zoomMin, zoomMax].");
+ throw new DeveloperError('tile.zoom must be in [zoomMin, zoomMax].');
}
- if (typeof onload === "function") {
+ if (typeof onload === 'function') {
onload();
}
diff --git a/Source/Scene/SphericalRepulsionForce.js b/Source/Scene/SphericalRepulsionForce.js
index c4acfcf7ed8..b2ef4faea01 100644
--- a/Source/Scene/SphericalRepulsionForce.js
+++ b/Source/Scene/SphericalRepulsionForce.js
@@ -15,10 +15,10 @@ define([
function SphericalRepulsionForce(template) {
template = template || {};
template.center = template.center || Cartesian3.ZERO;
- template.radius = (typeof template.radius === "undefined") ? 1.0 : template.radius;
+ template.radius = (typeof template.radius === 'undefined') ? 1.0 : template.radius;
if (template.radius < 0) {
- throw new DeveloperError("template.radius must be nonnegative.");
+ throw new DeveloperError('template.radius must be nonnegative.');
}
this.center = new Cartesian3(template.center.x, template.center.y, template.center.z);
diff --git a/Source/Scene/SpringForce.js b/Source/Scene/SpringForce.js
index e905c88ff26..018ae8d7786 100644
--- a/Source/Scene/SpringForce.js
+++ b/Source/Scene/SpringForce.js
@@ -11,7 +11,7 @@ define(['../Core/DeveloperError'], function(DeveloperError) {
template = template || {};
if (!template.particleOne || !template.particleTwo) {
- throw new DeveloperError("template.particleOne and template.particleTwo are required.");
+ throw new DeveloperError('template.particleOne and template.particleTwo are required.');
}
this.particleOne = template.particleOne;
@@ -19,9 +19,9 @@ define(['../Core/DeveloperError'], function(DeveloperError) {
// TODO: Throw if these are negative
- this.restLength = (typeof template.restLength === "undefined") ? 1.0 : template.restLength;
- this.springConstant = (typeof template.springConstant === "undefined") ? 1.0 : template.springConstant;
- this.dampingConstant = (typeof template.dampingConstant === "undefined") ? 1.0 : template.dampingConstant;
+ this.restLength = (typeof template.restLength === 'undefined') ? 1.0 : template.restLength;
+ this.springConstant = (typeof template.springConstant === 'undefined') ? 1.0 : template.springConstant;
+ this.dampingConstant = (typeof template.dampingConstant === 'undefined') ? 1.0 : template.dampingConstant;
}
/**
diff --git a/Source/Scene/TieDyeMaterial.js b/Source/Scene/TieDyeMaterial.js
index 0da1d51b189..640326479f9 100644
--- a/Source/Scene/TieDyeMaterial.js
+++ b/Source/Scene/TieDyeMaterial.js
@@ -58,9 +58,9 @@ define([
}
TieDyeMaterial.prototype._getShaderSource = function() {
- return "#line 0\n" +
+ return '#line 0\n' +
ShadersNoise +
- "#line 0\n" +
+ '#line 0\n' +
ShadersTieDyeMaterial;
};
diff --git a/Source/Scene/Tile.js b/Source/Scene/Tile.js
index 69df047243d..7f373f1aeb2 100644
--- a/Source/Scene/Tile.js
+++ b/Source/Scene/Tile.js
@@ -36,16 +36,16 @@ define([
*/
function Tile(description) {
if (!description) {
- throw new DeveloperError("description is required.");
+ throw new DeveloperError('description is required.');
}
- if (typeof description.extent === "undefined" &&
- (typeof description.x === "undefined" || typeof description.y === "undefined")) {
- throw new DeveloperError("Either description.extent is required or description.x and description.y are required.");
+ if (typeof description.extent === 'undefined' &&
+ (typeof description.x === 'undefined' || typeof description.y === 'undefined')) {
+ throw new DeveloperError('Either description.extent is required or description.x and description.y are required.');
}
- if (typeof description.zoom === "undefined" || description.zoom < 0) {
- throw new DeveloperError("description.zoom is required an must be greater than zero.");
+ if (typeof description.zoom === 'undefined' || description.zoom < 0) {
+ throw new DeveloperError('description.zoom is required an must be greater than zero.');
}
/**
@@ -109,7 +109,7 @@ define([
this.y = description.y;
if (this.x < 0 || this.y < 0) {
- throw new DeveloperError("description.x and description.y must be greater than zero.");
+ throw new DeveloperError('description.x and description.y must be greater than zero.');
}
this.extent = Tile.tileXYToExtent(this.x, this.y, this.zoom);
diff --git a/Source/Scene/TileState.js b/Source/Scene/TileState.js
index ff2cba3e943..272d9e82c99 100644
--- a/Source/Scene/TileState.js
+++ b/Source/Scene/TileState.js
@@ -6,15 +6,15 @@ define(['../Core/Enumeration'], function(Enumeration) {
* @private
*/
var TileState = {
- READY : new Enumeration(0, "READY"),
- IMAGE_LOADING : new Enumeration(1, "IMAGE_LOADING"),
- IMAGE_LOADED : new Enumeration(2, "IMAGE_LOADED"),
- IMAGE_FAILED : new Enumeration(3, "IMAGE_FAILED"),
- IMAGE_INVALID : new Enumeration(4, "IMAGE_INVALID"),
- REPROJECTING : new Enumeration(5, "REPROJECTING"),
- REPROJECTED : new Enumeration(6, "REPROJECTED"),
- TEXTURE_LOADING : new Enumeration(7, "TEXTURE_LOADING"),
- TEXTURE_LOADED : new Enumeration(8, "TEXTURE_LOADED")
+ READY : new Enumeration(0, 'READY'),
+ IMAGE_LOADING : new Enumeration(1, 'IMAGE_LOADING'),
+ IMAGE_LOADED : new Enumeration(2, 'IMAGE_LOADED'),
+ IMAGE_FAILED : new Enumeration(3, 'IMAGE_FAILED'),
+ IMAGE_INVALID : new Enumeration(4, 'IMAGE_INVALID'),
+ REPROJECTING : new Enumeration(5, 'REPROJECTING'),
+ REPROJECTED : new Enumeration(6, 'REPROJECTED'),
+ TEXTURE_LOADING : new Enumeration(7, 'TEXTURE_LOADING'),
+ TEXTURE_LOADED : new Enumeration(8, 'TEXTURE_LOADED')
};
return TileState;
diff --git a/Source/Scene/VectorForce.js b/Source/Scene/VectorForce.js
index 6949ed72bc9..02b945303ef 100644
--- a/Source/Scene/VectorForce.js
+++ b/Source/Scene/VectorForce.js
@@ -17,7 +17,7 @@ define([
template.vector = template.vector || Cartesian3.UNIT_Z.negate();
if (!template.particle) {
- throw new DeveloperError("template.particle is required.");
+ throw new DeveloperError('template.particle is required.');
}
this.vector = new Cartesian3(template.vector.x, template.vector.y, template.vector.z);
diff --git a/Source/Scene/VerticalOrigin.js b/Source/Scene/VerticalOrigin.js
index 0443c992376..d593b6550ab 100644
--- a/Source/Scene/VerticalOrigin.js
+++ b/Source/Scene/VerticalOrigin.js
@@ -18,21 +18,21 @@ define(['../Core/Enumeration'], function(Enumeration) {
* @constant
* @type {Enumeration}
*/
- CENTER : new Enumeration(0, "CENTER"),
+ CENTER : new Enumeration(0, 'CENTER'),
/**
* The origin is at the bottom of the object.
*
* @constant
* @type {Enumeration}
*/
- BOTTOM : new Enumeration(1, "BOTTOM"),
+ BOTTOM : new Enumeration(1, 'BOTTOM'),
/**
* The origin is at the top of the object.
*
* @constant
* @type {Enumeration}
*/
- TOP : new Enumeration(-1, "TOP")
+ TOP : new Enumeration(-1, 'TOP')
};
return VerticalOrigin;
diff --git a/Source/Scene/VerticalStripeMaterial.js b/Source/Scene/VerticalStripeMaterial.js
index b70fd2030e6..2b4b9de0e96 100644
--- a/Source/Scene/VerticalStripeMaterial.js
+++ b/Source/Scene/VerticalStripeMaterial.js
@@ -63,7 +63,7 @@ define(['../Shaders/VerticalStripeMaterial'], function(ShadersVerticalStripeMate
}
VerticalStripeMaterial.prototype._getShaderSource = function() {
- return "#line 0\n" + ShadersVerticalStripeMaterial;
+ return '#line 0\n' + ShadersVerticalStripeMaterial;
};
return VerticalStripeMaterial;
diff --git a/Source/Scene/combineMaterials.js b/Source/Scene/combineMaterials.js
index b2216e290ca..6d580c33ea8 100644
--- a/Source/Scene/combineMaterials.js
+++ b/Source/Scene/combineMaterials.js
@@ -7,7 +7,7 @@ define(function() {
*/
function combineMaterials() {
var unforms = {};
- var concatenatedSource = "";
+ var concatenatedSource = '';
var duplicateUniforms = {};
var length = arguments.length;
@@ -21,14 +21,14 @@ define(function() {
if (unforms[name]) {
// Rename uniform
var count = duplicateUniforms[name] || 1;
- var uniqueName = "_agi_" + name + count.toString();
+ var uniqueName = '_agi_' + name + count.toString();
// PERFORMANCE_IDEA: We could cache the RegExp for duplicate uniforms
// or see if a pure JavaScript search-and-replace is faster.
// This could rename other things like GLSL comments and other identifiers
// with the same name.
- materialSource = materialSource.replace(new RegExp(name, "g"), uniqueName);
+ materialSource = materialSource.replace(new RegExp(name, 'g'), uniqueName);
unforms[uniqueName] = materialUniforms[name];
duplicateUniforms[name] = count + 1;
@@ -42,7 +42,7 @@ define(function() {
materialSource = arguments[i].sourceTransform(materialSource);
}
- concatenatedSource += "#line 0\n" + materialSource;
+ concatenatedSource += '#line 0\n' + materialSource;
}
return {
diff --git a/Source/ThirdParty/measureText.js b/Source/ThirdParty/measureText.js
index 3ecb6cf49c9..d7d18ec4302 100644
--- a/Source/ThirdParty/measureText.js
+++ b/Source/ThirdParty/measureText.js
@@ -1,5 +1,5 @@
/*!
- This library rewrites the Canvas2D "measureText" function
+ This library rewrites the Canvas2D 'measureText' function
so that it returns a more complete metrics object.
This library is licensed under the MIT (Expat) license,
the text for which is included below.
@@ -13,10 +13,10 @@
-----------------------------------------------------------------------------
- Copyright (C) 2011 by Mike "Pomax" Kamermans
+ Copyright (C) 2011 by Mike 'Pomax' Kamermans
Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
+ 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
@@ -25,7 +25,7 @@
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
+ 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
@@ -36,12 +36,12 @@
/*global define*/
define(function() {
"use strict";
-// var NAME = "FontMetrics Library";
-// var VERSION = "1-2012.0121.1300";
+// var NAME = 'FontMetrics Library';
+// var VERSION = '1-2012.0121.1300';
// if there is no getComputedStyle, this library won't work.
// if(!document.defaultView.getComputedStyle) {
-// throw("ERROR: 'document.defaultView.getComputedStyle' not found. This library only works in browsers that can report computed CSS values.");
+// throw('ERROR: 'document.defaultView.getComputedStyle' not found. This library only works in browsers that can report computed CSS values.');
// }
// store the old text metrics function on the Canvas2D prototype
@@ -90,40 +90,40 @@ define(function() {
*/
return function(context2D, textstring) {
var metrics = context2D.measureText(textstring),
- fontFamily = getCSSValue(context2D.canvas,"font-family"),
- fontSize = getCSSValue(context2D.canvas,"font-size").replace("px",""),
+ fontFamily = getCSSValue(context2D.canvas,'font-family'),
+ fontSize = getCSSValue(context2D.canvas,'font-size').replace('px',''),
isSpace = !(/\S/.test(textstring));
metrics.fontsize = fontSize;
// for text lead values, we meaure a multiline text container.
- var leadDiv = document.createElement("div");
- leadDiv.style.position = "absolute";
+ var leadDiv = document.createElement('div');
+ leadDiv.style.position = 'absolute';
leadDiv.style.opacity = 0;
- leadDiv.style.font = fontSize + "px " + fontFamily;
- leadDiv.innerHTML = textstring + "
" + textstring;
+ leadDiv.style.font = fontSize + 'px ' + fontFamily;
+ leadDiv.innerHTML = textstring + '
' + textstring;
document.body.appendChild(leadDiv);
// make some initial guess at the text leading (using the standard TeX ratio)
metrics.leading = 1.2 * fontSize;
// then we try to get the real value from the browser
- var leadDivHeight = getCSSValue(leadDiv,"height");
- leadDivHeight = leadDivHeight.replace("px","");
+ var leadDivHeight = getCSSValue(leadDiv,'height');
+ leadDivHeight = leadDivHeight.replace('px','');
if (leadDivHeight >= fontSize * 2) { metrics.leading = (leadDivHeight/2) | 0; }
document.body.removeChild(leadDiv);
// if we're not dealing with white space, we can compute metrics
if (!isSpace) {
// Have characters, so measure the text
- var canvas = document.createElement("canvas");
+ var canvas = document.createElement('canvas');
var padding = 100;
canvas.width = metrics.width + padding;
canvas.height = 3*fontSize;
canvas.style.opacity = 1;
canvas.style.fontFamily = fontFamily;
canvas.style.fontSize = fontSize;
- var ctx = canvas.getContext("2d");
- ctx.font = fontSize + "px " + fontFamily;
+ var ctx = canvas.getContext('2d');
+ ctx.font = fontSize + 'px ' + fontFamily;
var w = canvas.width,
h = canvas.height,
@@ -131,9 +131,9 @@ define(function() {
// Set all canvas pixeldata values to 255, with all the content
// data being 0. This lets us scan for data[i] != 255.
- ctx.fillStyle = "white";
+ ctx.fillStyle = 'white';
ctx.fillRect(-1, -1, w+2, h+2);
- ctx.fillStyle = "black";
+ ctx.fillStyle = 'black';
ctx.fillText(textstring, padding/2, baseline);
var pixelData = ctx.getImageData(0, 0, w, h).data;
diff --git a/Specs/Core/AxisAlignedBoundingBoxSpec.js b/Specs/Core/AxisAlignedBoundingBoxSpec.js
index 00bdf88a4e5..8c1e47a871f 100644
--- a/Specs/Core/AxisAlignedBoundingBoxSpec.js
+++ b/Specs/Core/AxisAlignedBoundingBoxSpec.js
@@ -18,22 +18,22 @@ defineSuite([
new Cartesian3(-3, 3, 3)
];
- it("computes the minimum", function() {
+ it('computes the minimum', function() {
var box = new AxisAlignedBoundingBox(positions);
expect(box.minimum.equals(new Cartesian3(-3, -3, -3))).toEqual(true);
});
- it("computes the maximum", function() {
+ it('computes the maximum', function() {
var box = new AxisAlignedBoundingBox(positions);
expect(box.maximum.equals(new Cartesian3(3, 3, 3))).toEqual(true);
});
- it("computes a center", function() {
+ it('computes a center', function() {
var box = new AxisAlignedBoundingBox(positions);
expect(box.center.equalsEpsilon(Cartesian3.ZERO, Math.EPSILON14)).toEqual(true);
});
- it("computes the bounding box for a single position", function() {
+ it('computes the bounding box for a single position', function() {
var box = new AxisAlignedBoundingBox([{
x : 1,
y : 2,
@@ -45,14 +45,14 @@ defineSuite([
expect(box.center.equals(new Cartesian3(1, 2, 3))).toEqual(true);
});
- it("has undefined properties with positions of length zero", function() {
+ it('has undefined properties with positions of length zero', function() {
var box = new AxisAlignedBoundingBox([]);
expect(box.minimum).not.toBeDefined();
expect(box.maximum).not.toBeDefined();
expect(box.center).not.toBeDefined();
});
- it("throws an exception when constructed without any positions", function() {
+ it('throws an exception when constructed without any positions', function() {
expect(function() {
return new AxisAlignedBoundingBox(undefined);
}).toThrow();
diff --git a/Specs/Core/BoundingSphereSpec.js b/Specs/Core/BoundingSphereSpec.js
index fcf4c875414..9e01e9b6d6b 100644
--- a/Specs/Core/BoundingSphereSpec.js
+++ b/Specs/Core/BoundingSphereSpec.js
@@ -22,31 +22,31 @@ defineSuite([
];
}
- it("throws an exception when constructed without any positions", function() {
+ it('throws an exception when constructed without any positions', function() {
expect(function() {
return new BoundingSphere();
}).toThrow();
});
- it("can be constructed using a point and a radius", function() {
+ it('can be constructed using a point and a radius', function() {
var sphere = new BoundingSphere(new Cartesian3(0, 0, 0), 1);
expect(sphere.center.equals(Cartesian3.ZERO)).toEqual(true);
expect(sphere.radius).toEqual(1);
});
- it("has a center", function() {
+ it('has a center', function() {
var sphere = new BoundingSphere(getPositions());
var center = sphere.center;
expect(center.equalsEpsilon(Cartesian3.ZERO, CesiumMath.EPSILON14)).toEqual(true);
});
- it("has a radius", function() {
+ it('has a radius', function() {
var sphere = new BoundingSphere(getPositions());
var radius = sphere.radius;
expect(radius).toEqual(1);
});
- it("contains all points (naive)", function() {
+ it('contains all points (naive)', function() {
var sphere = new BoundingSphere(getPositions());
var radius = sphere.radius;
var center = sphere.center;
@@ -65,7 +65,7 @@ defineSuite([
}
});
- it("contains all points (ritter)", function() {
+ it('contains all points (ritter)', function() {
var positions = getPositions();
positions.push(new Cartesian3(1, 1, 1), new Cartesian3(2, 2, 2), new Cartesian3(3, 3, 3));
var sphere = new BoundingSphere(positions);
diff --git a/Specs/Core/BoxTessellatorSpec.js b/Specs/Core/BoxTessellatorSpec.js
index 02cfbe36f1d..daa1a0c7bdc 100644
--- a/Specs/Core/BoxTessellatorSpec.js
+++ b/Specs/Core/BoxTessellatorSpec.js
@@ -8,7 +8,7 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("compute0", function() {
+ it('compute0', function() {
expect(function() {
return BoxTessellator.compute({
dimensions : new Cartesian3(1, 2, -1)
@@ -16,7 +16,7 @@ defineSuite([
}).toThrow();
});
- it("compute1", function() {
+ it('compute1', function() {
var m = BoxTessellator.compute({
dimensions : new Cartesian3(1, 2, 3)
});
@@ -25,7 +25,7 @@ defineSuite([
expect(m.indexLists[0].values.length).toEqual(12 * 3);
});
- it("compute2", function() {
+ it('compute2', function() {
expect(function() {
return BoxTessellator.compute({
minimumCorner : new Cartesian3(0, 0, 0),
diff --git a/Specs/Core/CachePoliciesSpec.js b/Specs/Core/CachePoliciesSpec.js
index 9ce045397ba..3fceb7280e2 100644
--- a/Specs/Core/CachePoliciesSpec.js
+++ b/Specs/Core/CachePoliciesSpec.js
@@ -8,7 +8,7 @@ defineSuite([
"use strict";
/*global it,expect,describe,beforeEach*/
- describe("LRU", function() {
+ describe('LRU', function() {
var LRU = CachePolicy.LRU;
var Key = function(value) {
@@ -38,19 +38,19 @@ defineSuite([
}));
});
- it("constructor throws on invalid fetch function", function() {
+ it('constructor throws on invalid fetch function', function() {
expect(function() {
return new LRU();
}).toThrow();
expect(function() {
return new LRU({
- fetchFunc : "not-a-function"
+ fetchFunc : 'not-a-function'
});
}).toThrow();
});
- it("hit is in cache", function() {
+ it('hit is in cache', function() {
var keys = [];
var i = 0;
for (; i < limit; ++i) {
@@ -66,7 +66,7 @@ defineSuite([
expect(lastRemoved === null).toEqual(true);
});
- it("miss replaces lru", function() {
+ it('miss replaces lru', function() {
var keys = [];
var i = 0;
for (; i < limit + 1; ++i) {
diff --git a/Specs/Core/CacheSpec.js b/Specs/Core/CacheSpec.js
index cc75fcc98c7..a6c389812a9 100644
--- a/Specs/Core/CacheSpec.js
+++ b/Specs/Core/CacheSpec.js
@@ -46,55 +46,55 @@ defineSuite([
cache = new Cache(new AddAlways(fetch));
});
- it("constructor throws with no policy", function() {
+ it('constructor throws with no policy', function() {
expect(function() {
return new Cache();
}).toThrow();
});
- it("constructor throws when policy has no hit function", function() {
+ it('constructor throws when policy has no hit function', function() {
expect(function() {
return new Cache({
miss : function() {
- return "nonsense";
+ return 'nonsense';
}
});
}).toThrow();
});
- it("constructor throws when policy has no miss function", function() {
+ it('constructor throws when policy has no miss function', function() {
expect(function() {
return new Cache({
hit : function() {
- return "nonsense";
+ return 'nonsense';
}
});
}).toThrow();
});
- it("find throws with no key", function() {
+ it('find throws with no key', function() {
expect(function() {
cache.find();
}).toThrow();
expect(function() {
cache.find({
- nonsense : "nonsense"
+ nonsense : 'nonsense'
});
}).toThrow();
});
- it("find", function() {
+ it('find', function() {
var tenth = {
n : 10,
- key : "10"
+ key : '10'
};
var fn = cache.find(tenth);
expect(fn.fibonacciNumber).toEqual(55);
var eleventh = {
n : 11,
- key : "11"
+ key : '11'
};
var fn2 = cache.find(eleventh);
expect(fn2.fibonacciNumber).toEqual(89);
@@ -106,10 +106,10 @@ defineSuite([
expect(fn2.timesHit).toEqual(timesHit);
});
- it("remove", function() {
+ it('remove', function() {
var thirteenth = {
n : 13,
- key : "13"
+ key : '13'
};
expect(cache.remove(thirteenth)).toEqual(false);
@@ -119,36 +119,36 @@ defineSuite([
expect(cache.find(thirteenth).timesHit).toBeFalsy();
expect(cache.remove({
n : 14,
- key : "14"
+ key : '14'
})).toEqual(false);
});
- it("remove returns false with no key", function() {
+ it('remove returns false with no key', function() {
var result = cache.remove();
expect(result).toEqual(false);
});
- it("remove returns false with null key", function() {
- var result = cache.remove({"key": null});
+ it('remove returns false with null key', function() {
+ var result = cache.remove({'key': null});
expect(result).toEqual(false);
});
- it("destroy", function() {
+ it('destroy', function() {
cache = cache && cache.destroy();
expect(cache).toBeUndefined();
});
- it("destroys cache with keys", function() {
+ it('destroys cache with keys', function() {
var tenth = {
n : 10,
- key : "10"
+ key : '10'
};
cache.find(tenth);
cache = cache && cache.destroy();
expect(cache).toBeUndefined();
});
- it("isDestroyed returns false", function() {
+ it('isDestroyed returns false', function() {
expect(cache.isDestroyed()).toEqual(false);
});
});
diff --git a/Specs/Core/Cartesian2Spec.js b/Specs/Core/Cartesian2Spec.js
index 6ac39fecace..7d71e1a5948 100644
--- a/Specs/Core/Cartesian2Spec.js
+++ b/Specs/Core/Cartesian2Spec.js
@@ -3,113 +3,113 @@ defineSuite(['Core/Cartesian2'], function(Cartesian2) {
"use strict";
/*global it,expect*/
- it("construct0", function() {
+ it('construct0', function() {
var v = new Cartesian2();
expect(v.x).toEqual(0);
expect(v.y).toEqual(0);
});
- it("construct1", function() {
+ it('construct1', function() {
var v = new Cartesian2(1);
expect(v.x).toEqual(1);
expect(v.y).toEqual(0);
});
- it("construct2", function() {
+ it('construct2', function() {
var v = new Cartesian2(1, 2);
expect(v.x).toEqual(1);
expect(v.y).toEqual(2);
});
- it("clone", function() {
+ it('clone', function() {
var v = new Cartesian2(1, 2);
var w = v.clone();
expect(v.equals(w)).toEqual(true);
});
- it("non-prototypal clone", function() {
+ it('non-prototypal clone', function() {
var v = new Cartesian2(1, 2);
var w = Cartesian2.clone(v);
expect(v.equals(w)).toEqual(true);
});
- it("ZERO", function() {
+ it('ZERO', function() {
var v = Cartesian2.ZERO;
expect(v.x).toEqual(0);
expect(v.y).toEqual(0);
});
- it("UNIT_X", function() {
+ it('UNIT_X', function() {
var v = Cartesian2.UNIT_X;
expect(v.x).toEqual(1);
expect(v.y).toEqual(0);
});
- it("UNIT_Y", function() {
+ it('UNIT_Y', function() {
var v = Cartesian2.UNIT_Y;
expect(v.x).toEqual(0);
expect(v.y).toEqual(1);
});
- it("magnitudeSquared", function() {
+ it('magnitudeSquared', function() {
var v = new Cartesian2(2, 3);
expect(v.magnitudeSquared()).toEqual(13);
});
- it("magnitude", function() {
+ it('magnitude', function() {
var v = new Cartesian2(2, 3);
expect(v.magnitude()).toEqual(Math.sqrt(13));
});
- it("normalize", function() {
+ it('normalize', function() {
var v = new Cartesian2(2, 0).normalize();
expect(v.x).toEqual(1);
expect(v.y).toEqual(0);
});
- it("dot", function() {
+ it('dot', function() {
var s = new Cartesian2(2, 3).dot(new Cartesian2(4, 5));
expect(s).toEqual(2 * 4 + 3 * 5);
});
- it("add", function() {
+ it('add', function() {
var v = new Cartesian2(1, 2).add(new Cartesian2(3, 4));
expect(v.equals(new Cartesian2(4, 6))).toEqual(true);
});
- it("multiplyWithScalar", function() {
+ it('multiplyWithScalar', function() {
var v = new Cartesian2(1, 2).multiplyWithScalar(2);
expect(v.equals(new Cartesian2(2, 4))).toEqual(true);
});
- it("divideByScalar", function() {
+ it('divideByScalar', function() {
var v = new Cartesian2(2, 4).divideByScalar(2);
expect(v.equals(new Cartesian2(1, 2))).toEqual(true);
});
- it("negate", function() {
+ it('negate', function() {
var v = new Cartesian2(1, 2).negate();
expect(v.equals(new Cartesian2(-1, -2))).toEqual(true);
});
- it("abs", function() {
+ it('abs', function() {
var v = new Cartesian2(-1, -2).abs();
expect(v.equals(new Cartesian2(1, 2))).toEqual(true);
});
- it("subtract", function() {
+ it('subtract', function() {
var v = new Cartesian2(3, 4).subtract(new Cartesian2(2, 1));
expect(v.equals(new Cartesian2(1, 3))).toEqual(true);
});
- it("equalsEpsilon", function() {
+ it('equalsEpsilon', function() {
expect(new Cartesian2(1, 2).equalsEpsilon(new Cartesian2(1, 2), 0)).toEqual(true);
expect(new Cartesian2(1, 2).equalsEpsilon(new Cartesian2(2, 2), 1)).toEqual(true);
expect(new Cartesian2(1, 2).equalsEpsilon(new Cartesian2(3, 2), 1)).toEqual(false);
});
- it("toString", function() {
+ it('toString', function() {
var v = new Cartesian2(1, 2);
- expect(v.toString()).toEqual("(1, 2)");
+ expect(v.toString()).toEqual('(1, 2)');
});
});
diff --git a/Specs/Core/Cartesian3Spec.js b/Specs/Core/Cartesian3Spec.js
index 95992161881..49d3faaeabf 100644
--- a/Specs/Core/Cartesian3Spec.js
+++ b/Specs/Core/Cartesian3Spec.js
@@ -10,179 +10,179 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("construct0", function() {
+ it('construct0', function() {
var v = new Cartesian3();
expect(v.x).toEqual(0);
expect(v.y).toEqual(0);
expect(v.z).toEqual(0);
});
- it("construct1", function() {
+ it('construct1', function() {
var v = new Cartesian3(1);
expect(v.x).toEqual(1);
expect(v.y).toEqual(0);
expect(v.z).toEqual(0);
});
- it("construct2", function() {
+ it('construct2', function() {
var v = new Cartesian3(1, 2);
expect(v.x).toEqual(1);
expect(v.y).toEqual(2);
expect(v.z).toEqual(0);
});
- it("construct3", function() {
+ it('construct3', function() {
var v = new Cartesian3(1, 2, 3);
expect(v.x).toEqual(1);
expect(v.y).toEqual(2);
expect(v.z).toEqual(3);
});
- it("clone", function() {
+ it('clone', function() {
var v = new Cartesian3(1, 2, 3);
var w = v.clone();
expect(v.equals(w)).toEqual(true);
});
- it("ZERO", function() {
+ it('ZERO', function() {
var v = Cartesian3.ZERO;
expect(v.x).toEqual(0);
expect(v.y).toEqual(0);
expect(v.z).toEqual(0);
});
- it("UNIT_X", function() {
+ it('UNIT_X', function() {
var v = Cartesian3.UNIT_X;
expect(v.x).toEqual(1);
expect(v.y).toEqual(0);
expect(v.z).toEqual(0);
});
- it("UNIT_Y", function() {
+ it('UNIT_Y', function() {
var v = Cartesian3.UNIT_Y;
expect(v.x).toEqual(0);
expect(v.y).toEqual(1);
expect(v.z).toEqual(0);
});
- it("UNIT_Z", function() {
+ it('UNIT_Z', function() {
var v = Cartesian3.UNIT_Z;
expect(v.x).toEqual(0);
expect(v.y).toEqual(0);
expect(v.z).toEqual(1);
});
- it("getXY", function() {
+ it('getXY', function() {
var v = new Cartesian3(1, 2, 3);
expect(v.getXY().equals(new Cartesian2(1, 2))).toEqual(true);
expect(v.z).toEqual(3);
});
- it("magnitudeSquared", function() {
+ it('magnitudeSquared', function() {
var v = new Cartesian3(2, 3, 4);
expect(v.magnitudeSquared()).toEqual(29);
});
- it("magnitude", function() {
+ it('magnitude', function() {
var v = new Cartesian3(2, 3, 4);
expect(v.magnitude()).toEqual(Math.sqrt(29));
});
- it("normalize", function() {
+ it('normalize', function() {
var v = new Cartesian3(0, 2, 0).normalize();
expect(v.x).toEqual(0);
expect(v.y).toEqual(1);
expect(v.z).toEqual(0);
});
- it("cross", function() {
+ it('cross', function() {
var c = new Cartesian3(1, 0, 0).cross(new Cartesian3(0, 1, 0));
expect(c.equals(new Cartesian3(0, 0, 1))).toEqual(true);
});
- it("dot", function() {
+ it('dot', function() {
var s = new Cartesian3(2, 3, 4).dot(new Cartesian3(5, 6, 7));
expect(s).toEqual(2 * 5 + 3 * 6 + 4 * 7);
});
- it("add", function() {
+ it('add', function() {
var v = new Cartesian3(1, 2, 3).add(new Cartesian3(4, 5, 6));
expect(v.equals(new Cartesian3(5, 7, 9))).toEqual(true);
});
- it("multiplyWithScalar", function() {
+ it('multiplyWithScalar', function() {
var v = new Cartesian3(1, 2, 3).multiplyWithScalar(2);
expect(v.equals(new Cartesian3(2, 4, 6))).toEqual(true);
});
- it("multiplyComponents", function() {
+ it('multiplyComponents', function() {
var v = new Cartesian3(1, 2, 3).multiplyComponents(new Cartesian3(4, 5, 6));
expect(v.equals(new Cartesian3(4, 10, 18))).toEqual(true);
});
- it("divideByScalar", function() {
+ it('divideByScalar', function() {
var v = new Cartesian3(2, 4, 6).divideByScalar(2);
expect(v.equals(new Cartesian3(1, 2, 3))).toEqual(true);
});
- it("getMinimumComponent", function() {
+ it('getMinimumComponent', function() {
var v = new Cartesian3(1, 2, 3);
expect(v.getMinimumComponent()).toEqual(1);
});
- it("getMaximumComponent", function() {
+ it('getMaximumComponent', function() {
var v = new Cartesian3(1, 2, 3);
expect(v.getMaximumComponent()).toEqual(3);
});
- it("mostOrthogonalAxis", function() {
+ it('mostOrthogonalAxis', function() {
expect(new Cartesian3(1, 2, 3).mostOrthogonalAxis().equals(Cartesian3.UNIT_X)).toEqual(true);
expect(new Cartesian3(3, 1, 2).mostOrthogonalAxis().equals(Cartesian3.UNIT_Y)).toEqual(true);
expect(new Cartesian3(2, 3, 1).mostOrthogonalAxis().equals(Cartesian3.UNIT_Z)).toEqual(true);
});
- it("angleBetween", function() {
+ it('angleBetween', function() {
var x = Cartesian3.UNIT_X;
var y = Cartesian3.UNIT_Y;
expect(x.angleBetween(x)).toEqual(0);
expect(x.angleBetween(y)).toEqual(CesiumMath.PI_OVER_TWO);
});
- it("rotateAroundAxis", function() {
+ it('rotateAroundAxis', function() {
var x = Cartesian3.UNIT_X;
var z = Cartesian3.UNIT_Z;
expect(x.rotateAroundAxis(z, CesiumMath.PI_OVER_TWO).equalsEpsilon(Cartesian3.UNIT_Y, CesiumMath.EPSILON14)).toEqual(true);
expect(x.rotateAroundAxis(z, Math.PI).equalsEpsilon(x.negate(), CesiumMath.EPSILON14)).toEqual(true);
});
- it("negate", function() {
+ it('negate', function() {
var v = new Cartesian3(1, 2, 3).negate();
expect(v.equals(new Cartesian3(-1, -2, -3))).toEqual(true);
});
- it("abs", function() {
+ it('abs', function() {
var v = new Cartesian2(-1, -2, -3).abs();
expect(v.equals(new Cartesian2(1, 2, 3))).toEqual(true);
});
- it("subtract", function() {
+ it('subtract', function() {
var v = new Cartesian3(3, 4, 5).subtract(new Cartesian3(3, 2, 1));
expect(v.equals(new Cartesian3(0, 2, 4))).toEqual(true);
});
- it("lerp", function() {
+ it('lerp', function() {
var v = new Cartesian3(4, 8, 12).lerp(new Cartesian3(8, 20, 16), 0.25);
expect(v.equals(new Cartesian3(5, 11, 13))).toEqual(true);
});
- it("equalsEpsilon", function() {
+ it('equalsEpsilon', function() {
expect(new Cartesian3(1, 2, 1).equalsEpsilon(new Cartesian3(1, 2, 1), 0)).toEqual(true);
expect(new Cartesian3(1, 2, 1).equalsEpsilon(new Cartesian3(1, 2, 2), 1)).toEqual(true);
expect(new Cartesian3(1, 2, 1).equalsEpsilon(new Cartesian3(1, 2, 3), 1)).toEqual(false);
});
- it("toString", function() {
+ it('toString', function() {
var v = new Cartesian3(1, 2, 3);
- expect(v.toString()).toEqual("(1, 2, 3)");
+ expect(v.toString()).toEqual('(1, 2, 3)');
});
});
\ No newline at end of file
diff --git a/Specs/Core/Cartesian4Spec.js b/Specs/Core/Cartesian4Spec.js
index 30fca5d501d..dcca09d0c86 100644
--- a/Specs/Core/Cartesian4Spec.js
+++ b/Specs/Core/Cartesian4Spec.js
@@ -10,7 +10,7 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("construct0", function() {
+ it('construct0', function() {
var v = new Cartesian4();
expect(v.x).toEqual(0);
expect(v.y).toEqual(0);
@@ -18,7 +18,7 @@ defineSuite([
expect(v.w).toEqual(0);
});
- it("construct1", function() {
+ it('construct1', function() {
var v = new Cartesian4(1);
expect(v.x).toEqual(1);
expect(v.y).toEqual(0);
@@ -26,7 +26,7 @@ defineSuite([
expect(v.w).toEqual(0);
});
- it("construct2", function() {
+ it('construct2', function() {
var v = new Cartesian4(1, 2);
expect(v.x).toEqual(1);
expect(v.y).toEqual(2);
@@ -34,7 +34,7 @@ defineSuite([
expect(v.w).toEqual(0);
});
- it("construct3", function() {
+ it('construct3', function() {
var v = new Cartesian4(1, 2, 3);
expect(v.x).toEqual(1);
expect(v.y).toEqual(2);
@@ -42,7 +42,7 @@ defineSuite([
expect(v.w).toEqual(0);
});
- it("construct4", function() {
+ it('construct4', function() {
var v = new Cartesian4(1, 2, 3, 4);
expect(v.x).toEqual(1);
expect(v.y).toEqual(2);
@@ -50,13 +50,13 @@ defineSuite([
expect(v.w).toEqual(4);
});
- it("clone", function() {
+ it('clone', function() {
var v = new Cartesian4(1, 2, 3, 4);
var w = v.clone();
expect(v.equals(w)).toEqual(true);
});
- it("ZERO", function() {
+ it('ZERO', function() {
var v = Cartesian4.ZERO;
expect(v.x).toEqual(0);
expect(v.y).toEqual(0);
@@ -64,7 +64,7 @@ defineSuite([
expect(v.w).toEqual(0);
});
- it("UNIT_X", function() {
+ it('UNIT_X', function() {
var v = Cartesian4.UNIT_X;
expect(v.x).toEqual(1);
expect(v.y).toEqual(0);
@@ -72,7 +72,7 @@ defineSuite([
expect(v.w).toEqual(0);
});
- it("UNIT_Y", function() {
+ it('UNIT_Y', function() {
var v = Cartesian4.UNIT_Y;
expect(v.x).toEqual(0);
expect(v.y).toEqual(1);
@@ -80,7 +80,7 @@ defineSuite([
expect(v.w).toEqual(0);
});
- it("UNIT_Z", function() {
+ it('UNIT_Z', function() {
var v = Cartesian4.UNIT_Z;
expect(v.x).toEqual(0);
expect(v.y).toEqual(0);
@@ -88,7 +88,7 @@ defineSuite([
expect(v.w).toEqual(0);
});
- it("UNIT_W", function() {
+ it('UNIT_W', function() {
var v = Cartesian4.UNIT_W;
expect(v.x).toEqual(0);
expect(v.y).toEqual(0);
@@ -96,30 +96,30 @@ defineSuite([
expect(v.w).toEqual(1);
});
- it("getXYZ", function() {
+ it('getXYZ', function() {
var v = new Cartesian4(1, 2, 3, 4);
expect(v.getXYZ().equals(new Cartesian3(1, 2, 3))).toEqual(true);
expect(v.w).toEqual(4);
});
- it("getXY", function() {
+ it('getXY', function() {
var v = new Cartesian4(1, 2, 3, 4);
expect(v.getXY().equals(new Cartesian2(1, 2))).toEqual(true);
expect(v.z).toEqual(3);
expect(v.w).toEqual(4);
});
- it("magnitudeSquared", function() {
+ it('magnitudeSquared', function() {
var v = new Cartesian4(2, 3, 4, 5);
expect(v.magnitudeSquared()).toEqual(54);
});
- it("magnitude", function() {
+ it('magnitude', function() {
var v = new Cartesian4(2, 3, 4, 5);
expect(v.magnitude()).toEqual(Math.sqrt(54));
});
- it("normalize", function() {
+ it('normalize', function() {
var v = new Cartesian4(0, 2, 0, 0).normalize();
expect(v.x).toEqual(0);
expect(v.y).toEqual(1);
@@ -127,71 +127,71 @@ defineSuite([
expect(v.w).toEqual(0);
});
- it("dot", function() {
+ it('dot', function() {
var s = new Cartesian4(2, 3, 4, 5).dot(new Cartesian4(6, 7, 8, 9));
expect(s).toEqual(2 * 6 + 3 * 7 + 4 * 8 + 5 * 9);
});
- it("add", function() {
+ it('add', function() {
var v = new Cartesian4(1, 2, 3, 4).add(new Cartesian4(5, 6, 7, 8));
expect(v.equals(new Cartesian4(6, 8, 10, 12))).toEqual(true);
});
- it("multiplyWithScalar", function() {
+ it('multiplyWithScalar', function() {
var v = new Cartesian4(1, 2, 3, 4).multiplyWithScalar(2);
expect(v.equals(new Cartesian4(2, 4, 6, 8))).toEqual(true);
});
- it("multiplyComponents", function() {
+ it('multiplyComponents', function() {
var v = new Cartesian4(1, 2, 3, 4).multiplyComponents(new Cartesian4(5, 6, 7, 8));
expect(v.equals(new Cartesian4(5, 12, 21, 32))).toEqual(true);
});
- it("divideByScalar", function() {
+ it('divideByScalar', function() {
var v = new Cartesian4(2, 4, 6, 8).divideByScalar(2);
expect(v.equals(new Cartesian4(1, 2, 3, 4))).toEqual(true);
});
- it("getMinimumComponent", function() {
+ it('getMinimumComponent', function() {
var v = new Cartesian4(1, 2, 3, 4);
expect(v.getMinimumComponent()).toEqual(1);
});
- it("getMaximumComponent", function() {
+ it('getMaximumComponent', function() {
var v = new Cartesian4(1, 2, 3, 4);
expect(v.getMaximumComponent()).toEqual(4);
});
- it("mostOrthogonalAxis", function() {
+ it('mostOrthogonalAxis', function() {
expect(new Cartesian4(1, 2, 3, 4).mostOrthogonalAxis().equals(Cartesian4.UNIT_X)).toEqual(true);
expect(new Cartesian4(4, 1, 2, 3).mostOrthogonalAxis().equals(Cartesian4.UNIT_Y)).toEqual(true);
expect(new Cartesian4(3, 4, 1, 2).mostOrthogonalAxis().equals(Cartesian4.UNIT_Z)).toEqual(true);
expect(new Cartesian4(2, 3, 4, 1).mostOrthogonalAxis().equals(Cartesian4.UNIT_W)).toEqual(true);
});
- it("negate", function() {
+ it('negate', function() {
var v = new Cartesian4(1, 2, 3, 4).negate();
expect(v.equals(new Cartesian4(-1, -2, -3, -4))).toEqual(true);
});
- it("abs", function() {
+ it('abs', function() {
var v = new Cartesian4(-1, -2, -3, -4).abs();
expect(v.equals(new Cartesian4(1, 2, 3, 4))).toEqual(true);
});
- it("subtract", function() {
+ it('subtract', function() {
var v = new Cartesian4(4, 5, 6, 7).subtract(new Cartesian4(4, 3, 2, 1));
expect(v.equals(new Cartesian4(0, 2, 4, 6))).toEqual(true);
});
- it("equalsEpsilon", function() {
+ it('equalsEpsilon', function() {
expect(new Cartesian4(1, 1, 2, 1).equalsEpsilon(new Cartesian4(1, 1, 2, 1), 0)).toEqual(true);
expect(new Cartesian4(1, 1, 2, 1).equalsEpsilon(new Cartesian4(1, 1, 2, 2), 1)).toEqual(true);
expect(new Cartesian4(1, 1, 2, 1).equalsEpsilon(new Cartesian4(1, 1, 2, 3), 1)).toEqual(false);
});
- it("toString", function() {
+ it('toString', function() {
var v = new Cartesian4(1, 2, 3, 4);
- expect(v.toString()).toEqual("(1, 2, 3, 4)");
+ expect(v.toString()).toEqual('(1, 2, 3, 4)');
});
});
\ No newline at end of file
diff --git a/Specs/Core/Cartographic2Spec.js b/Specs/Core/Cartographic2Spec.js
index 36b800cbd48..da63c0c0839 100644
--- a/Specs/Core/Cartographic2Spec.js
+++ b/Specs/Core/Cartographic2Spec.js
@@ -8,31 +8,31 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("construct0", function() {
+ it('construct0', function() {
var c = new Cartographic2();
expect(c.longitude).toEqual(0);
expect(c.latitude).toEqual(0);
});
- it("construct1", function() {
+ it('construct1', function() {
var c = new Cartographic2(new Cartographic3(1, 2, 3));
expect(c.longitude).toEqual(1);
expect(c.latitude).toEqual(2);
});
- it("construct2", function() {
+ it('construct2', function() {
var c = new Cartographic2(1, 2);
expect(c.longitude).toEqual(1);
expect(c.latitude).toEqual(2);
});
- it("getZero", function() {
+ it('getZero', function() {
var c = Cartographic2.ZERO;
expect(c.longitude).toEqual(0);
expect(c.latitude).toEqual(0);
});
- it("clones itself", function() {
+ it('clones itself', function() {
var c = new Cartographic2(0, 1);
var c2 = c.clone();
expect(c.equals(c2)).toEqual(true);
@@ -41,14 +41,14 @@ defineSuite([
expect(c.equals(c2)).toEqual(false);
});
- it("equalsEpsilon", function() {
+ it('equalsEpsilon', function() {
expect(new Cartographic2(1, 2).equalsEpsilon(new Cartographic2(1, 2), 0)).toEqual(true);
expect(new Cartographic2(1, 2).equalsEpsilon(new Cartographic2(2, 2), 1)).toEqual(true);
expect(new Cartographic2(1, 2).equalsEpsilon(new Cartographic2(3, 2), 1)).toEqual(false);
});
- it("toString", function() {
+ it('toString', function() {
var c = new Cartographic2(1, 2);
- expect(c.toString()).toEqual("(1, 2)");
+ expect(c.toString()).toEqual('(1, 2)');
});
});
diff --git a/Specs/Core/Cartographic3Spec.js b/Specs/Core/Cartographic3Spec.js
index 64b065a7067..02b829ff494 100644
--- a/Specs/Core/Cartographic3Spec.js
+++ b/Specs/Core/Cartographic3Spec.js
@@ -8,42 +8,42 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("construct0", function() {
+ it('construct0', function() {
var c = new Cartographic3();
expect(c.longitude).toEqual(0);
expect(c.latitude).toEqual(0);
expect(c.height).toEqual(0);
});
- it("construct1", function() {
+ it('construct1', function() {
var c = new Cartographic3(new Cartographic2(1, 2));
expect(c.longitude).toEqual(1);
expect(c.latitude).toEqual(2);
expect(c.height).toEqual(0);
});
- it("construct2", function() {
+ it('construct2', function() {
var c = new Cartographic3(1, 2);
expect(c.longitude).toEqual(1);
expect(c.latitude).toEqual(2);
expect(c.height).toEqual(0);
});
- it("construct3", function() {
+ it('construct3', function() {
var c = new Cartographic3(1, 2, 3);
expect(c.longitude).toEqual(1);
expect(c.latitude).toEqual(2);
expect(c.height).toEqual(3);
});
- it("getZero", function() {
+ it('getZero', function() {
var c = Cartographic3.ZERO;
expect(c.longitude).toEqual(0);
expect(c.latitude).toEqual(0);
expect(c.height).toEqual(0);
});
- it("clones itself", function() {
+ it('clones itself', function() {
var c = new Cartographic3(0, 1, 2);
var c2 = c.clone();
expect(c.equals(c2)).toEqual(true);
@@ -52,14 +52,14 @@ defineSuite([
expect(c.equals(c2)).toEqual(false);
});
- it("equalsEpsilon", function() {
+ it('equalsEpsilon', function() {
expect(new Cartographic3(0, 2, 1).equalsEpsilon(new Cartographic3(0, 2, 1), 0)).toEqual(true);
expect(new Cartographic3(0, 2, 1).equalsEpsilon(new Cartographic3(0, 2, 2), 1)).toEqual(true);
expect(new Cartographic3(0, 2, 1).equalsEpsilon(new Cartographic3(0, 2, 3), 1)).toEqual(false);
});
- it("toString", function() {
+ it('toString', function() {
var c = new Cartographic3(1, 2, 3);
- expect(c.toString()).toEqual("(1, 2, 3)");
+ expect(c.toString()).toEqual('(1, 2, 3)');
});
});
diff --git a/Specs/Core/CatmullRomSplineSpec.js b/Specs/Core/CatmullRomSplineSpec.js
index 5d0b9dc8f75..cb8b4c255a1 100644
--- a/Specs/Core/CatmullRomSplineSpec.js
+++ b/Specs/Core/CatmullRomSplineSpec.js
@@ -29,7 +29,7 @@ defineSuite([
}];
});
- it("constructor throws an exception with invalid control points", function() {
+ it('constructor throws an exception with invalid control points', function() {
expect(function() {
return new CatmullRomSpline();
}).toThrow();
@@ -43,12 +43,12 @@ defineSuite([
}).toThrow();
});
- it("get control points", function() {
+ it('get control points', function() {
var crs = new CatmullRomSpline(points);
expect(crs.getControlPoints()).toEqual(points);
});
- it("get start and end tangents", function() {
+ it('get start and end tangents', function() {
var start = points[1].point.subtract(points[0].point);
var end = points[points.length - 1].point.subtract(points[points.length - 2].point);
var crs = new CatmullRomSpline(points, start, end);
@@ -57,7 +57,7 @@ defineSuite([
expect(end.equals(crs.getEndTangent())).toEqual(true);
});
- it("evaluate fails with undefined time", function() {
+ it('evaluate fails with undefined time', function() {
var crs = new CatmullRomSpline(points);
expect(function() {
@@ -65,7 +65,7 @@ defineSuite([
}).toThrow();
});
- it("evaluate fails with time out of range", function() {
+ it('evaluate fails with time out of range', function() {
var crs = new CatmullRomSpline(points);
expect(function() {
@@ -77,7 +77,7 @@ defineSuite([
}).toThrow();
});
- it("check Catmull-Rom spline against a Hermite spline", function() {
+ it('check Catmull-Rom spline against a Hermite spline', function() {
var crs = new CatmullRomSpline(points);
points[0].tangent = crs.getStartTangent();
diff --git a/Specs/Core/CubeMapEllipsoidTessellatorSpec.js b/Specs/Core/CubeMapEllipsoidTessellatorSpec.js
index e57a26c61aa..8f7d41b30e7 100644
--- a/Specs/Core/CubeMapEllipsoidTessellatorSpec.js
+++ b/Specs/Core/CubeMapEllipsoidTessellatorSpec.js
@@ -12,27 +12,27 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("compute0", function() {
+ it('compute0', function() {
expect(function() {
return CubeMapEllipsoidTessellator.compute(Ellipsoid.UNIT_SPHERE, -1);
}).toThrow();
});
- it("compute1", function() {
+ it('compute1', function() {
var m = CubeMapEllipsoidTessellator.compute(Ellipsoid.UNIT_SPHERE, 1);
expect(m.attributes.position.values.length).toEqual(3 * 8);
expect(m.indexLists[0].values.length).toEqual(12 * 3);
});
- it("compute2", function() {
+ it('compute2', function() {
var m = CubeMapEllipsoidTessellator.compute(Ellipsoid.UNIT_SPHERE, 2);
expect(m.attributes.position.values.length).toEqual(3 * (8 + 6 + 12));
expect(m.indexLists[0].values.length).toEqual(2 * 3 * 4 * 6);
});
- it("compute3", function() {
+ it('compute3', function() {
var m = CubeMapEllipsoidTessellator.compute(Ellipsoid.UNIT_SPHERE, 3);
var position = m.attributes.position.values;
diff --git a/Specs/Core/EllipsoidSpec.js b/Specs/Core/EllipsoidSpec.js
index 3f20a723e0b..6d45b0a42ff 100644
--- a/Specs/Core/EllipsoidSpec.js
+++ b/Specs/Core/EllipsoidSpec.js
@@ -14,7 +14,7 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("construct", function() {
+ it('construct', function() {
var e = new Ellipsoid(new Cartesian3(1, 2, 3));
expect(e.getRadii().equals(new Cartesian3(1, 2, 3))).toEqual(true);
@@ -23,13 +23,13 @@ defineSuite([
expect(e.getOneOverRadiiSquared().equals(new Cartesian3(1 / (1 * 1), 1 / (2 * 2), 1 / (3 * 3)))).toEqual(true);
});
- it("throws with no arguments", function() {
+ it('throws with no arguments', function() {
expect(function() {
return new Ellipsoid();
}).toThrow();
});
- it("throws with negative radii componenets", function() {
+ it('throws with negative radii componenets', function() {
expect(function() {
return new Ellipsoid({
x: -1,
@@ -39,30 +39,30 @@ defineSuite([
}).toThrow();
});
- it("getMinimumRadius", function() {
+ it('getMinimumRadius', function() {
expect(new Ellipsoid(new Cartesian3(1, 2, 3)).getMinimumRadius()).toEqual(1);
});
- it("getMaximumRadius", function() {
+ it('getMaximumRadius', function() {
expect(new Ellipsoid(new Cartesian3(1, 2, 3)).getMaximumRadius()).toEqual(3);
});
- it("geocentricSurfaceNormal", function() {
+ it('geocentricSurfaceNormal', function() {
var v = new Cartesian3(1, 2, 3);
expect(v.normalize().equals(Ellipsoid.geocentricSurfaceNormal(v))).toEqual(true);
});
- it("geodeticSurfaceNormal", function() {
+ it('geodeticSurfaceNormal', function() {
expect(Cartesian3.UNIT_X.equals(Ellipsoid.UNIT_SPHERE.geodeticSurfaceNormal(Cartesian3.UNIT_X))).toEqual(true);
expect(Cartesian3.UNIT_Z.equals(Ellipsoid.UNIT_SPHERE.geodeticSurfaceNormal(Cartesian3.UNIT_Z))).toEqual(true);
});
- it("geodeticSurfaceNormalc", function() {
+ it('geodeticSurfaceNormalc', function() {
expect(Cartesian3.UNIT_X.equalsEpsilon(Ellipsoid.UNIT_SPHERE.geodeticSurfaceNormalc(Cartographic3.ZERO), CesiumMath.EPSILON10)).toEqual(true);
expect(Cartesian3.UNIT_Z.equalsEpsilon(Ellipsoid.UNIT_SPHERE.geodeticSurfaceNormalc(new Cartographic3(0, CesiumMath.PI_OVER_TWO, 0)), CesiumMath.EPSILON10)).toEqual(true);
});
- it("toCartesian", function() {
+ it('toCartesian', function() {
var ellipsoid = new Ellipsoid(new Cartesian3(1, 1, 0.7));
expect(Cartesian3.UNIT_X.equalsEpsilon(ellipsoid.toCartesian(new Cartographic2(0, 0)), CesiumMath.EPSILON10)).toEqual(true);
@@ -72,7 +72,7 @@ defineSuite([
expect(new Cartesian3(0, 0, 0.7).equalsEpsilon(ellipsoid.toCartesian(new Cartographic2(0, CesiumMath.toRadians(90))), CesiumMath.EPSILON10)).toEqual(true);
});
- it("toCartesian", function() {
+ it('toCartesian', function() {
var ellipsoid = new Ellipsoid(new Cartesian3(1, 1, 0.7));
expect(new Cartesian3(2, 0, 0).equalsEpsilon(ellipsoid.toCartesian(new Cartographic3(0, 0, 1)), CesiumMath.EPSILON10)).toEqual(true);
@@ -82,7 +82,7 @@ defineSuite([
expect(new Cartesian3(0, 0, 1.7).equalsEpsilon(ellipsoid.toCartesian(new Cartographic3(0, CesiumMath.toRadians(90), 1)), CesiumMath.EPSILON10)).toEqual(true);
});
- it("toCartesians", function() {
+ it('toCartesians', function() {
var ellipsoid = new Ellipsoid(new Cartesian3(1, 1, 0.7));
var cartographics = [new Cartographic3(0, 0, 1),
new Cartographic3(CesiumMath.toRadians(90), 0, 1),
@@ -93,7 +93,7 @@ defineSuite([
expect(cartesians[2].equalsEpsilon(new Cartesian3(0, 0, 1.7), CesiumMath.EPSILON10)).toEqual(true);
});
- it("toCartographic3", function() {
+ it('toCartographic3', function() {
var ellipsoid = Ellipsoid.WGS84;
expect(Cartographic3.ZERO.equalsEpsilon(ellipsoid.toCartographic3(ellipsoid.toCartesian(Cartographic3.ZERO)), CesiumMath.EPSILON8)).toEqual(true);
@@ -105,7 +105,7 @@ defineSuite([
expect(p2.equalsEpsilon(ellipsoid.toCartographic3(ellipsoid.toCartesian(p2)), CesiumMath.EPSILON3)).toEqual(true);
});
- it("toCartographic3s", function() {
+ it('toCartographic3s', function() {
var ellipsoid = Ellipsoid.WGS84;
var p1 = Cartographic3.ZERO;
var p2 = new Cartographic3(CesiumMath.toRadians(45), CesiumMath.toRadians(-60), -123.4);
@@ -119,7 +119,7 @@ defineSuite([
expect(cartographics[2].equalsEpsilon(p3, CesiumMath.EPSILON9)).toEqual(true);
});
- it("toCartographic2", function() {
+ it('toCartographic2', function() {
var unitSphere = Ellipsoid.UNIT_SPHERE;
expect(Cartographic2.ZERO.equalsEpsilon(unitSphere.toCartographic2(Cartesian3.UNIT_X), CesiumMath.EPSILON8)).toEqual(true);
@@ -127,7 +127,7 @@ defineSuite([
expect(new Cartographic2(0, CesiumMath.PI_OVER_TWO).equalsEpsilon(unitSphere.toCartographic2(Cartesian3.UNIT_Z), CesiumMath.EPSILON8)).toEqual(true);
});
- it("can convert cartographicDegrees to Cartesian", function() {
+ it('can convert cartographicDegrees to Cartesian', function() {
var ellipsoid = Ellipsoid.WGS84;
var lon = 45, lat = -60, height = 123.4;
@@ -141,13 +141,13 @@ defineSuite([
expect(expected[0].equalsEpsilon(actual[0], CesiumMath.EPSILON8)).toEqual(true);
});
- it("scaleToGeocentricSurface", function() {
+ it('scaleToGeocentricSurface', function() {
var unitSphere = Ellipsoid.UNIT_SPHERE;
expect(Cartesian3.UNIT_X.equalsEpsilon(unitSphere.scaleToGeocentricSurface(new Cartesian3(0.5, 0, 0)), CesiumMath.EPSILON8)).toEqual(true);
});
- it("scaleToGeodeticSurface", function() {
+ it('scaleToGeodeticSurface', function() {
var unitSphere = Ellipsoid.UNIT_SPHERE;
expect(Cartesian3.UNIT_X.equalsEpsilon(unitSphere.scaleToGeodeticSurface(new Cartesian3(0.5, 0, 0)), CesiumMath.EPSILON8)).toEqual(true);
@@ -155,13 +155,13 @@ defineSuite([
expect(Cartesian3.UNIT_X.equalsEpsilon(unitSphere.scaleToGeodeticSurface(new Cartesian3(3, 0, 0)), CesiumMath.EPSILON8)).toEqual(true);
});
- it("equals another ellipsoid", function() {
+ it('equals another ellipsoid', function() {
var e0 = new Ellipsoid(new Cartesian3(1, 2, 3));
var e1 = new Ellipsoid(new Cartesian3(1, 2, 3));
expect(e0.equals(e1)).toEqual(true);
});
- it("doesn't equal another ellipsoid", function() {
+ it('does not equal another ellipsoid', function() {
var e0 = new Ellipsoid(new Cartesian3(1, 2, 3));
var e1 = new Ellipsoid(new Cartesian3(4, 5, 6));
expect(e0.equals(e1)).toEqual(false);
diff --git a/Specs/Core/EllipsoidTangentPlaneSpec.js b/Specs/Core/EllipsoidTangentPlaneSpec.js
index 808c152005e..194a7483ea1 100644
--- a/Specs/Core/EllipsoidTangentPlaneSpec.js
+++ b/Specs/Core/EllipsoidTangentPlaneSpec.js
@@ -12,7 +12,7 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("projectPointsOntoEllipsoid", function () {
+ it('projectPointsOntoEllipsoid', function () {
var ellipsoid = Ellipsoid.UNIT_SPHERE;
var tangentPlane = new EllipsoidTangentPlane(ellipsoid, new Cartesian3(1, 0, 0));
var positions = [new Cartesian3(2, -2, 0),
@@ -22,7 +22,7 @@ defineSuite([
expect(results[1].equalsEpsilon(new Cartesian3(1/3, 2/3, 2/3), CesiumMath.EPSILON10)).toEqual(true);
});
- it("projectPointsOntoEllipsoid throws without positions", function () {
+ it('projectPointsOntoEllipsoid throws without positions', function () {
var ellipsoid = Ellipsoid.UNIT_SPHERE;
var tangentPlane = new EllipsoidTangentPlane(ellipsoid, new Cartesian3(1, 0, 0));
expect(function() {
diff --git a/Specs/Core/EventHandlerSpec.js b/Specs/Core/EventHandlerSpec.js
index 95512bac11b..bf107d5ed83 100644
--- a/Specs/Core/EventHandlerSpec.js
+++ b/Specs/Core/EventHandlerSpec.js
@@ -38,8 +38,8 @@ defineSuite([
};
MockDoc.prototype.addEventListener = function(name, callback, bubble) {
- if (name === "DOMMouseScroll") {
- name = "mousewheel";
+ if (name === 'DOMMouseScroll') {
+ name = 'mousewheel';
}
if (this._callbacks[name]) {
@@ -48,8 +48,8 @@ defineSuite([
};
MockDoc.prototype.removeEventListener = function(name, callback) {
- if (name === "DOMMouseScroll") {
- name = "mousewheel";
+ if (name === 'DOMMouseScroll') {
+ name = 'mousewheel';
}
var callbacks = this._callbacks[name];
@@ -105,57 +105,57 @@ defineSuite([
handler = !handler.isDestroyed() && handler.destroy();
});
- it("setting key events require an action", function() {
+ it('setting key events require an action', function() {
expect(function() {
handler.setKeyAction();
}).toThrow();
});
- it("setting key events require a key", function() {
+ it('setting key events require a key', function() {
expect(function() {
handler.setKeyAction(function() {
});
}).toThrow();
});
- it("getting key events require a key", function() {
+ it('getting key events require a key', function() {
expect(function() {
handler.getKeyAction();
}).toThrow();
});
- it("removing key events require a key", function() {
+ it('removing key events require a key', function() {
expect(function() {
handler.removeKeyAction();
}).toThrow();
});
- it("setting mouse events require an action", function() {
+ it('setting mouse events require an action', function() {
expect(function() {
handler.setMouseAction();
}).toThrow();
});
- it("setting mouse events require a type", function() {
+ it('setting mouse events require a type', function() {
expect(function() {
handler.setMouseAction(function() {
});
}).toThrow();
});
- it("getting mouse events require a type", function() {
+ it('getting mouse events require a type', function() {
expect(function() {
handler.getMouseAction();
}).toThrow();
});
- it("removing mouse events require a type", function() {
+ it('removing mouse events require a type', function() {
expect(function() {
handler.removeMouseAction();
}).toThrow();
});
- it("key events", function() {
+ it('key events', function() {
var keyPressed = false;
var keyPressedFunction = function() {
@@ -163,7 +163,7 @@ defineSuite([
};
handler.setKeyAction(keyPressedFunction, 'a');
- element.fireEvents("keydown", {
+ element.fireEvents('keydown', {
keyCode : 'a'.charCodeAt(0)
});
expect(keyPressed).toEqual(true);
@@ -171,14 +171,14 @@ defineSuite([
expect(handler.getKeyAction('a') === keyPressedFunction).toEqual(true);
handler.removeKeyAction('a');
- element.fireEvents("keyDown", {
+ element.fireEvents('keyDown', {
keyCode : 'a'.charCodeAt(0)
});
expect(keyPressed).toEqual(true);
});
- it("modified key events", function() {
+ it('modified key events', function() {
var modifiedKeyPressed = false;
var modfiedKeyPressedFunction = function() {
@@ -186,7 +186,7 @@ defineSuite([
};
handler.setKeyAction(modfiedKeyPressedFunction, 'b', EventModifier.CTRL);
- element.fireEvents("keydown", {
+ element.fireEvents('keydown', {
keyCode : 'b'.charCodeAt(0),
ctrlKey : true
});
@@ -195,7 +195,7 @@ defineSuite([
expect(handler.getKeyAction('b', EventModifier.CTRL) === modfiedKeyPressedFunction).toEqual(true);
handler.removeKeyAction('b', EventModifier.CTRL);
- element.fireEvents("keyDown", {
+ element.fireEvents('keyDown', {
keyCode : 'b'.charCodeAt(0),
ctrlKey : true
});
@@ -203,7 +203,7 @@ defineSuite([
expect(modifiedKeyPressed).toEqual(true);
});
- it("mouse right down", function() {
+ it('mouse right down', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -212,7 +212,7 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.RIGHT_DOWN);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 2,
clientX : 1,
clientY : 1
@@ -222,7 +222,7 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.RIGHT_DOWN) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.RIGHT_DOWN);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 2,
clientX : 2,
clientY : 2
@@ -231,7 +231,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("mouse right up", function() {
+ it('mouse right up', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -240,7 +240,7 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.RIGHT_UP);
- element.fireEvents("mouseup", {
+ element.fireEvents('mouseup', {
button : 2,
clientX : 1,
clientY : 1
@@ -250,7 +250,7 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.RIGHT_UP) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.RIGHT_UP);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 2,
clientX : 2,
clientY : 2
@@ -259,7 +259,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("mouse right click", function() {
+ it('mouse right click', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -268,12 +268,12 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.RIGHT_CLICK);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 2,
clientX : 1,
clientY : 1
});
- element.fireEvents("mouseup", {
+ element.fireEvents('mouseup', {
button : 2,
clientX : 1,
clientY : 1
@@ -283,12 +283,12 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.RIGHT_CLICK) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.RIGHT_CLICK);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 2,
clientX : 2,
clientY : 2
});
- element.fireEvents("mouseup", {
+ element.fireEvents('mouseup', {
button : 2,
clientX : 2,
clientY : 2
@@ -297,7 +297,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("mouse left down", function() {
+ it('mouse left down', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -306,7 +306,7 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.LEFT_DOWN);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 0,
clientX : 1,
clientY : 1
@@ -316,7 +316,7 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.LEFT_DOWN) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.LEFT_DOWN);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 0,
clientX : 2,
clientY : 2
@@ -325,7 +325,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("mouse left up", function() {
+ it('mouse left up', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -334,7 +334,7 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.LEFT_UP);
- element.fireEvents("mouseup", {
+ element.fireEvents('mouseup', {
button : 0,
clientX : 1,
clientY : 1
@@ -344,7 +344,7 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.LEFT_UP) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.LEFT_UP);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 0,
clientX : 2,
clientY : 2
@@ -353,7 +353,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("mouse left click", function() {
+ it('mouse left click', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -362,12 +362,12 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.LEFT_CLICK);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 0,
clientX : 1,
clientY : 1
});
- element.fireEvents("mouseup", {
+ element.fireEvents('mouseup', {
button : 0,
clientX : 1,
clientY : 1
@@ -377,12 +377,12 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.LEFT_CLICK) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.LEFT_CLICK);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 0,
clientX : 2,
clientY : 2
});
- element.fireEvents("mouseup", {
+ element.fireEvents('mouseup', {
button : 0,
clientX : 2,
clientY : 2
@@ -391,7 +391,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("mouse middle down", function() {
+ it('mouse middle down', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -400,7 +400,7 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.MIDDLE_DOWN);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 1,
clientX : 1,
clientY : 1
@@ -410,7 +410,7 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.MIDDLE_DOWN) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.MIDDLE_DOWN);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 1,
clientX : 2,
clientY : 2
@@ -419,7 +419,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("mouse middle up", function() {
+ it('mouse middle up', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -428,7 +428,7 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.MIDDLE_UP);
- element.fireEvents("mouseup", {
+ element.fireEvents('mouseup', {
button : 1,
clientX : 1,
clientY : 1
@@ -438,7 +438,7 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.MIDDLE_UP) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.MIDDLE_UP);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 1,
clientX : 2,
clientY : 2
@@ -447,7 +447,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("mouse middle click", function() {
+ it('mouse middle click', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -456,12 +456,12 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.MIDDLE_CLICK);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 1,
clientX : 1,
clientY : 1
});
- element.fireEvents("mouseup", {
+ element.fireEvents('mouseup', {
button : 1,
clientX : 1,
clientY : 1
@@ -471,12 +471,12 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.MIDDLE_CLICK) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.MIDDLE_CLICK);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 1,
clientX : 2,
clientY : 2
});
- element.fireEvents("mouseup", {
+ element.fireEvents('mouseup', {
button : 1,
clientX : 2,
clientY : 2
@@ -485,7 +485,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("mouse left double click", function() {
+ it('mouse left double click', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -494,7 +494,7 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.LEFT_DOUBLE_CLICK);
- element.fireEvents("dblclick", {
+ element.fireEvents('dblclick', {
button : 0,
clientX : 1,
clientY : 1
@@ -504,7 +504,7 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.LEFT_DOUBLE_CLICK) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.LEFT_DOUBLE_CLICK);
- element.fireEvents("dblclick", {
+ element.fireEvents('dblclick', {
button : 0,
clientX : 2,
clientY : 2
@@ -513,7 +513,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("mouse right double click", function() {
+ it('mouse right double click', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -522,7 +522,7 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.RIGHT_DOUBLE_CLICK);
- element.fireEvents("dblclick", {
+ element.fireEvents('dblclick', {
button : 2,
clientX : 1,
clientY : 1
@@ -532,7 +532,7 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.RIGHT_DOUBLE_CLICK) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.RIGHT_DOUBLE_CLICK);
- element.fireEvents("dblclick", {
+ element.fireEvents('dblclick', {
button : 2,
clientX : 2,
clientY : 2
@@ -541,7 +541,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("mouse middle double click", function() {
+ it('mouse middle double click', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -550,7 +550,7 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.MIDDLE_DOUBLE_CLICK);
- element.fireEvents("dblclick", {
+ element.fireEvents('dblclick', {
button : 1,
clientX : 1,
clientY : 1
@@ -560,7 +560,7 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.MIDDLE_DOUBLE_CLICK) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.MIDDLE_DOUBLE_CLICK);
- element.fireEvents("dblclick", {
+ element.fireEvents('dblclick', {
button : 1,
clientX : 2,
clientY : 2
@@ -569,7 +569,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("mouse move", function() {
+ it('mouse move', function() {
var actualMove = {
startPosition : new Cartesian2(0, 0),
endPosition : new Cartesian2(0, 0)
@@ -585,12 +585,12 @@ defineSuite([
};
handler.setMouseAction(mouseMove, MouseEventType.MOVE);
- element.fireEvents("mousemove", {
+ element.fireEvents('mousemove', {
button : 1,
clientX : 1,
clientY : 1
});
- element.fireEvents("mousemove", {
+ element.fireEvents('mousemove', {
button : 1,
clientX : 2,
clientY : 2
@@ -600,12 +600,12 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.MOVE) === mouseMove).toEqual(true);
handler.removeMouseAction(MouseEventType.MOVE);
- element.fireEvents("mousemove", {
+ element.fireEvents('mousemove', {
button : 1,
clientX : 2,
clientY : 2
});
- element.fireEvents("mousemove", {
+ element.fireEvents('mousemove', {
button : 1,
clientX : 3,
clientY : 3
@@ -614,7 +614,7 @@ defineSuite([
expect(actualMove).toEqual(expectedMove);
});
- it("mouse wheel", function() {
+ it('mouse wheel', function() {
var actualDelta = 0;
var expectedDelta = -120;
@@ -623,7 +623,7 @@ defineSuite([
};
handler.setMouseAction(mouseWheel, MouseEventType.WHEEL);
- element.fireEvents("mousewheel", {
+ element.fireEvents('mousewheel', {
wheelDelta : -120
});
expect(actualDelta).toEqual(expectedDelta);
@@ -631,14 +631,14 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.WHEEL) === mouseWheel).toEqual(true);
handler.removeMouseAction(MouseEventType.WHEEL);
- element.fireEvents("mousewheel", {
+ element.fireEvents('mousewheel', {
wheelDelta : -360
});
expect(actualDelta).toEqual(expectedDelta);
});
- it("modified mouse right down", function() {
+ it('modified mouse right down', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -647,7 +647,7 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.RIGHT_DOWN, EventModifier.SHIFT);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 2,
clientX : 1,
clientY : 1,
@@ -658,7 +658,7 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.RIGHT_DOWN, EventModifier.SHIFT) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.RIGHT_DOWN, EventModifier.SHIFT);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 2,
clientX : 2,
clientY : 2,
@@ -668,7 +668,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("modified mouse right up", function() {
+ it('modified mouse right up', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -677,7 +677,7 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.RIGHT_UP, EventModifier.SHIFT);
- element.fireEvents("mouseup", {
+ element.fireEvents('mouseup', {
button : 2,
clientX : 1,
clientY : 1,
@@ -688,7 +688,7 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.RIGHT_UP, EventModifier.SHIFT) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.RIGHT_UP, EventModifier.SHIFT);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 2,
clientX : 2,
clientY : 2,
@@ -698,7 +698,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("modified mouse right click", function() {
+ it('modified mouse right click', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -707,13 +707,13 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.RIGHT_CLICK, EventModifier.SHIFT);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 2,
clientX : 1,
clientY : 1,
shiftKey : true
});
- element.fireEvents("mouseup", {
+ element.fireEvents('mouseup', {
button : 2,
clientX : 1,
clientY : 1,
@@ -724,13 +724,13 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.RIGHT_CLICK, EventModifier.SHIFT) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.RIGHT_CLICK, EventModifier.SHIFT);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 2,
clientX : 2,
clientY : 2,
shiftKey : true
});
- element.fireEvents("mouseup", {
+ element.fireEvents('mouseup', {
button : 2,
clientX : 2,
clientY : 2,
@@ -740,7 +740,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("modified mouse left down", function() {
+ it('modified mouse left down', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -749,7 +749,7 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.LEFT_DOWN, EventModifier.ALT);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 0,
clientX : 1,
clientY : 1,
@@ -760,7 +760,7 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.LEFT_DOWN, EventModifier.ALT) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.LEFT_DOWN, EventModifier.ALT);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 0,
clientX : 2,
clientY : 2,
@@ -770,7 +770,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("modified mouse left up", function() {
+ it('modified mouse left up', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -779,7 +779,7 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.LEFT_UP, EventModifier.ALT);
- element.fireEvents("mouseup", {
+ element.fireEvents('mouseup', {
button : 0,
clientX : 1,
clientY : 1,
@@ -790,7 +790,7 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.LEFT_UP, EventModifier.ALT) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.LEFT_UP, EventModifier.ALT);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 0,
clientX : 2,
clientY : 2,
@@ -800,7 +800,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("modified mouse left click", function() {
+ it('modified mouse left click', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -809,13 +809,13 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.LEFT_CLICK, EventModifier.ALT);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 0,
clientX : 1,
clientY : 1,
altKey : true
});
- element.fireEvents("mouseup", {
+ element.fireEvents('mouseup', {
button : 0,
clientX : 1,
clientY : 1,
@@ -826,13 +826,13 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.LEFT_CLICK, EventModifier.ALT) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.LEFT_CLICK, EventModifier.ALT);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 0,
clientX : 2,
clientY : 2,
altKey : true
});
- element.fireEvents("mouseup", {
+ element.fireEvents('mouseup', {
button : 0,
clientX : 2,
clientY : 2,
@@ -842,7 +842,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("modified mouse middle down", function() {
+ it('modified mouse middle down', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -851,7 +851,7 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.MIDDLE_DOWN, EventModifier.CTRL);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 1,
clientX : 1,
clientY : 1,
@@ -862,7 +862,7 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.MIDDLE_DOWN, EventModifier.CTRL) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.MIDDLE_DOWN, EventModifier.CTRL);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 1,
clientX : 2,
clientY : 2,
@@ -872,7 +872,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("modified mouse middle up", function() {
+ it('modified mouse middle up', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -881,7 +881,7 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.MIDDLE_UP, EventModifier.CTRL);
- element.fireEvents("mouseup", {
+ element.fireEvents('mouseup', {
button : 1,
clientX : 1,
clientY : 1,
@@ -892,7 +892,7 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.MIDDLE_UP, EventModifier.CTRL) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.MIDDLE_UP, EventModifier.CTRL);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 1,
clientX : 2,
clientY : 2,
@@ -902,7 +902,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("modified mouse middle click", function() {
+ it('modified mouse middle click', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -911,13 +911,13 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.MIDDLE_CLICK, EventModifier.CTRL);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 1,
clientX : 1,
clientY : 1,
ctrlKey : true
});
- element.fireEvents("mouseup", {
+ element.fireEvents('mouseup', {
button : 1,
clientX : 1,
clientY : 1,
@@ -928,13 +928,13 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.MIDDLE_CLICK, EventModifier.CTRL) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.MIDDLE_CLICK, EventModifier.CTRL);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 1,
clientX : 2,
clientY : 2,
ctrlKey : true
});
- element.fireEvents("mouseup", {
+ element.fireEvents('mouseup', {
button : 1,
clientX : 2,
clientY : 2,
@@ -944,7 +944,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("modified mouse left double click", function() {
+ it('modified mouse left double click', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -953,7 +953,7 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.LEFT_DOUBLE_CLICK, EventModifier.CTRL);
- element.fireEvents("dblclick", {
+ element.fireEvents('dblclick', {
button : 0,
clientX : 1,
clientY : 1,
@@ -964,7 +964,7 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.LEFT_DOUBLE_CLICK, EventModifier.CTRL) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.LEFT_DOUBLE_CLICK, EventModifier.CTRL);
- element.fireEvents("dblclick", {
+ element.fireEvents('dblclick', {
button : 0,
clientX : 2,
clientY : 2,
@@ -974,7 +974,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("modified mouse right double click", function() {
+ it('modified mouse right double click', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -983,7 +983,7 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.RIGHT_DOUBLE_CLICK, EventModifier.CTRL);
- element.fireEvents("dblclick", {
+ element.fireEvents('dblclick', {
button : 2,
clientX : 1,
clientY : 1,
@@ -994,7 +994,7 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.RIGHT_DOUBLE_CLICK, EventModifier.CTRL) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.RIGHT_DOUBLE_CLICK, EventModifier.CTRL);
- element.fireEvents("dblclick", {
+ element.fireEvents('dblclick', {
button : 2,
clientX : 2,
clientY : 2,
@@ -1004,7 +1004,7 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("modified mouse middle double click", function() {
+ it('modified mouse middle double click', function() {
var actualCoords = new Cartesian2(0, 0);
var expectedCoords = new Cartesian2(1, 1);
@@ -1013,7 +1013,7 @@ defineSuite([
};
handler.setMouseAction(mouseDown, MouseEventType.MIDDLE_DOUBLE_CLICK, EventModifier.CTRL);
- element.fireEvents("dblclick", {
+ element.fireEvents('dblclick', {
button : 1,
clientX : 1,
clientY : 1,
@@ -1024,7 +1024,7 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.MIDDLE_DOUBLE_CLICK, EventModifier.CTRL) === mouseDown).toEqual(true);
handler.removeMouseAction(MouseEventType.MIDDLE_DOUBLE_CLICK, EventModifier.CTRL);
- element.fireEvents("dblclick", {
+ element.fireEvents('dblclick', {
button : 1,
clientX : 2,
clientY : 2,
@@ -1034,9 +1034,9 @@ defineSuite([
expect(actualCoords).toEqual(expectedCoords);
});
- it("get middle press time", function() {
+ it('get middle press time', function() {
handler.setMouseAction(function(event) {}, MouseEventType.MIDDLE_DOWN);
- element.fireEvents("mousedown", {
+ element.fireEvents('mousedown', {
button : 1,
clientX : 1,
clientY : 1
@@ -1045,9 +1045,9 @@ defineSuite([
expect(handler.getMiddlePressTime()).toBeDefined();
});
- it("get middle release time", function() {
+ it('get middle release time', function() {
handler.setMouseAction(function(event) {}, MouseEventType.MIDDLE_DOWN);
- element.fireEvents("mouseup", {
+ element.fireEvents('mouseup', {
button : 1,
clientX : 1,
clientY : 1
@@ -1056,7 +1056,7 @@ defineSuite([
expect(handler.getMiddleReleaseTime()).toBeDefined();
});
- it("modified mouse move", function() {
+ it('modified mouse move', function() {
var actualMove = {
startPosition : new Cartesian2(0, 0),
endPosition : new Cartesian2(0, 0)
@@ -1072,13 +1072,13 @@ defineSuite([
};
handler.setMouseAction(mouseMove, MouseEventType.MOVE, EventModifier.CTRL);
- element.fireEvents("mousemove", {
+ element.fireEvents('mousemove', {
button : 1,
clientX : 1,
clientY : 1,
ctrlKey : true
});
- element.fireEvents("mousemove", {
+ element.fireEvents('mousemove', {
button : 1,
clientX : 2,
clientY : 2,
@@ -1089,13 +1089,13 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.MOVE, EventModifier.CTRL) === mouseMove).toEqual(true);
handler.removeMouseAction(MouseEventType.MOVE, EventModifier.CTRL);
- element.fireEvents("mousemove", {
+ element.fireEvents('mousemove', {
button : 1,
clientX : 2,
clientY : 2,
ctrlKey : true
});
- element.fireEvents("mousemove", {
+ element.fireEvents('mousemove', {
button : 1,
clientX : 3,
clientY : 3,
@@ -1105,7 +1105,7 @@ defineSuite([
expect(actualMove).toEqual(expectedMove);
});
- it("modified mouse wheel", function() {
+ it('modified mouse wheel', function() {
var actualDelta = 0;
var expectedDelta = -120;
@@ -1114,7 +1114,7 @@ defineSuite([
};
handler.setMouseAction(mouseWheel, MouseEventType.WHEEL, EventModifier.CTRL);
- element.fireEvents("mousewheel", {
+ element.fireEvents('mousewheel', {
wheelDelta : -120,
ctrlKey : true
});
@@ -1123,7 +1123,7 @@ defineSuite([
expect(handler.getMouseAction(MouseEventType.WHEEL, EventModifier.CTRL) === mouseWheel).toEqual(true);
handler.removeMouseAction(MouseEventType.WHEEL, EventModifier.CTRL);
- element.fireEvents("mousewheel", {
+ element.fireEvents('mousewheel', {
wheelDelta : -360,
ctrlKey : true
});
@@ -1131,13 +1131,13 @@ defineSuite([
expect(actualDelta).toEqual(expectedDelta);
});
- it("isDestroyed", function() {
+ it('isDestroyed', function() {
expect(handler.isDestroyed()).toEqual(false);
handler.destroy();
expect(handler.isDestroyed()).toEqual(true);
});
- it("destroy event handler", function() {
+ it('destroy event handler', function() {
expect(element.getNumRegistered() !== 0).toEqual(true);
handler._unregister();
expect(element.getNumRegistered()).toEqual(0);
diff --git a/Specs/Core/ExtentSpec.js b/Specs/Core/ExtentSpec.js
index 0ad2c2a4729..20e485f8a66 100644
--- a/Specs/Core/ExtentSpec.js
+++ b/Specs/Core/ExtentSpec.js
@@ -8,13 +8,13 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("constructor checks for a valid extent.", function() {
+ it('constructor checks for a valid extent.', function() {
expect(function() {
return new Extent();
}).toThrow();
});
- it("constructor throws exception with invalid extent 1", function() {
+ it('constructor throws exception with invalid extent 1', function() {
expect(function() {
return new Extent(
-CesiumMath.PI - 1,
@@ -25,7 +25,7 @@ defineSuite([
}).toThrow();
});
- it("constructor throws exception with invalid extent 2", function() {
+ it('constructor throws exception with invalid extent 2', function() {
expect(function() {
return new Extent(
-CesiumMath.PI,
@@ -36,7 +36,7 @@ defineSuite([
}).toThrow();
});
- it("constructor throws exception with invalid extent 3", function() {
+ it('constructor throws exception with invalid extent 3', function() {
expect(function() {
return new Extent(
-CesiumMath.PI,
@@ -47,7 +47,7 @@ defineSuite([
}).toThrow();
});
- it("constructor throws exception with invalid extent 4", function() {
+ it('constructor throws exception with invalid extent 4', function() {
expect(function() {
return new Extent(
-CesiumMath.PI,
@@ -58,7 +58,7 @@ defineSuite([
}).toThrow();
});
- it("validate throws exception with undefined extent", function() {
+ it('validate throws exception with undefined extent', function() {
expect(function() {
Extent.validate();
}).toThrow();
diff --git a/Specs/Core/ExtentTessellatorSpec.js b/Specs/Core/ExtentTessellatorSpec.js
index f67277dcad6..c02a29c0437 100644
--- a/Specs/Core/ExtentTessellatorSpec.js
+++ b/Specs/Core/ExtentTessellatorSpec.js
@@ -10,17 +10,17 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("compute 0", function() {
+ it('compute 0', function() {
var m = ExtentTessellator.compute({
extent : new Extent(-2.0, -1.0, 0.0, 1.0),
granularity : 1.0
});
expect(m.attributes.position.values.length).toEqual(9 * 3);
- expect(typeof m.attributes.textureCoordinates === "undefined").toEqual(true);
+ expect(typeof m.attributes.textureCoordinates === 'undefined').toEqual(true);
expect(m.indexLists[0].values.length).toEqual(8 * 3);
});
- it("compute 1", function() {
+ it('compute 1', function() {
var m = ExtentTessellator.compute({
extent : new Extent(-2.0, -1.0, 0.0, 1.0),
granularity : 1.0,
@@ -31,7 +31,7 @@ defineSuite([
expect(m.indexLists[0].values.length).toEqual(8 * 3);
});
- it("computeBuffers 0", function() {
+ it('computeBuffers 0', function() {
var buffers = ExtentTessellator.computeBuffers({
extent : new Extent(-2.0, -1.0, 0.0, 1.0),
granularity : 1.0
@@ -41,7 +41,7 @@ defineSuite([
expect(buffers.indices.length).toEqual(8 * 3);
});
- it("computeBuffers 1", function() {
+ it('computeBuffers 1', function() {
var buffers = ExtentTessellator.computeBuffers({
extent : new Extent(-2.0, -1.0, 0.0, 1.0),
granularity : 1.0,
@@ -53,7 +53,7 @@ defineSuite([
expect(buffers.indices.length).toEqual(8 * 3);
});
- it("computeBuffers 2", function() {
+ it('computeBuffers 2', function() {
var buffers = ExtentTessellator.computeBuffers({
extent : new Extent(-2.0, -1.0, 0.0, 1.0),
granularity : 1.0,
diff --git a/Specs/Core/HermiteSplineSpec.js b/Specs/Core/HermiteSplineSpec.js
index d2071cac1ae..0fd35e00869 100644
--- a/Specs/Core/HermiteSplineSpec.js
+++ b/Specs/Core/HermiteSplineSpec.js
@@ -27,7 +27,7 @@ defineSuite([
}];
});
- it("constructor throws an exception with invalid control points", function() {
+ it('constructor throws an exception with invalid control points', function() {
expect(function() {
return new HermiteSpline();
}).toThrow();
@@ -41,19 +41,19 @@ defineSuite([
}).toThrow();
});
- it("get control points", function() {
+ it('get control points', function() {
var hs = new HermiteSpline(points);
expect(hs.getControlPoints()).toEqual(points);
});
- it("evaluate fails with undefined time", function() {
+ it('evaluate fails with undefined time', function() {
var hs = new HermiteSpline(points);
expect(function() {
hs.evaluate();
}).toThrow();
});
- it("evaluate fails with time out of range", function() {
+ it('evaluate fails with time out of range', function() {
var hs = new HermiteSpline(points);
expect(function() {
@@ -65,7 +65,7 @@ defineSuite([
}).toThrow();
});
- it("evaluate can jump around in time", function() {
+ it('evaluate can jump around in time', function() {
var hs = new HermiteSpline(points);
expect(hs.evaluate(points[0].time).equals(points[0].point)).toEqual(true);
@@ -101,7 +101,7 @@ defineSuite([
};
};
- it("natural cubic spline", function() {
+ it('natural cubic spline', function() {
points = [{
point : new Cartesian3(1.0, 0.0, 0.0),
time : 0.0
@@ -128,7 +128,7 @@ defineSuite([
}
});
- it("clamped cubic spline", function() {
+ it('clamped cubic spline', function() {
points = [{
point : new Cartesian3(1.0, 0.0, 0.0),
time : 0.0,
diff --git a/Specs/Core/IntersectionTestsSpec.js b/Specs/Core/IntersectionTestsSpec.js
index b1b8903740c..6776ca5beb0 100644
--- a/Specs/Core/IntersectionTestsSpec.js
+++ b/Specs/Core/IntersectionTestsSpec.js
@@ -12,7 +12,7 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("rayPlane intersects", function() {
+ it('rayPlane intersects', function() {
var rayOrigin = new Cartesian3(2.0, 0.0, 0.0);
var rayDirection = new Cartesian3(-1.0, 0.0, 0.0);
var planeNormal = new Cartesian3(1.0, 0.0, 0.0);
@@ -23,7 +23,7 @@ defineSuite([
expect(intersectionPoint.equals(new Cartesian3(1.0, 0.0, 0.0))).toEqual(true);
});
- it("rayPlane misses", function() {
+ it('rayPlane misses', function() {
var rayOrigin = new Cartesian3(2.0, 0.0, 0.0);
var rayDirection = new Cartesian3(1.0, 0.0, 0.0);
var planeNormal = new Cartesian3(1.0, 0.0, 0.0);
@@ -34,7 +34,7 @@ defineSuite([
expect(intersectionPoint).not.toBeDefined();
});
- it("rayPlane misses (parallel)", function() {
+ it('rayPlane misses (parallel)', function() {
var rayOrigin = new Cartesian3(2.0, 0.0, 0.0);
var rayDirection = new Cartesian3(0.0, 1.0, 0.0);
var planeNormal = new Cartesian3(1.0, 0.0, 0.0);
@@ -45,49 +45,49 @@ defineSuite([
expect(intersectionPoint).not.toBeDefined();
});
- it("rayPlane throws without rayOrigin", function() {
+ it('rayPlane throws without rayOrigin', function() {
expect(function() {
IntersectionTests.rayPlane();
}).toThrow();
});
- it("rayPlane throws without rayDirection", function() {
+ it('rayPlane throws without rayDirection', function() {
expect(function() {
IntersectionTests.rayPlane(new Cartesian3());
}).toThrow();
});
- it("rayPlane throws without planeNormal", function() {
+ it('rayPlane throws without planeNormal', function() {
expect(function() {
IntersectionTests.rayPlane(new Cartesian3(), new Cartesian3());
}).toThrow();
});
- it("rayPlane throws without planeD", function() {
+ it('rayPlane throws without planeD', function() {
expect(function() {
IntersectionTests.rayPlane(new Cartesian3(), new Cartesian3(), new Cartesian3());
}).toThrow();
});
- it("rayEllipsoid throws without rayOrigin", function() {
+ it('rayEllipsoid throws without rayOrigin', function() {
expect(function() {
IntersectionTests.rayEllipsoid();
}).toThrow();
});
- it("rayEllipsoid throws without rayDirection", function() {
+ it('rayEllipsoid throws without rayDirection', function() {
expect(function() {
IntersectionTests.rayEllipsoid(new Cartesian3());
}).toThrow();
});
- it("rayEllipsoid throws without ellipsoid", function() {
+ it('rayEllipsoid throws without ellipsoid', function() {
expect(function() {
IntersectionTests.rayEllipsoid(new Cartesian3(), new Cartesian3());
}).toThrow();
});
- it("rayEllipsoid outside intersections", function() {
+ it('rayEllipsoid outside intersections', function() {
var unitSphere = Ellipsoid.UNIT_SPHERE;
var intersections = IntersectionTests.rayEllipsoid(new Cartesian3(2.0, 0.0, 0.0), new Cartesian3(-1.0, 0.0, 0.0), unitSphere);
@@ -121,16 +121,16 @@ defineSuite([
expect(intersections.start).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
intersections = IntersectionTests.rayEllipsoid(new Cartesian3(-2.0, 0.0, 0.0), new Cartesian3(-1.0, 0.0, 0.0), unitSphere);
- expect(typeof intersections === "undefined").toEqual(true);
+ expect(typeof intersections === 'undefined').toEqual(true);
intersections = IntersectionTests.rayEllipsoid(new Cartesian3(0.0, -2.0, 0.0), new Cartesian3(0.0, -1.0, 0.0), unitSphere);
- expect(typeof intersections === "undefined").toEqual(true);
+ expect(typeof intersections === 'undefined').toEqual(true);
intersections = IntersectionTests.rayEllipsoid(new Cartesian3(0.0, 0.0, -2.0), new Cartesian3(0.0, 0.0, -1.0), unitSphere);
- expect(typeof intersections === "undefined").toEqual(true);
+ expect(typeof intersections === 'undefined').toEqual(true);
});
- it("rayEllipsoid inside intersection", function() {
+ it('rayEllipsoid inside intersection', function() {
var unitSphere = Ellipsoid.UNIT_SPHERE;
var intersections = IntersectionTests.rayEllipsoid(Cartesian3.ZERO, new Cartesian3(0.0, 0.0, 1.0), unitSphere);
@@ -138,14 +138,14 @@ defineSuite([
expect(intersections.stop).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
});
- it("rayEllipsoid tangent intersections", function() {
+ it('rayEllipsoid tangent intersections', function() {
var unitSphere = Ellipsoid.UNIT_SPHERE;
var intersections = IntersectionTests.rayEllipsoid(Cartesian3.UNIT_X, Cartesian3.UNIT_Z, unitSphere);
expect(intersections).not.toBeDefined();
});
- it("rayEllipsoid no intersections", function() {
+ it('rayEllipsoid no intersections', function() {
var unitSphere = Ellipsoid.UNIT_SPHERE;
var intersections = IntersectionTests.rayEllipsoid(new Cartesian3(2.0, 0.0, 0.0), new Cartesian3(0.0, 0.0, 1.0), unitSphere);
diff --git a/Specs/Core/JobsSpec.js b/Specs/Core/JobsSpec.js
index 615d16ff406..5dd64d74700 100644
--- a/Specs/Core/JobsSpec.js
+++ b/Specs/Core/JobsSpec.js
@@ -8,16 +8,16 @@ defineSuite([
"use strict";
/*global it,expect,waitsFor,runs*/
- it("downloads an image", function() {
+ it('downloads an image', function() {
var image;
- Chain.run(Jobs.downloadImage("./Data/Images/Green.png")).thenRun(function() {
- image = this.images["./Data/Images/Green.png"];
+ Chain.run(Jobs.downloadImage('./Data/Images/Green.png')).thenRun(function() {
+ image = this.images['./Data/Images/Green.png'];
});
waitsFor(function() {
return image;
- }, "downloads an image.", 3000);
+ }, 'downloads an image.', 3000);
runs(function() {
expect(image.width).toEqual(1);
diff --git a/Specs/Core/JulianDateSpec.js b/Specs/Core/JulianDateSpec.js
index 0b6f448bfa9..129c6ef5a51 100644
--- a/Specs/Core/JulianDateSpec.js
+++ b/Specs/Core/JulianDateSpec.js
@@ -11,8 +11,8 @@ function(JulianDate,
/*global it, expect*/
// All exact Julian Dates found using NASA's Time Conversion Tool: http://ssd.jpl.nasa.gov/tc.cgi
- it("Construct a default date", function() {
- // Default constructing a date uses "now". Unfortunately,
+ it('Construct a default date', function() {
+ // Default constructing a date uses 'now'. Unfortunately,
// there's no way to know exactly what that time will be, so we
// give ourselves a 5 second epsilon as a hack to avoid possible
// race conditions. In reality, it might be better to just omit
@@ -23,7 +23,7 @@ function(JulianDate,
expect(defaultDate.equalsEpsilon(dateNow, 5)).toEqual(true);
});
- it("Construct a date from basic components", function() {
+ it('Construct a date from basic components', function() {
var dayNumber = 12;
var seconds = 12.5;
var timeStandard = TimeStandard.TAI;
@@ -33,7 +33,7 @@ function(JulianDate,
expect(julianDate.getTimeStandard()).toEqual(timeStandard);
});
- it("Construct a date from basic components with more seconds than a day", function() {
+ it('Construct a date from basic components with more seconds than a day', function() {
var dayNumber = 12;
var seconds = 86401;
var timeStandard = TimeStandard.UTC;
@@ -43,7 +43,7 @@ function(JulianDate,
expect(julianDate.getTimeStandard()).toEqual(timeStandard);
});
- it("Construct a date from basic components with negative seconds in a day", function() {
+ it('Construct a date from basic components with negative seconds in a day', function() {
var dayNumber = 12;
var seconds = -1;
var timeStandard = TimeStandard.UTC;
@@ -53,7 +53,7 @@ function(JulianDate,
expect(julianDate.getTimeStandard()).toEqual(timeStandard);
});
- it("Construct a date from basic components with partial day and seconds in a day", function() {
+ it('Construct a date from basic components with partial day and seconds in a day', function() {
var dayNumber = 12.5;
var seconds = -1;
var timeStandard = TimeStandard.UTC;
@@ -63,7 +63,7 @@ function(JulianDate,
expect(julianDate.getTimeStandard()).toEqual(timeStandard);
});
- it("Construct a date with default time standard", function() {
+ it('Construct a date with default time standard', function() {
var dayNumber = 12;
var seconds = 12.5;
var julianDate = new JulianDate(dayNumber, seconds);
@@ -72,16 +72,16 @@ function(JulianDate,
expect(julianDate.getTimeStandard()).toEqual(TimeStandard.UTC);
});
- it("Fail to construct a date with invalid time standard", function() {
+ it('Fail to construct a date with invalid time standard', function() {
var dayNumber = 12;
var seconds = 12.5;
- var timeStandard = "invalid";
+ var timeStandard = 'invalid';
expect(function() {
return new JulianDate(dayNumber, seconds, timeStandard);
}).toThrow();
});
- it("Fail to construct a date with a null time standard", function() {
+ it('Fail to construct a date with a null time standard', function() {
var dayNumber = 12;
var seconds = 12.5;
var timeStandard = null;
@@ -90,7 +90,7 @@ function(JulianDate,
}).toThrow();
});
- it("Fail to construct a date with an undefined secondsOfDay", function() {
+ it('Fail to construct a date with an undefined secondsOfDay', function() {
var dayNumber = 12;
var timeStandard = TimeStandard.UTC;
expect(function() {
@@ -98,7 +98,7 @@ function(JulianDate,
}).toThrow();
});
- it("Fail to construct a date with null secondsOfDay", function() {
+ it('Fail to construct a date with null secondsOfDay', function() {
var dayNumber = 12;
var seconds = null;
var timeStandard = TimeStandard.UTC;
@@ -107,16 +107,16 @@ function(JulianDate,
}).toThrow();
});
- it("Fail to construct a date with non-numerical secondsOfDay", function() {
+ it('Fail to construct a date with non-numerical secondsOfDay', function() {
var dayNumber = 12;
- var seconds = "not a number";
+ var seconds = 'not a number';
var timeStandard = TimeStandard.UTC;
expect(function() {
return new JulianDate(dayNumber, seconds, timeStandard);
}).toThrow();
});
- it("Fail to construct a date with undefined day number", function() {
+ it('Fail to construct a date with undefined day number', function() {
var seconds = 12.5;
var timeStandard = TimeStandard.UTC;
expect(function() {
@@ -124,7 +124,7 @@ function(JulianDate,
}).toThrow();
});
- it("Fail to construct a date with null day number", function() {
+ it('Fail to construct a date with null day number', function() {
var dayNumber = null;
var seconds = 12.5;
var timeStandard = TimeStandard.UTC;
@@ -133,8 +133,8 @@ function(JulianDate,
}).toThrow();
});
- it("Fail to construct a date with non-numerical day number", function() {
- var dayNumber = "not a number";
+ it('Fail to construct a date with non-numerical day number', function() {
+ var dayNumber = 'not a number';
var seconds = 12.5;
var timeStandard = TimeStandard.UTC;
expect(function() {
@@ -142,617 +142,617 @@ function(JulianDate,
}).toThrow();
});
- it("Construct a date from a JavaScript Date (1)", function() {
- var date = new Date("January 1, 1991 06:00:00 UTC");
+ it('Construct a date from a JavaScript Date (1)', function() {
+ var date = new Date('January 1, 1991 06:00:00 UTC');
var julianDate = JulianDate.fromDate(date);
expect(julianDate.getTotalDays()).toEqualEpsilon(2448257.75, CesiumMath.EPSILON5);
});
- it("Construct a date from a JavaScript Date (2)", function() {
- var date = new Date("July 4, 2011 12:00:00 UTC");
+ it('Construct a date from a JavaScript Date (2)', function() {
+ var date = new Date('July 4, 2011 12:00:00 UTC');
var julianDate = JulianDate.fromDate(date);
expect(julianDate.getTotalDays()).toEqualEpsilon(2455747.0, CesiumMath.EPSILON5);
});
- it("Construct a date from a JavaScript Date (3)", function() {
- var date = new Date("December 31, 2021 18:00:00 UTC");
+ it('Construct a date from a JavaScript Date (3)', function() {
+ var date = new Date('December 31, 2021 18:00:00 UTC');
var julianDate = JulianDate.fromDate(date);
expect(julianDate.getTotalDays()).toEqualEpsilon(2459580.25, CesiumMath.EPSILON5);
});
- it("Construct a date from a JavaScript Date (4)", function() {
- var jsDate = new Date("September 1, 2011 12:00:00 UTC");
+ it('Construct a date from a JavaScript Date (4)', function() {
+ var jsDate = new Date('September 1, 2011 12:00:00 UTC');
var julianDate = JulianDate.fromDate(jsDate);
expect(julianDate.getTotalDays()).toEqualEpsilon(2455806.0, CesiumMath.EPSILON5);
});
- it("Construct a date from a JavaScript Date in different TimeStandard", function() {
- var taiDate = new Date("September 1, 2011 12:00:00");
+ it('Construct a date from a JavaScript Date in different TimeStandard', function() {
+ var taiDate = new Date('September 1, 2011 12:00:00');
var taiJulianDate = JulianDate.fromDate(taiDate, TimeStandard.TAI);
- var utcDate = new Date("September 1, 2011 11:59:26");
+ var utcDate = new Date('September 1, 2011 11:59:26');
var utcJulianDate = JulianDate.fromDate(utcDate, TimeStandard.UTC);
expect(taiJulianDate.equalsEpsilon(utcJulianDate, CesiumMath.EPSILON20)).toEqual(true);
});
- it("Fail to construct from an undefined JavaScript Date", function() {
+ it('Fail to construct from an undefined JavaScript Date', function() {
expect(function() {
return JulianDate.fromDate(undefined);
}).toThrow();
});
- it("Fail to construct from a null JavaScript Date", function() {
+ it('Fail to construct from a null JavaScript Date', function() {
expect(function() {
return JulianDate.fromDate(null);
}).toThrow();
});
- it("Fail to construct from an invalid JavaScript Date", function() {
+ it('Fail to construct from an invalid JavaScript Date', function() {
expect(function() {
- return JulianDate.fromDate(new Date(Date.parse("garbage")));
+ return JulianDate.fromDate(new Date(Date.parse('garbage')));
}).toThrow();
});
- it("Fail to construct from a non-date JavaScript Date", function() {
+ it('Fail to construct from a non-date JavaScript Date', function() {
expect(function() {
return JulianDate.fromDate(0);
}).toThrow();
});
- it("Fail to construct from a JavaScript Date with null time standard", function() {
+ it('Fail to construct from a JavaScript Date with null time standard', function() {
expect(function() {
return JulianDate.fromDate(new Date(), null);
}).toThrow();
});
- it("Fail to construct from a JavaScript Date with invalid time standard", function() {
+ it('Fail to construct from a JavaScript Date with invalid time standard', function() {
expect(function() {
- return JulianDate.fromDate(new Date(), "invalid");
+ return JulianDate.fromDate(new Date(), 'invalid');
}).toThrow();
});
- it("Construct a date from total days (1)", function() {
+ it('Construct a date from total days (1)', function() {
var julianDate = JulianDate.fromTotalDays(2448257.75, TimeStandard.UTC);
- expect(julianDate.equals(JulianDate.fromDate(new Date("January 1, 1991 06:00:00 UTC")))).toEqual(true);
+ expect(julianDate.equals(JulianDate.fromDate(new Date('January 1, 1991 06:00:00 UTC')))).toEqual(true);
});
- it("Construct a date from total days (2)", function() {
+ it('Construct a date from total days (2)', function() {
var julianDate = JulianDate.fromTotalDays(2455747.0, TimeStandard.UTC);
- expect(julianDate.equals(JulianDate.fromDate(new Date("July 4, 2011 12:00:00 UTC")))).toEqual(true);
+ expect(julianDate.equals(JulianDate.fromDate(new Date('July 4, 2011 12:00:00 UTC')))).toEqual(true);
});
- it("Construct a date from total days (3)", function() {
+ it('Construct a date from total days (3)', function() {
var julianDate = JulianDate.fromTotalDays(2459580.25, TimeStandard.UTC);
- expect(julianDate.equals(JulianDate.fromDate(new Date("December 31, 2021 18:00:00 UTC")))).toEqual(true);
+ expect(julianDate.equals(JulianDate.fromDate(new Date('December 31, 2021 18:00:00 UTC')))).toEqual(true);
});
- it("Construct a date from total days with different time standards", function() {
+ it('Construct a date from total days with different time standards', function() {
var julianDate = JulianDate.fromTotalDays(2455806, TimeStandard.TAI);
- expect(julianDate.equals(JulianDate.fromDate(new Date("September 1, 2011 12:00:00 UTC"), TimeStandard.TAI))).toEqual(true);
+ expect(julianDate.equals(JulianDate.fromDate(new Date('September 1, 2011 12:00:00 UTC'), TimeStandard.TAI))).toEqual(true);
});
- it("Fail to construct from non-numeric total days", function() {
+ it('Fail to construct from non-numeric total days', function() {
expect(function() {
- return JulianDate.fromTotalDays("not a number", TimeStandard.UTC);
+ return JulianDate.fromTotalDays('not a number', TimeStandard.UTC);
}).toThrow();
});
- it("Fail to construct from null total days", function() {
+ it('Fail to construct from null total days', function() {
expect(function() {
return JulianDate.fromTotalDays(null, TimeStandard.UTC);
}).toThrow();
});
- it("Fail to construct from undefined total days", function() {
+ it('Fail to construct from undefined total days', function() {
expect(function() {
return JulianDate.fromTotalDays(undefined, TimeStandard.UTC);
}).toThrow();
});
- it("Fail to construct from total days with null time standard", function() {
+ it('Fail to construct from total days with null time standard', function() {
expect(function() {
return JulianDate.fromTotalDays(1234, null);
}).toThrow();
});
- it("Fail to construct from total days with invalid time standard", function() {
+ it('Fail to construct from total days with invalid time standard', function() {
expect(function() {
- return JulianDate.fromTotalDays(1234, "invalid");
+ return JulianDate.fromTotalDays(1234, 'invalid');
}).toThrow();
});
- it("Construct from ISO8601 local calendar date, basic format", function() {
+ it('Construct from ISO8601 local calendar date, basic format', function() {
var expectedDate = JulianDate.fromDate(new Date(2009, 7, 1));
- var computedDate = JulianDate.fromIso8601("20090801");
+ var computedDate = JulianDate.fromIso8601('20090801');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from ISO8601 local calendar date, extended format", function() {
+ it('Construct from ISO8601 local calendar date, extended format', function() {
var expectedDate = JulianDate.fromDate(new Date(2009, 7, 1));
- var computedDate = JulianDate.fromIso8601("2009-08-01");
+ var computedDate = JulianDate.fromIso8601('2009-08-01');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from ISO8601 local calendar date on Feb 29th, basic format", function() {
+ it('Construct from ISO8601 local calendar date on Feb 29th, basic format', function() {
var expectedDate = JulianDate.fromDate(new Date(2000, 1, 29));
- var computedDate = JulianDate.fromIso8601("20000229");
+ var computedDate = JulianDate.fromIso8601('20000229');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from ISO8601 local calendar date on Feb 29th, extended format", function() {
+ it('Construct from ISO8601 local calendar date on Feb 29th, extended format', function() {
var expectedDate = JulianDate.fromDate(new Date(2000, 1, 29));
- var computedDate = JulianDate.fromIso8601("2000-02-29");
+ var computedDate = JulianDate.fromIso8601('2000-02-29');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from an ISO8601 local ordinal date, basic format", function() {
+ it('Construct from an ISO8601 local ordinal date, basic format', function() {
var expectedDate = JulianDate.fromDate(new Date(1985, 3, 12));
- var computedDate = JulianDate.fromIso8601("1985102");
+ var computedDate = JulianDate.fromIso8601('1985102');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from an ISO8601 local ordinal date, extended format", function() {
+ it('Construct from an ISO8601 local ordinal date, extended format', function() {
var expectedDate = JulianDate.fromDate(new Date(1985, 3, 12));
- var computedDate = JulianDate.fromIso8601("1985-102");
+ var computedDate = JulianDate.fromIso8601('1985-102');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct an ISO8601 ordinal date on a leap year", function() {
+ it('Construct an ISO8601 ordinal date on a leap year', function() {
var expectedDate = JulianDate.fromDate(new Date(2000, 11, 31));
- var computedDate = JulianDate.fromIso8601("2000-366");
+ var computedDate = JulianDate.fromIso8601('2000-366');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from an ISO8601 local week date, basic format", function() {
+ it('Construct from an ISO8601 local week date, basic format', function() {
var expectedDate = JulianDate.fromDate(new Date(1985, 3, 12));
- var computedDate = JulianDate.fromIso8601("1985W155");
+ var computedDate = JulianDate.fromIso8601('1985W155');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from an ISO8601 local week date, extended format", function() {
+ it('Construct from an ISO8601 local week date, extended format', function() {
var expectedDate = JulianDate.fromDate(new Date(2008, 8, 27));
- var computedDate = JulianDate.fromIso8601("2008-W39-6");
+ var computedDate = JulianDate.fromIso8601('2008-W39-6');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from an ISO8601 local calendar week date, basic format", function() {
+ it('Construct from an ISO8601 local calendar week date, basic format', function() {
var expectedDate = JulianDate.fromDate(new Date(1985, 3, 7));
- var computedDate = JulianDate.fromIso8601("1985W15");
+ var computedDate = JulianDate.fromIso8601('1985W15');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from an ISO8601 local calendar week date, extended format", function() {
+ it('Construct from an ISO8601 local calendar week date, extended format', function() {
var expectedDate = JulianDate.fromDate(new Date(2008, 8, 21));
- var computedDate = JulianDate.fromIso8601("2008-W39");
+ var computedDate = JulianDate.fromIso8601('2008-W39');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- //Note, there is no "extended format" for calendar month because eliminating the
+ //Note, there is no 'extended format' for calendar month because eliminating the
//would confuse is with old YYMMDD dates
- it("Construct from an ISO8601 local calendar month, basic format", function() {
+ it('Construct from an ISO8601 local calendar month, basic format', function() {
var expectedDate = JulianDate.fromDate(new Date(1985, 3, 1));
- var computedDate = JulianDate.fromIso8601("1985-04");
+ var computedDate = JulianDate.fromIso8601('1985-04');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- //Note, there is no "extended format" for calendar year for obvious reasons
- it("Construct from an ISO8601 local calendar month, basic format", function() {
+ //Note, there is no 'extended format' for calendar year for obvious reasons
+ it('Construct from an ISO8601 local calendar month, basic format', function() {
var expectedDate = JulianDate.fromDate(new Date(1985, 0, 1));
- var computedDate = JulianDate.fromIso8601("1985");
+ var computedDate = JulianDate.fromIso8601('1985');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from ISO8601 UTC calendar date and time, basic format", function() {
+ it('Construct from ISO8601 UTC calendar date and time, basic format', function() {
var expectedDate = JulianDate.fromDate(new Date(Date.UTC(2009, 7, 1, 12, 30, 25)));
- var computedDate = JulianDate.fromIso8601("20090801T123025Z");
+ var computedDate = JulianDate.fromIso8601('20090801T123025Z');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from ISO8601 UTC calendar date and time, extended format", function() {
+ it('Construct from ISO8601 UTC calendar date and time, extended format', function() {
var expectedDate = JulianDate.fromDate(new Date(Date.UTC(2009, 7, 1, 12, 30, 25)));
- var computedDate = JulianDate.fromIso8601("2009-08-01T12:30:25Z");
+ var computedDate = JulianDate.fromIso8601('2009-08-01T12:30:25Z');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from ISO8601 UTC calendar date and time fractional seconds, basic format", function() {
+ it('Construct from ISO8601 UTC calendar date and time fractional seconds, basic format', function() {
//Date is only accurate to milliseconds, while JulianDate, much more so. The below date gets
//rounded to 513, so we need to construct a JulianDate directly.
//var expectedDate = JulianDate.fromDate(new Date(Date.UTC(2009, 7, 1, 12, 30, 25, 5125423)));
var expectedDate = new JulianDate(2455045, 1825.5125423, TimeStandard.UTC);
- var computedDate = JulianDate.fromIso8601("20090801T123025.5125423Z");
+ var computedDate = JulianDate.fromIso8601('20090801T123025.5125423Z');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from ISO8601 UTC calendar date and time fractional seconds, extended format", function() {
+ it('Construct from ISO8601 UTC calendar date and time fractional seconds, extended format', function() {
//Date is only accurate to milliseconds, while JulianDate, much more so. The below date gets
//rounded to 513, so we need to construct a JulianDate directly.
var expectedDate = new JulianDate(2455045, 1825.5125423, TimeStandard.UTC);
- var computedDate = JulianDate.fromIso8601("2009-08-01T12:30:25.5125423Z");
+ var computedDate = JulianDate.fromIso8601('2009-08-01T12:30:25.5125423Z');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from ISO8601 UTC calendar date and time fractional seconds, basic format, ',' instead of '.'", function() {
+ it('Construct from ISO8601 UTC calendar date and time fractional seconds, basic format, "," instead of "."', function() {
//Date is only accurate to milliseconds, while JulianDate, much more so. The below date gets
//rounded to 513, so we need to construct a JulianDate directly.
//var expectedDate = JulianDate.fromDate(new Date(Date.UTC(2009, 7, 1, 12, 30, 25, 5125423)));
var expectedDate = new JulianDate(2455045, 1825.5125423, TimeStandard.UTC);
- var computedDate = JulianDate.fromIso8601("20090801T123025,5125423Z");
+ var computedDate = JulianDate.fromIso8601('20090801T123025,5125423Z');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from ISO8601 UTC calendar date and time fractional seconds, extended format, ',' instead of '.'", function() {
+ it('Construct from ISO8601 UTC calendar date and time fractional seconds, extended format, "," instead of "."', function() {
//Date is only accurate to milliseconds, while JulianDate, much more so. The below date gets
//rounded to 513, so we need to construct a JulianDate directly.
var expectedDate = new JulianDate(2455045, 1825.5125423, TimeStandard.UTC);
- var computedDate = JulianDate.fromIso8601("2009-08-01T12:30:25,5125423Z");
+ var computedDate = JulianDate.fromIso8601('2009-08-01T12:30:25,5125423Z');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from ISO8601 UTC calendar date and time no seconds, basic format", function() {
+ it('Construct from ISO8601 UTC calendar date and time no seconds, basic format', function() {
var expectedDate = JulianDate.fromDate(new Date(Date.UTC(2009, 7, 1, 12, 30, 0)));
- var computedDate = JulianDate.fromIso8601("20090801T1230Z");
+ var computedDate = JulianDate.fromIso8601('20090801T1230Z');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from ISO8601 UTC calendar date and time no seconds, extended format", function() {
+ it('Construct from ISO8601 UTC calendar date and time no seconds, extended format', function() {
var expectedDate = JulianDate.fromDate(new Date(Date.UTC(2009, 7, 1, 12, 30, 0)));
- var computedDate = JulianDate.fromIso8601("2009-08-01T12:30Z");
+ var computedDate = JulianDate.fromIso8601('2009-08-01T12:30Z');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from ISO8601 UTC calendar date and time fractional minutes, basic format", function() {
+ it('Construct from ISO8601 UTC calendar date and time fractional minutes, basic format', function() {
var expectedDate = JulianDate.fromDate(new Date(Date.UTC(2009, 7, 1, 12, 30, 30)));
- var computedDate = JulianDate.fromIso8601("20090801T1230.5Z");
+ var computedDate = JulianDate.fromIso8601('20090801T1230.5Z');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from ISO8601 UTC calendar date and time fractional minutes, extended format", function() {
+ it('Construct from ISO8601 UTC calendar date and time fractional minutes, extended format', function() {
var expectedDate = JulianDate.fromDate(new Date(Date.UTC(2009, 7, 1, 12, 30, 30)));
- var computedDate = JulianDate.fromIso8601("2009-08-01T12:30.5Z");
+ var computedDate = JulianDate.fromIso8601('2009-08-01T12:30.5Z');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from ISO8601 UTC calendar date and time fractional minutes, basic format, ',' instead of '.'", function() {
+ it('Construct from ISO8601 UTC calendar date and time fractional minutes, basic format, "," instead of "."', function() {
var expectedDate = JulianDate.fromDate(new Date(Date.UTC(2009, 7, 1, 12, 30, 30)));
- var computedDate = JulianDate.fromIso8601("20090801T1230,5Z");
+ var computedDate = JulianDate.fromIso8601('20090801T1230,5Z');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from ISO8601 UTC calendar date and time fractional minutes, extended format, ',' instead of '.'", function() {
+ it('Construct from ISO8601 UTC calendar date and time fractional minutes, extended format, "," instead of "."', function() {
var expectedDate = JulianDate.fromDate(new Date(Date.UTC(2009, 7, 1, 12, 30, 30)));
- var computedDate = JulianDate.fromIso8601("2009-08-01T12:30,5Z");
+ var computedDate = JulianDate.fromIso8601('2009-08-01T12:30,5Z');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from ISO8601 UTC calendar date and time no minutes/seconds, basic format", function() {
+ it('Construct from ISO8601 UTC calendar date and time no minutes/seconds, basic format', function() {
var expectedDate = JulianDate.fromDate(new Date(Date.UTC(2009, 7, 1, 12, 0, 0)));
- var computedDate = JulianDate.fromIso8601("20090801T12Z");
+ var computedDate = JulianDate.fromIso8601('20090801T12Z');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from ISO8601 UTC calendar date and time no minutes/seconds, extended format", function() {
+ it('Construct from ISO8601 UTC calendar date and time no minutes/seconds, extended format', function() {
var expectedDate = JulianDate.fromDate(new Date(Date.UTC(2009, 7, 1, 12, 0, 0)));
- var computedDate = JulianDate.fromIso8601("2009-08-01T12Z");
+ var computedDate = JulianDate.fromIso8601('2009-08-01T12Z');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from ISO8601 UTC calendar date and time fractional hours, basic format", function() {
+ it('Construct from ISO8601 UTC calendar date and time fractional hours, basic format', function() {
var expectedDate = JulianDate.fromDate(new Date(Date.UTC(2009, 7, 1, 12, 30, 0)));
- var computedDate = JulianDate.fromIso8601("20090801T12.5Z");
+ var computedDate = JulianDate.fromIso8601('20090801T12.5Z');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from ISO8601 UTC calendar date and time fractional hours, extended format", function() {
+ it('Construct from ISO8601 UTC calendar date and time fractional hours, extended format', function() {
var expectedDate = JulianDate.fromDate(new Date(Date.UTC(2009, 7, 1, 12, 30, 0)));
- var computedDate = JulianDate.fromIso8601("2009-08-01T12.5Z");
+ var computedDate = JulianDate.fromIso8601('2009-08-01T12.5Z');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from ISO8601 UTC calendar date and time fractional hours, basic format, ',' instead of '.'", function() {
+ it('Construct from ISO8601 UTC calendar date and time fractional hours, basic format, "," instead of "."', function() {
var expectedDate = JulianDate.fromDate(new Date(Date.UTC(2009, 7, 1, 12, 30, 0)));
- var computedDate = JulianDate.fromIso8601("20090801T12,5Z");
+ var computedDate = JulianDate.fromIso8601('20090801T12,5Z');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from ISO8601 UTC calendar date and time fractional hours, extended format, ',' instead of '.'", function() {
+ it('Construct from ISO8601 UTC calendar date and time fractional hours, extended format, "," instead of "."', function() {
var expectedDate = JulianDate.fromDate(new Date(Date.UTC(2009, 7, 1, 12, 30, 0)));
- var computedDate = JulianDate.fromIso8601("2009-08-01T12,5Z");
+ var computedDate = JulianDate.fromIso8601('2009-08-01T12,5Z');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from an ISO8601 UTC calendar date and time on a leap second", function() {
- var julianDate = JulianDate.fromIso8601("2008-12-31T23:59:60Z");
+ it('Construct from an ISO8601 UTC calendar date and time on a leap second', function() {
+ var julianDate = JulianDate.fromIso8601('2008-12-31T23:59:60Z');
expect(julianDate.equals(new JulianDate(2454832, 43233, TimeStandard.TAI))).toEqual(true);
});
- it("Construct from an ISO8601 UTC calendar date and time within a leap second", function() {
- var julianDate = JulianDate.fromIso8601("2008-12-31T23:59:60.123456789Z");
+ it('Construct from an ISO8601 UTC calendar date and time within a leap second', function() {
+ var julianDate = JulianDate.fromIso8601('2008-12-31T23:59:60.123456789Z');
expect(julianDate.equals(new JulianDate(2454832, 43233.123456789, TimeStandard.TAI))).toEqual(true);
});
- it("Construct from an ISO8601 local calendar date and time on a leap second 1 hour behind UTC", function() {
- var julianDate = JulianDate.fromIso8601("2008-12-31T22:59:60-01");
+ it('Construct from an ISO8601 local calendar date and time on a leap second 1 hour behind UTC', function() {
+ var julianDate = JulianDate.fromIso8601('2008-12-31T22:59:60-01');
expect(julianDate.equals(new JulianDate(2454832, 43233, TimeStandard.TAI))).toEqual(true);
});
- it("Construct from an ISO8601 local calendar date and time on a leap second 1 hour ahead of UTC", function() {
- var julianDate = JulianDate.fromIso8601("2009-01-01T00:59:60+01");
+ it('Construct from an ISO8601 local calendar date and time on a leap second 1 hour ahead of UTC', function() {
+ var julianDate = JulianDate.fromIso8601('2009-01-01T00:59:60+01');
expect(julianDate.equals(new JulianDate(2454832, 43233, TimeStandard.TAI))).toEqual(true);
});
- it("Construct from an ISO8601 calendar date and time using 24:00:00 midnight notation", function() {
+ it('Construct from an ISO8601 calendar date and time using 24:00:00 midnight notation', function() {
var expectedDate = JulianDate.fromDate(new Date(Date.UTC(2009, 7, 2, 0, 0, 0)));
- var computedDate = JulianDate.fromIso8601("2009-08-01T24:00:00Z");
+ var computedDate = JulianDate.fromIso8601('2009-08-01T24:00:00Z');
expect(computedDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from an ISO8601 local calendar date with UTC offset that crosses into next year", function() {
+ it('Construct from an ISO8601 local calendar date with UTC offset that crosses into next year', function() {
var expectedDate = JulianDate.fromDate(new Date(Date.UTC(2008, 11, 31, 23, 0, 0)));
- var julianDate = JulianDate.fromIso8601("2009-01-01T01:00:00+02");
+ var julianDate = JulianDate.fromIso8601('2009-01-01T01:00:00+02');
expect(julianDate.equals(expectedDate)).toEqual(true);
});
- it("Construct from an ISO8601 local calendar date with UTC offset that crosses into previous year", function() {
+ it('Construct from an ISO8601 local calendar date with UTC offset that crosses into previous year', function() {
var expectedDate = JulianDate.fromDate(new Date(Date.UTC(2009, 0, 1, 1, 0, 0)));
- var julianDate = JulianDate.fromIso8601("2008-12-31T23:00:00-02");
+ var julianDate = JulianDate.fromIso8601('2008-12-31T23:00:00-02');
expect(julianDate.equals(expectedDate)).toEqual(true);
});
- it("Fails to construct an ISO8601 ordinal date with day less than 1", function() {
+ it('Fails to construct an ISO8601 ordinal date with day less than 1', function() {
expect(function() {
- return JulianDate.fromIso8601("2009-000");
+ return JulianDate.fromIso8601('2009-000');
}).toThrow();
});
- it("Fails to construct an ISO8601 ordinal date with day more than 365 on non-leap year", function() {
+ it('Fails to construct an ISO8601 ordinal date with day more than 365 on non-leap year', function() {
expect(function() {
- return JulianDate.fromIso8601("2001-366");
+ return JulianDate.fromIso8601('2001-366');
}).toThrow();
});
- it("Fails to construct ISO8601 UTC calendar date of invalid YYMMDD format", function() {
+ it('Fails to construct ISO8601 UTC calendar date of invalid YYMMDD format', function() {
expect(function() {
- return JulianDate.fromIso8601("200905");
+ return JulianDate.fromIso8601('200905');
}).toThrow();
});
- it("Fails to construct a complete ISO8601 date missing T delimeter", function() {
+ it('Fails to construct a complete ISO8601 date missing T delimeter', function() {
expect(function() {
- return JulianDate.fromIso8601("2009-08-0112:30.5Z");
+ return JulianDate.fromIso8601('2009-08-0112:30.5Z');
}).toThrow();
});
- it("Fails to construct a complete ISO8601 date with delimeter other than T", function() {
+ it('Fails to construct a complete ISO8601 date with delimeter other than T', function() {
expect(function() {
- return JulianDate.fromIso8601("2009-08-01Q12:30.5Z");
+ return JulianDate.fromIso8601('2009-08-01Q12:30.5Z');
}).toThrow();
});
- it("Fails to construct an ISO8601 date from undefined", function() {
+ it('Fails to construct an ISO8601 date from undefined', function() {
expect(function() {
return JulianDate.fromIso8601(undefined);
}).toThrow();
});
- it("Fails to construct an ISO8601 date from null", function() {
+ it('Fails to construct an ISO8601 date from null', function() {
expect(function() {
return JulianDate.fromIso8601(null);
}).toThrow();
});
- it("Fails to construct an ISO8601 from complete garbage", function() {
+ it('Fails to construct an ISO8601 from complete garbage', function() {
expect(function() {
- return JulianDate.fromIso8601("this is not a date");
+ return JulianDate.fromIso8601('this is not a date');
}).toThrow();
});
- it("Fails to construct an ISO8601 date from a valid ISO8601 interval", 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");
+ return JulianDate.fromIso8601('2007-03-01T13:00:00Z/2008-05-11T15:30:00Z');
}).toThrow();
});
- it("Fails to construct from an ISO8601 with too many year digits", function() {
+ it('Fails to construct from an ISO8601 with too many year digits', function() {
expect(function() {
- return JulianDate.fromIso8601("20091-05-19");
+ return JulianDate.fromIso8601('20091-05-19');
}).toThrow();
});
- it("Fails to construct from an ISO8601 with too many month digits", function() {
+ it('Fails to construct from an ISO8601 with too many month digits', function() {
expect(function() {
- return JulianDate.fromIso8601("2009-100-19");
+ return JulianDate.fromIso8601('2009-100-19');
}).toThrow();
});
- it("Fails to construct from an ISO8601 with more than 12 months", function() {
+ it('Fails to construct from an ISO8601 with more than 12 months', function() {
expect(function() {
- return JulianDate.fromIso8601("2009-13-19");
+ return JulianDate.fromIso8601('2009-13-19');
}).toThrow();
});
- it("Fails to construct from an ISO8601 with less than 1 months", function() {
+ it('Fails to construct from an ISO8601 with less than 1 months', function() {
expect(function() {
- return JulianDate.fromIso8601("2009-00-19");
+ return JulianDate.fromIso8601('2009-00-19');
}).toThrow();
});
- it("Fails to construct an ISO8601 January date with more than 31 days", function() {
+ it('Fails to construct an ISO8601 January date with more than 31 days', function() {
expect(function() {
- return JulianDate.fromIso8601("2009-01-32");
+ return JulianDate.fromIso8601('2009-01-32');
}).toThrow();
});
- it("Fails to construct an ISO8601 Febuary date with more than 28 days", function() {
+ it('Fails to construct an ISO8601 Febuary date with more than 28 days', function() {
expect(function() {
- return JulianDate.fromIso8601("2009-02-29");
+ return JulianDate.fromIso8601('2009-02-29');
}).toThrow();
});
- it("Fails to construct an ISO8601 Febuary leap year date with more than 29 days", function() {
+ it('Fails to construct an ISO8601 Febuary leap year date with more than 29 days', function() {
expect(function() {
- return JulianDate.fromIso8601("2000-02-30");
+ return JulianDate.fromIso8601('2000-02-30');
}).toThrow();
});
- it("Fails to construct an ISO8601 March date with more than 29 days", function() {
+ it('Fails to construct an ISO8601 March date with more than 29 days', function() {
expect(function() {
- return JulianDate.fromIso8601("2000-03-32");
+ return JulianDate.fromIso8601('2000-03-32');
}).toThrow();
});
- it("Fails to construct an ISO8601 April date with more than 29 days", function() {
+ it('Fails to construct an ISO8601 April date with more than 29 days', function() {
expect(function() {
- return JulianDate.fromIso8601("2000-04-31");
+ return JulianDate.fromIso8601('2000-04-31');
}).toThrow();
});
- it("Fails to construct an ISO8601 May date with more than 29 days", function() {
+ it('Fails to construct an ISO8601 May date with more than 29 days', function() {
expect(function() {
- return JulianDate.fromIso8601("2000-05-32");
+ return JulianDate.fromIso8601('2000-05-32');
}).toThrow();
});
- it("Fails to construct an ISO8601 June date with more than 29 days", function() {
+ it('Fails to construct an ISO8601 June date with more than 29 days', function() {
expect(function() {
- return JulianDate.fromIso8601("2000-06-31");
+ return JulianDate.fromIso8601('2000-06-31');
}).toThrow();
});
- it("Fails to construct an ISO8601 July date with more than 29 days", function() {
+ it('Fails to construct an ISO8601 July date with more than 29 days', function() {
expect(function() {
- return JulianDate.fromIso8601("2000-07-32");
+ return JulianDate.fromIso8601('2000-07-32');
}).toThrow();
});
- it("Fails to construct an ISO8601 August date with more than 29 days", function() {
+ it('Fails to construct an ISO8601 August date with more than 29 days', function() {
expect(function() {
- return JulianDate.fromIso8601("2000-08-32");
+ return JulianDate.fromIso8601('2000-08-32');
}).toThrow();
});
- it("Fails to construct an ISO8601 September date with more than 29 days", function() {
+ it('Fails to construct an ISO8601 September date with more than 29 days', function() {
expect(function() {
- return JulianDate.fromIso8601("2000-09-31");
+ return JulianDate.fromIso8601('2000-09-31');
}).toThrow();
});
- it("Fails to construct an ISO8601 October date with more than 29 days", function() {
+ it('Fails to construct an ISO8601 October date with more than 29 days', function() {
expect(function() {
- return JulianDate.fromIso8601("2000-10-32");
+ return JulianDate.fromIso8601('2000-10-32');
}).toThrow();
});
- it("Fails to construct an ISO8601 November date with more than 29 days", function() {
+ it('Fails to construct an ISO8601 November date with more than 29 days', function() {
expect(function() {
- return JulianDate.fromIso8601("2000-11-31");
+ return JulianDate.fromIso8601('2000-11-31');
}).toThrow();
});
- it("Fails to construct an ISO8601 December date with more than 29 days", function() {
+ it('Fails to construct an ISO8601 December date with more than 29 days', function() {
expect(function() {
- return JulianDate.fromIso8601("2000-12-32");
+ return JulianDate.fromIso8601('2000-12-32');
}).toThrow();
});
- it("Fails to construct an ISO8601 date with more than 24 hours (extra seconds)", function() {
+ it('Fails to construct an ISO8601 date with more than 24 hours (extra seconds)', function() {
expect(function() {
- return JulianDate.fromIso8601("2000-12-15T24:00:01");
+ return JulianDate.fromIso8601('2000-12-15T24:00:01');
}).toThrow();
});
- it("Fails to construct an ISO8601 date with more than 24 hours (extra minutes)", function() {
+ it('Fails to construct an ISO8601 date with more than 24 hours (extra minutes)', function() {
expect(function() {
- return JulianDate.fromIso8601("2000-12-15T24:01:00");
+ return JulianDate.fromIso8601('2000-12-15T24:01:00');
}).toThrow();
});
- it("Fails to construct an ISO8601 date with more than 59 minutes", function() {
+ it('Fails to construct an ISO8601 date with more than 59 minutes', function() {
expect(function() {
- return JulianDate.fromIso8601("2000-12-15T12:60");
+ return JulianDate.fromIso8601('2000-12-15T12:60');
}).toThrow();
});
- it("Fails to construct an ISO8601 date with more than 60 seconds", function() {
+ it('Fails to construct an ISO8601 date with more than 60 seconds', function() {
expect(function() {
- return JulianDate.fromIso8601("2000-12-15T12:59:61");
+ return JulianDate.fromIso8601('2000-12-15T12:59:61');
}).toThrow();
});
- it("Fails to construct from an ISO8601 with less than 1 day", function() {
+ it('Fails to construct from an ISO8601 with less than 1 day', function() {
expect(function() {
- return JulianDate.fromIso8601("2009-01-00");
+ return JulianDate.fromIso8601('2009-01-00');
}).toThrow();
});
- it("Fails to construct from an ISO8601 with too many dashes", function() {
+ it('Fails to construct from an ISO8601 with too many dashes', function() {
expect(function() {
- return JulianDate.fromIso8601("2009--01-01");
+ return JulianDate.fromIso8601('2009--01-01');
}).toThrow();
});
- it("Fails to construct from an ISO8601 with garbage offset", function() {
+ it('Fails to construct from an ISO8601 with garbage offset', function() {
expect(function() {
- return JulianDate.fromIso8601("2000-12-15T12:59:23ZZ+-050708::1234");
+ return JulianDate.fromIso8601('2000-12-15T12:59:23ZZ+-050708::1234');
}).toThrow();
});
- it("Fails to construct an ISO8601 date with more than one decimal place", function() {
+ it('Fails to construct an ISO8601 date with more than one decimal place', function() {
expect(function() {
- return JulianDate.fromIso8601("2000-12-15T12:59:22..2");
+ return JulianDate.fromIso8601('2000-12-15T12:59:22..2');
}).toThrow();
});
- it("Fails to construct an ISO8601 calendar date mixing basic and extended format", function() {
+ it('Fails to construct an ISO8601 calendar date mixing basic and extended format', function() {
expect(function() {
- return JulianDate.fromIso8601("200108-01");
+ return JulianDate.fromIso8601('200108-01');
}).toThrow();
});
- it("Fails to construct an ISO8601 calendar date mixing basic and extended format", function() {
+ it('Fails to construct an ISO8601 calendar date mixing basic and extended format', function() {
expect(function() {
- return JulianDate.fromIso8601("2001-0801");
+ return JulianDate.fromIso8601('2001-0801');
}).toThrow();
});
- it("Fails to construct an ISO8601 calendar week mixing basic and extended format", function() {
+ it('Fails to construct an ISO8601 calendar week mixing basic and extended format', function() {
expect(function() {
- return JulianDate.fromIso8601("2008-W396");
+ return JulianDate.fromIso8601('2008-W396');
}).toThrow();
});
- it("Fails to construct an ISO8601 calendar week mixing basic and extended format", function() {
+ it('Fails to construct an ISO8601 calendar week mixing basic and extended format', function() {
expect(function() {
- return JulianDate.fromIso8601("2008W39-6");
+ return JulianDate.fromIso8601('2008W39-6');
}).toThrow();
});
- it("Fails to construct an ISO8601 date with trailing -", function() {
+ it('Fails to construct an ISO8601 date with trailing -', function() {
expect(function() {
- return JulianDate.fromIso8601("2001-");
+ return JulianDate.fromIso8601('2001-');
}).toThrow();
});
- it("Fails to construct an ISO8601 time mixing basic and extended format", function() {
+ it('Fails to construct an ISO8601 time mixing basic and extended format', function() {
expect(function() {
- return JulianDate.fromIso8601("2000-12-15T22:0100");
+ return JulianDate.fromIso8601('2000-12-15T22:0100');
}).toThrow();
});
- it("Fails to construct an ISO8601 time mixing basic and extended format", function() {
+ it('Fails to construct an ISO8601 time mixing basic and extended format', function() {
expect(function() {
- return JulianDate.fromIso8601("2000-12-15T2201:00");
+ return JulianDate.fromIso8601('2000-12-15T2201:00');
}).toThrow();
});
- it("getJulianTimeFraction works", function() {
+ it('getJulianTimeFraction works', function() {
var seconds = 12345.678;
var fraction = seconds / 86400.0;
var julianDate = new JulianDate(0, seconds);
expect(julianDate.getJulianTimeFraction()).toEqualEpsilon(fraction, CesiumMath.EPSILON20);
});
- it("toDate works when constructed from total days", function() {
+ it('toDate works when constructed from total days', function() {
var julianDate = JulianDate.fromTotalDays(2455770.9986087964, TimeStandard.UTC);
var javascriptDate = julianDate.toDate();
expect(javascriptDate.getUTCFullYear()).toEqual(2011);
@@ -764,7 +764,7 @@ function(JulianDate,
expect(javascriptDate.getUTCMilliseconds()).toEqualEpsilon(800, 10);
});
- it("toDate works when using TAI", function() {
+ it('toDate works when using TAI', function() {
var julianDate = JulianDate.fromTotalDays(2455927.157772, TimeStandard.UTC);
var julianDateTai = TimeStandard.convertUtcToTai(julianDate);
var javascriptDate = julianDateTai.toDate();
@@ -777,316 +777,316 @@ function(JulianDate,
expect(javascriptDate.getUTCMilliseconds()).toEqualEpsilon(500, 10);
});
- it("toDate works on a leap second", function() {
+ it('toDate works on a leap second', function() {
var date = new JulianDate(2454832, 43233, TimeStandard.TAI).toDate();
- expect(date).toEqual(new Date("1/1/2009 12:00:00 AM UTC"));
+ expect(date).toEqual(new Date('1/1/2009 12:00:00 AM UTC'));
});
- it("getSecondsDifference works in UTC", function() {
- var start = JulianDate.fromDate(new Date("July 4, 2011 12:00:00 UTC"));
- var end = JulianDate.fromDate(new Date("July 5, 2011 12:01:00 UTC"));
+ it('getSecondsDifference works in UTC', function() {
+ var start = JulianDate.fromDate(new Date('July 4, 2011 12:00:00 UTC'));
+ var end = JulianDate.fromDate(new Date('July 5, 2011 12:01:00 UTC'));
expect(start.getSecondsDifference(end)).toEqualEpsilon(TimeConstants.SECONDS_PER_DAY + TimeConstants.SECONDS_PER_MINUTE, CesiumMath.EPSILON5);
});
- it("getSecondsDifference works in TAI", function() {
- var start = JulianDate.fromDate(new Date("July 4, 2011 12:00:00 UTC"));
- var end = JulianDate.fromDate(new Date("July 5, 2011 12:01:00 UTC"));
+ it('getSecondsDifference works in TAI', function() {
+ var start = JulianDate.fromDate(new Date('July 4, 2011 12:00:00 UTC'));
+ var end = JulianDate.fromDate(new Date('July 5, 2011 12:01:00 UTC'));
start = TimeStandard.convertUtcToTai(start);
end = TimeStandard.convertUtcToTai(end);
expect(start.getSecondsDifference(end)).toEqualEpsilon(TimeConstants.SECONDS_PER_DAY + TimeConstants.SECONDS_PER_MINUTE, CesiumMath.EPSILON5);
});
- it("getSecondsDifference works with mixed time standards", function() {
- var start = JulianDate.fromDate(new Date("July 4, 2011 12:00:00 UTC"));
- var end = JulianDate.fromDate(new Date("July 5, 2011 12:01:00 UTC"));
+ it('getSecondsDifference works with mixed time standards', function() {
+ var start = JulianDate.fromDate(new Date('July 4, 2011 12:00:00 UTC'));
+ var end = JulianDate.fromDate(new Date('July 5, 2011 12:01:00 UTC'));
start = TimeStandard.convertUtcToTai(start);
expect(start.getSecondsDifference(end)).toEqualEpsilon(TimeConstants.SECONDS_PER_DAY + TimeConstants.SECONDS_PER_MINUTE, CesiumMath.EPSILON5);
});
- it("getMinutesDifference works in UTC", function() {
- var start = JulianDate.fromDate(new Date("July 4, 2011 12:00:00 UTC"));
- var end = JulianDate.fromDate(new Date("July 5, 2011 12:01:00 UTC"));
+ it('getMinutesDifference works in UTC', function() {
+ var start = JulianDate.fromDate(new Date('July 4, 2011 12:00:00 UTC'));
+ var end = JulianDate.fromDate(new Date('July 5, 2011 12:01:00 UTC'));
expect(start.getMinutesDifference(end)).toEqualEpsilon(TimeConstants.MINUTES_PER_DAY + 1.0, CesiumMath.EPSILON5);
});
- it("getMinutesDifference works in TAI", function() {
- var start = JulianDate.fromDate(new Date("July 4, 2011 12:00:00 UTC"));
- var end = JulianDate.fromDate(new Date("July 5, 2011 12:01:00 UTC"));
+ it('getMinutesDifference works in TAI', function() {
+ var start = JulianDate.fromDate(new Date('July 4, 2011 12:00:00 UTC'));
+ var end = JulianDate.fromDate(new Date('July 5, 2011 12:01:00 UTC'));
start = TimeStandard.convertUtcToTai(start);
end = TimeStandard.convertUtcToTai(end);
expect(start.getMinutesDifference(end)).toEqualEpsilon(TimeConstants.MINUTES_PER_DAY + 1.0, CesiumMath.EPSILON5);
});
- it("getMinutesDifference works with mixed time standards", function() {
- var start = JulianDate.fromDate(new Date("July 4, 2011 12:00:00 UTC"));
- var end = JulianDate.fromDate(new Date("July 5, 2011 12:01:00 UTC"));
+ it('getMinutesDifference works with mixed time standards', function() {
+ var start = JulianDate.fromDate(new Date('July 4, 2011 12:00:00 UTC'));
+ var end = JulianDate.fromDate(new Date('July 5, 2011 12:01:00 UTC'));
end = TimeStandard.convertUtcToTai(end);
expect(start.getMinutesDifference(end)).toEqualEpsilon(TimeConstants.MINUTES_PER_DAY + 1.0, CesiumMath.EPSILON5);
});
- it("addSeconds works with whole seconds", function() {
- var start = JulianDate.fromDate(new Date("July 4, 2011 12:00:30 UTC"));
+ it('addSeconds works with whole seconds', function() {
+ var start = JulianDate.fromDate(new Date('July 4, 2011 12:00:30 UTC'));
var end = start.addSeconds(95);
expect(end.toDate().getUTCSeconds()).toEqualEpsilon(5, CesiumMath.EPSILON5);
expect(end.toDate().getUTCMinutes()).toEqualEpsilon(2, CesiumMath.EPSILON5);
});
- it("addSeconds works with fractions (1)", function() {
- var start = JulianDate.fromDate(new Date("July 4, 2011 23:59:59 UTC"));
+ it('addSeconds works with fractions (1)', function() {
+ var start = JulianDate.fromDate(new Date('July 4, 2011 23:59:59 UTC'));
var end = start.addSeconds(1.5);
expect(end.getTotalDays()).toEqualEpsilon(2455747.5000058, CesiumMath.EPSILON7);
});
- it("addSeconds works with fractions (2)", function() {
- var start = JulianDate.fromDate(new Date("August 11 2011 6:00:00 UTC"));
+ it('addSeconds works with fractions (2)', function() {
+ var start = JulianDate.fromDate(new Date('August 11 2011 6:00:00 UTC'));
var end = start.addSeconds(0.5);
expect(end.getTotalDays()).toEqualEpsilon(2455784.7500058, CesiumMath.EPSILON7);
});
- it("addSeconds works with fractions (3)", function() {
- var start = JulianDate.fromDate(new Date("August 11 2011 11:59:59 UTC"));
+ it('addSeconds works with fractions (3)', function() {
+ var start = JulianDate.fromDate(new Date('August 11 2011 11:59:59 UTC'));
var end = start.addSeconds(1.25);
expect(end.getTotalDays()).toEqualEpsilon(2455785.0000029, CesiumMath.EPSILON7);
});
- it("addSeconds works with negative numbers", function() {
- var start = JulianDate.fromDate(new Date("July 4, 2011 12:01:30 UTC"));
+ it('addSeconds works with negative numbers', function() {
+ var start = JulianDate.fromDate(new Date('July 4, 2011 12:01:30 UTC'));
var end = start.addSeconds(-60);
expect(end.toDate().getUTCSeconds()).toEqualEpsilon(30, CesiumMath.EPSILON5);
expect(end.toDate().getUTCMinutes()).toEqualEpsilon(0, CesiumMath.EPSILON5);
});
- it("addSeconds works with more seconds than in a day", function() {
+ it('addSeconds works with more seconds than in a day', function() {
var start = new JulianDate(2448444, 0, TimeStandard.UTC);
var end = start.addSeconds(TimeConstants.SECONDS_PER_DAY * 7 + 15);
expect(end.getJulianDayNumber()).toEqual(2448451);
expect(end.getSecondsOfDay()).toEqual(15);
});
- it("addSeconds works with negative seconds more than in a day", function() {
+ it('addSeconds works with negative seconds more than in a day', function() {
var start = new JulianDate(2448444, 0, TimeStandard.UTC);
var end = start.addSeconds(-TimeConstants.SECONDS_PER_DAY * 7 - 15);
expect(end.getJulianDayNumber()).toEqual(2448436);
expect(end.getSecondsOfDay()).toEqual(TimeConstants.SECONDS_PER_DAY - 15);
});
- it("addSeconds fails with non-numeric input", function() {
+ it('addSeconds fails with non-numeric input', function() {
expect(function() {
- return new JulianDate().addSeconds("banana");
+ return new JulianDate().addSeconds('banana');
}).toThrow();
});
- it("addSeconds fails with null input", function() {
+ it('addSeconds fails with null input', function() {
expect(function() {
return new JulianDate().addSeconds(null);
}).toThrow();
});
- it("addSeconds fails with undefined input", function() {
+ it('addSeconds fails with undefined input', function() {
expect(function() {
return new JulianDate().addSeconds(undefined);
}).toThrow();
});
- it("addMinutes works", function() {
- var start = JulianDate.fromDate(new Date("July 4, 2011 12:00:00 UTC"));
+ it('addMinutes works', function() {
+ var start = JulianDate.fromDate(new Date('July 4, 2011 12:00:00 UTC'));
var end = start.addMinutes(65);
expect(end.toDate().getUTCMinutes()).toEqualEpsilon(5, CesiumMath.EPSILON5);
expect(end.toDate().getUTCHours()).toEqualEpsilon(13, CesiumMath.EPSILON5);
});
- it("addMinutes works with negative numbers", function() {
- var start = JulianDate.fromDate(new Date("July 4, 2011 12:00:00 UTC"));
+ it('addMinutes works with negative numbers', function() {
+ var start = JulianDate.fromDate(new Date('July 4, 2011 12:00:00 UTC'));
var end = start.addMinutes(-35);
expect(end.toDate().getUTCMinutes()).toEqualEpsilon(25, CesiumMath.EPSILON5);
expect(end.toDate().getUTCHours()).toEqualEpsilon(11, CesiumMath.EPSILON5);
});
- it("addMinutes fails with non-numeric input", function() {
+ it('addMinutes fails with non-numeric input', function() {
expect(function() {
- return new JulianDate().addMinutes("banana");
+ return new JulianDate().addMinutes('banana');
}).toThrow();
});
- it("addMinutes fails with null input", function() {
+ it('addMinutes fails with null input', function() {
expect(function() {
return new JulianDate().addMinutes(null);
}).toThrow();
});
- it("addMinutes fails with undefined input", function() {
+ it('addMinutes fails with undefined input', function() {
expect(function() {
return new JulianDate().addMinutes(undefined);
}).toThrow();
});
- it("addHours works", function() {
- var start = JulianDate.fromDate(new Date("July 4, 2011 12:00:00 UTC"));
+ it('addHours works', function() {
+ var start = JulianDate.fromDate(new Date('July 4, 2011 12:00:00 UTC'));
var end = start.addHours(6);
expect(end.toDate().getUTCHours()).toEqualEpsilon(18, CesiumMath.EPSILON5);
});
- it("addHours works with negative numbers", function() {
- var start = JulianDate.fromDate(new Date("July 4, 2011 12:00:00 UTC"));
+ it('addHours works with negative numbers', function() {
+ var start = JulianDate.fromDate(new Date('July 4, 2011 12:00:00 UTC'));
var end = start.addHours(-6);
expect(end.toDate().getUTCHours()).toEqualEpsilon(6, CesiumMath.EPSILON5);
});
- it("addHours fails with non-numeric input", function() {
+ it('addHours fails with non-numeric input', function() {
expect(function() {
- return new JulianDate().addHours("banana");
+ return new JulianDate().addHours('banana');
}).toThrow();
});
- it("addHours fails with null input", function() {
+ it('addHours fails with null input', function() {
expect(function() {
return new JulianDate().addHours(null);
}).toThrow();
});
- it("addHours fails with undefined input", function() {
+ it('addHours fails with undefined input', function() {
expect(function() {
return new JulianDate().addHours(undefined);
}).toThrow();
});
- it("addDays works", function() {
- var start = JulianDate.fromDate(new Date("July 4, 2011 12:00:00 UTC"));
+ it('addDays works', function() {
+ var start = JulianDate.fromDate(new Date('July 4, 2011 12:00:00 UTC'));
var end = start.addDays(32);
expect(end.toDate().getUTCDate()).toEqualEpsilon(5, CesiumMath.EPSILON5);
expect(end.toDate().getUTCMonth()).toEqualEpsilon(7, CesiumMath.EPSILON5);
});
- it("addDays works with negative numbers", function() {
- var start = JulianDate.fromDate(new Date("July 4, 2011 12:00:00 UTC"));
+ it('addDays works with negative numbers', function() {
+ var start = JulianDate.fromDate(new Date('July 4, 2011 12:00:00 UTC'));
var end = start.addDays(-4);
expect(end.toDate().getUTCDate()).toEqualEpsilon(30, CesiumMath.EPSILON5);
expect(end.toDate().getUTCMonth()).toEqualEpsilon(5, CesiumMath.EPSILON5);
});
- it("addDays fails with non-numeric input", function() {
+ it('addDays fails with non-numeric input', function() {
expect(function() {
- return new JulianDate().addDays("banana");
+ return new JulianDate().addDays('banana');
}).toThrow();
});
- it("addDays fails with null input", function() {
+ it('addDays fails with null input', function() {
expect(function() {
return new JulianDate().addDays(null);
}).toThrow();
});
- it("addDays fails with undefined input", function() {
+ it('addDays fails with undefined input', function() {
expect(function() {
return new JulianDate().addDays(undefined);
}).toThrow();
});
- it("lessThan works", function() {
- var start = JulianDate.fromDate(new Date("July 6, 1991 12:00:00"));
- var end = JulianDate.fromDate(new Date("July 6, 2011 12:01:00"));
+ it('lessThan works', function() {
+ var start = JulianDate.fromDate(new Date('July 6, 1991 12:00:00'));
+ var end = JulianDate.fromDate(new Date('July 6, 2011 12:01:00'));
expect(start.lessThan(end)).toEqual(true);
});
- it("lessThan works with equal values", function() {
- var start = JulianDate.fromDate(new Date("July 6, 1991 12:00:00"));
- var end = JulianDate.fromDate(new Date("July 6, 1991 12:00:00"));
+ it('lessThan works with equal values', function() {
+ var start = JulianDate.fromDate(new Date('July 6, 1991 12:00:00'));
+ var end = JulianDate.fromDate(new Date('July 6, 1991 12:00:00'));
expect(start.lessThan(end)).toEqual(false);
expect(start.lessThan(end.addSeconds(1))).toEqual(true);
});
- it("lessThan works with different time standards", function() {
- var start = JulianDate.fromDate(new Date("July 6, 1991 12:00:00"), TimeStandard.UTC);
- var end = JulianDate.fromDate(new Date("July 6, 2011 12:00:00"), TimeStandard.TAI);
+ it('lessThan works with different time standards', function() {
+ var start = JulianDate.fromDate(new Date('July 6, 1991 12:00:00'), TimeStandard.UTC);
+ var end = JulianDate.fromDate(new Date('July 6, 2011 12:00:00'), TimeStandard.TAI);
expect(start.lessThan(end)).toEqual(true);
});
- it("lessThanOrEquals works", function() {
- var start = JulianDate.fromDate(new Date("July 6, 1991 12:00:00"));
- var end = JulianDate.fromDate(new Date("July 6, 1991 12:00:00"));
+ it('lessThanOrEquals works', function() {
+ var start = JulianDate.fromDate(new Date('July 6, 1991 12:00:00'));
+ var end = JulianDate.fromDate(new Date('July 6, 1991 12:00:00'));
expect(start.lessThanOrEquals(end)).toEqual(true);
expect(start.addSeconds(1).lessThanOrEquals(end)).toEqual(false);
expect(start.addSeconds(-1).lessThanOrEquals(end)).toEqual(true);
});
- it("lessThanOrEquals works with different time standards", function() {
- var start = JulianDate.fromDate(new Date("July 6, 1991 12:00:00"), TimeStandard.UTC);
+ it('lessThanOrEquals works with different time standards', function() {
+ var start = JulianDate.fromDate(new Date('July 6, 1991 12:00:00'), TimeStandard.UTC);
var end = TimeStandard.convertUtcToTai(start);
expect(start.lessThanOrEquals(end)).toEqual(true);
expect(start.addSeconds(1).lessThanOrEquals(end)).toEqual(false);
expect(start.addSeconds(-1).lessThanOrEquals(end)).toEqual(true);
});
- it("greaterThan works", function() {
- var start = JulianDate.fromDate(new Date("July 6, 2011 12:01:00"));
- var end = JulianDate.fromDate(new Date("July 6, 1991 12:00:00"));
+ it('greaterThan works', function() {
+ var start = JulianDate.fromDate(new Date('July 6, 2011 12:01:00'));
+ var end = JulianDate.fromDate(new Date('July 6, 1991 12:00:00'));
expect(start.greaterThan(end)).toEqual(true);
});
- it("greaterThan works with equal values", function() {
- var start = JulianDate.fromDate(new Date("July 6, 1991 12:00:00"));
- var end = JulianDate.fromDate(new Date("July 6, 1991 12:00:00"));
+ it('greaterThan works with equal values', function() {
+ var start = JulianDate.fromDate(new Date('July 6, 1991 12:00:00'));
+ var end = JulianDate.fromDate(new Date('July 6, 1991 12:00:00'));
expect(start.greaterThan(end)).toEqual(false);
expect(start.greaterThan(end.addSeconds(-1))).toEqual(true);
});
- it("greaterThan works with different time standards", function() {
- var start = JulianDate.fromDate(new Date("July 6, 2011 12:01:00"), TimeStandard.TAI);
- var end = JulianDate.fromDate(new Date("July 6, 1991 12:00:00"), TimeStandard.UTC);
+ it('greaterThan works with different time standards', function() {
+ var start = JulianDate.fromDate(new Date('July 6, 2011 12:01:00'), TimeStandard.TAI);
+ var end = JulianDate.fromDate(new Date('July 6, 1991 12:00:00'), TimeStandard.UTC);
expect(start.greaterThan(end)).toEqual(true);
});
- it("greaterThanOrEquals works", function() {
- var start = JulianDate.fromDate(new Date("July 6, 1991 12:00:00"));
- var end = JulianDate.fromDate(new Date("July 6, 1991 12:00:00"));
+ it('greaterThanOrEquals works', function() {
+ var start = JulianDate.fromDate(new Date('July 6, 1991 12:00:00'));
+ var end = JulianDate.fromDate(new Date('July 6, 1991 12:00:00'));
expect(start.greaterThanOrEquals(end)).toEqual(true);
expect(start.addSeconds(-1).greaterThanOrEquals(end)).toEqual(false);
expect(start.addSeconds(1).greaterThanOrEquals(end)).toEqual(true);
});
- it("greaterThanOrEquals works with different time standards", function() {
- var start = JulianDate.fromDate(new Date("July 6, 1991 12:00:00"), TimeStandard.UTC);
+ it('greaterThanOrEquals works with different time standards', function() {
+ var start = JulianDate.fromDate(new Date('July 6, 1991 12:00:00'), TimeStandard.UTC);
var end = TimeStandard.convertUtcToTai(start);
expect(start.greaterThanOrEquals(end)).toEqual(true);
expect(start.addSeconds(-1).greaterThanOrEquals(end)).toEqual(false);
expect(start.addSeconds(1).greaterThanOrEquals(end)).toEqual(true);
});
- it("can be equal to within an epsilon of another JulianDate", function() {
- var original = JulianDate.fromDate(new Date("September 7, 2011 12:55:00 UTC"));
- var clone = JulianDate.fromDate(new Date("September 7, 2011 12:55:00 UTC"));
+ it('can be equal to within an epsilon of another JulianDate', function() {
+ var original = JulianDate.fromDate(new Date('September 7, 2011 12:55:00 UTC'));
+ var clone = JulianDate.fromDate(new Date('September 7, 2011 12:55:00 UTC'));
clone = clone.addSeconds(1);
expect(original.equalsEpsilon(clone, 2)).toEqual(true);
});
- it("getTotalDays works", function() {
+ it('getTotalDays works', function() {
var totalDays = 2455784.7500058;
var original = JulianDate.fromTotalDays(totalDays);
expect(totalDays).toEqual(original.getTotalDays());
});
- it("equalsEpsilon works", function() {
+ it('equalsEpsilon works', function() {
var original = new JulianDate();
var clone = JulianDate.fromDate(original.toDate());
clone = clone.addSeconds(0.01);
expect(original.equalsEpsilon(clone, CesiumMath.EPSILON1)).toEqual(true);
});
- it("getTaiMinusUtc works between TAI and UTC (1)", function() {
- var date = new Date("July 11, 2011 12:00:00 UTC");
+ it('getTaiMinusUtc works between TAI and UTC (1)', function() {
+ var date = new Date('July 11, 2011 12:00:00 UTC');
var jd = JulianDate.fromDate(date, TimeStandard.TAI);
var difference = jd.getTaiMinusUtc();
expect(difference).toEqual(34);
});
- it("getTaiMinusUtc works between TAI and UTC (2)", function() {
- var date = new Date("July 11, 1979 12:00:00 UTC");
+ it('getTaiMinusUtc works between TAI and UTC (2)', function() {
+ var date = new Date('July 11, 1979 12:00:00 UTC');
var jd = JulianDate.fromDate(date, TimeStandard.TAI);
var difference = jd.getTaiMinusUtc();
expect(difference).toEqual(18);
});
- it("getTaiMinusUtc works between TAI and UTC (3)", function() {
- var date = new Date("July 11, 1970 12:00:00 UTC");
+ it('getTaiMinusUtc works between TAI and UTC (3)', function() {
+ var date = new Date('July 11, 1970 12:00:00 UTC');
var jd = JulianDate.fromDate(date, TimeStandard.TAI);
var difference = jd.getTaiMinusUtc();
expect(difference).toEqual(10);
diff --git a/Specs/Core/LeapSecondSpec.js b/Specs/Core/LeapSecondSpec.js
index 2105faa2d32..f926bf99afd 100644
--- a/Specs/Core/LeapSecondSpec.js
+++ b/Specs/Core/LeapSecondSpec.js
@@ -12,7 +12,7 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("has the proper default leapSeconds", function() {
+ it('has the proper default leapSeconds', function() {
var leapSeconds = LeapSecond.getLeapSeconds();
expect(leapSeconds[0].julianDate.getTotalDays()).toEqual(2441317.5);
expect(leapSeconds[1].julianDate.getTotalDays()).toEqual(2441499.5);
@@ -41,39 +41,39 @@ defineSuite([
expect(leapSeconds[24].julianDate.getTotalDays()).toEqual(2454832.5);
});
- it("throws an exception if constructed without a julian date", function() {
+ it('throws an exception if constructed without a julian date', function() {
expect(function() {
return new LeapSecond();
}).toThrow();
});
- it("throws an exception if constructed without an offset", function() {
+ it('throws an exception if constructed without an offset', function() {
expect(function() {
return new LeapSecond(new JulianDate());
}).toThrow();
});
- it("can get the TAI offset from UTC", function() {
+ it('can get the TAI offset from UTC', function() {
var ls = new LeapSecond(new JulianDate(), 1.0);
expect(ls.offset).toEqual(1.0);
});
- it("can get the TAI offset for an index (in range)", function() {
+ it('can get the TAI offset for an index (in range)', function() {
var leapSeconds = LeapSecond.getLeapSeconds();
- var toFind = new LeapSecond("January 1, 1973 00:00:00 UTC", 12.0);
+ var toFind = new LeapSecond('January 1, 1973 00:00:00 UTC', 12.0);
var index = binarySearch(leapSeconds, toFind, LeapSecond.compareLeapSecondDate);
expect(LeapSecond.getLeapSeconds()[index].offset).toEqual(12.0);
});
- it("can get the Julian date for an index (in range)", function() {
+ it('can get the Julian date for an index (in range)', function() {
var leapSeconds = LeapSecond.getLeapSeconds();
- var toFind = new LeapSecond("July 1, 1972 00:00:00 UTC", 0.0);
+ var toFind = new LeapSecond('July 1, 1972 00:00:00 UTC', 0.0);
var index = binarySearch(leapSeconds, toFind, LeapSecond.compareLeapSecondDate);
expect(LeapSecond.getLeapSeconds()[index].julianDate.getTotalDays()).toEqual(2441499.5);
});
- it("can check to see if leap seconds are equal", function() {
- var date = new Date("January 1, 1990 00:00:00 UTC");
+ it('can check to see if leap seconds are equal', function() {
+ var date = new Date('January 1, 1990 00:00:00 UTC');
var leapSecond1 = new LeapSecond(JulianDate.fromDate(date), 25.0);
var leapSecond2 = new LeapSecond(JulianDate.fromDate(date), 25.0);
var leapSecond3 = new LeapSecond(JulianDate.fromDate(date), 26.0);
@@ -82,108 +82,108 @@ defineSuite([
});
- it("can construct a leapSecond using JSON data", function() {
+ it('can construct a leapSecond using JSON data', function() {
var data = [{
- date : "January 1, 1972 00:00:00 UTC",
+ date : 'January 1, 1972 00:00:00 UTC',
offset : 10
}, {
- date : "July 1, 1972 00:00:00 UTC",
+ date : 'July 1, 1972 00:00:00 UTC',
offset : 11
}, {
- date : "January 1, 1973 00:00:00 UTC",
+ date : 'January 1, 1973 00:00:00 UTC',
offset : 12
}, {
- date : "January 1, 1974 00:00:00 UTC",
+ date : 'January 1, 1974 00:00:00 UTC',
offset : 13
}, {
- date : "January 1, 1975 00:00:00 UTC",
+ date : 'January 1, 1975 00:00:00 UTC',
offset : 14
}, {
- date : "January 1, 1976 00:00:00 UTC",
+ date : 'January 1, 1976 00:00:00 UTC',
offset : 15
}, {
- date : "January 1, 1977 00:00:00 UTC",
+ date : 'January 1, 1977 00:00:00 UTC',
offset : 16
}, {
- date : "January 1, 1978 00:00:00 UTC",
+ date : 'January 1, 1978 00:00:00 UTC',
offset : 17
}, {
- date : "January 1, 1979 00:00:00 UTC",
+ date : 'January 1, 1979 00:00:00 UTC',
offset : 18
}, {
- date : "January 1, 1980 00:00:00 UTC",
+ date : 'January 1, 1980 00:00:00 UTC',
offset : 19
}, {
- date : "July 1, 1981 00:00:00 UTC",
+ date : 'July 1, 1981 00:00:00 UTC',
offset : 20
}, {
- date : "July 1, 1982 00:00:00 UTC",
+ date : 'July 1, 1982 00:00:00 UTC',
offset : 21
}, {
- date : "July 1, 1983 00:00:00 UTC",
+ date : 'July 1, 1983 00:00:00 UTC',
offset : 22
}, {
- date : "July 1, 1985 00:00:00 UTC",
+ date : 'July 1, 1985 00:00:00 UTC',
offset : 23
}, {
- date : "January 1, 1988 00:00:00 UTC",
+ date : 'January 1, 1988 00:00:00 UTC',
offset : 24
}, {
- date : "January 1, 1990 00:00:00 UTC",
+ date : 'January 1, 1990 00:00:00 UTC',
offset : 25
}, {
- date : "January 1, 1991 00:00:00 UTC",
+ date : 'January 1, 1991 00:00:00 UTC',
offset : 26
}, {
- date : "July 1, 1992 00:00:00 UTC",
+ date : 'July 1, 1992 00:00:00 UTC',
offset : 27
}, {
- date : "July 1, 1993 00:00:00 UTC",
+ date : 'July 1, 1993 00:00:00 UTC',
offset : 28
}, {
- date : "July 1, 1994 00:00:00 UTC",
+ date : 'July 1, 1994 00:00:00 UTC',
offset : 100
}, {
- date : "January 1, 1996 00:00:00 UTC",
+ date : 'January 1, 1996 00:00:00 UTC',
offset : 30
}, {
- date : "July 1, 1997 00:00:00 UTC",
+ date : 'July 1, 1997 00:00:00 UTC',
offset : 31
}, {
- date : "January 1, 1999 00:00:00 UTC",
+ date : 'January 1, 1999 00:00:00 UTC',
offset : 32
}, {
- date : "January 1, 2006 00:00:00 UTC",
+ date : 'January 1, 2006 00:00:00 UTC',
offset : 33
}, {
- date : "January 1, 2009 00:00:00 UTC",
+ date : 'January 1, 2009 00:00:00 UTC',
offset : 34
}];
LeapSecond.setLeapSeconds(data);
- var jd = JulianDate.fromDate(new Date("July 11, 1994 12:00:00 UTC"));
+ var jd = JulianDate.fromDate(new Date('July 11, 1994 12:00:00 UTC'));
jd = TimeStandard.convertUtcToTai(jd);
var difference = jd.getTaiMinusUtc();
expect(difference).toEqual(100);
});
- it("throws an exception if setting leap seconds without data", function() {
+ it('throws an exception if setting leap seconds without data', function() {
expect(function() {
LeapSecond.setLeapSeconds();
}).toThrow();
});
- it("can compare leap second dates (1)", function() {
- var leapSecond1 = new LeapSecond("July 18, 2011 12:00:00 UTC", 0.0);
- var leapSecond2 = new LeapSecond("July 20, 2011 12:00:00 UTC", 0.0);
+ it('can compare leap second dates (1)', function() {
+ var leapSecond1 = new LeapSecond('July 18, 2011 12:00:00 UTC', 0.0);
+ var leapSecond2 = new LeapSecond('July 20, 2011 12:00:00 UTC', 0.0);
expect(LeapSecond.compareLeapSecondDate(leapSecond1, leapSecond2)).toBeLessThan(0);
expect(LeapSecond.compareLeapSecondDate(leapSecond2, leapSecond1)).toBeGreaterThan(0);
expect(LeapSecond.compareLeapSecondDate(leapSecond1, leapSecond1)).toEqual(0);
});
- it("can compare leap second dates (2)", function() {
- var leapSecond1 = new LeapSecond("July 18, 2011 15:00:00 UTC", 0.0);
- var leapSecond2 = new LeapSecond("July 18, 2011 16:00:00 UTC", 0.0);
+ it('can compare leap second dates (2)', function() {
+ var leapSecond1 = new LeapSecond('July 18, 2011 15:00:00 UTC', 0.0);
+ var leapSecond2 = new LeapSecond('July 18, 2011 16:00:00 UTC', 0.0);
expect(LeapSecond.compareLeapSecondDate(leapSecond1, leapSecond2)).toBeLessThan(0);
expect(LeapSecond.compareLeapSecondDate(leapSecond2, leapSecond1)).toBeGreaterThan(0);
diff --git a/Specs/Core/MathSpec.js b/Specs/Core/MathSpec.js
index f8328f8a8d1..83df522ae6b 100644
--- a/Specs/Core/MathSpec.js
+++ b/Specs/Core/MathSpec.js
@@ -12,139 +12,139 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("sign of -2", function() {
+ it('sign of -2', function() {
expect(CesiumMath.sign(-2)).toEqual(-1);
});
- it("sign of 2", function() {
+ it('sign of 2', function() {
expect(CesiumMath.sign(2)).toEqual(1);
});
- it("sign of 0", function() {
+ it('sign of 0', function() {
expect(CesiumMath.sign(0)).toEqual(0);
});
///////////////////////////////////////////////////////////////////////
- it("angleBetween between orthogonal vectors", function() {
+ it('angleBetween between orthogonal vectors', function() {
expect(CesiumMath.angleBetween(Cartesian3.UNIT_X, Cartesian3.UNIT_Y)).toEqual(CesiumMath.PI_OVER_TWO);
});
- it("angleBetween between colinear vectors", function() {
+ it('angleBetween between colinear vectors', function() {
expect(CesiumMath.angleBetween(Cartesian3.UNIT_X, Cartesian3.UNIT_X)).toEqual(0.0);
});
- it("angleBetween between zero vector", function() {
+ it('angleBetween between zero vector', function() {
expect(CesiumMath.angleBetween(Cartesian3.UNIT_X, Cartesian3.ZERO)).toEqual(0.0);
});
//////////////////////////////////////////////////////////////////////
- it("cosh", function() {
+ it('cosh', function() {
expect(CesiumMath.cosh(0.0)).toEqual(1.0);
expect(CesiumMath.cosh(-1.0)).toBeGreaterThan(1.0);
expect(CesiumMath.cosh(1.0)).toBeGreaterThan(1.0);
});
- it("cosh NaN", function() {
+ it('cosh NaN', function() {
expect(isNaN(CesiumMath.cosh(NaN))).toEqual(true);
});
- it("cosh infinity", function() {
+ it('cosh infinity', function() {
expect(CesiumMath.cosh(Infinity)).toEqual(Infinity);
expect(CesiumMath.cosh(-Infinity)).toEqual(Infinity);
});
- it("sinh", function() {
+ it('sinh', function() {
expect(CesiumMath.sinh(0.0)).toEqual(0.0);
expect(CesiumMath.sinh(-1.0)).toBeLessThan(1.0);
expect(CesiumMath.sinh(1.0)).toBeGreaterThan(1.0);
});
- it("sinh NaN", function() {
+ it('sinh NaN', function() {
expect(isNaN(CesiumMath.sinh(NaN))).toEqual(true);
});
- it("sinh infinity", function() {
+ it('sinh infinity', function() {
expect(CesiumMath.sinh(Infinity)).toEqual(Infinity);
expect(CesiumMath.sinh(-Infinity)).toEqual(-Infinity);
});
///////////////////////////////////////////////////////////////////////
- it("lerps at time 0", function() {
+ it('lerps at time 0', function() {
expect(CesiumMath.lerp(1.0, 2.0, 0.0)).toEqual(1.0);
});
- it("lerps at time 0.5", function() {
+ it('lerps at time 0.5', function() {
expect(CesiumMath.lerp(1.0, 2.0, 0.5)).toEqual(1.5);
});
- it("lerps at time 1", function() {
+ it('lerps at time 1', function() {
expect(CesiumMath.lerp(1.0, 2.0, 1.0)).toEqual(2.0);
});
///////////////////////////////////////////////////////////////////////
- it("toRadians", function() {
+ it('toRadians', function() {
expect(CesiumMath.toRadians(360.0)).toEqual(2 * Math.PI);
});
- it("cartographic3ToRadians", function() {
+ it('cartographic3ToRadians', function() {
var c = CesiumMath.cartographic3ToRadians(new Cartographic3(360.0, 180.0, 1.0));
expect(c.longitude).toEqual(2.0 * Math.PI);
expect(c.latitude).toEqual(Math.PI);
expect(c.height).toEqual(1.0);
});
- it("cartographic2ToRadians", function() {
+ it('cartographic2ToRadians', function() {
var c = CesiumMath.cartographic2ToRadians(new Cartographic2(180.0, 360.0));
expect(c.longitude).toEqual(Math.PI);
expect(c.latitude).toEqual(2.0 * Math.PI);
});
- it("toDegrees", function() {
+ it('toDegrees', function() {
expect(CesiumMath.toDegrees(Math.PI)).toEqual(180.0);
});
- it("cartographic3ToDegrees", function() {
+ it('cartographic3ToDegrees', function() {
var c = CesiumMath.cartographic3ToDegrees(new Cartographic3(2.0 * Math.PI, Math.PI, 1.0));
expect(c.longitude).toEqual(360.0);
expect(c.latitude).toEqual(180.0);
expect(c.height).toEqual(1.0);
});
- it("cartographic2ToDegrees", function() {
+ it('cartographic2ToDegrees', function() {
var c = CesiumMath.cartographic2ToDegrees(new Cartographic2(Math.PI, 2.0 * Math.PI));
expect(c.longitude).toEqual(180.0);
expect(c.latitude).toEqual(360.0);
});
- it("convertLongitudeRange (1)", function() {
+ it('convertLongitudeRange (1)', function() {
expect(CesiumMath.convertLongitudeRange(CesiumMath.THREE_PI_OVER_TWO)).toEqualEpsilon(-CesiumMath.PI_OVER_TWO, CesiumMath.EPSILON16);
});
- it("convertLongitudeRange (2)", function() {
+ it('convertLongitudeRange (2)', function() {
expect(CesiumMath.convertLongitudeRange(-Math.PI)).toEqualEpsilon(-Math.PI, CesiumMath.EPSILON16);
});
- it("convertLongitudeRange (3)", function() {
+ it('convertLongitudeRange (3)', function() {
expect(CesiumMath.convertLongitudeRange(Math.PI)).toEqualEpsilon(-Math.PI, CesiumMath.EPSILON16);
});
- it("negativePiToPi positive", function() {
+ it('negativePiToPi positive', function() {
expect(CesiumMath.negativePiToPi((Math.PI / 2) * Math.PI)).toEqualEpsilon((Math.PI / 2) * Math.PI - CesiumMath.TWO_PI, CesiumMath.EPSILON16);
expect(CesiumMath.negativePiToPi(Math.PI / 0.5)).toEqualEpsilon(0.0, CesiumMath.EPSILON16);
expect(CesiumMath.negativePiToPi(Math.PI + CesiumMath.EPSILON10)).toEqualEpsilon(Math.PI, CesiumMath.EPSILON16);
});
- it("negativePiToPi negative", function() {
+ it('negativePiToPi negative', function() {
expect(CesiumMath.negativePiToPi(-Math.PI / 0.5)).toEqualEpsilon(0.0, CesiumMath.EPSILON16);
expect(CesiumMath.negativePiToPi(-(Math.PI / 2) * Math.PI)).toEqualEpsilon(-(Math.PI / 2) * Math.PI + CesiumMath.TWO_PI, CesiumMath.EPSILON16);
expect(CesiumMath.negativePiToPi(-(Math.PI + CesiumMath.EPSILON10))).toEqualEpsilon(-Math.PI, CesiumMath.EPSILON16);
});
- it("negativePiToPi should not change", function() {
+ it('negativePiToPi should not change', function() {
expect(CesiumMath.negativePiToPi(Math.PI - 1)).toEqualEpsilon(Math.PI - 1, CesiumMath.EPSILON16);
expect(CesiumMath.negativePiToPi(-Math.PI + 1)).toEqualEpsilon(-Math.PI + 1, CesiumMath.EPSILON16);
});
diff --git a/Specs/Core/Matrix2Spec.js b/Specs/Core/Matrix2Spec.js
index bd73da2123f..e1f2961a31d 100644
--- a/Specs/Core/Matrix2Spec.js
+++ b/Specs/Core/Matrix2Spec.js
@@ -8,7 +8,7 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("construct0", function() {
+ it('construct0', function() {
var m = new Matrix2();
expect(m.getColumn0Row0()).toEqual(0);
expect(m.getColumn0Row1()).toEqual(0);
@@ -16,7 +16,7 @@ defineSuite([
expect(m.getColumn1Row1()).toEqual(0);
});
- it("construct1", function() {
+ it('construct1', function() {
var m = new Matrix2(1);
expect(m.getColumn0Row0()).toEqual(1);
expect(m.getColumn0Row1()).toEqual(0);
@@ -24,7 +24,7 @@ defineSuite([
expect(m.getColumn1Row1()).toEqual(1);
});
- it("construct2", function() {
+ it('construct2', function() {
var m = new Matrix2(1, 2,
3, 4);
expect(m.getColumn0Row0()).toEqual(1);
@@ -33,26 +33,26 @@ defineSuite([
expect(m.getColumn1Row1()).toEqual(4);
});
- it("creates a non-uniform scale matrix", function() {
+ it('creates a non-uniform scale matrix', function() {
var m = Matrix2.createNonUniformScale(new Cartesian2(1, 2));
expect(m.getColumn0().equals(new Cartesian2(1, 0))).toEqual(true);
expect(m.getColumn1().equals(new Cartesian2(0, 2))).toEqual(true);
});
- it("creates a uniform scale matrix", function() {
+ it('creates a uniform scale matrix', function() {
var m0 = Matrix2.createScale(2);
var m1 = Matrix2.createNonUniformScale(new Cartesian2(2, 2));
expect(m0.equals(m1)).toEqual(true);
});
- it("creates scale matrices without arguments", function() {
+ it('creates scale matrices without arguments', function() {
expect(Matrix2.createNonUniformScale().equals(new Matrix2())).toEqual(true);
expect(Matrix2.createScale().equals(new Matrix2())).toEqual(true);
});
- it("creates from a column major array", function() {
+ it('creates from a column major array', function() {
var values = [1, 2, 3, 4];
var m = Matrix2.fromColumnMajorArray(values);
@@ -62,15 +62,15 @@ defineSuite([
expect(m.getColumn1Row1()).toEqual(4);
});
- it("creates from a column major array 2", function() {
+ it('creates from a column major array 2', function() {
expect(Matrix2.fromColumnMajorArray().equals(new Matrix2())).toEqual(true);
});
- it("IDENTITY", function() {
+ it('IDENTITY', function() {
expect(Matrix2.IDENTITY.equals(new Matrix2(1))).toEqual(true);
});
- it("getColumnMajorValue0", function() {
+ it('getColumnMajorValue0', function() {
var m = new Matrix2(1, 2,
3, 4);
expect(m.getColumnMajorValue(0)).toEqual(1);
@@ -79,19 +79,19 @@ defineSuite([
expect(m.getColumnMajorValue(3)).toEqual(4);
});
- it("getColumnMajorValue1", function() {
+ it('getColumnMajorValue1', function() {
expect(function() {
new Matrix2().getColumnMajorValue(-1);
}).toThrow();
});
- it("getColumnMajorValue2", function() {
+ it('getColumnMajorValue2', function() {
expect(function() {
new Matrix2().getColumnMajorValue(4);
}).toThrow();
});
- it("gets individual columns", function() {
+ it('gets individual columns', function() {
var m = new Matrix2(1, 2,
4, 5);
@@ -99,12 +99,12 @@ defineSuite([
expect(m.getColumn1().equals(new Cartesian2(2, 5))).toEqual(true);
});
- it("gets individual columns 2", function() {
+ it('gets individual columns 2', function() {
expect(Matrix2.IDENTITY.getColumn0().equals(Cartesian2.UNIT_X)).toEqual(true);
expect(Matrix2.IDENTITY.getColumn1().equals(Cartesian2.UNIT_Y)).toEqual(true);
});
- it("sets individual columns", function() {
+ it('sets individual columns', function() {
var m = new Matrix2();
var c0 = new Cartesian2(1, 2);
var c1 = new Cartesian2(3, 4);
@@ -119,7 +119,7 @@ defineSuite([
2, 4))).toEqual(true);
});
- it("gets individual rows", function() {
+ it('gets individual rows', function() {
var m = new Matrix2(1, 2,
3, 4);
@@ -127,12 +127,12 @@ defineSuite([
expect(m.getRow1().equals(new Cartesian2(3, 4))).toEqual(true);
});
- it("gets individual rows 2", function() {
+ it('gets individual rows 2', function() {
expect(Matrix2.IDENTITY.getRow0().equals(Cartesian2.UNIT_X)).toEqual(true);
expect(Matrix2.IDENTITY.getRow1().equals(Cartesian2.UNIT_Y)).toEqual(true);
});
- it("sets individual rows", function() {
+ it('sets individual rows', function() {
var m = new Matrix2();
var c0 = new Cartesian2(1, 2);
var c1 = new Cartesian2(3, 4);
@@ -147,11 +147,11 @@ defineSuite([
3, 4))).toEqual(true);
});
- it("getNumberOfElements0", function() {
+ it('getNumberOfElements0', function() {
expect(Matrix2.getNumberOfElements()).toEqual(4);
});
- it("transpose", function() {
+ it('transpose', function() {
var m = new Matrix2(1, 2,
3, 4);
var mT = new Matrix2(1, 3,
@@ -161,7 +161,7 @@ defineSuite([
expect(m.transpose().transpose().equals(m)).toEqual(true);
});
- it("equals0", function() {
+ it('equals0', function() {
var m = new Matrix2(1, 2,
3, 4);
var m2 = new Matrix2(1, 2,
@@ -169,7 +169,7 @@ defineSuite([
expect(m.equals(m2)).toEqual(true);
});
- it("equals1", function() {
+ it('equals1', function() {
var m = new Matrix2(1, 2,
3, 4);
var m2 = new Matrix2(1, 9,
@@ -177,7 +177,7 @@ defineSuite([
expect(m.equals(m2)).toEqual(false);
});
- it("equalsEpsilon", function() {
+ it('equalsEpsilon', function() {
var m = new Matrix2(1, 2,
3, 4);
var m2 = new Matrix2(2, 3,
@@ -186,13 +186,13 @@ defineSuite([
expect(m.equalsEpsilon(m2, 0.5)).toEqual(false);
});
- it("toString", function() {
+ it('toString', function() {
var m = new Matrix2(1, 2,
3, 4);
- expect(m.toString()).toEqual("(1, 2)\n(3, 4)");
+ expect(m.toString()).toEqual('(1, 2)\n(3, 4)');
});
- it("throws when creating from a column major array without enough elements", function() {
+ it('throws when creating from a column major array without enough elements', function() {
var values = [1, 2,
3];
@@ -201,7 +201,7 @@ defineSuite([
}).toThrow();
});
- it("clone", function() {
+ it('clone', function() {
var m = new Matrix2(1.0, 2.0,
3.0, 4.0);
var n = m.clone();
diff --git a/Specs/Core/Matrix3Spec.js b/Specs/Core/Matrix3Spec.js
index 9e2ac5826f7..90afcedd672 100644
--- a/Specs/Core/Matrix3Spec.js
+++ b/Specs/Core/Matrix3Spec.js
@@ -8,7 +8,7 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("construct0", function() {
+ it('construct0', function() {
var m = new Matrix3();
expect(m.getColumn0Row0()).toEqual(0);
expect(m.getColumn0Row1()).toEqual(0);
@@ -21,7 +21,7 @@ defineSuite([
expect(m.getColumn2Row2()).toEqual(0);
});
- it("construct1", function() {
+ it('construct1', function() {
var m = new Matrix3(1);
expect(m.getColumn0Row0()).toEqual(1);
expect(m.getColumn0Row1()).toEqual(0);
@@ -34,7 +34,7 @@ defineSuite([
expect(m.getColumn2Row2()).toEqual(1);
});
- it("construct2", function() {
+ it('construct2', function() {
var m = new Matrix3(1, 2, 3,
4, 5, 6,
7, 8, 9);
@@ -49,7 +49,7 @@ defineSuite([
expect(m.getColumn2Row2()).toEqual(9);
});
- it("creates a non-uniform scale matrix", function() {
+ it('creates a non-uniform scale matrix', function() {
var m = Matrix3.createNonUniformScale(new Cartesian3(1, 2, 3));
expect(m.getColumn0().equals(new Cartesian3(1, 0, 0))).toEqual(true);
@@ -57,19 +57,19 @@ defineSuite([
expect(m.getColumn2().equals(new Cartesian3(0, 0, 3))).toEqual(true);
});
- it("creates a uniform scale matrix", function() {
+ it('creates a uniform scale matrix', function() {
var m0 = Matrix3.createScale(2);
var m1 = Matrix3.createNonUniformScale(new Cartesian3(2, 2, 2));
expect(m0.equals(m1)).toEqual(true);
});
- it("creates scale matrices without arguments", function() {
+ it('creates scale matrices without arguments', function() {
expect(Matrix3.createNonUniformScale().equals(new Matrix3())).toEqual(true);
expect(Matrix3.createScale().equals(new Matrix3())).toEqual(true);
});
- it("creates from a column major array", function() {
+ it('creates from a column major array', function() {
var values = [1, 2, 3,
4, 5, 6,
7, 8, 9];
@@ -86,15 +86,15 @@ defineSuite([
expect(m.getColumn2Row2()).toEqual(9);
});
- it("creates from a column major array 2", function() {
+ it('creates from a column major array 2', function() {
expect(Matrix3.fromColumnMajorArray().equals(new Matrix3())).toEqual(true);
});
- it("IDENTITY", function() {
+ it('IDENTITY', function() {
expect(Matrix3.IDENTITY.equals(new Matrix3(1))).toEqual(true);
});
- it("getColumnMajorValue0", function() {
+ it('getColumnMajorValue0', function() {
var m = new Matrix3(1, 2, 3,
4, 5, 6,
7, 8, 9);
@@ -109,19 +109,19 @@ defineSuite([
expect(m.getColumnMajorValue(8)).toEqual(9);
});
- it("getColumnMajorValue1", function() {
+ it('getColumnMajorValue1', function() {
expect(function() {
new Matrix3().getColumnMajorValue(-1);
}).toThrow();
});
- it("getColumnMajorValue2", function() {
+ it('getColumnMajorValue2', function() {
expect(function() {
new Matrix3().getColumnMajorValue(9);
}).toThrow();
});
- it("gets individual columns", function() {
+ it('gets individual columns', function() {
var m = new Matrix3(1, 2, 3,
4, 5, 6,
7, 8, 9);
@@ -131,13 +131,13 @@ defineSuite([
expect(m.getColumn2().equals(new Cartesian3(3, 6, 9))).toEqual(true);
});
- it("gets individual columns 2", function() {
+ it('gets individual columns 2', function() {
expect(Matrix3.IDENTITY.getColumn0().equals(Cartesian3.UNIT_X)).toEqual(true);
expect(Matrix3.IDENTITY.getColumn1().equals(Cartesian3.UNIT_Y)).toEqual(true);
expect(Matrix3.IDENTITY.getColumn2().equals(Cartesian3.UNIT_Z)).toEqual(true);
});
- it("sets individual columns", function() {
+ it('sets individual columns', function() {
var m = new Matrix3();
var c0 = new Cartesian3(1, 2, 3);
var c1 = new Cartesian3(4, 5, 6);
@@ -156,7 +156,7 @@ defineSuite([
3, 6, 9))).toEqual(true);
});
- it("gets individual rows", function() {
+ it('gets individual rows', function() {
var m = new Matrix3(1, 2, 3,
4, 5, 6,
7, 8, 9);
@@ -166,13 +166,13 @@ defineSuite([
expect(m.getRow2().equals(new Cartesian3(7, 8, 9))).toEqual(true);
});
- it("gets individual rows 2", function() {
+ it('gets individual rows 2', function() {
expect(Matrix3.IDENTITY.getRow0().equals(Cartesian3.UNIT_X)).toEqual(true);
expect(Matrix3.IDENTITY.getRow1().equals(Cartesian3.UNIT_Y)).toEqual(true);
expect(Matrix3.IDENTITY.getRow2().equals(Cartesian3.UNIT_Z)).toEqual(true);
});
- it("sets individual rows", function() {
+ it('sets individual rows', function() {
var m = new Matrix3();
var c0 = new Cartesian3(1, 2, 3);
var c1 = new Cartesian3(4, 5, 6);
@@ -191,11 +191,11 @@ defineSuite([
7, 8, 9))).toEqual(true);
});
- it("getNumberOfElements0", function() {
+ it('getNumberOfElements0', function() {
expect(Matrix3.getNumberOfElements()).toEqual(9);
});
- it("equals0", function() {
+ it('equals0', function() {
var m = new Matrix3(1, 2, 3,
4, 5, 6,
7, 8, 9);
@@ -205,7 +205,7 @@ defineSuite([
expect(m.equals(m2)).toEqual(true);
});
- it("equals1", function() {
+ it('equals1', function() {
var m = new Matrix3(1, 2, 3,
4, 5, 6,
7, 8, 9);
@@ -215,7 +215,7 @@ defineSuite([
expect(m.equals(m2)).toEqual(false);
});
- it("equalsEpsilon", function() {
+ it('equalsEpsilon', function() {
var m = new Matrix3(1, 2, 3,
4, 5, 6,
7, 8, 9);
@@ -226,14 +226,14 @@ defineSuite([
expect(m.equalsEpsilon(m2, 0.5)).toEqual(false);
});
- it("toString", function() {
+ it('toString', function() {
var m = new Matrix3(1, 2, 3,
4, 5, 6,
7, 8, 9);
- expect(m.toString()).toEqual("(1, 2, 3)\n(4, 5, 6)\n(7, 8, 9)");
+ expect(m.toString()).toEqual('(1, 2, 3)\n(4, 5, 6)\n(7, 8, 9)');
});
- it("transpose", function() {
+ it('transpose', function() {
var m = new Matrix3(1, 2, 3,
4, 5, 6,
7, 8, 9);
@@ -245,20 +245,20 @@ defineSuite([
expect(m.transpose().transpose().equals(m)).toEqual(true);
});
- it("multiplyWithVector0", function() {
+ it('multiplyWithVector0', function() {
var m = new Matrix3(1);
var v = new Cartesian3(1, 2, 3);
expect(m.multiplyWithVector(v).equals(v)).toEqual(true);
});
- it("multiplyWithVector1", function() {
+ it('multiplyWithVector1', function() {
var m = new Matrix3(2);
var v = new Cartesian3(1, 2, 3);
var u = new Cartesian3(2, 4, 6);
expect(m.multiplyWithVector(v).equals(u)).toEqual(true);
});
- it("negate", function() {
+ it('negate', function() {
var m = new Matrix3(1, 2, 3,
4, 5, 6,
7, 8, 9);
@@ -270,7 +270,7 @@ defineSuite([
expect(m.negate().negate().equals(m)).toEqual(true);
});
- it("multiplyWithMatrix", function() {
+ it('multiplyWithMatrix', function() {
var m = new Matrix3(1, 2, 3,
1, 2, 3,
1, 2, 3);
@@ -280,7 +280,7 @@ defineSuite([
expect(m.multiplyWithMatrix(m).equals(n)).toEqual(true);
});
- it("rotates around Z", function() {
+ it('rotates around Z', function() {
var theta = Math.PI / 3;
var s = Math.sin(theta);
var c = Math.cos(theta);
@@ -292,7 +292,7 @@ defineSuite([
expect(Matrix3.rotationAroundZ(theta).equals(m)).toEqual(true);
});
- it("rotates around Y", function() {
+ it('rotates around Y', function() {
var theta = Math.PI / 3;
var s = Math.sin(theta);
var c = Math.cos(theta);
@@ -304,7 +304,7 @@ defineSuite([
expect(Matrix3.rotationAroundY(theta).equals(m)).toEqual(true);
});
- it("rotates around X", function() {
+ it('rotates around X', function() {
var theta = Math.PI / 3;
var s = Math.sin(theta);
var c = Math.cos(theta);
@@ -316,25 +316,25 @@ defineSuite([
expect(Matrix3.rotationAroundX(theta).equals(m)).toEqual(true);
});
- it("fromAxisAngle (z)", function() {
+ it('fromAxisAngle (z)', function() {
var theta = Math.PI / 3;
var zAxis = new Cartesian3(0.0, 0.0, 1.0);
expect(Matrix3.fromAxisAngle(zAxis, theta).equals(Matrix3.rotationAroundZ(theta))).toEqual(true);
});
- it("fromAxisAngle (y)", function() {
+ it('fromAxisAngle (y)', function() {
var theta = Math.PI / 3;
var yAxis = new Cartesian3(0.0, 1.0, 0.0);
expect(Matrix3.fromAxisAngle(yAxis, theta).equals(Matrix3.rotationAroundY(theta))).toEqual(true);
});
- it("fromAxisAngle (x)", function() {
+ it('fromAxisAngle (x)', function() {
var theta = Math.PI / 3;
var xAxis = new Cartesian3(1.0, 0.0, 0.0);
expect(Matrix3.fromAxisAngle(xAxis, theta).equals(Matrix3.rotationAroundX(theta))).toEqual(true);
});
- it("throws when creating from a column major array without enough elements", function() {
+ it('throws when creating from a column major array without enough elements', function() {
var values = [1, 2, 3,
4, 5, 6,
7, 8];
@@ -344,7 +344,7 @@ defineSuite([
}).toThrow();
});
- it("clone", function() {
+ it('clone', function() {
var m = new Matrix3(1.0, 2.0, 3.0,
4.0, 5.0, 6.0,
7.0, 8.0, 9.0);
diff --git a/Specs/Core/Matrix4Spec.js b/Specs/Core/Matrix4Spec.js
index 5b4f1a6d3e8..008f350c57b 100644
--- a/Specs/Core/Matrix4Spec.js
+++ b/Specs/Core/Matrix4Spec.js
@@ -14,7 +14,7 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("construct0", function() {
+ it('construct0', function() {
var m = new Matrix4();
expect(m.getColumn0Row0()).toEqual(0);
expect(m.getColumn0Row1()).toEqual(0);
@@ -34,7 +34,7 @@ defineSuite([
expect(m.getColumn3Row3()).toEqual(0);
});
- it("construct1", function() {
+ it('construct1', function() {
var m = new Matrix4(1);
expect(m.getColumn0Row0()).toEqual(1);
expect(m.getColumn0Row1()).toEqual(0);
@@ -54,7 +54,7 @@ defineSuite([
expect(m.getColumn3Row3()).toEqual(1);
});
- it("construct2", function() {
+ it('construct2', function() {
var m = new Matrix4(new Matrix3(1, 2, 3,
4, 5, 6,
7, 8, 9), new Cartesian3(10, 11, 12));
@@ -77,7 +77,7 @@ defineSuite([
expect(m.getColumn3Row3()).toEqual(1);
});
- it("construct3", function() {
+ it('construct3', function() {
var m = new Matrix4( 1, 2, 3, 4,
5, 6, 7, 8,
9, 10, 11, 12,
@@ -101,7 +101,7 @@ defineSuite([
expect(m.getColumn3Row3()).toEqual(16);
});
- it("creates from a column major array", function() {
+ it('creates from a column major array', function() {
var values = [ 1, 2, 3, 4,
5, 6, 7, 8,
9, 10, 11, 12,
@@ -126,11 +126,11 @@ defineSuite([
expect(m.getColumn3Row3()).toEqual(16);
});
- it("creates from a column major array 2", function() {
+ it('creates from a column major array 2', function() {
expect(Matrix4.fromColumnMajorArray().equals(new Matrix4())).toEqual(true);
});
- it("creates a non-uniform scale matrix", function() {
+ it('creates a non-uniform scale matrix', function() {
var m = Matrix4.createNonUniformScale(new Cartesian3(1, 2, 3));
expect(m.getColumn0().equals(new Cartesian4(1, 0, 0, 0))).toEqual(true);
@@ -139,19 +139,19 @@ defineSuite([
expect(m.getColumn3().equals(new Cartesian4(0, 0, 0, 1))).toEqual(true);
});
- it("creates a uniform scale matrix", function() {
+ it('creates a uniform scale matrix', function() {
var m0 = Matrix4.createScale(2);
var m1 = Matrix4.createNonUniformScale(new Cartesian3(2, 2, 2));
expect(m0.equals(m1)).toEqual(true);
});
- it("creates scale matrices without arguments", function() {
+ it('creates scale matrices without arguments', function() {
expect(Matrix4.createNonUniformScale().equals(new Matrix4())).toEqual(true);
expect(Matrix4.createScale().equals(new Matrix4())).toEqual(true);
});
- it("creates a translation matrix", function() {
+ it('creates a translation matrix', function() {
var t = new Cartesian3(1, 2, 3);
var m = Matrix4.createTranslation(t);
expect(m.getColumn0Row0()).toEqual(1);
@@ -172,7 +172,7 @@ defineSuite([
expect(m.getColumn3Row3()).toEqual(1);
});
- it("creates a translation matrix without arguments", function() {
+ it('creates a translation matrix without arguments', function() {
var m = Matrix4.createTranslation();
expect(m.getColumn0Row0()).toEqual(0);
expect(m.getColumn0Row1()).toEqual(0);
@@ -192,11 +192,11 @@ defineSuite([
expect(m.getColumn3Row3()).toEqual(0);
});
- it("IDENTITY", function() {
+ it('IDENTITY', function() {
expect(Matrix4.IDENTITY.equals(new Matrix4(1))).toEqual(true);
});
- it("getColumnMajorValue0", function() {
+ it('getColumnMajorValue0', function() {
var m = new Matrix4( 1, 2, 3, 4,
5, 6, 7, 8,
9, 10, 11, 12,
@@ -220,19 +220,19 @@ defineSuite([
expect(m.getColumnMajorValue(15)).toEqual(16);
});
- it("getColumnMajorValue1", function() {
+ it('getColumnMajorValue1', function() {
expect(function() {
new Matrix4().getColumnMajorValue(-1);
}).toThrow();
});
- it("getColumnMajorValue2", function() {
+ it('getColumnMajorValue2', function() {
expect(function() {
new Matrix4().getColumnMajorValue(16);
}).toThrow();
});
- it("gets individual columns", function() {
+ it('gets individual columns', function() {
var m = new Matrix4( 1, 2, 3, 4,
5, 6, 7, 8,
9, 10, 11, 12,
@@ -244,14 +244,14 @@ defineSuite([
expect(m.getColumn3().equals(new Cartesian4(4, 8, 12, 16))).toEqual(true);
});
- it("gets individual columns 2", function() {
+ it('gets individual columns 2', function() {
expect(Matrix4.IDENTITY.getColumn0().equals(Cartesian4.UNIT_X)).toEqual(true);
expect(Matrix4.IDENTITY.getColumn1().equals(Cartesian4.UNIT_Y)).toEqual(true);
expect(Matrix4.IDENTITY.getColumn2().equals(Cartesian4.UNIT_Z)).toEqual(true);
expect(Matrix4.IDENTITY.getColumn3().equals(Cartesian4.UNIT_W)).toEqual(true);
});
- it("sets individual columns", function() {
+ it('sets individual columns', function() {
var m = new Matrix4();
var c0 = new Cartesian4(1, 2, 3, 4);
var c1 = new Cartesian4(5, 6, 7, 8);
@@ -274,7 +274,7 @@ defineSuite([
4, 8, 12, 16))).toEqual(true);
});
- it("gets individual rows", function() {
+ it('gets individual rows', function() {
var m = new Matrix4( 1, 2, 3, 4,
5, 6, 7, 8,
9, 10, 11, 12,
@@ -286,14 +286,14 @@ defineSuite([
expect(m.getRow3().equals(new Cartesian4(13, 14, 15, 16))).toEqual(true);
});
- it("gets individual rows 2", function() {
+ it('gets individual rows 2', function() {
expect(Matrix4.IDENTITY.getRow0().equals(Cartesian4.UNIT_X)).toEqual(true);
expect(Matrix4.IDENTITY.getRow1().equals(Cartesian4.UNIT_Y)).toEqual(true);
expect(Matrix4.IDENTITY.getRow2().equals(Cartesian4.UNIT_Z)).toEqual(true);
expect(Matrix4.IDENTITY.getRow3().equals(Cartesian4.UNIT_W)).toEqual(true);
});
- it("sets individual rows", function() {
+ it('sets individual rows', function() {
var m = new Matrix4();
var c0 = new Cartesian4(1, 2, 3, 4);
var c1 = new Cartesian4(5, 6, 7, 8);
@@ -316,11 +316,11 @@ defineSuite([
13, 14, 15, 16))).toEqual(true);
});
- it("getNumberOfElements0", function() {
+ it('getNumberOfElements0', function() {
expect(Matrix4.getNumberOfElements()).toEqual(16);
});
- it("equals0", function() {
+ it('equals0', function() {
var m = new Matrix4( 1, 2, 3, 4,
5, 6, 7, 8,
9, 10, 11, 12,
@@ -332,7 +332,7 @@ defineSuite([
expect(m.equals(m2)).toEqual(true);
});
- it("equals1", function() {
+ it('equals1', function() {
var m = new Matrix4( 1, 2, 3, 4,
5, 6, 7, 8,
9, 10, 11, 12,
@@ -344,7 +344,7 @@ defineSuite([
expect(m.equals(m2)).toEqual(false);
});
- it("equalsEpsilon", function() {
+ it('equalsEpsilon', function() {
var m = new Matrix4( 1, 2, 3, 4,
5, 6, 7, 8,
9, 10, 11, 12,
@@ -357,15 +357,15 @@ defineSuite([
expect(m.equalsEpsilon(m2, 0.5)).toEqual(false);
});
- it("toString", function() {
+ it('toString', function() {
var m = new Matrix4( 1, 2, 3, 4,
5, 6, 7, 8,
9, 10, 11, 12,
13, 14, 15, 16);
- expect(m.toString()).toEqual("(1, 2, 3, 4)\n(5, 6, 7, 8)\n(9, 10, 11, 12)\n(13, 14, 15, 16)");
+ expect(m.toString()).toEqual('(1, 2, 3, 4)\n(5, 6, 7, 8)\n(9, 10, 11, 12)\n(13, 14, 15, 16)');
});
- it("getRotation", function() {
+ it('getRotation', function() {
var r = new Matrix3(1, 2, 3,
4, 5, 6,
7, 8, 9);
@@ -375,7 +375,7 @@ defineSuite([
expect(r.equals(r2)).toEqual(true);
});
- it("getRotationTranspose", function() {
+ it('getRotationTranspose', function() {
var r = new Matrix3(1, 2, 3,
4, 5, 6,
7, 8, 9);
@@ -385,7 +385,7 @@ defineSuite([
expect(r.transpose().equals(r2)).toEqual(true);
});
- it("inverseTransformation0", function() {
+ it('inverseTransformation0', function() {
var m = new Matrix4(Matrix3.IDENTITY, Cartesian3.ZERO);
var mInverse = m.inverseTransformation();
@@ -396,7 +396,7 @@ defineSuite([
expect(v.equals(vv)).toEqual(true);
});
- it("inverseTransformation1", function() {
+ it('inverseTransformation1', function() {
var rotation = new Matrix3(1, 0, 0,
0, 0, 1,
0, 1, 0);
@@ -412,7 +412,7 @@ defineSuite([
expect(v.equals(vv)).toEqual(true);
});
- it("inverseTransformation2", function() {
+ it('inverseTransformation2', function() {
var rotation = new Matrix3(1, 0, 0,
0, 0, 1,
0, 1, 0);
@@ -424,21 +424,21 @@ defineSuite([
expect(Matrix4.IDENTITY.equals(mInverse.multiplyWithMatrix(m))).toEqual(true);
});
- it("inverse0", function() {
+ it('inverse0', function() {
var m = new Matrix4(Matrix3.IDENTITY, Cartesian3.ZERO);
var mInverse = m.inverse();
expect(Matrix4.IDENTITY.equals(mInverse.multiplyWithMatrix(m))).toEqual(true);
});
- it("inverse1", function() {
+ it('inverse1', function() {
var m = new Matrix4(Matrix3.IDENTITY, new Cartesian3(1, 2, 3));
var mInverse = m.inverse();
expect(Matrix4.IDENTITY.equals(mInverse.multiplyWithMatrix(m))).toEqual(true);
});
- it("inverse2", function() {
+ it('inverse2', function() {
var m = new Matrix4( 0.72, 0.70, 0.00, 0.00,
-0.40, 0.41, 0.82, 0.00,
0.57, -0.59, 0.57, -3.86,
@@ -448,7 +448,7 @@ defineSuite([
expect(Matrix4.IDENTITY.equalsEpsilon(mInverse.multiplyWithMatrix(m), CesiumMath.EPSILON10)).toEqual(true);
});
- it("inverse3", function() {
+ it('inverse3', function() {
expect(function() {
new Matrix4( 1.0, 2.0, 3.0, 4.0,
5.0, 6.0, 7.0, 8.0,
@@ -457,7 +457,7 @@ defineSuite([
}).toThrow();
});
- it("getTranslation", function() {
+ it('getTranslation', function() {
var t = new Cartesian3(1, 2, 3);
var m = new Matrix4(new Matrix3(), t);
var t2 = m.getTranslation();
@@ -465,7 +465,7 @@ defineSuite([
expect(t.equals(t2)).toEqual(true);
});
- it("transpose", function() {
+ it('transpose', function() {
var m = new Matrix4( 1, 2, 3, 4,
5, 6, 7, 8,
9, 10, 11, 12,
@@ -479,20 +479,20 @@ defineSuite([
expect(m.transpose().transpose().equals(m)).toEqual(true);
});
- it("multiplyWithVector0", function() {
+ it('multiplyWithVector0', function() {
var m = new Matrix4(1);
var v = new Cartesian4(1, 2, 3, 4);
expect(m.multiplyWithVector(v).equals(v)).toEqual(true);
});
- it("multiplyWithVector1", function() {
+ it('multiplyWithVector1', function() {
var m = new Matrix4(2);
var v = new Cartesian4(1, 2, 3, 4);
var u = new Cartesian4(2, 4, 6, 8);
expect(m.multiplyWithVector(v).equals(u)).toEqual(true);
});
- it("multiplyWithMatrix0", function() {
+ it('multiplyWithMatrix0', function() {
var zero = new Matrix4(0);
var m = new Matrix4( 1, 2, 3, 4,
5, 6, 7, 8,
@@ -501,7 +501,7 @@ defineSuite([
expect(zero.multiplyWithMatrix(m).equals(zero)).toEqual(true);
});
- it("multiplyWithMatrix1", function() {
+ it('multiplyWithMatrix1', function() {
var i = Matrix4.IDENTITY;
var m = new Matrix4( 1, 2, 3, 4,
5, 6, 7, 8,
@@ -510,7 +510,7 @@ defineSuite([
expect(i.multiplyWithMatrix(m).equals(m)).toEqual(true);
});
- it("multiplyWithMatrix2", function() {
+ it('multiplyWithMatrix2', function() {
var m = new Matrix4(1, 1, 1, 1,
1, 1, 1, 1,
1, 1, 1, 1,
@@ -522,7 +522,7 @@ defineSuite([
expect(m.multiplyWithMatrix(m).equals(result)).toEqual(true);
});
- it("negate", function() {
+ it('negate', function() {
var m = new Matrix4( 1, 2, 3, 4,
5, 6, 7, 8,
9, 10, 11, 12,
@@ -536,31 +536,31 @@ defineSuite([
expect(m.negate().negate().equals(m)).toEqual(true);
});
- it("createPerspectiveFieldOfView0", function() {
+ it('createPerspectiveFieldOfView0', function() {
expect(function() {
Matrix4.createPerspectiveFieldOfView(-1, 1, 1, 1);
}).toThrow();
});
- it("createPerspectiveFieldOfView1", function() {
+ it('createPerspectiveFieldOfView1', function() {
expect(function() {
Matrix4.createPerspectiveFieldOfView(CesiumMath.PI_OVER_TWO, 0, 1, 1);
}).toThrow();
});
- it("createPerspectiveFieldOfView2", function() {
+ it('createPerspectiveFieldOfView2', function() {
expect(function() {
Matrix4.createPerspectiveFieldOfView(CesiumMath.PI_OVER_TWO, 1, 0, 1);
}).toThrow();
});
- it("createPerspectiveFieldOfView3", function() {
+ it('createPerspectiveFieldOfView3', function() {
expect(function() {
Matrix4.createPerspectiveFieldOfView(CesiumMath.PI_OVER_TWO, 1, 1, 0);
}).toThrow();
});
- it("createPerspectiveFieldOfView4", function() {
+ it('createPerspectiveFieldOfView4', function() {
var mExpected = new Matrix4(1, 0, 0, 0,
0, 1, 0, 0,
0, 0, -1.22, -2.22,
@@ -570,7 +570,7 @@ defineSuite([
expect(mExpected.equalsEpsilon(m, CesiumMath.EPSILON2)).toEqual(true);
});
- it("createPerspectiveOffCenter", function() {
+ it('createPerspectiveOffCenter', function() {
var mExpected = new Matrix4(2, 0, 3, 0,
0, 2, 5, 0,
0, 0, -3, -4,
@@ -580,7 +580,7 @@ defineSuite([
expect(mExpected.equalsEpsilon(m, CesiumMath.EPSILON2)).toEqual(true);
});
- it("createInfinitePerspectiveOffCenter", function() {
+ it('createInfinitePerspectiveOffCenter', function() {
var mExpected = new Matrix4(2, 0, 3, 0,
0, 2, 5, 0,
0, 0, -1, -2,
@@ -590,7 +590,7 @@ defineSuite([
expect(mExpected.equalsEpsilon(m, CesiumMath.EPSILON2)).toEqual(true);
});
- it("createOrthographicOffCenter", function() {
+ it('createOrthographicOffCenter', function() {
var mExpected = new Matrix4(2, 0, 0, -1,
0, 2, 0, -5,
0, 0, -2, -1,
@@ -600,7 +600,7 @@ defineSuite([
expect(mExpected.equals(m)).toEqual(true);
});
- it("creates a viewport transformation", function() {
+ it('creates a viewport transformation', function() {
var mExpected = new Matrix4(2.0, 0.0, 0.0, 2.0,
0.0, 3.0, 0.0, 3.0,
0.0, 0.0, 1.0, 1.0,
@@ -615,14 +615,14 @@ defineSuite([
expect(mExpected.equals(m)).toEqual(true);
});
- it("createLookAt", function() {
+ it('createLookAt', function() {
var mExpected = new Matrix4(1);
var m = Matrix4.createLookAt(Cartesian3.ZERO, Cartesian3.UNIT_Z.negate(), Cartesian3.UNIT_Y);
expect(mExpected.equals(m)).toEqual(true);
});
- it("throws when creating from a column major array without enough elements", function() {
+ it('throws when creating from a column major array without enough elements', function() {
var values = [ 1, 2, 3, 4,
5, 6, 7, 8,
9, 10, 11, 12,
@@ -633,7 +633,7 @@ defineSuite([
}).toThrow();
});
- it("clone", function() {
+ it('clone', function() {
var m = new Matrix4( 1.0, 2.0, 3.0, 4.0,
5.0, 6.0, 7.0, 8.0,
9.0, 10.0, 11.0, 12.0,
diff --git a/Specs/Core/MeshFiltersSpec.js b/Specs/Core/MeshFiltersSpec.js
index 2c37e2d0445..722a715ec31 100644
--- a/Specs/Core/MeshFiltersSpec.js
+++ b/Specs/Core/MeshFiltersSpec.js
@@ -20,7 +20,7 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("converts triangles to wireframe in place", function() {
+ it('converts triangles to wireframe in place', function() {
var mesh = MeshFilters.toWireframeInPlace({
indexLists : [{
primitiveType : PrimitiveType.TRIANGLES,
@@ -48,7 +48,7 @@ defineSuite([
expect(v[11]).toEqual(3);
});
- it("converts a triangle fan to wireframe in place", function() {
+ it('converts a triangle fan to wireframe in place', function() {
var mesh = MeshFilters.toWireframeInPlace({
indexLists : [{
primitiveType : PrimitiveType.TRIANGLE_FAN,
@@ -76,7 +76,7 @@ defineSuite([
expect(v[11]).toEqual(0);
});
- it("converts a triangle strip to wireframe in place", function() {
+ it('converts a triangle strip to wireframe in place', function() {
var mesh = MeshFilters.toWireframeInPlace({
indexLists : [{
primitiveType : PrimitiveType.TRIANGLE_STRIP,
@@ -104,7 +104,7 @@ defineSuite([
expect(v[11]).toEqual(2);
});
- it("creates attribute indices", function() {
+ it('creates attribute indices', function() {
var mesh = {
attributes : {
position : {},
@@ -122,7 +122,7 @@ defineSuite([
expect(indices.position).not.toEqual(indices.color);
});
- it("maps attribute indices to different names", function() {
+ it('maps attribute indices to different names', function() {
var indices = {
positions : 0,
normals : 1,
@@ -130,9 +130,9 @@ defineSuite([
};
var mappedIndices = MeshFilters.mapAttributeIndices(indices, {
- positions : "position",
- normals : "normal",
- colors : "color"
+ positions : 'position',
+ normals : 'normal',
+ colors : 'color'
});
expect(mappedIndices.position).toEqual(indices.positions);
@@ -140,7 +140,7 @@ defineSuite([
expect(mappedIndices.color).toEqual(indices.colors);
});
- it("throws an exception when mesh properties have a different number of attributes", function() {
+ it('throws an exception when mesh properties have a different number of attributes', function() {
expect(function() {
var mesh = {};
mesh.attributes = {};
@@ -160,7 +160,7 @@ defineSuite([
}).toThrow();
});
- it("can reorder all indices and attributes for the pre vertex cahce", function() {
+ it('can reorder all indices and attributes for the pre vertex cahce', function() {
var mesh = {};
mesh.attributes = {};
mesh.indexLists = [];
@@ -178,7 +178,7 @@ defineSuite([
mesh.attributes.vertexNames = {
componentDatatype : ComponentDatatype.FLOAT,
componentsPerAttribute : 1,
- values : ["v0", "v1", "v2", "v3", "v4", "v5"]
+ values : ['v0', 'v1', 'v2', 'v3', 'v4', 'v5']
};
mesh.attributes.positions = {
@@ -202,12 +202,12 @@ defineSuite([
expect(mesh.indexLists[1].values[4]).toEqual(0);
expect(mesh.indexLists[1].values[5]).toEqual(3);
- expect(mesh.attributes.vertexNames.values[0]).toEqual("v5");
- expect(mesh.attributes.vertexNames.values[1]).toEqual("v3");
- expect(mesh.attributes.vertexNames.values[2]).toEqual("v2");
- expect(mesh.attributes.vertexNames.values[3]).toEqual("v0");
- expect(mesh.attributes.vertexNames.values[4]).toEqual("v1");
- expect(mesh.attributes.vertexNames.values[5]).toEqual("v4");
+ expect(mesh.attributes.vertexNames.values[0]).toEqual('v5');
+ expect(mesh.attributes.vertexNames.values[1]).toEqual('v3');
+ expect(mesh.attributes.vertexNames.values[2]).toEqual('v2');
+ expect(mesh.attributes.vertexNames.values[3]).toEqual('v0');
+ expect(mesh.attributes.vertexNames.values[4]).toEqual('v1');
+ expect(mesh.attributes.vertexNames.values[5]).toEqual('v4');
expect(mesh.attributes.positions.values[0]).toEqual(15);
expect(mesh.attributes.positions.values[1]).toEqual(16);
@@ -229,7 +229,7 @@ defineSuite([
expect(mesh.attributes.positions.values[17]).toEqual(14);
});
- it("can reorder indices for the post vertex cache", function() {
+ it('can reorder indices for the post vertex cache', function() {
var mesh = CubeMapEllipsoidTessellator.compute(new Ellipsoid(new Cartesian3(10.0, 10.0, 10.0)), 100);
var indices = mesh.indexLists[0].values;
var numIndices = indices.length;
@@ -251,7 +251,7 @@ defineSuite([
expect(ACMRafter).toBeLessThan(0.70);
});
- it("fitToUnsignedShortIndices doesn't change mesh", function() {
+ it('fitToUnsignedShortIndices does not change mesh', function() {
var mesh = {
attributes : {
time : {
@@ -277,7 +277,7 @@ defineSuite([
expect(meshes[0]).toBe(mesh);
});
- it("fitToUnsignedShortIndices creates one mesh", function() {
+ it('fitToUnsignedShortIndices creates one mesh', function() {
var sixtyFourK = 64 * 1024;
var times = [];
for ( var i = 0; i < sixtyFourK + 1; ++i) {
@@ -309,7 +309,7 @@ defineSuite([
expect(meshes[0].indexLists[0].values).toEqualArray([0, 0, 0, 1, 1, 1, 0, 1, 0]);
});
- it("fitToUnsignedShortIndices creates two meshes", function() {
+ it('fitToUnsignedShortIndices creates two meshes', function() {
var sixtyFourK = 64 * 1024;
var positions = [];
@@ -348,7 +348,7 @@ defineSuite([
expect(meshes[1].indexLists[0].values.length).toEqual(3);
});
- it("fitToUnsignedShortIndices throws without triangles", function() {
+ it('fitToUnsignedShortIndices throws without triangles', function() {
var mesh = {
attributes : {
time : {
@@ -369,7 +369,7 @@ defineSuite([
}).toThrow();
});
- it("fitToUnsignedShortIndices throws with different numbers of attributes", function() {
+ it('fitToUnsignedShortIndices throws with different numbers of attributes', function() {
var mesh = {
attributes : {
time : {
@@ -396,7 +396,7 @@ defineSuite([
}).toThrow();
});
- it("projectTo2D", function() {
+ it('projectTo2D', function() {
var p1 = new Cartesian3(1, 2, 3);
var p2 = new Cartesian3(4, 5, 6);
diff --git a/Specs/Core/OccluderSpec.js b/Specs/Core/OccluderSpec.js
index 5126524a251..4633b42d6c7 100644
--- a/Specs/Core/OccluderSpec.js
+++ b/Specs/Core/OccluderSpec.js
@@ -14,25 +14,25 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("throws an exception during construction (1 of 3)", function() {
+ it('throws an exception during construction (1 of 3)', function() {
expect(function() {
return new Occluder();
}).toThrow();
});
- it("throws an exception during construction (2 of 3)", function() {
+ it('throws an exception during construction (2 of 3)', function() {
expect(function() {
return new Occluder(new BoundingSphere(new Cartesian3(0, 0, 0)));
}).toThrow();
});
- it("throws an exception during construction (3 of 3)", function() {
+ it('throws an exception during construction (3 of 3)', function() {
expect(function() {
return new Occluder(new Cartesian3(0, 0, 0));
}).toThrow();
});
- it("can entirely eclipse a smaller occludee", function() {
+ it('can entirely eclipse a smaller occludee', function() {
var giantSphere = new BoundingSphere(new Cartesian3(0, 0, -1.5), 0.5);
var littleSphere = new BoundingSphere(new Cartesian3(0, 0, -2.75), 0.25);
var cameraPosition = Cartesian3.ZERO;
@@ -41,7 +41,7 @@ defineSuite([
expect(occluder.getVisibility(littleSphere)).toEqual(Visibility.NONE);
});
- it("can have a fully visible occludee", function() {
+ it('can have a fully visible occludee', function() {
var bigSphere = new BoundingSphere(new Cartesian3(0, 0, -1.5), 0.5);
var littleSphere = new BoundingSphere(new Cartesian3(0, 0, -2.75), 0.25);
var cameraPosition = Cartesian3.ZERO;
@@ -51,7 +51,7 @@ defineSuite([
expect(occluder.getVisibility(bigSphere)).toEqual(Visibility.FULL);
});
- it("blocks the occludee when both are aligned and the same size", function() {
+ it('blocks the occludee when both are aligned and the same size', function() {
var sphere1 = new BoundingSphere(new Cartesian3(0, 0, -1.5), 0.5);
var sphere2 = new BoundingSphere(new Cartesian3(0, 0, -2.5), 0.5);
var cameraPosition = Cartesian3.ZERO;
@@ -60,7 +60,7 @@ defineSuite([
expect(occluder.getVisibility(sphere2)).toEqual(Visibility.NONE);
});
- it("can have a fully visible occludee", function() {
+ it('can have a fully visible occludee', function() {
var sphere1 = new BoundingSphere(new Cartesian3(-1.25, 0, -1.5), 0.5);
var sphere2 = new BoundingSphere(new Cartesian3(1.25, 0, -1.5), 0.5);
var cameraPosition = Cartesian3.ZERO;
@@ -68,7 +68,7 @@ defineSuite([
expect(occluder.getVisibility(sphere2)).toEqual(Visibility.FULL);
});
- it("can partially block an occludee without intersecting", function() {
+ it('can partially block an occludee without intersecting', function() {
var cameraPosition = Cartesian3.ZERO;
var occluderBS = new BoundingSphere(new Cartesian3(0, 0, -2), 1);
var occluder = new Occluder(occluderBS, cameraPosition);
@@ -76,7 +76,7 @@ defineSuite([
expect(occluder.getVisibility(occludeeBS)).toEqual(Visibility.PARTIAL);
});
- it("can partially block an occludee when it intersects laterally", function() {
+ it('can partially block an occludee when it intersects laterally', function() {
var cameraPosition = Cartesian3.ZERO;
var occluderBS = new BoundingSphere(new Cartesian3(-0.5, 0, -1), 1);
var occluder = new Occluder(occluderBS, cameraPosition);
@@ -84,7 +84,7 @@ defineSuite([
expect(occluder.getVisibility(occludeeBS)).toEqual(Visibility.PARTIAL);
});
- it("can partially block an occludee when it intersects vertically", function() {
+ it('can partially block an occludee when it intersects vertically', function() {
var cameraPosition = Cartesian3.ZERO;
var occluderBS = new BoundingSphere(new Cartesian3(0, 0, -2), 1);
var occluder = new Occluder(occluderBS, cameraPosition);
@@ -92,7 +92,7 @@ defineSuite([
expect(occluder.getVisibility(occludeeBS)).toEqual(Visibility.PARTIAL);
});
- it("reports full visibility when occludee is larger than occluder", function() {
+ it('reports full visibility when occludee is larger than occluder', function() {
var littleSphere = new BoundingSphere(new Cartesian3(0, 0, -1.5), 0.5);
var bigSphere = new BoundingSphere(new Cartesian3(0, 0, -3), 1);
var cameraPosition = Cartesian3.ZERO;
@@ -100,13 +100,13 @@ defineSuite([
expect(occluder.getVisibility(bigSphere)).toEqual(Visibility.FULL);
});
- it("can throw errors during getOccludeePoint (1 of 5)", function() {
+ it('can throw errors during getOccludeePoint (1 of 5)', function() {
expect(function() {
Occluder.getOccludeePoint();
}).toThrow();
});
- it("can throw errors during getOccludeePoint (2 of 5)", function() {
+ it('can throw errors during getOccludeePoint (2 of 5)', function() {
var occluderBS = new BoundingSphere(new Cartesian3(0, 0, -5), 1);
var occludeePosition = new Cartesian3(0, 0, -5);
var positions = [];
@@ -116,7 +116,7 @@ defineSuite([
}).toThrow();
});
- it("can throw errors during getOccludeePoint (3 of 5)", function() {
+ it('can throw errors during getOccludeePoint (3 of 5)', function() {
var occluderBS = new BoundingSphere(new Cartesian3(0, 0, -5), 1);
var positions = [];
@@ -125,7 +125,7 @@ defineSuite([
}).toThrow();
});
- it("can throw errors during getOccludeePoint (4 of 5)", function() {
+ it('can throw errors during getOccludeePoint (4 of 5)', function() {
var occluderBS = new BoundingSphere(new Cartesian3(0, 0, -5), 1);
expect(function() {
@@ -133,7 +133,7 @@ defineSuite([
}).toThrow();
});
- it("can throw errors during getOccludeePoint (5 of 5)", function() {
+ it('can throw errors during getOccludeePoint (5 of 5)', function() {
var occluderBS = new BoundingSphere(new Cartesian3(0, 0, -5), 1);
expect(function() {
@@ -141,7 +141,7 @@ defineSuite([
}).toThrow();
});
- it("can compute an occludee point", function() {
+ it('can compute an occludee point', function() {
var occluderBS = new BoundingSphere(new Cartesian3(0, 0, -8), 2);
var positions = [new Cartesian3(-1.085, 0, -6.221), new Cartesian3(1.085, 0, -6.221)];
var tileOccluderSphere = new BoundingSphere(positions);
@@ -151,7 +151,7 @@ defineSuite([
expect(result.occludeePoint.equalsEpsilon(new Cartesian3(0, 0, -5), CesiumMath.EPSILON1)).toEqual(true);
});
- it("can compute a rotation vector (major axis = 0)", function() {
+ it('can compute a rotation vector (major axis = 0)', function() {
var cameraPosition = Cartesian3.ZERO;
var occluderBS = new BoundingSphere(new Cartesian3(5, 0, 0), 2);
var occluder = new Occluder(occluderBS, cameraPosition);
@@ -173,7 +173,7 @@ defineSuite([
expect(aRotationVector).toBeTruthy();
});
- it("can compute a rotation vector (major axis = 1)", function() {
+ it('can compute a rotation vector (major axis = 1)', function() {
var cameraPosition = Cartesian3.ZERO;
var occluderBS = new BoundingSphere(new Cartesian3(5, 0, 0), 2);
var occluder = new Occluder(occluderBS, cameraPosition);
@@ -195,7 +195,7 @@ defineSuite([
expect(aRotationVector).toBeTruthy();
});
- it("can compute a rotation vector (major axis = 2)", function() {
+ it('can compute a rotation vector (major axis = 2)', function() {
var cameraPosition = Cartesian3.ZERO;
var occluderBS = new BoundingSphere(new Cartesian3(5, 0, 0), 2);
var occluder = new Occluder(occluderBS, cameraPosition);
@@ -217,7 +217,7 @@ defineSuite([
expect(aRotationVector).toBeTruthy();
});
- it("can have an invisible occludee point", function() {
+ it('can have an invisible occludee point', function() {
var cameraPosition = new Cartesian3(0, 0, -8);
var occluderBS = new BoundingSphere(new Cartesian3(0, 0, -8), 2);
var occluder = new Occluder(occluderBS, cameraPosition);
@@ -234,7 +234,7 @@ defineSuite([
expect(occluder.getVisibility(bs)).toEqual(Visibility.NONE);
});
- it("can have a visible occludee point", function() {
+ it('can have a visible occludee point', function() {
var cameraPosition = new Cartesian3(3, 0, -8);
var occluderBS = new BoundingSphere(new Cartesian3(0, 0, -8), 2);
var occluder = new Occluder(occluderBS, cameraPosition);
diff --git a/Specs/Core/OrientationInterpolationSpec.js b/Specs/Core/OrientationInterpolationSpec.js
index b78eeeac89f..3190d3cce27 100644
--- a/Specs/Core/OrientationInterpolationSpec.js
+++ b/Specs/Core/OrientationInterpolationSpec.js
@@ -24,7 +24,7 @@ defineSuite([
}];
});
- it("constructor throws an exception with invalid control points", function() {
+ it('constructor throws an exception with invalid control points', function() {
expect(function() {
return new OrientationInterpolator();
}).toThrow();
@@ -38,19 +38,19 @@ defineSuite([
}).toThrow();
});
- it("get control points", function() {
+ it('get control points', function() {
var oi = new OrientationInterpolator(points);
expect(oi.getControlPoints()).toEqual(points);
});
- it("evaluate fails with undefined time", function() {
+ it('evaluate fails with undefined time', function() {
var oi = new OrientationInterpolator(points);
expect(function() {
oi.evaluate();
}).toThrow();
});
- it("evaluate fails with time out of range", function() {
+ it('evaluate fails with time out of range', function() {
var oi = new OrientationInterpolator(points);
expect(function() {
@@ -62,7 +62,7 @@ defineSuite([
}).toThrow();
});
- it("evaluate can jump around in time", function() {
+ it('evaluate can jump around in time', function() {
var oi = new OrientationInterpolator(points);
expect(oi.evaluate(points[0].time).equalsEpsilon(points[0].orientation, CesiumMath.EPSILON12)).toEqual(true);
@@ -80,14 +80,14 @@ defineSuite([
expect(oi.evaluate(points[0].time).equalsEpsilon(points[0].orientation, CesiumMath.EPSILON12)).toEqual(true);
});
- it("evaluate (1)", function() {
+ it('evaluate (1)', function() {
var oi = new OrientationInterpolator(points);
var actual = oi.evaluate((points[0].time + points[1].time) * 0.5);
var expected = new Quaternion(0.0, 0.0, Math.sin(Math.PI / 8.0), Math.cos(Math.PI / 8.0));
expect(actual.equalsEpsilon(expected, CesiumMath.EPSILON15)).toEqual(true);
});
- it("evaluate (2)", function() {
+ it('evaluate (2)', function() {
var oi = new OrientationInterpolator(points);
var actual = oi.evaluate(points[2].time);
var expected = new Quaternion(0.0, -1.0, 0.0, CesiumMath.toRadians(15.0));
diff --git a/Specs/Core/PlaneTessellatorSpec.js b/Specs/Core/PlaneTessellatorSpec.js
index d884dbb33b8..7f97dce0685 100644
--- a/Specs/Core/PlaneTessellatorSpec.js
+++ b/Specs/Core/PlaneTessellatorSpec.js
@@ -3,13 +3,13 @@ defineSuite(['Core/PlaneTessellator'], function(PlaneTessellator) {
"use strict";
/*global it,expect*/
- it("compute with default arguments", function() {
+ it('compute with default arguments', function() {
var m = PlaneTessellator.compute();
expect(m.indexLists[0].values.length).toEqual(2 * 3); // 2 triangles
});
- it("compute with arguments", function() {
+ it('compute with arguments', function() {
var m = PlaneTessellator.compute({
resolution : {
x : 4,
@@ -22,7 +22,7 @@ defineSuite(['Core/PlaneTessellator'], function(PlaneTessellator) {
expect(m.indexLists[0].values.length).toEqual(12 * 3); // 8 triangles
});
- it("compute with onInterpolation callback", function() {
+ it('compute with onInterpolation callback', function() {
var callbacks = [];
PlaneTessellator.compute({
@@ -50,7 +50,7 @@ defineSuite(['Core/PlaneTessellator'], function(PlaneTessellator) {
}]);
});
- it("throws if resolution is less than 1", function() {
+ it('throws if resolution is less than 1', function() {
expect(function() {
PlaneTessellator.compute({
resolution: {
diff --git a/Specs/Core/PolygonPipelineSpec.js b/Specs/Core/PolygonPipelineSpec.js
index 972cd89f8c6..30dc35ec065 100644
--- a/Specs/Core/PolygonPipelineSpec.js
+++ b/Specs/Core/PolygonPipelineSpec.js
@@ -18,7 +18,7 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("cleanUp removes duplicate points", function() {
+ it('cleanUp removes duplicate points', function() {
var positions = PolygonPipeline.cleanUp([
new Cartesian3(1.0, 1.0, 1.0),
new Cartesian3(2.0, 2.0, 2.0),
@@ -33,7 +33,7 @@ defineSuite([
]);
});
- it("cleanUp removes duplicate first and last points", function() {
+ it('cleanUp removes duplicate first and last points', function() {
var positions = PolygonPipeline.cleanUp([
new Cartesian3(1.0, 1.0, 1.0),
new Cartesian3(2.0, 2.0, 2.0),
@@ -48,13 +48,13 @@ defineSuite([
]);
});
- it("cleanUp throws without positions", function() {
+ it('cleanUp throws without positions', function() {
expect(function() {
PolygonPipeline.cleanUp();
}).toThrow();
});
- it("cleanUp throws without three positions", function() {
+ it('cleanUp throws without three positions', function() {
expect(function() {
PolygonPipeline.cleanUp([Cartesian3.ZERO, Cartesian3.ZERO]);
}).toThrow();
@@ -62,7 +62,7 @@ defineSuite([
///////////////////////////////////////////////////////////////////////
- it("EllipsoidTangentPlane projects a point", function() {
+ it('EllipsoidTangentPlane projects a point', function() {
var ellipsoid = Ellipsoid.WGS84;
var p = ellipsoid.toCartesian(Cartographic3.ZERO);
@@ -73,13 +73,13 @@ defineSuite([
expect(projectedP[0].equals(Cartesian2.ZERO)).toEqual(true);
});
- it("EllipsoidTangentPlane throws without ellipsoid", function() {
+ it('EllipsoidTangentPlane throws without ellipsoid', function() {
expect(function() {
return EllipsoidTangentPlane.create();
}).toThrow();
});
- it("EllipsoidTangentPlane throws without positions", function() {
+ it('EllipsoidTangentPlane throws without positions', function() {
var ellipsoid = Ellipsoid.WGS84;
expect(function() {
@@ -87,7 +87,7 @@ defineSuite([
}).toThrow();
});
- it("projectPointsOntoPlane throws without positions", function() {
+ it('projectPointsOntoPlane throws without positions', function() {
var ellipsoid = Ellipsoid.WGS84;
var p = ellipsoid.toCartesian(Cartographic3.ZERO);
var tangentPlane = EllipsoidTangentPlane.create(ellipsoid, [p]);
@@ -99,7 +99,7 @@ defineSuite([
///////////////////////////////////////////////////////////////////////
- it("computeArea2D computes a positive area", function() {
+ it('computeArea2D computes a positive area', function() {
var area = PolygonPipeline.computeArea2D([
new Cartesian2(0.0, 0.0),
new Cartesian2(2.0, 0.0),
@@ -110,7 +110,7 @@ defineSuite([
expect(area).toEqual(2.0);
});
- it("computeArea2D computes a negative area", function() {
+ it('computeArea2D computes a negative area', function() {
var area = PolygonPipeline.computeArea2D([
new Cartesian2(0.0, 0.0),
new Cartesian2(0.0, 2.0),
@@ -121,13 +121,13 @@ defineSuite([
expect(area).toEqual(-2.0);
});
- it("computeArea2D throws without positions", function() {
+ it('computeArea2D throws without positions', function() {
expect(function() {
PolygonPipeline.computeArea2D();
}).toThrow();
});
- it("computeArea2D throws without three positions", function() {
+ it('computeArea2D throws without three positions', function() {
expect(function() {
PolygonPipeline.computeArea2D([Cartesian3.ZERO, Cartesian3.ZERO]);
}).toThrow();
@@ -135,7 +135,7 @@ defineSuite([
///////////////////////////////////////////////////////////////////////
- it("computeWindingOrder2D computes counter-clockwise", function() {
+ it('computeWindingOrder2D computes counter-clockwise', function() {
var area = PolygonPipeline.computeWindingOrder2D([
new Cartesian2(0.0, 0.0),
new Cartesian2(2.0, 0.0),
@@ -146,7 +146,7 @@ defineSuite([
expect(area).toEqual(WindingOrder.COUNTER_CLOCKWISE);
});
- it("computeWindingOrder2D computes clockwise", function() {
+ it('computeWindingOrder2D computes clockwise', function() {
var area = PolygonPipeline.computeWindingOrder2D([
new Cartesian2(0.0, 0.0),
new Cartesian2(0.0, 2.0),
@@ -157,13 +157,13 @@ defineSuite([
expect(area).toEqual(WindingOrder.CLOCKWISE);
});
- it("computeWindingOrder2D throws without positions", function() {
+ it('computeWindingOrder2D throws without positions', function() {
expect(function() {
PolygonPipeline.computeWindingOrder2D();
}).toThrow();
});
- it("computeWindingOrder2D throws without three positions", function() {
+ it('computeWindingOrder2D throws without three positions', function() {
expect(function() {
PolygonPipeline.computeWindingOrder2D([Cartesian3.ZERO, Cartesian3.ZERO]);
}).toThrow();
@@ -171,19 +171,19 @@ defineSuite([
///////////////////////////////////////////////////////////////////////
- it("earClip2D triangulates a triangle", function() {
+ it('earClip2D triangulates a triangle', function() {
var indices = PolygonPipeline.earClip2D([new Cartesian2(0.0, 0.0), new Cartesian2(1.0, 0.0), new Cartesian2(0.0, 1.0)]);
expect(indices).toEqualArray([0, 1, 2]);
});
- it("earClip2D triangulates a square", function() {
+ it('earClip2D triangulates a square', function() {
var indices = PolygonPipeline.earClip2D([new Cartesian2(0.0, 0.0), new Cartesian2(1.0, 0.0), new Cartesian2(1.0, 1.0), new Cartesian2(0.0, 1.0)]);
expect(indices).toEqualArray([0, 1, 2, 0, 2, 3]);
});
- it("earClip2D triangulates simple concave", function() {
+ it('earClip2D triangulates simple concave', function() {
var positions = [new Cartesian2(0.0, 0.0), new Cartesian2(2.0, 0.0), new Cartesian2(2.0, 2.0), new Cartesian2(1.0, 0.25), new Cartesian2(0.0, 2.0)];
var indices = PolygonPipeline.earClip2D(positions);
@@ -191,7 +191,7 @@ defineSuite([
expect(indices).toEqualArray([1, 2, 3, 3, 4, 0, 0, 1, 3]);
});
- it("earClip2D triangulates complex concave", function() {
+ it('earClip2D triangulates complex concave', function() {
var positions = [new Cartesian2(0.0, 0.0), new Cartesian2(2.0, 0.0), new Cartesian2(2.0, 1.0), new Cartesian2(0.1, 1.5), new Cartesian2(2.0, 2.0), new Cartesian2(0.0, 2.0),
new Cartesian2(0.0, 1.0), new Cartesian2(1.9, 0.5)];
@@ -200,13 +200,13 @@ defineSuite([
expect(indices).toEqualArray([3, 4, 5, 3, 5, 6, 3, 6, 7, 7, 0, 1, 7, 1, 2, 2, 3, 7]);
});
- it("earClip2D throws without positions", function() {
+ it('earClip2D throws without positions', function() {
expect(function() {
PolygonPipeline.earClip2D();
}).toThrow();
});
- it("earClip2D throws without three positions", function() {
+ it('earClip2D throws without three positions', function() {
expect(function() {
PolygonPipeline.earClip2D([Cartesian2.ZERO, Cartesian2.ZERO]);
}).toThrow();
@@ -214,37 +214,37 @@ defineSuite([
///////////////////////////////////////////////////////////////////////
- it("computeSubdivision throws without positions", function() {
+ it('computeSubdivision throws without positions', function() {
expect(function() {
PolygonPipeline.computeSubdivision();
}).toThrow();
});
- it("computeSubdivision throws without indices", function() {
+ it('computeSubdivision throws without indices', function() {
expect(function() {
PolygonPipeline.computeSubdivision([]);
}).toThrow();
});
- it("computeSubdivision throws with less than 3 indices", function() {
+ it('computeSubdivision throws with less than 3 indices', function() {
expect(function() {
PolygonPipeline.computeSubdivision([], [1, 2]);
}).toThrow();
});
- it("computeSubdivision throws without a multiple of 3 indices", function() {
+ it('computeSubdivision throws without a multiple of 3 indices', function() {
expect(function() {
PolygonPipeline.computeSubdivision([], [1, 2, 3, 4]);
}).toThrow();
});
- it("computeSubdivision throws with negative granularity", function() {
+ it('computeSubdivision throws with negative granularity', function() {
expect(function() {
PolygonPipeline.computeSubdivision([], [1, 2, 3], -1.0);
}).toThrow();
});
- it("computeSubdivision", function() {
+ it('computeSubdivision', function() {
var positions = [
new Cartesian3(0.0, 0.0, 90.0),
new Cartesian3(0.0, 90.0, 0.0),
@@ -268,7 +268,7 @@ defineSuite([
expect(subdivision.indexLists[0].values[2]).toEqual(2);
});
- it("scaleToGeodeticHeight throws without ellipsoid", function() {
+ it('scaleToGeodeticHeight throws without ellipsoid', function() {
expect(function() {
PolygonPipeline.scaleToGeodeticHeight();
}).toThrow();
diff --git a/Specs/Core/PolylinePipelineSpec.js b/Specs/Core/PolylinePipelineSpec.js
index 76591e2e692..efe15196c42 100644
--- a/Specs/Core/PolylinePipelineSpec.js
+++ b/Specs/Core/PolylinePipelineSpec.js
@@ -10,7 +10,7 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("wrapLongitude", function() {
+ it('wrapLongitude', function() {
var ellipsoid = Ellipsoid.WGS84;
var p1 = new Cartographic2(-75.163789, 39.952335); // Philadelphia, PA
var p2 = new Cartographic2(-80.2264393, 25.7889689); // Miami, FL
diff --git a/Specs/Core/QuaternionSpec.js b/Specs/Core/QuaternionSpec.js
index 969d7fd2464..546371f2f52 100644
--- a/Specs/Core/QuaternionSpec.js
+++ b/Specs/Core/QuaternionSpec.js
@@ -14,7 +14,7 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("construct0", function() {
+ it('construct0', function() {
var q = new Quaternion();
expect(q.x).toEqual(0.0);
expect(q.y).toEqual(0.0);
@@ -22,7 +22,7 @@ defineSuite([
expect(q.w).toEqual(0.0);
});
- it("construct1", function() {
+ it('construct1', function() {
var q = new Quaternion(0.0, 1.0, 2.0, 1.0);
expect(q.x).toEqual(0.0);
expect(q.y).toEqual(1.0);
@@ -30,7 +30,7 @@ defineSuite([
expect(q.w).toEqual(1.0);
});
- it("construct2", function() {
+ it('construct2', function() {
var q = new Quaternion(0.0, 1.0, 2.0, 3.0);
expect(q.x).toEqual(0.0);
expect(q.y).toEqual(1.0);
@@ -38,13 +38,13 @@ defineSuite([
expect(q.w).toEqual(3.0);
});
- it("clone", function() {
+ it('clone', function() {
var q = new Quaternion(1.0, 2.0, 3.0, 4.0);
var r = q.clone();
expect(q.equals(r)).toEqual(true);
});
- it("ZERO", function() {
+ it('ZERO', function() {
var q = Quaternion.ZERO;
expect(q.x).toEqual(0.0);
expect(q.y).toEqual(0.0);
@@ -52,7 +52,7 @@ defineSuite([
expect(q.w).toEqual(0.0);
});
- it("IDENTITY", function() {
+ it('IDENTITY', function() {
var q = Quaternion.IDENTITY;
expect(q.x).toEqual(0.0);
expect(q.y).toEqual(0.0);
@@ -60,22 +60,22 @@ defineSuite([
expect(q.w).toEqual(1.0);
});
- it("conjugate", function() {
+ it('conjugate', function() {
var q = new Quaternion(1.0, 1.0, 1.0, 1.0).conjugate();
expect(q.equals(new Quaternion(-1.0, -1.0, -1.0, 1.0))).toEqual(true);
});
- it("normSquared", function() {
+ it('normSquared', function() {
var q = new Quaternion(2.0, 3.0, 4.0, 5.0);
expect(q.normSquared()).toEqual(54.0);
});
- it("norm", function() {
+ it('norm', function() {
var q = new Quaternion(2.0, 3.0, 4.0, 5.0);
expect(q.norm()).toEqual(Math.sqrt(54.0));
});
- it("normalize", function() {
+ it('normalize', function() {
var q = new Quaternion(0.0, 2.0, 0.0, 0.0).normalize();
expect(q.x).toEqual(0.0);
expect(q.y).toEqual(1.0);
@@ -83,7 +83,7 @@ defineSuite([
expect(q.w).toEqual(0.0);
});
- it("inverse", function() {
+ it('inverse', function() {
var q = new Quaternion(2.0, 3.0, 4.0, 5.0);
var normSquared = q.normSquared();
expect(q.inverse().equals(new Quaternion(
@@ -93,7 +93,7 @@ defineSuite([
5.0 / normSquared))).toEqual(true);
});
- it("unitInverseEqualsConjugate", function() {
+ it('unitInverseEqualsConjugate', function() {
var s = Math.sin(CesiumMath.PI_OVER_FOUR);
var c = Math.cos(CesiumMath.PI_OVER_FOUR);
var cartesian = new Cartesian3(1.0, 1.0, 1.0).normalize().multiplyWithScalar(s);
@@ -102,42 +102,42 @@ defineSuite([
expect(q.inverse().equals(q.conjugate())).toEqual(true);
});
- it("add", function() {
+ it('add', function() {
var q = new Quaternion(1.0, 2.0, 3.0, 4.0).add(new Quaternion(5.0, 6.0, 7.0, 8.0));
expect(q.equals(new Quaternion(6.0, 8.0, 10.0, 12.0))).toEqual(true);
});
- it("subtract", function() {
+ it('subtract', function() {
var q = new Quaternion(5.0, 6.0, 7.0, 8.0).subtract(new Quaternion(1.0, 2.0, 3.0, 4.0));
expect(q.equals(new Quaternion(4.0, 4.0, 4.0, 4.0))).toEqual(true);
});
- it("negate", function() {
+ it('negate', function() {
var q = new Quaternion(1.0, 2.0, 3.0, 4.0).negate();
expect(q.equals(new Quaternion(-1.0, -2.0, -3.0, -4.0))).toEqual(true);
});
- it("dot", function() {
+ it('dot', function() {
var s = new Quaternion(2.0, 3.0, 4.0, 5.0).dot(new Quaternion(6.0, 7.0, 8.0, 9.0));
expect(s).toEqual(2.0 * 6.0 + 3.0 * 7.0 + 4.0 * 8.0 + 5.0 * 9.0);
});
- it("multiply", function() {
+ it('multiply', function() {
var q = new Quaternion(1.0, 2.0, 3.0, 4.0).multiply(new Quaternion(1.0, 2.0, 3.0, 4.0));
expect(q.equals(new Quaternion(8.0, 16.0, 24.0, 2.0))).toEqual(true);
});
- it("multiplyWithScalar", function() {
+ it('multiplyWithScalar', function() {
var q = new Quaternion(1.0, 2.0, 3.0, 4.0).multiplyWithScalar(2.0);
expect(q.equals(new Quaternion(2.0, 4.0, 6.0, 8.0))).toEqual(true);
});
- it("divideByScalar", function() {
+ it('divideByScalar', function() {
var q = new Quaternion(2.0, 4.0, 6.0, 8.0).divideByScalar(2.0);
expect(q.equals(new Quaternion(1.0, 2.0, 3.0, 4.0))).toEqual(true);
});
- it("rotate", function() {
+ it('rotate', function() {
var s = Math.sin(CesiumMath.PI_OVER_FOUR);
var c = Math.cos(CesiumMath.PI_OVER_FOUR);
var cartesian = new Cartesian3(0.0, 0.0, 1.0).multiplyWithScalar(s);
@@ -147,7 +147,7 @@ defineSuite([
expect(q.rotate(xAxis).equalsEpsilon(yAxis, CesiumMath.EPSILON15)).toEqual(true);
});
- it("getAxis", function() {
+ it('getAxis', function() {
var s = Math.sin(CesiumMath.PI_OVER_FOUR);
var c = Math.cos(CesiumMath.PI_OVER_FOUR);
var cartesian = new Cartesian3(0.0, 0.0, 1.0).multiplyWithScalar(s);
@@ -157,7 +157,7 @@ defineSuite([
expect(q.getAxis().equals(Cartesian3.ZERO)).toEqual(true);
});
- it("getAngle", function() {
+ it('getAngle', function() {
var s = Math.sin(CesiumMath.PI_OVER_FOUR);
var c = Math.cos(CesiumMath.PI_OVER_FOUR);
var cartesian = new Cartesian3(0.0, 0.0, 1.0).multiplyWithScalar(s);
@@ -167,7 +167,7 @@ defineSuite([
expect(q.getAngle() === 0.0).toEqual(true);
});
- it("toRotationMatrix", function() {
+ it('toRotationMatrix', function() {
var sPiOver4 = Math.sin(CesiumMath.PI_OVER_FOUR);
var cPiOver4 = Math.cos(CesiumMath.PI_OVER_FOUR);
var sPiOver2 = Math.sin(CesiumMath.PI_OVER_TWO);
@@ -179,7 +179,7 @@ defineSuite([
expect(q.toRotationMatrix().equalsEpsilon(rotation, CesiumMath.EPSILON15)).toEqual(true);
});
- it("lerp", function() {
+ it('lerp', function() {
var q = new Quaternion(1.0, 2.0, 3.0, 4.0);
var r = new Quaternion(5.0, 6.0, 7.0, 8.0);
var t = 0.75;
@@ -189,7 +189,7 @@ defineSuite([
expect(q.lerp(t, r).equals(s)).toEqual(true);
});
- it("slerp", function() {
+ it('slerp', function() {
var q = new Quaternion(0.0, 0.0, 0.0, 1.0).normalize();
var cartesian1 = new Cartesian3(0.0, 0.0, Math.sin(CesiumMath.PI_OVER_FOUR));
var r = new Quaternion(cartesian1.x, cartesian1.y, cartesian1.z, Math.cos(CesiumMath.PI_OVER_FOUR));
@@ -200,7 +200,7 @@ defineSuite([
expect(q.slerp(0.5, r).equalsEpsilon(s, CesiumMath.EPSILON15)).toEqual(true);
});
- it("slerp (2)", function() {
+ it('slerp (2)', function() {
var q = new Quaternion(0.0, 0.0, 0.0, -1.0).normalize();
var cartesian1 = new Cartesian3(0.0, 0.0, Math.sin(CesiumMath.PI_OVER_FOUR));
var r = new Quaternion(cartesian1.x, cartesian1.y, cartesian1.z, Math.cos(CesiumMath.PI_OVER_FOUR));
@@ -208,7 +208,7 @@ defineSuite([
expect(q.slerp(1.0, r).equalsEpsilon(new Quaternion(0.0, 0.0, -Math.sqrt(2) / 2.0, -Math.sqrt(2) / 2.0), CesiumMath.EPSILON10)).toEqual(true);
});
- it("log", function() {
+ it('log', function() {
var s = Math.sin(CesiumMath.PI_OVER_FOUR);
var c = Math.cos(CesiumMath.PI_OVER_FOUR);
var cartesian = new Cartesian3(0.0, 0.0, 1.0).multiplyWithScalar(s);
@@ -216,7 +216,7 @@ defineSuite([
expect(q.log().equals(new Cartesian3(0.0, 0.0, CesiumMath.PI_OVER_FOUR)));
});
- it("power", function() {
+ it('power', function() {
var s = Math.sin(CesiumMath.PI_OVER_FOUR);
var c = Math.cos(CesiumMath.PI_OVER_FOUR);
var cartesian = new Cartesian3(0.0, 0.0, 1.0).multiplyWithScalar(s);
@@ -226,18 +226,18 @@ defineSuite([
expect(u.equalsEpsilon(v, CesiumMath.EPSILON15)).toEqual(true);
});
- it("equalsEpsilon", function() {
+ it('equalsEpsilon', function() {
expect(new Quaternion(1.0, 1.0, 2.0, 1.0).equalsEpsilon(new Quaternion(1.0, 1.0, 2.0, 1.0), 0.0)).toEqual(true);
expect(new Quaternion(1.0, 1.0, 2.0, 1.0).equalsEpsilon(new Quaternion(1.0, 1.0, 2.0, 2.0), 1.0)).toEqual(true);
expect(new Quaternion(1.0, 1.0, 2.0, 1.0).equalsEpsilon(new Quaternion(1.0, 1.0, 2.0, 3.0), 1.0)).toEqual(false);
});
- it("toString", function() {
+ it('toString', function() {
var q = new Quaternion(1.0, 2.0, 3.0, 4.0);
- expect(q.toString()).toEqual("(1, 2, 3, 4)");
+ expect(q.toString()).toEqual('(1, 2, 3, 4)');
});
- it("fromAxisAngle", function() {
+ it('fromAxisAngle', function() {
var axis = new Cartesian3(0.0, 0.0, 1.0);
var theta = CesiumMath.PI_OVER_TWO;
@@ -250,7 +250,7 @@ defineSuite([
expect(r.equals(q)).toEqual(true);
});
- it("fromRotationMatrix (1)", function() {
+ it('fromRotationMatrix (1)', function() {
var theta = CesiumMath.PI_OVER_TWO;
var sHalfTheta = Math.sin(theta / 2.0);
@@ -268,7 +268,7 @@ defineSuite([
expect(Quaternion.fromRotationMatrix(zRotation).equalsEpsilon(q, CesiumMath.EPSILON15)).toEqual(true);
});
- it("fromRotationMatrix (2)", function() {
+ it('fromRotationMatrix (2)', function() {
var theta = CesiumMath.PI_OVER_TWO;
var sHalfTheta = Math.sin(theta / 2.0);
@@ -286,7 +286,7 @@ defineSuite([
expect(Quaternion.fromRotationMatrix(yRotation).equalsEpsilon(q, CesiumMath.EPSILON15)).toEqual(true);
});
- it("fromRotationMatrix (3)", function() {
+ it('fromRotationMatrix (3)', function() {
var theta = CesiumMath.PI_OVER_TWO;
var sHalfTheta = Math.sin(theta / 2.0);
@@ -304,7 +304,7 @@ defineSuite([
expect(Quaternion.fromRotationMatrix(xRotation).equalsEpsilon(q, CesiumMath.EPSILON15)).toEqual(true);
});
- it("fromRotationMatrix (4)", function() {
+ it('fromRotationMatrix (4)', function() {
var theta = CesiumMath.PI_OVER_TWO;
var sHalfTheta = Math.sin(theta / 2.0);
@@ -338,7 +338,7 @@ defineSuite([
expect(Quaternion.fromRotationMatrix(xRotation).equalsEpsilon(q, CesiumMath.EPSILON15)).toEqual(true);
});
- it("fromRotationMatrix (5)", function() {
+ it('fromRotationMatrix (5)', function() {
var rotation = new Matrix3(1.0, 0.0, 0.0,
0.0, 1.0, 0.0,
0.0, 0.0, 1.0);
@@ -346,7 +346,7 @@ defineSuite([
expect(Quaternion.fromRotationMatrix(rotation).equalsEpsilon(q, CesiumMath.EPSILON15)).toEqual(true);
});
- it("exp", function() {
+ it('exp', function() {
var s = Math.sin(CesiumMath.PI_OVER_FOUR);
var c = Math.cos(CesiumMath.PI_OVER_FOUR);
var cartesian = new Cartesian3(0.0, 0.0, 1.0).multiplyWithScalar(s);
@@ -354,7 +354,7 @@ defineSuite([
expect(Quaternion.exp(new Cartesian3(0.0, 0.0, CesiumMath.PI_OVER_FOUR)).equals(q)).toEqual(true);
});
- it("matrixAndQuaternionfromAxisAngle", function() {
+ it('matrixAndQuaternionfromAxisAngle', function() {
var axis = new Cartesian3(1.0, 2.0, 3.0);
var angle = 2.0 * CesiumMath.PI_OVER_THREE;
var m = Matrix3.fromAxisAngle(axis, angle);
diff --git a/Specs/Core/RectangleSpec.js b/Specs/Core/RectangleSpec.js
index 531e3c5beb6..69139dc8c82 100644
--- a/Specs/Core/RectangleSpec.js
+++ b/Specs/Core/RectangleSpec.js
@@ -18,7 +18,7 @@ defineSuite([
new Cartesian2(-3, 3)
];
- it("default constructs", function() {
+ it('default constructs', function() {
var r = new Rectangle();
expect(r.x).toEqual(0.0);
expect(r.y).toEqual(0.0);
@@ -26,7 +26,7 @@ defineSuite([
expect(r.height).toEqual(0.0);
});
- it("constructs", function() {
+ it('constructs', function() {
var r = new Rectangle(1.0, 2.0, 3.0, 4.0);
expect(r.x).toEqual(1.0);
expect(r.y).toEqual(2.0);
@@ -34,7 +34,7 @@ defineSuite([
expect(r.height).toEqual(4.0);
});
- it("clones", function() {
+ it('clones', function() {
var r = new Rectangle(1.0, 2.0, 3.0, 4.0);
var r2 = r.clone();
r.x = 0.0;
@@ -43,26 +43,26 @@ defineSuite([
expect(r2.x).toEqual(1.0);
});
- it("equals (1)", function() {
+ it('equals (1)', function() {
expect(new Rectangle(1.0, 2.0, 3.0, 4.0).equals(new Rectangle(1.0, 2.0, 3.0, 4.0))).toEqual(true);
});
- it("equals (2)", function() {
+ it('equals (2)', function() {
expect(new Rectangle(1.0, 2.0, 3.0, 4.0).equals(new Rectangle(1.0, 2.0, 3.0, 0.0))).toEqual(false);
});
- it("equalsEpsilon", function() {
+ it('equalsEpsilon', function() {
expect(new Rectangle(1.0, 2.0, 3.0, 4.0).equalsEpsilon(new Rectangle(1.0, 2.0, 3.0, 4.0), 0.0)).toEqual(true);
expect(new Rectangle(1.0, 2.0, 3.0, 4.0).equalsEpsilon(new Rectangle(2.0, 2.0, 3.0, 4.0), 1.0)).toEqual(true);
expect(new Rectangle(1.0, 2.0, 3.0, 4.0).equalsEpsilon(new Rectangle(3.0, 2.0, 3.0, 4.0), 1.0)).toEqual(false);
});
- it("converts to a string", function() {
+ it('converts to a string', function() {
var r = new Rectangle(1, 2, 3, 4);
- expect(r.toString()).toEqual("(1, 2, 3, 4)");
+ expect(r.toString()).toEqual('(1, 2, 3, 4)');
});
- it("rectangleRectangleIntersect", function() {
+ it('rectangleRectangleIntersect', function() {
var rect1 = new Rectangle(0, 0, 4, 4);
var rect2 = new Rectangle(2, 2, 4, 4);
var rect3 = new Rectangle(5, 5, 4, 4);
@@ -70,7 +70,7 @@ defineSuite([
expect(Rectangle.rectangleRectangleIntersect(rect1, rect3)).toEqual(false);
});
- it("create axis aligned bounding rectangle", function() {
+ it('create axis aligned bounding rectangle', function() {
var rectangle = Rectangle.createAxisAlignedBoundingRectangle(positions);
expect(rectangle.x).toEqual(-3);
expect(rectangle.y).toEqual(-3);
@@ -78,7 +78,7 @@ defineSuite([
expect(rectangle.height).toEqual(6);
});
- it("creates the axis aligned bounding rectangle for a single position", function() {
+ it('creates the axis aligned bounding rectangle for a single position', function() {
var rectangle = Rectangle.createAxisAlignedBoundingRectangle([{
x : 1,
y : 2
@@ -90,13 +90,13 @@ defineSuite([
expect(rectangle.height).toEqual(0);
});
- it("throws an exception creating an axis aligned bounding rectangle with positions of length zero", function() {
+ it('throws an exception creating an axis aligned bounding rectangle with positions of length zero', function() {
expect(function() {
return Rectangle.createAxisAlignedBoundingRectangle([]);
}).toThrow();
});
- it("throws an exception when creating an axis aligned bounding rectangle without any positions", function() {
+ it('throws an exception when creating an axis aligned bounding rectangle without any positions', function() {
expect(function() {
return Rectangle.createAxisAlignedBoundingRectangle(undefined);
}).toThrow();
diff --git a/Specs/Core/ShapesSpec.js b/Specs/Core/ShapesSpec.js
index 3bbbdf812aa..ebf3182eefb 100755
--- a/Specs/Core/ShapesSpec.js
+++ b/Specs/Core/ShapesSpec.js
@@ -12,7 +12,7 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("computeCircleBoundary computes a closed loop", function() {
+ it('computeCircleBoundary computes a closed loop', function() {
var ellipsoid = Ellipsoid.WGS84;
var center = ellipsoid.toCartesian(Cartographic3.ZERO);
var positions = Shapes.computeCircleBoundary(ellipsoid, center, 1.0);
@@ -20,7 +20,7 @@ defineSuite([
expect(positions[0].equals(positions[positions.length - 1])).toEqual(true);
});
- it("computeCircleBoundary uses custom granularity", function() {
+ it('computeCircleBoundary uses custom granularity', function() {
var ellipsoid = Ellipsoid.WGS84;
var center = ellipsoid.toCartesian(Cartographic3.ZERO);
var positions = Shapes.computeCircleBoundary(ellipsoid, center, 1.0, CesiumMath.toRadians(60));
@@ -28,20 +28,20 @@ defineSuite([
expect(positions.length).toEqual(10);
});
- it("computeCircleBoundary throws without an ellipsoid", function() {
+ it('computeCircleBoundary throws without an ellipsoid', function() {
expect(function() {
Shapes.computeCircleBoundary();
}).toThrow();
});
- it("computeCircleBoundary throws without a center", function() {
+ it('computeCircleBoundary throws without a center', function() {
var ellipsoid = Ellipsoid.WGS84;
expect(function() {
Shapes.computeCircleBoundary(ellipsoid);
}).toThrow();
});
- it("computeCircleBoundary throws without a radius", function() {
+ it('computeCircleBoundary throws without a radius', function() {
var ellipsoid = Ellipsoid.WGS84;
var center = ellipsoid.toCartesian(Cartographic3.ZERO);
expect(function() {
@@ -49,7 +49,7 @@ defineSuite([
}).toThrow();
});
- it("computeCircleBoundary throws with a negative radius", function() {
+ it('computeCircleBoundary throws with a negative radius', function() {
var ellipsoid = Ellipsoid.WGS84;
var center = ellipsoid.toCartesian(Cartographic3.ZERO);
expect(function() {
@@ -57,7 +57,7 @@ defineSuite([
}).toThrow();
});
- it("computeCircleBoundary throws with a negative granularity", function() {
+ it('computeCircleBoundary throws with a negative granularity', function() {
var ellipsoid = Ellipsoid.WGS84;
var center = ellipsoid.toCartesian(Cartographic3.ZERO);
expect(function() {
@@ -65,7 +65,7 @@ defineSuite([
}).toThrow();
});
- it("computeEllipseBoundary computes a closed loop", function() {
+ it('computeEllipseBoundary computes a closed loop', function() {
var ellipsoid = Ellipsoid.WGS84;
var center = ellipsoid.toCartesian(Cartographic3.ZERO);
var positions = Shapes.computeEllipseBoundary(ellipsoid, center, 5.0, 1.0);
@@ -73,27 +73,27 @@ defineSuite([
expect(positions[0].equals(positions[positions.length - 1])).toEqual(true);
});
- it("computeEllipseBoundary can swap the semi major and minor axes", function() {
+ it('computeEllipseBoundary can swap the semi major and minor axes', function() {
var ellipsoid = Ellipsoid.WGS84;
var center = ellipsoid.toCartesian(Cartographic3.ZERO);
var points = Shapes.computeEllipseBoundary(ellipsoid, center, 1.0, 5.0);
expect(points.length).toBeGreaterThan(0);
});
- it("computeEllipseBoundary throws without an ellipsoid", function() {
+ it('computeEllipseBoundary throws without an ellipsoid', function() {
expect(function() {
Shapes.computeEllipseBoundary();
}).toThrow();
});
- it("computeEllipseBoundary throws without a center", function() {
+ it('computeEllipseBoundary throws without a center', function() {
var ellipsoid = Ellipsoid.WGS84;
expect(function() {
Shapes.computeEllipseBoundary(ellipsoid);
}).toThrow();
});
- it("computeEllipseBoundary throws without a semi-major axis", function() {
+ it('computeEllipseBoundary throws without a semi-major axis', function() {
var ellipsoid = Ellipsoid.WGS84;
var center = ellipsoid.toCartesian(Cartographic3.ZERO);
expect(function() {
@@ -101,7 +101,7 @@ defineSuite([
}).toThrow();
});
- it("computeEllipseBoundary with a negative axis length", function() {
+ it('computeEllipseBoundary with a negative axis length', function() {
var ellipsoid = Ellipsoid.WGS84;
var center = ellipsoid.toCartesian(Cartographic3.ZERO);
expect(function() {
@@ -112,7 +112,7 @@ defineSuite([
}).toThrow();
});
- it("computeEllipseBoundary throws with a negative granularity", function() {
+ it('computeEllipseBoundary throws with a negative granularity', function() {
var ellipsoid = Ellipsoid.WGS84;
var center = ellipsoid.toCartesian(Cartographic3.ZERO);
expect(function() {
diff --git a/Specs/Core/SunPositionSpec.js b/Specs/Core/SunPositionSpec.js
index 43bdc3e6c79..d472641da80 100644
--- a/Specs/Core/SunPositionSpec.js
+++ b/Specs/Core/SunPositionSpec.js
@@ -12,246 +12,246 @@ defineSuite([
"use strict";
/*global it,expect*/
- var date1 = new Date("January 15, 2012");
+ var date1 = new Date('January 15, 2012');
date1.setUTCHours(12, 0, 0, 0);
var julianDate1 = JulianDate.fromDate(date1);
- var date2 = new Date("February 15, 2012");
+ var date2 = new Date('February 15, 2012');
date2.setUTCHours(12, 0, 0, 0);
var julianDate2 = JulianDate.fromDate(date2);
- var date3 = new Date("March 3, 2011");
+ var date3 = new Date('March 3, 2011');
date3.setUTCHours(12, 0, 0, 0);
var julianDate3 = JulianDate.fromDate(date3);
- var date4 = new Date("April 15, 2012");
+ var date4 = new Date('April 15, 2012');
date4.setUTCHours(12, 0, 0, 0);
var julianDate4 = JulianDate.fromDate(date4);
- var date5 = new Date("May 15, 2012");
+ var date5 = new Date('May 15, 2012');
date5.setUTCHours(12, 0, 0, 0);
var julianDate5 = JulianDate.fromDate(date5);
- var date6 = new Date("June 22, 2011");
+ var date6 = new Date('June 22, 2011');
date6.setUTCHours(16, 0, 0, 0);
var julianDate6 = JulianDate.fromDate(date6);
- var date7 = new Date("July 6, 2012");
+ var date7 = new Date('July 6, 2012');
date7.setUTCHours(12, 0, 0, 0);
var julianDate7 = JulianDate.fromDate(date7);
- var date8 = new Date("August 29, 2012");
+ var date8 = new Date('August 29, 2012');
date8.setUTCHours(12, 0, 0, 0);
var julianDate8 = JulianDate.fromDate(date8);
- var date9 = new Date("September 22, 2011");
+ var date9 = new Date('September 22, 2011');
date9.setUTCHours(2, 0, 0, 0);
var julianDate9 = JulianDate.fromDate(date9);
- var date10 = new Date("October 1, 2012");
+ var date10 = new Date('October 1, 2012');
date10.setUTCHours(12, 0, 0, 0);
var julianDate10 = JulianDate.fromDate(date10);
- var date11 = new Date("November 24, 2012");
+ var date11 = new Date('November 24, 2012');
date11.setUTCHours(12, 0, 0, 0);
var julianDate11 = JulianDate.fromDate(date11);
- var date12 = new Date("December 3, 2011");
+ var date12 = new Date('December 3, 2011');
date12.setUTCHours(21, 0, 0, 0);
var julianDate12 = JulianDate.fromDate(date12);
var AU_TO_METERS = 149597870700.0;
var earthsRadius = 4.2634965 * CesiumMath.EPSILON5 * AU_TO_METERS;
- it("can correctly compute the distance from the earth to the sun (1)", function() {
+ it('can correctly compute the distance from the earth to the sun (1)', function() {
var sunPos = SunPosition.compute(julianDate1);
expect(sunPos.distance).toEqualEpsilon(147148431117.98, earthsRadius);
});
- it("can correctly compute the distance from the earth to the sun (2)", function() {
+ it('can correctly compute the distance from the earth to the sun (2)', function() {
var sunPos = SunPosition.compute(julianDate2);
expect(sunPos.distance).toEqualEpsilon(147753960797.35, earthsRadius);
});
- it("can correctly compute the distance from the earth to the sun (3)", function() {
+ it('can correctly compute the distance from the earth to the sun (3)', function() {
var sunPos = SunPosition.compute(julianDate3);
expect(sunPos.distance).toEqualEpsilon(148297002100.02, earthsRadius);
});
- it("can correctly compute the distance from the earth to the sun (4)", function() {
+ it('can correctly compute the distance from the earth to the sun (4)', function() {
var sunPos = SunPosition.compute(julianDate4);
expect(sunPos.distance).toEqualEpsilon(150111025763.77, earthsRadius);
});
- it("can correctly compute the distance from the earth to the sun (5)", function() {
+ it('can correctly compute the distance from the earth to the sun (5)', function() {
var sunPos = SunPosition.compute(julianDate5);
expect(sunPos.distance).toEqualEpsilon(151244858657.05, earthsRadius);
});
- it("can correctly compute the distance from the earth to the sun (6)", function() {
+ it('can correctly compute the distance from the earth to the sun (6)', function() {
var sunPos = SunPosition.compute(julianDate6);
expect(sunPos.distance).toEqualEpsilon(152038567856.43, earthsRadius);
});
- it("can correctly compute the distance from the earth to the sun (7)", function() {
+ it('can correctly compute the distance from the earth to the sun (7)', function() {
var sunPos = SunPosition.compute(julianDate7);
expect(sunPos.distance).toEqualEpsilon(152091959910.50, earthsRadius);
});
- it("can correctly compute the distance from the earth to the sun (8)", function() {
+ it('can correctly compute the distance from the earth to the sun (8)', function() {
var sunPos = SunPosition.compute(julianDate8);
expect(sunPos.distance).toEqualEpsilon(151056458099.59, earthsRadius);
});
- it("can correctly compute the distance from the earth to the sun (9)", function() {
+ it('can correctly compute the distance from the earth to the sun (9)', function() {
var sunPos = SunPosition.compute(julianDate9);
expect(sunPos.distance).toEqualEpsilon(150184436627.52, earthsRadius);
});
- it("can correctly compute the distance from the earth to the sun (10)", function() {
+ it('can correctly compute the distance from the earth to the sun (10)', function() {
var sunPos = SunPosition.compute(julianDate10);
expect(sunPos.distance).toEqualEpsilon(149744103802.39, earthsRadius);
});
- it("can correctly compute the distance from the earth to the sun (11)", function() {
+ it('can correctly compute the distance from the earth to the sun (11)', function() {
var sunPos = SunPosition.compute(julianDate11);
expect(sunPos.distance).toEqualEpsilon(147676653136.92, earthsRadius);
});
- it("can correctly compute the distance from the earth to the sun (12)", function() {
+ it('can correctly compute the distance from the earth to the sun (12)', function() {
var sunPos = SunPosition.compute(julianDate12);
expect(sunPos.distance).toEqualEpsilon(147462128000.55, earthsRadius);
});
- it("can correctly compute the sun's latitude (1)", function() {
+ it('can correctly compute latitude (1)', function() {
var sunPos = SunPosition.compute(julianDate1);
expect(sunPos.cartographicPosition.latitude).toEqualEpsilon(CesiumMath.toRadians(-21.18), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's latitude (2)", function() {
+ it('can correctly compute latitude (2)', function() {
var sunPos = SunPosition.compute(julianDate2);
expect(sunPos.cartographicPosition.latitude).toEqualEpsilon(CesiumMath.toRadians(-12.78), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's latitude (3)", function() {
+ it('can correctly compute latitude (3)', function() {
var sunPos = SunPosition.compute(julianDate3);
expect(sunPos.cartographicPosition.latitude).toEqualEpsilon(CesiumMath.toRadians(-6.85), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's latitude (4)", function() {
+ it('can correctly compute latitude (4)', function() {
var sunPos = SunPosition.compute(julianDate4);
expect(sunPos.cartographicPosition.latitude).toEqualEpsilon(CesiumMath.toRadians(10.01), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's latitude (5)", function() {
+ it('can correctly compute latitude (5)', function() {
var sunPos = SunPosition.compute(julianDate5);
expect(sunPos.cartographicPosition.latitude).toEqualEpsilon(CesiumMath.toRadians(19.03), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's latitude (6)", function() {
+ it('can correctly compute latitude (6)', function() {
var sunPos = SunPosition.compute(julianDate6);
expect(sunPos.cartographicPosition.latitude).toEqualEpsilon(CesiumMath.toRadians(23.44), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's latitude (7)", function() {
+ it('can correctly compute latitude (7)', function() {
var sunPos = SunPosition.compute(julianDate7);
expect(sunPos.cartographicPosition.latitude).toEqualEpsilon(CesiumMath.toRadians(22.61), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's latitude (8)", function() {
+ it('can correctly compute latitude (8)', function() {
var sunPos = SunPosition.compute(julianDate8);
expect(sunPos.cartographicPosition.latitude).toEqualEpsilon(CesiumMath.toRadians(9.11), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's latitude (9)", function() {
+ it('can correctly compute latitude (9)', function() {
var sunPos = SunPosition.compute(julianDate9);
expect(sunPos.cartographicPosition.latitude).toEqualEpsilon(CesiumMath.toRadians(0.50), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's latitude (10)", function() {
+ it('can correctly compute latitude (10)', function() {
var sunPos = SunPosition.compute(julianDate10);
expect(sunPos.cartographicPosition.latitude).toEqualEpsilon(CesiumMath.toRadians(-3.45), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's latitude (11)", function() {
+ it('can correctly compute latitude (11)', function() {
var sunPos = SunPosition.compute(julianDate11);
expect(sunPos.cartographicPosition.latitude).toEqualEpsilon(CesiumMath.toRadians(-20.68), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's latitude (12)", function() {
+ it('can correctly compute latitude (12)', function() {
var sunPos = SunPosition.compute(julianDate12);
expect(sunPos.cartographicPosition.latitude).toEqualEpsilon(CesiumMath.toRadians(-22.14), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's longitude (1)", function() {
+ it('can correctly compute longitude (1)', function() {
var sunPos = SunPosition.compute(julianDate1);
expect(sunPos.cartographicPosition.longitude).toEqualEpsilon(CesiumMath.toRadians(2.30), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's longitude (2)", function() {
+ it('can correctly compute longitude (2)', function() {
var sunPos = SunPosition.compute(julianDate2);
expect(sunPos.cartographicPosition.longitude).toEqualEpsilon(CesiumMath.toRadians(3.53), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's longitude (3)", function() {
+ it('can correctly compute longitude (3)', function() {
var sunPos = SunPosition.compute(julianDate3);
expect(sunPos.cartographicPosition.longitude).toEqualEpsilon(CesiumMath.toRadians(3.0), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's longitude (4)", function() {
+ it('can correctly compute longitude (4)', function() {
var sunPos = SunPosition.compute(julianDate4);
expect(sunPos.cartographicPosition.longitude).toEqualEpsilon(CesiumMath.toRadians(-0.02), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's longitude (5)", function() {
+ it('can correctly compute longitude (5)', function() {
var sunPos = SunPosition.compute(julianDate5);
expect(sunPos.cartographicPosition.longitude).toEqualEpsilon(CesiumMath.toRadians(-0.92), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's longitude (6)", function() {
+ it('can correctly compute longitude (6)', function() {
var sunPos = SunPosition.compute(julianDate6);
expect(sunPos.cartographicPosition.longitude).toEqualEpsilon(CesiumMath.toRadians(-59.51), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's longitude (7)", function() {
+ it('can correctly compute longitude (7)', function() {
var sunPos = SunPosition.compute(julianDate7);
expect(sunPos.cartographicPosition.longitude).toEqualEpsilon(CesiumMath.toRadians(1.21), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's longitude (8)", function() {
+ it('can correctly compute longitude (8)', function() {
var sunPos = SunPosition.compute(julianDate8);
expect(sunPos.cartographicPosition.longitude).toEqualEpsilon(CesiumMath.toRadians(0.20), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's longitude (9)", function() {
+ it('can correctly compute longitude (9)', function() {
var sunPos = SunPosition.compute(julianDate9);
expect(sunPos.cartographicPosition.longitude).toEqualEpsilon(CesiumMath.toRadians(148.24), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's longitude (10)", function() {
+ it('can correctly compute longitude (10)', function() {
var sunPos = SunPosition.compute(julianDate10);
expect(sunPos.cartographicPosition.longitude).toEqualEpsilon(CesiumMath.toRadians(-2.62), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's longitude (11)", function() {
+ it('can correctly compute longitude (11)', function() {
var sunPos = SunPosition.compute(julianDate11);
expect(sunPos.cartographicPosition.longitude).toEqualEpsilon(CesiumMath.toRadians(-3.29), CesiumMath.toRadians(1.0));
});
- it("can correctly compute the sun's longitude (12)", function() {
+ it('can correctly compute longitude (12)', function() {
var sunPos = SunPosition.compute(julianDate12);
expect(sunPos.cartographicPosition.longitude).toEqualEpsilon(CesiumMath.toRadians(-137.55), CesiumMath.toRadians(1.0));
});
- it("can compute the sun's position during a leap year", function() {
- var julianDate = JulianDate.fromDate(new Date("April 1, 2012 16:00:00 UTC"));
+ it('can compute position during a leap year', function() {
+ var julianDate = JulianDate.fromDate(new Date('April 1, 2012 16:00:00 UTC'));
var sunPos = SunPosition.compute(julianDate);
expect(sunPos.distance).toEqualEpsilon(149517419153.09, earthsRadius);
expect(sunPos.cartographicPosition.longitude).toEqualEpsilon(CesiumMath.toRadians(-59.08), CesiumMath.toRadians(1.0));
expect(sunPos.cartographicPosition.latitude).toEqualEpsilon(CesiumMath.toRadians(4.87), CesiumMath.toRadians(1.0));
});
- it("has matching cartographic and cartesian positions (1)", function() {
+ it('has matching cartographic and cartesian positions (1)', function() {
var ellipsoid = Ellipsoid.WGS84;
var sunPos = SunPosition.compute(julianDate6);
var position = sunPos.position.normalize();
@@ -260,7 +260,7 @@ defineSuite([
expect((cartesianPos).equalsEpsilon(position, CesiumMath.EPSILON2)).toEqual(true);
});
- it("has matching cartographic and cartesian positions (2)", function() {
+ it('has matching cartographic and cartesian positions (2)', function() {
var ellipsoid = Ellipsoid.WGS84;
var sunPos = SunPosition.compute(julianDate3);
var position = sunPos.position.normalize();
@@ -269,7 +269,7 @@ defineSuite([
expect((cartesianPos).equalsEpsilon(position, CesiumMath.EPSILON2)).toEqual(true);
});
- it("has matching cartographic and cartesian positions (3)", function() {
+ it('has matching cartographic and cartesian positions (3)', function() {
var ellipsoid = Ellipsoid.WGS84;
var sunPos = SunPosition.compute(julianDate3);
var position = sunPos.position.normalize();
@@ -278,7 +278,7 @@ defineSuite([
expect((cartesianPos).equalsEpsilon(position, CesiumMath.EPSILON2)).toEqual(true);
});
- it("has matching cartographic and cartesian positions (4)", function() {
+ it('has matching cartographic and cartesian positions (4)', function() {
var ellipsoid = Ellipsoid.WGS84;
var sunPos = SunPosition.compute(julianDate12);
var position = sunPos.position.normalize();
@@ -287,11 +287,11 @@ defineSuite([
expect((cartesianPos).equalsEpsilon(position, CesiumMath.EPSILON2)).toEqual(true);
});
- it("has the sun rising in the east and setting in the west", function() {
+ it('has the sun rising in the east and setting in the west', function() {
//Julian dates for 24 hours, starting from July 6th 2011 @ 01:00 UTC
var timesOfDay = [];
for ( var i = 1; i < 25; i++) {
- var date = new Date("July 6, 2011");
+ var date = new Date('July 6, 2011');
date.setUTCHours(i, 0, 0, 0);
timesOfDay.push(JulianDate.fromDate(date));
}
diff --git a/Specs/Core/TimeStandardSpec.js b/Specs/Core/TimeStandardSpec.js
index 1648e2b8eb7..f58eb3caa28 100644
--- a/Specs/Core/TimeStandardSpec.js
+++ b/Specs/Core/TimeStandardSpec.js
@@ -3,8 +3,8 @@ defineSuite(['Core/TimeStandard', 'Core/JulianDate'], function(TimeStandard, Jul
"use strict";
/*global it,expect*/
- it("can convert from UTC to TAI", function() {
- var date = new Date("July 11, 2011 12:00:00 UTC");
+ it('can convert from UTC to TAI', function() {
+ var date = new Date('July 11, 2011 12:00:00 UTC');
var julianDateUtc = JulianDate.fromDate(date, TimeStandard.UTC);
var julianDateTai = TimeStandard.convertUtcToTai(julianDateUtc);
@@ -13,8 +13,8 @@ defineSuite(['Core/TimeStandard', 'Core/JulianDate'], function(TimeStandard, Jul
expect(julianDateUtc.equals(julianDateTai)).toEqual(true);
});
- it("can convert from TAI to UTC", function() {
- var date = new Date("July 11, 2011 12:00:00 UTC");
+ it('can convert from TAI to UTC', function() {
+ var date = new Date('July 11, 2011 12:00:00 UTC');
var julianDateUtc = JulianDate.fromDate(date, TimeStandard.UTC);
var julianDateTai = TimeStandard.convertUtcToTai(julianDateUtc);
var julianDateUtc2 = TimeStandard.convertTaiToUtc(julianDateTai);
@@ -24,49 +24,49 @@ defineSuite(['Core/TimeStandard', 'Core/JulianDate'], function(TimeStandard, Jul
expect(julianDateUtc2.getSecondsOfDay()).toEqual(julianDateTai.getSecondsOfDay() - 34);
});
- it("returns the TAI date if convertUtcToTai is passed a TAI date", function() {
+ it('returns the TAI date if convertUtcToTai is passed a TAI date', function() {
var julianDate = JulianDate.fromDate(new Date(), TimeStandard.TAI);
var julianDateTai = TimeStandard.convertUtcToTai(julianDate);
expect(julianDate.equals(julianDateTai)).toEqual(true);
});
- it("returns the UTC date if convertTaiToUtc is passed a UTC date", function() {
+ it('returns the UTC date if convertTaiToUtc is passed a UTC date', function() {
var julianDate = JulianDate.fromDate(new Date(), TimeStandard.UTC);
var julianDateUtc = TimeStandard.convertTaiToUtc(julianDate);
expect(julianDate.equals(julianDateUtc)).toEqual(true);
});
- it("converting from a TAI leap second is undefined", function() {
+ it('converting from a TAI leap second is undefined', function() {
var julianDate = new JulianDate(2454832, 43233, TimeStandard.TAI);
var julianDateTai = TimeStandard.convertTaiToUtc(julianDate);
expect(julianDateTai).toEqual(undefined);
});
- it("throws an exception when converting from UTC to TAI with undefined JulianDate", function() {
+ it('throws an exception when converting from UTC to TAI with undefined JulianDate', function() {
expect(function() {
return TimeStandard.convertUtcToTai();
}).toThrow();
});
- it("throws an exception when converting from UTC to TAI with null JulianDate", function() {
+ it('throws an exception when converting from UTC to TAI with null JulianDate', function() {
expect(function() {
return TimeStandard.convertUtcToTai(null);
}).toThrow();
});
- it("throws an exception when converting from TAI to UTC with undefined JulianDate", function() {
+ it('throws an exception when converting from TAI to UTC with undefined JulianDate', function() {
expect(function() {
return TimeStandard.convertTaiToUtc();
}).toThrow();
});
- it("throws an exception when converting from TAI to UTC with null JulianDate", function() {
+ it('throws an exception when converting from TAI to UTC with null JulianDate', function() {
expect(function() {
return TimeStandard.convertTaiToUtc(null);
}).toThrow();
});
- it("convertUtcToTai throws an exception if time standard is not UTC", function() {
+ it('convertUtcToTai throws an exception if time standard is not UTC', function() {
var julianDate = new JulianDate(2454832, 43233);
julianDate._timeStandard = 404;
expect(function() {
@@ -74,7 +74,7 @@ defineSuite(['Core/TimeStandard', 'Core/JulianDate'], function(TimeStandard, Jul
}).toThrow();
});
- it("convertTaiToUtc throws an exception if time standard is not TAI", function() {
+ it('convertTaiToUtc throws an exception if time standard is not TAI', function() {
var julianDate = new JulianDate(2454832, 43233);
julianDate._timeStandard = 404;
expect(function() {
diff --git a/Specs/Core/TipsifySpec.js b/Specs/Core/TipsifySpec.js
index 9a5d4286fda..be8bbc75a19 100644
--- a/Specs/Core/TipsifySpec.js
+++ b/Specs/Core/TipsifySpec.js
@@ -6,19 +6,19 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("can calculate the ACMR", function() {
+ it('can calculate the ACMR', function() {
//Hexagon formed from 6 triangles, 7 vertices
expect(Tipsify.calculateACMR({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);
});
- it("can calculate the ACMR without a specified maximum index", function() {
+ it('can calculate the ACMR without a specified maximum index', function() {
expect(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);
});
- it("throws when calculating ACMR (1 of 4)", function() {
+ it('throws when calculating ACMR (1 of 4)', function() {
expect(function() {
Tipsify.calculateACMR({indices : null,
maximumIndex : 1,
@@ -26,7 +26,7 @@ defineSuite([
}).toThrow();
});
- it("throws when calculating ACMR (2 of 4)", function() {
+ it('throws when calculating ACMR (2 of 4)', function() {
expect(function() {
Tipsify.calculateACMR({indices : [1, 2, 3, 4],
maximumIndex : 1,
@@ -34,7 +34,7 @@ defineSuite([
}).toThrow();
});
- it("throws when calculating ACMR (3 of 4)", function() {
+ it('throws when calculating ACMR (3 of 4)', function() {
expect(function() {
Tipsify.calculateACMR({indices : [0, 1, 2],
maximumIndex : -1,
@@ -42,7 +42,7 @@ defineSuite([
}).toThrow();
});
- it("throws when calculating ACMR (4 of 4)", function() {
+ it('throws when calculating ACMR (4 of 4)', function() {
expect(function() {
Tipsify.calculateACMR({indices : [0, 1, 2],
maximumIndex : 2,
@@ -50,7 +50,7 @@ defineSuite([
}).toThrow();
});
- it("throws when executing Tipsify (1 of 5)", function() {
+ it('throws when executing Tipsify (1 of 5)', function() {
expect(function() {
Tipsify.tipsify({indices : null,
maximumIndex : 1,
@@ -58,7 +58,7 @@ defineSuite([
}).toThrow();
});
- it("throws when executing Tipsify (2 of 5)", function() {
+ it('throws when executing Tipsify (2 of 5)', function() {
expect(function() {
Tipsify.tipsify({indices : [1, 2, 3, 4],
maximumIndex : 1,
@@ -66,7 +66,7 @@ defineSuite([
}).toThrow();
});
- it("throws when executing Tipsify (3 of 5)", function () {
+ it('throws when executing Tipsify (3 of 5)', function () {
expect(function() {
Tipsify.tipsify({indices : [1, 2, 3],
maximumIndex : -1,
@@ -74,7 +74,7 @@ defineSuite([
}).toThrow();
});
- it("throws when executing Tipsify (4 of 5)", function() {
+ it('throws when executing Tipsify (4 of 5)', function() {
expect(function() {
Tipsify.tipsify({indices : [0, 1, 2],
maximumIndex : 2,
@@ -82,13 +82,13 @@ defineSuite([
}).toThrow();
});
- it("throws when executing Tipsify (5 of 5)", function() {
+ it('throws when executing Tipsify (5 of 5)', function() {
expect(function() {
Tipsify.tipsify();
}).toThrow();
});
- it("can lower ACMR using the Tipsify algorithm", function() {
+ it('can lower ACMR using the Tipsify algorithm', function() {
var 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];
@@ -104,7 +104,7 @@ defineSuite([
expect(acmrAfter).toBeLessThan(acmrBefore);
});
- it("can Tipsify without knowing the maximum index", function() {
+ it('can Tipsify without knowing the maximum index', function() {
var 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];
diff --git a/Specs/Core/TransformsSpec.js b/Specs/Core/TransformsSpec.js
index 2e3c819a165..c49411b643e 100644
--- a/Specs/Core/TransformsSpec.js
+++ b/Specs/Core/TransformsSpec.js
@@ -18,7 +18,7 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("creates an east-north-up-to-fixed-frame matrix", function() {
+ it('creates an east-north-up-to-fixed-frame matrix', function() {
var m = Transforms.eastNorthUpToFixedFrame(new Cartesian3(1.0, 0.0, 0.0), Ellipsoid.UNIT_SPHERE);
expect(m.getColumn0().equals(Cartesian4.UNIT_Y)).toEqual(true); // east
@@ -27,7 +27,7 @@ defineSuite([
expect(m.getColumn3().equals(new Cartesian4(1.0, 0.0, 0.0, 1.0))).toEqual(true); // translation
});
- it("creates an east-north-up-to-fixed-frame matrix at altitude", function() {
+ it('creates an east-north-up-to-fixed-frame matrix at altitude', function() {
var m = Transforms.eastNorthUpToFixedFrame(new Cartesian3(2.0, 0.0, 0.0), Ellipsoid.UNIT_SPHERE);
expect(m.getColumn0().equals(Cartesian4.UNIT_Y)).toEqual(true); // east
@@ -36,7 +36,7 @@ defineSuite([
expect(m.getColumn3().equals(new Cartesian4(2.0, 0.0, 0.0, 1.0))).toEqual(true); // translation
});
- it("creates an east-north-up-to-fixed-frame matrix 2", function() {
+ it('creates an east-north-up-to-fixed-frame matrix 2', function() {
var m = Transforms.eastNorthUpToFixedFrame(new Cartesian3(-1.0, 0.0, 0.0), Ellipsoid.UNIT_SPHERE);
expect(m.getColumn0().equals(Cartesian4.UNIT_Y.negate())).toEqual(true); // east
@@ -45,7 +45,7 @@ defineSuite([
expect(m.getColumn3().equals(new Cartesian4(-1.0, 0.0, 0.0, 1.0))).toEqual(true); // translation
});
- it("creates an east-north-up-to-fixed-frame matrix at north pole", function() {
+ it('creates an east-north-up-to-fixed-frame matrix at north pole', function() {
var m = Transforms.eastNorthUpToFixedFrame(new Cartesian3(0.0, 0.0, 1.0), Ellipsoid.UNIT_SPHERE);
expect(m.getColumn0().equals(Cartesian4.UNIT_Y)).toEqual(true); // east
@@ -54,7 +54,7 @@ defineSuite([
expect(m.getColumn3().equals(new Cartesian4(0.0, 0.0, 1.0, 1.0))).toEqual(true); // translation
});
- it("creates an east-north-up-to-fixed-frame matrix at south pole", function() {
+ it('creates an east-north-up-to-fixed-frame matrix at south pole', function() {
var m = Transforms.eastNorthUpToFixedFrame(new Cartesian3(0.0, 0.0, -1.0), Ellipsoid.UNIT_SPHERE);
expect(m.getColumn0().equals(Cartesian4.UNIT_Y)).toEqual(true); // east
@@ -63,7 +63,7 @@ defineSuite([
expect(m.getColumn3().equals(new Cartesian4(0.0, 0.0, -1.0, 1.0))).toEqual(true); // translation
});
- it("creates an north-east-down-to-fixed-frame matrix", function() {
+ it('creates an north-east-down-to-fixed-frame matrix', function() {
var m = Transforms.northEastDownToFixedFrame(new Cartesian3(1.0, 0.0, 0.0), Ellipsoid.UNIT_SPHERE);
expect(m.getColumn0().equals(Cartesian4.UNIT_Z)).toEqual(true); // north
@@ -72,7 +72,7 @@ defineSuite([
expect(m.getColumn3().equals(new Cartesian4(1.0, 0.0, 0.0, 1.0))).toEqual(true); // translation
});
- it("creates an north-east-down-to-fixed-frame matrix at altitude", function() {
+ it('creates an north-east-down-to-fixed-frame matrix at altitude', function() {
var m = Transforms.northEastDownToFixedFrame(new Cartesian3(2.0, 0.0, 0.0), Ellipsoid.UNIT_SPHERE);
expect(m.getColumn0().equals(Cartesian4.UNIT_Z)).toEqual(true); // north
@@ -81,7 +81,7 @@ defineSuite([
expect(m.getColumn3().equals(new Cartesian4(2.0, 0.0, 0.0, 1.0))).toEqual(true); // translation
});
- it("creates an north-east-down-to-fixed-frame matrix 2", function() {
+ it('creates an north-east-down-to-fixed-frame matrix 2', function() {
var m = Transforms.northEastDownToFixedFrame(new Cartesian3(-1.0, 0.0, 0.0), Ellipsoid.UNIT_SPHERE);
expect(m.getColumn0().equals(Cartesian4.UNIT_Z)).toEqual(true); // north
@@ -90,7 +90,7 @@ defineSuite([
expect(m.getColumn3().equals(new Cartesian4(-1.0, 0.0, 0.0, 1.0))).toEqual(true); // translation
});
- it("creates an north-east-down-to-fixed-frame matrix at north pole", function() {
+ it('creates an north-east-down-to-fixed-frame matrix at north pole', function() {
var m = Transforms.northEastDownToFixedFrame(new Cartesian3(0.0, 0.0, 1.0), Ellipsoid.UNIT_SPHERE);
expect(m.getColumn0().equals(Cartesian4.UNIT_X.negate())).toEqual(true); // north
@@ -99,7 +99,7 @@ defineSuite([
expect(m.getColumn3().equals(new Cartesian4(0.0, 0.0, 1.0, 1.0))).toEqual(true); // translation
});
- it("creates an north-east-down-to-fixed-frame matrix at south pole", function() {
+ it('creates an north-east-down-to-fixed-frame matrix at south pole', function() {
var m = Transforms.northEastDownToFixedFrame(new Cartesian3(0.0, 0.0, -1.0), Ellipsoid.UNIT_SPHERE);
expect(m.getColumn0().equals(Cartesian4.UNIT_X)).toEqual(true); // north
@@ -108,37 +108,37 @@ defineSuite([
expect(m.getColumn3().equals(new Cartesian4(0.0, 0.0, -1.0, 1.0))).toEqual(true); // translation
});
- it("creates an east-north-up-to-fixed-frame matrix without a position throws", function() {
+ it('creates an east-north-up-to-fixed-frame matrix without a position throws', function() {
expect(function() {
Transforms.eastNorthUpToFixedFrame();
}).toThrow();
});
- it("creates an north-east-down-to-fixed-fram matrix without a position throws", function() {
+ it('creates an north-east-down-to-fixed-fram matrix without a position throws', function() {
expect(function() {
Transforms.northEastDownToFixedFrame();
}).toThrow();
});
- it("transform point to window coordinates without a model-view-projection matrix throws", function() {
+ it('transform point to window coordinates without a model-view-projection matrix throws', function() {
expect(function() {
Transforms.pointToWindowCoordinates();
}).toThrow();
});
- it("transform point to window coordinates without a viewport transformation throws", function() {
+ it('transform point to window coordinates without a viewport transformation throws', function() {
expect(function() {
Transforms.pointToWindowCoordinates(Matrix4.IDENTITY);
}).toThrow();
});
- it("transform point to window coordinates without a point throws", function() {
+ it('transform point to window coordinates without a point throws', function() {
expect(function() {
Transforms.pointToWindowCoordinates(Matrix4.IDENTITY, Matrix4.IDENTITY);
}).toThrow();
});
- it("transform point to window coordinates center", function() {
+ it('transform point to window coordinates center', function() {
var width = 1024.0;
var height = 768.0;
var perspective = Matrix4.createPerspectiveFieldOfView(CesiumMath.toRadians(60.0), width / height, 1.0, 10.0);
@@ -153,7 +153,7 @@ defineSuite([
expect(Transforms.pointToWindowCoordinates(mvpMatrix, vpTransform, Cartesian3.ZERO)).toEqual(expected);
});
- it("transform point to window coordinates lower left", function() {
+ it('transform point to window coordinates lower left', function() {
var width = 1024.0;
var height = 768.0;
var perspective = Matrix4.createPerspectiveFieldOfView(CesiumMath.toRadians(60.0), width / height, 1.0, 10.0);
@@ -173,7 +173,7 @@ defineSuite([
expect(actual.equalsEpsilon(expected, CesiumMath.EPSILON12)).toEqual(true);
});
- it("transform point to window coordinates upper right", function() {
+ it('transform point to window coordinates upper right', function() {
var width = 1024.0;
var height = 768.0;
var perspective = Matrix4.createPerspectiveFieldOfView(CesiumMath.toRadians(60.0), width / height, 1.0, 10.0);
diff --git a/Specs/Core/TridiagonalSystemSolverSpec.js b/Specs/Core/TridiagonalSystemSolverSpec.js
index 7a77b54bc1f..08d90e6470c 100644
--- a/Specs/Core/TridiagonalSystemSolverSpec.js
+++ b/Specs/Core/TridiagonalSystemSolverSpec.js
@@ -10,49 +10,49 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("solve throws exception without lower diagonal", function() {
+ it('solve throws exception without lower diagonal', function() {
expect(function() {
TridiagonalSystemSolver.solve();
}).toThrow();
});
- it("solve throws exception without diagonal", function() {
+ it('solve throws exception without diagonal', function() {
expect(function() {
TridiagonalSystemSolver.solve([]);
}).toThrow();
});
- it("solve throws exception without upper diagonal", function() {
+ it('solve throws exception without upper diagonal', function() {
expect(function() {
TridiagonalSystemSolver.solve([], []);
}).toThrow();
});
- it("solve throws exception without rhs vector", function() {
+ it('solve throws exception without rhs vector', function() {
expect(function() {
TridiagonalSystemSolver.solve([], [], []);
}).toThrow();
});
- it("solve throws exception when rhs vector length is not equal to diagonal length", function() {
+ it('solve throws exception when rhs vector length is not equal to diagonal length', function() {
expect(function() {
TridiagonalSystemSolver.solve([], [], [], [1]);
}).toThrow();
});
- it("solve throws exception when lower diagonal length is not equal to upper diagonal length", function() {
+ it('solve throws exception when lower diagonal length is not equal to upper diagonal length', function() {
expect(function() {
TridiagonalSystemSolver.solve([1], [1], [], [1]);
}).toThrow();
});
- it("solve throws exception when lower/upper diagonal length is not one less than diagonal length", function() {
+ it('solve throws exception when lower/upper diagonal length is not one less than diagonal length', function() {
expect(function() {
TridiagonalSystemSolver.solve([1], [1], [1], [1]);
}).toThrow();
});
- it("solve three unknowns", function() {
+ it('solve three unknowns', function() {
var l = [1.0, 1.0];
var d = [-2.175, -2.15, -2.125];
var u = [1.0, 1.0];
@@ -69,7 +69,7 @@ defineSuite([
expect(actual[2].equalsEpsilon(expected[2], CesiumMath.EPSILON4)).toEqual(true);
});
- it("solve nine unknowns", function() {
+ it('solve nine unknowns', function() {
var l = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0];
var d = [-2.0304, -2.0288, -2.0272, -2.0256, -2.0240, -2.0224, -2.0208, -2.0192, -2.0176];
var u = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0];
diff --git a/Specs/Core/binarySearchSpec.js b/Specs/Core/binarySearchSpec.js
index eecfe4559c0..becb0a7c06a 100644
--- a/Specs/Core/binarySearchSpec.js
+++ b/Specs/Core/binarySearchSpec.js
@@ -3,7 +3,7 @@ defineSuite(['Core/binarySearch'], function(binarySearch) {
"use strict";
/*global it,expect*/
- it("can perform a binary search (1)", function() {
+ it('can perform a binary search (1)', function() {
var array = [0, 1, 2, 3, 4, 5, 6, 7];
var toFind = 2;
var index = binarySearch(array, toFind, function(a, b) {
@@ -12,7 +12,7 @@ defineSuite(['Core/binarySearch'], function(binarySearch) {
expect(index).toEqual(2);
});
- it("can perform a binary search (2)", function() {
+ it('can perform a binary search (2)', function() {
var array = [0, 1, 2, 3, 4, 5, 6, 7];
var toFind = 7;
var index = binarySearch(array, toFind, function(a, b) {
@@ -21,7 +21,7 @@ defineSuite(['Core/binarySearch'], function(binarySearch) {
expect(index).toEqual(7);
});
- it("can perform a binary search (3)", function() {
+ it('can perform a binary search (3)', function() {
var array = [0, 1, 2, 3, 4, 5, 6, 7];
var toFind = 10;
var index = binarySearch(array, toFind, function(a, b) {
@@ -30,19 +30,19 @@ defineSuite(['Core/binarySearch'], function(binarySearch) {
expect(index < 0).toEqual(true);
});
- it("throws an exception if array is missing", function() {
+ it('throws an exception if array is missing', function() {
expect(function() {
binarySearch();
}).toThrow();
});
- it("throws an exception if itemToFind is missing", function() {
+ it('throws an exception if itemToFind is missing', function() {
expect(function() {
binarySearch([0, 1, 2]);
}).toThrow();
});
- it("throws an exception if comparator is missing", function() {
+ it('throws an exception if comparator is missing', function() {
expect(function() {
binarySearch([0, 1, 2], 1);
}).toThrow();
diff --git a/Specs/Core/combineSpec.js b/Specs/Core/combineSpec.js
index 167126d16e3..fbe59a9239e 100644
--- a/Specs/Core/combineSpec.js
+++ b/Specs/Core/combineSpec.js
@@ -6,7 +6,7 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("combine throws with duplicate member", function() {
+ it('combine throws with duplicate member', function() {
expect(function() {
combine({
x : 1,
@@ -18,7 +18,7 @@ defineSuite([
}).toThrow();
});
- it("combine", function() {
+ it('combine', function() {
var obj1 = {
x : 1,
y : 2
diff --git a/Specs/Core/createGuidSpec.js b/Specs/Core/createGuidSpec.js
index 137091705c4..c49cc130132 100644
--- a/Specs/Core/createGuidSpec.js
+++ b/Specs/Core/createGuidSpec.js
@@ -3,7 +3,7 @@ defineSuite(['Core/createGuid'], function(createGuid) {
"use strict";
/*global it,expect*/
- it("creates GUIDs", function() {
+ it('creates GUIDs', function() {
var 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
diff --git a/Specs/Core/isLeapYearSpec.js b/Specs/Core/isLeapYearSpec.js
index 71bbc71a9be..f057772472a 100644
--- a/Specs/Core/isLeapYearSpec.js
+++ b/Specs/Core/isLeapYearSpec.js
@@ -3,7 +3,7 @@ defineSuite(['Core/isLeapYear'], function(isLeapYear) {
"use strict";
/*global it,expect*/
- it("Check for valid leap years", function() {
+ it('Check for valid leap years', function() {
expect(isLeapYear(2000)).toEqual(true);
expect(isLeapYear(2004)).toEqual(true);
expect(isLeapYear(2003)).toEqual(false);
@@ -13,21 +13,21 @@ defineSuite(['Core/isLeapYear'], function(isLeapYear) {
expect(isLeapYear(-2000)).toEqual(true);
});
- it("Fail with null value", function() {
+ it('Fail with null value', function() {
expect(function() {
isLeapYear(null);
}).toThrow();
});
- it("Fail with undefined value", function() {
+ it('Fail with undefined value', function() {
expect(function() {
isLeapYear(undefined);
}).toThrow();
});
- it("Fail with non-numerical value", function() {
+ it('Fail with non-numerical value', function() {
expect(function() {
- isLeapYear("asd");
+ isLeapYear('asd');
}).toThrow();
});
});
\ No newline at end of file
diff --git a/Specs/Core/pointInsideTriangle2DSpec.js b/Specs/Core/pointInsideTriangle2DSpec.js
index 0a5353608d3..ccbd85a6ca9 100644
--- a/Specs/Core/pointInsideTriangle2DSpec.js
+++ b/Specs/Core/pointInsideTriangle2DSpec.js
@@ -8,49 +8,49 @@ defineSuite([
"use strict";
/*global it,expect*/
- it("pointInsideTriangle2D has point inside", function() {
+ it('pointInsideTriangle2D has point inside', function() {
expect(pointInsideTriangle2D(new Cartesian2(0.25, 0.25), Cartesian2.ZERO, new Cartesian2(1.0, 0.0), new Cartesian2(0.0, 1.0))).toEqual(true);
});
- it("pointInsideTriangle2D has point outside", function() {
+ it('pointInsideTriangle2D has point outside', function() {
expect(pointInsideTriangle2D(new Cartesian2(1.0, 1.0), Cartesian2.ZERO, new Cartesian2(1.0, 0.0), new Cartesian2(0.0, 1.0))).toEqual(false);
});
- it("pointInsideTriangle2D has point outside (2)", function() {
+ it('pointInsideTriangle2D has point outside (2)', function() {
expect(pointInsideTriangle2D(new Cartesian2(0.5, -0.5), Cartesian2.ZERO, new Cartesian2(1.0, 0.0), new Cartesian2(0.0, 1.0))).toEqual(false);
});
- it("pointInsideTriangle2D has point outside (3)", function() {
+ it('pointInsideTriangle2D has point outside (3)', function() {
expect(pointInsideTriangle2D(new Cartesian2(-0.5, 0.5), Cartesian2.ZERO, new Cartesian2(1.0, 0.0), new Cartesian2(0.0, 1.0))).toEqual(false);
});
- it("pointInsideTriangle2D has point on corner", function() {
+ it('pointInsideTriangle2D has point on corner', function() {
expect(pointInsideTriangle2D(Cartesian2.ZERO, Cartesian2.ZERO, new Cartesian2(1.0, 0.0), new Cartesian2(0.0, 1.0))).toEqual(false);
});
- it("pointInsideTriangle2D has point inside on edge", function() {
+ it('pointInsideTriangle2D has point inside on edge', function() {
expect(pointInsideTriangle2D(new Cartesian2(0.5, 0.0), Cartesian2.ZERO, new Cartesian2(1.0, 0.0), new Cartesian2(0.0, 1.0))).toEqual(false);
});
- it("throws without point", function() {
+ it('throws without point', function() {
expect(function() {
pointInsideTriangle2D();
}).toThrow();
});
- it("throws without p0", function() {
+ it('throws without p0', function() {
expect(function() {
pointInsideTriangle2D(new Cartesian2());
}).toThrow();
});
- it("throws without p1", function() {
+ it('throws without p1', function() {
expect(function() {
pointInsideTriangle2D(new Cartesian2(), new Cartesian2());
}).toThrow();
});
- it("throws without p2", function() {
+ it('throws without p2', function() {
expect(function() {
pointInsideTriangle2D(new Cartesian2(), new Cartesian2(), new Cartesian2());
}).toThrow();
diff --git a/Specs/Core/shallowEqualsSpec.js b/Specs/Core/shallowEqualsSpec.js
index 379c722db2c..546e69b59dd 100755
--- a/Specs/Core/shallowEqualsSpec.js
+++ b/Specs/Core/shallowEqualsSpec.js
@@ -3,27 +3,27 @@ defineSuite(['Core/shallowEquals'], function(shallowEquals) {
"use strict";
/*global it,expect*/
- it("returns false if left is undefined", function() {
+ it('returns false if left is undefined', function() {
expect(shallowEquals(undefined, {
a : 0
})).toEqual(false);
});
- it("return false if right is undefined", function() {
+ it('return false if right is undefined', function() {
expect(shallowEquals({
a : 0
}, undefined)).toEqual(false);
});
- it("returns false if left and right are falsy", function() {
+ it('returns false if left and right are falsy', function() {
expect(shallowEquals(undefined, null)).toEqual(false);
});
- it("return true if left and right are undefined", function() {
+ it('return true if left and right are undefined', function() {
expect(shallowEquals(undefined, undefined)).toEqual(true);
});
- it("returns true if left and right are equal", function() {
+ it('returns true if left and right are equal', function() {
expect(shallowEquals({
a : 0,
b : 1
@@ -33,7 +33,7 @@ defineSuite(['Core/shallowEquals'], function(shallowEquals) {
})).toEqual(true);
});
- it("returns false if left and right are not equal", function() {
+ it('returns false if left and right are not equal', function() {
expect(shallowEquals({
a : 0,
b : 1
diff --git a/Specs/Renderer/AutomaticUniformSpec.js b/Specs/Renderer/AutomaticUniformSpec.js
index 284f45ef110..ae4f54e46d7 100644
--- a/Specs/Renderer/AutomaticUniformSpec.js
+++ b/Specs/Renderer/AutomaticUniformSpec.js
@@ -5,7 +5,7 @@ defineSuite([
'Core/Matrix4',
'Core/PrimitiveType',
'Renderer/BufferUsage'
- ], "Renderer/AutomaticUniforms", function(
+ ], 'Renderer/AutomaticUniforms', function(
createContext,
destroyContext,
Matrix4,
@@ -25,7 +25,7 @@ defineSuite([
});
function verifyDraw(fs) {
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
var sp = context.createShaderProgram(vs, fs);
var va = context.createVertexArray();
@@ -49,65 +49,65 @@ defineSuite([
va = va.destroy();
}
- it("can declare automatic uniforms", function() {
+ it('can declare automatic uniforms', function() {
var fs =
- "uniform ivec4 agi_viewport; " +
- "void main() { " +
- " gl_FragColor = vec4((agi_viewport.x == 0) && (agi_viewport.y == 0) && (agi_viewport.z == 1) && (agi_viewport.w == 1)); " +
- "}";
+ 'uniform ivec4 agi_viewport; ' +
+ 'void main() { ' +
+ ' gl_FragColor = vec4((agi_viewport.x == 0) && (agi_viewport.y == 0) && (agi_viewport.z == 1) && (agi_viewport.w == 1)); ' +
+ '}';
verifyDraw(fs);
});
- it("has agi_viewport", function() {
+ it('has agi_viewport', function() {
var fs =
- "void main() { " +
- " gl_FragColor = vec4((agi_viewport.x == 0) && (agi_viewport.y == 0) && (agi_viewport.z == 1) && (agi_viewport.w == 1)); " +
- "}";
+ 'void main() { ' +
+ ' gl_FragColor = vec4((agi_viewport.x == 0) && (agi_viewport.y == 0) && (agi_viewport.z == 1) && (agi_viewport.w == 1)); ' +
+ '}';
verifyDraw(fs);
});
- it("has agi_viewportOrthographic", function() {
+ it('has agi_viewportOrthographic', function() {
var fs =
- "void main() { " +
- " bool b0 = (agi_viewportOrthographic[0][0] != 0.0) && (agi_viewportOrthographic[1][0] == 0.0) && (agi_viewportOrthographic[2][0] == 0.0) && (agi_viewportOrthographic[3][0] != 0.0); " +
- " bool b1 = (agi_viewportOrthographic[0][1] == 0.0) && (agi_viewportOrthographic[1][1] != 0.0) && (agi_viewportOrthographic[2][1] == 0.0) && (agi_viewportOrthographic[3][1] != 0.0); " +
- " bool b2 = (agi_viewportOrthographic[0][2] == 0.0) && (agi_viewportOrthographic[1][2] == 0.0) && (agi_viewportOrthographic[2][2] != 0.0) && (agi_viewportOrthographic[3][2] != 0.0); " +
- " bool b3 = (agi_viewportOrthographic[0][3] == 0.0) && (agi_viewportOrthographic[1][3] == 0.0) && (agi_viewportOrthographic[2][3] == 0.0) && (agi_viewportOrthographic[3][3] == 1.0); " +
- " gl_FragColor = vec4(b0 && b1 && b2 && b3); " +
- "}";
+ 'void main() { ' +
+ ' bool b0 = (agi_viewportOrthographic[0][0] != 0.0) && (agi_viewportOrthographic[1][0] == 0.0) && (agi_viewportOrthographic[2][0] == 0.0) && (agi_viewportOrthographic[3][0] != 0.0); ' +
+ ' bool b1 = (agi_viewportOrthographic[0][1] == 0.0) && (agi_viewportOrthographic[1][1] != 0.0) && (agi_viewportOrthographic[2][1] == 0.0) && (agi_viewportOrthographic[3][1] != 0.0); ' +
+ ' bool b2 = (agi_viewportOrthographic[0][2] == 0.0) && (agi_viewportOrthographic[1][2] == 0.0) && (agi_viewportOrthographic[2][2] != 0.0) && (agi_viewportOrthographic[3][2] != 0.0); ' +
+ ' bool b3 = (agi_viewportOrthographic[0][3] == 0.0) && (agi_viewportOrthographic[1][3] == 0.0) && (agi_viewportOrthographic[2][3] == 0.0) && (agi_viewportOrthographic[3][3] == 1.0); ' +
+ ' gl_FragColor = vec4(b0 && b1 && b2 && b3); ' +
+ '}';
verifyDraw(fs);
});
- it("has agi_viewportTransformation", function() {
+ it('has agi_viewportTransformation', function() {
var fs =
- "void main() { " +
- " bool b0 = (agi_viewportTransformation[0][0] != 0.0) && (agi_viewportTransformation[1][0] == 0.0) && (agi_viewportTransformation[2][0] == 0.0) && (agi_viewportTransformation[3][0] != 0.0); " +
- " bool b1 = (agi_viewportTransformation[0][1] == 0.0) && (agi_viewportTransformation[1][1] != 0.0) && (agi_viewportTransformation[2][1] == 0.0) && (agi_viewportTransformation[3][1] != 0.0); " +
- " bool b2 = (agi_viewportTransformation[0][2] == 0.0) && (agi_viewportTransformation[1][2] == 0.0) && (agi_viewportTransformation[2][2] != 0.0) && (agi_viewportTransformation[3][2] != 0.0); " +
- " bool b3 = (agi_viewportTransformation[0][3] == 0.0) && (agi_viewportTransformation[1][3] == 0.0) && (agi_viewportTransformation[2][3] == 0.0) && (agi_viewportTransformation[3][3] == 1.0); " +
- " gl_FragColor = vec4(b0 && b1 && b2 && b3); " +
- "}";
+ 'void main() { ' +
+ ' bool b0 = (agi_viewportTransformation[0][0] != 0.0) && (agi_viewportTransformation[1][0] == 0.0) && (agi_viewportTransformation[2][0] == 0.0) && (agi_viewportTransformation[3][0] != 0.0); ' +
+ ' bool b1 = (agi_viewportTransformation[0][1] == 0.0) && (agi_viewportTransformation[1][1] != 0.0) && (agi_viewportTransformation[2][1] == 0.0) && (agi_viewportTransformation[3][1] != 0.0); ' +
+ ' bool b2 = (agi_viewportTransformation[0][2] == 0.0) && (agi_viewportTransformation[1][2] == 0.0) && (agi_viewportTransformation[2][2] != 0.0) && (agi_viewportTransformation[3][2] != 0.0); ' +
+ ' bool b3 = (agi_viewportTransformation[0][3] == 0.0) && (agi_viewportTransformation[1][3] == 0.0) && (agi_viewportTransformation[2][3] == 0.0) && (agi_viewportTransformation[3][3] == 1.0); ' +
+ ' gl_FragColor = vec4(b0 && b1 && b2 && b3); ' +
+ '}';
verifyDraw(fs);
});
- it("has agi_model", function() {
+ it('has agi_model', function() {
var us = context.getUniformState();
us.setModel(new Matrix4( 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));
var fs =
- "void main() { " +
- " bool b0 = (agi_model[0][0] == 1.0) && (agi_model[1][0] == 2.0) && (agi_model[2][0] == 3.0) && (agi_model[3][0] == 4.0); " +
- " bool b1 = (agi_model[0][1] == 5.0) && (agi_model[1][1] == 6.0) && (agi_model[2][1] == 7.0) && (agi_model[3][1] == 8.0); " +
- " bool b2 = (agi_model[0][2] == 9.0) && (agi_model[1][2] == 10.0) && (agi_model[2][2] == 11.0) && (agi_model[3][2] == 12.0); " +
- " bool b3 = (agi_model[0][3] == 13.0) && (agi_model[1][3] == 14.0) && (agi_model[2][3] == 15.0) && (agi_model[3][3] == 16.0); " +
- " gl_FragColor = vec4(b0 && b1 && b2 && b3); " +
- "}";
+ 'void main() { ' +
+ ' bool b0 = (agi_model[0][0] == 1.0) && (agi_model[1][0] == 2.0) && (agi_model[2][0] == 3.0) && (agi_model[3][0] == 4.0); ' +
+ ' bool b1 = (agi_model[0][1] == 5.0) && (agi_model[1][1] == 6.0) && (agi_model[2][1] == 7.0) && (agi_model[3][1] == 8.0); ' +
+ ' bool b2 = (agi_model[0][2] == 9.0) && (agi_model[1][2] == 10.0) && (agi_model[2][2] == 11.0) && (agi_model[3][2] == 12.0); ' +
+ ' bool b3 = (agi_model[0][3] == 13.0) && (agi_model[1][3] == 14.0) && (agi_model[2][3] == 15.0) && (agi_model[3][3] == 16.0); ' +
+ ' gl_FragColor = vec4(b0 && b1 && b2 && b3); ' +
+ '}';
verifyDraw(fs);
});
- it("has agi_view", function() {
+ it('has agi_view', function() {
var us = context.getUniformState();
us.setView(new Matrix4( 1.0, 2.0, 3.0, 4.0,
5.0, 6.0, 7.0, 8.0,
@@ -115,17 +115,17 @@ defineSuite([
13.0, 14.0, 15.0, 16.0));
var fs =
- "void main() { " +
- " bool b0 = (agi_view[0][0] == 1.0) && (agi_view[1][0] == 2.0) && (agi_view[2][0] == 3.0) && (agi_view[3][0] == 4.0); " +
- " bool b1 = (agi_view[0][1] == 5.0) && (agi_view[1][1] == 6.0) && (agi_view[2][1] == 7.0) && (agi_view[3][1] == 8.0); " +
- " bool b2 = (agi_view[0][2] == 9.0) && (agi_view[1][2] == 10.0) && (agi_view[2][2] == 11.0) && (agi_view[3][2] == 12.0); " +
- " bool b3 = (agi_view[0][3] == 13.0) && (agi_view[1][3] == 14.0) && (agi_view[2][3] == 15.0) && (agi_view[3][3] == 16.0); " +
- " gl_FragColor = vec4(b0 && b1 && b2 && b3); " +
- "}";
+ 'void main() { ' +
+ ' bool b0 = (agi_view[0][0] == 1.0) && (agi_view[1][0] == 2.0) && (agi_view[2][0] == 3.0) && (agi_view[3][0] == 4.0); ' +
+ ' bool b1 = (agi_view[0][1] == 5.0) && (agi_view[1][1] == 6.0) && (agi_view[2][1] == 7.0) && (agi_view[3][1] == 8.0); ' +
+ ' bool b2 = (agi_view[0][2] == 9.0) && (agi_view[1][2] == 10.0) && (agi_view[2][2] == 11.0) && (agi_view[3][2] == 12.0); ' +
+ ' bool b3 = (agi_view[0][3] == 13.0) && (agi_view[1][3] == 14.0) && (agi_view[2][3] == 15.0) && (agi_view[3][3] == 16.0); ' +
+ ' gl_FragColor = vec4(b0 && b1 && b2 && b3); ' +
+ '}';
verifyDraw(fs);
});
- it("has agi_inverseView", function() {
+ it('has agi_inverseView', function() {
var us = context.getUniformState();
us.setView(new Matrix4(1.0, 0.0, 0.0, 7.0,
0.0, 1.0, 0.0, 8.0,
@@ -133,17 +133,17 @@ defineSuite([
0.0, 0.0, 0.0, 1.0));
var fs =
- "void main() { " +
- " gl_FragColor = vec4(" +
- " (agi_inverseView[0][0] == 1.0) && (agi_inverseView[1][0] == 0.0) && (agi_inverseView[2][0] == 0.0) && " +
- " (agi_inverseView[0][1] == 0.0) && (agi_inverseView[1][1] == 1.0) && (agi_inverseView[2][1] == 0.0) && " +
- " (agi_inverseView[0][2] == 0.0) && (agi_inverseView[1][2] == 0.0) && (agi_inverseView[2][2] == 1.0) " +
- " ); " +
- "}";
+ 'void main() { ' +
+ ' gl_FragColor = vec4(' +
+ ' (agi_inverseView[0][0] == 1.0) && (agi_inverseView[1][0] == 0.0) && (agi_inverseView[2][0] == 0.0) && ' +
+ ' (agi_inverseView[0][1] == 0.0) && (agi_inverseView[1][1] == 1.0) && (agi_inverseView[2][1] == 0.0) && ' +
+ ' (agi_inverseView[0][2] == 0.0) && (agi_inverseView[1][2] == 0.0) && (agi_inverseView[2][2] == 1.0) ' +
+ ' ); ' +
+ '}';
verifyDraw(fs);
});
- it("has agi_projection", function() {
+ it('has agi_projection', function() {
var us = context.getUniformState();
us.setProjection(new Matrix4( 1.0, 2.0, 3.0, 4.0,
5.0, 6.0, 7.0, 8.0,
@@ -151,17 +151,17 @@ defineSuite([
13.0, 14.0, 15.0, 16.0));
var fs =
- "void main() { " +
- " bool b0 = (agi_projection[0][0] == 1.0) && (agi_projection[1][0] == 2.0) && (agi_projection[2][0] == 3.0) && (agi_projection[3][0] == 4.0); " +
- " bool b1 = (agi_projection[0][1] == 5.0) && (agi_projection[1][1] == 6.0) && (agi_projection[2][1] == 7.0) && (agi_projection[3][1] == 8.0); " +
- " bool b2 = (agi_projection[0][2] == 9.0) && (agi_projection[1][2] == 10.0) && (agi_projection[2][2] == 11.0) && (agi_projection[3][2] == 12.0); " +
- " bool b3 = (agi_projection[0][3] == 13.0) && (agi_projection[1][3] == 14.0) && (agi_projection[2][3] == 15.0) && (agi_projection[3][3] == 16.0); " +
- " gl_FragColor = vec4(b0 && b1 && b2 && b3); " +
- "}";
+ 'void main() { ' +
+ ' bool b0 = (agi_projection[0][0] == 1.0) && (agi_projection[1][0] == 2.0) && (agi_projection[2][0] == 3.0) && (agi_projection[3][0] == 4.0); ' +
+ ' bool b1 = (agi_projection[0][1] == 5.0) && (agi_projection[1][1] == 6.0) && (agi_projection[2][1] == 7.0) && (agi_projection[3][1] == 8.0); ' +
+ ' bool b2 = (agi_projection[0][2] == 9.0) && (agi_projection[1][2] == 10.0) && (agi_projection[2][2] == 11.0) && (agi_projection[3][2] == 12.0); ' +
+ ' bool b3 = (agi_projection[0][3] == 13.0) && (agi_projection[1][3] == 14.0) && (agi_projection[2][3] == 15.0) && (agi_projection[3][3] == 16.0); ' +
+ ' gl_FragColor = vec4(b0 && b1 && b2 && b3); ' +
+ '}';
verifyDraw(fs);
});
- it("has agi_inverseProjection", function() {
+ it('has agi_inverseProjection', function() {
var us = context.getUniformState();
us.setProjection(new Matrix4(1.0, 0.0, 0.0, 1.0,
0.0, 1.0, 0.0, 2.0,
@@ -169,17 +169,17 @@ defineSuite([
0.0, 0.0, 0.0, 1.0));
var fs =
- "void main() { " +
- " bool b0 = (agi_inverseProjection[0][0] == 1.0) && (agi_inverseProjection[1][0] == 0.0) && (agi_inverseProjection[2][0] == 0.0) && (agi_inverseProjection[3][0] == -1.0); " +
- " bool b1 = (agi_inverseProjection[0][1] == 0.0) && (agi_inverseProjection[1][1] == 1.0) && (agi_inverseProjection[2][1] == 0.0) && (agi_inverseProjection[3][1] == -2.0); " +
- " bool b2 = (agi_inverseProjection[0][2] == 0.0) && (agi_inverseProjection[1][2] == 0.0) && (agi_inverseProjection[2][2] == 1.0) && (agi_inverseProjection[3][2] == -3.0); " +
- " bool b3 = (agi_inverseProjection[0][3] == 0.0) && (agi_inverseProjection[1][3] == 0.0) && (agi_inverseProjection[2][3] == 0.0) && (agi_inverseProjection[3][3] == 1.0); " +
- " gl_FragColor = vec4(b0 && b1 && b2 && b3); " +
- "}";
+ 'void main() { ' +
+ ' bool b0 = (agi_inverseProjection[0][0] == 1.0) && (agi_inverseProjection[1][0] == 0.0) && (agi_inverseProjection[2][0] == 0.0) && (agi_inverseProjection[3][0] == -1.0); ' +
+ ' bool b1 = (agi_inverseProjection[0][1] == 0.0) && (agi_inverseProjection[1][1] == 1.0) && (agi_inverseProjection[2][1] == 0.0) && (agi_inverseProjection[3][1] == -2.0); ' +
+ ' bool b2 = (agi_inverseProjection[0][2] == 0.0) && (agi_inverseProjection[1][2] == 0.0) && (agi_inverseProjection[2][2] == 1.0) && (agi_inverseProjection[3][2] == -3.0); ' +
+ ' bool b3 = (agi_inverseProjection[0][3] == 0.0) && (agi_inverseProjection[1][3] == 0.0) && (agi_inverseProjection[2][3] == 0.0) && (agi_inverseProjection[3][3] == 1.0); ' +
+ ' gl_FragColor = vec4(b0 && b1 && b2 && b3); ' +
+ '}';
verifyDraw(fs);
});
- it("has agi_infiniteProjection", function() {
+ it('has agi_infiniteProjection', function() {
var us = context.getUniformState();
us.setInfiniteProjection(new Matrix4( 1.0, 2.0, 3.0, 4.0,
5.0, 6.0, 7.0, 8.0,
@@ -187,17 +187,17 @@ defineSuite([
13.0, 14.0, 15.0, 16.0));
var fs =
- "void main() { " +
- " bool b0 = (agi_infiniteProjection[0][0] == 1.0) && (agi_infiniteProjection[1][0] == 2.0) && (agi_infiniteProjection[2][0] == 3.0) && (agi_infiniteProjection[3][0] == 4.0); " +
- " bool b1 = (agi_infiniteProjection[0][1] == 5.0) && (agi_infiniteProjection[1][1] == 6.0) && (agi_infiniteProjection[2][1] == 7.0) && (agi_infiniteProjection[3][1] == 8.0); " +
- " bool b2 = (agi_infiniteProjection[0][2] == 9.0) && (agi_infiniteProjection[1][2] == 10.0) && (agi_infiniteProjection[2][2] == 11.0) && (agi_infiniteProjection[3][2] == 12.0); " +
- " bool b3 = (agi_infiniteProjection[0][3] == 13.0) && (agi_infiniteProjection[1][3] == 14.0) && (agi_infiniteProjection[2][3] == 15.0) && (agi_infiniteProjection[3][3] == 16.0); " +
- " gl_FragColor = vec4(b0 && b1 && b2 && b3); " +
- "}";
+ 'void main() { ' +
+ ' bool b0 = (agi_infiniteProjection[0][0] == 1.0) && (agi_infiniteProjection[1][0] == 2.0) && (agi_infiniteProjection[2][0] == 3.0) && (agi_infiniteProjection[3][0] == 4.0); ' +
+ ' bool b1 = (agi_infiniteProjection[0][1] == 5.0) && (agi_infiniteProjection[1][1] == 6.0) && (agi_infiniteProjection[2][1] == 7.0) && (agi_infiniteProjection[3][1] == 8.0); ' +
+ ' bool b2 = (agi_infiniteProjection[0][2] == 9.0) && (agi_infiniteProjection[1][2] == 10.0) && (agi_infiniteProjection[2][2] == 11.0) && (agi_infiniteProjection[3][2] == 12.0); ' +
+ ' bool b3 = (agi_infiniteProjection[0][3] == 13.0) && (agi_infiniteProjection[1][3] == 14.0) && (agi_infiniteProjection[2][3] == 15.0) && (agi_infiniteProjection[3][3] == 16.0); ' +
+ ' gl_FragColor = vec4(b0 && b1 && b2 && b3); ' +
+ '}';
verifyDraw(fs);
});
- it("has agi_modelView", function() {
+ it('has agi_modelView', function() {
var us = context.getUniformState();
us.setModel(new Matrix4(2.0, 0.0, 0.0, 0.0,
0.0, 2.0, 0.0, 0.0,
@@ -209,17 +209,17 @@ defineSuite([
0.0, 0.0, 0.0, 1.0));
var fs =
- "void main() { " +
- " bool b0 = (agi_modelView[0][0] == 2.0) && (agi_modelView[1][0] == 0.0) && (agi_modelView[2][0] == 0.0) && (agi_modelView[3][0] == 1.0); " +
- " bool b1 = (agi_modelView[0][1] == 0.0) && (agi_modelView[1][1] == 2.0) && (agi_modelView[2][1] == 0.0) && (agi_modelView[3][1] == 1.0); " +
- " bool b2 = (agi_modelView[0][2] == 0.0) && (agi_modelView[1][2] == 0.0) && (agi_modelView[2][2] == 2.0) && (agi_modelView[3][2] == 1.0); " +
- " bool b3 = (agi_modelView[0][3] == 0.0) && (agi_modelView[1][3] == 0.0) && (agi_modelView[2][3] == 0.0) && (agi_modelView[3][3] == 1.0); " +
- " gl_FragColor = vec4(b0 && b1 && b2 && b3); " +
- "}";
+ 'void main() { ' +
+ ' bool b0 = (agi_modelView[0][0] == 2.0) && (agi_modelView[1][0] == 0.0) && (agi_modelView[2][0] == 0.0) && (agi_modelView[3][0] == 1.0); ' +
+ ' bool b1 = (agi_modelView[0][1] == 0.0) && (agi_modelView[1][1] == 2.0) && (agi_modelView[2][1] == 0.0) && (agi_modelView[3][1] == 1.0); ' +
+ ' bool b2 = (agi_modelView[0][2] == 0.0) && (agi_modelView[1][2] == 0.0) && (agi_modelView[2][2] == 2.0) && (agi_modelView[3][2] == 1.0); ' +
+ ' bool b3 = (agi_modelView[0][3] == 0.0) && (agi_modelView[1][3] == 0.0) && (agi_modelView[2][3] == 0.0) && (agi_modelView[3][3] == 1.0); ' +
+ ' gl_FragColor = vec4(b0 && b1 && b2 && b3); ' +
+ '}';
verifyDraw(fs);
});
- it("has agi_inverseModelView", function() {
+ it('has agi_inverseModelView', function() {
var us = context.getUniformState();
us.setModel(new Matrix4(1.0, 0.0, 0.0, 1.0,
0.0, 1.0, 0.0, 2.0,
@@ -231,17 +231,17 @@ defineSuite([
0.0, 0.0, 0.0, 1.0));
var fs =
- "void main() { " +
- " bool b0 = (agi_inverseModelView[0][0] == 1.0) && (agi_inverseModelView[1][0] == 0.0) && (agi_inverseModelView[2][0] == 0.0) && (agi_inverseModelView[3][0] == -1.0); " +
- " bool b1 = (agi_inverseModelView[0][1] == 0.0) && (agi_inverseModelView[1][1] == 1.0) && (agi_inverseModelView[2][1] == 0.0) && (agi_inverseModelView[3][1] == -2.0); " +
- " bool b2 = (agi_inverseModelView[0][2] == 0.0) && (agi_inverseModelView[1][2] == 0.0) && (agi_inverseModelView[2][2] == 1.0) && (agi_inverseModelView[3][2] == -3.0); " +
- " bool b3 = (agi_inverseModelView[0][3] == 0.0) && (agi_inverseModelView[1][3] == 0.0) && (agi_inverseModelView[2][3] == 0.0) && (agi_inverseModelView[3][3] == 1.0); " +
- " gl_FragColor = vec4(b0 && b1 && b2 && b3); " +
- "}";
+ 'void main() { ' +
+ ' bool b0 = (agi_inverseModelView[0][0] == 1.0) && (agi_inverseModelView[1][0] == 0.0) && (agi_inverseModelView[2][0] == 0.0) && (agi_inverseModelView[3][0] == -1.0); ' +
+ ' bool b1 = (agi_inverseModelView[0][1] == 0.0) && (agi_inverseModelView[1][1] == 1.0) && (agi_inverseModelView[2][1] == 0.0) && (agi_inverseModelView[3][1] == -2.0); ' +
+ ' bool b2 = (agi_inverseModelView[0][2] == 0.0) && (agi_inverseModelView[1][2] == 0.0) && (agi_inverseModelView[2][2] == 1.0) && (agi_inverseModelView[3][2] == -3.0); ' +
+ ' bool b3 = (agi_inverseModelView[0][3] == 0.0) && (agi_inverseModelView[1][3] == 0.0) && (agi_inverseModelView[2][3] == 0.0) && (agi_inverseModelView[3][3] == 1.0); ' +
+ ' gl_FragColor = vec4(b0 && b1 && b2 && b3); ' +
+ '}';
verifyDraw(fs);
});
- it("has agi_viewProjection", function() {
+ it('has agi_viewProjection', function() {
var us = context.getUniformState();
us.setView(new Matrix4(1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 8.0,
@@ -253,18 +253,18 @@ defineSuite([
0.0, 0.0, 0.0, 1.0));
var fs =
- "void main() { " +
- " bool b0 = (agi_viewProjection[0][0] == 1.0) && (agi_viewProjection[1][0] == 0.0) && (agi_viewProjection[2][0] == 0.0) && (agi_viewProjection[3][0] == 0.0); " +
- " bool b1 = (agi_viewProjection[0][1] == 0.0) && (agi_viewProjection[1][1] == 1.0) && (agi_viewProjection[2][1] == 0.0) && (agi_viewProjection[3][1] == 8.0); " +
- " bool b2 = (agi_viewProjection[0][2] == 0.0) && (agi_viewProjection[1][2] == 0.0) && (agi_viewProjection[2][2] == 1.0) && (agi_viewProjection[3][2] == 9.0); " +
- " bool b3 = (agi_viewProjection[0][3] == 0.0) && (agi_viewProjection[1][3] == 0.0) && (agi_viewProjection[2][3] == 0.0) && (agi_viewProjection[3][3] == 1.0); " +
- " gl_FragColor = vec4(b0 && b1 && b2 && b3); " +
- "}";
+ 'void main() { ' +
+ ' bool b0 = (agi_viewProjection[0][0] == 1.0) && (agi_viewProjection[1][0] == 0.0) && (agi_viewProjection[2][0] == 0.0) && (agi_viewProjection[3][0] == 0.0); ' +
+ ' bool b1 = (agi_viewProjection[0][1] == 0.0) && (agi_viewProjection[1][1] == 1.0) && (agi_viewProjection[2][1] == 0.0) && (agi_viewProjection[3][1] == 8.0); ' +
+ ' bool b2 = (agi_viewProjection[0][2] == 0.0) && (agi_viewProjection[1][2] == 0.0) && (agi_viewProjection[2][2] == 1.0) && (agi_viewProjection[3][2] == 9.0); ' +
+ ' bool b3 = (agi_viewProjection[0][3] == 0.0) && (agi_viewProjection[1][3] == 0.0) && (agi_viewProjection[2][3] == 0.0) && (agi_viewProjection[3][3] == 1.0); ' +
+ ' gl_FragColor = vec4(b0 && b1 && b2 && b3); ' +
+ '}';
verifyDraw(fs);
});
- it("has agi_modelViewProjection", function() {
+ it('has agi_modelViewProjection', function() {
var us = context.getUniformState();
us.setModel(new Matrix4(1.0, 0.0, 0.0, 7.0,
0.0, 1.0, 0.0, 0.0,
@@ -280,18 +280,18 @@ defineSuite([
0.0, 0.0, 0.0, 1.0));
var fs =
- "void main() { " +
- " bool b0 = (agi_modelViewProjection[0][0] == 1.0) && (agi_modelViewProjection[1][0] == 0.0) && (agi_modelViewProjection[2][0] == 0.0) && (agi_modelViewProjection[3][0] == 7.0); " +
- " bool b1 = (agi_modelViewProjection[0][1] == 0.0) && (agi_modelViewProjection[1][1] == 1.0) && (agi_modelViewProjection[2][1] == 0.0) && (agi_modelViewProjection[3][1] == 8.0); " +
- " bool b2 = (agi_modelViewProjection[0][2] == 0.0) && (agi_modelViewProjection[1][2] == 0.0) && (agi_modelViewProjection[2][2] == 1.0) && (agi_modelViewProjection[3][2] == 9.0); " +
- " bool b3 = (agi_modelViewProjection[0][3] == 0.0) && (agi_modelViewProjection[1][3] == 0.0) && (agi_modelViewProjection[2][3] == 0.0) && (agi_modelViewProjection[3][3] == 1.0); " +
- " gl_FragColor = vec4(b0 && b1 && b2 && b3); " +
- "}";
+ 'void main() { ' +
+ ' bool b0 = (agi_modelViewProjection[0][0] == 1.0) && (agi_modelViewProjection[1][0] == 0.0) && (agi_modelViewProjection[2][0] == 0.0) && (agi_modelViewProjection[3][0] == 7.0); ' +
+ ' bool b1 = (agi_modelViewProjection[0][1] == 0.0) && (agi_modelViewProjection[1][1] == 1.0) && (agi_modelViewProjection[2][1] == 0.0) && (agi_modelViewProjection[3][1] == 8.0); ' +
+ ' bool b2 = (agi_modelViewProjection[0][2] == 0.0) && (agi_modelViewProjection[1][2] == 0.0) && (agi_modelViewProjection[2][2] == 1.0) && (agi_modelViewProjection[3][2] == 9.0); ' +
+ ' bool b3 = (agi_modelViewProjection[0][3] == 0.0) && (agi_modelViewProjection[1][3] == 0.0) && (agi_modelViewProjection[2][3] == 0.0) && (agi_modelViewProjection[3][3] == 1.0); ' +
+ ' gl_FragColor = vec4(b0 && b1 && b2 && b3); ' +
+ '}';
verifyDraw(fs);
});
- it("has agi_modelViewInfiniteProjection", function() {
+ it('has agi_modelViewInfiniteProjection', function() {
var us = context.getUniformState();
us.setModel(new Matrix4(1.0, 0.0, 0.0, 7.0,
0.0, 1.0, 0.0, 0.0,
@@ -307,18 +307,18 @@ defineSuite([
0.0, 0.0, 0.0, 1.0));
var fs =
- "void main() { " +
- " bool b0 = (agi_modelViewInfiniteProjection[0][0] == 1.0) && (agi_modelViewInfiniteProjection[1][0] == 0.0) && (agi_modelViewInfiniteProjection[2][0] == 0.0) && (agi_modelViewInfiniteProjection[3][0] == 7.0); " +
- " bool b1 = (agi_modelViewInfiniteProjection[0][1] == 0.0) && (agi_modelViewInfiniteProjection[1][1] == 1.0) && (agi_modelViewInfiniteProjection[2][1] == 0.0) && (agi_modelViewInfiniteProjection[3][1] == 8.0); " +
- " bool b2 = (agi_modelViewInfiniteProjection[0][2] == 0.0) && (agi_modelViewInfiniteProjection[1][2] == 0.0) && (agi_modelViewInfiniteProjection[2][2] == 1.0) && (agi_modelViewInfiniteProjection[3][2] == 9.0); " +
- " bool b3 = (agi_modelViewInfiniteProjection[0][3] == 0.0) && (agi_modelViewInfiniteProjection[1][3] == 0.0) && (agi_modelViewInfiniteProjection[2][3] == 0.0) && (agi_modelViewInfiniteProjection[3][3] == 1.0); " +
- " gl_FragColor = vec4(b0 && b1 && b2 && b3); " +
- "}";
+ 'void main() { ' +
+ ' bool b0 = (agi_modelViewInfiniteProjection[0][0] == 1.0) && (agi_modelViewInfiniteProjection[1][0] == 0.0) && (agi_modelViewInfiniteProjection[2][0] == 0.0) && (agi_modelViewInfiniteProjection[3][0] == 7.0); ' +
+ ' bool b1 = (agi_modelViewInfiniteProjection[0][1] == 0.0) && (agi_modelViewInfiniteProjection[1][1] == 1.0) && (agi_modelViewInfiniteProjection[2][1] == 0.0) && (agi_modelViewInfiniteProjection[3][1] == 8.0); ' +
+ ' bool b2 = (agi_modelViewInfiniteProjection[0][2] == 0.0) && (agi_modelViewInfiniteProjection[1][2] == 0.0) && (agi_modelViewInfiniteProjection[2][2] == 1.0) && (agi_modelViewInfiniteProjection[3][2] == 9.0); ' +
+ ' bool b3 = (agi_modelViewInfiniteProjection[0][3] == 0.0) && (agi_modelViewInfiniteProjection[1][3] == 0.0) && (agi_modelViewInfiniteProjection[2][3] == 0.0) && (agi_modelViewInfiniteProjection[3][3] == 1.0); ' +
+ ' gl_FragColor = vec4(b0 && b1 && b2 && b3); ' +
+ '}';
verifyDraw(fs);
});
- it("has agi_normal", function() {
+ it('has agi_normal', function() {
var us = context.getUniformState();
us.setModel(new Matrix4(1.0, 0.0, 0.0, 7.0,
0.0, 1.0, 0.0, 8.0,
@@ -326,45 +326,45 @@ defineSuite([
0.0, 0.0, 0.0, 1.0));
var fs =
- "void main() { " +
- " gl_FragColor = vec4(" +
- " (agi_normal[0][0] == 1.0) && (agi_normal[1][0] == 0.0) && (agi_normal[2][0] == 0.0) && " +
- " (agi_normal[0][1] == 0.0) && (agi_normal[1][1] == 1.0) && (agi_normal[2][1] == 0.0) && " +
- " (agi_normal[0][2] == 0.0) && (agi_normal[1][2] == 0.0) && (agi_normal[2][2] == 1.0) " +
- " ); " +
- "}";
+ 'void main() { ' +
+ ' gl_FragColor = vec4(' +
+ ' (agi_normal[0][0] == 1.0) && (agi_normal[1][0] == 0.0) && (agi_normal[2][0] == 0.0) && ' +
+ ' (agi_normal[0][1] == 0.0) && (agi_normal[1][1] == 1.0) && (agi_normal[2][1] == 0.0) && ' +
+ ' (agi_normal[0][2] == 0.0) && (agi_normal[1][2] == 0.0) && (agi_normal[2][2] == 1.0) ' +
+ ' ); ' +
+ '}';
verifyDraw(fs);
});
- it("has agi_inverseNormal", function() {
+ it('has agi_inverseNormal', function() {
var us = context.getUniformState();
us.setModel(new Matrix4(1.0, 0.0, 0.0, 7.0,
0.0, 1.0, 0.0, 8.0,
0.0, 0.0, 1.0, 9.0,
0.0, 0.0, 0.0, 1.0));
var fs =
- "void main() { " +
- " gl_FragColor = vec4(" +
- " (agi_inverseNormal[0][0] == 1.0) && (agi_inverseNormal[1][0] == 0.0) && (agi_inverseNormal[2][0] == 0.0) && " +
- " (agi_inverseNormal[0][1] == 0.0) && (agi_inverseNormal[1][1] == 1.0) && (agi_inverseNormal[2][1] == 0.0) && " +
- " (agi_inverseNormal[0][2] == 0.0) && (agi_inverseNormal[1][2] == 0.0) && (agi_inverseNormal[2][2] == 1.0) " +
- " ); " +
- "}";
+ 'void main() { ' +
+ ' gl_FragColor = vec4(' +
+ ' (agi_inverseNormal[0][0] == 1.0) && (agi_inverseNormal[1][0] == 0.0) && (agi_inverseNormal[2][0] == 0.0) && ' +
+ ' (agi_inverseNormal[0][1] == 0.0) && (agi_inverseNormal[1][1] == 1.0) && (agi_inverseNormal[2][1] == 0.0) && ' +
+ ' (agi_inverseNormal[0][2] == 0.0) && (agi_inverseNormal[1][2] == 0.0) && (agi_inverseNormal[2][2] == 1.0) ' +
+ ' ); ' +
+ '}';
verifyDraw(fs);
});
- it("has agi_sunDirectionEC", function() {
- var fs = "void main() { gl_FragColor = vec4(agi_sunDirectionEC != vec3(0.0)); }";
+ it('has agi_sunDirectionEC', function() {
+ var fs = 'void main() { gl_FragColor = vec4(agi_sunDirectionEC != vec3(0.0)); }';
verifyDraw(fs);
});
- it("has agi_sunDirectionWC", function() {
- var fs = "void main() { gl_FragColor = vec4(agi_sunDirectionWC != vec3(0.0)); }";
+ it('has agi_sunDirectionWC', function() {
+ var fs = 'void main() { gl_FragColor = vec4(agi_sunDirectionWC != vec3(0.0)); }';
verifyDraw(fs);
});
- it("has agi_viewerPositionWC", function() {
- var fs = "void main() { gl_FragColor = vec4(agi_viewerPositionWC == vec3(0.0)); }";
+ it('has agi_viewerPositionWC', function() {
+ var fs = 'void main() { gl_FragColor = vec4(agi_viewerPositionWC == vec3(0.0)); }';
verifyDraw(fs);
});
});
\ No newline at end of file
diff --git a/Specs/Renderer/BufferSpec.js b/Specs/Renderer/BufferSpec.js
index 29377fdf0f8..5ed9f44fb64 100644
--- a/Specs/Renderer/BufferSpec.js
+++ b/Specs/Renderer/BufferSpec.js
@@ -5,7 +5,7 @@ defineSuite([
'Core/Matrix4',
'Core/IndexDatatype',
'Renderer/BufferUsage'
- ], "Renderer/Buffer", function(
+ ], 'Renderer/Buffer', function(
createContext,
destroyContext,
Matrix4,
@@ -29,14 +29,14 @@ defineSuite([
destroyContext(context);
});
- it("creates vertex buffer", function() {
+ it('creates vertex buffer', function() {
buffer = context.createVertexBuffer(16, BufferUsage.STATIC_DRAW);
expect(buffer.getSizeInBytes()).toEqual(16);
expect(buffer.getUsage()).toEqual(BufferUsage.STATIC_DRAW);
});
- it("copies array to a vertex buffer", function() {
+ it('copies array to a vertex buffer', function() {
var sizeInBytes = 3 * Float32Array.BYTES_PER_ELEMENT;
var vertices = new ArrayBuffer(sizeInBytes);
var positions = new Float32Array(vertices);
@@ -48,7 +48,7 @@ defineSuite([
buffer.copyFromArrayView(vertices);
});
- it("creates index buffer", function() {
+ it('creates index buffer', function() {
buffer = context.createIndexBuffer(6, BufferUsage.STREAM_DRAW, IndexDatatype.UNSIGNED_SHORT);
expect(buffer.getSizeInBytes()).toEqual(6);
@@ -59,7 +59,7 @@ defineSuite([
expect(buffer.getNumberOfIndices()).toEqual(3);
});
- it("copies array to an index buffer", function() {
+ it('copies array to an index buffer', function() {
var sizeInBytes = 3 * Uint16Array.BYTES_PER_ELEMENT;
var elements = new ArrayBuffer(sizeInBytes);
var indices = new Uint16Array(elements);
@@ -71,33 +71,33 @@ defineSuite([
buffer.copyFromArrayView(elements);
});
- it("destroys", function() {
+ it('destroys', function() {
var b = context.createIndexBuffer(3, BufferUsage.STATIC_DRAW, IndexDatatype.UNSIGNED_BYTE);
expect(b.isDestroyed()).toEqual(false);
b.destroy();
expect(b.isDestroyed()).toEqual(true);
});
- it("fails to create", function() {
+ it('fails to create', function() {
expect(function() {
buffer = context.createVertexBuffer(0, BufferUsage.STATIC_DRAW);
}).toThrow();
});
- it("fails to create again", function() {
+ it('fails to create again', function() {
expect(function() {
buffer = context.createVertexBuffer(4, 0);
}).toThrow();
});
- it("fails to provide an array view", function() {
+ it('fails to provide an array view', function() {
buffer = context.createVertexBuffer(3, BufferUsage.STATIC_DRAW);
expect(function() {
buffer.copyFromArrayView();
}).toThrow();
});
- it("fails to copy a large array view", function() {
+ it('fails to copy a large array view', function() {
buffer = context.createVertexBuffer(3, BufferUsage.STATIC_DRAW);
var elements = new ArrayBuffer(3);
@@ -106,7 +106,7 @@ defineSuite([
}).toThrow();
});
- it("fails to destroy", function() {
+ it('fails to destroy', function() {
var b = context.createIndexBuffer(3, BufferUsage.STATIC_DRAW, IndexDatatype.UNSIGNED_BYTE);
b.destroy();
diff --git a/Specs/Renderer/BuiltinFunctionsSpec.js b/Specs/Renderer/BuiltinFunctionsSpec.js
index c6cc93ef1fc..6417d79ee93 100644
--- a/Specs/Renderer/BuiltinFunctionsSpec.js
+++ b/Specs/Renderer/BuiltinFunctionsSpec.js
@@ -6,7 +6,7 @@ defineSuite([
'Core/Matrix4',
'Core/PrimitiveType',
'Renderer/BufferUsage'
- ], "Renderer/BuiltinFunctions", function(
+ ], 'Renderer/BuiltinFunctions', function(
createContext,
destroyContext,
CesiumMath,
@@ -27,7 +27,7 @@ defineSuite([
});
var verifyDraw = function(fs) {
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
var sp = context.createShaderProgram(vs, fs);
var va = context.createVertexArray();
@@ -51,75 +51,75 @@ defineSuite([
va = va.destroy();
};
- it("has agi_tranpose (2x2)", function() {
+ it('has agi_tranpose (2x2)', function() {
var fs =
- "void main() { " +
- " mat2 m = mat2(1.0, 2.0, 3.0, 4.0); " +
- " mat2 mt = mat2(1.0, 3.0, 2.0, 4.0); " +
- " gl_FragColor = vec4(agi_transpose(m) == mt); " +
- "}";
+ 'void main() { ' +
+ ' mat2 m = mat2(1.0, 2.0, 3.0, 4.0); ' +
+ ' mat2 mt = mat2(1.0, 3.0, 2.0, 4.0); ' +
+ ' gl_FragColor = vec4(agi_transpose(m) == mt); ' +
+ '}';
verifyDraw(fs);
});
- it("has agi_tranpose (3x3)", function() {
+ it('has agi_tranpose (3x3)', function() {
var fs =
- "void main() { " +
- " mat3 m = mat3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0); " +
- " mat3 mt = mat3(1.0, 4.0, 7.0, 2.0, 5.0, 8.0, 3.0, 6.0, 9.0); " +
- " gl_FragColor = vec4(agi_transpose(m) == mt); " +
- "}";
+ 'void main() { ' +
+ ' mat3 m = mat3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0); ' +
+ ' mat3 mt = mat3(1.0, 4.0, 7.0, 2.0, 5.0, 8.0, 3.0, 6.0, 9.0); ' +
+ ' gl_FragColor = vec4(agi_transpose(m) == mt); ' +
+ '}';
verifyDraw(fs);
});
- it("has agi_tranpose (4x4)", function() {
+ it('has agi_tranpose (4x4)', function() {
var fs =
- "void main() { " +
- " mat4 m = mat4(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);" +
- " mat4 mt = mat4(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);" +
- " gl_FragColor = vec4(agi_transpose(m) == mt); " +
- "}";
+ 'void main() { ' +
+ ' mat4 m = mat4(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);' +
+ ' mat4 mt = mat4(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);' +
+ ' gl_FragColor = vec4(agi_transpose(m) == mt); ' +
+ '}';
verifyDraw(fs);
});
- it("has agi_eyeToWindowCoordinates", function() {
+ it('has agi_eyeToWindowCoordinates', function() {
var vp = context.getViewport();
var perspective = Matrix4.createPerspectiveFieldOfView(CesiumMath.toRadians(60.0), vp.width / vp.height, 1.0, 10.0);
context.getUniformState().setProjection(perspective);
var fs =
- "void main() { " +
- " float z = agi_projection[3][2] / agi_projection[2][2];" +
- " float x = z / agi_projection[0][0];" +
- " float y = z / agi_projection[1][1];" +
- " vec4 pointEC = vec4(x, y, z, 1.0);" +
- " vec2 fragCoord = vec2(0.0, 0.0);" +
- " vec4 actual = agi_eyeToWindowCoordinates(pointEC);" +
- " vec2 diff = actual.xy - fragCoord;" +
- " gl_FragColor = vec4(all(lessThan(diff, vec2(agi_epsilon6))));" +
- "}";
+ 'void main() { ' +
+ ' float z = agi_projection[3][2] / agi_projection[2][2];' +
+ ' float x = z / agi_projection[0][0];' +
+ ' float y = z / agi_projection[1][1];' +
+ ' vec4 pointEC = vec4(x, y, z, 1.0);' +
+ ' vec2 fragCoord = vec2(0.0, 0.0);' +
+ ' vec4 actual = agi_eyeToWindowCoordinates(pointEC);' +
+ ' vec2 diff = actual.xy - fragCoord;' +
+ ' gl_FragColor = vec4(all(lessThan(diff, vec2(agi_epsilon6))));' +
+ '}';
verifyDraw(fs);
});
- it("has agi_windowToEyeCoordinates", function() {
+ it('has agi_windowToEyeCoordinates', function() {
var vp = context.getViewport();
var perspective = Matrix4.createPerspectiveFieldOfView(CesiumMath.toRadians(60.0), vp.width / vp.height, 1.0, 10.0);
context.getUniformState().setProjection(perspective);
var fs =
- "void main() { " +
- " float z = agi_projection[3][2] / agi_projection[2][2];" +
- " float x = z / agi_projection[0][0];" +
- " float y = z / agi_projection[1][1];" +
- " vec3 pointEC = vec3(x, y, z);" +
- " vec4 fragCoord = vec4(0.0, 0.0, 0.0, -z);" +
- " vec4 actual = agi_windowToEyeCoordinates(fragCoord);" +
- " vec3 diff = actual.xyz - pointEC;" +
- " gl_FragColor = vec4(all(lessThan(diff, vec3(agi_epsilon6))));" +
- "}";
+ 'void main() { ' +
+ ' float z = agi_projection[3][2] / agi_projection[2][2];' +
+ ' float x = z / agi_projection[0][0];' +
+ ' float y = z / agi_projection[1][1];' +
+ ' vec3 pointEC = vec3(x, y, z);' +
+ ' vec4 fragCoord = vec4(0.0, 0.0, 0.0, -z);' +
+ ' vec4 actual = agi_windowToEyeCoordinates(fragCoord);' +
+ ' vec3 diff = actual.xyz - pointEC;' +
+ ' gl_FragColor = vec4(all(lessThan(diff, vec3(agi_epsilon6))));' +
+ '}';
verifyDraw(fs);
});
diff --git a/Specs/Renderer/ClearSpec.js b/Specs/Renderer/ClearSpec.js
index 661972417cc..2a2c95a650a 100644
--- a/Specs/Renderer/ClearSpec.js
+++ b/Specs/Renderer/ClearSpec.js
@@ -2,7 +2,7 @@
defineSuite([
'../Specs/createContext',
'../Specs/destroyContext'
- ], "Renderer/Clear", function(
+ ], 'Renderer/Clear', function(
createContext,
destroyContext) {
"use strict";
@@ -18,12 +18,12 @@ defineSuite([
destroyContext(context);
});
- it("clear0", function() {
+ it('clear0', function() {
context.clear();
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
});
- it("clear1", function() {
+ it('clear1', function() {
context.clear(context.createClearState({
color : {
red : 1.0,
@@ -35,7 +35,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 255, 255, 255]);
});
- it("clear2", function() {
+ it('clear2', function() {
context.clear(context.createClearState({
color : {
red : 1.0,
@@ -53,7 +53,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 0, 255, 0]);
});
- it("clear3", function() {
+ it('clear3', function() {
context.clear(context.createClearState({
color : {
red : 1.0,
@@ -103,7 +103,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
});
- it("clears a framebuffer color attachment", function() {
+ it('clears a framebuffer color attachment', function() {
var colorTexture = context.createTexture2D({
width : 1,
height : 1
@@ -129,7 +129,7 @@ defineSuite([
framebuffer = framebuffer.destroy();
});
- it("clears with dithering", function() {
+ it('clears with dithering', function() {
context.clear(context.createClearState({
color : {
red : 1.0,
@@ -153,7 +153,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
});
- it("fails to read pixels (width)", function() {
+ it('fails to read pixels (width)', function() {
expect(function() {
expect(context.readPixels({
width : -1
@@ -161,7 +161,7 @@ defineSuite([
}).toThrow();
});
- it("fails to read pixels (height)", function() {
+ it('fails to read pixels (height)', function() {
expect(function() {
expect(context.readPixels({
height : -1
diff --git a/Specs/Renderer/ClearStateSpec.js b/Specs/Renderer/ClearStateSpec.js
index 8020bed6c75..ee88c1ac3c0 100644
--- a/Specs/Renderer/ClearStateSpec.js
+++ b/Specs/Renderer/ClearStateSpec.js
@@ -2,7 +2,7 @@
defineSuite([
'../Specs/createContext',
'../Specs/destroyContext'
- ], "Renderer/ClearState", function(
+ ], 'Renderer/ClearState', function(
createContext,
destroyContext) {
"use strict";
@@ -18,7 +18,7 @@ defineSuite([
destroyContext(context);
});
- it("creates with defaults", function() {
+ it('creates with defaults', function() {
var defaultCS = {
scissorTest : {
enabled : false,
@@ -74,7 +74,7 @@ defineSuite([
expect(cs.stencil).toEqual(defaultCS.stencil);
});
- it("creates with all clear states", function() {
+ it('creates with all clear states', function() {
var c = {
scissorTest : {
enabled : true,
@@ -130,7 +130,7 @@ defineSuite([
expect(cs.stencil).toEqual(c.stencil);
});
- it("creates with some clear states", function() {
+ it('creates with some clear states', function() {
var c = {
scissorTest : {
enabled : true
@@ -162,7 +162,7 @@ defineSuite([
expect(cs.stencil).toEqual(defaultCS.stencil);
});
- it("fails to create (negative scissorTest.rectangle.width)", function() {
+ it('fails to create (negative scissorTest.rectangle.width)', function() {
expect(function() {
context.createClearState({
scissorTest : {
@@ -177,7 +177,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (negative scissorTest.rectangle.height)", function() {
+ it('fails to create (negative scissorTest.rectangle.height)', function() {
expect(function() {
context.createClearState({
scissorTest : {
diff --git a/Specs/Renderer/ConstructiveSolidGeometrySpec.js b/Specs/Renderer/ConstructiveSolidGeometrySpec.js
index 9abca286748..bb750d6c347 100644
--- a/Specs/Renderer/ConstructiveSolidGeometrySpec.js
+++ b/Specs/Renderer/ConstructiveSolidGeometrySpec.js
@@ -5,7 +5,7 @@ defineSuite([
'../Specs/renderFragment',
'Shaders/Ray',
'Shaders/ConstructiveSolidGeometry'
- ], "Renderer/ConstructiveSolidGeometry", function(
+ ], 'Renderer/ConstructiveSolidGeometry', function(
createContext,
destroyContext,
renderFragment,
@@ -27,11 +27,11 @@ defineSuite([
renderFragment = (function(renderFragment) {
return function(context, fs) {
var fsSource =
- "#line 0\n" +
+ '#line 0\n' +
ShadersRay +
- "#line 0\n" +
+ '#line 0\n' +
ShadersConstructiveSolidGeometry +
- "#line 0\n" +
+ '#line 0\n' +
fs;
return renderFragment(context, fsSource);
};
@@ -39,606 +39,606 @@ defineSuite([
///////////////////////////////////////////////////////////////////////
- it("agi_quadraticRealPolynomialRealRoots: negative b", function() {
+ it('agi_quadraticRealPolynomialRealRoots: negative b', function() {
var fs =
- "void main() { " +
- " agi_quadraticRoots r = agi_quadraticRealPolynomialRealRoots(2.0, -4.0, -6.0);" + // 2(x+1)(x-3)
- " gl_FragColor = vec4((r.numberOfRoots == 2) && (r.root0 == -1.0) && (r.root1 == 3.0)); " +
- "}";
+ 'void main() { ' +
+ ' agi_quadraticRoots r = agi_quadraticRealPolynomialRealRoots(2.0, -4.0, -6.0);' + // 2(x+1)(x-3)
+ ' gl_FragColor = vec4((r.numberOfRoots == 2) && (r.root0 == -1.0) && (r.root1 == 3.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_quadraticRealPolynomialRealRoots: positive b", function() {
+ it('agi_quadraticRealPolynomialRealRoots: positive b', function() {
var fs =
- "void main() { " +
- " agi_quadraticRoots r = agi_quadraticRealPolynomialRealRoots(2.0, 4.0, -6.0);" + // 2(x+1)(x-3)
- " gl_FragColor = vec4((r.numberOfRoots == 2) && (r.root0 == -3.0) && (r.root1 == 1.0)); " +
- "}";
+ 'void main() { ' +
+ ' agi_quadraticRoots r = agi_quadraticRealPolynomialRealRoots(2.0, 4.0, -6.0);' + // 2(x+1)(x-3)
+ ' gl_FragColor = vec4((r.numberOfRoots == 2) && (r.root0 == -3.0) && (r.root1 == 1.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_quadraticRealPolynomialRealRoots: marginally negative radical case", function() {
+ it('agi_quadraticRealPolynomialRealRoots: marginally negative radical case', function() {
var fs =
- "void main() { " +
- " agi_quadraticRoots r = agi_quadraticRealPolynomialRealRoots(2.0, -3.999999999999999, 2.0);" + // 2(x-1)(x-1)
- " gl_FragColor = vec4((r.numberOfRoots == 2) && agi_equalsEpsilon(r.root0, 1.0) && agi_equalsEpsilon(r.root1, 1.0)); " +
- "}";
+ 'void main() { ' +
+ ' agi_quadraticRoots r = agi_quadraticRealPolynomialRealRoots(2.0, -3.999999999999999, 2.0);' + // 2(x-1)(x-1)
+ ' gl_FragColor = vec4((r.numberOfRoots == 2) && agi_equalsEpsilon(r.root0, 1.0) && agi_equalsEpsilon(r.root1, 1.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_quadraticRealPolynomialRealRoots: complex roots", function() {
+ it('agi_quadraticRealPolynomialRealRoots: complex roots', function() {
var fs =
- "void main() { " +
- " agi_quadraticRoots r = agi_quadraticRealPolynomialRealRoots(2.0, -4.0, 6.0);" + // f(x) = 2x^2 - 4x + 6
- " gl_FragColor = vec4(r.numberOfRoots == 0); " +
- "}";
+ 'void main() { ' +
+ ' agi_quadraticRoots r = agi_quadraticRealPolynomialRealRoots(2.0, -4.0, 6.0);' + // f(x) = 2x^2 - 4x + 6
+ ' gl_FragColor = vec4(r.numberOfRoots == 0); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_quadraticRealPolynomialRealRoots: intractable", function() {
+ it('agi_quadraticRealPolynomialRealRoots: intractable', function() {
var fs =
- "void main() { " +
- " agi_quadraticRoots r = agi_quadraticRealPolynomialRealRoots(0.0, 0.0, -3.0);" + // f(x) = -3
- " gl_FragColor = vec4(r.numberOfRoots == 0); " +
- "}";
+ 'void main() { ' +
+ ' agi_quadraticRoots r = agi_quadraticRealPolynomialRealRoots(0.0, 0.0, -3.0);' + // f(x) = -3
+ ' gl_FragColor = vec4(r.numberOfRoots == 0); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_quadraticRealPolynomialRealRoots: linear", function() {
+ it('agi_quadraticRealPolynomialRealRoots: linear', function() {
var fs =
- "void main() { " +
- " agi_quadraticRoots r = agi_quadraticRealPolynomialRealRoots(0.0, 2.0, 8.0);" + // f(x) = 2x + 8
- " gl_FragColor = vec4((r.numberOfRoots == 1) && (r.root0 == -4.0)); " +
- "}";
+ 'void main() { ' +
+ ' agi_quadraticRoots r = agi_quadraticRealPolynomialRealRoots(0.0, 2.0, 8.0);' + // f(x) = 2x + 8
+ ' gl_FragColor = vec4((r.numberOfRoots == 1) && (r.root0 == -4.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_quadraticRealPolynomialRealRoots: 2nd order monomial", function() {
+ it('agi_quadraticRealPolynomialRealRoots: 2nd order monomial', function() {
var fs =
- "void main() { " +
- " agi_quadraticRoots r = agi_quadraticRealPolynomialRealRoots(3.0, 0.0, 0.0);" + // f(x) = 3x^2
- " gl_FragColor = vec4((r.numberOfRoots == 2) && (r.root0 == 0.0) && (r.root1 == 0.0)); " +
- "}";
+ 'void main() { ' +
+ ' agi_quadraticRoots r = agi_quadraticRealPolynomialRealRoots(3.0, 0.0, 0.0);' + // f(x) = 3x^2
+ ' gl_FragColor = vec4((r.numberOfRoots == 2) && (r.root0 == 0.0) && (r.root1 == 0.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_quadraticRealPolynomialRealRoots: parabolic complex roots", function() {
+ it('agi_quadraticRealPolynomialRealRoots: parabolic complex roots', function() {
var fs =
- "void main() { " +
- " agi_quadraticRoots r = agi_quadraticRealPolynomialRealRoots(3.0, 0.0, 18.0);" + // f(x) = 2x^2 + 18
- " gl_FragColor = vec4(r.numberOfRoots == 0); " +
- "}";
+ 'void main() { ' +
+ ' agi_quadraticRoots r = agi_quadraticRealPolynomialRealRoots(3.0, 0.0, 18.0);' + // f(x) = 2x^2 + 18
+ ' gl_FragColor = vec4(r.numberOfRoots == 0); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_quadraticRealPolynomialRealRoots: parabolic real roots", function() {
+ it('agi_quadraticRealPolynomialRealRoots: parabolic real roots', function() {
var fs =
- "void main() { " +
- " agi_quadraticRoots r = agi_quadraticRealPolynomialRealRoots(2.0, 0.0, -18.0);" + // f(x) = 2x^2 - 18
- " gl_FragColor = vec4((r.numberOfRoots == 2) && (r.root0 == -3.0) && (r.root1 == 3.0)); " +
- "}";
+ 'void main() { ' +
+ ' agi_quadraticRoots r = agi_quadraticRealPolynomialRealRoots(2.0, 0.0, -18.0);' + // f(x) = 2x^2 - 18
+ ' gl_FragColor = vec4((r.numberOfRoots == 2) && (r.root0 == -3.0) && (r.root1 == 3.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_quadraticRealPolynomialRealRoots: zero and negative root", function() {
+ it('agi_quadraticRealPolynomialRealRoots: zero and negative root', function() {
var fs =
- "void main() { " +
- " agi_quadraticRoots r = agi_quadraticRealPolynomialRealRoots(2.0, 6.0, 0.0);" + // f(x) = 2x^2 + 6x
- " gl_FragColor = vec4((r.numberOfRoots == 2) && (r.root0 == -3.0) && (r.root1 == 0.0)); " +
- "}";
+ 'void main() { ' +
+ ' agi_quadraticRoots r = agi_quadraticRealPolynomialRealRoots(2.0, 6.0, 0.0);' + // f(x) = 2x^2 + 6x
+ ' gl_FragColor = vec4((r.numberOfRoots == 2) && (r.root0 == -3.0) && (r.root1 == 0.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_quadraticRealPolynomialRealRoots: zero and positive root", function() {
+ it('agi_quadraticRealPolynomialRealRoots: zero and positive root', function() {
var fs =
- "void main() { " +
- " agi_quadraticRoots r = agi_quadraticRealPolynomialRealRoots(2.0, -6.0, 0.0);" + // f(x) = 2x^2 - 6x
- " gl_FragColor = vec4((r.numberOfRoots == 2) && (r.root0 == 0.0) && (r.root1 == 3.0)); " +
- "}";
+ 'void main() { ' +
+ ' agi_quadraticRoots r = agi_quadraticRealPolynomialRealRoots(2.0, -6.0, 0.0);' + // f(x) = 2x^2 - 6x
+ ' gl_FragColor = vec4((r.numberOfRoots == 2) && (r.root0 == 0.0) && (r.root1 == 3.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
///////////////////////////////////////////////////////////////////////
- it("agi_raySphereIntersectionInterval: fails to intersect (1)", function() {
+ it('agi_raySphereIntersectionInterval: fails to intersect (1)', function() {
var fs =
- "void main() { " +
- " agi_ray ray = agi_ray(vec3(0.0), vec3(-1.0, 0.0, 0.0));" +
- " agi_sphere sphere = agi_sphere(vec3(2.0, 0.0, 0.0), 1.0); " +
- " agi_raySegment i = agi_raySphereIntersectionInterval(ray, sphere);" +
- " gl_FragColor = vec4(agi_isEmpty(i)); " +
- "}";
+ 'void main() { ' +
+ ' agi_ray ray = agi_ray(vec3(0.0), vec3(-1.0, 0.0, 0.0));' +
+ ' agi_sphere sphere = agi_sphere(vec3(2.0, 0.0, 0.0), 1.0); ' +
+ ' agi_raySegment i = agi_raySphereIntersectionInterval(ray, sphere);' +
+ ' gl_FragColor = vec4(agi_isEmpty(i)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_raySphereIntersectionInterval: fails to intersect (2)", function() {
+ it('agi_raySphereIntersectionInterval: fails to intersect (2)', function() {
var fs =
- "void main() { " +
- " agi_ray ray = agi_ray(vec3(0.0, 2.0, 0.0), vec3(1.0, 0.0, 0.0));" +
- " agi_sphere sphere = agi_sphere(vec3(2.0, 0.0, 0.0), 1.0); " +
- " agi_raySegment i = agi_raySphereIntersectionInterval(ray, sphere);" +
- " gl_FragColor = vec4(agi_isEmpty(i)); " +
- "}";
+ 'void main() { ' +
+ ' agi_ray ray = agi_ray(vec3(0.0, 2.0, 0.0), vec3(1.0, 0.0, 0.0));' +
+ ' agi_sphere sphere = agi_sphere(vec3(2.0, 0.0, 0.0), 1.0); ' +
+ ' agi_raySegment i = agi_raySphereIntersectionInterval(ray, sphere);' +
+ ' gl_FragColor = vec4(agi_isEmpty(i)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_raySphereIntersectionInterval: fails to intersect (3)", function() {
+ it('agi_raySphereIntersectionInterval: fails to intersect (3)', function() {
var fs =
- "void main() { " +
- " agi_ray ray = agi_ray(vec3(0.0), normalize(vec3(1.0, 2.0, 0.0)));" +
- " agi_sphere sphere = agi_sphere(vec3(2.0, 0.0, 0.0), 1.0); " +
- " agi_raySegment i = agi_raySphereIntersectionInterval(ray, sphere);" +
- " gl_FragColor = vec4(agi_isEmpty(i)); " +
- "}";
+ 'void main() { ' +
+ ' agi_ray ray = agi_ray(vec3(0.0), normalize(vec3(1.0, 2.0, 0.0)));' +
+ ' agi_sphere sphere = agi_sphere(vec3(2.0, 0.0, 0.0), 1.0); ' +
+ ' agi_raySegment i = agi_raySphereIntersectionInterval(ray, sphere);' +
+ ' gl_FragColor = vec4(agi_isEmpty(i)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_raySphereIntersectionInterval: fails to intersect (4)", function() {
+ it('agi_raySphereIntersectionInterval: fails to intersect (4)', function() {
var fs =
- "void main() { " +
- " agi_ray ray = agi_ray(vec3(0.0), vec3(-1.0, 0.0, 0.0));" +
- " agi_sphere sphere = agi_sphere(vec3(2.0, 0.0, 0.0), 0.0); " +
- " agi_raySegment i = agi_raySphereIntersectionInterval(ray, sphere);" +
- " gl_FragColor = vec4(agi_isEmpty(i)); " +
- "}";
+ 'void main() { ' +
+ ' agi_ray ray = agi_ray(vec3(0.0), vec3(-1.0, 0.0, 0.0));' +
+ ' agi_sphere sphere = agi_sphere(vec3(2.0, 0.0, 0.0), 0.0); ' +
+ ' agi_raySegment i = agi_raySphereIntersectionInterval(ray, sphere);' +
+ ' gl_FragColor = vec4(agi_isEmpty(i)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_raySphereIntersectionInterval: outside ray intersects", function() {
+ it('agi_raySphereIntersectionInterval: outside ray intersects', function() {
var fs =
- "void main() { " +
- " agi_ray ray = agi_ray(vec3(0.0), vec3(1.0, 0.0, 0.0));" +
- " agi_sphere sphere = agi_sphere(vec3(2.0, 0.0, 0.0), 1.0); " +
- " agi_raySegment i = agi_raySphereIntersectionInterval(ray, sphere);" +
- " gl_FragColor = vec4(i == agi_raySegment(1.0, 3.0)); " +
- "}";
+ 'void main() { ' +
+ ' agi_ray ray = agi_ray(vec3(0.0), vec3(1.0, 0.0, 0.0));' +
+ ' agi_sphere sphere = agi_sphere(vec3(2.0, 0.0, 0.0), 1.0); ' +
+ ' agi_raySegment i = agi_raySphereIntersectionInterval(ray, sphere);' +
+ ' gl_FragColor = vec4(i == agi_raySegment(1.0, 3.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_raySphereIntersectionInterval: outside ray intersects at tangent", function() {
+ it('agi_raySphereIntersectionInterval: outside ray intersects at tangent', function() {
var fs =
- "void main() { " +
- " agi_ray ray = agi_ray(vec3(0.0, 1.0, 0.0), vec3(1.0, 0.0, 0.0));" +
- " agi_sphere sphere = agi_sphere(vec3(2.0, 0.0, 0.0), 1.0); " +
- " agi_raySegment i = agi_raySphereIntersectionInterval(ray, sphere);" +
- " gl_FragColor = vec4(i == agi_raySegment(2.0, 2.0)); " +
- "}";
+ 'void main() { ' +
+ ' agi_ray ray = agi_ray(vec3(0.0, 1.0, 0.0), vec3(1.0, 0.0, 0.0));' +
+ ' agi_sphere sphere = agi_sphere(vec3(2.0, 0.0, 0.0), 1.0); ' +
+ ' agi_raySegment i = agi_raySphereIntersectionInterval(ray, sphere);' +
+ ' gl_FragColor = vec4(i == agi_raySegment(2.0, 2.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_raySphereIntersectionInterval: inside ray intersects 0", function() {
+ it('agi_raySphereIntersectionInterval: inside ray intersects 0', function() {
var fs =
- "void main() { " +
- " agi_ray ray = agi_ray(vec3(2.0, 0.0, 0.0), vec3(1.0, 0.0, 0.0));" +
- " agi_sphere sphere = agi_sphere(vec3(2.0, 0.0, 0.0), 1.0); " +
- " agi_raySegment i = agi_raySphereIntersectionInterval(ray, sphere);" +
- " gl_FragColor = vec4(i == agi_raySegment(0.0, 1.0)); " +
- "}";
+ 'void main() { ' +
+ ' agi_ray ray = agi_ray(vec3(2.0, 0.0, 0.0), vec3(1.0, 0.0, 0.0));' +
+ ' agi_sphere sphere = agi_sphere(vec3(2.0, 0.0, 0.0), 1.0); ' +
+ ' agi_raySegment i = agi_raySphereIntersectionInterval(ray, sphere);' +
+ ' gl_FragColor = vec4(i == agi_raySegment(0.0, 1.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_raySphereIntersectionInterval: inside ray intersects 1", function() {
+ it('agi_raySphereIntersectionInterval: inside ray intersects 1', function() {
var fs =
- "void main() { " +
- " agi_ray ray = agi_ray(vec3(2.0, 0.0, 0.0), vec3(-1.0, 0.0, 0.0));" +
- " agi_sphere sphere = agi_sphere(vec3(2.0, 0.0, 0.0), 1.0); " +
- " agi_raySegment i = agi_raySphereIntersectionInterval(ray, sphere);" +
- " gl_FragColor = vec4(i == agi_raySegment(0.0, 1.0)); " +
- "}";
+ 'void main() { ' +
+ ' agi_ray ray = agi_ray(vec3(2.0, 0.0, 0.0), vec3(-1.0, 0.0, 0.0));' +
+ ' agi_sphere sphere = agi_sphere(vec3(2.0, 0.0, 0.0), 1.0); ' +
+ ' agi_raySegment i = agi_raySphereIntersectionInterval(ray, sphere);' +
+ ' gl_FragColor = vec4(i == agi_raySegment(0.0, 1.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
///////////////////////////////////////////////////////////////////////
- it("agi_sphereNormal: 0", function() {
+ it('agi_sphereNormal: 0', function() {
var fs =
- "void main() { " +
- " vec3 normal = agi_sphereNormal(agi_sphere(vec3(0.0), 1.0), vec3(1.0, 0.0, 0.0));" +
- " gl_FragColor = vec4(normal == vec3(1.0, 0.0, 0.0)); " +
- "}";
+ 'void main() { ' +
+ ' vec3 normal = agi_sphereNormal(agi_sphere(vec3(0.0), 1.0), vec3(1.0, 0.0, 0.0));' +
+ ' gl_FragColor = vec4(normal == vec3(1.0, 0.0, 0.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_sphereNormal: 1", function() {
+ it('agi_sphereNormal: 1', function() {
var fs =
- "void main() { " +
- " vec3 normal = agi_sphereNormal(agi_sphere(vec3(0.0, 1.0, 0.0), 1.0), vec3(0.0, 2.0, 0.0));" +
- " gl_FragColor = vec4(normal == vec3(0.0, 1.0, 0.0)); " +
- "}";
+ 'void main() { ' +
+ ' vec3 normal = agi_sphereNormal(agi_sphere(vec3(0.0, 1.0, 0.0), 1.0), vec3(0.0, 2.0, 0.0));' +
+ ' gl_FragColor = vec4(normal == vec3(0.0, 1.0, 0.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
///////////////////////////////////////////////////////////////////////
- it("agi_ellipsoidContainsPoint: doesn't contain point 0", function() {
+ it('agi_ellipsoidContainsPoint: does not contain point 0', function() {
var fs =
- "void main() {" +
- " agi_ellipsoid ellipsoid = agi_ellipsoidNew(vec3(0.0), vec3(3.0, 2.0, 1.0));" + // center, radii
- " vec3 point = vec3(4.0, 0.0, 0.0);" +
- " gl_FragColor = vec4(!agi_ellipsoidContainsPoint(ellipsoid, point)); " +
- "}";
+ 'void main() {' +
+ ' agi_ellipsoid ellipsoid = agi_ellipsoidNew(vec3(0.0), vec3(3.0, 2.0, 1.0));' + // center, radii
+ ' vec3 point = vec3(4.0, 0.0, 0.0);' +
+ ' gl_FragColor = vec4(!agi_ellipsoidContainsPoint(ellipsoid, point)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_ellipsoidContainsPoint: doesn't contain point 1", function() {
+ it('agi_ellipsoidContainsPoint: does not contain point 1', function() {
var fs =
- "void main() {" +
- " agi_ellipsoid ellipsoid = agi_ellipsoidNew(vec3(0.0), vec3(3.0, 2.0, 1.0));" + // center, radii
- " vec3 point = vec3(-4.0, 0.0, 0.0);" +
- " gl_FragColor = vec4(!agi_ellipsoidContainsPoint(ellipsoid, point)); " +
- "}";
+ 'void main() {' +
+ ' agi_ellipsoid ellipsoid = agi_ellipsoidNew(vec3(0.0), vec3(3.0, 2.0, 1.0));' + // center, radii
+ ' vec3 point = vec3(-4.0, 0.0, 0.0);' +
+ ' gl_FragColor = vec4(!agi_ellipsoidContainsPoint(ellipsoid, point)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_ellipsoidContainsPoint: doesn't contain point 2", function() {
+ it('agi_ellipsoidContainsPoint: does not contain point 2', function() {
var fs =
- "void main() {" +
- " agi_ellipsoid ellipsoid = agi_ellipsoidNew(vec3(0.0), vec3(3.0, 2.0, 1.0));" + // center, radii
- " vec3 point = vec3(0.0, 0.0, 2.0);" +
- " gl_FragColor = vec4(!agi_ellipsoidContainsPoint(ellipsoid, point)); " +
- "}";
+ 'void main() {' +
+ ' agi_ellipsoid ellipsoid = agi_ellipsoidNew(vec3(0.0), vec3(3.0, 2.0, 1.0));' + // center, radii
+ ' vec3 point = vec3(0.0, 0.0, 2.0);' +
+ ' gl_FragColor = vec4(!agi_ellipsoidContainsPoint(ellipsoid, point)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_ellipsoidContainsPoint: doesn't contain point 3", function() {
- var fs = "void main() {" + "agi_ellipsoid ellipsoid = agi_ellipsoidNew(vec3(0.0), vec3(3.0, 2.0, 1.0));" + // center, radii
- "vec3 point = vec3(0.0, 0.0, -2.0);" + "gl_FragColor = vec4(!agi_ellipsoidContainsPoint(ellipsoid, point)); }";
+ it('agi_ellipsoidContainsPoint: does not contain point 3', function() {
+ var fs = 'void main() {' + 'agi_ellipsoid ellipsoid = agi_ellipsoidNew(vec3(0.0), vec3(3.0, 2.0, 1.0));' + // center, radii
+ 'vec3 point = vec3(0.0, 0.0, -2.0);' + 'gl_FragColor = vec4(!agi_ellipsoidContainsPoint(ellipsoid, point)); }';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_ellipsoidContainsPoint: contains point 0", function() {
+ it('agi_ellipsoidContainsPoint: contains point 0', function() {
var fs =
- "void main() {" +
- " agi_ellipsoid ellipsoid = agi_ellipsoidNew(vec3(0.0), vec3(3.0, 2.0, 1.0));" + // center, radii
- " vec3 point = vec3(2.0, 0.0, 0.0);" +
- " gl_FragColor = vec4(agi_ellipsoidContainsPoint(ellipsoid, point)); " +
- "}";
+ 'void main() {' +
+ ' agi_ellipsoid ellipsoid = agi_ellipsoidNew(vec3(0.0), vec3(3.0, 2.0, 1.0));' + // center, radii
+ ' vec3 point = vec3(2.0, 0.0, 0.0);' +
+ ' gl_FragColor = vec4(agi_ellipsoidContainsPoint(ellipsoid, point)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_ellipsoidContainsPoint: contains point 1", function() {
+ it('agi_ellipsoidContainsPoint: contains point 1', function() {
var fs =
- "void main() {" +
- " agi_ellipsoid ellipsoid = agi_ellipsoidNew(vec3(0.0), vec3(3.0, 2.0, 1.0));" + // center, radii
- " vec3 point = vec3(-2.0, 0.0, 0.0);" +
- " gl_FragColor = vec4(agi_ellipsoidContainsPoint(ellipsoid, point)); " +
- "}";
+ 'void main() {' +
+ ' agi_ellipsoid ellipsoid = agi_ellipsoidNew(vec3(0.0), vec3(3.0, 2.0, 1.0));' + // center, radii
+ ' vec3 point = vec3(-2.0, 0.0, 0.0);' +
+ ' gl_FragColor = vec4(agi_ellipsoidContainsPoint(ellipsoid, point)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_ellipsoidContainsPoint: contains point 2", function() {
+ it('agi_ellipsoidContainsPoint: contains point 2', function() {
var fs =
- "void main() {" +
- " agi_ellipsoid ellipsoid = agi_ellipsoidNew(vec3(0.0), vec3(3.0, 2.0, 1.0));" + // center, radii
- " vec3 point = vec3(0.0, 1.0, 0.0);" +
- " gl_FragColor = vec4(agi_ellipsoidContainsPoint(ellipsoid, point)); " +
- "}";
+ 'void main() {' +
+ ' agi_ellipsoid ellipsoid = agi_ellipsoidNew(vec3(0.0), vec3(3.0, 2.0, 1.0));' + // center, radii
+ ' vec3 point = vec3(0.0, 1.0, 0.0);' +
+ ' gl_FragColor = vec4(agi_ellipsoidContainsPoint(ellipsoid, point)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_ellipsoidContainsPoint: contains point 3", function() {
+ it('agi_ellipsoidContainsPoint: contains point 3', function() {
var fs =
- "void main() {" +
- " agi_ellipsoid ellipsoid = agi_ellipsoidNew(vec3(0.0), vec3(3.0, 2.0, 1.0));" + // center, radii
- " vec3 point = vec3(0.0, -1.0, 0.0);" +
- " gl_FragColor = vec4(agi_ellipsoidContainsPoint(ellipsoid, point)); " +
- "}";
+ 'void main() {' +
+ ' agi_ellipsoid ellipsoid = agi_ellipsoidNew(vec3(0.0), vec3(3.0, 2.0, 1.0));' + // center, radii
+ ' vec3 point = vec3(0.0, -1.0, 0.0);' +
+ ' gl_FragColor = vec4(agi_ellipsoidContainsPoint(ellipsoid, point)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
///////////////////////////////////////////////////////////////////////
- it("agi_coneContainsPoint: doesn't contain point 0", function() {
+ it('agi_coneContainsPoint: does not contain point 0', function() {
var fs =
- "void main() {" +
- " agi_cone cone = agi_coneNew(vec3(0.0), vec3(0.0, 0.0, 1.0), radians(45.0));" + // vertex, axis, halfAperture
- " vec3 point = vec3(1.0, 0.0, 0.0);" +
- " gl_FragColor = vec4(!agi_coneContainsPoint(cone, point)); " +
- "}";
+ 'void main() {' +
+ ' agi_cone cone = agi_coneNew(vec3(0.0), vec3(0.0, 0.0, 1.0), radians(45.0));' + // vertex, axis, halfAperture
+ ' vec3 point = vec3(1.0, 0.0, 0.0);' +
+ ' gl_FragColor = vec4(!agi_coneContainsPoint(cone, point)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_coneContainsPoint: doesn't contain point 1", function() {
+ it('agi_coneContainsPoint: does not contain point 1', function() {
var fs =
- "void main() {" +
- " agi_cone cone = agi_coneNew(vec3(0.0, 0.0, 1.0), vec3(0.0, 0.0, 1.0), radians(45.0));" + // vertex, axis, halfAperture
- " vec3 point = vec3(-1.0, 0.0, 0.0);" +
- " gl_FragColor = vec4(!agi_coneContainsPoint(cone, point)); " +
- "}";
+ 'void main() {' +
+ ' agi_cone cone = agi_coneNew(vec3(0.0, 0.0, 1.0), vec3(0.0, 0.0, 1.0), radians(45.0));' + // vertex, axis, halfAperture
+ ' vec3 point = vec3(-1.0, 0.0, 0.0);' +
+ ' gl_FragColor = vec4(!agi_coneContainsPoint(cone, point)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_coneContainsPoint: doesn't contain point 2", function() {
+ it('agi_coneContainsPoint: does not contain point 2', function() {
var fs =
- "void main() {" +
- " agi_cone cone = agi_coneNew(vec3(0.0), vec3(0.0, 0.0, 1.0), radians(45.0));" + // vertex, axis, halfAperture
- " vec3 point = vec3(0.0, 0.0, -1.0);" +
- " gl_FragColor = vec4(!agi_coneContainsPoint(cone, point)); " +
- "}";
+ 'void main() {' +
+ ' agi_cone cone = agi_coneNew(vec3(0.0), vec3(0.0, 0.0, 1.0), radians(45.0));' + // vertex, axis, halfAperture
+ ' vec3 point = vec3(0.0, 0.0, -1.0);' +
+ ' gl_FragColor = vec4(!agi_coneContainsPoint(cone, point)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_coneContainsPoint: doesn't contain point 2", function() {
+ it('agi_coneContainsPoint: does not contain point 2', function() {
var fs =
- "void main() {" +
- " agi_cone cone = agi_coneNew(vec3(0.0), vec3(0.0, 0.0, 1.0), radians(120.0));" + // vertex, axis, halfAperture
- " vec3 point = vec3(0.0, 0.0, -1.0);" +
- " gl_FragColor = vec4(!agi_coneContainsPoint(cone, point)); " +
- "}";
+ 'void main() {' +
+ ' agi_cone cone = agi_coneNew(vec3(0.0), vec3(0.0, 0.0, 1.0), radians(120.0));' + // vertex, axis, halfAperture
+ ' vec3 point = vec3(0.0, 0.0, -1.0);' +
+ ' gl_FragColor = vec4(!agi_coneContainsPoint(cone, point)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_coneContainsPoint: contains point 0", function() {
+ it('agi_coneContainsPoint: contains point 0', function() {
var fs =
- "void main() {" +
- " agi_cone cone = agi_coneNew(vec3(0.0, 0.0, 2.0), vec3(0.0, 0.0, 1.0), radians(45.0));" + // vertex, axis, halfAperture
- " vec3 point = vec3(0.0, 0.0, 3.0);" +
- " gl_FragColor = vec4(agi_coneContainsPoint(cone, point)); " +
- "}";
+ 'void main() {' +
+ ' agi_cone cone = agi_coneNew(vec3(0.0, 0.0, 2.0), vec3(0.0, 0.0, 1.0), radians(45.0));' + // vertex, axis, halfAperture
+ ' vec3 point = vec3(0.0, 0.0, 3.0);' +
+ ' gl_FragColor = vec4(agi_coneContainsPoint(cone, point)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_coneContainsPoint: contains point 1", function() {
+ it('agi_coneContainsPoint: contains point 1', function() {
var fs =
- "void main() {" +
- " agi_cone cone = agi_coneNew(vec3(0.0), vec3(0.0, 0.0, 1.0), radians(45.0));" + // vertex, axis, halfAperture
- " vec3 point = vec3(1.0, 0.0, 2.0);" +
- " gl_FragColor = vec4(agi_coneContainsPoint(cone, point)); " +
- "}";
+ 'void main() {' +
+ ' agi_cone cone = agi_coneNew(vec3(0.0), vec3(0.0, 0.0, 1.0), radians(45.0));' + // vertex, axis, halfAperture
+ ' vec3 point = vec3(1.0, 0.0, 2.0);' +
+ ' gl_FragColor = vec4(agi_coneContainsPoint(cone, point)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_coneContainsPoint: contains point 2", function() {
+ it('agi_coneContainsPoint: contains point 2', function() {
var fs =
- "void main() {" +
- " agi_cone cone = agi_coneNew(vec3(0.0), vec3(0.0, 0.0, 1.0), radians(120.0));" + // vertex, axis, halfAperture
- " vec3 point = vec3(1.0, 0.0, 0.0);" +
- " gl_FragColor = vec4(agi_coneContainsPoint(cone, point)); " +
- "}";
+ 'void main() {' +
+ ' agi_cone cone = agi_coneNew(vec3(0.0), vec3(0.0, 0.0, 1.0), radians(120.0));' + // vertex, axis, halfAperture
+ ' vec3 point = vec3(1.0, 0.0, 0.0);' +
+ ' gl_FragColor = vec4(agi_coneContainsPoint(cone, point)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
///////////////////////////////////////////////////////////////////////
- it("agi_rayConeIntersectionInterval: half aperture of 0.0", function() {
+ it('agi_rayConeIntersectionInterval: half aperture of 0.0', function() {
var fs =
- "void main() {" +
- " agi_ray ray = agi_ray(vec3(0.0, 0.0, -1.0), vec3(0.0, 0.0, -1.0));" + // origin, direction
- " agi_cone cone = agi_coneNew(vec3(0.0), vec3(0.0, 0.0, 1.0), radians(0.0));" + // vertex, axis, halfAperture
- " agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);" +
- " gl_FragColor = vec4(result.count == 0); " +
- "}";
+ 'void main() {' +
+ ' agi_ray ray = agi_ray(vec3(0.0, 0.0, -1.0), vec3(0.0, 0.0, -1.0));' + // origin, direction
+ ' agi_cone cone = agi_coneNew(vec3(0.0), vec3(0.0, 0.0, 1.0), radians(0.0));' + // vertex, axis, halfAperture
+ ' agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);' +
+ ' gl_FragColor = vec4(result.count == 0); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
// Fails on AMD with or without ANGLE
- xit("agi_rayConeIntersectionInterval: half aperture of 90.0", function() {
+ xit('agi_rayConeIntersectionInterval: half aperture of 90.0', function() {
var fs =
- "void main() {" +
- " agi_ray ray = agi_ray(vec3(1.0, 1.0, -1.0), vec3(0.0, 0.0, 1.0));" + // origin, direction
- " agi_cone cone = agi_coneNew(vec3(0.0), vec3(0.0, 0.0, 1.0), radians(90.0));" + // vertex, axis, halfAperture
- " agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);" +
- " gl_FragColor = vec4((result.count == 1) " +
- " && agi_equalsEpsilon(1.0, result.intervals[0].start, agi_epsilon6) " +
- " && (result.intervals[0].stop == agi_infinity)); " +
- "}";
+ 'void main() {' +
+ ' agi_ray ray = agi_ray(vec3(1.0, 1.0, -1.0), vec3(0.0, 0.0, 1.0));' + // origin, direction
+ ' agi_cone cone = agi_coneNew(vec3(0.0), vec3(0.0, 0.0, 1.0), radians(90.0));' + // vertex, axis, halfAperture
+ ' agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);' +
+ ' gl_FragColor = vec4((result.count == 1) ' +
+ ' && agi_equalsEpsilon(1.0, result.intervals[0].start, agi_epsilon6) ' +
+ ' && (result.intervals[0].stop == agi_infinity)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_rayConeIntersectionInterval: half aperture of 180.0", function() {
+ it('agi_rayConeIntersectionInterval: half aperture of 180.0', function() {
var fs =
- "void main() {" +
- " agi_ray ray = agi_ray(vec3(0.0, 0.0, -1.0), vec3(0.0, 0.0, -1.0));" + // origin, direction
- " agi_cone cone = agi_coneNew(vec3(0.0), vec3(0.0, 0.0, 1.0), radians(180.0));" + // vertex, axis, halfAperture
- " agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);" +
- " gl_FragColor = vec4((result.count == 1) " +
- " && agi_equalsEpsilon(0.0, result.intervals[0].start) " +
- " && (result.intervals[0].stop == agi_infinity)); " +
- "}";
+ 'void main() {' +
+ ' agi_ray ray = agi_ray(vec3(0.0, 0.0, -1.0), vec3(0.0, 0.0, -1.0));' + // origin, direction
+ ' agi_cone cone = agi_coneNew(vec3(0.0), vec3(0.0, 0.0, 1.0), radians(180.0));' + // vertex, axis, halfAperture
+ ' agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);' +
+ ' gl_FragColor = vec4((result.count == 1) ' +
+ ' && agi_equalsEpsilon(0.0, result.intervals[0].start) ' +
+ ' && (result.intervals[0].stop == agi_infinity)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_rayConeIntersectionInterval: ray misses cone 0", function() {
+ it('agi_rayConeIntersectionInterval: ray misses cone 0', function() {
var fs =
- "void main() {" +
- " agi_ray ray = agi_ray(vec3(0.0, 0.0, -1.0), vec3(0.0, 0.0, -1.0));" + // origin, direction
- " agi_cone cone = agi_coneNew(vec3(0.0), vec3(0.0, 0.0, 1.0), radians(45.0));" + // vertex, axis, halfAperture
- " agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);" +
- " gl_FragColor = vec4(result.count == 0); " +
- "}";
+ 'void main() {' +
+ ' agi_ray ray = agi_ray(vec3(0.0, 0.0, -1.0), vec3(0.0, 0.0, -1.0));' + // origin, direction
+ ' agi_cone cone = agi_coneNew(vec3(0.0), vec3(0.0, 0.0, 1.0), radians(45.0));' + // vertex, axis, halfAperture
+ ' agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);' +
+ ' gl_FragColor = vec4(result.count == 0); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_rayConeIntersectionInterval: ray misses cone 1", function() {
+ it('agi_rayConeIntersectionInterval: ray misses cone 1', function() {
var fs =
- "void main() {" +
- " agi_ray ray = agi_ray(vec3(0.0), vec3(1.0, 0.0, 0.0));" + // origin, direction
- " agi_cone cone = agi_coneNew(vec3(0.0, 0.0, 1.0), vec3(0.0, 0.0, 1.0), radians(45.0) );" + // vertex, axis, halfAperture
- " agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);" +
- " gl_FragColor = vec4(result.count == 0); " +
- "}";
+ 'void main() {' +
+ ' agi_ray ray = agi_ray(vec3(0.0), vec3(1.0, 0.0, 0.0));' + // origin, direction
+ ' agi_cone cone = agi_coneNew(vec3(0.0, 0.0, 1.0), vec3(0.0, 0.0, 1.0), radians(45.0) );' + // vertex, axis, halfAperture
+ ' agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);' +
+ ' gl_FragColor = vec4(result.count == 0); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_rayConeIntersectionInterval: outside ray intersects 0 - on cone's surface", function() {
+ it('agi_rayConeIntersectionInterval: outside ray intersects 0 - on cone surface', function() {
var fs =
- "void main() {" +
- " agi_ray ray = agi_ray(vec3(4.0, 1.0, 2.0), normalize(vec3(-1.0, 0.0, 1.0)));" + // origin, direction
- " agi_cone cone = agi_coneNew(vec3(1.0), vec3(0.0, 0.0, 1.0), radians(45.0));" + // vertex, axis, halfAperture
- " agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);" +
- " gl_FragColor = vec4(" +
- " (result.count == 1) && " +
- " agi_equalsEpsilon(cos(cone.halfAperture), dot(normalize(agi_pointAlongRay(ray, result.intervals[0].start) - cone.vertex), cone.axis))); " +
- "}";
+ 'void main() {' +
+ ' agi_ray ray = agi_ray(vec3(4.0, 1.0, 2.0), normalize(vec3(-1.0, 0.0, 1.0)));' + // origin, direction
+ ' agi_cone cone = agi_coneNew(vec3(1.0), vec3(0.0, 0.0, 1.0), radians(45.0));' + // vertex, axis, halfAperture
+ ' agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);' +
+ ' gl_FragColor = vec4(' +
+ ' (result.count == 1) && ' +
+ ' agi_equalsEpsilon(cos(cone.halfAperture), dot(normalize(agi_pointAlongRay(ray, result.intervals[0].start) - cone.vertex), cone.axis))); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_rayConeIntersectionInterval: outside ray intersects 0 - normal is perpendicular to cone's surface", function() {
+ it('agi_rayConeIntersectionInterval: outside ray intersects 0 - normal is perpendicular to cone surface', function() {
var fs =
- "void main() {" +
- " agi_ray ray = agi_ray(vec3(4.0, 1.0, 2.0), normalize(vec3(-1.0, 0.0, 1.0)));" + // origin, direction
- " agi_cone cone = agi_coneNew(vec3(1.0), vec3(0.0, 0.0, 1.0), radians(45.0));" + // vertex, axis, halfAperture
- " agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);" +
- " gl_FragColor = vec4(" +
- " (result.count == 1) && " +
- " agi_equalsEpsilon(dot(agi_coneNormal(cone, agi_pointAlongRay(ray, result.intervals[0].start)), agi_pointAlongRay(ray, result.intervals[0].start) - cone.vertex), 0.0, agi_epsilon6)); " +
- "}";
+ 'void main() {' +
+ ' agi_ray ray = agi_ray(vec3(4.0, 1.0, 2.0), normalize(vec3(-1.0, 0.0, 1.0)));' + // origin, direction
+ ' agi_cone cone = agi_coneNew(vec3(1.0), vec3(0.0, 0.0, 1.0), radians(45.0));' + // vertex, axis, halfAperture
+ ' agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);' +
+ ' gl_FragColor = vec4(' +
+ ' (result.count == 1) && ' +
+ ' agi_equalsEpsilon(dot(agi_coneNormal(cone, agi_pointAlongRay(ray, result.intervals[0].start)), agi_pointAlongRay(ray, result.intervals[0].start) - cone.vertex), 0.0, agi_epsilon6)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_rayConeIntersectionInterval: outside ray intersects 1", function() {
+ it('agi_rayConeIntersectionInterval: outside ray intersects 1', function() {
var fs =
- "void main() {" +
- " agi_ray ray = agi_ray(vec3(0.0), vec3(0.0, 0.0, 1.0));" + // origin, direction
- " agi_cone cone = agi_coneNew(vec3(0.0, 0.0, 1.0), vec3(0.0, 0.0, 1.0), radians(45.0));" + // vertex, axis, halfAperture
- " agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);" +
- " gl_FragColor = vec4((result.count == 1) && agi_equalsEpsilon(1.0, result.intervals[0].start)); " +
- "}";
+ 'void main() {' +
+ ' agi_ray ray = agi_ray(vec3(0.0), vec3(0.0, 0.0, 1.0));' + // origin, direction
+ ' agi_cone cone = agi_coneNew(vec3(0.0, 0.0, 1.0), vec3(0.0, 0.0, 1.0), radians(45.0));' + // vertex, axis, halfAperture
+ ' agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);' +
+ ' gl_FragColor = vec4((result.count == 1) && agi_equalsEpsilon(1.0, result.intervals[0].start)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_rayConeIntersectionInterval: outside ray intersects 2", function() {
+ it('agi_rayConeIntersectionInterval: outside ray intersects 2', function() {
var fs =
- "void main() {" +
- " agi_ray ray = agi_ray(vec3(0.0), vec3(1.0, 0.0, 0.0));" + // origin, direction
- " agi_cone cone = agi_coneNew(vec3(2.0, 1.0, 0.0), vec3(0.0, -1.0, 0.0), radians(45.0));" + // vertex, axis, halfAperture
- " agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);" +
- " gl_FragColor = vec4((result.count == 1) && agi_equalsEpsilon(result.intervals[0].start, 1.0, agi_epsilon6) && agi_equalsEpsilon(result.intervals[0].stop, 3.0, agi_epsilon6)); " +
- "}";
+ 'void main() {' +
+ ' agi_ray ray = agi_ray(vec3(0.0), vec3(1.0, 0.0, 0.0));' + // origin, direction
+ ' agi_cone cone = agi_coneNew(vec3(2.0, 1.0, 0.0), vec3(0.0, -1.0, 0.0), radians(45.0));' + // vertex, axis, halfAperture
+ ' agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);' +
+ ' gl_FragColor = vec4((result.count == 1) && agi_equalsEpsilon(result.intervals[0].start, 1.0, agi_epsilon6) && agi_equalsEpsilon(result.intervals[0].stop, 3.0, agi_epsilon6)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_rayConeIntersectionInterval: outside ray intersects at vertex", function() {
+ it('agi_rayConeIntersectionInterval: outside ray intersects at vertex', function() {
var fs =
- "void main() {" +
- " agi_ray ray = agi_ray(vec3(-1.0, 0.0, 0.0), vec3(1.0, 0.0, 0.0));" + // origin, direction
- " agi_cone cone = agi_coneNew(vec3(0.0), vec3(0.0, 0.0, 1.0), radians(45.0));" + // vertex, axis, halfAperture
- " agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);" +
- " gl_FragColor = vec4((result.count == 1) && (result.intervals[0] == agi_raySegment(1.0, 1.0))); " +
- "}";
+ 'void main() {' +
+ ' agi_ray ray = agi_ray(vec3(-1.0, 0.0, 0.0), vec3(1.0, 0.0, 0.0));' + // origin, direction
+ ' agi_cone cone = agi_coneNew(vec3(0.0), vec3(0.0, 0.0, 1.0), radians(45.0));' + // vertex, axis, halfAperture
+ ' agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);' +
+ ' gl_FragColor = vec4((result.count == 1) && (result.intervals[0] == agi_raySegment(1.0, 1.0))); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_rayConeIntersectionInterval: inside ray intersects at vertex", function() {
+ it('agi_rayConeIntersectionInterval: inside ray intersects at vertex', function() {
var fs =
- "void main() {" +
- " agi_ray ray = agi_ray(vec3(0.0), vec3(0.0, 0.0, 1.0));" + // origin, direction
- " agi_cone cone = agi_coneNew(vec3(0.0, 0.0, 1.0), vec3(0.0, 0.0, -1.0), radians(45.0));" + // vertex, axis, halfAperture
- " agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);" +
- " gl_FragColor = vec4((result.count == 1) && (result.intervals[0] == agi_raySegment(0.0, 1.0))); " +
- "}";
+ 'void main() {' +
+ ' agi_ray ray = agi_ray(vec3(0.0), vec3(0.0, 0.0, 1.0));' + // origin, direction
+ ' agi_cone cone = agi_coneNew(vec3(0.0, 0.0, 1.0), vec3(0.0, 0.0, -1.0), radians(45.0));' + // vertex, axis, halfAperture
+ ' agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);' +
+ ' gl_FragColor = vec4((result.count == 1) && (result.intervals[0] == agi_raySegment(0.0, 1.0))); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_rayConeIntersectionInterval: inside ray intersects 1", function() {
+ it('agi_rayConeIntersectionInterval: inside ray intersects 1', function() {
var fs =
- "void main() {" +
- " agi_ray ray = agi_ray(vec3(0.0), vec3(1.0, 0.0, 0.0));" + // origin, direction
- " agi_cone cone = agi_coneNew(vec3(0.0, 0.0, 1.0), vec3(0.0, 0.0, -1.0), radians(45.0));" + // vertex, axis, halfAperture
- " agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);" +
- " gl_FragColor = vec4((result.count == 1) && agi_equalsEpsilon(result.intervals[0].start, 0.0, agi_epsilon6) && agi_equalsEpsilon(result.intervals[0].stop, 1.0, agi_epsilon6)); " +
- "}";
+ 'void main() {' +
+ ' agi_ray ray = agi_ray(vec3(0.0), vec3(1.0, 0.0, 0.0));' + // origin, direction
+ ' agi_cone cone = agi_coneNew(vec3(0.0, 0.0, 1.0), vec3(0.0, 0.0, -1.0), radians(45.0));' + // vertex, axis, halfAperture
+ ' agi_raySegmentCollection result = agi_rayConeIntersectionInterval(ray, cone);' +
+ ' gl_FragColor = vec4((result.count == 1) && agi_equalsEpsilon(result.intervals[0].start, 0.0, agi_epsilon6) && agi_equalsEpsilon(result.intervals[0].stop, 1.0, agi_epsilon6)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
///////////////////////////////////////////////////////////////////////
- it("agi_rayHalfspaceIntersectionInterval: ray origin outside and directed away", function() {
+ it('agi_rayHalfspaceIntersectionInterval: ray origin outside and directed away', function() {
var fs =
- "void main() {" +
- " agi_ray ray = agi_ray(vec3(0.0, 0.0, 1.0), vec3(0.0, 0.0, 1.0));" + // origin, direction
- " agi_halfspace halfspace = agi_halfspace(vec3(0.0), vec3(0.0, 0.0, 1.0));" + // center, normal
- " agi_raySegment i = agi_rayHalfspaceIntersectionInterval(ray, halfspace);" +
- " gl_FragColor = vec4(agi_isEmpty(i)); " +
- "}";
+ 'void main() {' +
+ ' agi_ray ray = agi_ray(vec3(0.0, 0.0, 1.0), vec3(0.0, 0.0, 1.0));' + // origin, direction
+ ' agi_halfspace halfspace = agi_halfspace(vec3(0.0), vec3(0.0, 0.0, 1.0));' + // center, normal
+ ' agi_raySegment i = agi_rayHalfspaceIntersectionInterval(ray, halfspace);' +
+ ' gl_FragColor = vec4(agi_isEmpty(i)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_rayHalfspaceIntersectionInterval: ray origin outside and directed parallel", function() {
+ it('agi_rayHalfspaceIntersectionInterval: ray origin outside and directed parallel', function() {
var fs =
- "void main() {" +
- " agi_ray ray = agi_ray(vec3(0.0, 0.0, 1.0), vec3(0.0, 1.0, 0.0));" + // origin, direction
- " agi_halfspace halfspace = agi_halfspace(vec3(0.0), vec3(0.0, 0.0, 1.0));" + // center, normal
- " agi_raySegment i = agi_rayHalfspaceIntersectionInterval(ray, halfspace);" +
- " gl_FragColor = vec4(agi_isEmpty(i)); " +
- "}";
+ 'void main() {' +
+ ' agi_ray ray = agi_ray(vec3(0.0, 0.0, 1.0), vec3(0.0, 1.0, 0.0));' + // origin, direction
+ ' agi_halfspace halfspace = agi_halfspace(vec3(0.0), vec3(0.0, 0.0, 1.0));' + // center, normal
+ ' agi_raySegment i = agi_rayHalfspaceIntersectionInterval(ray, halfspace);' +
+ ' gl_FragColor = vec4(agi_isEmpty(i)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_rayHalfspaceIntersectionInterval: ray origin outside and directed inward", function() {
+ it('agi_rayHalfspaceIntersectionInterval: ray origin outside and directed inward', function() {
var fs =
- "void main() {" +
- " agi_ray ray = agi_ray(vec3(1.0, 1.0, 1.0), vec3(0.0, 0.0, -1.0));" + // origin, direction
- " agi_halfspace halfspace = agi_halfspace(vec3(0.0), vec3(0.0, 0.0, 1.0));" + // center, normal
- " agi_raySegment i = agi_rayHalfspaceIntersectionInterval(ray, halfspace);" +
- " gl_FragColor = vec4(agi_equalsEpsilon(i.start, 1.0) && agi_equalsEpsilon(i.stop, agi_infinity)); " +
- "}";
+ 'void main() {' +
+ ' agi_ray ray = agi_ray(vec3(1.0, 1.0, 1.0), vec3(0.0, 0.0, -1.0));' + // origin, direction
+ ' agi_halfspace halfspace = agi_halfspace(vec3(0.0), vec3(0.0, 0.0, 1.0));' + // center, normal
+ ' agi_raySegment i = agi_rayHalfspaceIntersectionInterval(ray, halfspace);' +
+ ' gl_FragColor = vec4(agi_equalsEpsilon(i.start, 1.0) && agi_equalsEpsilon(i.stop, agi_infinity)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_rayHalfspaceIntersectionInterval: ray origin on surface and directed away", function() {
+ it('agi_rayHalfspaceIntersectionInterval: ray origin on surface and directed away', function() {
var fs =
- "void main() {" +
- " agi_ray ray = agi_ray(vec3(0.0), vec3(0.0, 0.0, 1.0));" + // origin, direction
- " agi_halfspace halfspace = agi_halfspace(vec3(0.0), vec3(0.0, 0.0, 1.0));" + // center, normal
- " agi_raySegment i = agi_rayHalfspaceIntersectionInterval(ray, halfspace);" +
- " gl_FragColor = vec4(agi_isEmpty(i)); " +
- "}";
+ 'void main() {' +
+ ' agi_ray ray = agi_ray(vec3(0.0), vec3(0.0, 0.0, 1.0));' + // origin, direction
+ ' agi_halfspace halfspace = agi_halfspace(vec3(0.0), vec3(0.0, 0.0, 1.0));' + // center, normal
+ ' agi_raySegment i = agi_rayHalfspaceIntersectionInterval(ray, halfspace);' +
+ ' gl_FragColor = vec4(agi_isEmpty(i)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_rayHalfspaceIntersectionInterval: ray origin on surface and directed parallel", function() {
+ it('agi_rayHalfspaceIntersectionInterval: ray origin on surface and directed parallel', function() {
var fs =
- "void main() {" +
- " agi_ray ray = agi_ray(vec3(0.0), vec3(1.0, 0.0, 0.0));" + // origin, direction
- " agi_halfspace halfspace = agi_halfspace(vec3(0.0), vec3(0.0, 0.0, 1.0));" + // center, normal
- " agi_raySegment i = agi_rayHalfspaceIntersectionInterval(ray, halfspace);" +
- " gl_FragColor = vec4(agi_isEmpty(i)); " +
- "}";
+ 'void main() {' +
+ ' agi_ray ray = agi_ray(vec3(0.0), vec3(1.0, 0.0, 0.0));' + // origin, direction
+ ' agi_halfspace halfspace = agi_halfspace(vec3(0.0), vec3(0.0, 0.0, 1.0));' + // center, normal
+ ' agi_raySegment i = agi_rayHalfspaceIntersectionInterval(ray, halfspace);' +
+ ' gl_FragColor = vec4(agi_isEmpty(i)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_rayHalfspaceIntersectionInterval: ray origin on surface and directed inward", function() {
+ it('agi_rayHalfspaceIntersectionInterval: ray origin on surface and directed inward', function() {
var fs =
- "void main() {" +
- " agi_ray ray = agi_ray(vec3(1.0, 1.0, 0.0), vec3(0.0, 0.0, -1.0));" + // origin, direction
- " agi_halfspace halfspace = agi_halfspace(vec3(0.0), vec3(0.0, 0.0, 1.0));" + // center, normal
- " agi_raySegment i = agi_rayHalfspaceIntersectionInterval(ray, halfspace);" +
- " gl_FragColor = vec4(agi_equalsEpsilon(i.start, 0.0) && agi_equalsEpsilon(i.stop, agi_infinity)); " +
- "}";
+ 'void main() {' +
+ ' agi_ray ray = agi_ray(vec3(1.0, 1.0, 0.0), vec3(0.0, 0.0, -1.0));' + // origin, direction
+ ' agi_halfspace halfspace = agi_halfspace(vec3(0.0), vec3(0.0, 0.0, 1.0));' + // center, normal
+ ' agi_raySegment i = agi_rayHalfspaceIntersectionInterval(ray, halfspace);' +
+ ' gl_FragColor = vec4(agi_equalsEpsilon(i.start, 0.0) && agi_equalsEpsilon(i.stop, agi_infinity)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_rayHalfspaceIntersectionInterval: ray origin inside and directed outward", function() {
+ it('agi_rayHalfspaceIntersectionInterval: ray origin inside and directed outward', function() {
var fs =
- "void main() {" +
- " agi_ray ray = agi_ray(vec3(1.0, 1.0, -1.0), vec3(0.0, 0.0, 1.0));" + // origin, direction
- " agi_halfspace halfspace = agi_halfspace(vec3(0.0), vec3(0.0, 0.0, 1.0));" + // center, normal
- " agi_raySegment i = agi_rayHalfspaceIntersectionInterval(ray, halfspace);" +
- " gl_FragColor = vec4(agi_equalsEpsilon(i.start, 0.0) && agi_equalsEpsilon(i.stop, 1.0)); " +
- "}";
+ 'void main() {' +
+ ' agi_ray ray = agi_ray(vec3(1.0, 1.0, -1.0), vec3(0.0, 0.0, 1.0));' + // origin, direction
+ ' agi_halfspace halfspace = agi_halfspace(vec3(0.0), vec3(0.0, 0.0, 1.0));' + // center, normal
+ ' agi_raySegment i = agi_rayHalfspaceIntersectionInterval(ray, halfspace);' +
+ ' gl_FragColor = vec4(agi_equalsEpsilon(i.start, 0.0) && agi_equalsEpsilon(i.stop, 1.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_rayHalfspaceIntersectionInterval: ray origin inside and directed parallel", function() {
+ it('agi_rayHalfspaceIntersectionInterval: ray origin inside and directed parallel', function() {
var fs =
- "void main() {" +
- " agi_ray ray = agi_ray(vec3(1.0, 1.0, -1.0), vec3(1.0, 0.0, 0.0));" + // origin, direction
- " agi_halfspace halfspace = agi_halfspace(vec3(0.0), vec3(0.0, 0.0, 1.0));" + // center, normal
- " agi_raySegment i = agi_rayHalfspaceIntersectionInterval(ray, halfspace);" +
- " gl_FragColor = vec4(agi_equalsEpsilon(i.start, 0.0) && agi_equalsEpsilon(i.stop, agi_infinity)); " +
- "}";
+ 'void main() {' +
+ ' agi_ray ray = agi_ray(vec3(1.0, 1.0, -1.0), vec3(1.0, 0.0, 0.0));' + // origin, direction
+ ' agi_halfspace halfspace = agi_halfspace(vec3(0.0), vec3(0.0, 0.0, 1.0));' + // center, normal
+ ' agi_raySegment i = agi_rayHalfspaceIntersectionInterval(ray, halfspace);' +
+ ' gl_FragColor = vec4(agi_equalsEpsilon(i.start, 0.0) && agi_equalsEpsilon(i.stop, agi_infinity)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_rayHalfspaceIntersectionInterval: ray origin inside and directed inward", function() {
+ it('agi_rayHalfspaceIntersectionInterval: ray origin inside and directed inward', function() {
var fs =
- "void main() {" +
- " agi_ray ray = agi_ray(vec3(1.0, 1.0, -1.0), vec3(0.0, 0.0, -1.0));" + // origin, direction
- " agi_halfspace halfspace = agi_halfspace(vec3(0.0), vec3(0.0, 0.0, 1.0));" + // center, normal
- " agi_raySegment i = agi_rayHalfspaceIntersectionInterval(ray, halfspace);" +
- " gl_FragColor = vec4(agi_equalsEpsilon(i.start, 0.0) && agi_equalsEpsilon(i.stop, agi_infinity)); " +
- "}";
+ 'void main() {' +
+ ' agi_ray ray = agi_ray(vec3(1.0, 1.0, -1.0), vec3(0.0, 0.0, -1.0));' + // origin, direction
+ ' agi_halfspace halfspace = agi_halfspace(vec3(0.0), vec3(0.0, 0.0, 1.0));' + // center, normal
+ ' agi_raySegment i = agi_rayHalfspaceIntersectionInterval(ray, halfspace);' +
+ ' gl_FragColor = vec4(agi_equalsEpsilon(i.start, 0.0) && agi_equalsEpsilon(i.stop, agi_infinity)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
});
\ No newline at end of file
diff --git a/Specs/Renderer/ContextSpec.js b/Specs/Renderer/ContextSpec.js
index fdf805d9ad1..1d94b4d741d 100644
--- a/Specs/Renderer/ContextSpec.js
+++ b/Specs/Renderer/ContextSpec.js
@@ -22,11 +22,11 @@ defineSuite([
context = !context.isDestroyed() && destroyContext(context);
});
- it("getCanvas", function() {
+ it('getCanvas', function() {
expect(context.getCanvas()).not.toBeNull();
});
- it("gets and sets its viewport", function() {
+ it('gets and sets its viewport', function() {
var canvas = context.getCanvas();
var viewport = context.getViewport();
expect(viewport.x).toEqual(0);
@@ -48,123 +48,123 @@ defineSuite([
expect(v.height).toEqual(4);
});
- it("getVersion", function() {
- expect(context.getVersion()).toMatch("WebGL");
+ it('getVersion', function() {
+ expect(context.getVersion()).toMatch('WebGL');
});
- it("getShadingLanguageVersion", function() {
- expect(context.getShadingLanguageVersion()).toMatch("WebGL GLSL ES");
+ it('getShadingLanguageVersion', function() {
+ expect(context.getShadingLanguageVersion()).toMatch('WebGL GLSL ES');
});
- it("getVendor", function() {
+ it('getVendor', function() {
expect(context.getVendor()).not.toBeNull();
});
- it("getRenderer", function() {
+ it('getRenderer', function() {
expect(context.getRenderer()).not.toBeNull();
});
- it("getRedBits", function() {
+ it('getRedBits', function() {
expect(context.getRedBits()).toEqual(8);
});
- it("getGreenBits", function() {
+ it('getGreenBits', function() {
expect(context.getGreenBits()).toEqual(8);
});
- it("getBlueBits", function() {
+ it('getBlueBits', function() {
expect(context.getBlueBits()).toEqual(8);
});
- it("getAlphaBits", function() {
+ it('getAlphaBits', function() {
expect(context.getAlphaBits()).toEqual(8);
});
- it("getDepthBits", function() {
+ it('getDepthBits', function() {
expect(context.getDepthBits()).toBeGreaterThanOrEqualTo(16);
});
- it("getStencilBits", function() {
+ it('getStencilBits', function() {
expect(context.getStencilBits()).toBeGreaterThanOrEqualTo(0);
});
- it("getMaximumCombinedTextureImageUnits", function() {
+ it('getMaximumCombinedTextureImageUnits', function() {
expect(context.getMaximumCombinedTextureImageUnits()).toBeGreaterThanOrEqualTo(8);
});
- it("getMaximumCubeMapSize", function() {
+ it('getMaximumCubeMapSize', function() {
expect(context.getMaximumCubeMapSize()).toBeGreaterThanOrEqualTo(16);
});
- it("getMaximumFragmentUniformVectors", function() {
+ it('getMaximumFragmentUniformVectors', function() {
expect(context.getMaximumFragmentUniformVectors()).toBeGreaterThanOrEqualTo(16);
});
- it("getMaximumTextureImageUnits", function() {
+ it('getMaximumTextureImageUnits', function() {
expect(context.getMaximumTextureImageUnits()).toBeGreaterThanOrEqualTo(8);
});
- it("getMaximumRenderbufferSize", function() {
+ it('getMaximumRenderbufferSize', function() {
expect(context.getMaximumRenderbufferSize()).toBeGreaterThanOrEqualTo(1);
});
- it("getMaximumTextureSize", function() {
+ it('getMaximumTextureSize', function() {
expect(context.getMaximumTextureSize()).toBeGreaterThanOrEqualTo(64);
});
- it("getMaximumVaryingVectors", function() {
+ it('getMaximumVaryingVectors', function() {
expect(context.getMaximumVaryingVectors()).toBeGreaterThanOrEqualTo(8);
});
- it("getMaximumVertexAttributes", function() {
+ it('getMaximumVertexAttributes', function() {
expect(context.getMaximumVertexAttributes()).toBeGreaterThanOrEqualTo(8);
});
- it("getMaximumVertexTextureImageUnits", function() {
+ it('getMaximumVertexTextureImageUnits', function() {
expect(context.getMaximumVertexTextureImageUnits()).toBeGreaterThanOrEqualTo(0);
});
- it("getMaximumVertexUniformVectors", function() {
+ it('getMaximumVertexUniformVectors', function() {
expect(context.getMaximumVertexUniformVectors()).toBeGreaterThanOrEqualTo(1);
});
- it("getMinimumAliasedLineWidth", function() {
+ it('getMinimumAliasedLineWidth', function() {
expect(context.getMinimumAliasedLineWidth()).toBeLessThanOrEqualTo(1);
});
- it("getMaximumAliasedLineWidth", function() {
+ it('getMaximumAliasedLineWidth', function() {
expect(context.getMaximumAliasedLineWidth()).toBeGreaterThanOrEqualTo(1);
});
- it("getMinimumAliasedPointSize", function() {
+ it('getMinimumAliasedPointSize', function() {
expect(context.getMinimumAliasedPointSize()).toBeLessThanOrEqualTo(1);
});
- it("getMaximumAliasedPointSize", function() {
+ it('getMaximumAliasedPointSize', function() {
expect(context.getMaximumAliasedPointSize()).toBeGreaterThanOrEqualTo(1);
});
- it("getMaximumViewportWidth", function() {
+ it('getMaximumViewportWidth', function() {
expect(context.getMaximumViewportWidth()).toBeGreaterThan(0);
});
- it("getMaximumViewportHeight", function() {
+ it('getMaximumViewportHeight', function() {
expect(context.getMaximumViewportHeight()).toBeGreaterThan(0);
});
- it("gets the standard derivatives extension", function() {
+ it('gets the standard derivatives extension', function() {
var fs =
- "#ifdef GL_OES_standard_derivatives\n" +
- " #extension GL_OES_standard_derivatives : enable\n" +
- "#endif\n" +
- "void main()\n" +
- "{\n" +
- "#ifdef GL_OES_standard_derivatives\n" +
- " gl_FragColor = vec4(dFdx(1.0), dFdy(1.0), 1.0, 1.0);\n" +
- "#else\n" +
- " gl_FragColor = vec4(1.0);\n" +
- "#endif\n" +
- "}";
+ '#ifdef GL_OES_standard_derivatives\n' +
+ ' #extension GL_OES_standard_derivatives : enable\n' +
+ '#endif\n' +
+ 'void main()\n' +
+ '{\n' +
+ '#ifdef GL_OES_standard_derivatives\n' +
+ ' gl_FragColor = vec4(dFdx(1.0), dFdy(1.0), 1.0, 1.0);\n' +
+ '#else\n' +
+ ' gl_FragColor = vec4(1.0);\n' +
+ '#endif\n' +
+ '}';
var pixel = renderFragment(context, fs);
@@ -175,11 +175,11 @@ defineSuite([
}
});
- it("gets texture filter anisotropic", function() {
+ it('gets texture filter anisotropic', function() {
expect(context.getTextureFilterAnisotropic()).toBeDefined();
});
- it("gets maximum texture filter anisotropy", function() {
+ it('gets maximum texture filter anisotropy', function() {
if(context.getTextureFilterAnisotropic()) {
expect(context.getMaximumTextureFilterAnisotropy() >= 2.0).toEqual(true);
} else {
@@ -187,7 +187,7 @@ defineSuite([
}
});
- it("sets shader program validation", function() {
+ it('sets shader program validation', function() {
context.setValidateShaderProgram(false);
expect(context.getValidateShaderProgram()).toEqual(false);
@@ -195,7 +195,7 @@ defineSuite([
expect(context.getValidateShaderProgram()).toEqual(true);
});
- it("sets framebuffer validation", function() {
+ it('sets framebuffer validation', function() {
context.setValidateFramebuffer(false);
expect(context.getValidateFramebuffer()).toEqual(false);
@@ -203,7 +203,7 @@ defineSuite([
expect(context.getValidateFramebuffer()).toEqual(true);
});
- it("sets logging shader compilation", function() {
+ it('sets logging shader compilation', function() {
context.setLogShaderCompilation(false);
expect(context.getLogShaderCompilation()).toEqual(false);
@@ -211,7 +211,7 @@ defineSuite([
expect(context.getLogShaderCompilation()).toEqual(true);
});
- it("sets throws on WebGL errors", function() {
+ it('sets throws on WebGL errors', function() {
context.setThrowOnWebGLError(false);
expect(context.getThrowOnWebGLError()).toEqual(false);
@@ -219,7 +219,7 @@ defineSuite([
expect(context.getThrowOnWebGLError()).toEqual(true);
});
- it("fails to set the viewport (undefined viewport properties)", function() {
+ it('fails to set the viewport (undefined viewport properties)', function() {
expect(function() {
context.setViewport({
x : 0,
@@ -228,7 +228,7 @@ defineSuite([
}).toThrow();
});
- it("fails to set the viewport (negative width)", function() {
+ it('fails to set the viewport (negative width)', function() {
expect(function() {
context.setViewport({
x : 0,
@@ -239,7 +239,7 @@ defineSuite([
}).toThrow();
});
- it("fails to set the viewport (negative height)", function() {
+ it('fails to set the viewport (negative height)', function() {
expect(function() {
context.setViewport({
x : 0,
@@ -250,7 +250,7 @@ defineSuite([
}).toThrow();
});
- it("fails to set the viewport (large width)", function() {
+ it('fails to set the viewport (large width)', function() {
expect(function() {
context.setViewport({
x : 0,
@@ -261,7 +261,7 @@ defineSuite([
}).toThrow();
});
- it("fails to set the viewport (large height)", function() {
+ it('fails to set the viewport (large height)', function() {
expect(function() {
context.setViewport({
x : 0,
@@ -272,19 +272,19 @@ defineSuite([
}).toThrow();
});
- it("fails to construct (null canvas)", function() {
+ it('fails to construct (null canvas)', function() {
expect(function() {
return new Context();
}).toThrow();
});
- it("continueDraw throws without arguments", function() {
+ it('continueDraw throws without arguments', function() {
expect(function() {
context.continueDraw();
}).toThrow();
});
- it("isDestroyed", function() {
+ it('isDestroyed', function() {
expect(context.isDestroyed()).toEqual(false);
context.destroy();
expect(context.isDestroyed()).toEqual(true);
diff --git a/Specs/Renderer/CubeMapSpec.js b/Specs/Renderer/CubeMapSpec.js
index 43b960bb9dc..5754f7460d0 100644
--- a/Specs/Renderer/CubeMapSpec.js
+++ b/Specs/Renderer/CubeMapSpec.js
@@ -10,7 +10,7 @@ defineSuite([
'Renderer/TextureWrap',
'Renderer/TextureMinificationFilter',
'Renderer/TextureMagnificationFilter'
- ], "Renderer/CubeMap", function(
+ ], 'Renderer/CubeMap', function(
createContext,
destroyContext,
Cartesian3,
@@ -54,25 +54,25 @@ defineSuite([
destroyContext(context);
});
- it("initializem suite", function() {
+ it('initializem suite', function() {
greenImage = new Image();
- greenImage.src = "./Data/Images/Green.png";
+ greenImage.src = './Data/Images/Green.png';
blueImage = new Image();
- blueImage.src = "./Data/Images/Blue.png";
+ blueImage.src = './Data/Images/Blue.png';
blueAlphaImage = new Image();
- blueAlphaImage.src = "./Data/Images/BlueAlpha.png";
+ blueAlphaImage.src = './Data/Images/BlueAlpha.png';
blueOverRedImage = new Image();
- blueOverRedImage.src = "./Data/Images/BlueOverRed.png";
+ blueOverRedImage.src = './Data/Images/BlueOverRed.png';
waitsFor(function() {
return greenImage.complete && blueImage.complete && blueAlphaImage.complete && blueOverRedImage.complete;
- }, "Load .png file(s) for texture test.", 3000);
+ }, 'Load .png file(s) for texture test.', 3000);
});
- it("creates with defaults", function() {
+ it('creates with defaults', function() {
cubeMap = context.createCubeMap({
width : 16,
height : 16
@@ -85,7 +85,7 @@ defineSuite([
// TODO: creates from the framebuffer
// TODO: copies from the framebuffer
- it("gets the default sampler", function() {
+ it('gets the default sampler', function() {
cubeMap = context.createCubeMap({
width : 16,
height : 16
@@ -98,7 +98,7 @@ defineSuite([
expect(sampler.magnificationFilter).toEqual(TextureMagnificationFilter.LINEAR);
});
- it("sets a sampler", function() {
+ it('sets a sampler', function() {
cubeMap = context.createCubeMap({
width : 16,
height : 16
@@ -119,7 +119,7 @@ defineSuite([
expect(s.magnificationFilter).toEqual(sampler.magnificationFilter);
});
- it("gets width and height", function() {
+ it('gets width and height', function() {
cubeMap = context.createCubeMap({
width : 16,
height : 16
@@ -129,7 +129,7 @@ defineSuite([
expect(cubeMap.getHeight()).toEqual(16);
});
- it("draws with a cube map", function() {
+ it('draws with a cube map', function() {
cubeMap = context.createCubeMap({
source : {
positiveX : blueImage,
@@ -141,11 +141,11 @@ defineSuite([
}
});
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
var fs =
- "uniform samplerCube u_texture;" +
- "uniform mediump vec3 u_direction;" +
- "void main() { gl_FragColor = textureCube(u_texture, u_direction); }";
+ 'uniform samplerCube u_texture;' +
+ 'uniform mediump vec3 u_direction;' +
+ 'void main() { gl_FragColor = textureCube(u_texture, u_direction); }';
sp = context.createShaderProgram(vs, fs, {
position : 0
});
@@ -194,7 +194,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 255, 0, 255]);
});
- it("draws with a cube map with premultiplied alpha", function() {
+ it('draws with a cube map with premultiplied alpha', function() {
cubeMap = context.createCubeMap({
source : {
positiveX : blueAlphaImage,
@@ -208,11 +208,11 @@ defineSuite([
});
expect(cubeMap.getPreMultiplyAlpha()).toEqual(true);
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
var fs =
- "uniform samplerCube u_texture;" +
- "uniform mediump vec3 u_direction;" +
- "void main() { gl_FragColor = textureCube(u_texture, u_direction); }";
+ 'uniform samplerCube u_texture;' +
+ 'uniform mediump vec3 u_direction;' +
+ 'void main() { gl_FragColor = textureCube(u_texture, u_direction); }';
sp = context.createShaderProgram(vs, fs, {
position : 0
});
@@ -261,7 +261,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 127, 127]);
});
- it("creates a cube map with typed arrays", function() {
+ it('creates a cube map with typed arrays', function() {
cubeMap = context.createCubeMap({
source : {
positiveX : {
@@ -297,11 +297,11 @@ defineSuite([
}
});
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
var fs =
- "uniform samplerCube u_texture;" +
- "uniform mediump vec3 u_direction;" +
- "void main() { gl_FragColor = textureCube(u_texture, u_direction); }";
+ 'uniform samplerCube u_texture;' +
+ 'uniform mediump vec3 u_direction;' +
+ 'void main() { gl_FragColor = textureCube(u_texture, u_direction); }';
sp = context.createShaderProgram(vs, fs, {
position : 0
});
@@ -344,7 +344,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 255, 0, 0]);
});
- it("creates a cube map with typed arrays and images", function() {
+ it('creates a cube map with typed arrays and images', function() {
cubeMap = context.createCubeMap({
source : {
positiveX : blueImage,
@@ -372,11 +372,11 @@ defineSuite([
}
});
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
var fs =
- "uniform samplerCube u_texture;" +
- "uniform mediump vec3 u_direction;" +
- "void main() { gl_FragColor = textureCube(u_texture, u_direction); }";
+ 'uniform samplerCube u_texture;' +
+ 'uniform mediump vec3 u_direction;' +
+ 'void main() { gl_FragColor = textureCube(u_texture, u_direction); }';
sp = context.createShaderProgram(vs, fs, {
position : 0
});
@@ -419,7 +419,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 255, 0, 0]);
});
- it("copies to a cube map", function() {
+ it('copies to a cube map', function() {
cubeMap = context.createCubeMap({
width : 1,
height : 1
@@ -431,11 +431,11 @@ defineSuite([
cubeMap.getPositiveZ().copyFrom(blueImage);
cubeMap.getNegativeZ().copyFrom(greenImage);
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
var fs =
- "uniform samplerCube u_cubeMap;" +
- "uniform mediump vec3 u_direction;" +
- "void main() { gl_FragColor = textureCube(u_cubeMap, u_direction); }";
+ 'uniform samplerCube u_cubeMap;' +
+ 'uniform mediump vec3 u_direction;' +
+ 'void main() { gl_FragColor = textureCube(u_cubeMap, u_direction); }';
sp = context.createShaderProgram(vs, fs, {
position : 0
});
@@ -484,7 +484,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 255, 0, 255]);
});
- it("copies from a typed array", function() {
+ it('copies from a typed array', function() {
cubeMap = context.createCubeMap({
width : 1,
height : 1
@@ -520,11 +520,11 @@ defineSuite([
arrayBufferView : new Uint8Array([255, 255, 0, 0])
});
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
var fs =
- "uniform samplerCube u_cubeMap;" +
- "uniform mediump vec3 u_direction;" +
- "void main() { gl_FragColor = textureCube(u_cubeMap, u_direction); }";
+ 'uniform samplerCube u_cubeMap;' +
+ 'uniform mediump vec3 u_direction;' +
+ 'void main() { gl_FragColor = textureCube(u_cubeMap, u_direction); }';
sp = context.createShaderProgram(vs, fs, {
position : 0
});
@@ -567,7 +567,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 255, 0, 0]);
});
- it("draws with a cube map and a texture", function() {
+ it('draws with a cube map and a texture', function() {
cubeMap = context.createCubeMap({
source : {
positiveX : greenImage,
@@ -583,11 +583,11 @@ defineSuite([
source : blueImage
});
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
var fs =
- "uniform samplerCube u_cubeMap;" +
- "uniform sampler2D u_texture;" +
- "void main() { gl_FragColor = textureCube(u_cubeMap, vec3(1.0, 0.0, 0.0)) + texture2D(u_texture, vec2(0.0)); }";
+ 'uniform samplerCube u_cubeMap;' +
+ 'uniform sampler2D u_texture;' +
+ 'void main() { gl_FragColor = textureCube(u_cubeMap, vec3(1.0, 0.0, 0.0)) + texture2D(u_texture, vec2(0.0)); }';
sp = context.createShaderProgram(vs, fs, {
position : 0
});
@@ -611,7 +611,7 @@ defineSuite([
});
// Fails on firefox. Should be fixed soon: https://bugzilla.mozilla.org/show_bug.cgi?id=685156
- xit("generates mipmaps", function() {
+ xit('generates mipmaps', function() {
cubeMap = context.createCubeMap({
source : {
positiveX : blueImage,
@@ -628,10 +628,10 @@ defineSuite([
minificationFilter : TextureMinificationFilter.NEAREST_MIPMAP_LINEAR
}));
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
var fs =
- "uniform samplerCube u_cubeMap;" +
- "void main() { gl_FragColor = textureCube(u_cubeMap, vec3(1.0, 0.0, 0.0)); }";
+ 'uniform samplerCube u_cubeMap;' +
+ 'void main() { gl_FragColor = textureCube(u_cubeMap, vec3(1.0, 0.0, 0.0)); }';
sp = context.createShaderProgram(vs, fs, {
position : 0
});
@@ -651,7 +651,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 255, 255]);
});
- it("destroys", function() {
+ it('destroys', function() {
var c = context.createCubeMap({
width : 16,
height : 16
@@ -662,19 +662,19 @@ defineSuite([
expect(c.isDestroyed()).toEqual(true);
});
- it("fails to create (description)", function() {
+ it('fails to create (description)', function() {
expect(function() {
cubeMap = context.createCubeMap();
}).toThrow();
});
- it("fails to create (source)", function() {
+ it('fails to create (source)', function() {
expect(function() {
cubeMap = context.createCubeMap({});
}).toThrow();
});
- it("fails to create (width, no height)", function() {
+ it('fails to create (width, no height)', function() {
expect(function() {
cubeMap = context.createCubeMap({
width : 16
@@ -682,7 +682,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (width != height)", function() {
+ it('fails to create (width != height)', function() {
expect(function() {
cubeMap = context.createCubeMap({
width : 16,
@@ -691,7 +691,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (small width)", function() {
+ it('fails to create (small width)', function() {
expect(function() {
cubeMap = context.createCubeMap({
width : 0,
@@ -700,7 +700,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (large width)", function() {
+ it('fails to create (large width)', function() {
expect(function() {
cubeMap = context.createCubeMap({
width : context.getMaximumCubeMapSize() + 1,
@@ -709,28 +709,28 @@ defineSuite([
}).toThrow();
});
- it("fails to create (PixelFormat)", function() {
+ it('fails to create (PixelFormat)', function() {
expect(function() {
cubeMap = context.createCubeMap({
width : 16,
height : 16,
- pixelFormat : "invalid PixelFormat"
+ pixelFormat : 'invalid PixelFormat'
});
}).toThrow();
});
- it("fails to create (pixelDatatype)", function() {
+ it('fails to create (pixelDatatype)', function() {
expect(function() {
cubeMap = context.createCubeMap({
width : 16,
height : 16,
pixelFormat : PixelFormat.RGBA,
- pixelDatatype : "invalid pixelDatatype"
+ pixelDatatype : 'invalid pixelDatatype'
});
}).toThrow();
});
- it("fails to create (source)", function() {
+ it('fails to create (source)', function() {
expect(function() {
cubeMap = context.createCubeMap({
source : {}
@@ -738,7 +738,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (source width and height)", function() {
+ it('fails to create (source width and height)', function() {
expect(function() {
cubeMap = context.createCubeMap({
source : {
@@ -753,7 +753,7 @@ defineSuite([
}).toThrow();
});
- it("fails to copy from an image (source)", function() {
+ it('fails to copy from an image (source)', function() {
cubeMap = context.createCubeMap({
width : 16,
height : 16
@@ -764,7 +764,7 @@ defineSuite([
}).toThrow();
});
- it("fails to copy from an image (xOffset)", function() {
+ it('fails to copy from an image (xOffset)', function() {
cubeMap = context.createCubeMap({
width : 16,
height : 16
@@ -776,7 +776,7 @@ defineSuite([
}).toThrow();
});
- it("fails to copy from an image (yOffset)", function() {
+ it('fails to copy from an image (yOffset)', function() {
cubeMap = context.createCubeMap({
width : 16,
height : 16
@@ -788,7 +788,7 @@ defineSuite([
}).toThrow();
});
- it("fails to copy from an image (width)", function() {
+ it('fails to copy from an image (width)', function() {
cubeMap = context.createCubeMap({
width : 16,
height : 16
@@ -801,7 +801,7 @@ defineSuite([
}).toThrow();
});
- it("fails to copy from an image (height)", function() {
+ it('fails to copy from an image (height)', function() {
cubeMap = context.createCubeMap({
width : 16,
height : 16
@@ -814,7 +814,7 @@ defineSuite([
}).toThrow();
});
- it("fails to copy from the frame buffer (xOffset)", function() {
+ it('fails to copy from the frame buffer (xOffset)', function() {
cubeMap = context.createCubeMap({
width : 1,
height : 1
@@ -825,7 +825,7 @@ defineSuite([
}).toThrow();
});
- it("fails to copy from the frame buffer (yOffset)", function() {
+ it('fails to copy from the frame buffer (yOffset)', function() {
cubeMap = context.createCubeMap({
width : 1,
height : 1
@@ -836,7 +836,7 @@ defineSuite([
}).toThrow();
});
- it("fails to copy from the frame buffer (framebufferXOffset)", function() {
+ it('fails to copy from the frame buffer (framebufferXOffset)', function() {
cubeMap = context.createCubeMap({
width : 1,
height : 1
@@ -847,7 +847,7 @@ defineSuite([
}).toThrow();
});
- it("fails to copy from the frame buffer (framebufferYOffset)", function() {
+ it('fails to copy from the frame buffer (framebufferYOffset)', function() {
cubeMap = context.createCubeMap({
width : 1,
height : 1
@@ -858,7 +858,7 @@ defineSuite([
}).toThrow();
});
- it("fails to copy from the frame buffer (width)", function() {
+ it('fails to copy from the frame buffer (width)', function() {
cubeMap = context.createCubeMap({
width : 1,
height : 1
@@ -869,7 +869,7 @@ defineSuite([
}).toThrow();
});
- it("fails to copy from the frame buffer (height)", function() {
+ it('fails to copy from the frame buffer (height)', function() {
cubeMap = context.createCubeMap({
width : 1,
height : 1
@@ -880,7 +880,7 @@ defineSuite([
}).toThrow();
});
- it("fails to generate mipmaps (width)", function() {
+ it('fails to generate mipmaps (width)', function() {
cubeMap = context.createCubeMap({
width : 3,
height : 3
@@ -891,18 +891,18 @@ defineSuite([
}).toThrow();
});
- it("fails to generate mipmaps (hint)", function() {
+ it('fails to generate mipmaps (hint)', function() {
cubeMap = context.createCubeMap({
width : 16,
height : 16
});
expect(function() {
- cubeMap.generateMipmap("invalid hint");
+ cubeMap.generateMipmap('invalid hint');
}).toThrow();
});
- it("fails to destroy", function() {
+ it('fails to destroy', function() {
var c = context.createCubeMap({
width : 16,
height : 16
diff --git a/Specs/Renderer/DrawSpec.js b/Specs/Renderer/DrawSpec.js
index 3fa9a895a70..2134ce9f899 100644
--- a/Specs/Renderer/DrawSpec.js
+++ b/Specs/Renderer/DrawSpec.js
@@ -12,7 +12,7 @@ defineSuite([
'Renderer/DepthFunction',
'Renderer/StencilFunction',
'Renderer/StencilOperation'
- ], "Renderer/Draw", function(
+ ], 'Renderer/Draw', function(
createContext,
destroyContext,
IndexDatatype,
@@ -48,9 +48,9 @@ defineSuite([
destroyContext(context);
});
- it("draws a white point", function() {
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('draws a white point', function() {
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -71,9 +71,9 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 255, 255, 255]);
});
- it("draws a white point with an index buffer", function() {
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('draws a white point with an index buffer', function() {
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -98,17 +98,17 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 255, 255, 255]);
});
- it("draws a red point with two vertex buffers", function() {
+ it('draws a red point with two vertex buffers', function() {
var vs =
- "attribute vec4 position;" +
- "attribute mediump float intensity;" +
- "varying mediump float fs_intensity;" +
- "void main() {" +
- " gl_PointSize = 1.0; " +
- " gl_Position = position;" +
- " fs_intensity = intensity;" +
- "}";
- var fs = "varying mediump float fs_intensity; void main() { gl_FragColor = vec4(fs_intensity, 0.0, 0.0, 1.0); }";
+ 'attribute vec4 position;' +
+ 'attribute mediump float intensity;' +
+ 'varying mediump float fs_intensity;' +
+ 'void main() {' +
+ ' gl_PointSize = 1.0; ' +
+ ' gl_Position = position;' +
+ ' fs_intensity = intensity;' +
+ '}';
+ var fs = 'varying mediump float fs_intensity; void main() { gl_FragColor = vec4(fs_intensity, 0.0, 0.0, 1.0); }';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -134,17 +134,17 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 0, 0, 255]);
});
- it("draws a red point with one interleaved vertex buffers", function() {
+ it('draws a red point with one interleaved vertex buffers', function() {
var vs =
- "attribute vec4 position;" +
- "attribute mediump float intensity;" +
- "varying mediump float fs_intensity;" +
- "void main() {" +
- " gl_PointSize = 1.0; " +
- " gl_Position = position;" +
- " fs_intensity = intensity;" +
- "}";
- var fs = "varying mediump float fs_intensity; void main() { gl_FragColor = vec4(fs_intensity, 0.0, 0.0, 1.0); }";
+ 'attribute vec4 position;' +
+ 'attribute mediump float intensity;' +
+ 'varying mediump float fs_intensity;' +
+ 'void main() {' +
+ ' gl_PointSize = 1.0; ' +
+ ' gl_Position = position;' +
+ ' fs_intensity = intensity;' +
+ '}';
+ var fs = 'varying mediump float fs_intensity; void main() { gl_FragColor = vec4(fs_intensity, 0.0, 0.0, 1.0); }';
sp = context.createShaderProgram(vs, fs);
var stride = 5 * Float32Array.BYTES_PER_ELEMENT;
@@ -177,9 +177,9 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 0, 0, 255]);
});
- it("draws with stencil test", function() {
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('draws with stencil test', function() {
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -232,9 +232,9 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 255, 255, 255]);
});
- it("draws with color mask", function() {
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('draws with color mask', function() {
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -281,9 +281,9 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 0, 255, 0]);
});
- it("draws with additive blending", function() {
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(0.5); }";
+ it('draws with additive blending', function() {
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(0.5); }';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -323,9 +323,9 @@ defineSuite([
expect(context.readPixels()).toEqualArrayEpsilon([254, 254, 254, 254], 1);
});
- it("draws with alpha blending", function() {
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0, 1.0, 1.0, 0.5); }";
+ it('draws with alpha blending', function() {
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0, 1.0, 1.0, 0.5); }';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -347,7 +347,7 @@ defineSuite([
blending : {
enabled : true,
equationRgb : BlendEquation.ADD,
- equationAlpha : BlendEquation.SUBTRACT, // Doesn't actually matter
+ equationAlpha : BlendEquation.SUBTRACT, // does not actually matter
functionSourceRgb : BlendFunction.SOURCE_ALPHA,
functionSourceAlpha : BlendFunction.ONE, // Don't blend alpha
functionDestinationRgb : BlendFunction.ONE_MINUS_SOURCE_ALPHA,
@@ -365,9 +365,9 @@ defineSuite([
expect(context.readPixels()).toEqualArrayEpsilon([191, 191, 191, 127], 2);
});
- it("draws with blend color", function() {
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); }";
+ it('draws with blend color', function() {
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); }';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -409,9 +409,9 @@ defineSuite([
expect(context.readPixels()).toEqualArrayEpsilon([128, 128, 128, 255], 1);
});
- it("draws with culling", function() {
- var vs = "attribute vec4 position; void main() { gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('draws with culling', function() {
+ var vs = 'attribute vec4 position; void main() { gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -454,9 +454,9 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 255, 255, 255]);
});
- it("draws with front face winding order", function() {
- var vs = "attribute vec4 position; void main() { gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('draws with front face winding order', function() {
+ var vs = 'attribute vec4 position; void main() { gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -501,9 +501,9 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 255, 255, 255]);
});
- it("draws with the depth test", function() {
- var vs = "attribute vec4 position; void main() { gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('draws with the depth test', function() {
+ var vs = 'attribute vec4 position; void main() { gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -556,9 +556,9 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
});
- it("draws with depth range", function() {
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(gl_DepthRange.near, gl_DepthRange.far, 0.0, 1.0); }";
+ it('draws with depth range', function() {
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(gl_DepthRange.near, gl_DepthRange.far, 0.0, 1.0); }';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -585,9 +585,9 @@ defineSuite([
expect(context.readPixels()).toEqualArray([64, 191, 0, 255]);
});
- it("draws with line width", function() {
- var vs = "attribute vec4 position; void main() { gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('draws with line width', function() {
+ var vs = 'attribute vec4 position; void main() { gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -616,9 +616,9 @@ defineSuite([
expect(context.readPixels()).not.toEqualArray([0, 0, 0, 0]);
});
- it("draws with polygon offset", function() {
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('draws with polygon offset', function() {
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -646,9 +646,9 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 255, 255, 255]);
});
- it("draws with sample coverage", function() {
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('draws with sample coverage', function() {
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -688,9 +688,9 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 255, 255, 255]);
});
- it("draws with stencil test (front)", function() {
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('draws with stencil test (front)', function() {
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -754,9 +754,9 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 255, 255, 255]);
});
- it("draws with stencil test (back)", function() {
- var vs = "attribute vec4 position; void main() { gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('draws with stencil test (back)', function() {
+ var vs = 'attribute vec4 position; void main() { gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -822,9 +822,9 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 255, 255, 255]);
});
- it("draws with an offset and count", function() {
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('draws with an offset and count', function() {
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -857,13 +857,13 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 255, 255, 255]);
});
- it("fails to draw (missing drawArguments)", function() {
+ it('fails to draw (missing drawArguments)', function() {
expect(function() {
context.draw();
}).toThrow();
});
- it("fails to draw (missing shaderProgram)", function() {
+ it('fails to draw (missing shaderProgram)', function() {
expect(function() {
context.draw({
primitiveType : PrimitiveType.POINTS
@@ -871,9 +871,9 @@ defineSuite([
}).toThrow();
});
- it("fails to draw (missing primitiveType)", function() {
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('fails to draw (missing primitiveType)', function() {
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
expect(function() {
@@ -883,22 +883,22 @@ defineSuite([
}).toThrow();
});
- it("fails to draw (primitiveType)", function() {
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('fails to draw (primitiveType)', function() {
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
expect(function() {
context.draw({
- primitiveType : "invalid value",
+ primitiveType : 'invalid value',
shaderProgram : sp
});
}).toThrow();
});
- it("fails to draw (missing vertexArray)", function() {
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('fails to draw (missing vertexArray)', function() {
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
expect(function() {
@@ -909,9 +909,9 @@ defineSuite([
}).toThrow();
});
- it("fails to draw (negative offset)", function() {
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('fails to draw (negative offset)', function() {
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
expect(function() {
diff --git a/Specs/Renderer/FramebufferSpec.js b/Specs/Renderer/FramebufferSpec.js
index c351aa2992a..4bc90816749 100644
--- a/Specs/Renderer/FramebufferSpec.js
+++ b/Specs/Renderer/FramebufferSpec.js
@@ -9,7 +9,7 @@ defineSuite([
'Renderer/RenderbufferFormat',
'Renderer/StencilFunction',
'Renderer/StencilOperation'
- ], "Renderer/Framebuffer", function(
+ ], 'Renderer/Framebuffer', function(
createContext,
destroyContext,
Cartesian4,
@@ -47,7 +47,7 @@ defineSuite([
destroyContext(context);
});
- it("has a color attachment", function() {
+ it('has a color attachment', function() {
var colorTexture = context.createTexture2D({
width : 1,
height : 1
@@ -58,7 +58,7 @@ defineSuite([
expect(framebuffer.getColorTexture()).toEqual(colorTexture);
});
- it("has a depth attachment", function() {
+ it('has a depth attachment', function() {
var renderbuffer = context.createRenderbuffer({
format : RenderbufferFormat.DEPTH_COMPONENT16
});
@@ -68,7 +68,7 @@ defineSuite([
expect(framebuffer.getDepthRenderbuffer()).toEqual(renderbuffer);
});
- it("has a stencil attachment", function() {
+ it('has a stencil attachment', function() {
var renderbuffer = context.createRenderbuffer({
format : RenderbufferFormat.Stencil8
});
@@ -78,7 +78,7 @@ defineSuite([
expect(framebuffer.getStencilRenderbuffer()).toEqual(renderbuffer);
});
- it("has a depth-stencil attachment", function() {
+ it('has a depth-stencil attachment', function() {
var renderbuffer = context.createRenderbuffer({
format : RenderbufferFormat.DEPTH_STENCIL
});
@@ -88,7 +88,7 @@ defineSuite([
expect(framebuffer.getDepthStencilRenderbuffer()).toEqual(renderbuffer);
});
- it("clears a color attachment", function() {
+ it('clears a color attachment', function() {
// 1 of 4. Clear default color buffer to black.
context.clear();
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
@@ -116,8 +116,8 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
// 4 of 4. Render green to default color buffer by reading from previous color attachment
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs = "uniform sampler2D u_texture; void main() { gl_FragColor = texture2D(u_texture, vec2(0.0)); }";
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs = 'uniform sampler2D u_texture; void main() { gl_FragColor = texture2D(u_texture, vec2(0.0)); }';
sp = context.createShaderProgram(vs, fs, {
position : 0
});
@@ -138,7 +138,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 255, 0, 255]);
});
- it("clears a cube map face color attachment", function() {
+ it('clears a cube map face color attachment', function() {
var cubeMap = context.createCubeMap({
width : 1,
height : 1
@@ -169,8 +169,8 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
// 4 of 4. Render green to default color buffer by reading from previous color attachment
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs = "uniform samplerCube u_cubeMap; void main() { gl_FragColor = textureCube(u_cubeMap, vec3(1.0, 0.0, 0.0)); }";
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs = 'uniform samplerCube u_cubeMap; void main() { gl_FragColor = textureCube(u_cubeMap, vec3(1.0, 0.0, 0.0)); }';
sp = context.createShaderProgram(vs, fs, {
position : 0
});
@@ -193,7 +193,7 @@ defineSuite([
cubeMap = cubeMap.destroy();
});
- it("draws to a color attachment", function() {
+ it('draws to a color attachment', function() {
var colorTexture = context.createTexture2D({
width : 1,
height : 1
@@ -207,8 +207,8 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
// 2 of 4. Render green point into color attachment.
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0); }";
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0); }';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -229,8 +229,8 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
// 4 of 4. Render green to default color buffer by reading from previous color attachment
- var vs2 = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs2 = "uniform sampler2D u_texture; void main() { gl_FragColor = texture2D(u_texture, vec2(0.0)); }";
+ var vs2 = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs2 = 'uniform sampler2D u_texture; void main() { gl_FragColor = texture2D(u_texture, vec2(0.0)); }';
var sp2 = context.createShaderProgram(vs2, fs2, {
position : 0
});
@@ -246,7 +246,7 @@ defineSuite([
sp2 = sp2.destroy();
});
- it("draws with a depth attachment", function() {
+ it('draws with a depth attachment', function() {
framebuffer = context.createFramebuffer({
colorTexture : context.createTexture2D({
width : 1,
@@ -259,8 +259,8 @@ defineSuite([
})
});
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); }";
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); }';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -311,7 +311,7 @@ defineSuite([
})).toEqualArray([255, 255, 255, 255]);
});
- it("draws with a stencil attachment", function() {
+ it('draws with a stencil attachment', function() {
framebuffer = context.createFramebuffer({
colorTexture : context.createTexture2D({
width : 1,
@@ -324,8 +324,8 @@ defineSuite([
})
});
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs = "uniform vec4 u_color; void main() { gl_FragColor = u_color; }";
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs = 'uniform vec4 u_color; void main() { gl_FragColor = u_color; }';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -396,41 +396,41 @@ defineSuite([
})).toEqualArray([255, 255, 255, 255]);
});
- it("destroys", function() {
+ it('destroys', function() {
var f = context.createFramebuffer();
expect(f.isDestroyed()).toEqual(false);
f.destroy();
expect(f.isDestroyed()).toEqual(true);
});
- it("fails to create (depth and depth-stencil)", function() {
+ it('fails to create (depth and depth-stencil)', function() {
expect(function() {
framebuffer = context.createFramebuffer({
- depthRenderbuffer : "not null",
- depthStencilRenderbuffer : "not null"
+ depthRenderbuffer : 'not null',
+ depthStencilRenderbuffer : 'not null'
});
}).toThrow();
});
- it("fails to create (stencil and depth-stencil)", function() {
+ it('fails to create (stencil and depth-stencil)', function() {
expect(function() {
framebuffer = context.createFramebuffer({
- stencilRenderbuffer : "not null",
- depthStencilRenderbuffer : "not null"
+ stencilRenderbuffer : 'not null',
+ depthStencilRenderbuffer : 'not null'
});
}).toThrow();
});
- it("fails to create (depth and stencil)", function() {
+ it('fails to create (depth and stencil)', function() {
expect(function() {
framebuffer = context.createFramebuffer({
- depthRenderbuffer : "not null",
- stencilRenderbuffer : "not null"
+ depthRenderbuffer : 'not null',
+ stencilRenderbuffer : 'not null'
});
}).toThrow();
});
- it("throws when the depth test is enabled without an appropriate attachment", function() {
+ it('throws when the depth test is enabled without an appropriate attachment', function() {
framebuffer = context.createFramebuffer({
colorTexture : context.createTexture2D({
width : 1,
@@ -438,8 +438,8 @@ defineSuite([
})
});
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); }";
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); }';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -464,7 +464,7 @@ defineSuite([
}).toThrow();
});
- it("fails to destroy", function() {
+ it('fails to destroy', function() {
var f = context.createFramebuffer();
f.destroy();
diff --git a/Specs/Renderer/RaySpec.js b/Specs/Renderer/RaySpec.js
index 1ecd32491cf..1bc8dc84a87 100644
--- a/Specs/Renderer/RaySpec.js
+++ b/Specs/Renderer/RaySpec.js
@@ -4,7 +4,7 @@ defineSuite([
'../Specs/destroyContext',
'../Specs/renderFragment',
'Shaders/Ray'
- ], "Renderer/Ray", function(
+ ], 'Renderer/Ray', function(
createContext,
destroyContext,
renderFragment,
@@ -26,7 +26,7 @@ defineSuite([
return function(context, fs) {
var fsSource =
ShadersRay +
- "#line 0\n" +
+ '#line 0\n' +
fs;
return renderFragment(context, fsSource);
};
@@ -34,371 +34,371 @@ defineSuite([
///////////////////////////////////////////////////////////////////////
- it("agi_pointAlongRay: point at ray origin", function() {
+ it('agi_pointAlongRay: point at ray origin', function() {
var fs =
- "void main() { " +
- " gl_FragColor = vec4(agi_pointAlongRay(agi_ray(vec3(0.0), vec3(1.0, 0.0, 0.0)), 0.0) == vec3(0.0)); " +
- "}";
+ 'void main() { ' +
+ ' gl_FragColor = vec4(agi_pointAlongRay(agi_ray(vec3(0.0), vec3(1.0, 0.0, 0.0)), 0.0) == vec3(0.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_pointAlongRay: point in front of ray origin", function() {
+ it('agi_pointAlongRay: point in front of ray origin', function() {
var fs =
- "void main() { " +
- " gl_FragColor = vec4(agi_pointAlongRay(agi_ray(vec3(0.0), vec3(1.0, 0.0, 0.0)), 2.0) == vec3(2.0, 0.0, 0.0)); " +
- "}";
+ 'void main() { ' +
+ ' gl_FragColor = vec4(agi_pointAlongRay(agi_ray(vec3(0.0), vec3(1.0, 0.0, 0.0)), 2.0) == vec3(2.0, 0.0, 0.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_pointAlongRay: point behind ray origin", function() {
+ it('agi_pointAlongRay: point behind ray origin', function() {
var fs =
- "void main() { " +
- " gl_FragColor = vec4(agi_pointAlongRay(agi_ray(vec3(0.0), vec3(0.0, 1.0, 0.0)), -2.0) == vec3(0.0, -2.0, 0.0)); " +
- "}";
+ 'void main() { ' +
+ ' gl_FragColor = vec4(agi_pointAlongRay(agi_ray(vec3(0.0), vec3(0.0, 1.0, 0.0)), -2.0) == vec3(0.0, -2.0, 0.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
///////////////////////////////////////////////////////////////////////
- it("agi_intersect: no intersection 0", function() {
+ it('agi_intersect: no intersection 0', function() {
var fs =
- "void main() {" +
- " gl_FragColor = vec4(agi_isEmpty(agi_intersection(agi_raySegment(1.0, 2.0), agi_raySegment(3.0, 4.0)))); " +
- "}";
+ 'void main() {' +
+ ' gl_FragColor = vec4(agi_isEmpty(agi_intersection(agi_raySegment(1.0, 2.0), agi_raySegment(3.0, 4.0)))); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_intersect: no intersection 1", function() {
+ it('agi_intersect: no intersection 1', function() {
var fs =
- "void main() {" +
- " gl_FragColor = vec4(agi_isEmpty(agi_intersection(agi_raySegment(3.0, 4.0), agi_raySegment(1.0, 2.0)))); " +
- "}";
+ 'void main() {' +
+ ' gl_FragColor = vec4(agi_isEmpty(agi_intersection(agi_raySegment(3.0, 4.0), agi_raySegment(1.0, 2.0)))); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_intersect: no intersection 2", function() {
+ it('agi_intersect: no intersection 2', function() {
var fs =
- "void main() {" +
- " gl_FragColor = vec4(agi_isEmpty(agi_intersection(agi_raySegment(-2.0, -1.0), agi_raySegment(3.0, 4.0)))); " +
- "}";
+ 'void main() {' +
+ ' gl_FragColor = vec4(agi_isEmpty(agi_intersection(agi_raySegment(-2.0, -1.0), agi_raySegment(3.0, 4.0)))); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_intersect: intersection 0", function() {
+ it('agi_intersect: intersection 0', function() {
var fs =
- "void main() {" +
- " gl_FragColor = vec4(agi_intersection(agi_raySegment(1.0, 2.0), agi_raySegment(1.0, 2.0)) == agi_raySegment(1.0, 2.0)); " +
- "}";
+ 'void main() {' +
+ ' gl_FragColor = vec4(agi_intersection(agi_raySegment(1.0, 2.0), agi_raySegment(1.0, 2.0)) == agi_raySegment(1.0, 2.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_intersect: intersection 1", function() {
+ it('agi_intersect: intersection 1', function() {
var fs =
- "void main() {" +
- " gl_FragColor = vec4(agi_intersection(agi_raySegment(1.0, 3.0), agi_raySegment(2.0, 4.0)) == agi_raySegment(2.0, 3.0)); " +
- "}";
+ 'void main() {' +
+ ' gl_FragColor = vec4(agi_intersection(agi_raySegment(1.0, 3.0), agi_raySegment(2.0, 4.0)) == agi_raySegment(2.0, 3.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_intersect: intersection 2", function() {
+ it('agi_intersect: intersection 2', function() {
var fs =
- "void main() {" +
- " gl_FragColor = vec4(agi_intersection(agi_raySegment(1.0, 2.0), agi_raySegment(2.0, 3.0)) == agi_raySegment(2.0, 2.0)); " +
- "}";
+ 'void main() {' +
+ ' gl_FragColor = vec4(agi_intersection(agi_raySegment(1.0, 2.0), agi_raySegment(2.0, 3.0)) == agi_raySegment(2.0, 2.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_intersect: intersection 3", function() {
+ it('agi_intersect: intersection 3', function() {
var fs =
- "void main() {" +
- " gl_FragColor = vec4(agi_intersection(agi_raySegment(1.0, 4.0), agi_raySegment(2.0, 3.0)) == agi_raySegment(2.0, 3.0)); " +
- "}";
+ 'void main() {' +
+ ' gl_FragColor = vec4(agi_intersection(agi_raySegment(1.0, 4.0), agi_raySegment(2.0, 3.0)) == agi_raySegment(2.0, 3.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_intersect: intersection 4", function() {
+ it('agi_intersect: intersection 4', function() {
var fs =
- "void main() {" +
- " gl_FragColor = vec4(agi_intersection(agi_raySegment(2.0, 3.0), agi_raySegment(1.0, 4.0)) == agi_raySegment(2.0, 3.0)); " +
- "}";
+ 'void main() {' +
+ ' gl_FragColor = vec4(agi_intersection(agi_raySegment(2.0, 3.0), agi_raySegment(1.0, 4.0)) == agi_raySegment(2.0, 3.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_intersect: intersection 5", function() {
+ it('agi_intersect: intersection 5', function() {
var fs =
- "void main() {" +
- " gl_FragColor = vec4(agi_intersection(agi_raySegment(-3.0, 3.0), agi_raySegment(-1.0, 1.0)) == agi_raySegment(-1.0, 1.0)); " +
- "}";
+ 'void main() {' +
+ ' gl_FragColor = vec4(agi_intersection(agi_raySegment(-3.0, 3.0), agi_raySegment(-1.0, 1.0)) == agi_raySegment(-1.0, 1.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
///////////////////////////////////////////////////////////////////////
- it("agi_subtract: inner inside outer", function() {
+ it('agi_subtract: inner inside outer', function() {
var fs =
- "void main() {" +
- " agi_raySegmentCollection i = agi_subtraction(agi_raySegment(1.0, 4.0), agi_raySegment(2.0, 3.0));" +
- " gl_FragColor = vec4((i.intervals[0] == agi_raySegment(1.0, 2.0)) && (i.intervals[1] == agi_raySegment(3.0, 4.0))); " +
- "}";
+ 'void main() {' +
+ ' agi_raySegmentCollection i = agi_subtraction(agi_raySegment(1.0, 4.0), agi_raySegment(2.0, 3.0));' +
+ ' gl_FragColor = vec4((i.intervals[0] == agi_raySegment(1.0, 2.0)) && (i.intervals[1] == agi_raySegment(3.0, 4.0))); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_subtract: inner inside outer on left boundary", function() {
+ it('agi_subtract: inner inside outer on left boundary', function() {
var fs =
- "void main() {" +
- " agi_raySegmentCollection i = agi_subtraction(agi_raySegment(1.0, 4.0), agi_raySegment(1.0, 2.0));" +
- " gl_FragColor = vec4((i.intervals[0] == agi_raySegment(2.0, 4.0)) && (i.count == 1)); " +
- "}";
+ 'void main() {' +
+ ' agi_raySegmentCollection i = agi_subtraction(agi_raySegment(1.0, 4.0), agi_raySegment(1.0, 2.0));' +
+ ' gl_FragColor = vec4((i.intervals[0] == agi_raySegment(2.0, 4.0)) && (i.count == 1)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_subtract: inner inside outer on right boundary", function() {
+ it('agi_subtract: inner inside outer on right boundary', function() {
var fs =
- "void main() {" +
- " agi_raySegmentCollection i = agi_subtraction(agi_raySegment(1.0, 4.0), agi_raySegment(3.0, 4.0));" +
- " gl_FragColor = vec4((i.intervals[0] == agi_raySegment(1.0, 3.0)) && (i.count == 1)); " +
- "}";
+ 'void main() {' +
+ ' agi_raySegmentCollection i = agi_subtraction(agi_raySegment(1.0, 4.0), agi_raySegment(3.0, 4.0));' +
+ ' gl_FragColor = vec4((i.intervals[0] == agi_raySegment(1.0, 3.0)) && (i.count == 1)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_subtract: inner equals outer", function() {
+ it('agi_subtract: inner equals outer', function() {
var fs =
- "void main() {" +
- " agi_raySegmentCollection i = agi_subtraction(agi_raySegment(1.0, 4.0), agi_raySegment(1.0, 4.0));" +
- " gl_FragColor = vec4(i.count == 0); " +
- "}";
+ 'void main() {' +
+ ' agi_raySegmentCollection i = agi_subtraction(agi_raySegment(1.0, 4.0), agi_raySegment(1.0, 4.0));' +
+ ' gl_FragColor = vec4(i.count == 0); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_subtract: inner is greater than outer", function() {
+ it('agi_subtract: inner is greater than outer', function() {
var fs =
- "void main() {" +
- " agi_raySegmentCollection i = agi_subtraction(agi_raySegment(1.0, 4.0), agi_raySegment(0.0, 5.0));" +
- " gl_FragColor = vec4(i.count == 0); " +
- "}";
+ 'void main() {' +
+ ' agi_raySegmentCollection i = agi_subtraction(agi_raySegment(1.0, 4.0), agi_raySegment(0.0, 5.0));' +
+ ' gl_FragColor = vec4(i.count == 0); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_subtract: inner overlaps outer at left boundary", function() {
+ it('agi_subtract: inner overlaps outer at left boundary', function() {
var fs =
- "void main() {" +
- " agi_raySegmentCollection i = agi_subtraction(agi_raySegment(1.0, 4.0), agi_raySegment(0.0, 2.0));" +
- " gl_FragColor = vec4((i.intervals[0] == agi_raySegment(2.0, 4.0)) && (i.count == 1)); " +
- "}";
+ 'void main() {' +
+ ' agi_raySegmentCollection i = agi_subtraction(agi_raySegment(1.0, 4.0), agi_raySegment(0.0, 2.0));' +
+ ' gl_FragColor = vec4((i.intervals[0] == agi_raySegment(2.0, 4.0)) && (i.count == 1)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_subtract: inner overlaps outer at right boundary", function() {
+ it('agi_subtract: inner overlaps outer at right boundary', function() {
var fs =
- "void main() {" +
- " agi_raySegmentCollection i = agi_subtraction(agi_raySegment(1.0, 4.0), agi_raySegment(3.0, 5.0));" +
- " gl_FragColor = vec4((i.intervals[0] == agi_raySegment(1.0, 3.0)) && (i.count == 1)); " +
- "}";
+ 'void main() {' +
+ ' agi_raySegmentCollection i = agi_subtraction(agi_raySegment(1.0, 4.0), agi_raySegment(3.0, 5.0));' +
+ ' gl_FragColor = vec4((i.intervals[0] == agi_raySegment(1.0, 3.0)) && (i.count == 1)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_subtract: inner touches at left boundary", function() {
+ it('agi_subtract: inner touches at left boundary', function() {
var fs =
- "void main() {" +
- " agi_raySegmentCollection i = agi_subtraction(agi_raySegment(1.0, 4.0), agi_raySegment(0.0, 1.0));" +
- " gl_FragColor = vec4((i.intervals[0] == agi_raySegment(1.0, 4.0)) && (i.count == 1)); " +
- "}";
+ 'void main() {' +
+ ' agi_raySegmentCollection i = agi_subtraction(agi_raySegment(1.0, 4.0), agi_raySegment(0.0, 1.0));' +
+ ' gl_FragColor = vec4((i.intervals[0] == agi_raySegment(1.0, 4.0)) && (i.count == 1)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_subtract: inner touches at right boundary", function() {
+ it('agi_subtract: inner touches at right boundary', function() {
var fs =
- "void main() {" +
- " agi_raySegmentCollection i = agi_subtraction(agi_raySegment(1.0, 4.0), agi_raySegment(4.0, 5.0));" +
- " gl_FragColor = vec4((i.intervals[0] == agi_raySegment(1.0, 4.0)) && (i.count == 1)); " +
- "}";
+ 'void main() {' +
+ ' agi_raySegmentCollection i = agi_subtraction(agi_raySegment(1.0, 4.0), agi_raySegment(4.0, 5.0));' +
+ ' gl_FragColor = vec4((i.intervals[0] == agi_raySegment(1.0, 4.0)) && (i.count == 1)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_subtract: inner is to the right of outer", function() {
+ it('agi_subtract: inner is to the right of outer', function() {
var fs =
- "void main() {" +
- " agi_raySegmentCollection i = agi_subtraction(agi_raySegment(1.0, 4.0), agi_raySegment(5.0, 6.0));" +
- " gl_FragColor = vec4((i.intervals[0] == agi_raySegment(1.0, 4.0)) && (i.count == 1)); " +
- "}";
+ 'void main() {' +
+ ' agi_raySegmentCollection i = agi_subtraction(agi_raySegment(1.0, 4.0), agi_raySegment(5.0, 6.0));' +
+ ' gl_FragColor = vec4((i.intervals[0] == agi_raySegment(1.0, 4.0)) && (i.count == 1)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_subtract: inner is to the left of outer", function() {
+ it('agi_subtract: inner is to the left of outer', function() {
var fs =
- "void main() {" +
- " agi_raySegmentCollection i = agi_subtraction(agi_raySegment(1.0, 4.0), agi_raySegment(-1.0, 0.0));" +
- " gl_FragColor = vec4((i.intervals[0] == agi_raySegment(1.0, 4.0)) && (i.count == 1)); " +
- "}";
+ 'void main() {' +
+ ' agi_raySegmentCollection i = agi_subtraction(agi_raySegment(1.0, 4.0), agi_raySegment(-1.0, 0.0));' +
+ ' gl_FragColor = vec4((i.intervals[0] == agi_raySegment(1.0, 4.0)) && (i.count == 1)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
///////////////////////////////////////////////////////////////////////
- it("agi_insertAt: last, first, middle", function() {
+ it('agi_insertAt: last, first, middle', function() {
var fs =
- "void main() {" +
- " agi_raySegmentCollection segments = agi_raySegmentCollectionNew();" +
- " agi_insertAt(segments, agi_raySegment(5.0, 6.0), segments.count);" +
- " agi_insertAt(segments, agi_raySegment(1.0, 2.0), 0);" +
- " agi_insertAt(segments, agi_raySegment(3.0, 4.0), 1);" +
- " gl_FragColor = vec4(" +
- " (segments.count == 3)" +
- " && (segments.intervals[0].start == 1.0) && (segments.intervals[0].stop == 2.0)" +
- " && (segments.intervals[1].start == 3.0) && (segments.intervals[1].stop == 4.0)" +
- " && (segments.intervals[2].start == 5.0) && (segments.intervals[2].stop == 6.0)); " +
- "}";
+ 'void main() {' +
+ ' agi_raySegmentCollection segments = agi_raySegmentCollectionNew();' +
+ ' agi_insertAt(segments, agi_raySegment(5.0, 6.0), segments.count);' +
+ ' agi_insertAt(segments, agi_raySegment(1.0, 2.0), 0);' +
+ ' agi_insertAt(segments, agi_raySegment(3.0, 4.0), 1);' +
+ ' gl_FragColor = vec4(' +
+ ' (segments.count == 3)' +
+ ' && (segments.intervals[0].start == 1.0) && (segments.intervals[0].stop == 2.0)' +
+ ' && (segments.intervals[1].start == 3.0) && (segments.intervals[1].stop == 4.0)' +
+ ' && (segments.intervals[2].start == 5.0) && (segments.intervals[2].stop == 6.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
///////////////////////////////////////////////////////////////////////
- it("agi_removeAt: first", function() {
+ it('agi_removeAt: first', function() {
var fs =
- "void main() {" +
- " agi_raySegmentCollection segments = agi_raySegmentCollectionNew();" +
- " agi_insertAt(segments, agi_raySegment(5.0, 6.0), segments.count);" +
- " agi_insertAt(segments, agi_raySegment(1.0, 2.0), 0);" +
- " agi_insertAt(segments, agi_raySegment(3.0, 4.0), 1);" +
- " agi_removeAt(segments, 0);" +
- " gl_FragColor = vec4(" +
- " (segments.count == 2)" +
- " && (segments.intervals[0].start == 3.0) && (segments.intervals[0].stop == 4.0)" +
- " && (segments.intervals[1].start == 5.0) && (segments.intervals[1].stop == 6.0)); " +
- "}";
+ 'void main() {' +
+ ' agi_raySegmentCollection segments = agi_raySegmentCollectionNew();' +
+ ' agi_insertAt(segments, agi_raySegment(5.0, 6.0), segments.count);' +
+ ' agi_insertAt(segments, agi_raySegment(1.0, 2.0), 0);' +
+ ' agi_insertAt(segments, agi_raySegment(3.0, 4.0), 1);' +
+ ' agi_removeAt(segments, 0);' +
+ ' gl_FragColor = vec4(' +
+ ' (segments.count == 2)' +
+ ' && (segments.intervals[0].start == 3.0) && (segments.intervals[0].stop == 4.0)' +
+ ' && (segments.intervals[1].start == 5.0) && (segments.intervals[1].stop == 6.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_removeAt: middle", function() {
+ it('agi_removeAt: middle', function() {
var fs =
- "void main() {" +
- " agi_raySegmentCollection segments = agi_raySegmentCollectionNew();" +
- " agi_insertAt(segments, agi_raySegment(5.0, 6.0), segments.count);" +
- " agi_insertAt(segments, agi_raySegment(1.0, 2.0), 0);" +
- " agi_insertAt(segments, agi_raySegment(3.0, 4.0), 1);" +
- " agi_removeAt(segments, 1);" +
- " gl_FragColor = vec4(" +
- " (segments.count == 2)" +
- " && (segments.intervals[0].start == 1.0) && (segments.intervals[0].stop == 2.0)" +
- " && (segments.intervals[1].start == 5.0) && (segments.intervals[1].stop == 6.0)); " +
- "}";
+ 'void main() {' +
+ ' agi_raySegmentCollection segments = agi_raySegmentCollectionNew();' +
+ ' agi_insertAt(segments, agi_raySegment(5.0, 6.0), segments.count);' +
+ ' agi_insertAt(segments, agi_raySegment(1.0, 2.0), 0);' +
+ ' agi_insertAt(segments, agi_raySegment(3.0, 4.0), 1);' +
+ ' agi_removeAt(segments, 1);' +
+ ' gl_FragColor = vec4(' +
+ ' (segments.count == 2)' +
+ ' && (segments.intervals[0].start == 1.0) && (segments.intervals[0].stop == 2.0)' +
+ ' && (segments.intervals[1].start == 5.0) && (segments.intervals[1].stop == 6.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
- it("agi_removeAt: last", function() {
+ it('agi_removeAt: last', function() {
var fs =
- "void main() {" +
- " agi_raySegmentCollection segments = agi_raySegmentCollectionNew();" +
- " agi_insertAt(segments, agi_raySegment(5.0, 6.0), segments.count);" +
- " agi_insertAt(segments, agi_raySegment(1.0, 2.0), 0);" +
- " agi_insertAt(segments, agi_raySegment(3.0, 4.0), 1);" +
- " agi_removeAt(segments, 2);" +
- " gl_FragColor = vec4(" +
- " (segments.count == 2)" +
- " && (segments.intervals[0].start == 1.0) && (segments.intervals[0].stop == 2.0)" +
- " && (segments.intervals[1].start == 3.0) && (segments.intervals[1].stop == 4.0)); " +
- "}";
+ 'void main() {' +
+ ' agi_raySegmentCollection segments = agi_raySegmentCollectionNew();' +
+ ' agi_insertAt(segments, agi_raySegment(5.0, 6.0), segments.count);' +
+ ' agi_insertAt(segments, agi_raySegment(1.0, 2.0), 0);' +
+ ' agi_insertAt(segments, agi_raySegment(3.0, 4.0), 1);' +
+ ' agi_removeAt(segments, 2);' +
+ ' gl_FragColor = vec4(' +
+ ' (segments.count == 2)' +
+ ' && (segments.intervals[0].start == 1.0) && (segments.intervals[0].stop == 2.0)' +
+ ' && (segments.intervals[1].start == 3.0) && (segments.intervals[1].stop == 4.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
///////////////////////////////////////////////////////////////////////
- it("agi_intersect: {[5,8],[10,20]} with {[5,8],[10,20]}", function() {
- var fs =
- "void main() {" +
- " agi_raySegmentCollection collection1 = agi_raySegmentCollectionNew();" +
- " agi_insertAt(collection1, agi_raySegment(5.0, 8.0), 0);" +
- " agi_insertAt(collection1, agi_raySegment(10.0, 20.0), collection1.count);" +
- " agi_raySegmentCollection collection2 = agi_raySegmentCollectionNew();" +
- " agi_insertAt(collection2, agi_raySegment(5.0, 8.0), 0);" +
- " agi_insertAt(collection2, agi_raySegment(10.0, 20.0), collection1.count);" +
- " agi_raySegmentCollection intersection = agi_intersection(collection1, collection2);" +
- " gl_FragColor = vec4(" +
- " (intersection.count == 2)" +
- " && (intersection.intervals[0].start == 5.0) && (intersection.intervals[0].stop == 8.0)" +
- " && (intersection.intervals[1].start == 10.0) && (intersection.intervals[1].stop == 20.0)); " +
- "}";
- expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
- });
-
- it("agi_intersect: {[5,8],[10,20]} with {[7,11]}", function() {
- var fs =
- "void main() {" +
- " agi_raySegmentCollection collection1 = agi_raySegmentCollectionNew();" +
- " agi_insertAt(collection1, agi_raySegment(5.0, 8.0), 0);" +
- " agi_insertAt(collection1, agi_raySegment(10.0, 20.0), collection1.count);" +
- " agi_raySegmentCollection collection2 = agi_raySegmentCollectionNew();" +
- " agi_insertAt(collection2, agi_raySegment(7.0, 11.0), 0);" +
- " agi_raySegmentCollection intersection = agi_intersection(collection1, collection2);" +
- " gl_FragColor = vec4(" +
- " (intersection.count == 2)" +
- " && (intersection.intervals[0].start == 7.0) && (intersection.intervals[0].stop == 8.0)" +
- " && (intersection.intervals[1].start == 10.0) && (intersection.intervals[1].stop == 11.0)); " +
- "}";
- expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
- });
-
- it("agi_intersect: {[2,4],[5,7]} with {[1,6],[6.1,8]}", function() {
- var fs =
- "void main() {" +
- " agi_raySegmentCollection collection1 = agi_raySegmentCollectionNew();" +
- " agi_insertAt(collection1, agi_raySegment(2.0, 4.0), 0);" +
- " agi_insertAt(collection1, agi_raySegment(5.0, 7.0), collection1.count);" +
- " agi_raySegmentCollection collection2 = agi_raySegmentCollectionNew();" +
- " agi_insertAt(collection2, agi_raySegment(1.0, 6.0), 0);" +
- " agi_insertAt(collection2, agi_raySegment(6.1, 8.0), collection2.count);" +
- " agi_raySegmentCollection intersection = agi_intersection(collection1, collection2);" +
- " gl_FragColor = vec4(" +
- " (intersection.count == 3)" +
- " && (intersection.intervals[0].start == 2.0) && (intersection.intervals[0].stop == 4.0)" +
- " && (intersection.intervals[1].start == 5.0) && (intersection.intervals[1].stop == 6.0)" +
- " && (intersection.intervals[2].start == 6.1) && (intersection.intervals[2].stop == 7.0)); " +
- "}";
- expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
- });
-
- it("agi_intersect: {[3.5,4]} with {[1,2],[3,4]}", function() {
- var fs =
- "void main() {" +
- " agi_raySegmentCollection collection1 = agi_raySegmentCollectionNew();" +
- " agi_insertAt(collection1, agi_raySegment(3.5, 4.0), 0);" +
- " agi_raySegmentCollection collection2 = agi_raySegmentCollectionNew();" +
- " agi_insertAt(collection2, agi_raySegment(1.0, 2.0), 0);" +
- " agi_insertAt(collection2, agi_raySegment(3.0, 4.0), collection1.count);" +
- " agi_raySegmentCollection intersection = agi_intersection(collection1, collection2);" +
- " gl_FragColor = vec4(" +
- " (intersection.count == 1)" +
- " && (intersection.intervals[0].start == 3.5) && (intersection.intervals[0].stop == 4.0)); " +
- "}";
- expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
- });
-
- it("agi_intersect: {[2,4],[5,7]} with {}", function() {
- var fs =
- "void main() {" +
- " agi_raySegmentCollection collection1 = agi_raySegmentCollectionNew();" +
- " agi_insertAt(collection1, agi_raySegment(2.0, 4.0), 0);" +
- " agi_insertAt(collection1, agi_raySegment(5.0, 7.0), collection1.count);" +
- " agi_raySegmentCollection collection2 = agi_raySegmentCollectionNew();" +
- " agi_raySegmentCollection intersection = agi_intersection(collection1, collection2);" +
- " gl_FragColor = vec4(" +
- " (intersection.count == 0)); " +
- "}";
- expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
- });
-
- it("agi_intersect: {[2,4]} with {[2,4]}", function() {
- var fs =
- "void main() {" +
- " agi_raySegmentCollection collection1 = agi_raySegmentCollectionNew();" +
- " agi_insertAt(collection1, agi_raySegment(2.0, 4.0), 0);" +
- " agi_raySegmentCollection collection2 = agi_raySegmentCollectionNew();" +
- " agi_insertAt(collection2, agi_raySegment(2.0, 4.0), 0);" +
- " agi_raySegmentCollection intersection = agi_intersection(collection1, collection2);" +
- " gl_FragColor = vec4(" +
- " (intersection.count == 1)" +
- " && (intersection.intervals[0].start == 2.0) && (intersection.intervals[0].stop == 4.0)); " +
- "}";
+ it('agi_intersect: {[5,8],[10,20]} with {[5,8],[10,20]}', function() {
+ var fs =
+ 'void main() {' +
+ ' agi_raySegmentCollection collection1 = agi_raySegmentCollectionNew();' +
+ ' agi_insertAt(collection1, agi_raySegment(5.0, 8.0), 0);' +
+ ' agi_insertAt(collection1, agi_raySegment(10.0, 20.0), collection1.count);' +
+ ' agi_raySegmentCollection collection2 = agi_raySegmentCollectionNew();' +
+ ' agi_insertAt(collection2, agi_raySegment(5.0, 8.0), 0);' +
+ ' agi_insertAt(collection2, agi_raySegment(10.0, 20.0), collection1.count);' +
+ ' agi_raySegmentCollection intersection = agi_intersection(collection1, collection2);' +
+ ' gl_FragColor = vec4(' +
+ ' (intersection.count == 2)' +
+ ' && (intersection.intervals[0].start == 5.0) && (intersection.intervals[0].stop == 8.0)' +
+ ' && (intersection.intervals[1].start == 10.0) && (intersection.intervals[1].stop == 20.0)); ' +
+ '}';
+ expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
+ });
+
+ it('agi_intersect: {[5,8],[10,20]} with {[7,11]}', function() {
+ var fs =
+ 'void main() {' +
+ ' agi_raySegmentCollection collection1 = agi_raySegmentCollectionNew();' +
+ ' agi_insertAt(collection1, agi_raySegment(5.0, 8.0), 0);' +
+ ' agi_insertAt(collection1, agi_raySegment(10.0, 20.0), collection1.count);' +
+ ' agi_raySegmentCollection collection2 = agi_raySegmentCollectionNew();' +
+ ' agi_insertAt(collection2, agi_raySegment(7.0, 11.0), 0);' +
+ ' agi_raySegmentCollection intersection = agi_intersection(collection1, collection2);' +
+ ' gl_FragColor = vec4(' +
+ ' (intersection.count == 2)' +
+ ' && (intersection.intervals[0].start == 7.0) && (intersection.intervals[0].stop == 8.0)' +
+ ' && (intersection.intervals[1].start == 10.0) && (intersection.intervals[1].stop == 11.0)); ' +
+ '}';
+ expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
+ });
+
+ it('agi_intersect: {[2,4],[5,7]} with {[1,6],[6.1,8]}', function() {
+ var fs =
+ 'void main() {' +
+ ' agi_raySegmentCollection collection1 = agi_raySegmentCollectionNew();' +
+ ' agi_insertAt(collection1, agi_raySegment(2.0, 4.0), 0);' +
+ ' agi_insertAt(collection1, agi_raySegment(5.0, 7.0), collection1.count);' +
+ ' agi_raySegmentCollection collection2 = agi_raySegmentCollectionNew();' +
+ ' agi_insertAt(collection2, agi_raySegment(1.0, 6.0), 0);' +
+ ' agi_insertAt(collection2, agi_raySegment(6.1, 8.0), collection2.count);' +
+ ' agi_raySegmentCollection intersection = agi_intersection(collection1, collection2);' +
+ ' gl_FragColor = vec4(' +
+ ' (intersection.count == 3)' +
+ ' && (intersection.intervals[0].start == 2.0) && (intersection.intervals[0].stop == 4.0)' +
+ ' && (intersection.intervals[1].start == 5.0) && (intersection.intervals[1].stop == 6.0)' +
+ ' && (intersection.intervals[2].start == 6.1) && (intersection.intervals[2].stop == 7.0)); ' +
+ '}';
+ expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
+ });
+
+ it('agi_intersect: {[3.5,4]} with {[1,2],[3,4]}', function() {
+ var fs =
+ 'void main() {' +
+ ' agi_raySegmentCollection collection1 = agi_raySegmentCollectionNew();' +
+ ' agi_insertAt(collection1, agi_raySegment(3.5, 4.0), 0);' +
+ ' agi_raySegmentCollection collection2 = agi_raySegmentCollectionNew();' +
+ ' agi_insertAt(collection2, agi_raySegment(1.0, 2.0), 0);' +
+ ' agi_insertAt(collection2, agi_raySegment(3.0, 4.0), collection1.count);' +
+ ' agi_raySegmentCollection intersection = agi_intersection(collection1, collection2);' +
+ ' gl_FragColor = vec4(' +
+ ' (intersection.count == 1)' +
+ ' && (intersection.intervals[0].start == 3.5) && (intersection.intervals[0].stop == 4.0)); ' +
+ '}';
+ expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
+ });
+
+ it('agi_intersect: {[2,4],[5,7]} with {}', function() {
+ var fs =
+ 'void main() {' +
+ ' agi_raySegmentCollection collection1 = agi_raySegmentCollectionNew();' +
+ ' agi_insertAt(collection1, agi_raySegment(2.0, 4.0), 0);' +
+ ' agi_insertAt(collection1, agi_raySegment(5.0, 7.0), collection1.count);' +
+ ' agi_raySegmentCollection collection2 = agi_raySegmentCollectionNew();' +
+ ' agi_raySegmentCollection intersection = agi_intersection(collection1, collection2);' +
+ ' gl_FragColor = vec4(' +
+ ' (intersection.count == 0)); ' +
+ '}';
+ expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
+ });
+
+ it('agi_intersect: {[2,4]} with {[2,4]}', function() {
+ var fs =
+ 'void main() {' +
+ ' agi_raySegmentCollection collection1 = agi_raySegmentCollectionNew();' +
+ ' agi_insertAt(collection1, agi_raySegment(2.0, 4.0), 0);' +
+ ' agi_raySegmentCollection collection2 = agi_raySegmentCollectionNew();' +
+ ' agi_insertAt(collection2, agi_raySegment(2.0, 4.0), 0);' +
+ ' agi_raySegmentCollection intersection = agi_intersection(collection1, collection2);' +
+ ' gl_FragColor = vec4(' +
+ ' (intersection.count == 1)' +
+ ' && (intersection.intervals[0].start == 2.0) && (intersection.intervals[0].stop == 4.0)); ' +
+ '}';
expect(renderFragment(context, fs)).toEqualArray([255, 255, 255, 255]);
});
});
\ No newline at end of file
diff --git a/Specs/Renderer/RenderStateSpec.js b/Specs/Renderer/RenderStateSpec.js
index e1b10370d0a..00f8e78dd1f 100644
--- a/Specs/Renderer/RenderStateSpec.js
+++ b/Specs/Renderer/RenderStateSpec.js
@@ -9,7 +9,7 @@ defineSuite([
'Renderer/DepthFunction',
'Renderer/StencilFunction',
'Renderer/StencilOperation'
- ], "Renderer/RenderState", function(
+ ], 'Renderer/RenderState', function(
createContext,
destroyContext,
WindingOrder,
@@ -32,7 +32,7 @@ defineSuite([
destroyContext(context);
});
- it("creates with defaults", function() {
+ it('creates with defaults', function() {
var defaultRS = {
frontFace : WindingOrder.COUNTER_CLOCKWISE,
cull : {
@@ -162,7 +162,7 @@ defineSuite([
expect(rs.dither).toEqual(defaultRS.dither);
});
- it("creates with all render states", function() {
+ it('creates with all render states', function() {
var r = {
frontFace : WindingOrder.CLOCKWISE,
cull : {
@@ -292,7 +292,7 @@ defineSuite([
expect(rs.dither).toEqual(r.dither);
});
- it("creates with some render states", function() {
+ it('creates with some render states', function() {
var r = {
frontFace : WindingOrder.CLOCKWISE,
depthRange : {
@@ -354,25 +354,25 @@ defineSuite([
expect(rs.dither).toEqual(defaultRS.dither);
});
- it("fails to create (frontFace)", function() {
+ it('fails to create (frontFace)', function() {
expect(function() {
context.createRenderState({
- frontFace : "invalid value"
+ frontFace : 'invalid value'
});
}).toThrow();
});
- it("fails to create (cull.face)", function() {
+ it('fails to create (cull.face)', function() {
expect(function() {
context.createRenderState({
cull : {
- face : "invalid value"
+ face : 'invalid value'
}
});
}).toThrow();
});
- it("fails to create (small lineWidth)", function() {
+ it('fails to create (small lineWidth)', function() {
expect(function() {
context.createRenderState({
lineWidth : context.getMinimumAliasedLineWidth() - 1
@@ -380,7 +380,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (large lineWidth)", function() {
+ it('fails to create (large lineWidth)', function() {
expect(function() {
context.createRenderState({
lineWidth : context.getMaximumAliasedLineWidth() + 1
@@ -388,7 +388,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (negative scissorTest.rectangle.width)", function() {
+ it('fails to create (negative scissorTest.rectangle.width)', function() {
expect(function() {
context.createRenderState({
scissorTest : {
@@ -403,7 +403,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (negative scissorTest.rectangle.height)", function() {
+ it('fails to create (negative scissorTest.rectangle.height)', function() {
expect(function() {
context.createRenderState({
scissorTest : {
@@ -418,7 +418,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (near > far)", function() {
+ it('fails to create (near > far)', function() {
expect(function() {
context.createRenderState({
depthRange : {
@@ -429,7 +429,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (near < 0)", function() {
+ it('fails to create (near < 0)', function() {
expect(function() {
context.createRenderState({
depthRange : {
@@ -439,7 +439,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (far > 1)", function() {
+ it('fails to create (far > 1)', function() {
expect(function() {
context.createRenderState({
depthRange : {
@@ -449,17 +449,17 @@ defineSuite([
}).toThrow();
});
- it("fails to create (depthTest.func)", function() {
+ it('fails to create (depthTest.func)', function() {
expect(function() {
context.createRenderState({
depthTest : {
- func : "invalid value"
+ func : 'invalid value'
}
});
}).toThrow();
});
- it("fails to create (blending.color < 0)", function() {
+ it('fails to create (blending.color < 0)', function() {
expect(function() {
context.createRenderState({
blending : {
@@ -474,7 +474,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (blending.color > 1)", function() {
+ it('fails to create (blending.color > 1)', function() {
expect(function() {
context.createRenderState({
blending : {
@@ -489,152 +489,152 @@ defineSuite([
}).toThrow();
});
- it("fails to create (blend.equationRgb)", function() {
+ it('fails to create (blend.equationRgb)', function() {
expect(function() {
context.createRenderState({
blending : {
- equationRgb : "invalid value"
+ equationRgb : 'invalid value'
}
});
}).toThrow();
});
- it("fails to create (blend.equationAlpha)", function() {
+ it('fails to create (blend.equationAlpha)', function() {
expect(function() {
context.createRenderState({
blending : {
- equationAlpha : "invalid value"
+ equationAlpha : 'invalid value'
}
});
}).toThrow();
});
- it("fails to create (blend.functionSourceRgb)", function() {
+ it('fails to create (blend.functionSourceRgb)', function() {
expect(function() {
context.createRenderState({
blending : {
- functionSourceRgb : "invalid value"
+ functionSourceRgb : 'invalid value'
}
});
}).toThrow();
});
- it("fails to create (blend.functionSourceAlpha)", function() {
+ it('fails to create (blend.functionSourceAlpha)', function() {
expect(function() {
context.createRenderState({
blending : {
- functionSourceAlpha : "invalid value"
+ functionSourceAlpha : 'invalid value'
}
});
}).toThrow();
});
- it("fails to create (blend.functionDestinationRgb)", function() {
+ it('fails to create (blend.functionDestinationRgb)', function() {
expect(function() {
context.createRenderState({
blending : {
- functionDestinationRgb : "invalid value"
+ functionDestinationRgb : 'invalid value'
}
});
}).toThrow();
});
- it("fails to create (blend.functionDestinationAlpha)", function() {
+ it('fails to create (blend.functionDestinationAlpha)', function() {
expect(function() {
context.createRenderState({
blending : {
- functionDestinationAlpha : "invalid value"
+ functionDestinationAlpha : 'invalid value'
}
});
}).toThrow();
});
- it("fails to create (stencilTest.frontFunction)", function() {
+ it('fails to create (stencilTest.frontFunction)', function() {
expect(function() {
context.createRenderState({
stencilTest : {
- frontFunction : "invalid value"
+ frontFunction : 'invalid value'
}
});
}).toThrow();
});
- it("fails to create (stencilTest.backFunction)", function() {
+ it('fails to create (stencilTest.backFunction)', function() {
expect(function() {
context.createRenderState({
stencilTest : {
- backFunction : "invalid value"
+ backFunction : 'invalid value'
}
});
}).toThrow();
});
- it("fails to create (stencilTest.frontOperation.fail)", function() {
+ it('fails to create (stencilTest.frontOperation.fail)', function() {
expect(function() {
context.createRenderState({
stencilTest : {
frontOperation : {
- fail : "invalid value"
+ fail : 'invalid value'
}
}
});
}).toThrow();
});
- it("fails to create (stencilTest.frontOperation.zFail)", function() {
+ it('fails to create (stencilTest.frontOperation.zFail)', function() {
expect(function() {
context.createRenderState({
stencilTest : {
frontOperation : {
- zFail : "invalid value"
+ zFail : 'invalid value'
}
}
});
}).toThrow();
});
- it("fails to create (stencilTest.frontOperation.zPass)", function() {
+ it('fails to create (stencilTest.frontOperation.zPass)', function() {
expect(function() {
context.createRenderState({
stencilTest : {
frontOperation : {
- zPass : "invalid value"
+ zPass : 'invalid value'
}
}
});
}).toThrow();
});
- it("fails to create (stencilTest.backOperation.fail)", function() {
+ it('fails to create (stencilTest.backOperation.fail)', function() {
expect(function() {
context.createRenderState({
stencilTest : {
backOperation : {
- fail : "invalid value"
+ fail : 'invalid value'
}
}
});
}).toThrow();
});
- it("fails to create (stencilTest.backOperation.zFail)", function() {
+ it('fails to create (stencilTest.backOperation.zFail)', function() {
expect(function() {
context.createRenderState({
stencilTest : {
backOperation : {
- zFail : "invalid value"
+ zFail : 'invalid value'
}
}
});
}).toThrow();
});
- it("fails to create (stencilTest.backOperation.zPass)", function() {
+ it('fails to create (stencilTest.backOperation.zPass)', function() {
expect(function() {
context.createRenderState({
stencilTest : {
backOperation : {
- zPass : "invalid value"
+ zPass : 'invalid value'
}
}
});
diff --git a/Specs/Renderer/RenderbufferSpec.js b/Specs/Renderer/RenderbufferSpec.js
index 567ff78cbb3..528fa1eff0e 100644
--- a/Specs/Renderer/RenderbufferSpec.js
+++ b/Specs/Renderer/RenderbufferSpec.js
@@ -3,7 +3,7 @@ defineSuite([
'../Specs/createContext',
'../Specs/destroyContext',
'Renderer/RenderbufferFormat'
- ], "Renderer/Renderbuffer", function(
+ ], 'Renderer/Renderbuffer', function(
createContext,
destroyContext,
RenderbufferFormat) {
@@ -25,7 +25,7 @@ defineSuite([
destroyContext(context);
});
- it("creates", function() {
+ it('creates', function() {
renderbuffer = context.createRenderbuffer({
format : RenderbufferFormat.DEPTH_COMPONENT16,
width : 64,
@@ -37,7 +37,7 @@ defineSuite([
expect(renderbuffer.getHeight()).toEqual(32);
});
- it("creates with defaults", function() {
+ it('creates with defaults', function() {
renderbuffer = context.createRenderbuffer();
expect(renderbuffer.getFormat()).toEqual(RenderbufferFormat.RGBA4);
@@ -45,22 +45,22 @@ defineSuite([
expect(renderbuffer.getHeight()).toEqual(context.getCanvas().clientHeight);
});
- it("destroys", function() {
+ it('destroys', function() {
var r = context.createRenderbuffer();
expect(r.isDestroyed()).toEqual(false);
r.destroy();
expect(r.isDestroyed()).toEqual(true);
});
- it("fails to create (format)", function() {
+ it('fails to create (format)', function() {
expect(function() {
renderbuffer = context.createRenderbuffer({
- format : "invalid format"
+ format : 'invalid format'
});
}).toThrow();
});
- it("fails to create (small width)", function() {
+ it('fails to create (small width)', function() {
expect(function() {
renderbuffer = context.createRenderbuffer({
width : 0
@@ -68,7 +68,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (large width)", function() {
+ it('fails to create (large width)', function() {
expect(function() {
renderbuffer = context.createRenderbuffer({
width : context.getMaximumRenderbufferSize() + 1
@@ -76,7 +76,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (small height)", function() {
+ it('fails to create (small height)', function() {
expect(function() {
renderbuffer = context.createRenderbuffer({
height : 0
@@ -84,7 +84,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (large height)", function() {
+ it('fails to create (large height)', function() {
expect(function() {
renderbuffer = context.createRenderbuffer({
height : context.getMaximumRenderbufferSize() + 1
@@ -92,7 +92,7 @@ defineSuite([
}).toThrow();
});
- it("fails to destroy", function() {
+ it('fails to destroy', function() {
var r = context.createRenderbuffer();
r.destroy();
diff --git a/Specs/Renderer/ShaderCacheSpec.js b/Specs/Renderer/ShaderCacheSpec.js
index 08a1f2bf155..c69c4730054 100644
--- a/Specs/Renderer/ShaderCacheSpec.js
+++ b/Specs/Renderer/ShaderCacheSpec.js
@@ -20,9 +20,9 @@ defineSuite([
destroyContext(context);
});
- it("adds and removes", function() {
- var vs = "attribute vec4 position; void main() { gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('adds and removes', function() {
+ var vs = 'attribute vec4 position; void main() { gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
var cache = new ShaderCache(context);
var sp = cache.getShaderProgram(vs, fs, {
@@ -39,9 +39,9 @@ defineSuite([
cache.destroy();
});
- it("adds and removes 2", function() {
- var vs = "attribute vec4 position; void main() { gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('adds and removes 2', function() {
+ var vs = 'attribute vec4 position; void main() { gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
var cache = new ShaderCache(context);
var sp = cache.getShaderProgram(vs, fs, {
@@ -58,9 +58,9 @@ defineSuite([
cache.destroy();
});
- it("has a cache hit", function() {
- var vs = "attribute vec4 position; void main() { gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('has a cache hit', function() {
+ var vs = 'attribute vec4 position; void main() { gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
var cache = new ShaderCache(context);
var sp = cache.getShaderProgram(vs, fs, {
@@ -82,9 +82,9 @@ defineSuite([
cache.destroy();
});
- it("avoids thrashing", function() {
- var vs = "attribute vec4 position; void main() { gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('avoids thrashing', function() {
+ var vs = 'attribute vec4 position; void main() { gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
var cache = new ShaderCache(context);
var sp = cache.getShaderProgram(vs, fs, {
@@ -108,9 +108,9 @@ defineSuite([
cache.destroy();
});
- it("is destroyed", function() {
- var vs = "attribute vec4 position; void main() { gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('is destroyed', function() {
+ var vs = 'attribute vec4 position; void main() { gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
var cache = new ShaderCache(context);
var sp = cache.getShaderProgram(vs, fs, {
@@ -123,7 +123,7 @@ defineSuite([
expect(cache.isDestroyed()).toEqual(true);
});
- it("is not destroyed", function() {
+ it('is not destroyed', function() {
var cache = new ShaderCache(context);
expect(cache.isDestroyed()).toEqual(false);
});
diff --git a/Specs/Renderer/ShaderProgramSpec.js b/Specs/Renderer/ShaderProgramSpec.js
index 263b50f8885..585804e8c5b 100644
--- a/Specs/Renderer/ShaderProgramSpec.js
+++ b/Specs/Renderer/ShaderProgramSpec.js
@@ -11,7 +11,7 @@ defineSuite([
'Core/PrimitiveType',
'Renderer/BufferUsage',
'Renderer/UniformDatatype'
- ], "Renderer/ShaderProgram", function(
+ ], 'Renderer/ShaderProgram', function(
createContext,
destroyContext,
Cartesian2,
@@ -38,22 +38,22 @@ defineSuite([
destroyContext(context);
});
- it("has a position vertex attribute", function() {
- var vs = "attribute vec4 position; void main() { gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('has a position vertex attribute', function() {
+ var vs = 'attribute vec4 position; void main() { gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
expect(sp.getNumberOfVertexAttributes()).toEqual(1);
- expect(sp.getVertexAttributes().position.name).toEqual("position");
+ expect(sp.getVertexAttributes().position.name).toEqual('position');
});
- it("sets attribute indices", function() {
+ it('sets attribute indices', function() {
var vs =
- "attribute vec4 position;" +
- "attribute vec3 normal;" +
- "attribute float heat;" +
- "void main() { gl_Position = position + vec4(normal, 0.0) + vec4(heat); }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ 'attribute vec4 position;' +
+ 'attribute vec3 normal;' +
+ 'attribute float heat;' +
+ 'void main() { gl_Position = position + vec4(normal, 0.0) + vec4(heat); }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
var attributes = {
position : 3,
@@ -63,88 +63,88 @@ defineSuite([
sp = context.createShaderProgram(vs, fs, attributes);
expect(sp.getNumberOfVertexAttributes()).toEqual(3);
- expect(sp.getVertexAttributes().position.name).toEqual("position");
+ expect(sp.getVertexAttributes().position.name).toEqual('position');
expect(sp.getVertexAttributes().position.index).toEqual(attributes.position);
- expect(sp.getVertexAttributes().normal.name).toEqual("normal");
+ expect(sp.getVertexAttributes().normal.name).toEqual('normal');
expect(sp.getVertexAttributes().normal.index).toEqual(attributes.normal);
- expect(sp.getVertexAttributes().heat.name).toEqual("heat");
+ expect(sp.getVertexAttributes().heat.name).toEqual('heat');
expect(sp.getVertexAttributes().heat.index).toEqual(attributes.heat);
});
- it("has a uniform", function() {
- var vs = "uniform vec4 u_vec4; void main() { gl_Position = u_vec4; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('has a uniform', function() {
+ var vs = 'uniform vec4 u_vec4; void main() { gl_Position = u_vec4; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
var uniform = sp.getAllUniforms().u_vec4;
- expect(uniform.getName()).toEqual("u_vec4");
+ expect(uniform.getName()).toEqual('u_vec4');
});
- it("has an automatic uniform", function() {
- var vs = "uniform vec4 u_vec4; void main() { gl_Position = u_vec4; }";
- var fs = "void main() { gl_FragColor = vec4((agi_viewport.x == 0) && (agi_viewport.y == 0) && (agi_viewport.z == 1) && (agi_viewport.w == 1)); }";
+ it('has an automatic uniform', function() {
+ var vs = 'uniform vec4 u_vec4; void main() { gl_Position = u_vec4; }';
+ var fs = 'void main() { gl_FragColor = vec4((agi_viewport.x == 0) && (agi_viewport.y == 0) && (agi_viewport.z == 1) && (agi_viewport.w == 1)); }';
sp = context.createShaderProgram(vs, fs);
- expect(sp.getAllUniforms().u_vec4.getName()).toEqual("u_vec4");
- expect(sp.getAllUniforms().agi_viewport.getName()).toEqual("agi_viewport");
+ expect(sp.getAllUniforms().u_vec4.getName()).toEqual('u_vec4');
+ expect(sp.getAllUniforms().agi_viewport.getName()).toEqual('agi_viewport');
- expect(sp.getManualUniforms().u_vec4.getName()).toEqual("u_vec4");
+ expect(sp.getManualUniforms().u_vec4.getName()).toEqual('u_vec4');
expect(sp.getManualUniforms().agi_viewport).not.toBeDefined();
});
- it("has uniforms", function() {
- var vs = "uniform float u_float; uniform vec4 u_vec4; uniform mat4 u_mat4; void main() { gl_Position = u_mat4 * u_float * u_vec4; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('has uniforms', function() {
+ var vs = 'uniform float u_float; uniform vec4 u_vec4; uniform mat4 u_mat4; void main() { gl_Position = u_mat4 * u_float * u_vec4; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
- expect(sp.getAllUniforms().u_float.getName()).toEqual("u_float");
- expect(sp.getAllUniforms().u_vec4.getName()).toEqual("u_vec4");
- expect(sp.getAllUniforms().u_mat4.getName()).toEqual("u_mat4");
+ expect(sp.getAllUniforms().u_float.getName()).toEqual('u_float');
+ expect(sp.getAllUniforms().u_vec4.getName()).toEqual('u_vec4');
+ expect(sp.getAllUniforms().u_mat4.getName()).toEqual('u_mat4');
});
- it("has uniforms of every datatype", function() {
+ it('has uniforms of every datatype', function() {
var d = context;
var vs =
- "uniform float u_float;" +
- "uniform vec2 u_vec2;" +
- "uniform vec3 u_vec3;" +
- "uniform vec4 u_vec4;" +
- "uniform int u_int;" +
- "uniform ivec2 u_ivec2;" +
- "uniform ivec3 u_ivec3;" +
- "uniform ivec4 u_ivec4;" +
- "uniform bool u_bool;" +
- "uniform bvec2 u_bvec2;" +
- "uniform bvec3 u_bvec3;" +
- "uniform bvec4 u_bvec4;" +
- "uniform mat2 u_mat2;" +
- "uniform mat3 u_mat3;" +
- "uniform mat4 u_mat4;" +
- "void main() { gl_Position = vec4(u_float) * vec4((u_mat2 * u_vec2), 0.0, 0.0) * vec4((u_mat3 * u_vec3), 0.0) * (u_mat4 * u_vec4) * vec4(u_int) * vec4(u_ivec2, 0.0, 0.0) * vec4(u_ivec3, 0.0) * vec4(u_ivec4) * vec4(u_bool) * vec4(u_bvec2, 0.0, 0.0) * vec4(u_bvec3, 0.0) * vec4(u_bvec4); }";
+ 'uniform float u_float;' +
+ 'uniform vec2 u_vec2;' +
+ 'uniform vec3 u_vec3;' +
+ 'uniform vec4 u_vec4;' +
+ 'uniform int u_int;' +
+ 'uniform ivec2 u_ivec2;' +
+ 'uniform ivec3 u_ivec3;' +
+ 'uniform ivec4 u_ivec4;' +
+ 'uniform bool u_bool;' +
+ 'uniform bvec2 u_bvec2;' +
+ 'uniform bvec3 u_bvec3;' +
+ 'uniform bvec4 u_bvec4;' +
+ 'uniform mat2 u_mat2;' +
+ 'uniform mat3 u_mat3;' +
+ 'uniform mat4 u_mat4;' +
+ 'void main() { gl_Position = vec4(u_float) * vec4((u_mat2 * u_vec2), 0.0, 0.0) * vec4((u_mat3 * u_vec3), 0.0) * (u_mat4 * u_vec4) * vec4(u_int) * vec4(u_ivec2, 0.0, 0.0) * vec4(u_ivec3, 0.0) * vec4(u_ivec4) * vec4(u_bool) * vec4(u_bvec2, 0.0, 0.0) * vec4(u_bvec3, 0.0) * vec4(u_bvec4); }';
var fs =
- "uniform sampler2D u_sampler2D;" +
- "uniform samplerCube u_samplerCube;" +
- "void main() { gl_FragColor = texture2D(u_sampler2D, vec2(0.0)) + textureCube(u_samplerCube, vec3(1.0)); }";
+ 'uniform sampler2D u_sampler2D;' +
+ 'uniform samplerCube u_samplerCube;' +
+ 'void main() { gl_FragColor = texture2D(u_sampler2D, vec2(0.0)) + textureCube(u_samplerCube, vec3(1.0)); }';
sp = d.createShaderProgram(vs, fs);
- expect(sp.getAllUniforms().u_float.getName()).toEqual("u_float");
- expect(sp.getAllUniforms().u_vec2.getName()).toEqual("u_vec2");
- expect(sp.getAllUniforms().u_vec3.getName()).toEqual("u_vec3");
- expect(sp.getAllUniforms().u_vec4.getName()).toEqual("u_vec4");
- expect(sp.getAllUniforms().u_int.getName()).toEqual("u_int");
- expect(sp.getAllUniforms().u_ivec2.getName()).toEqual("u_ivec2");
- expect(sp.getAllUniforms().u_ivec3.getName()).toEqual("u_ivec3");
- expect(sp.getAllUniforms().u_ivec4.getName()).toEqual("u_ivec4");
- expect(sp.getAllUniforms().u_bool.getName()).toEqual("u_bool");
- expect(sp.getAllUniforms().u_bvec2.getName()).toEqual("u_bvec2");
- expect(sp.getAllUniforms().u_bvec3.getName()).toEqual("u_bvec3");
- expect(sp.getAllUniforms().u_bvec4.getName()).toEqual("u_bvec4");
- expect(sp.getAllUniforms().u_mat2.getName()).toEqual("u_mat2");
- expect(sp.getAllUniforms().u_mat3.getName()).toEqual("u_mat3");
- expect(sp.getAllUniforms().u_mat4.getName()).toEqual("u_mat4");
- expect(sp.getAllUniforms().u_sampler2D.getName()).toEqual("u_sampler2D");
- expect(sp.getAllUniforms().u_samplerCube.getName()).toEqual("u_samplerCube");
+ expect(sp.getAllUniforms().u_float.getName()).toEqual('u_float');
+ expect(sp.getAllUniforms().u_vec2.getName()).toEqual('u_vec2');
+ expect(sp.getAllUniforms().u_vec3.getName()).toEqual('u_vec3');
+ expect(sp.getAllUniforms().u_vec4.getName()).toEqual('u_vec4');
+ expect(sp.getAllUniforms().u_int.getName()).toEqual('u_int');
+ expect(sp.getAllUniforms().u_ivec2.getName()).toEqual('u_ivec2');
+ expect(sp.getAllUniforms().u_ivec3.getName()).toEqual('u_ivec3');
+ expect(sp.getAllUniforms().u_ivec4.getName()).toEqual('u_ivec4');
+ expect(sp.getAllUniforms().u_bool.getName()).toEqual('u_bool');
+ expect(sp.getAllUniforms().u_bvec2.getName()).toEqual('u_bvec2');
+ expect(sp.getAllUniforms().u_bvec3.getName()).toEqual('u_bvec3');
+ expect(sp.getAllUniforms().u_bvec4.getName()).toEqual('u_bvec4');
+ expect(sp.getAllUniforms().u_mat2.getName()).toEqual('u_mat2');
+ expect(sp.getAllUniforms().u_mat3.getName()).toEqual('u_mat3');
+ expect(sp.getAllUniforms().u_mat4.getName()).toEqual('u_mat4');
+ expect(sp.getAllUniforms().u_sampler2D.getName()).toEqual('u_sampler2D');
+ expect(sp.getAllUniforms().u_samplerCube.getName()).toEqual('u_samplerCube');
expect(sp.getAllUniforms().u_float.getDatatype()).toEqual(UniformDatatype.FLOAT);
expect(sp.getAllUniforms().u_vec2.getDatatype()).toEqual(UniformDatatype.FLOAT_VECTOR2);
@@ -165,68 +165,68 @@ defineSuite([
expect(sp.getAllUniforms().u_samplerCube.getDatatype()).toEqual(UniformDatatype.SAMPLER_CUBE);
});
- it("has a struct uniform", function() {
- var vs = "uniform struct { float f; vec4 v; } u_struct; void main() { gl_Position = u_struct.f * u_struct.v; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('has a struct uniform', function() {
+ var vs = 'uniform struct { float f; vec4 v; } u_struct; void main() { gl_Position = u_struct.f * u_struct.v; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
- expect(sp.getAllUniforms()["u_struct.f"].getName()).toEqual("u_struct.f");
- expect(sp.getAllUniforms()["u_struct.v"].getName()).toEqual("u_struct.v");
+ expect(sp.getAllUniforms()['u_struct.f'].getName()).toEqual('u_struct.f');
+ expect(sp.getAllUniforms()['u_struct.v'].getName()).toEqual('u_struct.v');
});
- it("has a uniform array", function() {
- var vs = "uniform vec4 u_vec4[2]; void main() { gl_Position = u_vec4[0] + u_vec4[1]; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('has a uniform array', function() {
+ var vs = 'uniform vec4 u_vec4[2]; void main() { gl_Position = u_vec4[0] + u_vec4[1]; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
var uniform = sp.getAllUniforms().u_vec4;
- expect(uniform.getName()).toEqual("u_vec4");
+ expect(uniform.getName()).toEqual('u_vec4');
expect(uniform.value.length).toEqual(2);
});
- it("has uniform arrays of every datatype", function() {
+ it('has uniform arrays of every datatype', function() {
var d = context;
var vs =
- "uniform float u_float[2];" +
- "uniform vec2 u_vec2[2];" +
- "uniform vec3 u_vec3[2];" +
- "uniform vec4 u_vec4[2];" +
- "uniform int u_int[2];" +
- "uniform ivec2 u_ivec2[2];" +
- "uniform ivec3 u_ivec3[2];" +
- "uniform ivec4 u_ivec4[2];" +
- "uniform bool u_bool[2];" +
- "uniform bvec2 u_bvec2[2];" +
- "uniform bvec3 u_bvec3[2];" +
- "uniform bvec4 u_bvec4[2];" +
- "uniform mat2 u_mat2[2];" +
- "uniform mat3 u_mat3[2];" +
- "uniform mat4 u_mat4[2];" +
- "void main() { gl_Position = vec4(u_float[0]) * vec4(u_float[1]) * vec4((u_mat2[0] * u_vec2[0]), 0.0, 0.0) * vec4((u_mat2[1] * u_vec2[1]), 0.0, 0.0) * vec4((u_mat3[0] * u_vec3[0]), 0.0) * vec4((u_mat3[1] * u_vec3[1]), 0.0) * (u_mat4[0] * u_vec4[0]) * (u_mat4[1] * u_vec4[1]) * vec4(u_int[0]) * vec4(u_int[1]) * vec4(u_ivec2[0], 0.0, 0.0) * vec4(u_ivec2[1], 0.0, 0.0) * vec4(u_ivec3[0], 0.0) * vec4(u_ivec3[1], 0.0) * vec4(u_ivec4[0]) * vec4(u_ivec4[1]) * vec4(u_bool[0]) * vec4(u_bool[1]) * vec4(u_bvec2[0], 0.0, 0.0) * vec4(u_bvec2[1], 0.0, 0.0) * vec4(u_bvec3[0], 0.0) * vec4(u_bvec3[1], 0.0) * vec4(u_bvec4[0]) * vec4(u_bvec4[1]); }";
+ 'uniform float u_float[2];' +
+ 'uniform vec2 u_vec2[2];' +
+ 'uniform vec3 u_vec3[2];' +
+ 'uniform vec4 u_vec4[2];' +
+ 'uniform int u_int[2];' +
+ 'uniform ivec2 u_ivec2[2];' +
+ 'uniform ivec3 u_ivec3[2];' +
+ 'uniform ivec4 u_ivec4[2];' +
+ 'uniform bool u_bool[2];' +
+ 'uniform bvec2 u_bvec2[2];' +
+ 'uniform bvec3 u_bvec3[2];' +
+ 'uniform bvec4 u_bvec4[2];' +
+ 'uniform mat2 u_mat2[2];' +
+ 'uniform mat3 u_mat3[2];' +
+ 'uniform mat4 u_mat4[2];' +
+ 'void main() { gl_Position = vec4(u_float[0]) * vec4(u_float[1]) * vec4((u_mat2[0] * u_vec2[0]), 0.0, 0.0) * vec4((u_mat2[1] * u_vec2[1]), 0.0, 0.0) * vec4((u_mat3[0] * u_vec3[0]), 0.0) * vec4((u_mat3[1] * u_vec3[1]), 0.0) * (u_mat4[0] * u_vec4[0]) * (u_mat4[1] * u_vec4[1]) * vec4(u_int[0]) * vec4(u_int[1]) * vec4(u_ivec2[0], 0.0, 0.0) * vec4(u_ivec2[1], 0.0, 0.0) * vec4(u_ivec3[0], 0.0) * vec4(u_ivec3[1], 0.0) * vec4(u_ivec4[0]) * vec4(u_ivec4[1]) * vec4(u_bool[0]) * vec4(u_bool[1]) * vec4(u_bvec2[0], 0.0, 0.0) * vec4(u_bvec2[1], 0.0, 0.0) * vec4(u_bvec3[0], 0.0) * vec4(u_bvec3[1], 0.0) * vec4(u_bvec4[0]) * vec4(u_bvec4[1]); }';
var fs =
- "uniform sampler2D u_sampler2D[2];" +
- "uniform samplerCube u_samplerCube[2];" +
- "void main() { gl_FragColor = texture2D(u_sampler2D[0], vec2(0.0)) + texture2D(u_sampler2D[1], vec2(0.0)) + textureCube(u_samplerCube[0], vec3(1.0)) + textureCube(u_samplerCube[1], vec3(1.0)); }";
+ 'uniform sampler2D u_sampler2D[2];' +
+ 'uniform samplerCube u_samplerCube[2];' +
+ 'void main() { gl_FragColor = texture2D(u_sampler2D[0], vec2(0.0)) + texture2D(u_sampler2D[1], vec2(0.0)) + textureCube(u_samplerCube[0], vec3(1.0)) + textureCube(u_samplerCube[1], vec3(1.0)); }';
sp = d.createShaderProgram(vs, fs);
- expect(sp.getAllUniforms().u_float.getName()).toEqual("u_float");
- expect(sp.getAllUniforms().u_vec2.getName()).toEqual("u_vec2");
- expect(sp.getAllUniforms().u_vec3.getName()).toEqual("u_vec3");
- expect(sp.getAllUniforms().u_vec4.getName()).toEqual("u_vec4");
- expect(sp.getAllUniforms().u_int.getName()).toEqual("u_int");
- expect(sp.getAllUniforms().u_ivec2.getName()).toEqual("u_ivec2");
- expect(sp.getAllUniforms().u_ivec3.getName()).toEqual("u_ivec3");
- expect(sp.getAllUniforms().u_ivec4.getName()).toEqual("u_ivec4");
- expect(sp.getAllUniforms().u_bool.getName()).toEqual("u_bool");
- expect(sp.getAllUniforms().u_bvec2.getName()).toEqual("u_bvec2");
- expect(sp.getAllUniforms().u_bvec3.getName()).toEqual("u_bvec3");
- expect(sp.getAllUniforms().u_bvec4.getName()).toEqual("u_bvec4");
- expect(sp.getAllUniforms().u_mat2.getName()).toEqual("u_mat2");
- expect(sp.getAllUniforms().u_mat3.getName()).toEqual("u_mat3");
- expect(sp.getAllUniforms().u_mat4.getName()).toEqual("u_mat4");
- expect(sp.getAllUniforms().u_sampler2D.getName()).toEqual("u_sampler2D");
- expect(sp.getAllUniforms().u_samplerCube.getName()).toEqual("u_samplerCube");
+ expect(sp.getAllUniforms().u_float.getName()).toEqual('u_float');
+ expect(sp.getAllUniforms().u_vec2.getName()).toEqual('u_vec2');
+ expect(sp.getAllUniforms().u_vec3.getName()).toEqual('u_vec3');
+ expect(sp.getAllUniforms().u_vec4.getName()).toEqual('u_vec4');
+ expect(sp.getAllUniforms().u_int.getName()).toEqual('u_int');
+ expect(sp.getAllUniforms().u_ivec2.getName()).toEqual('u_ivec2');
+ expect(sp.getAllUniforms().u_ivec3.getName()).toEqual('u_ivec3');
+ expect(sp.getAllUniforms().u_ivec4.getName()).toEqual('u_ivec4');
+ expect(sp.getAllUniforms().u_bool.getName()).toEqual('u_bool');
+ expect(sp.getAllUniforms().u_bvec2.getName()).toEqual('u_bvec2');
+ expect(sp.getAllUniforms().u_bvec3.getName()).toEqual('u_bvec3');
+ expect(sp.getAllUniforms().u_bvec4.getName()).toEqual('u_bvec4');
+ expect(sp.getAllUniforms().u_mat2.getName()).toEqual('u_mat2');
+ expect(sp.getAllUniforms().u_mat3.getName()).toEqual('u_mat3');
+ expect(sp.getAllUniforms().u_mat4.getName()).toEqual('u_mat4');
+ expect(sp.getAllUniforms().u_sampler2D.getName()).toEqual('u_sampler2D');
+ expect(sp.getAllUniforms().u_samplerCube.getName()).toEqual('u_samplerCube');
expect(sp.getAllUniforms().u_float.getDatatype()).toEqual(UniformDatatype.FLOAT);
expect(sp.getAllUniforms().u_vec2.getDatatype()).toEqual(UniformDatatype.FLOAT_VECTOR2);
@@ -247,26 +247,26 @@ defineSuite([
expect(sp.getAllUniforms().u_samplerCube.getDatatype()).toEqual(UniformDatatype.SAMPLER_CUBE);
});
- it("sets uniforms", function() {
+ it('sets uniforms', function() {
var d = context;
var vs =
- "uniform float u_float;" +
- "uniform vec2 u_vec2;" +
- "uniform vec3 u_vec3;" +
- "uniform vec4 u_vec4;" +
- "uniform int u_int;" +
- "uniform ivec2 u_ivec2;" +
- "uniform ivec3 u_ivec3;" +
- "uniform ivec4 u_ivec4;" +
- "uniform bool u_bool;" +
- "uniform bvec2 u_bvec2;" +
- "uniform bvec3 u_bvec3;" +
- "uniform bvec4 u_bvec4;" +
- "uniform mat2 u_mat2;" +
- "uniform mat3 u_mat3;" +
- "uniform mat4 u_mat4;" +
- "void main() { gl_Position = vec4(u_float) * vec4((u_mat2 * u_vec2), 0.0, 0.0) * vec4((u_mat3 * u_vec3), 0.0) * (u_mat4 * u_vec4) * vec4(u_int) * vec4(u_ivec2, 0.0, 0.0) * vec4(u_ivec3, 0.0) * vec4(u_ivec4) * vec4(u_bool) * vec4(u_bvec2, 0.0, 0.0) * vec4(u_bvec3, 0.0) * vec4(u_bvec4); }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ 'uniform float u_float;' +
+ 'uniform vec2 u_vec2;' +
+ 'uniform vec3 u_vec3;' +
+ 'uniform vec4 u_vec4;' +
+ 'uniform int u_int;' +
+ 'uniform ivec2 u_ivec2;' +
+ 'uniform ivec3 u_ivec3;' +
+ 'uniform ivec4 u_ivec4;' +
+ 'uniform bool u_bool;' +
+ 'uniform bvec2 u_bvec2;' +
+ 'uniform bvec3 u_bvec3;' +
+ 'uniform bvec4 u_bvec4;' +
+ 'uniform mat2 u_mat2;' +
+ 'uniform mat3 u_mat3;' +
+ 'uniform mat4 u_mat4;' +
+ 'void main() { gl_Position = vec4(u_float) * vec4((u_mat2 * u_vec2), 0.0, 0.0) * vec4((u_mat3 * u_vec3), 0.0) * (u_mat4 * u_vec4) * vec4(u_int) * vec4(u_ivec2, 0.0, 0.0) * vec4(u_ivec3, 0.0) * vec4(u_ivec4) * vec4(u_bool) * vec4(u_bvec2, 0.0, 0.0) * vec4(u_bvec3, 0.0) * vec4(u_bvec4); }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = d.createShaderProgram(vs, fs);
sp.getAllUniforms().u_float.value = 1.0;
sp.getAllUniforms().u_vec2.value = new Cartesian2(1.0, 2.0);
@@ -304,26 +304,26 @@ defineSuite([
expect(d._gl.getUniform(sp._getProgram(), sp.getAllUniforms().u_mat4._getLocation())).toEqualArray((new Matrix4(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0)).values);
});
- it("sets a struct uniform", function() {
+ it('sets a struct uniform', function() {
var d = context;
- var vs = "uniform struct { float f; vec4 v; } u_struct; void main() { gl_Position = u_struct.f * u_struct.v; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ var vs = 'uniform struct { float f; vec4 v; } u_struct; void main() { gl_Position = u_struct.f * u_struct.v; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = d.createShaderProgram(vs, fs);
- sp.getAllUniforms()["u_struct.f"].value = 1;
- sp.getAllUniforms()["u_struct.v"].value = new Cartesian4(1.0, 2.0, 3.0, 4.0);
+ sp.getAllUniforms()['u_struct.f'].value = 1;
+ sp.getAllUniforms()['u_struct.v'].value = new Cartesian4(1.0, 2.0, 3.0, 4.0);
sp._bind();
sp._setUniforms();
- expect(d._gl.getUniform(sp._getProgram(), sp.getAllUniforms()["u_struct.f"]._getLocation())).toEqual(1);
- expect(d._gl.getUniform(sp._getProgram(), sp.getAllUniforms()["u_struct.v"]._getLocation())).toEqualArray(new Float32Array([1.0, 2.0, 3.0, 4.0]));
+ expect(d._gl.getUniform(sp._getProgram(), sp.getAllUniforms()['u_struct.f']._getLocation())).toEqual(1);
+ expect(d._gl.getUniform(sp._getProgram(), sp.getAllUniforms()['u_struct.v']._getLocation())).toEqualArray(new Float32Array([1.0, 2.0, 3.0, 4.0]));
});
- it("sets a uniform array", function() {
+ it('sets a uniform array', function() {
var d = context;
- var vs = "uniform float u_float[2];" + "void main() { gl_Position = vec4(u_float[0]) * vec4(u_float[1]); }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ var vs = 'uniform float u_float[2];' + 'void main() { gl_Position = vec4(u_float[0]) * vec4(u_float[1]); }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = d.createShaderProgram(vs, fs);
sp.getAllUniforms().u_float.value = new Float32Array([1, 2]);
@@ -334,26 +334,26 @@ defineSuite([
expect(d._gl.getUniform(sp._getProgram(), sp.getAllUniforms().u_float._getLocations()[1])).toEqual(2);
});
- it("sets uniform arrays", function() {
+ it('sets uniform arrays', function() {
var d = context;
var vs =
- "uniform float u_float[2];" +
- "uniform vec2 u_vec2[2];" +
- "uniform vec3 u_vec3[2];" +
- "uniform vec4 u_vec4[2];" +
- "uniform int u_int[2];" +
- "uniform ivec2 u_ivec2[2];" +
- "uniform ivec3 u_ivec3[2];" +
- "uniform ivec4 u_ivec4[2];" +
- "uniform bool u_bool[2];" +
- "uniform bvec2 u_bvec2[2];" +
- "uniform bvec3 u_bvec3[2];" +
- "uniform bvec4 u_bvec4[2];" +
- "uniform mat2 u_mat2[2];" +
- "uniform mat3 u_mat3[2];" +
- "uniform mat4 u_mat4[2];" +
- "void main() { gl_Position = vec4(u_float[0]) * vec4(u_float[1]) * vec4((u_mat2[0] * u_vec2[0]), 0.0, 0.0) * vec4((u_mat2[1] * u_vec2[1]), 0.0, 0.0) * vec4((u_mat3[0] * u_vec3[0]), 0.0) * vec4((u_mat3[1] * u_vec3[1]), 0.0) * (u_mat4[0] * u_vec4[0]) * (u_mat4[1] * u_vec4[1]) * vec4(u_int[0]) * vec4(u_int[1]) * vec4(u_ivec2[0], 0.0, 0.0) * vec4(u_ivec2[1], 0.0, 0.0) * vec4(u_ivec3[0], 0.0) * vec4(u_ivec3[1], 0.0) * vec4(u_ivec4[0]) * vec4(u_ivec4[1]) * vec4(u_bool[0]) * vec4(u_bool[1]) * vec4(u_bvec2[0], 0.0, 0.0) * vec4(u_bvec2[1], 0.0, 0.0) * vec4(u_bvec3[0], 0.0) * vec4(u_bvec3[1], 0.0) * vec4(u_bvec4[0]) * vec4(u_bvec4[1]); }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ 'uniform float u_float[2];' +
+ 'uniform vec2 u_vec2[2];' +
+ 'uniform vec3 u_vec3[2];' +
+ 'uniform vec4 u_vec4[2];' +
+ 'uniform int u_int[2];' +
+ 'uniform ivec2 u_ivec2[2];' +
+ 'uniform ivec3 u_ivec3[2];' +
+ 'uniform ivec4 u_ivec4[2];' +
+ 'uniform bool u_bool[2];' +
+ 'uniform bvec2 u_bvec2[2];' +
+ 'uniform bvec3 u_bvec3[2];' +
+ 'uniform bvec4 u_bvec4[2];' +
+ 'uniform mat2 u_mat2[2];' +
+ 'uniform mat3 u_mat3[2];' +
+ 'uniform mat4 u_mat4[2];' +
+ 'void main() { gl_Position = vec4(u_float[0]) * vec4(u_float[1]) * vec4((u_mat2[0] * u_vec2[0]), 0.0, 0.0) * vec4((u_mat2[1] * u_vec2[1]), 0.0, 0.0) * vec4((u_mat3[0] * u_vec3[0]), 0.0) * vec4((u_mat3[1] * u_vec3[1]), 0.0) * (u_mat4[0] * u_vec4[0]) * (u_mat4[1] * u_vec4[1]) * vec4(u_int[0]) * vec4(u_int[1]) * vec4(u_ivec2[0], 0.0, 0.0) * vec4(u_ivec2[1], 0.0, 0.0) * vec4(u_ivec3[0], 0.0) * vec4(u_ivec3[1], 0.0) * vec4(u_ivec4[0]) * vec4(u_ivec4[1]) * vec4(u_bool[0]) * vec4(u_bool[1]) * vec4(u_bvec2[0], 0.0, 0.0) * vec4(u_bvec2[1], 0.0, 0.0) * vec4(u_bvec3[0], 0.0) * vec4(u_bvec3[1], 0.0) * vec4(u_bvec4[0]) * vec4(u_bvec4[1]); }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
sp = d.createShaderProgram(vs, fs);
sp.getAllUniforms().u_float.value = [1.0, 2.0];
@@ -407,23 +407,23 @@ defineSuite([
expect(d._gl.getUniform(sp._getProgram(), sp.getAllUniforms().u_mat4._getLocations()[1])).toEqualArray((new Matrix4(9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0)).values);
});
- it("has predefined constants", function() {
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
+ it('has predefined constants', function() {
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
var fs =
- "void main() { " +
- " float f = ((agi_pi > 0.0) && \n" +
- " (agi_oneOverPi > 0.0) && \n" +
- " (agi_piOverTwo > 0.0) && \n" +
- " (agi_piOverThree > 0.0) && \n" +
- " (agi_piOverFour > 0.0) && \n" +
- " (agi_piOverSix > 0.0) && \n" +
- " (agi_threePiOver2 > 0.0) && \n" +
- " (agi_twoPi > 0.0) && \n" +
- " (agi_oneOverTwoPi > 0.0) && \n" +
- " (agi_radiansPerDegree > 0.0) && \n" +
- " (agi_degreesPerRadian > 0.0)) ? 1.0 : 0.0; \n" +
- " gl_FragColor = vec4(f); \n" +
- "}";
+ 'void main() { ' +
+ ' float f = ((agi_pi > 0.0) && \n' +
+ ' (agi_oneOverPi > 0.0) && \n' +
+ ' (agi_piOverTwo > 0.0) && \n' +
+ ' (agi_piOverThree > 0.0) && \n' +
+ ' (agi_piOverFour > 0.0) && \n' +
+ ' (agi_piOverSix > 0.0) && \n' +
+ ' (agi_threePiOver2 > 0.0) && \n' +
+ ' (agi_twoPi > 0.0) && \n' +
+ ' (agi_oneOverTwoPi > 0.0) && \n' +
+ ' (agi_radiansPerDegree > 0.0) && \n' +
+ ' (agi_degreesPerRadian > 0.0)) ? 1.0 : 0.0; \n' +
+ ' gl_FragColor = vec4(f); \n' +
+ '}';
sp = context.createShaderProgram(vs, fs);
va = context.createVertexArray();
@@ -444,31 +444,31 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 255, 255, 255]);
});
- it("compiles with #version at the top", function() {
+ it('compiles with #version at the top', function() {
var vs =
- "#version 100 \n" +
- "attribute vec4 position; void main() { gl_Position = position; }";
+ '#version 100 \n' +
+ 'attribute vec4 position; void main() { gl_Position = position; }';
var fs =
- "#version 100 \n" +
- "void main() { gl_FragColor = vec4(1.0); }";
+ '#version 100 \n' +
+ 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
});
- it("compiles with #version after whitespace and comments", function() {
+ it('compiles with #version after whitespace and comments', function() {
var vs =
- "// comment before version directive. \n" +
- "#version 100 \n" +
- "attribute vec4 position; void main() { gl_Position = position; }";
+ '// comment before version directive. \n' +
+ '#version 100 \n' +
+ 'attribute vec4 position; void main() { gl_Position = position; }';
var fs =
- "\n" +
- "#version 100 \n" +
- "void main() { gl_FragColor = vec4(1.0); }";
+ '\n' +
+ '#version 100 \n' +
+ 'void main() { gl_FragColor = vec4(1.0); }';
sp = context.createShaderProgram(vs, fs);
});
- it("destroys", function() {
- var vs = "attribute vec4 position; void main() { gl_Position = position; }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('destroys', function() {
+ var vs = 'attribute vec4 position; void main() { gl_Position = position; }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
var s = context.createShaderProgram(vs, fs);
expect(s.isDestroyed()).toEqual(false);
@@ -476,36 +476,36 @@ defineSuite([
expect(s.isDestroyed()).toEqual(true);
});
- it("fails vertex shader compile", function() {
- var vs = "doesn't compile.";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('fails vertex shader compile', function() {
+ var vs = 'does not compile.';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
expect(function() {
sp = context.createShaderProgram(vs, fs);
}).toThrow();
});
- it("fails fragment shader compile", function() {
- var vs = "void main() { gl_Position = vec4(0.0); }";
- var fs = "doesn't compile.";
+ it('fails fragment shader compile', function() {
+ var vs = 'void main() { gl_Position = vec4(0.0); }';
+ var fs = 'does not compile.';
expect(function() {
sp = context.createShaderProgram(vs, fs);
}).toThrow();
});
- it("fails to link", function() {
- var vs = "void nomain() { }";
- var fs = "void nomain() { }";
+ it('fails to link', function() {
+ var vs = 'void nomain() { }';
+ var fs = 'void nomain() { }';
expect(function() {
sp = context.createShaderProgram(vs, fs);
}).toThrow();
});
- it("fails to destroy", function() {
- var vs = "void main() { gl_Position = vec4(1.0); }";
- var fs = "void main() { gl_FragColor = vec4(1.0); }";
+ it('fails to destroy', function() {
+ var vs = 'void main() { gl_Position = vec4(1.0); }';
+ var fs = 'void main() { gl_FragColor = vec4(1.0); }';
var s = context.createShaderProgram(vs, fs);
s.destroy();
diff --git a/Specs/Renderer/TextureAtlasSpec.js b/Specs/Renderer/TextureAtlasSpec.js
index dae8c07650b..c9182d37db3 100644
--- a/Specs/Renderer/TextureAtlasSpec.js
+++ b/Specs/Renderer/TextureAtlasSpec.js
@@ -31,30 +31,30 @@ defineSuite([
destroyContext(context);
});
- it("initialize suite", function() {
+ it('initialize suite', function() {
greenImage = new Image();
- greenImage.src = "./Data/Images/Green.png";
+ greenImage.src = './Data/Images/Green.png';
tallGreenImage = new Image();
- tallGreenImage.src = "./Data/Images/Green1x4.png";
+ tallGreenImage.src = './Data/Images/Green1x4.png';
blueImage = new Image();
- blueImage.src = "./Data/Images/Blue.png";
+ blueImage.src = './Data/Images/Blue.png';
waitsFor(function() {
return greenImage.complete && tallGreenImage.complete && blueImage.complete;
- }, "Load .png file(s) for texture atlas test.", 3000);
+ }, 'Load .png file(s) for texture atlas test.', 3000);
});
var draw = function(texture, textureCoordinate, expectedColorArray) {
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
var fs =
- "uniform sampler2D u_texture;" +
- "void main() { " +
- " gl_FragColor = texture2D(u_texture, vec2(" +
- textureCoordinate.x.toString() + ", " + textureCoordinate.y.toString() +
- " )); " +
- "}";
+ 'uniform sampler2D u_texture;' +
+ 'void main() { ' +
+ ' gl_FragColor = texture2D(u_texture, vec2(' +
+ textureCoordinate.x.toString() + ', ' + textureCoordinate.y.toString() +
+ ' )); ' +
+ '}';
var sp = context.createShaderProgram(vs, fs, {
position : 0
});
@@ -82,7 +82,7 @@ defineSuite([
return context.readPixels();
};
- it("creates a single image atlas", function() {
+ it('creates a single image atlas', function() {
atlas = context.createTextureAtlas([greenImage], PixelFormat.RGBA, 0);
var texture = atlas.getTexture();
var coordinates = atlas.getTextureCoordinates();
@@ -100,7 +100,7 @@ defineSuite([
expect(coordinates[0].y1).toEqual(1);
});
- it("renders a single image atlas", function() {
+ it('renders a single image atlas', function() {
atlas = context.createTextureAtlas([greenImage], PixelFormat.RGBA, 0);
expect(draw.apply(this, [atlas.getTexture(), {
@@ -109,7 +109,7 @@ defineSuite([
}])).toEqualArray([0, 255, 0, 255]);
});
- it("creates a two image atlas", function() {
+ it('creates a two image atlas', function() {
atlas = context.createTextureAtlas([greenImage, blueImage], PixelFormat.RGBA, 0);
var texture = atlas.getTexture();
var coordinates = atlas.getTextureCoordinates();
@@ -129,7 +129,7 @@ defineSuite([
expect(coordinates[1].y1).toEqual(1.0);
});
- it("renders a two image atlas", function() {
+ it('renders a two image atlas', function() {
atlas = context.createTextureAtlas([greenImage, blueImage], PixelFormat.RGBA, 0);
var texture = atlas.getTexture();
@@ -147,7 +147,7 @@ defineSuite([
}])).toEqualArray([0, 0, 255, 255]);
});
- it("renders a four image atlas", function() {
+ it('renders a four image atlas', function() {
atlas = context.createTextureAtlas([greenImage, blueImage, blueImage, greenImage], PixelFormat.RGBA, 0);
expect(atlas.getTextureCoordinates().length).toEqual(4);
@@ -178,7 +178,7 @@ defineSuite([
}])).toEqualArray([0, 255, 0, 255]);
});
- it("creates an atlas with different image heights", function() {
+ it('creates an atlas with different image heights', function() {
atlas = context.createTextureAtlas([blueImage, tallGreenImage], PixelFormat.RGBA, 0);
var texture = atlas.getTexture();
var coordinates = atlas.getTextureCoordinates();
@@ -191,7 +191,7 @@ defineSuite([
expect(coordinates[1].y0).toEqual(coordinates[1].y0);
});
- it("renders an atlas with different image heights", function() {
+ it('renders an atlas with different image heights', function() {
atlas = context.createTextureAtlas([blueImage, tallGreenImage], PixelFormat.RGBA, 0);
var texture = atlas.getTexture();
@@ -213,19 +213,19 @@ defineSuite([
expect(pixels[3]).toEqual(255);
});
- it("throws without images", function() {
+ it('throws without images', function() {
expect(function() {
atlas = context.createTextureAtlas();
}).toThrow();
});
- it("throws with a negative borderWidthInPixels", function() {
+ it('throws with a negative borderWidthInPixels', function() {
expect(function() {
atlas = context.createTextureAtlas([greenImage, blueImage], PixelFormat.RGBA, -1);
}).toThrow();
});
- it("throws without context", function() {
+ it('throws without context', function() {
expect(function() {
return new TextureAtlas();
}).toThrow();
diff --git a/Specs/Renderer/TextureSpec.js b/Specs/Renderer/TextureSpec.js
index 4bad2536d26..bbef5d8ffe3 100644
--- a/Specs/Renderer/TextureSpec.js
+++ b/Specs/Renderer/TextureSpec.js
@@ -10,7 +10,7 @@ defineSuite([
'Renderer/TextureWrap',
'Renderer/TextureMinificationFilter',
'Renderer/TextureMagnificationFilter'
- ], "Renderer/Texture", function(
+ ], 'Renderer/Texture', function(
createContext,
destroyContext,
Cartesian2,
@@ -55,10 +55,10 @@ defineSuite([
});
function renderFragment(context) {
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
var fs =
- "uniform sampler2D u_texture;" +
- "void main() { gl_FragColor = texture2D(u_texture, vec2(0.0)); }";
+ 'uniform sampler2D u_texture;' +
+ 'void main() { gl_FragColor = texture2D(u_texture, vec2(0.0)); }';
sp = context.createShaderProgram(vs, fs, {
position : 0
});
@@ -79,25 +79,25 @@ defineSuite([
return context.readPixels();
}
- it("initializem suite", function() {
+ it('initializem suite', function() {
greenImage = new Image();
- greenImage.src = "./Data/Images/Green.png";
+ greenImage.src = './Data/Images/Green.png';
blueImage = new Image();
- blueImage.src = "./Data/Images/Blue.png";
+ blueImage.src = './Data/Images/Blue.png';
blueAlphaImage = new Image();
- blueAlphaImage.src = "./Data/Images/BlueAlpha.png";
+ blueAlphaImage.src = './Data/Images/BlueAlpha.png';
blueOverRedImage = new Image();
- blueOverRedImage.src = "./Data/Images/BlueOverRed.png";
+ blueOverRedImage.src = './Data/Images/BlueOverRed.png';
waitsFor(function() {
return greenImage.complete && blueImage.complete && blueAlphaImage.complete && blueOverRedImage.complete;
- }, "Load .png file(s) for texture test.", 3000);
+ }, 'Load .png file(s) for texture test.', 3000);
});
- it("creates with defaults", function() {
+ it('creates with defaults', function() {
texture = context.createTexture2D({
source : blueImage
});
@@ -106,7 +106,7 @@ defineSuite([
expect(texture.getPixelDatatype()).toEqual(PixelDatatype.UNSIGNED_BYTE);
});
- it("creates from the framebuffer", function() {
+ it('creates from the framebuffer', function() {
context.clear(context.createClearState({
color : {
red : 1.0,
@@ -134,7 +134,7 @@ defineSuite([
expect(renderFragment(context)).toEqualArray([255, 0, 0, 255]);
});
- it("copies from the framebuffer", function() {
+ it('copies from the framebuffer', function() {
texture = context.createTexture2D({
source : blueImage,
pixelFormat : PixelFormat.RGB
@@ -171,7 +171,7 @@ defineSuite([
expect(renderFragment(context)).toEqualArray([255, 0, 0, 255]);
});
- it("draws a textured blue point", function() {
+ it('draws a textured blue point', function() {
texture = context.createTexture2D({
source : blueImage,
pixelFormat :PixelFormat.RGBA
@@ -180,7 +180,7 @@ defineSuite([
expect(renderFragment(context)).toEqualArray([0, 0, 255, 255]);
});
- it("renders with premultiplied alpha", function() {
+ it('renders with premultiplied alpha', function() {
texture = context.createTexture2D({
source : blueAlphaImage,
pixelFormat :PixelFormat.RGBA,
@@ -191,17 +191,17 @@ defineSuite([
expect(renderFragment(context)).toEqualArray([0, 0, 127, 127]);
});
- it("draws textured blue and red points", function() {
+ it('draws textured blue and red points', function() {
texture = context.createTexture2D({
source : blueOverRedImage,
pixelFormat :PixelFormat.RGBA
});
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
var fs =
- "uniform sampler2D u_texture;" +
- "uniform mediump vec2 u_txCoords;" +
- "void main() { gl_FragColor = texture2D(u_texture, u_txCoords); }";
+ 'uniform sampler2D u_texture;' +
+ 'uniform mediump vec2 u_txCoords;' +
+ 'void main() { gl_FragColor = texture2D(u_texture, u_txCoords); }';
sp = context.createShaderProgram(vs, fs, {
position : 0
});
@@ -230,7 +230,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 0, 0, 255]);
});
- it("creates from a typed array", function() {
+ it('creates from a typed array', function() {
var bytes = new Uint8Array([0, 255, 0, 255]);
texture = context.createTexture2D({
@@ -246,7 +246,7 @@ defineSuite([
expect(renderFragment(context)).toEqualArray([0, 255, 0, 255]);
});
- it("copies from a typed array", function() {
+ it('copies from a typed array', function() {
texture = context.createTexture2D({
width : 1,
height : 1,
@@ -264,17 +264,17 @@ defineSuite([
expect(renderFragment(context)).toEqualArray([255, 0, 255, 0]);
});
- it("copies over a subset of a texture", function() {
+ it('copies over a subset of a texture', function() {
texture = context.createTexture2D({
source : blueOverRedImage,
pixelFormat :PixelFormat.RGBA
});
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
var fs =
- "uniform sampler2D u_texture;" +
- "uniform mediump vec2 u_txCoords;" +
- "void main() { gl_FragColor = texture2D(u_texture, u_txCoords); }";
+ 'uniform sampler2D u_texture;' +
+ 'uniform mediump vec2 u_txCoords;' +
+ 'void main() { gl_FragColor = texture2D(u_texture, u_txCoords); }';
sp = context.createShaderProgram(vs, fs, {
position : 0
});
@@ -317,7 +317,7 @@ defineSuite([
});
// Fails on firefox. Should be fixed soon: https://bugzilla.mozilla.org/show_bug.cgi?id=685156
- xit("generates mipmaps", function() {
+ xit('generates mipmaps', function() {
texture = context.createTexture2D({
source : blueImage,
pixelFormat :PixelFormat.RGBA
@@ -331,7 +331,7 @@ defineSuite([
expect(renderFragment(context)).toEqualArray([0, 0, 255, 255]);
});
- it("gets the default sampler", function() {
+ it('gets the default sampler', function() {
texture = context.createTexture2D({
source : blueImage,
pixelFormat :PixelFormat.RGBA
@@ -345,7 +345,7 @@ defineSuite([
expect(sampler.maximumAnisotropy).toEqual(1.0);
});
- it("sets a sampler", function() {
+ it('sets a sampler', function() {
texture = context.createTexture2D({
source : blueImage,
pixelFormat :PixelFormat.RGBA
@@ -368,7 +368,7 @@ defineSuite([
expect(s.maximumAnisotropy).toEqual(2.0);
});
- it("gets width and height", function() {
+ it('gets width and height', function() {
texture = context.createTexture2D({
source : blueOverRedImage,
pixelFormat :PixelFormat.RGBA
@@ -378,7 +378,7 @@ defineSuite([
expect(texture.getHeight()).toEqual(2);
});
- it("destroys", function() {
+ it('destroys', function() {
var t = context.createTexture2D({
source : blueImage,
pixelFormat :PixelFormat.RGBA
@@ -389,19 +389,19 @@ defineSuite([
expect(t.isDestroyed()).toEqual(true);
});
- it("fails to create (description)", function() {
+ it('fails to create (description)', function() {
expect(function() {
texture = context.createTexture2D();
}).toThrow();
});
- it("fails to create (source)", function() {
+ it('fails to create (source)', function() {
expect(function() {
texture = context.createTexture2D({});
}).toThrow();
});
- it("fails to create (width, no height)", function() {
+ it('fails to create (width, no height)', function() {
expect(function() {
texture = context.createTexture2D({
width : 16
@@ -409,7 +409,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (small width)", function() {
+ it('fails to create (small width)', function() {
expect(function() {
texture = context.createTexture2D({
width : 0,
@@ -418,7 +418,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (large width)", function() {
+ it('fails to create (large width)', function() {
expect(function() {
texture = context.createTexture2D({
width : context.getMaximumTextureSize() + 1,
@@ -427,7 +427,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (small height)", function() {
+ it('fails to create (small height)', function() {
expect(function() {
texture = context.createTexture2D({
width : 16,
@@ -436,7 +436,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (large height)", function() {
+ it('fails to create (large height)', function() {
expect(function() {
texture = context.createTexture2D({
width : 16,
@@ -445,56 +445,56 @@ defineSuite([
}).toThrow();
});
- it("fails to create (PixelFormat)", function() {
+ it('fails to create (PixelFormat)', function() {
expect(function() {
texture = context.createTexture2D({
source : blueImage,
- pixelFormat :"invalid PixelFormat"
+ pixelFormat :'invalid PixelFormat'
});
}).toThrow();
});
- it("fails to create (pixelDatatype)", function() {
+ it('fails to create (pixelDatatype)', function() {
expect(function() {
texture = context.createTexture2D({
source : blueImage,
pixelFormat :PixelFormat.RGBA,
- pixelDatatype : "invalid pixelDatatype"
+ pixelDatatype : 'invalid pixelDatatype'
});
}).toThrow();
});
- it("fails to create from the framebuffer (PixelFormat)", function() {
+ it('fails to create from the framebuffer (PixelFormat)', function() {
expect(function() {
- texture = context.createTexture2DFromFramebuffer("invalid PixelFormat");
+ texture = context.createTexture2DFromFramebuffer('invalid PixelFormat');
}).toThrow();
});
- it("fails to create from the framebuffer (framebufferXOffset)", function() {
+ it('fails to create from the framebuffer (framebufferXOffset)', function() {
expect(function() {
texture = context.createTexture2DFromFramebuffer(PixelFormat.RGB, -1);
}).toThrow();
});
- it("fails to create from the framebuffer (framebufferYOffset)", function() {
+ it('fails to create from the framebuffer (framebufferYOffset)', function() {
expect(function() {
texture = context.createTexture2DFromFramebuffer(PixelFormat.RGB, 0, -1);
}).toThrow();
});
- it("fails to create from the framebuffer (width)", function() {
+ it('fails to create from the framebuffer (width)', function() {
expect(function() {
texture = context.createTexture2DFromFramebuffer(PixelFormat.RGB, 0, 0, context.getCanvas().clientWidth + 1);
}).toThrow();
});
- it("fails to create from the framebuffer (height)", function() {
+ it('fails to create from the framebuffer (height)', function() {
expect(function() {
texture = context.createTexture2DFromFramebuffer(PixelFormat.RGB, 0, 0, 1, context.getCanvas().clientHeight + 1);
}).toThrow();
});
- it("fails to copy from the frame buffer (xOffset)", function() {
+ it('fails to copy from the frame buffer (xOffset)', function() {
texture = context.createTexture2D({
source : blueImage
});
@@ -504,7 +504,7 @@ defineSuite([
}).toThrow();
});
- it("fails to copy from the frame buffer (yOffset)", function() {
+ it('fails to copy from the frame buffer (yOffset)', function() {
texture = context.createTexture2D({
source : blueImage
});
@@ -514,7 +514,7 @@ defineSuite([
}).toThrow();
});
- it("fails to copy from the frame buffer (framebufferXOffset)", function() {
+ it('fails to copy from the frame buffer (framebufferXOffset)', function() {
texture = context.createTexture2D({
source : blueImage
});
@@ -524,7 +524,7 @@ defineSuite([
}).toThrow();
});
- it("fails to copy from the frame buffer (framebufferYOffset)", function() {
+ it('fails to copy from the frame buffer (framebufferYOffset)', function() {
texture = context.createTexture2D({
source : blueImage
});
@@ -534,7 +534,7 @@ defineSuite([
}).toThrow();
});
- it("fails to copy from the frame buffer (width)", function() {
+ it('fails to copy from the frame buffer (width)', function() {
texture = context.createTexture2D({
source : blueImage
});
@@ -544,7 +544,7 @@ defineSuite([
}).toThrow();
});
- it("fails to copy from the frame buffer (height)", function() {
+ it('fails to copy from the frame buffer (height)', function() {
texture = context.createTexture2D({
source : blueImage
});
@@ -554,39 +554,39 @@ defineSuite([
}).toThrow();
});
- it("fails to set sampler (wrapS)", function() {
+ it('fails to set sampler (wrapS)', function() {
expect(function() {
context.createSampler({
- wrapS : "invalid wrap"
+ wrapS : 'invalid wrap'
});
}).toThrow();
});
- it("fails to set sampler (wrapT)", function() {
+ it('fails to set sampler (wrapT)', function() {
expect(function() {
context.createSampler({
- wrapT : "invalid wrap"
+ wrapT : 'invalid wrap'
});
}).toThrow();
});
- it("fails to set sampler (minificationFilter)", function() {
+ it('fails to set sampler (minificationFilter)', function() {
expect(function() {
context.createSampler({
- minificationFilter : "invalid filter"
+ minificationFilter : 'invalid filter'
});
}).toThrow();
});
- it("fails to set sampler (magnificationFilter)", function() {
+ it('fails to set sampler (magnificationFilter)', function() {
expect(function() {
context.createSampler({
- magnificationFilter : "invalid filter"
+ magnificationFilter : 'invalid filter'
});
}).toThrow();
});
- it("fails to set sampler (maximumAnisotropy)", function() {
+ it('fails to set sampler (maximumAnisotropy)', function() {
expect(function() {
context.createSampler({
maximumAnisotropy : 0.0
@@ -594,7 +594,7 @@ defineSuite([
}).toThrow();
});
- it("fails to copy from an image (source)", function() {
+ it('fails to copy from an image (source)', function() {
texture = context.createTexture2D({
source : blueImage
});
@@ -604,7 +604,7 @@ defineSuite([
}).toThrow();
});
- it("fails to copy from an image (xOffset)", function() {
+ it('fails to copy from an image (xOffset)', function() {
texture = context.createTexture2D({
source : blueImage
});
@@ -615,7 +615,7 @@ defineSuite([
}).toThrow();
});
- it("fails to copy from an image (yOffset)", function() {
+ it('fails to copy from an image (yOffset)', function() {
texture = context.createTexture2D({
source : blueImage
});
@@ -626,7 +626,7 @@ defineSuite([
}).toThrow();
});
- it("fails to copy from an image (width)", function() {
+ it('fails to copy from an image (width)', function() {
texture = context.createTexture2D({
source : blueImage
});
@@ -638,7 +638,7 @@ defineSuite([
}).toThrow();
});
- it("fails to copy from an image (height)", function() {
+ it('fails to copy from an image (height)', function() {
texture = context.createTexture2D({
source : blueImage
});
@@ -650,7 +650,7 @@ defineSuite([
}).toThrow();
});
- it("fails to generate mipmaps (width)", function() {
+ it('fails to generate mipmaps (width)', function() {
texture = context.createTexture2D({
width : 3,
height : 2
@@ -661,7 +661,7 @@ defineSuite([
}).toThrow();
});
- it("fails to generate mipmaps (height)", function() {
+ it('fails to generate mipmaps (height)', function() {
texture = context.createTexture2D({
width : 2,
height : 3
@@ -672,17 +672,17 @@ defineSuite([
}).toThrow();
});
- it("fails to generate mipmaps (hint)", function() {
+ it('fails to generate mipmaps (hint)', function() {
texture = context.createTexture2D({
source : blueImage
});
expect(function() {
- texture.generateMipmap("invalid hint");
+ texture.generateMipmap('invalid hint');
}).toThrow();
});
- it("fails to destroy", function() {
+ it('fails to destroy', function() {
var t = context.createTexture2D({
source : blueImage,
pixelFormat :PixelFormat.RGBA
diff --git a/Specs/Renderer/UniformDatatypeSpec.js b/Specs/Renderer/UniformDatatypeSpec.js
index 33a55e40154..96f8cae78bb 100644
--- a/Specs/Renderer/UniformDatatypeSpec.js
+++ b/Specs/Renderer/UniformDatatypeSpec.js
@@ -6,75 +6,75 @@ defineSuite([
"use strict";
/*global it, expect*/
- it("FLOAT", function() {
- expect(UniformDatatype.FLOAT.getGLSL()).toEqual("float");
+ it('FLOAT', function() {
+ expect(UniformDatatype.FLOAT.getGLSL()).toEqual('float');
});
- it("FLOAT_VECTOR2", function() {
- expect(UniformDatatype.FLOAT_VECTOR2.getGLSL()).toEqual("vec2");
+ it('FLOAT_VECTOR2', function() {
+ expect(UniformDatatype.FLOAT_VECTOR2.getGLSL()).toEqual('vec2');
});
- it("FLOAT_VECTOR3", function() {
- expect(UniformDatatype.FLOAT_VECTOR3.getGLSL()).toEqual("vec3");
+ it('FLOAT_VECTOR3', function() {
+ expect(UniformDatatype.FLOAT_VECTOR3.getGLSL()).toEqual('vec3');
});
- it("FLOAT_VECTOR4", function() {
- expect(UniformDatatype.FLOAT_VECTOR4.getGLSL()).toEqual("vec4");
+ it('FLOAT_VECTOR4', function() {
+ expect(UniformDatatype.FLOAT_VECTOR4.getGLSL()).toEqual('vec4');
});
- it("INT", function() {
- expect(UniformDatatype.INT.getGLSL()).toEqual("int");
+ it('INT', function() {
+ expect(UniformDatatype.INT.getGLSL()).toEqual('int');
});
- it("INT_VECTOR2", function() {
- expect(UniformDatatype.INT_VECTOR2.getGLSL()).toEqual("ivec2");
+ it('INT_VECTOR2', function() {
+ expect(UniformDatatype.INT_VECTOR2.getGLSL()).toEqual('ivec2');
});
- it("INT_VECTOR3", function() {
- expect(UniformDatatype.INT_VECTOR3.getGLSL()).toEqual("ivec3");
+ it('INT_VECTOR3', function() {
+ expect(UniformDatatype.INT_VECTOR3.getGLSL()).toEqual('ivec3');
});
- it("INT_VECTOR4", function() {
- expect(UniformDatatype.INT_VECTOR4.getGLSL()).toEqual("ivec4");
+ it('INT_VECTOR4', function() {
+ expect(UniformDatatype.INT_VECTOR4.getGLSL()).toEqual('ivec4');
});
- it("BOOL", function() {
- expect(UniformDatatype.BOOL.getGLSL()).toEqual("bool");
+ it('BOOL', function() {
+ expect(UniformDatatype.BOOL.getGLSL()).toEqual('bool');
});
- it("BOOL_VECTOR2", function() {
- expect(UniformDatatype.BOOL_VECTOR2.getGLSL()).toEqual("bvec2");
+ it('BOOL_VECTOR2', function() {
+ expect(UniformDatatype.BOOL_VECTOR2.getGLSL()).toEqual('bvec2');
});
- it("BOOL_VECTOR3", function() {
- expect(UniformDatatype.BOOL_VECTOR3.getGLSL()).toEqual("bvec3");
+ it('BOOL_VECTOR3', function() {
+ expect(UniformDatatype.BOOL_VECTOR3.getGLSL()).toEqual('bvec3');
});
- it("BOOL_VECTOR4", function() {
- expect(UniformDatatype.BOOL_VECTOR4.getGLSL()).toEqual("bvec4");
+ it('BOOL_VECTOR4', function() {
+ expect(UniformDatatype.BOOL_VECTOR4.getGLSL()).toEqual('bvec4');
});
- it("FLOAT_MATRIX2", function() {
- expect(UniformDatatype.FLOAT_MATRIX2.getGLSL()).toEqual("mat2");
+ it('FLOAT_MATRIX2', function() {
+ expect(UniformDatatype.FLOAT_MATRIX2.getGLSL()).toEqual('mat2');
});
- it("FLOAT_MATRIX2", function() {
- expect(UniformDatatype.FLOAT_MATRIX2.getGLSL()).toEqual("mat2");
+ it('FLOAT_MATRIX2', function() {
+ expect(UniformDatatype.FLOAT_MATRIX2.getGLSL()).toEqual('mat2');
});
- it("FLOAT_MATRIX3", function() {
- expect(UniformDatatype.FLOAT_MATRIX3.getGLSL()).toEqual("mat3");
+ it('FLOAT_MATRIX3', function() {
+ expect(UniformDatatype.FLOAT_MATRIX3.getGLSL()).toEqual('mat3');
});
- it("FLOAT_MATRIX4", function() {
- expect(UniformDatatype.FLOAT_MATRIX4.getGLSL()).toEqual("mat4");
+ it('FLOAT_MATRIX4', function() {
+ expect(UniformDatatype.FLOAT_MATRIX4.getGLSL()).toEqual('mat4');
});
- it("SAMPLER_2D", function() {
- expect(UniformDatatype.SAMPLER_2D.getGLSL()).toEqual("sampler2D");
+ it('SAMPLER_2D', function() {
+ expect(UniformDatatype.SAMPLER_2D.getGLSL()).toEqual('sampler2D');
});
- it("SAMPLER_CUBE", function() {
- expect(UniformDatatype.SAMPLER_CUBE.getGLSL()).toEqual("samplerCube");
+ it('SAMPLER_CUBE', function() {
+ expect(UniformDatatype.SAMPLER_CUBE.getGLSL()).toEqual('samplerCube');
});
});
\ No newline at end of file
diff --git a/Specs/Renderer/VertexArrayFacadeSpec.js b/Specs/Renderer/VertexArrayFacadeSpec.js
index 3b98dd51c44..d1ad7d8e3e2 100644
--- a/Specs/Renderer/VertexArrayFacadeSpec.js
+++ b/Specs/Renderer/VertexArrayFacadeSpec.js
@@ -24,7 +24,7 @@ defineSuite([
destroyContext(context);
});
- it("creates a vertex array with static floats", function() {
+ it('creates a vertex array with static floats', function() {
var positionIndex = 0;
var vaf = new VertexArrayFacade(context, [{
index : positionIndex,
@@ -48,7 +48,7 @@ defineSuite([
expect(vaf.va[0].va.getAttribute(0).strideInBytes).toEqual(3 * 4);
});
- it("resizes a vertex array with static floats", function() {
+ it('resizes a vertex array with static floats', function() {
var positionIndex = 0;
var vaf = new VertexArrayFacade(context, [{
index : positionIndex,
@@ -75,7 +75,7 @@ defineSuite([
expect(vaf.va[0].va.getAttribute(0).strideInBytes).toEqual(3 * 4);
});
- it("creates a vertex array with static floats and unsigned bytes", function() {
+ it('creates a vertex array with static floats and unsigned bytes', function() {
var positionIndex = 0;
var colorIndex = 2;
var vaf = new VertexArrayFacade(context, [{
@@ -117,7 +117,7 @@ defineSuite([
expect(vaf.va[0].va.getAttribute(1).strideInBytes).toEqual(vaf.va[0].va.getAttribute(0).strideInBytes);
});
- it("creates a vertex array with static and dynamic attributes", function() {
+ it('creates a vertex array with static and dynamic attributes', function() {
var positionIndex = 0;
var txCoordIndex = 2;
var vaf = new VertexArrayFacade(context, [{
@@ -162,7 +162,7 @@ defineSuite([
expect(vaf.va[0].va.getAttribute(1).strideInBytes).toEqual(2 * 2);
});
- it("sub-commits", function() {
+ it('sub-commits', function() {
var positionIndex = 0;
var temperatureIndex = 2;
var vaf = new VertexArrayFacade(context, [{
@@ -220,49 +220,49 @@ defineSuite([
expect(vaf.va[0].va.getAttribute(1).strideInBytes).toEqual(1 * 4);
});
- it("throws when constructed without a context", function() {
+ it('throws when constructed without a context', function() {
expect(function() {
return new VertexArrayFacade(undefined, undefined, undefined);
}).toThrow();
});
- it("throws when constructed undefined attributes", function() {
+ it('throws when constructed undefined attributes', function() {
expect(function() {
return new VertexArrayFacade(context, undefined, undefined);
}).toThrow();
});
- it("throws when constructed without attributes", function() {
+ it('throws when constructed without attributes', function() {
expect(function() {
return new VertexArrayFacade(context, []);
}).toThrow();
});
- it("throws when constructed with attributes without componentsPerAttribute", function() {
+ it('throws when constructed with attributes without componentsPerAttribute', function() {
expect(function() {
return new VertexArrayFacade(context, [{}]);
}).toThrow();
});
- it("throws when constructed with attributes with an invalid componentDatatype", function() {
+ it('throws when constructed with attributes with an invalid componentDatatype', function() {
expect(function() {
return new VertexArrayFacade(context, [{
componentsPerAttribute : 1,
- componentDatatype : "invalid component datatype"
+ componentDatatype : 'invalid component datatype'
}]);
}).toThrow();
});
- it("throws when constructed with attributes with an invalid usage", function() {
+ it('throws when constructed with attributes with an invalid usage', function() {
expect(function() {
return new VertexArrayFacade(context, [{
componentsPerAttribute : 1,
- usage : "invalid component usage"
+ usage : 'invalid component usage'
}]);
}).toThrow();
});
- it("throws when constructed with attributes with duplicate indices", function() {
+ it('throws when constructed with attributes with duplicate indices', function() {
expect(function() {
return new VertexArrayFacade(context, [{
index : 0,
diff --git a/Specs/Renderer/VertexArrayFactorySpec.js b/Specs/Renderer/VertexArrayFactorySpec.js
index 79e311779f2..20ed00f3536 100644
--- a/Specs/Renderer/VertexArrayFactorySpec.js
+++ b/Specs/Renderer/VertexArrayFactorySpec.js
@@ -8,7 +8,7 @@ defineSuite([
'Core/IndexDatatype',
'Renderer/BufferUsage',
'Renderer/VertexLayout'
- ], "Renderer/VertexArrayFactory", function(
+ ], 'Renderer/VertexArrayFactory', function(
createContext,
destroyContext,
ComponentDatatype,
@@ -40,13 +40,13 @@ defineSuite([
destroyContext(context);
});
- it("creates with no arguments", function() {
+ it('creates with no arguments', function() {
va = context.createVertexArrayFromMesh();
expect(va.getNumberOfAttributes()).toEqual(0);
expect(va.getIndexBuffer()).not.toBeDefined();
});
- it("creates with no mesh", function() {
+ it('creates with no mesh', function() {
va = context.createVertexArrayFromMesh({
vertexLayout : VertexLayout.INTERLEAVED
});
@@ -54,7 +54,7 @@ defineSuite([
expect(va.getIndexBuffer()).not.toBeDefined();
});
- it("creates a single-attribute vertex (non-interleaved)", function() {
+ it('creates a single-attribute vertex (non-interleaved)', function() {
var mesh = {
attributes : {
position : {
@@ -83,7 +83,7 @@ defineSuite([
expect(va.getAttribute(0).vertexBuffer.getUsage()).toEqual(BufferUsage.DYNAMIC_DRAW); // Default
});
- it("creates a single-attribute vertex (interleaved)", function() {
+ it('creates a single-attribute vertex (interleaved)', function() {
var mesh = {
attributes : {
position : {
@@ -114,7 +114,7 @@ defineSuite([
expect(va.getAttribute(0).vertexBuffer.getUsage()).toEqual(BufferUsage.STATIC_DRAW);
});
- it("creates a homogeneous multiple-attribute vertex (non-interleaved)", function() {
+ it('creates a homogeneous multiple-attribute vertex (non-interleaved)', function() {
var mesh = {
attributes : {
position : {
@@ -155,7 +155,7 @@ defineSuite([
expect(va.getAttribute(0).vertexBuffer).not.toBe(va.getAttribute(1).vertexBuffer);
});
- it("creates a homogeneous multiple-attribute vertex (interleaved)", function() {
+ it('creates a homogeneous multiple-attribute vertex (interleaved)', function() {
var mesh = {
attributes : {
position : {
@@ -199,7 +199,7 @@ defineSuite([
expect(va.getAttribute(0).vertexBuffer).toBe(va.getAttribute(1).vertexBuffer);
});
- it("creates a heterogeneous multiple-attribute vertex (interleaved)", function() {
+ it('creates a heterogeneous multiple-attribute vertex (interleaved)', function() {
var mesh = {
attributes : {
position : {
@@ -243,7 +243,7 @@ defineSuite([
expect(va.getAttribute(0).vertexBuffer).toBe(va.getAttribute(1).vertexBuffer);
});
- it("sorts interleaved attributes from large to small components", function() {
+ it('sorts interleaved attributes from large to small components', function() {
var mesh = {
attributes : {
bytes : {
@@ -280,20 +280,20 @@ defineSuite([
// Validate via rendering
var vs =
- "attribute float bytes; " +
- "attribute float shorts; " +
- "attribute float floats; " +
- "varying vec4 fsColor; " +
- "void main() { " +
- " gl_PointSize = 1.0; " +
- " gl_Position = vec4(0.0, 0.0, 0.0, 1.0); " +
- " fsColor = vec4((bytes == 0.0) && (shorts == 1.0) && (floats == 2.0)); " +
- "}";
+ 'attribute float bytes; ' +
+ 'attribute float shorts; ' +
+ 'attribute float floats; ' +
+ 'varying vec4 fsColor; ' +
+ 'void main() { ' +
+ ' gl_PointSize = 1.0; ' +
+ ' gl_Position = vec4(0.0, 0.0, 0.0, 1.0); ' +
+ ' fsColor = vec4((bytes == 0.0) && (shorts == 1.0) && (floats == 2.0)); ' +
+ '}';
var fs =
- "varying vec4 fsColor; " +
- "void main() { " +
- " gl_FragColor = fsColor; " +
- "}";
+ 'varying vec4 fsColor; ' +
+ 'void main() { ' +
+ ' gl_FragColor = fsColor; ' +
+ '}';
sp = context.createShaderProgram(vs, fs, attributeIndices);
context.clear();
@@ -307,7 +307,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 255, 255, 255]);
});
- it("sorts interleaved attributes from large to small components (2)", function() {
+ it('sorts interleaved attributes from large to small components (2)', function() {
// TODO: Color should be normalized
var mesh = {
attributes : {
@@ -335,19 +335,19 @@ defineSuite([
// Validate via rendering
var vs =
- "attribute vec3 position; " +
- "attribute vec4 color; " +
- "varying vec4 fsColor; " +
- "void main() { " +
- " gl_PointSize = 1.0; " +
- " gl_Position = vec4(position, 1.0); " +
- " fsColor = color; " +
- "}";
+ 'attribute vec3 position; ' +
+ 'attribute vec4 color; ' +
+ 'varying vec4 fsColor; ' +
+ 'void main() { ' +
+ ' gl_PointSize = 1.0; ' +
+ ' gl_Position = vec4(position, 1.0); ' +
+ ' fsColor = color; ' +
+ '}';
var fs =
- "varying vec4 fsColor; " +
- "void main() { " +
- " gl_FragColor = fsColor; " +
- "}";
+ 'varying vec4 fsColor; ' +
+ 'void main() { ' +
+ ' gl_FragColor = fsColor; ' +
+ '}';
sp = context.createShaderProgram(vs, fs, attributeIndices);
context.clear();
@@ -372,7 +372,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 255, 0, 255]);
});
- it("sorts interleaved attributes from large to small components (3)", function() {
+ it('sorts interleaved attributes from large to small components (3)', function() {
var mesh = {
attributes : {
unsignedByteAttribute : {
@@ -410,21 +410,21 @@ defineSuite([
// Validate via rendering
var vs =
- "attribute vec2 unsignedByteAttribute; " +
- "attribute float unsignedShortAttribute; " +
- "attribute float byteAttribute; " +
- "attribute float shortAttribute; " +
- "varying vec4 fsColor; " +
- "void main() { " +
- " gl_PointSize = 1.0; " +
- " gl_Position = vec4(0.0, 0.0, 0.0, 1.0); " +
- " fsColor = vec4((unsignedByteAttribute.x == 1.0) && (unsignedByteAttribute.y == 2.0) && (unsignedShortAttribute == 3.0) && (byteAttribute == 4.0) && (shortAttribute == 5.0)); " +
- "}";
+ 'attribute vec2 unsignedByteAttribute; ' +
+ 'attribute float unsignedShortAttribute; ' +
+ 'attribute float byteAttribute; ' +
+ 'attribute float shortAttribute; ' +
+ 'varying vec4 fsColor; ' +
+ 'void main() { ' +
+ ' gl_PointSize = 1.0; ' +
+ ' gl_Position = vec4(0.0, 0.0, 0.0, 1.0); ' +
+ ' fsColor = vec4((unsignedByteAttribute.x == 1.0) && (unsignedByteAttribute.y == 2.0) && (unsignedShortAttribute == 3.0) && (byteAttribute == 4.0) && (shortAttribute == 5.0)); ' +
+ '}';
var fs =
- "varying vec4 fsColor; " +
- "void main() { " +
- " gl_FragColor = fsColor; " +
- "}";
+ 'varying vec4 fsColor; ' +
+ 'void main() { ' +
+ ' gl_FragColor = fsColor; ' +
+ '}';
sp = context.createShaderProgram(vs, fs, attributeIndices);
context.clear();
@@ -438,7 +438,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 255, 255, 255]);
});
- it("creates a custom interleaved vertex", function() {
+ it('creates a custom interleaved vertex', function() {
// TODO: Color should be normalized
var mesh = {
@@ -477,26 +477,26 @@ defineSuite([
// Validate via rendering
var vs =
- "attribute vec3 position; " +
- "attribute vec3 color; " +
- "attribute vec3 normal; " +
- "attribute float temperature; " +
- "varying vec4 fsColor; " +
- "void main() { " +
- " gl_PointSize = 1.0; " +
- " gl_Position = vec4(position, 1.0); " +
- " if ((normal == vec3(1.0, 0.0, 0.0)) && (temperature == 75.0)) { " +
- " fsColor = vec4(color, 1.0); " +
- " } " +
- " else {" +
- " fsColor = vec4(1.0); " +
- " }" +
- "}";
+ 'attribute vec3 position; ' +
+ 'attribute vec3 color; ' +
+ 'attribute vec3 normal; ' +
+ 'attribute float temperature; ' +
+ 'varying vec4 fsColor; ' +
+ 'void main() { ' +
+ ' gl_PointSize = 1.0; ' +
+ ' gl_Position = vec4(position, 1.0); ' +
+ ' if ((normal == vec3(1.0, 0.0, 0.0)) && (temperature == 75.0)) { ' +
+ ' fsColor = vec4(color, 1.0); ' +
+ ' } ' +
+ ' else {' +
+ ' fsColor = vec4(1.0); ' +
+ ' }' +
+ '}';
var fs =
- "varying vec4 fsColor; " +
- "void main() { " +
- " gl_FragColor = fsColor; " +
- "}";
+ 'varying vec4 fsColor; ' +
+ 'void main() { ' +
+ ' gl_FragColor = fsColor; ' +
+ '}';
sp = context.createShaderProgram(vs, fs, attributeIndices);
context.clear();
@@ -512,21 +512,21 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 0, 0, 255]);
var vs2 =
- "attribute vec3 position; " +
- "attribute vec3 color; " +
- "attribute vec3 normal; " +
- "attribute float temperature; " +
- "varying vec4 fsColor; " +
- "void main() { " +
- " gl_PointSize = 1.0; " +
- " gl_Position = vec4(position, 1.0); " +
- " if ((normal == vec3(0.0, 1.0, 0.0)) && (temperature == 100.0)) { " +
- " fsColor = vec4(color, 1.0); " +
- " } " +
- " else {" +
- " fsColor = vec4(1.0); " +
- " }" +
- "}";
+ 'attribute vec3 position; ' +
+ 'attribute vec3 color; ' +
+ 'attribute vec3 normal; ' +
+ 'attribute float temperature; ' +
+ 'varying vec4 fsColor; ' +
+ 'void main() { ' +
+ ' gl_PointSize = 1.0; ' +
+ ' gl_Position = vec4(position, 1.0); ' +
+ ' if ((normal == vec3(0.0, 1.0, 0.0)) && (temperature == 100.0)) { ' +
+ ' fsColor = vec4(color, 1.0); ' +
+ ' } ' +
+ ' else {' +
+ ' fsColor = vec4(1.0); ' +
+ ' }' +
+ '}';
sp = sp.destroy();
sp = context.createShaderProgram(vs2, fs, attributeIndices);
@@ -540,7 +540,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 255, 0, 255]);
});
- it("creates an index buffer", function() {
+ it('creates an index buffer', function() {
var mesh = {
indexLists : [{
primitiveType : PrimitiveType.POINTS,
@@ -559,7 +559,7 @@ defineSuite([
expect(va.getIndexBuffer().getNumberOfIndices()).toEqual(mesh.indexLists[0].values.length);
});
- it("throws with multiple index lists", function() {
+ it('throws with multiple index lists', function() {
var mesh = {
indexLists : [{
primitiveType : PrimitiveType.POINTS,
@@ -577,7 +577,7 @@ defineSuite([
}).toThrow();
});
- it("throws with different number of interleaved attributes", function() {
+ it('throws with different number of interleaved attributes', function() {
var mesh = {
attributes : {
position : {
@@ -601,7 +601,7 @@ defineSuite([
}).toThrow();
});
- it("throws with duplicate indices", function() {
+ it('throws with duplicate indices', function() {
var mesh = {
attributes : {
position : {
diff --git a/Specs/Renderer/VertexArraySpec.js b/Specs/Renderer/VertexArraySpec.js
index 4c688a34ac3..c32ddb93102 100644
--- a/Specs/Renderer/VertexArraySpec.js
+++ b/Specs/Renderer/VertexArraySpec.js
@@ -5,7 +5,7 @@ defineSuite([
'Core/ComponentDatatype',
'Core/PrimitiveType',
'Renderer/BufferUsage'
- ], "Renderer/VertexArray", function(
+ ], 'Renderer/VertexArray', function(
createContext,
destroyContext,
ComponentDatatype,
@@ -24,7 +24,7 @@ defineSuite([
destroyContext(context);
});
- it("binds", function() {
+ it('binds', function() {
var positionBuffer = context.createVertexBuffer(3, BufferUsage.STATIC_DRAW);
var attributes = [{
@@ -44,7 +44,7 @@ defineSuite([
va = va.destroy();
});
- it("binds with default values", function() {
+ it('binds with default values', function() {
var positionBuffer = context.createVertexBuffer(3, BufferUsage.STATIC_DRAW);
var attributes = [{
@@ -67,7 +67,7 @@ defineSuite([
va = va.destroy();
});
- it("binds with multiple buffers", function() {
+ it('binds with multiple buffers', function() {
var attributeSize = 3 * Float32Array.BYTES_PER_ELEMENT;
var positionBuffer = context.createVertexBuffer(attributeSize, BufferUsage.STATIC_DRAW);
var normalBuffer = context.createVertexBuffer(attributeSize, BufferUsage.STATIC_DRAW);
@@ -90,7 +90,7 @@ defineSuite([
va = va.destroy();
});
- it("binds with interleaved buffer", function() {
+ it('binds with interleaved buffer', function() {
var attributeSize = 3 * Float32Array.BYTES_PER_ELEMENT;
var buffer = context.createVertexBuffer(attributeSize, BufferUsage.STATIC_DRAW);
@@ -115,7 +115,7 @@ defineSuite([
va = va.destroy();
});
- it("adds attributes", function() {
+ it('adds attributes', function() {
var positionBuffer = context.createVertexBuffer(3, BufferUsage.STATIC_DRAW);
var va = context.createVertexArray();
@@ -137,7 +137,7 @@ defineSuite([
va = va.destroy();
});
- it("modifies attributes", function() {
+ it('modifies attributes', function() {
var buffer = context.createVertexBuffer(6, BufferUsage.STATIC_DRAW);
var attributes = [{
@@ -155,7 +155,7 @@ defineSuite([
va = va.destroy();
});
- it("removes attributes", function() {
+ it('removes attributes', function() {
var buffer = context.createVertexBuffer(3, BufferUsage.STATIC_DRAW);
var va = context.createVertexArray();
@@ -199,18 +199,18 @@ defineSuite([
})).toEqual(false);
});
- it("renders with a one-component constant value", function() {
+ it('renders with a one-component constant value', function() {
var vs =
- "attribute float attr;" +
- "varying vec4 v_color;" +
- "void main() { " +
- " v_color = vec4(attr == 0.5);" +
- " gl_PointSize = 1.0;" +
- " gl_Position = vec4(0.0, 0.0, 0.0, 1.0);" +
- "}";
+ 'attribute float attr;' +
+ 'varying vec4 v_color;' +
+ 'void main() { ' +
+ ' v_color = vec4(attr == 0.5);' +
+ ' gl_PointSize = 1.0;' +
+ ' gl_Position = vec4(0.0, 0.0, 0.0, 1.0);' +
+ '}';
var fs =
- "varying vec4 v_color;" +
- "void main() { gl_FragColor = v_color; }";
+ 'varying vec4 v_color;' +
+ 'void main() { gl_FragColor = v_color; }';
var sp = context.createShaderProgram(vs, fs, {
position : 0
});
@@ -233,18 +233,18 @@ defineSuite([
va = va.destroy();
});
- it("renders with a two-component constant value", function() {
+ it('renders with a two-component constant value', function() {
var vs =
- "attribute vec2 attr;" +
- "varying vec4 v_color;" +
- "void main() { " +
- " v_color = vec4(attr == vec2(0.25, 0.75));" +
- " gl_PointSize = 1.0;" +
- " gl_Position = vec4(0.0, 0.0, 0.0, 1.0);" +
- "}";
+ 'attribute vec2 attr;' +
+ 'varying vec4 v_color;' +
+ 'void main() { ' +
+ ' v_color = vec4(attr == vec2(0.25, 0.75));' +
+ ' gl_PointSize = 1.0;' +
+ ' gl_Position = vec4(0.0, 0.0, 0.0, 1.0);' +
+ '}';
var fs =
- "varying vec4 v_color;" +
- "void main() { gl_FragColor = v_color; }";
+ 'varying vec4 v_color;' +
+ 'void main() { gl_FragColor = v_color; }';
var sp = context.createShaderProgram(vs, fs, {
position : 0
});
@@ -267,18 +267,18 @@ defineSuite([
va = va.destroy();
});
- it("renders with a three-component constant value", function() {
+ it('renders with a three-component constant value', function() {
var vs =
- "attribute vec3 attr;" +
- "varying vec4 v_color;" +
- "void main() { " +
- " v_color = vec4(attr == vec3(0.25, 0.5, 0.75));" +
- " gl_PointSize = 1.0;" +
- " gl_Position = vec4(0.0, 0.0, 0.0, 1.0);" +
- "}";
+ 'attribute vec3 attr;' +
+ 'varying vec4 v_color;' +
+ 'void main() { ' +
+ ' v_color = vec4(attr == vec3(0.25, 0.5, 0.75));' +
+ ' gl_PointSize = 1.0;' +
+ ' gl_Position = vec4(0.0, 0.0, 0.0, 1.0);' +
+ '}';
var fs =
- "varying vec4 v_color;" +
- "void main() { gl_FragColor = v_color; }";
+ 'varying vec4 v_color;' +
+ 'void main() { gl_FragColor = v_color; }';
var sp = context.createShaderProgram(vs, fs, {
position : 0
});
@@ -301,18 +301,18 @@ defineSuite([
va = va.destroy();
});
- it("renders with a four-component constant value", function() {
+ it('renders with a four-component constant value', function() {
var vs =
- "attribute vec4 attr;" +
- "varying vec4 v_color;" +
- "void main() { " +
- " v_color = vec4(attr == vec4(0.2, 0.4, 0.6, 0.8));" +
- " gl_PointSize = 1.0;" +
- " gl_Position = vec4(0.0, 0.0, 0.0, 1.0);" +
- "}";
+ 'attribute vec4 attr;' +
+ 'varying vec4 v_color;' +
+ 'void main() { ' +
+ ' v_color = vec4(attr == vec4(0.2, 0.4, 0.6, 0.8));' +
+ ' gl_PointSize = 1.0;' +
+ ' gl_Position = vec4(0.0, 0.0, 0.0, 1.0);' +
+ '}';
var fs =
- "varying vec4 v_color;" +
- "void main() { gl_FragColor = v_color; }";
+ 'varying vec4 v_color;' +
+ 'void main() { gl_FragColor = v_color; }';
var sp = context.createShaderProgram(vs, fs, {
position : 0
});
@@ -335,14 +335,14 @@ defineSuite([
va = va.destroy();
});
- it("destroys", function() {
+ it('destroys', function() {
var va = context.createVertexArray({});
expect(va.isDestroyed()).toEqual(false);
va.destroy();
expect(va.isDestroyed()).toEqual(true);
});
- it("fails to create (missing vertexBuffer and value)", function() {
+ it('fails to create (missing vertexBuffer and value)', function() {
var attributes = [{
componentsPerAttribute : 3
}];
@@ -352,7 +352,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (provides both vertexBuffer and value)", function() {
+ it('fails to create (provides both vertexBuffer and value)', function() {
var buffer = context.createVertexBuffer(3, BufferUsage.STATIC_DRAW);
var attributes = [{
@@ -366,7 +366,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create with duplicate indices", function() {
+ it('fails to create with duplicate indices', function() {
var buffer = context.createVertexBuffer(1, BufferUsage.STATIC_DRAW);
var attributes = [{
@@ -384,7 +384,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (componentsPerAttribute missing)", function() {
+ it('fails to create (componentsPerAttribute missing)', function() {
var buffer = context.createVertexBuffer(3, BufferUsage.STATIC_DRAW);
var attributes = [{
@@ -396,7 +396,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (componentsPerAttribute < 1)", function() {
+ it('fails to create (componentsPerAttribute < 1)', function() {
var attributes = [{
componentsPerAttribute : 0
}];
@@ -406,7 +406,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (componentsPerAttribute > 4)", function() {
+ it('fails to create (componentsPerAttribute > 4)', function() {
var attributes = [{
componentsPerAttribute : 5
}];
@@ -416,7 +416,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (value.length < 1)", function() {
+ it('fails to create (value.length < 1)', function() {
var attributes = [{
value : []
}];
@@ -426,7 +426,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (value.length > 4)", function() {
+ it('fails to create (value.length > 4)', function() {
var attributes = [{
value : [1.0, 2.0, 3.0, 4.0, 5.0]
}];
@@ -436,13 +436,13 @@ defineSuite([
}).toThrow();
});
- it("fails to create (componentDatatype)", function() {
+ it('fails to create (componentDatatype)', function() {
var buffer = context.createVertexBuffer(3, BufferUsage.STATIC_DRAW);
var attributes = [{
vertexBuffer : buffer,
componentsPerAttribute : 3,
- componentDatatype : "invalid component datatype"
+ componentDatatype : 'invalid component datatype'
}];
expect(function() {
@@ -450,7 +450,7 @@ defineSuite([
}).toThrow();
});
- it("fails to create (strideInBytes)", function() {
+ it('fails to create (strideInBytes)', function() {
var buffer = context.createVertexBuffer(3, BufferUsage.STATIC_DRAW);
var attributes = [{
@@ -464,7 +464,7 @@ defineSuite([
}).toThrow();
});
- it("fails to get attribute", function() {
+ it('fails to get attribute', function() {
var va = context.createVertexArray();
expect(function() {
@@ -472,7 +472,7 @@ defineSuite([
}).toThrow();
});
- it("fails to add attribute with duplicate index", function() {
+ it('fails to add attribute with duplicate index', function() {
var buffer = context.createVertexBuffer(3, BufferUsage.STATIC_DRAW);
var va = context.createVertexArray();
@@ -491,7 +491,7 @@ defineSuite([
}).toThrow();
});
- it("fails to add attribute without vertex buffer", function() {
+ it('fails to add attribute without vertex buffer', function() {
var va = context.createVertexArray();
expect(function() {
@@ -499,7 +499,7 @@ defineSuite([
}).toThrow();
});
- it("fails to remove attribute without an index", function() {
+ it('fails to remove attribute without an index', function() {
var va = context.createVertexArray();
expect(function() {
@@ -507,7 +507,7 @@ defineSuite([
}).toThrow();
});
- it("fails to destroy", function() {
+ it('fails to destroy', function() {
var va = context.createVertexArray();
va.destroy();
diff --git a/Specs/Scene/BillboardCollectionSpec.js b/Specs/Scene/BillboardCollectionSpec.js
index ab84934a385..cd11d8a003a 100644
--- a/Specs/Scene/BillboardCollectionSpec.js
+++ b/Specs/Scene/BillboardCollectionSpec.js
@@ -69,22 +69,22 @@ defineSuite([
destroyContext(context);
});
- it("initialize suite", function() {
+ it('initialize suite', function() {
greenImage = new Image();
- greenImage.src = "./Data/Images/Green.png";
+ greenImage.src = './Data/Images/Green.png';
blueImage = new Image();
- blueImage.src = "./Data/Images/Blue.png";
+ blueImage.src = './Data/Images/Blue.png';
whiteImage = new Image();
- whiteImage.src = "./Data/Images/White.png";
+ whiteImage.src = './Data/Images/White.png';
waitsFor(function() {
return greenImage.complete && blueImage.complete && whiteImage.complete;
- }, "Load .png file(s) for billboard collection test.", 3000);
+ }, 'Load .png file(s) for billboard collection test.', 3000);
});
- it("default constructs a billboard", function() {
+ it('default constructs a billboard', function() {
var b = billboards.add();
expect(b.getShow()).toEqual(true);
expect(b.getPosition().equals(Cartesian3.ZERO)).toEqual(true);
@@ -100,7 +100,7 @@ defineSuite([
expect(b.getColor().alpha).toEqual(1.0);
});
- it("explicitly constructs a billboard", function() {
+ it('explicitly constructs a billboard', function() {
var b = billboards.add({
show : false,
position : new Cartesian3(1.0, 2.0, 3.0),
@@ -132,7 +132,7 @@ defineSuite([
expect(b.getColor().alpha).toEqual(4.0);
});
- it("set's a billboard's properties", function() {
+ it('set billboard properties', function() {
var b = billboards.add();
b.setShow(false);
b.setPosition(new Cartesian3(1.0, 2.0, 3.0));
@@ -163,18 +163,18 @@ defineSuite([
expect(b.getColor().alpha).toEqual(4.0);
});
- it("set's a removed billboard's property", function() {
+ it('set a removed billboard property', function() {
var b = billboards.add();
billboards.remove(b);
b.setShow(false);
expect(b.getShow()).toEqual(false);
});
- it("has zero billboards when constructed", function() {
+ it('has zero billboards when constructed', function() {
expect(billboards.getLength()).toEqual(0);
});
- it("adds a billboard", function() {
+ it('adds a billboard', function() {
var b = billboards.add({
position : {
x : 1.0,
@@ -187,7 +187,7 @@ defineSuite([
expect(billboards.get(0).equals(b)).toEqual(true);
});
- it("removes the first billboard", function() {
+ it('removes the first billboard', function() {
var one = billboards.add({
position : {
x : 1.0,
@@ -211,7 +211,7 @@ defineSuite([
expect(billboards.get(0).equals(two)).toEqual(true);
});
- it("removes the last billboard", function() {
+ it('removes the last billboard', function() {
var one = billboards.add({
position : {
x : 1.0,
@@ -235,7 +235,7 @@ defineSuite([
expect(billboards.get(0).equals(one)).toEqual(true);
});
- it("removes the same billboard twice", function() {
+ it('removes the same billboard twice', function() {
var b = billboards.add({
position : {
x : 1.0,
@@ -252,7 +252,7 @@ defineSuite([
expect(billboards.getLength()).toEqual(0);
});
- it("removes null", function() {
+ it('removes null', function() {
billboards.add({
position : {
x : 1.0,
@@ -266,7 +266,7 @@ defineSuite([
expect(billboards.getLength()).toEqual(1);
});
- it("adds and removes billboards", function() {
+ it('adds and removes billboards', function() {
var one = billboards.add({
position : {
x : 1.0,
@@ -298,7 +298,7 @@ defineSuite([
expect(billboards.get(1).equals(three)).toEqual(true);
});
- it("removes all billboards", function() {
+ it('removes all billboards', function() {
billboards.add({
position : {
x : 1.0,
@@ -319,14 +319,14 @@ defineSuite([
expect(billboards.getLength()).toEqual(0);
});
- it("contains a billboard", function() {
+ it('contains a billboard', function() {
var b = billboards.add();
billboards.add(b);
expect(billboards.contains(b)).toEqual(true);
});
- it("doesn't contain a billboard", function() {
+ it('does not contain a billboard', function() {
var b0 = billboards.add();
var b1 = billboards.add();
@@ -337,11 +337,11 @@ defineSuite([
expect(billboards.contains(b0)).toEqual(false);
});
- it("doesn't contain undefined", function() {
+ it('does not contain undefined', function() {
expect(billboards.contains()).toBeFalsy();
});
- it("sets and gets a texture atlas", function() {
+ it('sets and gets a texture atlas', function() {
expect(billboards.getTextureAtlas()).not.toBeDefined();
var atlas = createTextureAtlas([greenImage]);
@@ -349,7 +349,7 @@ defineSuite([
expect(billboards.getTextureAtlas()).toEqual(atlas);
});
- it("destroys a texture atlas", function() {
+ it('destroys a texture atlas', function() {
var b = new BillboardCollection();
expect(b.getDestroyTextureAtlas()).toEqual(true);
@@ -360,7 +360,7 @@ defineSuite([
expect(atlas.isDestroyed()).toEqual(true);
});
- it("doesn't destroy a texture atlas", function() {
+ it('does not destroy a texture atlas', function() {
var b = new BillboardCollection();
b.setDestroyTextureAtlas(false);
@@ -371,7 +371,7 @@ defineSuite([
expect(atlas.isDestroyed()).toEqual(false);
});
- it("doesn't render when constructed", function() {
+ it('does not render when constructed', function() {
context.clear();
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
@@ -380,7 +380,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
});
- it("modifies and removes a billboard, then renders", function() {
+ it('modifies and removes a billboard, then renders', function() {
billboards.setTextureAtlas(createTextureAtlas([greenImage, blueImage]));
var b = billboards.add({
position : {
@@ -417,7 +417,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 255, 255]);
});
- it("renders a green billboard", function() {
+ it('renders a green billboard', function() {
billboards.setTextureAtlas(createTextureAtlas([greenImage]));
billboards.add({
position : {
@@ -436,7 +436,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 255, 0, 255]);
});
- it("adds and renders a billboard", function() {
+ it('adds and renders a billboard', function() {
billboards.setTextureAtlas(createTextureAtlas([greenImage, blueImage]));
billboards.add({
position : {
@@ -468,7 +468,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 255, 255]);
});
- it("removes and renders a billboard", function() {
+ it('removes and renders a billboard', function() {
billboards.setTextureAtlas(createTextureAtlas([greenImage, blueImage]));
billboards.add({
position : {
@@ -503,7 +503,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 255, 0, 255]);
});
- it("removes all billboards and renders", function() {
+ it('removes all billboards and renders', function() {
billboards.setTextureAtlas(createTextureAtlas([greenImage]));
billboards.add({
position : {
@@ -530,7 +530,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
});
- it("removes all billboards, adds a billboard, and renders", function() {
+ it('removes all billboards, adds a billboard, and renders', function() {
billboards.setTextureAtlas(createTextureAtlas([greenImage, blueImage]));
billboards.add({
position : {
@@ -566,7 +566,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 255, 255]);
});
- it("renders with a different texture atlas", function() {
+ it('renders with a different texture atlas', function() {
billboards.setTextureAtlas(createTextureAtlas([greenImage]));
billboards.add({
position : {
@@ -593,7 +593,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 255, 255]);
});
- it("renders with a different buffer usage", function() {
+ it('renders with a different buffer usage', function() {
billboards.setTextureAtlas(createTextureAtlas([greenImage]));
billboards.add({
position : {
@@ -619,7 +619,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 255, 0, 255]);
});
- it("renders using billboard's show property", function() {
+ it('renders using billboard show property', function() {
billboards.setTextureAtlas(createTextureAtlas([greenImage, blueImage]));
var greenBillboard = billboards.add({
position : {
@@ -657,7 +657,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 255, 255]);
});
- it("renders using billboard's position property", function() {
+ it('renders using billboard position property', function() {
billboards.setTextureAtlas(createTextureAtlas([greenImage]));
var b = billboards.add({
position : {
@@ -697,7 +697,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 255, 0, 255]);
});
- it("renders using billboard's scale property", function() {
+ it('renders using billboard scale property', function() {
billboards.setTextureAtlas(createTextureAtlas([greenImage]));
var b = billboards.add({
position : {
@@ -729,7 +729,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 255, 0, 255]);
});
- it("renders using billboard's imageIndex property", function() {
+ it('renders using billboard imageIndex property', function() {
billboards.setTextureAtlas(createTextureAtlas([greenImage, blueImage]));
var b = billboards.add({
position : {
@@ -756,7 +756,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 255, 255]);
});
- it("renders using billboard's color property", function() {
+ it('renders using billboard color property', function() {
billboards.setTextureAtlas(createTextureAtlas([whiteImage]));
var b = billboards.add({
position : {
@@ -802,7 +802,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 255, 0, 255]);
});
- it("updates 10% of billboards", function() {
+ it('updates 10% of billboards', function() {
billboards.setTextureAtlas(createTextureAtlas([whiteImage]));
for ( var i = 0; i < 10; ++i) {
billboards.add({
@@ -851,7 +851,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 0, 0, 255]);
});
- it("renders more than 16K billboards", function() {
+ it('renders more than 16K billboards', function() {
billboards.setTextureAtlas(createTextureAtlas([whiteImage]));
for ( var i = 0; i < 16 * 1024; ++i) {
billboards.add({
@@ -884,7 +884,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([255, 255, 255, 255]);
});
- it("is picked", function() {
+ it('is picked', function() {
billboards.setTextureAtlas(createTextureAtlas([whiteImage]));
var b = billboards.add({
position : {
@@ -901,7 +901,7 @@ defineSuite([
expect(pickedObject).toEqual(b);
});
- it("is not picked", function() {
+ it('is not picked', function() {
billboards.setTextureAtlas(createTextureAtlas([whiteImage]));
billboards.add({
show : false,
@@ -919,7 +919,7 @@ defineSuite([
expect(pickedObject).not.toBeDefined();
});
- it("computes screen space position (1)", function() {
+ it('computes screen space position (1)', function() {
var b = billboards.add({
position : {
x : 0.0,
@@ -931,7 +931,7 @@ defineSuite([
expect(b.computeScreenSpacePosition(us).equals(new Cartesian2(0.5, 0.5)));
});
- it("computes screen space position (2)", function() {
+ it('computes screen space position (2)', function() {
var b = billboards.add({
position : {
x : 0.0,
@@ -947,7 +947,7 @@ defineSuite([
expect(b.computeScreenSpacePosition(us).equals(new Cartesian2(1.5, 2.5)));
});
- it("computes screen space position (3)", function() {
+ it('computes screen space position (3)', function() {
var b = billboards.add({
position : {
x : 0.0,
@@ -966,7 +966,7 @@ defineSuite([
expect(p.y).toBeGreaterThan(0.5);
});
- it("throws when computing screen space position when not in a collection", function() {
+ it('throws when computing screen space position when not in a collection', function() {
var b = billboards.add({
position : {
x : 0.0,
@@ -981,7 +981,7 @@ defineSuite([
}).toThrow();
});
- it("throws when computing screen space position without uniform state", function() {
+ it('throws when computing screen space position without uniform state', function() {
var b = billboards.add();
expect(function() {
@@ -989,7 +989,7 @@ defineSuite([
}).toThrow();
});
- it("equals another billboard", function() {
+ it('equals another billboard', function() {
var b = billboards.add({
position : {
x : 1.0,
@@ -1020,7 +1020,7 @@ defineSuite([
expect(b.equals(b2)).toEqual(true);
});
- it("doesn't equal another billboard", function() {
+ it('does not equal another billboard', function() {
var b = billboards.add({
position : {
x : 1.0,
@@ -1039,12 +1039,12 @@ defineSuite([
expect(b.equals(b2)).toEqual(false);
});
- it("doesn't equal null", function() {
+ it('does not equal null', function() {
var b = billboards.add({});
expect(b.equals(null)).toBeFalsy();
});
- it("throws when accessing without an index", function() {
+ it('throws when accessing without an index', function() {
expect(function() {
billboards.get();
}).toThrow();
diff --git a/Specs/Scene/Camera2DControllerSpec.js b/Specs/Scene/Camera2DControllerSpec.js
index 6901adf05a6..02180d47bbe 100644
--- a/Specs/Scene/Camera2DControllerSpec.js
+++ b/Specs/Scene/Camera2DControllerSpec.js
@@ -68,39 +68,39 @@ defineSuite([
controller2 = controller2 && !controller2.isDestroyed() && controller2.destroy();
});
- it("setReferenceFrame", function() {
+ it('setReferenceFrame', function() {
var transform = Transforms.eastNorthUpToFixedFrame(ellipsoid.cartographicDegreesToCartesian(new Cartographic2(-75.0, 40.0)));
controller.setReferenceFrame(transform, ellipsoid);
expect(controller.getEllipsoid()).toBe(ellipsoid);
expect(controller._camera.transform).toBe(transform);
});
- it("setEllipsoid", function() {
+ it('setEllipsoid', function() {
controller.setEllipsoid(Ellipsoid.UNIT_SPHERE);
expect(controller.getEllipsoid().equals(Ellipsoid.UNIT_SPHERE)).toEqual(true);
});
- it("moveUp", function() {
+ it('moveUp', function() {
controller.moveUp(moverate);
expect(camera.position.equalsEpsilon(new Cartesian3(0.0, moverate, 0.0), CesiumMath.EPSILON10)).toEqual(true);
});
- it("moveDown", function() {
+ it('moveDown', function() {
controller.moveDown(moverate);
expect(camera.position.equalsEpsilon(new Cartesian3(0.0, -moverate, 0.0), CesiumMath.EPSILON10)).toEqual(true);
});
- it("moveRight", function() {
+ it('moveRight', function() {
controller.moveRight(moverate);
expect(camera.position.equalsEpsilon(new Cartesian3(moverate, 0.0, 0.0), CesiumMath.EPSILON10)).toEqual(true);
});
- it("moveLeft", function() {
+ it('moveLeft', function() {
controller.moveLeft(moverate);
expect(camera.position.equalsEpsilon(new Cartesian3(-moverate, 0.0, 0.0), CesiumMath.EPSILON10)).toEqual(true);
});
- it("translate", function() {
+ it('translate', function() {
controller._translate({
startPosition : new Cartesian2(0.0, 0.0),
endPosition : new Cartesian2(10.0, 10.0)
@@ -108,7 +108,7 @@ defineSuite([
expect(camera.position.equalsEpsilon(new Cartesian3(100000.0, 100000.0, 0.0))).toEqual(true);
});
- it("zoom", function() {
+ it('zoom', function() {
var offset = 0.5 * Math.max(camera.frustum.right - camera.frustum.left, camera.frustum.top - camera.frustum.bottom);
var ratio = frustum.top / frustum.right;
controller._zoom({
@@ -121,7 +121,7 @@ defineSuite([
expect(frustum.bottom).toEqual(-ratio * (controller._zoomRate + offset), CesiumMath.EPSILON10);
});
- it("zoomOut", function() {
+ it('zoomOut', function() {
controller.zoomOut(zoomrate);
expect(frustum.right).toEqualEpsilon(3.0, CesiumMath.EPSILON10);
expect(frustum.left).toEqual(-3.0, CesiumMath.EPSILON10);
@@ -129,7 +129,7 @@ defineSuite([
expect(frustum.bottom).toEqual(-1.5, CesiumMath.EPSILON10);
});
- it("zoomIn", function() {
+ it('zoomIn', function() {
controller.zoomIn(zoomrate);
expect(frustum.right).toEqualEpsilon(1.0, CesiumMath.EPSILON10);
expect(frustum.left).toEqual(-1.0, CesiumMath.EPSILON10);
@@ -137,7 +137,7 @@ defineSuite([
expect(frustum.bottom).toEqual(-0.5, CesiumMath.EPSILON10);
});
- it("zoomIn throws with null OrthogrphicFrustum properties", function() {
+ it('zoomIn throws with null OrthogrphicFrustum properties', function() {
var camera = new Camera(document);
camera.frustum = new OrthographicFrustum();
controller2 = new Camera2DController(document, camera, ellipsoid);
@@ -146,7 +146,7 @@ defineSuite([
}).toThrow();
});
- it("isDestroyed", function() {
+ it('isDestroyed', function() {
expect(controller.isDestroyed()).toEqual(false);
controller.destroy();
expect(controller.isDestroyed()).toEqual(true);
diff --git a/Specs/Scene/CameraColumbusViewControllerSpec.js b/Specs/Scene/CameraColumbusViewControllerSpec.js
index 6252a0f8da3..d22ed6cd598 100644
--- a/Specs/Scene/CameraColumbusViewControllerSpec.js
+++ b/Specs/Scene/CameraColumbusViewControllerSpec.js
@@ -28,12 +28,12 @@ defineSuite([
controller = controller && !controller.isDestroyed() && controller.destroy();
});
- it("updateReferenceFrame", function() {
+ it('updateReferenceFrame', function() {
controller._updateReferenceFrame();
expect(camera.position.equalsEpsilon(Cartesian3.ZERO, CesiumMath.EPSILON10)).toEqual(true);
});
- it("isDestroyed", function() {
+ it('isDestroyed', function() {
expect(controller.isDestroyed()).toEqual(false);
controller.destroy();
expect(controller.isDestroyed()).toEqual(true);
diff --git a/Specs/Scene/CameraControllerCollectionSpec.js b/Specs/Scene/CameraControllerCollectionSpec.js
index 0a2ab9666f3..3cfcd944340 100644
--- a/Specs/Scene/CameraControllerCollectionSpec.js
+++ b/Specs/Scene/CameraControllerCollectionSpec.js
@@ -30,35 +30,35 @@ defineSuite([
collection = collection && !collection.isDestroyed() && collection.destroy();
});
- it("add2D", function() {
+ it('add2D', function() {
expect(function() {
collection.add2D();
}).not.toThrow();
expect(collection.getLength()).toEqual(1);
});
- it("addSpindle", function() {
+ it('addSpindle', function() {
expect(function() {
collection.addSpindle();
}).not.toThrow();
expect(collection.getLength()).toEqual(1);
});
- it("addFreeLook", function() {
+ it('addFreeLook', function() {
expect(function() {
collection.addFreeLook();
}).not.toThrow();
expect(collection.getLength()).toEqual(1);
});
- it("addColumbusView", function() {
+ it('addColumbusView', function() {
expect(function() {
collection.addColumbusView();
}).not.toThrow();
expect(collection.getLength()).toEqual(1);
});
- it("addFlight", function() {
+ it('addFlight', function() {
expect(function() {
collection.addFlight({
destination : Ellipsoid.WGS84.cartographicDegreesToCartesian(new Cartographic3(-118.26, 34.19, 100000.0)), // Los Angeles
@@ -68,29 +68,29 @@ defineSuite([
expect(collection.getLength()).toEqual(1);
});
- it("get throws without index", function() {
+ it('get throws without index', function() {
expect(function() {
collection.get();
}).toThrow();
});
- it("get", function() {
+ it('get', function() {
expect(collection.addSpindle()).toBe(collection.get(0));
});
- it("contains", function() {
+ it('contains', function() {
var spindle = collection.addSpindle();
expect(collection.contains(spindle)).toEqual(true);
collection.remove(spindle);
expect(collection.contains(spindle)).toEqual(false);
});
- it("does not contain", function() {
+ it('does not contain', function() {
expect(collection.contains(new CameraFreeLookController(document, camera))).toEqual(false);
expect(collection.contains()).toEqual(false);
});
- it("update", function() {
+ it('update', function() {
collection.add2D();
collection.addColumbusView();
expect(function() {
@@ -99,7 +99,7 @@ defineSuite([
expect(collection.getLength()).toEqual(2);
});
- it("update removes expired controllers", function() {
+ it('update removes expired controllers', function() {
var flight = collection.addFlight({
destination : Ellipsoid.WGS84.cartographicDegreesToCartesian(new Cartographic3(-118.26, 34.19, 100000.0)), // Los Angeles
duration : 4.0
@@ -110,15 +110,15 @@ defineSuite([
expect(collection.getLength()).toEqual(0);
});
- it("remove", function() {
+ it('remove', function() {
expect(collection.remove(collection.addSpindle())).toEqual(true);
});
- it("remove returns false without controller", function() {
+ it('remove returns false without controller', function() {
expect(collection.remove()).toEqual(false);
});
- it("removeAll", function() {
+ it('removeAll', function() {
collection.addSpindle();
collection.addFreeLook();
expect(collection.getLength()).toEqual(2);
@@ -126,7 +126,7 @@ defineSuite([
expect(collection.getLength()).toEqual(0);
});
- it("isDestroyed", function() {
+ it('isDestroyed', function() {
expect(collection.isDestroyed()).toEqual(false);
collection.destroy();
expect(collection.isDestroyed()).toEqual(true);
diff --git a/Specs/Scene/CameraEventHandlerSpec.js b/Specs/Scene/CameraEventHandlerSpec.js
index f9baf179476..01ea0085a25 100644
--- a/Specs/Scene/CameraEventHandlerSpec.js
+++ b/Specs/Scene/CameraEventHandlerSpec.js
@@ -22,51 +22,51 @@ defineSuite([
handler2 = handler2 && !handler2.isDestroyed() && handler2.destroy();
});
- it("throws without a canvas", function() {
+ it('throws without a canvas', function() {
expect(function() {
handler2 = new CameraEventHandler();
}).toThrow();
});
- it("throws without a moveType", function() {
+ it('throws without a moveType', function() {
expect(function() {
handler2 = new CameraEventHandler(document);
}).toThrow();
});
- it("throws if the event type is not of CameraEventType", function() {
+ it('throws if the event type is not of CameraEventType', function() {
expect(function() {
handler2 = new CameraEventHandler(document, MouseEventType.LEFT_CLICK);
}).toThrow();
});
- it("can be constructed using the middle drag event type", function() {
+ it('can be constructed using the middle drag event type', function() {
expect(function(){
handler2 = new CameraEventHandler(document, CameraEventType.MIDDLE_DRAG);
}).not.toThrow();
});
- it("getMovement", function() {
+ it('getMovement', function() {
expect(handler.getMovement()).toBeFalsy();
});
- it("isMoving", function() {
+ it('isMoving', function() {
expect(handler.isMoving()).toEqual(false);
});
- it("isButtonDown", function() {
+ it('isButtonDown', function() {
expect(handler.isButtonDown()).toEqual(false);
});
- it("getButtonPressTime", function() {
+ it('getButtonPressTime', function() {
expect(handler.getButtonPressTime()).toEqual(null);
});
- it("getButtonReleaseTime", function() {
+ it('getButtonReleaseTime', function() {
expect(handler.getButtonReleaseTime()).toEqual(null);
});
- it("isDestroyed", function() {
+ it('isDestroyed', function() {
expect(handler.isDestroyed()).toEqual(false);
handler.destroy();
expect(handler.isDestroyed()).toEqual(true);
diff --git a/Specs/Scene/CameraFreeLookControllerSpec.js b/Specs/Scene/CameraFreeLookControllerSpec.js
index 7d04a0227a8..68b6efc9864 100644
--- a/Specs/Scene/CameraFreeLookControllerSpec.js
+++ b/Specs/Scene/CameraFreeLookControllerSpec.js
@@ -52,7 +52,7 @@ defineSuite([
cflc = cflc && !cflc.isDestroyed() && cflc.destroy();
});
- it("move forward", function() {
+ it('move forward', function() {
cflc.moveForward(moverate);
expect(camera.position.equals(new Cartesian3(0.0, 0.0, -moverate))).toEqual(true);
expect(camera.up.equals(up)).toEqual(true);
@@ -60,7 +60,7 @@ defineSuite([
expect(camera.right.equals(right)).toEqual(true);
});
- it("move backward", function() {
+ it('move backward', function() {
cflc.moveBackward(moverate);
expect(camera.position.equals(new Cartesian3(0.0, 0.0, moverate))).toEqual(true);
expect(camera.up.equals(up)).toEqual(true);
@@ -68,7 +68,7 @@ defineSuite([
expect(camera.right.equals(right)).toEqual(true);
});
- it("move up", function() {
+ it('move up', function() {
cflc.moveUp(moverate);
expect(camera.position.equals(new Cartesian3(0.0, moverate, 0.0))).toEqual(true);
expect(camera.up.equals(up)).toEqual(true);
@@ -76,7 +76,7 @@ defineSuite([
expect(camera.right.equals(right)).toEqual(true);
});
- it("move down", function() {
+ it('move down', function() {
cflc.moveDown(moverate);
expect(camera.position.equals(new Cartesian3(0.0, -moverate, 0.0))).toEqual(true);
expect(camera.up.equals(up)).toEqual(true);
@@ -84,7 +84,7 @@ defineSuite([
expect(camera.right.equals(right)).toEqual(true);
});
- it("move left", function() {
+ it('move left', function() {
cflc.moveLeft(moverate);
expect(camera.position.equals(new Cartesian3(-moverate, 0.0, 0.0))).toEqual(true);
expect(camera.up.equals(up)).toEqual(true);
@@ -92,7 +92,7 @@ defineSuite([
expect(camera.right.equals(right)).toEqual(true);
});
- it("move right", function() {
+ it('move right', function() {
cflc.moveRight(moverate);
expect(camera.position.equals(new Cartesian3(moverate, 0.0, 0.0))).toEqual(true);
expect(camera.up.equals(up)).toEqual(true);
@@ -100,7 +100,7 @@ defineSuite([
expect(camera.right.equals(right)).toEqual(true);
});
- it("look left", function() {
+ it('look left', function() {
cflc.lookLeft(turnrate);
expect(camera.position.equals(position)).toEqual(true);
expect(camera.up.equals(up)).toEqual(true);
@@ -108,7 +108,7 @@ defineSuite([
expect(camera.right.equalsEpsilon(dir, CesiumMath.EPSILON15)).toEqual(true);
});
- it("look right", function() {
+ it('look right', function() {
cflc.lookRight(turnrate);
expect(camera.position.equals(position)).toEqual(true);
expect(camera.up.equals(up)).toEqual(true);
@@ -116,7 +116,7 @@ defineSuite([
expect(camera.right.equalsEpsilon(dir.negate(), CesiumMath.EPSILON15)).toEqual(true);
});
- it("look up", function() {
+ it('look up', function() {
cflc.lookUp(turnrate);
expect(camera.position.equals(position)).toEqual(true);
expect(camera.right.equals(right)).toEqual(true);
@@ -124,7 +124,7 @@ defineSuite([
expect(camera.up.equalsEpsilon(dir.negate(), CesiumMath.EPSILON15)).toEqual(true);
});
- it("look down", function() {
+ it('look down', function() {
cflc.lookDown(turnrate);
expect(camera.position.equals(position)).toEqual(true);
expect(camera.right.equals(right)).toEqual(true);
@@ -132,7 +132,7 @@ defineSuite([
expect(camera.up.equalsEpsilon(dir, CesiumMath.EPSILON15)).toEqual(true);
});
- it("rotate", function() {
+ it('rotate', function() {
cflc.rotate(Cartesian3.UNIT_X, CesiumMath.PI);
expect(camera.position.equals(position)).toEqual(true);
expect(camera.right.equals(right)).toEqual(true);
@@ -140,7 +140,7 @@ defineSuite([
expect(camera.direction.equalsEpsilon(Cartesian3.UNIT_Z, CesiumMath.EPSILON10)).toEqual(true);
});
- it("isDestroyed", function() {
+ it('isDestroyed', function() {
expect(cflc.isDestroyed()).toEqual(false);
cflc.destroy();
expect(cflc.isDestroyed()).toEqual(true);
diff --git a/Specs/Scene/CameraSpec.js b/Specs/Scene/CameraSpec.js
index db607eb1585..c39c4d74ee2 100644
--- a/Specs/Scene/CameraSpec.js
+++ b/Specs/Scene/CameraSpec.js
@@ -35,18 +35,18 @@ defineSuite([
camera.frustum.aspectRatio = 1.0;
});
- it("constructor throws an exception when there is no canvas", function() {
+ it('constructor throws an exception when there is no canvas', function() {
expect(function() {
return new Camera();
}).toThrow();
});
- it("getControllers", function() {
+ it('getControllers', function() {
var controllers = camera.getControllers();
expect(controllers).toEqual(new CameraControllerCollection(camera, document));
});
- it("lookAt object", function() {
+ it('lookAt object', function() {
var target = Cartesian3.ZERO;
var newPosition = new Cartesian3(1.0, 1.0, 1.0);
var newDirection = target.subtract(newPosition).normalize();
@@ -62,7 +62,7 @@ defineSuite([
expect(tempCamera.up.equals(newUp)).toEqual(true);
});
- it("lookAt array", function() {
+ it('lookAt array', function() {
var target = Cartesian3.ZERO;
var newPosition = new Cartesian3(1.0, 1.0, 1.0);
var newDirection = target.subtract(newPosition).normalize();
@@ -74,7 +74,7 @@ defineSuite([
expect(tempCamera.up.equals(newUp)).toEqual(true);
});
- it("lookAt returns without proper arguments", function() {
+ it('lookAt returns without proper arguments', function() {
var eye = new Cartesian3(1, 1, 1);
camera.lookAt(eye);
@@ -86,7 +86,7 @@ defineSuite([
expect(camera.position.equals(eye)).toEqual(false);
});
- it("get view matrix", function() {
+ it('get view matrix', function() {
var viewMatrix = camera.getViewMatrix();
var position = camera.position;
var up = camera.up;
@@ -104,7 +104,7 @@ defineSuite([
expect(viewMatrix.equals(expected)).toEqual(true);
});
- it("viewExtent", function() {
+ it('viewExtent', function() {
var west = -CesiumMath.PI_OVER_TWO;
var south = -CesiumMath.PI_OVER_TWO;
var east = CesiumMath.PI_OVER_TWO;
@@ -116,26 +116,26 @@ defineSuite([
expect(camera.right.equalsEpsilon(new Cartesian3(0.0, 1.0, 0.0), CesiumMath.EPSILON10));
});
- it("get inverse view matrix", function() {
+ it('get inverse view matrix', function() {
var expected = camera.getViewMatrix().inverse();
expect(expected.equals(camera.getInverseViewMatrix())).toEqual(true);
});
- it("get inverse transform", function() {
+ it('get inverse transform', function() {
camera.transform = new Matrix4(5.0, 0.0, 0.0, 1.0, 0.0, 5.0, 0.0, 2.0, 0.0, 0.0, 5.0, 3.0, 0.0, 0.0, 0.0, 1.0);
var expected = camera.transform.inverseTransformation();
expect(expected.equals(camera.getInverseTransform())).toEqual(true);
});
- it("isDestroyed", function() {
+ it('isDestroyed', function() {
expect(camera.isDestroyed()).toEqual(false);
camera.destroy();
expect(camera.isDestroyed()).toEqual(true);
});
- describe("box intersections", function() {
+ describe('box intersections', function() {
- it("can contain an axis aligned bounding box", function() {
+ it('can contain an axis aligned bounding box', function() {
var box1 = new AxisAlignedBoundingBox([
new Cartesian3(-0.5, 0, -1.25),
new Cartesian3(0.5, 0, -1.25),
@@ -145,9 +145,9 @@ defineSuite([
expect(camera.getVisibility(box1, AxisAlignedBoundingBox.planeAABBIntersect)).toEqual(Intersect.INSIDE);
});
- describe("can partially contain an axis aligned bounding box", function() {
+ describe('can partially contain an axis aligned bounding box', function() {
- it("on the far plane", function() {
+ it('on the far plane', function() {
var box2 = new AxisAlignedBoundingBox([
new Cartesian3(-0.5, 0, -1.5),
new Cartesian3(0.5, 0, -1.5),
@@ -157,7 +157,7 @@ defineSuite([
expect(camera.getVisibility(box2, AxisAlignedBoundingBox.planeAABBIntersect)).toEqual(Intersect.INTERSECTING);
});
- it("on the near plane", function() {
+ it('on the near plane', function() {
var box3 = new AxisAlignedBoundingBox([
new Cartesian3(-0.5, 0, -0.5),
new Cartesian3(0.5, 0, -0.5),
@@ -167,7 +167,7 @@ defineSuite([
expect(camera.getVisibility(box3, AxisAlignedBoundingBox.planeAABBIntersect)).toEqual(Intersect.INTERSECTING);
});
- it("on the left plane", function() {
+ it('on the left plane', function() {
var box4 = new AxisAlignedBoundingBox([
new Cartesian3(-1.5, 0, -1.25),
new Cartesian3(0, 0, -1.25),
@@ -177,7 +177,7 @@ defineSuite([
expect(camera.getVisibility(box4, AxisAlignedBoundingBox.planeAABBIntersect)).toEqual(Intersect.INTERSECTING);
});
- it("on the right plane", function() {
+ it('on the right plane', function() {
var box5 = new AxisAlignedBoundingBox([
new Cartesian3(0, 0, -1.25),
new Cartesian3(1.5, 0, -1.25),
@@ -187,7 +187,7 @@ defineSuite([
expect(camera.getVisibility(box5, AxisAlignedBoundingBox.planeAABBIntersect)).toEqual(Intersect.INTERSECTING);
});
- it("on the top plane", function() {
+ it('on the top plane', function() {
var box6 = new AxisAlignedBoundingBox([
new Cartesian3(-0.5, 0, -1.25),
new Cartesian3(0.5, 0, -1.25),
@@ -197,7 +197,7 @@ defineSuite([
expect(camera.getVisibility(box6, AxisAlignedBoundingBox.planeAABBIntersect)).toEqual(Intersect.INTERSECTING);
});
- it("on the bottom plane", function() {
+ it('on the bottom plane', function() {
var box7 = new AxisAlignedBoundingBox([
new Cartesian3(-0.5, -2.0, -1.25),
new Cartesian3(0.5, 0, -1.25),
@@ -208,9 +208,9 @@ defineSuite([
});
});
- describe("can not contain an axis aligned bounding box", function() {
+ describe('can not contain an axis aligned bounding box', function() {
- it("past the far plane", function() {
+ it('past the far plane', function() {
var box8 = new AxisAlignedBoundingBox([
new Cartesian3(-0.5, 0, -2.25),
new Cartesian3(0.5, 0, -2.25),
@@ -220,7 +220,7 @@ defineSuite([
expect(camera.getVisibility(box8, AxisAlignedBoundingBox.planeAABBIntersect)).toEqual(Intersect.OUTSIDE);
});
- it("before the near plane", function() {
+ it('before the near plane', function() {
var box9 = new AxisAlignedBoundingBox([
new Cartesian3(-0.5, 0, -0.25),
new Cartesian3(0.5, 0, -0.25),
@@ -230,7 +230,7 @@ defineSuite([
expect(camera.getVisibility(box9, AxisAlignedBoundingBox.planeAABBIntersect)).toEqual(Intersect.OUTSIDE);
});
- it("past the left plane", function() {
+ it('past the left plane', function() {
var box10 = new AxisAlignedBoundingBox([
new Cartesian3(-5, 0, -1.25),
new Cartesian3(-3, 0, -1.25),
@@ -240,7 +240,7 @@ defineSuite([
expect(camera.getVisibility(box10, AxisAlignedBoundingBox.planeAABBIntersect)).toEqual(Intersect.OUTSIDE);
});
- it("past the right plane", function() {
+ it('past the right plane', function() {
var box11 = new AxisAlignedBoundingBox([
new Cartesian3(3, 0, -1.25),
new Cartesian3(5, 0, -1.25),
@@ -250,7 +250,7 @@ defineSuite([
expect(camera.getVisibility(box11, AxisAlignedBoundingBox.planeAABBIntersect)).toEqual(Intersect.OUTSIDE);
});
- it("past the top plane", function() {
+ it('past the top plane', function() {
var box12 = new AxisAlignedBoundingBox([
new Cartesian3(-0.5, 3, -1.25),
new Cartesian3(0.5, 3, -1.25),
@@ -260,7 +260,7 @@ defineSuite([
expect(camera.getVisibility(box12, AxisAlignedBoundingBox.planeAABBIntersect)).toEqual(Intersect.OUTSIDE);
});
- it("past the bottom plane", function() {
+ it('past the bottom plane', function() {
var box13 = new AxisAlignedBoundingBox([
new Cartesian3(-0.5, -3, -1.25),
new Cartesian3(0.5, -3, -1.25),
@@ -273,74 +273,74 @@ defineSuite([
});
});
- describe("sphere intersection", function() {
+ describe('sphere intersection', function() {
- it("can contain a sphere", function() {
+ it('can contain a sphere', function() {
var sphere1 = new BoundingSphere([new Cartesian3(0, 0, -1.25), new Cartesian3(0, 0, -1.75)]);
expect(camera.getVisibility(sphere1, BoundingSphere.planeSphereIntersect)).toEqual(Intersect.INSIDE);
});
- describe("can partially contain a sphere", function() {
+ describe('can partially contain a sphere', function() {
- it("on the far plane", function() {
+ it('on the far plane', function() {
var sphere2 = new BoundingSphere([new Cartesian3(0, 0, -1.5), new Cartesian3(0, 0, -2.5)]);
expect(camera.getVisibility(sphere2, BoundingSphere.planeSphereIntersect)).toEqual(Intersect.INTERSECTING);
});
- it("on the near plane", function() {
+ it('on the near plane', function() {
var sphere3 = new BoundingSphere([new Cartesian3(0, 0, -0.5), new Cartesian3(0, 0, -1.5)]);
expect(camera.getVisibility(sphere3, BoundingSphere.planeSphereIntersect)).toEqual(Intersect.INTERSECTING);
});
- it("on the left plane", function() {
+ it('on the left plane', function() {
var sphere4 = new BoundingSphere([new Cartesian3(-1.0, 0, -1.5), new Cartesian3(0, 0, -1.5)]);
expect(camera.getVisibility(sphere4, BoundingSphere.planeSphereIntersect)).toEqual(Intersect.INTERSECTING);
});
- it("on the right plane", function() {
+ it('on the right plane', function() {
var sphere5 = new BoundingSphere([new Cartesian3(0, 0, -1.5), new Cartesian3(1.0, 0, -1.5)]);
expect(camera.getVisibility(sphere5, BoundingSphere.planeSphereIntersect)).toEqual(Intersect.INTERSECTING);
});
- it("on the top plane", function() {
+ it('on the top plane', function() {
var sphere6 = new BoundingSphere([new Cartesian3(0, 0, -1.5), new Cartesian3(0, 2.0, -1.5)]);
expect(camera.getVisibility(sphere6, BoundingSphere.planeSphereIntersect)).toEqual(Intersect.INTERSECTING);
});
- it("on the bottom plane", function() {
+ it('on the bottom plane', function() {
var sphere7 = new BoundingSphere([new Cartesian3(0, -2.0, -1.5), new Cartesian3(0, 0, -1.5)]);
expect(camera.getVisibility(sphere7, BoundingSphere.planeSphereIntersect)).toEqual(Intersect.INTERSECTING);
});
});
- describe("can not contain a sphere", function() {
+ describe('can not contain a sphere', function() {
- it("past the far plane", function() {
+ it('past the far plane', function() {
var sphere8 = new BoundingSphere([new Cartesian3(0, 0, -2.25), new Cartesian3(0, 0, -2.75)]);
expect(camera.getVisibility(sphere8, BoundingSphere.planeSphereIntersect)).toEqual(Intersect.OUTSIDE);
});
- it("before the near plane", function() {
+ it('before the near plane', function() {
var sphere9 = new BoundingSphere([new Cartesian3(0, 0, -0.25), new Cartesian3(0, 0, -0.5)]);
expect(camera.getVisibility(sphere9, BoundingSphere.planeSphereIntersect)).toEqual(Intersect.OUTSIDE);
});
- it("past the left plane", function() {
+ it('past the left plane', function() {
var sphere10 = new BoundingSphere([new Cartesian3(-5, 0, -1.25), new Cartesian3(-4.5, 0, -1.75)]);
expect(camera.getVisibility(sphere10, BoundingSphere.planeSphereIntersect)).toEqual(Intersect.OUTSIDE);
});
- it("past the right plane", function() {
+ it('past the right plane', function() {
var sphere11 = new BoundingSphere([new Cartesian3(4.5, 0, -1.25), new Cartesian3(5, 0, -1.75)]);
expect(camera.getVisibility(sphere11, BoundingSphere.planeSphereIntersect)).toEqual(Intersect.OUTSIDE);
});
- it("past the top plane", function() {
+ it('past the top plane', function() {
var sphere12 = new BoundingSphere([new Cartesian3(-0.5, 4.5, -1.25), new Cartesian3(-0.5, 5, -1.25)]);
expect(camera.getVisibility(sphere12, BoundingSphere.planeSphereIntersect)).toEqual(Intersect.OUTSIDE);
});
- it("past the bottom plane", function() {
+ it('past the bottom plane', function() {
var sphere13 = new BoundingSphere([new Cartesian3(-0.5, -4.5, -1.25), new Cartesian3(-0.5, -5, -1.25)]);
expect(camera.getVisibility(sphere13, BoundingSphere.planeSphereIntersect)).toEqual(Intersect.OUTSIDE);
});
diff --git a/Specs/Scene/CameraSpindleControllerSpec.js b/Specs/Scene/CameraSpindleControllerSpec.js
index 5bd368bab87..6e5adf78725 100644
--- a/Specs/Scene/CameraSpindleControllerSpec.js
+++ b/Specs/Scene/CameraSpindleControllerSpec.js
@@ -62,20 +62,20 @@ defineSuite([
csc2 = csc2 && !csc2.isDestroyed() && csc2.destroy();
});
- it("setEllipsoid", function() {
+ it('setEllipsoid', function() {
expect(csc.getEllipsoid()).toEqual(Ellipsoid.WGS84);
csc.setEllipsoid(Ellipsoid.UNIT_SPHERE);
expect(csc.getEllipsoid()).toEqual(Ellipsoid.UNIT_SPHERE);
});
- it("setReferenceFrame", function() {
+ it('setReferenceFrame', function() {
var transform = Transforms.eastNorthUpToFixedFrame(Ellipsoid.UNIT_SPHERE.cartographicDegreesToCartesian(new Cartographic2(-76.0, 40.0)));
csc.setReferenceFrame(transform, Ellipsoid.UNIT_SPHERE);
expect(csc.getEllipsoid()).toEqual(Ellipsoid.UNIT_SPHERE);
expect(camera.transform.equals(transform)).toEqual(true);
});
- it("move up", function() {
+ it('move up', function() {
csc.moveUp(rotaterate);
expect(camera.up.equalsEpsilon(dir.negate(), CesiumMath.EPSILON15)).toEqual(true);
expect(camera.direction.equalsEpsilon(up, CesiumMath.EPSILON15)).toEqual(true);
@@ -83,7 +83,7 @@ defineSuite([
expect(camera.position.equalsEpsilon(Cartesian3.UNIT_Y.negate(), CesiumMath.EPSILON15)).toEqual(true);
});
- it("move up with constrained Z", function() {
+ it('move up with constrained Z', function() {
csc.moveUpWithConstrainedZ(rotaterate);
expect(camera.up.equalsEpsilon(up, CesiumMath.EPSILON15)).toEqual(true);
expect(camera.direction.equalsEpsilon(dir, CesiumMath.EPSILON15)).toEqual(true);
@@ -91,7 +91,7 @@ defineSuite([
expect(camera.position.equalsEpsilon(position, CesiumMath.EPSILON15)).toEqual(true);
});
- it("move down", function() {
+ it('move down', function() {
csc.moveDown(rotaterate);
expect(camera.up.equalsEpsilon(dir, CesiumMath.EPSILON15)).toEqual(true);
expect(camera.direction.equalsEpsilon(up.negate(), CesiumMath.EPSILON15)).toEqual(true);
@@ -99,7 +99,7 @@ defineSuite([
expect(camera.position.equalsEpsilon(Cartesian3.UNIT_Y, CesiumMath.EPSILON15)).toEqual(true);
});
- it("move down with constrained Z", function() {
+ it('move down with constrained Z', function() {
csc.moveDownWithConstrainedZ(-rotaterate);
expect(camera.up.equalsEpsilon(up, CesiumMath.EPSILON15)).toEqual(true);
expect(camera.direction.equalsEpsilon(dir, CesiumMath.EPSILON15)).toEqual(true);
@@ -107,7 +107,7 @@ defineSuite([
expect(camera.position.equalsEpsilon(position, CesiumMath.EPSILON15)).toEqual(true);
});
- it("move left", function() {
+ it('move left', function() {
csc.moveLeft(rotaterate);
expect(camera.up.equalsEpsilon(up, CesiumMath.EPSILON15)).toEqual(true);
expect(camera.direction.equalsEpsilon(right, CesiumMath.EPSILON15)).toEqual(true);
@@ -115,7 +115,7 @@ defineSuite([
expect(camera.position.equalsEpsilon(Cartesian3.UNIT_X.negate(), CesiumMath.EPSILON15)).toEqual(true);
});
- it("move left with contrained Z", function() {
+ it('move left with contrained Z', function() {
csc.moveLeftWithConstrainedZ(rotaterate);
expect(camera.up.equalsEpsilon(Cartesian3.UNIT_X, CesiumMath.EPSILON15)).toEqual(true);
expect(camera.direction.equalsEpsilon(Cartesian3.UNIT_Z.negate(), CesiumMath.EPSILON15)).toEqual(true);
@@ -123,7 +123,7 @@ defineSuite([
expect(camera.position.equalsEpsilon(Cartesian3.UNIT_Z, CesiumMath.EPSILON15)).toEqual(true);
});
- it("move right", function() {
+ it('move right', function() {
csc.moveRight(rotaterate);
expect(camera.up.equalsEpsilon(up, CesiumMath.EPSILON15)).toEqual(true);
expect(camera.direction.equalsEpsilon(right.negate(), CesiumMath.EPSILON15)).toEqual(true);
@@ -131,7 +131,7 @@ defineSuite([
expect(camera.position.equalsEpsilon(Cartesian3.UNIT_X, CesiumMath.EPSILON15)).toEqual(true);
});
- it("move right with contrained Z", function() {
+ it('move right with contrained Z', function() {
csc.moveRightWithConstrainedZ(rotaterate);
expect(camera.up.equalsEpsilon(Cartesian3.UNIT_X.negate(), CesiumMath.EPSILON15)).toEqual(true);
expect(camera.direction.equalsEpsilon(Cartesian3.UNIT_Z.negate(), CesiumMath.EPSILON15)).toEqual(true);
@@ -139,7 +139,7 @@ defineSuite([
expect(camera.position.equalsEpsilon(Cartesian3.UNIT_Z, CesiumMath.EPSILON15)).toEqual(true);
});
- it("zoom in", function() {
+ it('zoom in', function() {
camera.position = new Cartesian3();
csc.zoomIn(moverate);
expect(camera.position.equals(new Cartesian3(0.0, 0.0, -moverate))).toEqual(true);
@@ -148,7 +148,7 @@ defineSuite([
expect(camera.right.equals(right)).toEqual(true);
});
- it("zoom out", function() {
+ it('zoom out', function() {
camera.position = new Cartesian3();
csc.zoomOut(moverate);
expect(camera.position.equals(new Cartesian3(0.0, 0.0, moverate))).toEqual(true);
@@ -157,7 +157,7 @@ defineSuite([
expect(camera.right.equals(right)).toEqual(true);
});
- it("rotate", function() {
+ it('rotate', function() {
var camera2 = new Camera(document);
camera2.position = position;
camera2.up = up;
@@ -179,7 +179,7 @@ defineSuite([
expect(camera.right.equalsEpsilon(camera2.right, CesiumMath.EPSILON15));
});
- it("isDestroyed", function() {
+ it('isDestroyed', function() {
expect(csc.isDestroyed()).toEqual(false);
csc.destroy();
expect(csc.isDestroyed()).toEqual(true);
diff --git a/Specs/Scene/CompositePrimitiveSpec.js b/Specs/Scene/CompositePrimitiveSpec.js
index 20b96abd1fd..7b65187eecf 100644
--- a/Specs/Scene/CompositePrimitiveSpec.js
+++ b/Specs/Scene/CompositePrimitiveSpec.js
@@ -74,7 +74,7 @@ defineSuite([
y : 0.0,
z : 0.0
},
- text : "x",
+ text : 'x',
horizontalOrigin : HorizontalOrigin.CENTER,
verticalOrigin : VerticalOrigin.CENTER
});
@@ -95,26 +95,26 @@ defineSuite([
return polygon;
}
- it("gets default show", function() {
+ it('gets default show', function() {
expect(primitives.show).toEqual(true);
});
- it("get throws if index is undefined", function() {
+ it('get throws if index is undefined', function() {
expect(function() {
primitives.get(undefined);
}).toThrow();
});
- it("has zero primitives when constructed", function() {
+ it('has zero primitives when constructed', function() {
expect(primitives.getLength()).toEqual(0);
});
- it("adds a primitive with add()", function() {
+ it('adds a primitive with add()', function() {
primitives.add(createLabels());
expect(primitives.getLength()).toEqual(1);
});
- it("removes the first primitive", function() {
+ it('removes the first primitive', function() {
var p0 = createLabels();
var p1 = createLabels();
@@ -131,7 +131,7 @@ defineSuite([
expect(primitives.getLength()).toEqual(0);
});
- it("removes the last primitive", function() {
+ it('removes the last primitive', function() {
var p0 = createLabels();
var p1 = createLabels();
@@ -148,7 +148,7 @@ defineSuite([
expect(primitives.getLength()).toEqual(0);
});
- it("removes a primitive twice", function() {
+ it('removes a primitive twice', function() {
var p0 = createLabels();
primitives.add(p0);
@@ -156,11 +156,11 @@ defineSuite([
expect(primitives.remove(p0)).toEqual(false);
});
- it("removes null", function() {
+ it('removes null', function() {
expect(primitives.remove()).toEqual(false);
});
- it("removes all primitives", function() {
+ it('removes all primitives', function() {
primitives.add(createLabels());
primitives.add(createLabels());
primitives.add(createLabels());
@@ -171,14 +171,14 @@ defineSuite([
expect(primitives.getLength()).toEqual(0);
});
- it("contains a primitive", function() {
+ it('contains a primitive', function() {
var labels = createLabels();
primitives.add(labels);
expect(primitives.contains(labels)).toEqual(true);
});
- it("doesn't contain a primitive", function() {
+ it('does not contain a primitive', function() {
var labels0 = createLabels();
var labels1 = createLabels();
primitives.add(labels0);
@@ -186,11 +186,11 @@ defineSuite([
expect(primitives.contains(labels1)).toEqual(false);
});
- it("doesn't contain undefined", function() {
+ it('does not contain undefined', function() {
expect(primitives.contains()).toEqual(false);
});
- it("adds and removes a primitive in two composites", function() {
+ it('adds and removes a primitive in two composites', function() {
var p = createLabels();
primitives.add(p);
@@ -220,7 +220,7 @@ defineSuite([
otherPrimitives.destroy();
});
- it("doesn't remove from a second composite", function() {
+ it('does not remove from a second composite', function() {
var p = createLabels();
primitives.add(p);
@@ -230,11 +230,11 @@ defineSuite([
expect(otherPrimitives.remove(p)).toEqual(false);
});
- it("gets default destroyPrimitives", function() {
+ it('gets default destroyPrimitives', function() {
expect(primitives.destroyPrimitives).toEqual(true);
});
- it("setting a central body", function() {
+ it('setting a central body', function() {
var ellipsoid = Ellipsoid.UNIT_SPHERE;
var cb = new CentralBody(ellipsoid);
primitives.setCentralBody(cb);
@@ -242,7 +242,7 @@ defineSuite([
expect(primitives.getCentralBody()).toBe(cb);
});
- it("renders a central body", function() {
+ it('renders a central body', function() {
context.clear();
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
@@ -254,7 +254,7 @@ defineSuite([
expect(context.readPixels()).not.toEqualArray([0, 0, 0, 0]);
});
- it("renders a primitive added with add()", function() {
+ it('renders a primitive added with add()', function() {
context.clear();
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
@@ -264,7 +264,7 @@ defineSuite([
expect(context.readPixels()).not.toEqualArray([0, 0, 0, 0]);
});
- it("doesn't render", function() {
+ it('does not render', function() {
context.clear();
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
@@ -275,7 +275,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
});
- it("renders a primitive in more than one composite", function() {
+ it('renders a primitive in more than one composite', function() {
var otherPrimitives = new CompositePrimitive(context);
context.clear();
@@ -301,7 +301,7 @@ defineSuite([
otherPrimitives.destroy();
});
- it("renders child composites", function() {
+ it('renders child composites', function() {
context.clear();
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
@@ -314,7 +314,7 @@ defineSuite([
expect(context.readPixels()).not.toEqualArray([0, 0, 0, 0]);
});
- it("picks a primitive added with add()", function() {
+ it('picks a primitive added with add()', function() {
var labels = createLabels();
var l = labels.get(0);
@@ -325,7 +325,7 @@ defineSuite([
expect(pickedObject).toEqual(l);
});
- it("doesn't pick", function() {
+ it('does not pick', function() {
var labels = createLabels();
primitives.show = false;
@@ -336,7 +336,7 @@ defineSuite([
expect(pickedObject).not.toBeDefined();
});
- it("picks child composites", function() {
+ it('picks child composites', function() {
var labels = createLabels();
var l = labels.get(0);
@@ -350,7 +350,7 @@ defineSuite([
expect(pickedObject).toEqual(l);
});
- it("picks a primitive added with render order (0)", function() {
+ it('picks a primitive added with render order (0)', function() {
var p0 = createPolygon();
var p1 = createPolygon();
@@ -362,7 +362,7 @@ defineSuite([
expect(pickedObject).toEqual(p1);
});
- it("picks a primitive added with render order (1)", function() {
+ it('picks a primitive added with render order (1)', function() {
var p0 = createPolygon();
var p1 = createPolygon();
@@ -374,7 +374,7 @@ defineSuite([
expect(pickedObject).toEqual(p0);
});
- it("picks a primitive added with bringForward (0)", function() {
+ it('picks a primitive added with bringForward (0)', function() {
var p0 = createPolygon();
var p1 = createPolygon();
@@ -387,7 +387,7 @@ defineSuite([
expect(pickedObject).toEqual(p1);
});
- it("picks a primitive added with bringForward (1)", function() {
+ it('picks a primitive added with bringForward (1)', function() {
var p0 = createPolygon();
var p1 = createPolygon();
@@ -400,7 +400,7 @@ defineSuite([
expect(pickedObject).toEqual(p0);
});
- it("picks a primitive added with bringToFront (0)", function() {
+ it('picks a primitive added with bringToFront (0)', function() {
var p0 = createPolygon();
var p1 = createPolygon();
@@ -413,7 +413,7 @@ defineSuite([
expect(pickedObject).toEqual(p1);
});
- it("picks a primitive added with bringToFront (1)", function() {
+ it('picks a primitive added with bringToFront (1)', function() {
var p0 = createPolygon();
var p1 = createPolygon();
@@ -426,7 +426,7 @@ defineSuite([
expect(pickedObject).toEqual(p0);
});
- it("picks a primitive added with sendBackward (0)", function() {
+ it('picks a primitive added with sendBackward (0)', function() {
var p0 = createPolygon();
var p1 = createPolygon();
@@ -439,7 +439,7 @@ defineSuite([
expect(pickedObject).toEqual(p0);
});
- it("picks a primitive added with sendBackward (1)", function() {
+ it('picks a primitive added with sendBackward (1)', function() {
var p0 = createPolygon();
var p1 = createPolygon();
@@ -452,7 +452,7 @@ defineSuite([
expect(pickedObject).toEqual(p1);
});
- it("picks a primitive added with sendToBack (0)", function() {
+ it('picks a primitive added with sendToBack (0)', function() {
var p0 = createPolygon();
var p1 = createPolygon();
@@ -465,7 +465,7 @@ defineSuite([
expect(pickedObject).toEqual(p0);
});
- it("picks a primitive added with sendToBack (1)", function() {
+ it('picks a primitive added with sendToBack (1)', function() {
var p0 = createPolygon();
var p1 = createPolygon();
@@ -478,17 +478,17 @@ defineSuite([
expect(pickedObject).toEqual(p1);
});
- it("is not destroyed when first constructed", function() {
+ it('is not destroyed when first constructed', function() {
expect(primitives.isDestroyed()).toEqual(false);
});
- it("is destroyed after calling destroy()", function() {
+ it('is destroyed after calling destroy()', function() {
var p = new CompositePrimitive();
p.destroy();
expect(p.isDestroyed()).toEqual(true);
});
- it("destroys its primitives", function() {
+ it('destroys its primitives', function() {
var labels = new LabelCollection(context);
primitives.add(labels);
@@ -498,7 +498,7 @@ defineSuite([
expect(labels.isDestroyed()).toEqual(true);
});
- it("destroys children", function() {
+ it('destroys children', function() {
var labels = new LabelCollection(context);
var children = new CompositePrimitive();
@@ -513,7 +513,7 @@ defineSuite([
expect(labels.isDestroyed()).toEqual(true);
});
- it("destroys primitive on remove", function() {
+ it('destroys primitive on remove', function() {
var labels = new LabelCollection(context);
primitives.add(labels);
@@ -523,7 +523,7 @@ defineSuite([
expect(labels.isDestroyed()).toEqual(true);
});
- it("destroys primitive on removeAll", function() {
+ it('destroys primitive on removeAll', function() {
var labels = new LabelCollection(context);
primitives.add(labels);
@@ -533,7 +533,7 @@ defineSuite([
expect(labels.isDestroyed()).toEqual(true);
});
- it("destroys primitive on setCentralBody", function() {
+ it('destroys primitive on setCentralBody', function() {
var cb = new CentralBody(Ellipsoid.UNIT_SPHERE);
primitives.setCentralBody(cb);
@@ -543,7 +543,7 @@ defineSuite([
expect(cb.isDestroyed()).toEqual(true);
});
- it("doesn't destroy its primitives", function() {
+ it('does not destroy its primitives', function() {
var labels = new LabelCollection(context);
primitives.destroyPrimitives = false;
@@ -557,7 +557,7 @@ defineSuite([
expect(labels.isDestroyed()).toEqual(true);
});
- it("doesn't destroy primitive on remove", function() {
+ it('does not destroy primitive on remove', function() {
var labels = new LabelCollection(context);
primitives.destroyPrimitives = false;
@@ -571,7 +571,7 @@ defineSuite([
expect(labels.isDestroyed()).toEqual(true);
});
- it("doesn't destroy primitive on removeAll", function() {
+ it('does not destroy primitive on removeAll', function() {
var labels = new LabelCollection(context);
primitives.destroyPrimitives = false;
@@ -585,7 +585,7 @@ defineSuite([
expect(labels.isDestroyed()).toEqual(true);
});
- it("doesn't destroy primitive on setCentralBody", function() {
+ it('does not destroy primitive on setCentralBody', function() {
var cb = new CentralBody(Ellipsoid.UNIT_SPHERE);
primitives.destroyPrimitives = false;
@@ -599,13 +599,13 @@ defineSuite([
expect(cb.isDestroyed()).toEqual(true);
});
- it("throws when add() without an primitive", function() {
+ it('throws when add() without an primitive', function() {
expect(function() {
primitives.add();
}).toThrow();
});
- it("bringForward throws when primitive is not in composite", function() {
+ it('bringForward throws when primitive is not in composite', function() {
var p = createLabels();
expect(function() {
@@ -613,7 +613,7 @@ defineSuite([
}).toThrow();
});
- it("bringToFront throws when primitive is not in composite", function() {
+ it('bringToFront throws when primitive is not in composite', function() {
var p = createLabels();
expect(function() {
@@ -621,7 +621,7 @@ defineSuite([
}).toThrow();
});
- it("sendBackward throws when primitive is not in composite", function() {
+ it('sendBackward throws when primitive is not in composite', function() {
var p = createLabels();
expect(function() {
@@ -629,7 +629,7 @@ defineSuite([
}).toThrow();
});
- it("sendToBack throws when primitive is not in composite", function() {
+ it('sendToBack throws when primitive is not in composite', function() {
var p = createLabels();
expect(function() {
diff --git a/Specs/Scene/LabelCollectionSpec.js b/Specs/Scene/LabelCollectionSpec.js
index 7f92c6d89f9..f9a05b674b8 100644
--- a/Specs/Scene/LabelCollectionSpec.js
+++ b/Specs/Scene/LabelCollectionSpec.js
@@ -57,12 +57,12 @@ defineSuite([
destroyContext(context);
});
- it("default constructs a label", function() {
+ it('default constructs a label', function() {
var l = labels.add();
expect(l.getShow()).toEqual(true);
expect(l.getPosition().equals(Cartesian3.ZERO)).toEqual(true);
- expect(l.getText()).toEqual("");
- expect(l.getFont()).toEqual("30px sans-serif");
+ expect(l.getText()).toEqual('');
+ expect(l.getFont()).toEqual('30px sans-serif');
expect(l.getFillColor().red).toEqual(1.0);
expect(l.getFillColor().green).toEqual(1.0);
expect(l.getFillColor().blue).toEqual(1.0);
@@ -79,12 +79,12 @@ defineSuite([
expect(l.getScale()).toEqual(1.0);
});
- it("explicitly constructs a label", function() {
+ it('explicitly constructs a label', function() {
var l = labels.add({
show : false,
position : new Cartesian3(1.0, 2.0, 3.0),
- text : "abc",
- font : "24px Helvetica",
+ text : 'abc',
+ font : '24px Helvetica',
fillColor : {
red : 2.0,
green : 3.0,
@@ -113,8 +113,8 @@ defineSuite([
expect(l.getShow()).toEqual(false);
expect(l.getPosition().equals(new Cartesian3(1.0, 2.0, 3.0))).toEqual(true);
- expect(l.getText()).toEqual("abc");
- expect(l.getFont()).toEqual("24px Helvetica");
+ expect(l.getText()).toEqual('abc');
+ expect(l.getFont()).toEqual('24px Helvetica');
expect(l.getFillColor().red).toEqual(2.0);
expect(l.getFillColor().green).toEqual(3.0);
expect(l.getFillColor().blue).toEqual(4.0);
@@ -131,12 +131,12 @@ defineSuite([
expect(l.getScale()).toEqual(2.0);
});
- it("sets a labels's properties", function() {
+ it('sets label properties', function() {
var l = labels.add();
l.setShow(false);
l.setPosition(new Cartesian3(1.0, 2.0, 3.0));
- l.setText("abc");
- l.setFont("24px Helvetica");
+ l.setText('abc');
+ l.setFont('24px Helvetica');
l.setFillColor({
red : 2.0,
green : 3.0,
@@ -158,8 +158,8 @@ defineSuite([
expect(l.getShow()).toEqual(false);
expect(l.getPosition().equals(new Cartesian3(1.0, 2.0, 3.0))).toEqual(true);
- expect(l.getText()).toEqual("abc");
- expect(l.getFont()).toEqual("24px Helvetica");
+ expect(l.getText()).toEqual('abc');
+ expect(l.getFont()).toEqual('24px Helvetica');
expect(l.getFillColor().red).toEqual(2.0);
expect(l.getFillColor().green).toEqual(3.0);
expect(l.getFillColor().blue).toEqual(4.0);
@@ -176,27 +176,27 @@ defineSuite([
expect(l.getScale()).toEqual(2.0);
});
- it("can specify font using units other than pixels", function() {
+ it('can specify font using units other than pixels', function() {
var l = labels.add({
font : '12pt Arial',
- text : "Hello"
+ text : 'Hello'
});
var dimension = l._billboards[0]._labelDimension;
expect(dimension.height).toBeGreaterThan(0);
});
- it("sets a removed label's property", function() {
+ it('sets removed label property', function() {
var l = labels.add();
labels.remove(l);
l.setShow(false);
expect(l.getShow()).toEqual(false);
});
- it("has zero labels when constructed", function() {
+ it('has zero labels when constructed', function() {
expect(labels.getLength()).toEqual(0);
});
- it("adds a label", function() {
+ it('adds a label', function() {
var l = labels.add({
position : {
x : 1.0,
@@ -209,7 +209,7 @@ defineSuite([
expect(labels.get(0).equals(l)).toEqual(true);
});
- it("removes the first label", function() {
+ it('removes the first label', function() {
var one = labels.add({
position : {
x : 1.0,
@@ -233,7 +233,7 @@ defineSuite([
expect(labels.get(0).equals(two)).toEqual(true);
});
- it("removes the last label", function() {
+ it('removes the last label', function() {
var one = labels.add({
position : {
x : 1.0,
@@ -257,7 +257,7 @@ defineSuite([
expect(labels.get(0).equals(one)).toEqual(true);
});
- it("removes the same label twice", function() {
+ it('removes the same label twice', function() {
var l = labels.add({
position : {
x : 1.0,
@@ -274,7 +274,7 @@ defineSuite([
expect(labels.getLength()).toEqual(0);
});
- it("removes null", function() {
+ it('removes null', function() {
labels.add({
position : {
x : 1.0,
@@ -288,7 +288,7 @@ defineSuite([
expect(labels.getLength()).toEqual(1);
});
- it("adds and removes labels", function() {
+ it('adds and removes labels', function() {
var one = labels.add({
position : {
x : 1.0,
@@ -320,7 +320,7 @@ defineSuite([
expect(labels.get(1).equals(three)).toEqual(true);
});
- it("removes all labels", function() {
+ it('removes all labels', function() {
labels.add({
position : {
x : 1.0,
@@ -341,14 +341,14 @@ defineSuite([
expect(labels.getLength()).toEqual(0);
});
- it("contains a label", function() {
+ it('contains a label', function() {
var l = labels.add();
labels.add(l);
expect(labels.contains(l)).toEqual(true);
});
- it("doesn't contain a label", function() {
+ it('does not contain a label', function() {
var l0 = labels.add();
var l1 = labels.add();
@@ -359,15 +359,15 @@ defineSuite([
expect(labels.contains(l0)).toEqual(false);
});
- it("doesn't contain undefined", function() {
+ it('does not contain undefined', function() {
expect(labels.contains()).toEqual(false);
});
- it("gets default buffer usage", function() {
+ it('gets default buffer usage', function() {
expect(labels.bufferUsage).toEqual(BufferUsage.STATIC_DRAW);
});
- it("doesn't render when constructed", function() {
+ it('does not render when constructed', function() {
context.clear();
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
@@ -376,14 +376,14 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
});
- it("modifies and removes a label, then renders", function() {
+ it('modifies and removes a label, then renders', function() {
var l = labels.add({
position : {
x : 0.0,
y : 0.0,
z : 0.0
},
- text : "x",
+ text : 'x',
horizontalOrigin : HorizontalOrigin.CENTER,
verticalOrigin : VerticalOrigin.CENTER
});
@@ -393,7 +393,7 @@ defineSuite([
y : 0.0,
z : 0.0
},
- text : "o",
+ text : 'o',
horizontalOrigin : HorizontalOrigin.CENTER,
verticalOrigin : VerticalOrigin.CENTER
});
@@ -420,14 +420,14 @@ defineSuite([
expect((p[3] === 0) || (p[3] === 255)).toEqual(true); // ANGLE Workaround: Blending or texture alpha channel is buggy
});
- it("renders a label", function() {
+ it('renders a label', function() {
labels.add({
position : {
x : 0.0,
y : 0.0,
z : 0.0
},
- text : "x",
+ text : 'x',
horizontalOrigin : HorizontalOrigin.CENTER,
verticalOrigin : VerticalOrigin.CENTER
});
@@ -440,14 +440,14 @@ defineSuite([
expect(context.readPixels()).not.toEqualArray([0, 0, 0, 0]);
});
- it("adds and renders a label", function() {
+ it('adds and renders a label', function() {
labels.add({
position : {
x : 0.0,
y : 0.0,
z : 0.0
},
- text : "x",
+ text : 'x',
horizontalOrigin : HorizontalOrigin.CENTER,
verticalOrigin : VerticalOrigin.CENTER
});
@@ -465,7 +465,7 @@ defineSuite([
y : 0.0,
z : 0.0
}, // Closer to viewer
- text : "x",
+ text : 'x',
fillColor : {
red : 1.0,
green : 0.0,
@@ -481,14 +481,14 @@ defineSuite([
expect(context.readPixels()).not.toEqualArray([0, 0, 0, 0]); // Not the most precise check
});
- it("removes and renders a label", function() {
+ it('removes and renders a label', function() {
var l = labels.add({
position : {
x : 0.0,
y : 0.0,
z : 0.0
},
- text : "x",
+ text : 'x',
horizontalOrigin : HorizontalOrigin.CENTER,
verticalOrigin : VerticalOrigin.CENTER
});
@@ -509,14 +509,14 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
});
- it("removes all labels and renders", function() {
+ it('removes all labels and renders', function() {
labels.add({
position : {
x : 0.0,
y : 0.0,
z : 0.0
},
- text : "x",
+ text : 'x',
horizontalOrigin : HorizontalOrigin.CENTER,
verticalOrigin : VerticalOrigin.CENTER
});
@@ -537,14 +537,14 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
});
- it("removes all labels, adds a label, and renders", function() {
+ it('removes all labels, adds a label, and renders', function() {
labels.add({
position : {
x : 0.0,
y : 0.0,
z : 0.0
},
- text : "x",
+ text : 'x',
horizontalOrigin : HorizontalOrigin.CENTER,
verticalOrigin : VerticalOrigin.CENTER
});
@@ -566,7 +566,7 @@ defineSuite([
y : 0.0,
z : 0.0
},
- text : "x",
+ text : 'x',
horizontalOrigin : HorizontalOrigin.CENTER,
verticalOrigin : VerticalOrigin.CENTER
});
@@ -576,14 +576,14 @@ defineSuite([
expect(context.readPixels()).not.toEqualArray([0, 0, 0, 0]);
});
- it("renders with a different buffer usage", function() {
+ it('renders with a different buffer usage', function() {
labels.add({
position : {
x : 0.0,
y : 0.0,
z : 0.0
},
- text : "x",
+ text : 'x',
horizontalOrigin : HorizontalOrigin.CENTER,
verticalOrigin : VerticalOrigin.CENTER
});
@@ -604,14 +604,14 @@ defineSuite([
expect(context.readPixels()).not.toEqualArray([0, 0, 0, 0]);
});
- it("renders using label's show property", function() {
+ it('renders using show property', function() {
var l = labels.add({
position : {
x : 0.0,
y : 0.0,
z : 0.0
},
- text : "x",
+ text : 'x',
horizontalOrigin : HorizontalOrigin.CENTER,
verticalOrigin : VerticalOrigin.CENTER
});
@@ -637,14 +637,14 @@ defineSuite([
expect(context.readPixels()).not.toEqualArray([0, 0, 0, 0]);
});
- it("renders using label's position property", function() {
+ it('renders using position property', function() {
var l = labels.add({
position : {
x : 0.0,
y : 0.0,
z : 0.0
},
- text : "x",
+ text : 'x',
horizontalOrigin : HorizontalOrigin.CENTER,
verticalOrigin : VerticalOrigin.CENTER
});
@@ -678,14 +678,14 @@ defineSuite([
expect(context.readPixels()).not.toEqualArray([0, 0, 0, 0]);
});
- it("renders using label's scale property", function() {
+ it('renders using scale property', function() {
var l = labels.add({
position : {
x : 0.0,
y : 0.0,
z : 0.0
},
- text : "x",
+ text : 'x',
horizontalOrigin : HorizontalOrigin.CENTER,
verticalOrigin : VerticalOrigin.CENTER
});
@@ -711,14 +711,14 @@ defineSuite([
expect(context.readPixels()).not.toEqualArray([0, 0, 0, 0]);
});
- it("is picked", function() {
+ it('is picked', function() {
var l = labels.add({
position : {
x : 0.0,
y : 0.0,
z : 0.0
},
- text : "x",
+ text : 'x',
horizontalOrigin : HorizontalOrigin.CENTER,
verticalOrigin : VerticalOrigin.CENTER
});
@@ -729,7 +729,7 @@ defineSuite([
expect(pickedObject).toEqual(l);
});
- it("is not picked", function() {
+ it('is not picked', function() {
labels.add({
show : false,
position : {
@@ -737,7 +737,7 @@ defineSuite([
y : 0.0,
z : 0.0
},
- text : "x",
+ text : 'x',
horizontalOrigin : HorizontalOrigin.CENTER,
verticalOrigin : VerticalOrigin.CENTER
});
@@ -748,7 +748,7 @@ defineSuite([
expect(pickedObject).not.toBeDefined();
});
- it("computes screen space position (1)", function() {
+ it('computes screen space position (1)', function() {
var l = labels.add({
position : {
x : 0.0,
@@ -760,7 +760,7 @@ defineSuite([
expect(l.computeScreenSpacePosition(us).equals(new Cartesian2(0.5, 0.5)));
});
- it("computes screen space position (2)", function() {
+ it('computes screen space position (2)', function() {
var l = labels.add({
position : {
x : 0.0,
@@ -776,7 +776,7 @@ defineSuite([
expect(l.computeScreenSpacePosition(us).equals(new Cartesian2(1.5, 2.5)));
});
- it("computes screen space position (3)", function() {
+ it('computes screen space position (3)', function() {
var l = labels.add({
position : {
x : 0.0,
@@ -795,7 +795,7 @@ defineSuite([
expect(p.y).toBeGreaterThan(0.5);
});
- it("throws when computing screen space position when not in a collection", function() {
+ it('throws when computing screen space position when not in a collection', function() {
var l = labels.add();
labels.remove(l);
@@ -804,7 +804,7 @@ defineSuite([
}).toThrow();
});
- it("throws when computing screen space position without uniform state", function() {
+ it('throws when computing screen space position without uniform state', function() {
var l = labels.add();
expect(function() {
@@ -812,14 +812,14 @@ defineSuite([
}).toThrow();
});
- it("equals another label", function() {
+ it('equals another label', function() {
var l = labels.add({
position : {
x : 1.0,
y : 2.0,
z : 3.0
},
- text : "equals"
+ text : 'equals'
});
var l2 = labels.add({
position : {
@@ -827,13 +827,13 @@ defineSuite([
y : 2.0,
z : 3.0
},
- text : "equals"
+ text : 'equals'
});
expect(l.equals(l2)).toEqual(true);
});
- it("doesn't equal another label", function() {
+ it('does not equal another label', function() {
var l = labels.add({
position : {
x : 1.0,
@@ -852,35 +852,35 @@ defineSuite([
expect(l.equals(l2)).toEqual(false);
});
- it("doesn't equal null", function() {
+ it('does not equal null', function() {
var l = labels.add({});
expect(l.equals(null)).toBeFalsy();
});
- it("throws when accessing without an index", function() {
+ it('throws when accessing without an index', function() {
expect(function() {
labels.get();
}).toThrow();
});
- it("cache should have distinct entries", function() {
+ it('cache should have distinct entries', function() {
labels.add({
- text : "a"
+ text : 'a'
});
expect(labels._canvasContainer.getItems().length).toEqual(1);
labels.add({
- text : "a"
+ text : 'a'
});
expect(labels._canvasContainer.getItems().length).toEqual(1);
labels.add({
- text : "ab"
+ text : 'ab'
});
expect(labels._canvasContainer.getItems().length).toEqual(2);
var label = labels.add({
- text : "abc"
+ text : 'abc'
});
expect(labels._canvasContainer.getItems().length).toEqual(3);
- label.setFont("30px arial");
+ label.setFont('30px arial');
expect(labels._canvasContainer.getItems().length).toEqual(6);
label.setStyle(LabelStyle.OUTLINE);
expect(labels._canvasContainer.getItems().length).toEqual(9);
@@ -901,26 +901,26 @@ defineSuite([
label.setVerticalOrigin(VerticalOrigin.CENTER);
expect(labels._canvasContainer.getItems().length).toEqual(18);
//even though we originally started with 30px sans-serif, other properties used to create the id have changed
- label.setFont("30px sans-serif");
+ label.setFont('30px sans-serif');
expect(labels._canvasContainer.getItems().length).toEqual(21);
});
- it("billboards should equal number of characters", function() {
+ it('billboards should equal number of characters', function() {
var label = labels.add({
- text : "abc"
+ text : 'abc'
});
expect(label._billboards.length).toEqual(3);
- label.setText("abcd");
+ label.setText('abcd');
expect(label._billboards.length).toEqual(4);
- label.setText("");
+ label.setText('');
expect(label._billboards.length).toEqual(0);
label = labels.add();
expect(label._billboards.length).toEqual(0);
});
- it("pixelOffsets of billboards should should be correct when verticalOrigin is changed", function() {
+ it('pixelOffsets of billboards should should be correct when verticalOrigin is changed', function() {
var label = labels.add({
- text : "apl"
+ text : 'apl'
});
var y0 = label._billboards[0]._pixelOffset.y;
var y1 = label._billboards[1]._pixelOffset.y;
@@ -936,9 +936,9 @@ defineSuite([
expect(label._billboards[2]._pixelOffset.y).toEqual(y2);
});
- it("pixelOffsets of billboards should should be correct when verticalOrigin and scale are changed", function() {
+ it('pixelOffsets of billboards should should be correct when verticalOrigin and scale are changed', function() {
var label = labels.add({
- text : "apl"
+ text : 'apl'
});
var x0 = label._billboards[0]._pixelOffset.x;
var y0 = label._billboards[0]._pixelOffset.y;
@@ -970,9 +970,9 @@ defineSuite([
expect(label._billboards[2]._pixelOffset.y).toBeGreaterThan(y2);
});
- it("pixelOffsets of billboards should should be correct when HorizontalOrigin is changed", function() {
+ it('pixelOffsets of billboards should should be correct when HorizontalOrigin is changed', function() {
var label = labels.add({
- text : "apl"
+ text : 'apl'
});
var x0 = label._billboards[0]._pixelOffset.x;
label.setHorizontalOrigin(HorizontalOrigin.CENTER);
@@ -989,9 +989,9 @@ defineSuite([
expect(label._billboards[2]._pixelOffset.x).toBeLessThan(centerX2);
});
- it("pixelOffsets of billboards should should be correct when HorizontalOrigin and scale are changed", function() {
+ it('pixelOffsets of billboards should should be correct when HorizontalOrigin and scale are changed', function() {
var label = labels.add({
- text : "apl"
+ text : 'apl'
});
var x0 = label._billboards[0]._pixelOffset.x;
var x1 = label._billboards[1]._pixelOffset.x;
@@ -1014,9 +1014,9 @@ defineSuite([
expect(label._billboards[2]._pixelOffset.x).toBeLessThan(centerX2);
});
- it("pixelOffsets of billboards should should be correct when verticalOrigin, scale and pixelOffset are changed", function() {
+ it('pixelOffsets of billboards should should be correct when verticalOrigin, scale and pixelOffset are changed', function() {
var label = labels.add({
- text : "apl"
+ text : 'apl'
});
var x0 = label._billboards[0]._pixelOffset.x;
var y0 = label._billboards[0]._pixelOffset.y;
@@ -1052,9 +1052,9 @@ defineSuite([
expect(label._billboards[2]._pixelOffset.y).toBeGreaterThan(y2);
});
- it("pixelOffsets of billboards should should be correct when fontsize changes", function() {
+ it('pixelOffsets of billboards should should be correct when fontsize changes', function() {
var label = labels.add({
- text : "apl"
+ text : 'apl'
});
var x0 = label._billboards[0]._pixelOffset.x;
var y0 = label._billboards[0]._pixelOffset.y;
@@ -1062,7 +1062,7 @@ defineSuite([
var y1 = label._billboards[1]._pixelOffset.y;
var x2 = label._billboards[2]._pixelOffset.x;
var y2 = label._billboards[2]._pixelOffset.y;
- label.setFont("20px sans-serif");
+ label.setFont('20px sans-serif');
expect(label._billboards[0]._pixelOffset.x).toEqual(x0);
expect(label._billboards[0]._pixelOffset.y).toEqual(y0);
expect(label._billboards[1]._pixelOffset.x).toBeLessThan(x1);
@@ -1071,11 +1071,11 @@ defineSuite([
expect(label._billboards[2]._pixelOffset.y).toEqual(y2);
});
- it("pixelOffset should equal if set by constructor or properties", function() {
+ it('pixelOffset should equal if set by constructor or properties', function() {
var label = labels.add({
- text : "apl",
+ text : 'apl',
scale : 2,
- font : "20px sans-serif",
+ font : '20px sans-serif',
verticalOrigin : VerticalOrigin.CENTER,
pixelOffset : {
x : 10,
@@ -1083,9 +1083,9 @@ defineSuite([
}
});
var propLabel = labels.add();
- propLabel.setText("apl");
+ propLabel.setText('apl');
propLabel.setScale(2);
- propLabel.setFont("20px sans-serif");
+ propLabel.setFont('20px sans-serif');
propLabel.setVerticalOrigin(VerticalOrigin.CENTER);
propLabel.setPixelOffset({
x : 10,
@@ -1099,9 +1099,9 @@ defineSuite([
expect(label._billboards[2]._pixelOffset.y).toEqual(propLabel._billboards[2]._pixelOffset.y);
});
- it("pixelOffsets should not change if position changes", function() {
+ it('pixelOffsets should not change if position changes', function() {
var label = labels.add({
- text : "apl"
+ text : 'apl'
});
var x0 = label._billboards[0]._pixelOffset.x;
var y0 = label._billboards[0]._pixelOffset.y;
@@ -1122,9 +1122,9 @@ defineSuite([
expect(label._billboards[2]._pixelOffset.y).toEqual(y2);
});
- it("scale does not change billboard dimension", function() {
+ it('scale does not change billboard dimension', function() {
var label = labels.add({
- text : "apl"
+ text : 'apl'
});
var dimension = label._billboards[0]._labelDimension;
var width = dimension.width;
@@ -1138,9 +1138,9 @@ defineSuite([
});
- it("font size changes billboard dimension", function() {
+ it('font size changes billboard dimension', function() {
var label = labels.add({
- text : "apl"
+ text : 'apl'
});
var dimension = label._billboards[0]._labelDimension;
var width = dimension.width;
@@ -1149,7 +1149,7 @@ defineSuite([
expect(dimension.width).toEqual(16);
expect(dimension.height).toEqual(16);
expect(dimension.descent).toEqual(-1);
- label.setFont("20px sans-serif");
+ label.setFont('20px sans-serif');
dimension = label._billboards[0]._labelDimension;
expect(dimension.width).toBeLessThan(width);
expect(dimension.height).toBeLessThan(height);
diff --git a/Specs/Scene/OrthographicFrustumSpec.js b/Specs/Scene/OrthographicFrustumSpec.js
index c26c603455c..a26aa58133f 100644
--- a/Specs/Scene/OrthographicFrustumSpec.js
+++ b/Specs/Scene/OrthographicFrustumSpec.js
@@ -28,21 +28,21 @@ defineSuite([
planes = frustum.getPlanes(new Cartesian3(), Cartesian3.UNIT_Z.negate(), Cartesian3.UNIT_Y);
});
- it("left greater than right causes an exception", function() {
+ it('left greater than right causes an exception', function() {
frustum.left = frustum.right + 1.0;
expect(function() {
frustum.getProjectionMatrix();
}).toThrow();
});
- it("bottom greater than top throws an exception", function() {
+ it('bottom greater than top throws an exception', function() {
frustum.bottom = frustum.top + 1.0;
expect(function() {
frustum.getProjectionMatrix();
}).toThrow();
});
- it("out of range near plane throws an exception", function() {
+ it('out of range near plane throws an exception', function() {
frustum.near = -1.0;
expect(function() {
frustum.getProjectionMatrix();
@@ -54,85 +54,85 @@ defineSuite([
}).toThrow();
});
- it("negative far plane throws an exception", function() {
+ it('negative far plane throws an exception', function() {
frustum.far = -1.0;
expect(function() {
frustum.getProjectionMatrix();
}).toThrow();
});
- it("getPlanes with no position throws an exception", function() {
+ it('getPlanes with no position throws an exception', function() {
expect(function() {
frustum.getPlanes();
}).toThrow();
});
- it("getPlanes with no direction throws an exception", function() {
+ it('getPlanes with no direction throws an exception', function() {
expect(function() {
frustum.getPlanes(new Cartesian3());
}).toThrow();
});
- it("getPlanes with no up throws an exception", function() {
+ it('getPlanes with no up throws an exception', function() {
expect(function() {
frustum.getPlanes(new Cartesian3(), new Cartesian3());
}).toThrow();
});
- it("get frustum left plane", function() {
+ it('get frustum left plane', function() {
var leftPlane = planes[0];
var expectedResult = new Cartesian4(1.0, 0.0, 0.0, 1.0);
expect(leftPlane.equalsEpsilon(expectedResult, CesiumMath.EPSILON4)).toEqual(true);
});
- it("get frustum right plane", function() {
+ it('get frustum right plane', function() {
var rightPlane = planes[1];
var expectedResult = new Cartesian4(-1.0, 0.0, 0.0, 1.0);
expect(rightPlane.equalsEpsilon(expectedResult, CesiumMath.EPSILON4)).toEqual(true);
});
- it("get frustum bottom plane", function() {
+ it('get frustum bottom plane', function() {
var bottomPlane = planes[2];
var expectedResult = new Cartesian4(0.0, 1.0, 0.0, 1.0);
expect(bottomPlane.equalsEpsilon(expectedResult, CesiumMath.EPSILON4)).toEqual(true);
});
- it("get frustum top plane", function() {
+ it('get frustum top plane', function() {
var topPlane = planes[3];
var expectedResult = new Cartesian4(0.0, -1.0, 0.0, 1.0);
expect(topPlane.equalsEpsilon(expectedResult, CesiumMath.EPSILON4)).toEqual(true);
});
- it("get frustum near plane", function() {
+ it('get frustum near plane', function() {
var nearPlane = planes[4];
var expectedResult = new Cartesian4(0.0, 0.0, -1.0, -1.0);
expect(nearPlane.equalsEpsilon(expectedResult, CesiumMath.EPSILON4)).toEqual(true);
});
- it("get frustum far plane", function() {
+ it('get frustum far plane', function() {
var farPlane = planes[5];
var expectedResult = new Cartesian4(0.0, 0.0, 1.0, 3.0);
expect(farPlane.equalsEpsilon(expectedResult, CesiumMath.EPSILON4)).toEqual(true);
});
- it("get orthographic projection matrix", function() {
+ it('get orthographic projection matrix', function() {
var projectionMatrix = frustum.getProjectionMatrix();
var expected = Matrix4.createOrthographicOffCenter(frustum.left, frustum.right, frustum.top, frustum.bottm, frustum.near, frustum.far);
expect(projectionMatrix.equalsEpsilon(expected, CesiumMath.EPSILON6)).toEqual(true);
});
- it("clone", function() {
+ it('clone', function() {
var clone = frustum.clone();
expect(clone.equals(frustum)).toEqual(true);
});
- it("destroys", function() {
+ it('destroys', function() {
expect(frustum.isDestroyed()).toEqual(false);
frustum.destroy();
expect(frustum.isDestroyed()).toEqual(true);
});
- it("throws with null plane(s)", function() {
+ it('throws with null plane(s)', function() {
var frustum = new OrthographicFrustum();
expect(function() {
frustum.getProjectionMatrix();
diff --git a/Specs/Scene/PerspectiveFrustumSpec.js b/Specs/Scene/PerspectiveFrustumSpec.js
index b4cbac62e81..36ec1ed0f84 100644
--- a/Specs/Scene/PerspectiveFrustumSpec.js
+++ b/Specs/Scene/PerspectiveFrustumSpec.js
@@ -26,7 +26,7 @@ defineSuite([
planes = frustum.getPlanes(new Cartesian3(), Cartesian3.UNIT_Z.negate(), Cartesian3.UNIT_Y);
});
- it("out of range fov causes an exception", function() {
+ it('out of range fov causes an exception', function() {
frustum.fovy = -1.0;
expect(function() {
frustum.getProjectionMatrix();
@@ -38,14 +38,14 @@ defineSuite([
}).toThrow();
});
- it("negative aspect ratio throws an exception", function() {
+ it('negative aspect ratio throws an exception', function() {
frustum.aspectRatio = -1.0;
expect(function() {
frustum.getProjectionMatrix();
}).toThrow();
});
- it("out of range near plane throws an exception", function() {
+ it('out of range near plane throws an exception', function() {
frustum.near = -1.0;
expect(function() {
frustum.getProjectionMatrix();
@@ -57,74 +57,74 @@ defineSuite([
}).toThrow();
});
- it("negative far plane throws an exception", function() {
+ it('negative far plane throws an exception', function() {
frustum.far = -1.0;
expect(function() {
frustum.getProjectionMatrix();
}).toThrow();
});
- it("getPlanes with no position throws an exception", function() {
+ it('getPlanes with no position throws an exception', function() {
expect(function() {
frustum.getPlanes();
}).toThrow();
});
- it("getPlanes with no direction throws an exception", function() {
+ it('getPlanes with no direction throws an exception', function() {
expect(function() {
frustum.getPlanes(new Cartesian3());
}).toThrow();
});
- it("getPlanes with no up throws an exception", function() {
+ it('getPlanes with no up throws an exception', function() {
expect(function() {
frustum.getPlanes(new Cartesian3(), new Cartesian3());
}).toThrow();
});
- it("get frustum left plane", function() {
+ it('get frustum left plane', function() {
var leftPlane = planes[0];
var expectedResult = new Cartesian4(Math.sqrt(3) / 2, 0, -0.5, 0);
expect(leftPlane.equalsEpsilon(expectedResult, CesiumMath.EPSILON4)).toEqual(true);
});
- it("get frustum right plane", function() {
+ it('get frustum right plane', function() {
var rightPlane = planes[1];
var expectedResult = new Cartesian4(-Math.sqrt(3) / 2, 0, -0.5, 0);
expect(rightPlane.equalsEpsilon(expectedResult, CesiumMath.EPSILON4)).toEqual(true);
});
- it("get frustum bottom plane", function() {
+ it('get frustum bottom plane', function() {
var bottomPlane = planes[2];
var expectedResult = new Cartesian4(0, Math.sqrt(3) / 2, -0.5, 0);
expect(bottomPlane.equalsEpsilon(expectedResult, CesiumMath.EPSILON4)).toEqual(true);
});
- it("get frustum top plane", function() {
+ it('get frustum top plane', function() {
var topPlane = planes[3];
var expectedResult = new Cartesian4(0, -Math.sqrt(3) / 2, -0.5, 0);
expect(topPlane.equalsEpsilon(expectedResult, CesiumMath.EPSILON4)).toEqual(true);
});
- it("get frustum near plane", function() {
+ it('get frustum near plane', function() {
var nearPlane = planes[4];
var expectedResult = new Cartesian4(0, 0, -1, -1);
expect(nearPlane.equalsEpsilon(expectedResult, CesiumMath.EPSILON4)).toEqual(true);
});
- it("get frustum far plane", function() {
+ it('get frustum far plane', function() {
var farPlane = planes[5];
var expectedResult = new Cartesian4(0, 0, 1, 2);
expect(farPlane.equalsEpsilon(expectedResult, CesiumMath.EPSILON4)).toEqual(true);
});
- it("get perspective projection matrix", function() {
+ it('get perspective projection matrix', function() {
var projectionMatrix = frustum.getProjectionMatrix();
var expected = Matrix4.createPerspectiveFieldOfView(frustum.fovy, frustum.aspectRatio, frustum.near, frustum.far);
expect(projectionMatrix.equalsEpsilon(expected, CesiumMath.EPSILON6)).toEqual(true);
});
- it("get infinite perspective matrix", function() {
+ it('get infinite perspective matrix', function() {
var top = frustum.near * Math.tan(0.5 * frustum.fovy);
var bottom = -top;
var right = frustum.aspectRatio * top;
@@ -135,7 +135,7 @@ defineSuite([
expect(expected.equals(frustum.getInfiniteProjectionMatrix())).toEqual(true);
});
- it("equals", function() {
+ it('equals', function() {
var frustum2 = new PerspectiveFrustum();
frustum2.near = 1.0;
frustum2.far = 2.0;
@@ -144,13 +144,13 @@ defineSuite([
expect(frustum.equals(frustum2)).toEqual(true);
});
- it("destroys", function() {
+ it('destroys', function() {
expect(frustum.isDestroyed()).toEqual(false);
frustum.destroy();
expect(frustum.isDestroyed()).toEqual(true);
});
- it("throws with null frustum parameters", function() {
+ it('throws with null frustum parameters', function() {
var frustum = new PerspectiveFrustum();
expect(function() {
return frustum.getInfiniteProjectionMatrix();
diff --git a/Specs/Scene/PolygonSpec.js b/Specs/Scene/PolygonSpec.js
index f4c817186e3..0ed8d416db1 100644
--- a/Specs/Scene/PolygonSpec.js
+++ b/Specs/Scene/PolygonSpec.js
@@ -53,11 +53,11 @@ defineSuite([
destroyContext(context);
});
- it("gets default show", function() {
+ it('gets default show', function() {
expect(polygon.show).toEqual(true);
});
- it("sets positions", function() {
+ it('sets positions', function() {
var positions = [
new Cartesian3(1.0, 2.0, 3.0),
new Cartesian3(4.0, 5.0, 6.0),
@@ -70,7 +70,7 @@ defineSuite([
expect(polygon.getPositions()).toEqualArray(positions);
});
- it("configures extent", function() {
+ it('configures extent', function() {
var extent = new Extent(
0.0,
0.0,
@@ -83,7 +83,7 @@ defineSuite([
});
- it("gets the default color", function() {
+ it('gets the default color', function() {
expect(polygon.material.color).toEqualProperties({
red : 1.0,
green : 1.0,
@@ -92,19 +92,19 @@ defineSuite([
});
});
- it("gets default buffer usage", function() {
+ it('gets default buffer usage', function() {
expect(polygon.bufferUsage).toEqual(BufferUsage.STATIC_DRAW);
});
- it("has a default ellipsoid", function() {
+ it('has a default ellipsoid', function() {
expect(polygon.ellipsoid).toEqual(Ellipsoid.WGS84);
});
- it("gets the default granularity", function() {
+ it('gets the default granularity', function() {
expect(polygon.granularity).toEqual(CesiumMath.toRadians(1.0));
});
- it("renders", function() {
+ it('renders', function() {
// This test fails in Chrome if a breakpoint is set inside this function. Strange.
var ellipsoid = Ellipsoid.UNIT_SPHERE;
@@ -131,7 +131,7 @@ defineSuite([
expect(context.readPixels()).not.toEqualArray([0, 0, 0, 0]);
});
- it("renders extent", function() {
+ it('renders extent', function() {
// This test fails in Chrome if a breakpoint is set inside this function. Strange.
var ellipsoid = Ellipsoid.UNIT_SPHERE;
@@ -158,7 +158,7 @@ defineSuite([
expect(context.readPixels()).not.toEqualArray([0, 0, 0, 0]);
});
- it("doesn't renders", function() {
+ it('does not renders', function() {
var ellipsoid = Ellipsoid.UNIT_SPHERE;
polygon.ellipsoid = ellipsoid;
polygon.granularity = CesiumMath.toRadians(20.0);
@@ -184,7 +184,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
});
- it("is picked", function() {
+ it('is picked', function() {
var ellipsoid = Ellipsoid.UNIT_SPHERE;
polygon.ellipsoid = ellipsoid;
polygon.granularity = CesiumMath.toRadians(20.0);
@@ -201,7 +201,7 @@ defineSuite([
expect(pickedObject).toEqual(polygon);
});
- it("is not picked", function() {
+ it('is not picked', function() {
var ellipsoid = Ellipsoid.UNIT_SPHERE;
polygon.ellipsoid = ellipsoid;
polygon.granularity = CesiumMath.toRadians(20.0);
diff --git a/Specs/Scene/PolylineSpec.js b/Specs/Scene/PolylineSpec.js
index ff1103e013f..23ef2e67372 100644
--- a/Specs/Scene/PolylineSpec.js
+++ b/Specs/Scene/PolylineSpec.js
@@ -46,11 +46,11 @@ defineSuite([
destroyContext(context);
});
- it("gets default show", function() {
+ it('gets default show', function() {
expect(polyline.show).toEqual(true);
});
- it("sets positions", function() {
+ it('sets positions', function() {
var positions = [new Cartesian3(1.0, 2.0, 3.0), new Cartesian3(4.0, 5.0, 6.0)];
expect(polyline.getPositions()).not.toBeDefined();
@@ -59,15 +59,15 @@ defineSuite([
expect(polyline.getPositions()).toEqualArray(positions);
});
- it("gets the default width", function() {
+ it('gets the default width', function() {
expect(polyline.width).toEqual(2);
});
- it("gets the default outline-width", function() {
+ it('gets the default outline-width', function() {
expect(polyline.outlineWidth).toEqual(5);
});
- it("gets the default color", function() {
+ it('gets the default color', function() {
expect(polyline.color).toEqualProperties({
red : 0.0,
green : 0.0,
@@ -76,7 +76,7 @@ defineSuite([
});
});
- it("gets the default outline-color", function() {
+ it('gets the default outline-color', function() {
expect(polyline.outlineColor).toEqualProperties({
red : 1.0,
green : 1.0,
@@ -85,15 +85,15 @@ defineSuite([
});
});
- it("gets default bufferusage", function() {
+ it('gets default bufferusage', function() {
expect(polyline.bufferUsage).toEqual(BufferUsage.STATIC_DRAW);
});
- it("updates", function() {
+ it('updates', function() {
polyline.update(context, sceneState);
});
- it("renders", function() {
+ it('renders', function() {
polyline.setPositions([new Cartesian3(0.0, -1.0, 0.0), new Cartesian3(0.0, 1.0, 0.0)]);
polyline.color = {
@@ -117,7 +117,7 @@ defineSuite([
expect(context.readPixels()).not.toEqualArray([0, 0, 0, 0]);
});
- it("doesn't renders", function() {
+ it('does not renders', function() {
polyline.setPositions([new Cartesian3(0.0, -1.0, 0.0), new Cartesian3(0.0, 1.0, 0.0)]);
polyline.color = {
@@ -142,7 +142,7 @@ defineSuite([
expect(context.readPixels()).toEqualArray([0, 0, 0, 0]);
});
- it("is picked", function() {
+ it('is picked', function() {
polyline.setPositions([new Cartesian3(0.0, -1.0, 0.0), new Cartesian3(0.0, 1.0, 0.0)]);
polyline.update(context, sceneState);
@@ -151,7 +151,7 @@ defineSuite([
expect(pickedObject).toEqual(polyline);
});
- it("is not picked", function() {
+ it('is not picked', function() {
polyline.setPositions([new Cartesian3(0.0, -1.0, 0.0), new Cartesian3(0.0, 1.0, 0.0)]);
polyline.show = false;
@@ -161,7 +161,7 @@ defineSuite([
expect(pickedObject).not.toBeDefined();
});
- it("isDestroyed", function() {
+ it('isDestroyed', function() {
expect(polyline.isDestroyed()).toEqual(false);
polyline.destroy();
expect(polyline.isDestroyed()).toEqual(true);
diff --git a/Specs/Scene/Texture2DPoolSpec.js b/Specs/Scene/Texture2DPoolSpec.js
index b12c1963727..753723010f8 100644
--- a/Specs/Scene/Texture2DPoolSpec.js
+++ b/Specs/Scene/Texture2DPoolSpec.js
@@ -33,13 +33,13 @@ defineSuite([
pool = new Texture2DPool(fakeContext);
});
- it("throws when constructed without context", function() {
+ it('throws when constructed without context', function() {
expect(function() {
return new Texture2DPool();
}).toThrow();
});
- it("creates textures from the context on demand", function() {
+ it('creates textures from the context on demand', function() {
var description = {
width : 1,
height : 1
@@ -50,7 +50,7 @@ defineSuite([
expect(texture).toBeDefined();
});
- it("creates textures of different sizes", function() {
+ it('creates textures of different sizes', function() {
var texture1 = pool.createTexture2D({
width : 1,
height : 1
@@ -64,7 +64,7 @@ defineSuite([
expect(texture2.getWidth()).toEqual(2);
});
- it("returns textures to the pool when they are destroyed", function() {
+ it('returns textures to the pool when they are destroyed', function() {
var texture1 = pool.createTexture2D({
width : 1,
height : 1
@@ -80,7 +80,7 @@ defineSuite([
expect(texture2 === texture1).toEqual(true);
});
- it("destroys free textures when the pool is destroyed", function() {
+ it('destroys free textures when the pool is destroyed', function() {
var texture1 = pool.createTexture2D({
width : 1,
height : 1
diff --git a/Specs/Scene/TileSpec.js b/Specs/Scene/TileSpec.js
index b85c1b463d9..aea2d57b8dc 100644
--- a/Specs/Scene/TileSpec.js
+++ b/Specs/Scene/TileSpec.js
@@ -11,13 +11,13 @@ defineSuite([
/*global document,it,expect*/
- it("throws without a description", function() {
+ it('throws without a description', function() {
expect(function() {
return new Tile();
}).toThrow();
});
- it("throws without description.extent", function() {
+ it('throws without description.extent', function() {
expect(function() {
return new Tile({
x : 0,
@@ -26,7 +26,7 @@ defineSuite([
}).toThrow();
});
- it("throws without description.zoom", function() {
+ it('throws without description.zoom', function() {
expect(function() {
return new Tile({
extent : new Extent(
@@ -41,7 +41,7 @@ defineSuite([
}).toThrow();
});
- it("throws with negative x or y properties", function() {
+ it('throws with negative x or y properties', function() {
expect(function() {
return new Tile({
x : -1.0,
@@ -51,14 +51,14 @@ defineSuite([
}).toThrow();
});
- it("creates extent on construction", function() {
+ it('creates extent on construction', function() {
var desc = {x : 0, y : 0, zoom : 0};
var tile = new Tile(desc);
var extent = Tile.tileXYToExtent(desc.x, desc.y, desc.zoom);
expect(tile.extent).toEqual(extent);
});
- it("creates x, y, zoom on construction", function() {
+ it('creates x, y, zoom on construction', function() {
var desc = {
extent : new Extent(
-CesiumMath.PI,
diff --git a/Specs/addDefaultMatchers.js b/Specs/addDefaultMatchers.js
index 96f5c9d89a8..3c4744082f6 100755
--- a/Specs/addDefaultMatchers.js
+++ b/Specs/addDefaultMatchers.js
@@ -3,7 +3,7 @@ define(function() {
"use strict";
function isEqual(a, b) {
- if (typeof a !== "undefined" && typeof a.equals !== "undefined") {
+ if (typeof a !== 'undefined' && typeof a.equals !== 'undefined') {
return a.equals(b);
}
diff --git a/Specs/createContext.js b/Specs/createContext.js
index bccf81ba971..d45dca67c54 100755
--- a/Specs/createContext.js
+++ b/Specs/createContext.js
@@ -3,13 +3,13 @@ define(['Renderer/Context'], function(Context) {
"use strict";
function createContext() {
- var canvas = document.createElement("canvas");
- canvas.id = "glCanvas";
- canvas.setAttribute("width", "1");
- canvas.setAttribute("clientWidth", "1");
- canvas.setAttribute("height", "1");
- canvas.setAttribute("clientHeight", "1");
- canvas.innerHTML = "To view this web page, upgrade your browser; it does not support the HTML5 canvas element.";
+ var canvas = document.createElement('canvas');
+ canvas.id = 'glCanvas';
+ canvas.setAttribute('width', '1');
+ canvas.setAttribute('clientWidth', '1');
+ canvas.setAttribute('height', '1');
+ canvas.setAttribute('clientHeight', '1');
+ canvas.innerHTML = 'To view this web page, upgrade your browser; it does not support the HTML5 canvas element.';
document.body.appendChild(canvas);
var context = new Context(canvas, {
diff --git a/Specs/renderFragment.js b/Specs/renderFragment.js
index 0810b176b29..5064ada197d 100755
--- a/Specs/renderFragment.js
+++ b/Specs/renderFragment.js
@@ -9,7 +9,7 @@ define([
/*global expect*/
function renderFragment(context, fs) {
- var vs = "attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }";
+ var vs = 'attribute vec4 position; void main() { gl_PointSize = 1.0; gl_Position = position; }';
var sp = context.createShaderProgram(vs, fs);
var va = context.createVertexArray();