diff --git a/Source/Core/AxisAlignedBoundingBox.js b/Source/Core/AxisAlignedBoundingBox.js index ccd0b1681719..0a86914ab2fb 100644 --- a/Source/Core/AxisAlignedBoundingBox.js +++ b/Source/Core/AxisAlignedBoundingBox.js @@ -65,7 +65,7 @@ define([ * * @example * // Compute an axis aligned bounding box enclosing two points. - * var box = AxisAlignedBoundingBox.fromPoints([new Cartesian3(2, 0, 0), new Cartesian3(-2, 0, 0)]); + * var box = Cesium.AxisAlignedBoundingBox.fromPoints([new Cesium.Cartesian3(2, 0, 0), new Cesium.Cartesian3(-2, 0, 0)]); */ AxisAlignedBoundingBox.fromPoints = function(positions, result) { if (!defined(result)) { diff --git a/Source/Core/BoundingSphere.js b/Source/Core/BoundingSphere.js index daca339dc3bb..1e8045673e46 100644 --- a/Source/Core/BoundingSphere.js +++ b/Source/Core/BoundingSphere.js @@ -331,11 +331,11 @@ define([ * // Compute the bounding sphere from 3 positions, each specified relative to a center. * // In addition to the X, Y, and Z coordinates, the points array contains two additional * // elements per point which are ignored for the purpose of computing the bounding sphere. - * var center = new Cartesian3(1.0, 2.0, 3.0); + * var center = new Cesium.Cartesian3(1.0, 2.0, 3.0); * var points = [1.0, 2.0, 3.0, 0.1, 0.2, * 4.0, 5.0, 6.0, 0.1, 0.2, * 7.0, 8.0, 9.0, 0.1, 0.2]; - * var sphere = BoundingSphere.fromVertices(points, center, 5); + * var sphere = Cesium.BoundingSphere.fromVertices(points, center, 5); */ BoundingSphere.fromVertices = function(positions, center, stride, result) { if (!defined(result)) { @@ -505,7 +505,7 @@ define([ * * @example * // Create a bounding sphere around the unit cube - * var sphere = BoundingSphere.fromCornerPoints(new Cartesian3(-0.5, -0.5, -0.5), new Cartesian3(0.5, 0.5, 0.5)); + * var sphere = Cesium.BoundingSphere.fromCornerPoints(new Cesium.Cartesian3(-0.5, -0.5, -0.5), new Cesium.Cartesian3(0.5, 0.5, 0.5)); */ BoundingSphere.fromCornerPoints = function(corner, oppositeCorner, result) { //>>includeStart('debug', pragmas.debug); @@ -538,7 +538,7 @@ define([ * @exception {DeveloperError} ellipsoid is required. * * @example - * var boundingSphere = BoundingSphere.fromEllipsoid(ellipsoid); + * var boundingSphere = Cesium.BoundingSphere.fromEllipsoid(ellipsoid); */ BoundingSphere.fromEllipsoid = function(ellipsoid, result) { //>>includeStart('debug', pragmas.debug); @@ -748,9 +748,9 @@ define([ * @exception {DeveloperError} transform is required. * * @example - * var modelMatrix = Transforms.eastNorthUpToFixedFrame(positionOnEllipsoid); - * var boundingSphere = new BoundingSphere(); - * var newBoundingSphere = BoundingSphere.transformWithoutScale(boundingSphere, modelMatrix); + * var modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(positionOnEllipsoid); + * var boundingSphere = new Cesium.BoundingSphere(); + * var newBoundingSphere = Cesium.BoundingSphere.transformWithoutScale(boundingSphere, modelMatrix); */ BoundingSphere.transformWithoutScale = function(sphere, transform, result) { //>>includeStart('debug', pragmas.debug); diff --git a/Source/Core/BoxGeometry.js b/Source/Core/BoxGeometry.js index 29551ae28233..882d2cf6da75 100644 --- a/Source/Core/BoxGeometry.js +++ b/Source/Core/BoxGeometry.js @@ -44,12 +44,12 @@ define([ * @see BoxGeometry#createGeometry * * @example - * var box = new BoxGeometry({ - * vertexFormat : VertexFormat.POSITION_ONLY, - * maximumCorner : new Cartesian3(250000.0, 250000.0, 250000.0), - * minimumCorner : new Cartesian3(-250000.0, -250000.0, -250000.0) + * var box = new Cesium.BoxGeometry({ + * vertexFormat : Cesium.VertexFormat.POSITION_ONLY, + * maximumCorner : new Cesium.Cartesian3(250000.0, 250000.0, 250000.0), + * minimumCorner : new Cesium.Cartesian3(-250000.0, -250000.0, -250000.0) * }); - * var geometry = BoxGeometry.createGeometry(box); + * var geometry = Cesium.BoxGeometry.createGeometry(box); */ var BoxGeometry = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); @@ -86,11 +86,11 @@ define([ * @see BoxGeometry#createGeometry * * @example - * var box = BoxGeometry.fromDimensions({ - * vertexFormat : VertexFormat.POSITION_ONLY, - * dimensions : new Cartesian3(500000.0, 500000.0, 500000.0) + * var box = Cesium.BoxGeometry.fromDimensions({ + * vertexFormat : Cesium.VertexFormat.POSITION_ONLY, + * dimensions : new Cesium.Cartesian3(500000.0, 500000.0, 500000.0) * }); - * var geometry = BoxGeometry.createGeometry(box); + * var geometry = Cesium.BoxGeometry.createGeometry(box); */ BoxGeometry.fromDimensions = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/Core/BoxOutlineGeometry.js b/Source/Core/BoxOutlineGeometry.js index f442a1d389d8..75a65b634468 100644 --- a/Source/Core/BoxOutlineGeometry.js +++ b/Source/Core/BoxOutlineGeometry.js @@ -41,11 +41,11 @@ define([ * @see BoxOutlineGeometry#createGeometry * * @example - * var box = new BoxOutlineGeometry({ - * maximumCorner : new Cartesian3(250000.0, 250000.0, 250000.0), - * minimumCorner : new Cartesian3(-250000.0, -250000.0, -250000.0) + * var box = new Cesium.BoxOutlineGeometry({ + * maximumCorner : new Cesium.Cartesian3(250000.0, 250000.0, 250000.0), + * minimumCorner : new Cesium.Cartesian3(-250000.0, -250000.0, -250000.0) * }); - * var geometry = BoxOutlineGeometry.createGeometry(box); + * var geometry = Cesium.BoxOutlineGeometry.createGeometry(box); */ var BoxOutlineGeometry = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); @@ -78,10 +78,10 @@ define([ * @see BoxOutlineGeometry#createGeometry * * @example - * var box = BoxOutlineGeometry.fromDimensions({ - * dimensions : new Cartesian3(500000.0, 500000.0, 500000.0) + * var box = Cesium.BoxOutlineGeometry.fromDimensions({ + * dimensions : new Cesium.Cartesian3(500000.0, 500000.0, 500000.0) * }); - * var geometry = BoxOutlineGeometry.createGeometry(box); + * var geometry = Cesium.BoxOutlineGeometry.createGeometry(box); */ BoxOutlineGeometry.fromDimensions = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/Core/Cartesian2.js b/Source/Core/Cartesian2.js index 36797decf063..4fd54b1d939d 100644 --- a/Source/Core/Cartesian2.js +++ b/Source/Core/Cartesian2.js @@ -183,11 +183,11 @@ define([ * @example * // Create a Cartesian2 with (1.0, 2.0) * var v = [1.0, 2.0]; - * var p = Cartesian2.fromArray(v); + * var p = Cesium.Cartesian2.fromArray(v); * * // Create a Cartesian2 with (1.0, 2.0) using an offset into an array * var v2 = [0.0, 0.0, 1.0, 2.0]; - * var p2 = Cartesian2.fromArray(v2, 2); + * var p2 = Cesium.Cartesian2.fromArray(v2, 2); */ Cartesian2.fromArray = Cartesian2.unpack; @@ -339,7 +339,7 @@ define([ * * @example * // Returns 1.0 - * var d = Cartesian2.distance(new Cartesian2(1.0, 0.0), new Cartesian2(2.0, 0.0)); + * var d = Cesium.Cartesian2.distance(new Cesium.Cartesian2(1.0, 0.0), new Cesium.Cartesian2(2.0, 0.0)); */ Cartesian2.distance = function(left, right) { //>>includeStart('debug', pragmas.debug); diff --git a/Source/Core/Cartesian3.js b/Source/Core/Cartesian3.js index 174befffd9ad..ba06f4ce635c 100644 --- a/Source/Core/Cartesian3.js +++ b/Source/Core/Cartesian3.js @@ -212,11 +212,11 @@ define([ * @example * // Create a Cartesian3 with (1.0, 2.0, 3.0) * var v = [1.0, 2.0, 3.0]; - * var p = Cartesian3.fromArray(v); + * var p = Cesium.Cartesian3.fromArray(v); * * // Create a Cartesian3 with (1.0, 2.0, 3.0) using an offset into an array * var v2 = [0.0, 0.0, 1.0, 2.0, 3.0]; - * var p2 = Cartesian3.fromArray(v2, 2); + * var p2 = Cesium.Cartesian3.fromArray(v2, 2); */ Cartesian3.fromArray = Cartesian3.unpack; @@ -370,7 +370,7 @@ define([ * * @example * // Returns 1.0 - * var d = Cartesian3.distance(new Cartesian3(1.0, 0.0, 0.0), new Cartesian3(2.0, 0.0, 0.0)); + * var d = Cesium.Cartesian3.distance(new Cesium.Cartesian3(1.0, 0.0, 0.0), new Cesium.Cartesian3(2.0, 0.0, 0.0)); */ Cartesian3.distance = function(left, right) { //>>includeStart('debug', pragmas.debug); diff --git a/Source/Core/Cartesian4.js b/Source/Core/Cartesian4.js index 87d750d21b71..d0ecaf8346a9 100644 --- a/Source/Core/Cartesian4.js +++ b/Source/Core/Cartesian4.js @@ -185,11 +185,11 @@ define([ * @example * // Create a Cartesian4 with (1.0, 2.0, 3.0, 4.0) * var v = [1.0, 2.0, 3.0, 4.0]; - * var p = Cartesian4.fromArray(v); + * var p = Cesium.Cartesian4.fromArray(v); * * // Create a Cartesian4 with (1.0, 2.0, 3.0, 4.0) using an offset into an array * var v2 = [0.0, 0.0, 1.0, 2.0, 3.0, 4.0]; - * var p2 = Cartesian4.fromArray(v2, 2); + * var p2 = Cesium.Cartesian4.fromArray(v2, 2); */ Cartesian4.fromArray = Cartesian4.unpack; @@ -346,7 +346,7 @@ define([ * * @example * // Returns 1.0 - * var d = Cartesian4.distance(new Cartesian4(1.0, 0.0, 0.0, 0.0), new Cartesian4(2.0, 0.0, 0.0, 0.0)); + * var d = Cesium.Cartesian4.distance(new Cesium.Cartesian4(1.0, 0.0, 0.0, 0.0), new Cesium.Cartesian4(2.0, 0.0, 0.0, 0.0)); */ Cartesian4.distance = function(left, right) { //>>includeStart('debug', pragmas.debug); diff --git a/Source/Core/CatmullRomSpline.js b/Source/Core/CatmullRomSpline.js index cd33b98b0447..7be42c3ac8ba 100644 --- a/Source/Core/CatmullRomSpline.js +++ b/Source/Core/CatmullRomSpline.js @@ -112,14 +112,14 @@ define([ * * @example * // spline above the earth from Philadelphia to Los Angeles - * var spline = new CatmullRomSpline({ + * var spline = new Cesium.CatmullRomSpline({ * times : [ 0.0, 1.5, 3.0, 4.5, 6.0 ], * points : [ - * new Cartesian3(1235398.0, -4810983.0, 4146266.0), - * new Cartesian3(1372574.0, -5345182.0, 4606657.0), - * new Cartesian3(-757983.0, -5542796.0, 4514323.0), - * new Cartesian3(-2821260.0, -5248423.0, 4021290.0), - * new Cartesian3(-2539788.0, -4724797.0, 3620093.0) + * new Cesium.Cartesian3(1235398.0, -4810983.0, 4146266.0), + * new Cesium.Cartesian3(1372574.0, -5345182.0, 4606657.0), + * new Cesium.Cartesian3(-757983.0, -5542796.0, 4514323.0), + * new Cesium.Cartesian3(-2821260.0, -5248423.0, 4021290.0), + * new Cesium.Cartesian3(-2539788.0, -4724797.0, 3620093.0) * ] * }); */ @@ -234,14 +234,14 @@ define([ * * @example * // spline above the earth from Philadelphia to Los Angeles - * var spline = new CatmullRomSpline({ + * var spline = new Cesium.CatmullRomSpline({ * times : [ 0.0, 1.5, 3.0, 4.5, 6.0 ], * points : [ - * new Cartesian3(1235398.0, -4810983.0, 4146266.0), - * new Cartesian3(1372574.0, -5345182.0, 4606657.0), - * new Cartesian3(-757983.0, -5542796.0, 4514323.0), - * new Cartesian3(-2821260.0, -5248423.0, 4021290.0), - * new Cartesian3(-2539788.0, -4724797.0, 3620093.0) + * new Cesium.Cartesian3(1235398.0, -4810983.0, 4146266.0), + * new Cesium.Cartesian3(1372574.0, -5345182.0, 4606657.0), + * new Cesium.Cartesian3(-757983.0, -5542796.0, 4514323.0), + * new Cesium.Cartesian3(-2821260.0, -5248423.0, 4021290.0), + * new Cesium.Cartesian3(-2539788.0, -4724797.0, 3620093.0) * ] * }); * diff --git a/Source/Core/CircleGeometry.js b/Source/Core/CircleGeometry.js index 3755dbba056c..7e285cb73092 100644 --- a/Source/Core/CircleGeometry.js +++ b/Source/Core/CircleGeometry.js @@ -35,13 +35,13 @@ define([ * * @example * // Create a circle. - * var ellipsoid = Ellipsoid.WGS84; - * var circle = new CircleGeometry({ + * var ellipsoid = Cesium.Ellipsoid.WGS84; + * var circle = new Cesium.CircleGeometry({ * ellipsoid : ellipsoid, - * center : ellipsoid.cartographicToCartesian(Cartographic.fromDegrees(-75.59777, 40.03883)), + * center : ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-75.59777, 40.03883)), * radius : 100000.0 * }); - * var geometry = CircleGeometry.createGeometry(circle); + * var geometry = Cesium.CircleGeometry.createGeometry(circle); */ var CircleGeometry = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/Core/CircleOutlineGeometry.js b/Source/Core/CircleOutlineGeometry.js index 421b4f94b30f..32c60a104f99 100644 --- a/Source/Core/CircleOutlineGeometry.js +++ b/Source/Core/CircleOutlineGeometry.js @@ -34,13 +34,13 @@ define([ * * @example * // Create a circle. - * var ellipsoid = Ellipsoid.WGS84; - * var circle = new CircleOutlineGeometry({ + * var ellipsoid = Cesium.Ellipsoid.WGS84; + * var circle = new Cesium.CircleOutlineGeometry({ * ellipsoid : ellipsoid, - * center : ellipsoid.cartographicToCartesian(Cartographic.fromDegrees(-75.59777, 40.03883)), + * center : ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-75.59777, 40.03883)), * radius : 100000.0 * }); - * var geometry = CircleOutlineGeometry.createGeometry(circle); + * var geometry = Cesium.CircleOutlineGeometry.createGeometry(circle); */ var CircleOutlineGeometry = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/Core/Clock.js b/Source/Core/Clock.js index 1801adbce0fe..46d745372d40 100644 --- a/Source/Core/Clock.js +++ b/Source/Core/Clock.js @@ -39,11 +39,11 @@ define([ * * @example * // Create a clock that loops on Christmas day 2013 and runs in real-time. - * var clock = new Clock({ - * startTime : JulianDate.fromIso8601("12-25-2013"), - * currentTime : JulianDate.fromIso8601("12-25-2013"), - * stopTime : JulianDate.fromIso8601("12-26-2013"), - * clockRange : ClockRange.LOOP_STOP, + * var clock = new Cesium.Clock({ + * startTime : Cesium.JulianDate.fromIso8601("12-25-2013"), + * currentTime : Cesium.JulianDate.fromIso8601("12-25-2013"), + * stopTime : Cesium.JulianDate.fromIso8601("12-26-2013"), + * clockRange : Cesium.ClockRange.LOOP_STOP, * clockStep : SYSTEM_CLOCK_MULTIPLIER * }); */ diff --git a/Source/Core/Color.js b/Source/Core/Color.js index a7428f70b660..1959b4a03584 100644 --- a/Source/Core/Color.js +++ b/Source/Core/Color.js @@ -112,7 +112,7 @@ define([ * @returns {Color} A new color instance. * * @example - * var color = Color.fromRgba(0x67ADDFFF); + * var color = Cesium.Color.fromRgba(0x67ADDFFF); * * @see Color#toRgba */ @@ -190,17 +190,17 @@ define([ * * @example * //Create a completely random color - * var color = Color.fromRandom(); + * var color = Cesium.Color.fromRandom(); * * //Create a random shade of yellow. - * var color = Color.fromRandom({ + * var color = Cesium.Color.fromRandom({ * red : 1.0, * green : 1.0, * alpha : 1.0 * }); * * //Create a random bright color. - * var color = Color.fromRandom({ + * var color = Cesium.Color.fromRandom({ * minimumRed : 0.75, * minimumGreen : 0.75, * minimumBlue : 0.75, @@ -284,8 +284,8 @@ define([ * @exception {DeveloperError} color is required. * * @example - * var cesiumBlue = Color.fromCssColorString('#67ADDF'); - * var green = Color.fromCssColorString('green'); + * var cesiumBlue = Cesium.Color.fromCssColorString('#67ADDF'); + * var green = Cesium.Color.fromCssColorString('green'); * * @see CSS color values */ @@ -556,7 +556,7 @@ define([ * @returns {Number} A single numeric unsigned 32-bit RGBA value. * * @example - * var rgba = Color.BLUE.toRgba(); + * var rgba = Cesium.Color.BLUE.toRgba(); * * @see Color.fromRgba */ diff --git a/Source/Core/ColorGeometryInstanceAttribute.js b/Source/Core/ColorGeometryInstanceAttribute.js index cf0c4b4e5502..f4296a30edc3 100644 --- a/Source/Core/ColorGeometryInstanceAttribute.js +++ b/Source/Core/ColorGeometryInstanceAttribute.js @@ -25,15 +25,15 @@ define([ * @param {Number} [alpha=1.0] The alpha component. * * @example - * var instance = new GeometryInstance({ - * geometry : new BoxGeometry({ - * dimensions : new Cartesian3(1000000.0, 1000000.0, 500000.0) + * var instance = new Cesium.GeometryInstance({ + * geometry : new Cesium.BoxGeometry({ + * dimensions : new Cesium.Cartesian3(1000000.0, 1000000.0, 500000.0) * }), - * modelMatrix : Matrix4.multiplyByTranslation(Transforms.eastNorthUpToFixedFrame( - * ellipsoid.cartographicToCartesian(Cartographic.fromDegrees(-0.0, 0.0))), new Cartesian3(0.0, 0.0, 1000000.0)), + * modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame( + * ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-0.0, 0.0))), new Cesium.Cartesian3(0.0, 0.0, 1000000.0)), * id : 'box', * attributes : { - * color : new ColorGeometryInstanceAttribute(red, green, blue, alpha) + * color : new Cesium.ColorGeometryInstanceAttribute(red, green, blue, alpha) * } * }); * @@ -107,10 +107,10 @@ define([ * @exception {DeveloperError} color is required. * * @example - * var instance = new GeometryInstance({ + * var instance = new Cesium.GeometryInstance({ * geometry : // ... * attributes : { - * color : ColorGeometryInstanceAttribute.fromColor(Color.CORNFLOWERBLUE), + * color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.CORNFLOWERBLUE), * } * }); */ @@ -134,7 +134,7 @@ define([ * * @example * var attributes = primitive.getGeometryInstanceAttributes('an id'); - * attributes.color = ColorGeometryInstanceAttribute.toValue(Color.AQUA, attributes.color); + * attributes.color = Cesium.ColorGeometryInstanceAttribute.toValue(Cesium.Color.AQUA, attributes.color); */ ColorGeometryInstanceAttribute.toValue = function(color, result) { if (!defined(color)) { diff --git a/Source/Core/ComponentDatatype.js b/Source/Core/ComponentDatatype.js index e97f72ac0cb0..73e3969f5d7a 100644 --- a/Source/Core/ComponentDatatype.js +++ b/Source/Core/ComponentDatatype.js @@ -111,8 +111,8 @@ define([ * @returns {Boolean} true if the provided component datatype is a valid enumeration value; otherwise, false. * * @example - * if (!ComponentDatatype.validate(componentDatatype)) { - * throw new DeveloperError('componentDatatype must be a valid enumeration value.'); + * if (!Cesium.ComponentDatatype.validate(componentDatatype)) { + * throw new Cesium.DeveloperError('componentDatatype must be a valid enumeration value.'); * } */ ComponentDatatype.validate = function(componentDatatype) { @@ -140,7 +140,7 @@ define([ * * @example * // creates a Float32Array with length of 100 - * var typedArray = ComponentDatatype.createTypedArray(ComponentDatatype.FLOAT, 100); + * var typedArray = Cesium.ComponentDatatype.createTypedArray(Cesium.ComponentDatatype.FLOAT, 100); */ ComponentDatatype.createTypedArray = function(componentDatatype, valuesOrLength) { if (!defined(componentDatatype)) { diff --git a/Source/Core/CorridorGeometry.js b/Source/Core/CorridorGeometry.js index df71b4782c1d..92c7c5b1248f 100644 --- a/Source/Core/CorridorGeometry.js +++ b/Source/Core/CorridorGeometry.js @@ -641,11 +641,11 @@ define([ * @see CorridorGeometry#createGeometry * * @example - * var corridor = new CorridorGeometry({ - * vertexFormat : VertexFormat.POSITION_ONLY, + * var corridor = new Cesium.CorridorGeometry({ + * vertexFormat : Cesium.VertexFormat.POSITION_ONLY, * positions : ellipsoid.cartographicArrayToCartesianArray([ - * Cartographic.fromDegrees(-72.0, 40.0), - * Cartographic.fromDegrees(-70.0, 35.0) + * Cesium.Cartographic.fromDegrees(-72.0, 40.0), + * Cesium.Cartographic.fromDegrees(-70.0, 35.0) * ]), * width : 100000 * }); diff --git a/Source/Core/CorridorOutlineGeometry.js b/Source/Core/CorridorOutlineGeometry.js index 16d6ad6768da..11d66301dfa5 100644 --- a/Source/Core/CorridorOutlineGeometry.js +++ b/Source/Core/CorridorOutlineGeometry.js @@ -320,10 +320,10 @@ define([ * @see CorridorOutlineGeometry#createGeometry * * @example - * var corridor = new CorridorOutlineGeometry({ + * var corridor = new Cesium.CorridorOutlineGeometry({ * positions : ellipsoid.cartographicArrayToCartesianArray([ - * Cartographic.fromDegrees(-72.0, 40.0), - * Cartographic.fromDegrees(-70.0, 35.0) + * Cesium.Cartographic.fromDegrees(-72.0, 40.0), + * Cesium.Cartographic.fromDegrees(-70.0, 35.0) * ]), * width : 100000 * }); diff --git a/Source/Core/CylinderGeometry.js b/Source/Core/CylinderGeometry.js index 06bd66984f74..13c4f8869453 100644 --- a/Source/Core/CylinderGeometry.js +++ b/Source/Core/CylinderGeometry.js @@ -62,12 +62,12 @@ define([ * * @example * // create cylinder geometry - * var cylinder = new CylinderGeometry({ + * var cylinder = new Cesium.CylinderGeometry({ * length: 200000, * topRadius: 80000, * bottomRadius: 200000, * }); - * var geometry = CylinderGeometry.createGeometry(cylinder); + * var geometry = Cesium.CylinderGeometry.createGeometry(cylinder); */ var CylinderGeometry = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/Core/CylinderOutlineGeometry.js b/Source/Core/CylinderOutlineGeometry.js index 8ea50ad60fcc..2325bdd45873 100644 --- a/Source/Core/CylinderOutlineGeometry.js +++ b/Source/Core/CylinderOutlineGeometry.js @@ -55,12 +55,12 @@ define([ * * @example * // create cylinder geometry - * var cylinder = new CylinderOutlineGeometry({ + * var cylinder = new Cesium.CylinderOutlineGeometry({ * length: 200000, * topRadius: 80000, * bottomRadius: 200000, * }); - * var geometry = CylinderOutlineGeometry.createGeometry(cylinder); + * var geometry = Cesium.CylinderOutlineGeometry.createGeometry(cylinder); */ var CylinderOutlineGeometry = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/Core/EarthOrientationParameters.js b/Source/Core/EarthOrientationParameters.js index a44e13c9ed2f..61c207d39001 100644 --- a/Source/Core/EarthOrientationParameters.js +++ b/Source/Core/EarthOrientationParameters.js @@ -63,8 +63,8 @@ define([ * * @example * // Loading the EOP data - * var eop = new EarthOrientationParameters({ url : 'Data/EOP.json' }); - * Transforms.earthOrientationParameters = eop; + * var eop = new Cesium.EarthOrientationParameters({ url : 'Data/EOP.json' }); + * Cesium.Transforms.earthOrientationParameters = eop; */ var EarthOrientationParameters = function EarthOrientationParameters(description) { description = defaultValue(description, defaultValue.EMPTY_OBJECT); diff --git a/Source/Core/EllipseGeometry.js b/Source/Core/EllipseGeometry.js index 455efaf31da3..ef926bf4a172 100644 --- a/Source/Core/EllipseGeometry.js +++ b/Source/Core/EllipseGeometry.js @@ -594,15 +594,15 @@ define([ * * @example * // Create an ellipse. - * var ellipsoid = Ellipsoid.WGS84; - * var ellipse = new EllipseGeometry({ + * var ellipsoid = Cesium.Ellipsoid.WGS84; + * var ellipse = new Cesium.EllipseGeometry({ * ellipsoid : ellipsoid, - * center : ellipsoid.cartographicToCartesian(Cartographic.fromDegrees(-75.59777, 40.03883)), + * center : ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-75.59777, 40.03883)), * semiMajorAxis : 500000.0, * semiMinorAxis : 300000.0, - * rotation : CesiumMath.toRadians(60.0) + * rotation : Cesium.Math.toRadians(60.0) * }); - * var geometry = EllipseGeometry.createGeometry(ellipse); + * var geometry = Cesium.EllipseGeometry.createGeometry(ellipse); */ var EllipseGeometry = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/Core/EllipseOutlineGeometry.js b/Source/Core/EllipseOutlineGeometry.js index 60a0f7d374fd..a81ac2daffb9 100644 --- a/Source/Core/EllipseOutlineGeometry.js +++ b/Source/Core/EllipseOutlineGeometry.js @@ -160,15 +160,15 @@ define([ * @see EllipseOutlineGeometry#createGeometry * * @example - * var ellipsoid = Ellipsoid.WGS84; - * var ellipse = new EllipseOutlineGeometry({ + * var ellipsoid = Cesium.Ellipsoid.WGS84; + * var ellipse = new Cesium.EllipseOutlineGeometry({ * ellipsoid : ellipsoid, - * center : ellipsoid.cartographicToCartesian(Cartographic.fromDegrees(-75.59777, 40.03883)), + * center : ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-75.59777, 40.03883)), * semiMajorAxis : 500000.0, * semiMinorAxis : 300000.0, - * rotation : CesiumMath.toRadians(60.0) + * rotation : Cesium.Math.toRadians(60.0) * }); - * var geometry = EllipseOutlineGeometry.createGeometry(ellipse); + * var geometry = Cesium.EllipseOutlineGeometry.createGeometry(ellipse); */ var EllipseOutlineGeometry = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/Core/Ellipsoid.js b/Source/Core/Ellipsoid.js index e99c688b37c2..af610f4587a8 100644 --- a/Source/Core/Ellipsoid.js +++ b/Source/Core/Ellipsoid.js @@ -285,8 +285,8 @@ define([ * * @example * //Create a Cartographic and determine it's Cartesian representation on a WGS84 ellipsoid. - * var position = new Cartographic(Math.toRadians(21), Math.toRadians(78), 5000); - * var cartesianPosition = Ellipsoid.WGS84.cartographicToCartesian(position); + * var position = new Cesium.Cartographic(Cesium.Math.toRadians(21), Cesium.Math.toRadians(78), 5000); + * var cartesianPosition = Cesium.Ellipsoid.WGS84.cartographicToCartesian(position); */ Ellipsoid.prototype.cartographicToCartesian = function(cartographic, result) { //`cartographic is required` is thrown from geodeticSurfaceNormalCartographic. @@ -312,10 +312,10 @@ define([ * * @example * //Convert an array of Cartographics and determine their Cartesian representation on a WGS84 ellipsoid. - * var positions = [new Cartographic(Math.toRadians(21), Math.toRadians(78), 0), - * new Cartographic(Math.toRadians(21.321), Math.toRadians(78.123), 100), - * new Cartographic(Math.toRadians(21.645), Math.toRadians(78.456), 250) - * var cartesianPositions = Ellipsoid.WGS84.cartographicArrayToCartesianArray(positions); + * var positions = [new Cesium.Cartographic(Cesium.Math.toRadians(21), Cesium.Math.toRadians(78), 0), + * new Cesium.Cartographic(Cesium.Math.toRadians(21.321), Cesium.Math.toRadians(78.123), 100), + * new Cesium.Cartographic(Cesium.Math.toRadians(21.645), Cesium.Math.toRadians(78.456), 250) + * var cartesianPositions = Cesium.Ellipsoid.WGS84.cartographicArrayToCartesianArray(positions); */ Ellipsoid.prototype.cartographicArrayToCartesianArray = function(cartographics, result) { if (!defined(cartographics)) { @@ -351,8 +351,8 @@ define([ * * @example * //Create a Cartesian and determine it's Cartographic representation on a WGS84 ellipsoid. - * var position = new Cartesian(17832.12, 83234.52, 952313.73); - * var cartographicPosition = Ellipsoid.WGS84.cartesianToCartographic(position); + * var position = new Cesium.Cartesian(17832.12, 83234.52, 952313.73); + * var cartographicPosition = Cesium.Ellipsoid.WGS84.cartesianToCartographic(position); */ Ellipsoid.prototype.cartesianToCartographic = function(cartesian, result) { //`cartesian is required.` is thrown from scaleToGeodeticSurface @@ -390,10 +390,10 @@ define([ * * @example * //Create an array of Cartesians and determine their Cartographic representation on a WGS84 ellipsoid. - * var positions = [new Cartesian(17832.12, 83234.52, 952313.73), - * new Cartesian(17832.13, 83234.53, 952313.73), - * new Cartesian(17832.14, 83234.54, 952313.73)] - * var cartographicPositions = Ellipsoid.WGS84.cartesianArrayToCartographicArray(positions); + * var positions = [new Cesium.Cartesian(17832.12, 83234.52, 952313.73), + * new Cesium.Cartesian(17832.13, 83234.53, 952313.73), + * new Cesium.Cartesian(17832.14, 83234.54, 952313.73)] + * var cartographicPositions = Cesium.Ellipsoid.WGS84.cartesianArrayToCartographicArray(positions); */ Ellipsoid.prototype.cartesianArrayToCartographicArray = function(cartesians, result) { if (!defined(cartesians)) { diff --git a/Source/Core/EllipsoidGeometry.js b/Source/Core/EllipsoidGeometry.js index 9631ef7cf46b..b71c405977be 100644 --- a/Source/Core/EllipsoidGeometry.js +++ b/Source/Core/EllipsoidGeometry.js @@ -55,11 +55,11 @@ define([ * @see EllipsoidGeometry#createGeometry * * @example - * var ellipsoid = new EllipsoidGeometry({ - * vertexFormat : VertexFormat.POSITION_ONLY, - * radii : new Cartesian3(1000000.0, 500000.0, 500000.0) + * var ellipsoid = new Cesium.EllipsoidGeometry({ + * vertexFormat : Cesium.VertexFormat.POSITION_ONLY, + * radii : new Cesium.Cartesian3(1000000.0, 500000.0, 500000.0) * }); - * var geometry = EllipsoidGeometry.createGeometry(ellipsoid); + * var geometry = Cesium.EllipsoidGeometry.createGeometry(ellipsoid); */ var EllipsoidGeometry = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/Core/EllipsoidOutlineGeometry.js b/Source/Core/EllipsoidOutlineGeometry.js index 654c8ce9709b..259df75aca00 100644 --- a/Source/Core/EllipsoidOutlineGeometry.js +++ b/Source/Core/EllipsoidOutlineGeometry.js @@ -47,12 +47,12 @@ define([ * @exception {DeveloperError} options.subdivisions must be greater than or equal to zero. * * @example - * var ellipsoid = new EllipsoidOutlineGeometry({ - * radii : new Cartesian3(1000000.0, 500000.0, 500000.0), + * var ellipsoid = new Cesium.EllipsoidOutlineGeometry({ + * radii : new Cesium.Cartesian3(1000000.0, 500000.0, 500000.0), * stackPartitions: 6, * slicePartitions: 5 * }); - * var geometry = EllipsoidOutlineGeometry.createGeometry(ellipsoid); + * var geometry = Cesium.EllipsoidOutlineGeometry.createGeometry(ellipsoid); */ var EllipsoidOutlineGeometry = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/Core/EllipsoidalOccluder.js b/Source/Core/EllipsoidalOccluder.js index fe7a0a1433ce..bb3a0d5e5efa 100644 --- a/Source/Core/EllipsoidalOccluder.js +++ b/Source/Core/EllipsoidalOccluder.js @@ -32,9 +32,9 @@ define([ * * @example * // Construct an ellipsoidal occluder with radii 1.0, 1.1, and 0.9. - * var cameraPosition = new Cartesian3(5.0, 6.0, 7.0); - * var occluderEllipsoid = new Ellipsoid(1.0, 1.1, 0.9); - * var occluder = new EllipsoidalOccluder(occluderEllipsoid, cameraPosition); + * var cameraPosition = new Cesium.Cartesian3(5.0, 6.0, 7.0); + * var occluderEllipsoid = new Cesium.Ellipsoid(1.0, 1.1, 0.9); + * var occluder = new Cesium.EllipsoidalOccluder(occluderEllipsoid, cameraPosition); */ var EllipsoidalOccluder = function(ellipsoid, cameraPosition) { if (!defined(ellipsoid)) { @@ -104,10 +104,10 @@ define([ * @returns {boolean} true if the occludee is visible; otherwise false. * * @example - * var cameraPosition = new Cartesian3(0, 0, 2.5); - * var ellipsoid = new Ellipsoid(1.0, 1.1, 0.9); - * var occluder = new EllipsoidalOccluder(ellipsoid, cameraPosition); - * var point = new Cartesian3(0, -3, -3); + * var cameraPosition = new Cesium.Cartesian3(0, 0, 2.5); + * var ellipsoid = new Cesium.Ellipsoid(1.0, 1.1, 0.9); + * var occluder = new Cesium.EllipsoidalOccluder(ellipsoid, cameraPosition); + * var point = new Cesium.Cartesian3(0, -3, -3); * occluder.isPointVisible(point); //returns true */ EllipsoidalOccluder.prototype.isPointVisible = function(occludee) { @@ -128,10 +128,10 @@ define([ * @returns {boolean} true if the occludee is visible; otherwise false. * * @example - * var cameraPosition = new Cartesian3(0, 0, 2.5); - * var ellipsoid = new Ellipsoid(1.0, 1.1, 0.9); - * var occluder = new EllipsoidalOccluder(ellipsoid, cameraPosition); - * var point = new Cartesian3(0, -3, -3); + * var cameraPosition = new Cesium.Cartesian3(0, 0, 2.5); + * var ellipsoid = new Cesium.Ellipsoid(1.0, 1.1, 0.9); + * var occluder = new Cesium.EllipsoidalOccluder(ellipsoid, cameraPosition); + * var point = new Cesium.Cartesian3(0, -3, -3); * var scaledSpacePoint = ellipsoid.transformPositionToScaledSpace(point); * occluder.isScaledSpacePointVisible(scaledSpacePoint); //returns true */ diff --git a/Source/Core/EncodedCartesian3.js b/Source/Core/EncodedCartesian3.js index 74ebbd4b856e..7f0f73d31f8c 100644 --- a/Source/Core/EncodedCartesian3.js +++ b/Source/Core/EncodedCartesian3.js @@ -65,7 +65,7 @@ define([ * * @example * var value = 1234567.1234567; - * var splitValue = EncodedCartesian3.encode(value); + * var splitValue = Cesium.EncodedCartesian3.encode(value); */ EncodedCartesian3.encode = function(value, result) { if (!defined(value)) { @@ -113,8 +113,8 @@ define([ * @exception {DeveloperError} cartesian is required. * * @example - * var cart = new Cartesian3(-10000000.0, 0.0, 10000000.0); - * var encoded = EncodedCartesian3.fromCartesian(cart); + * var cart = new Cesium.Cartesian3(-10000000.0, 0.0, 10000000.0); + * var encoded = Cesium.EncodedCartesian3.fromCartesian(cart); */ EncodedCartesian3.fromCartesian = function(cartesian, result) { if (!defined(cartesian)) { @@ -162,13 +162,13 @@ define([ * * @example * var positions = [ - * new Cartesian3(), + * new Cesium.Cartesian3(), * // ... * ]; * var encodedPositions = new Float32Array(2 * 3 * positions.length); * var j = 0; * for (var i = 0; i < positions.length; ++i) { - * EncodedCartesian3.writeElement(positions[i], encodedPositions, j); + * Cesium.EncodedCartesian3.writeElement(positions[i], encodedPositions, j); * j += 6; * } */ diff --git a/Source/Core/Enumeration.js b/Source/Core/Enumeration.js index 9d9be7a52dc7..5916dc1d1afb 100644 --- a/Source/Core/Enumeration.js +++ b/Source/Core/Enumeration.js @@ -15,8 +15,8 @@ define(['./defined'], function(defined) { * @example * // Create an object with two enumerations. * var filter = { - * NEAREST : new Enumeration(0x2600, 'NEAREST'), - * LINEAR : new Enumeration(0x2601, 'LINEAR') + * NEAREST : new Cesium.Enumeration(0x2600, 'NEAREST'), + * LINEAR : new Cesium.Enumeration(0x2601, 'LINEAR') * }; */ var Enumeration = function(value, name, properties) { diff --git a/Source/Core/Event.js b/Source/Core/Event.js index 8ea56dca580d..ddbe3e1fc462 100644 --- a/Source/Core/Event.js +++ b/Source/Core/Event.js @@ -20,7 +20,7 @@ define([ * } * * var myObjectInstance = new MyObject(); - * var evt = new Event(); + * var evt = new Cesium.Event(); * evt.addEventListener(MyObject.prototype.myListener, myObjectInstance); * evt.raiseEvent('1', '2'); * evt.removeEventListener(MyObject.prototype.myListener); diff --git a/Source/Core/EventHelper.js b/Source/Core/EventHelper.js index 8831763abf95..5bb1232d4125 100644 --- a/Source/Core/EventHelper.js +++ b/Source/Core/EventHelper.js @@ -18,7 +18,7 @@ define([ * @see Event * * @example - * var helper = new EventHelper(); + * var helper = new Cesium.EventHelper(); * * helper.add(someObject.event, listener1, this); * helper.add(otherObject.event, listener2, this); diff --git a/Source/Core/Extent.js b/Source/Core/Extent.js index 6b94bf945860..2ce57b619f90 100644 --- a/Source/Core/Extent.js +++ b/Source/Core/Extent.js @@ -76,7 +76,7 @@ define([ * @returns {Extent} The modified result parameter or a new Extent instance if none was provided. * * @example - * var extent = Extent.fromDegrees(0.0, 20.0, 10.0, 30.0); + * var extent = Cesium.Extent.fromDegrees(0.0, 20.0, 10.0, 30.0); */ Extent.fromDegrees = function(west, south, east, north, result) { west = CesiumMath.toRadians(defaultValue(west, 0.0)); diff --git a/Source/Core/ExtentGeometry.js b/Source/Core/ExtentGeometry.js index 5ee57bb6d3fe..b5c98552b3ee 100644 --- a/Source/Core/ExtentGeometry.js +++ b/Source/Core/ExtentGeometry.js @@ -644,22 +644,22 @@ define([ * * @example * // 1. create an extent - * var extent = new ExtentGeometry({ - * ellipsoid : Ellipsoid.WGS84, - * extent : Extent.fromDegrees(-80.0, 39.0, -74.0, 42.0), + * var extent = new Cesium.ExtentGeometry({ + * ellipsoid : Cesium.Ellipsoid.WGS84, + * extent : Cesium.Extent.fromDegrees(-80.0, 39.0, -74.0, 42.0), * height : 10000.0 * }); - * var geometry = ExtentGeometry.createGeometry(extent); + * var geometry = Cesium.ExtentGeometry.createGeometry(extent); * * // 2. create an extruded extent without a top - * var extent = new ExtentGeometry({ - * ellipsoid : Ellipsoid.WGS84, - * extent : Extent.fromDegrees(-80.0, 39.0, -74.0, 42.0), + * var extent = new Cesium.ExtentGeometry({ + * ellipsoid : Cesium.Ellipsoid.WGS84, + * extent : Cesium.Extent.fromDegrees(-80.0, 39.0, -74.0, 42.0), * height : 10000.0, * extrudedHieght: 300000, * closeTop: false * }); - * var geometry = ExtentGeometry.createGeometry(extent); + * var geometry = Cesium.ExtentGeometry.createGeometry(extent); */ var ExtentGeometry = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/Core/ExtentOutlineGeometry.js b/Source/Core/ExtentOutlineGeometry.js index 16ec1e86b140..4680a05ffa9c 100644 --- a/Source/Core/ExtentOutlineGeometry.js +++ b/Source/Core/ExtentOutlineGeometry.js @@ -283,12 +283,12 @@ define([ * @see ExtentOutlineGeometry#createGeometry * * @example - * var extent = new ExtentOutlineGeometry({ - * ellipsoid : Ellipsoid.WGS84, - * extent : Extent.fromDegrees(-80.0, 39.0, -74.0, 42.0), + * var extent = new Cesium.ExtentOutlineGeometry({ + * ellipsoid : Cesium.Ellipsoid.WGS84, + * extent : Cesium.Extent.fromDegrees(-80.0, 39.0, -74.0, 42.0), * height : 10000.0 * }); - * var geometry = ExtentOutlineGeometry.createGeometry(extent); + * var geometry = Cesium.ExtentOutlineGeometry.createGeometry(extent); */ var ExtentOutlineGeometry = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/Core/Fullscreen.js b/Source/Core/Fullscreen.js index dc26dddd12b7..7ac7e82e10a1 100644 --- a/Source/Core/Fullscreen.js +++ b/Source/Core/Fullscreen.js @@ -131,10 +131,10 @@ define(['./defined'], function(defined) { * * @example * // Put the entire page into fullscreen. - * Fullscreen.requestFullscreen(document.body) + * Cesium.Fullscreen.requestFullscreen(document.body) * * // Place only the Cesium canvas into fullscreen. - * Fullscreen.requestFullscreen(scene.getCanvas()) + * Cesium.Fullscreen.requestFullscreen(scene.getCanvas()) */ Fullscreen.requestFullscreen = function(element) { if (!Fullscreen.supportsFullscreen()) { diff --git a/Source/Core/Geometry.js b/Source/Core/Geometry.js index 6e0b6bf38c62..1f880504de00 100644 --- a/Source/Core/Geometry.js +++ b/Source/Core/Geometry.js @@ -43,17 +43,17 @@ define([ * 0.0, 7500000.0, 0.0 * ]); * - * var geometry = new Geometry({ + * var geometry = new Cesium.Geometry({ * attributes : { - * position : new GeometryAttribute({ - * componentDatatype : ComponentDatatype.DOUBLE, + * position : new Cesium.GeometryAttribute({ + * componentDatatype : Cesium.ComponentDatatype.DOUBLE, * componentsPerAttribute : 3, * values : positions * }) * }, * indices : new Uint16Array([0, 1, 1, 2, 2, 0]), - * primitiveType : PrimitiveType.LINES, - * boundingSphere : BoundingSphere.fromVertices(positions) + * primitiveType : Cesium.PrimitiveType.LINES, + * boundingSphere : Cesium.BoundingSphere.fromVertices(positions) * }); * * @demo Geometry and Appearances Demo @@ -116,8 +116,8 @@ define([ * @default undefined * * @example - * geometry.attributes.position = new GeometryAttribute({ - * componentDatatype : ComponentDatatype.FLOAT, + * geometry.attributes.position = new Cesium.GeometryAttribute({ + * componentDatatype : Cesium.ComponentDatatype.FLOAT, * componentsPerAttribute : 3, * values : new Float32Array() * }); @@ -171,7 +171,7 @@ define([ * @exception {DeveloperError} geometries is required. * * @example - * var numVertices = Geometry.computeNumberOfVertices(geometry); + * var numVertices = Cesium.Geometry.computeNumberOfVertices(geometry); */ Geometry.computeNumberOfVertices = function(geometry) { if (!defined(geometry)) { diff --git a/Source/Core/GeometryAttribute.js b/Source/Core/GeometryAttribute.js index 857d4daa0421..ae9274889070 100644 --- a/Source/Core/GeometryAttribute.js +++ b/Source/Core/GeometryAttribute.js @@ -28,10 +28,10 @@ define([ * @exception {DeveloperError} options.values is required. * * @example - * var geometry = new Geometry({ + * var geometry = new Cesium.Geometry({ * attributes : { - * position : new GeometryAttribute({ - * componentDatatype : ComponentDatatype.FLOAT, + * position : new Cesium.GeometryAttribute({ + * componentDatatype : Cesium.ComponentDatatype.FLOAT, * componentsPerAttribute : 3, * values : [ * 0.0, 0.0, 0.0, @@ -40,7 +40,7 @@ define([ * ] * }) * }, - * primitiveType : PrimitiveType.LINE_LOOP + * primitiveType : Cesium.PrimitiveType.LINE_LOOP * }); * * @see Geometry @@ -84,7 +84,7 @@ define([ * @default undefined * * @example - * attribute.componentDatatype : ComponentDatatype.FLOAT, + * attribute.componentDatatype : Cesium.ComponentDatatype.FLOAT, * attribute.componentsPerAttribute : 3, * attribute.values = new Float32Array([ * 0.0, 0.0, 0.0, @@ -107,14 +107,14 @@ define([ * @default false * * @example - * attribute.componentDatatype : ComponentDatatype.UNSIGNED_BYTE, + * attribute.componentDatatype : Cesium.ComponentDatatype.UNSIGNED_BYTE, * attribute.componentsPerAttribute : 4, * attribute.normalize = true; * attribute.values = new Uint8Array([ - * Color.floatToByte(color.red) - * Color.floatToByte(color.green) - * Color.floatToByte(color.blue) - * Color.floatToByte(color.alpha) + * Cesium.Color.floatToByte(color.red) + * Cesium.Color.floatToByte(color.green) + * Cesium.Color.floatToByte(color.blue) + * Cesium.Color.floatToByte(color.alpha) * ]); */ this.normalize = defaultValue(options.normalize, false); @@ -129,7 +129,7 @@ define([ * @default undefined * * @example - * attribute.componentDatatype : ComponentDatatype.FLOAT, + * attribute.componentDatatype : Cesium.ComponentDatatype.FLOAT, * attribute.componentsPerAttribute : 3, * attribute.values = new Float32Array([ * 0.0, 0.0, 0.0, diff --git a/Source/Core/GeometryInstance.js b/Source/Core/GeometryInstance.js index 0b2b3e36bc0a..76e43aa16976 100644 --- a/Source/Core/GeometryInstance.js +++ b/Source/Core/GeometryInstance.js @@ -35,25 +35,25 @@ define([ * // Create geometry for a box, and two instances that refer to it. * // One instance positions the box on the bottom and colored aqua. * // The other instance positions the box on the top and color white. - * var geometry = new BoxGeometry({ - * vertexFormat : VertexFormat.POSITION_AND_NORMAL, - * dimensions : new Cartesian3(1000000.0, 1000000.0, 500000.0) + * var geometry = new Cesium.BoxGeometry({ + * vertexFormat : Cesium.VertexFormat.POSITION_AND_NORMAL, + * dimensions : new Cesium.Cartesian3(1000000.0, 1000000.0, 500000.0) * }), - * var instanceBottom = new GeometryInstance({ + * var instanceBottom = new Cesium.GeometryInstance({ * geometry : geometry, - * modelMatrix : Matrix4.multiplyByTranslation(Transforms.eastNorthUpToFixedFrame( - * ellipsoid.cartographicToCartesian(Cartographic.fromDegrees(-75.59777, 40.03883))), new Cartesian3(0.0, 0.0, 1000000.0)), + * modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame( + * ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-75.59777, 40.03883))), new Cesium.Cartesian3(0.0, 0.0, 1000000.0)), * attributes : { - * color : new ColorGeometryInstanceAttribute(Color.AQUA) + * color : new Cesium.ColorGeometryInstanceAttribute(Cesium.Color.AQUA) * } * id : 'bottom' * }); - * var instanceTop = new GeometryInstance({ + * var instanceTop = new Cesium.GeometryInstance({ * geometry : geometry, - * modelMatrix : Matrix4.multiplyByTranslation(Transforms.eastNorthUpToFixedFrame( - * ellipsoid.cartographicToCartesian(Cartographic.fromDegrees(-75.59777, 40.03883))), new Cartesian3(0.0, 0.0, 3000000.0)), + * modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame( + * ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-75.59777, 40.03883))), new Cesium.Cartesian3(0.0, 0.0, 3000000.0)), * attributes : { - * color : new ColorGeometryInstanceAttribute(Color.AQUA) + * color : new Cesium.ColorGeometryInstanceAttribute(Cesium.Color.AQUA) * } * id : 'top' * }); diff --git a/Source/Core/GeometryInstanceAttribute.js b/Source/Core/GeometryInstanceAttribute.js index a0496229c18a..f9f5b227152b 100644 --- a/Source/Core/GeometryInstanceAttribute.js +++ b/Source/Core/GeometryInstanceAttribute.js @@ -26,16 +26,16 @@ define([ * @exception {DeveloperError} options.value is required. * * @example - * var instance = new GeometryInstance({ - * geometry : new BoxGeometry({ - * dimensions : new Cartesian3(1000000.0, 1000000.0, 500000.0) + * var instance = new Cesium.GeometryInstance({ + * geometry : new Cesium.BoxGeometry({ + * dimensions : new Cesium.Cartesian3(1000000.0, 1000000.0, 500000.0) * }), - * modelMatrix : Matrix4.multiplyByTranslation(Transforms.eastNorthUpToFixedFrame( - * ellipsoid.cartographicToCartesian(Cartographic.fromDegrees(-0.0, 0.0))), new Cartesian3(0.0, 0.0, 1000000.0)), + * modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame( + * ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-0.0, 0.0))), new Cesium.Cartesian3(0.0, 0.0, 1000000.0)), * id : 'box', * attributes : { - * color : new GeometryInstanceAttribute({ - * componentDatatype : ComponentDatatype.UNSIGNED_BYTE, + * color : new Cesium.GeometryInstanceAttribute({ + * componentDatatype : Cesium.ComponentDatatype.UNSIGNED_BYTE, * componentsPerAttribute : 4, * normalize : true, * value : [255, 255, 0 255] @@ -85,8 +85,8 @@ define([ * @default undefined * * @example - * show : new GeometryInstanceAttribute({ - * componentDatatype : ComponentDatatype.UNSIGNED_BYTE, + * show : new Cesium.GeometryInstanceAttribute({ + * componentDatatype : Cesium.ComponentDatatype.UNSIGNED_BYTE, * componentsPerAttribute : 1, * normalize : true, * value : 1.0 @@ -107,14 +107,14 @@ define([ * @default false * * @example - * attribute.componentDatatype : ComponentDatatype.UNSIGNED_BYTE, + * attribute.componentDatatype : Cesium.ComponentDatatype.UNSIGNED_BYTE, * attribute.componentsPerAttribute : 4, * attribute.normalize = true; * attribute.value = [ - * Color.floatToByte(color.red) - * Color.floatToByte(color.green) - * Color.floatToByte(color.blue) - * Color.floatToByte(color.alpha) + * Cesium.Color.floatToByte(color.red) + * Cesium.Color.floatToByte(color.green) + * Cesium.Color.floatToByte(color.blue) + * Cesium.Color.floatToByte(color.alpha) * ]; */ this.normalize = defaultValue(options.normalize, false); @@ -127,8 +127,8 @@ define([ * @default undefined * * @example - * show : new GeometryInstanceAttribute({ - * componentDatatype : ComponentDatatype.UNSIGNED_BYTE, + * show : new Cesium.GeometryInstanceAttribute({ + * componentDatatype : Cesium.ComponentDatatype.UNSIGNED_BYTE, * componentsPerAttribute : 1, * normalize : true, * value : [1.0] diff --git a/Source/Core/GeometryPipeline.js b/Source/Core/GeometryPipeline.js index b7829b5b3332..8828ea3e12a3 100644 --- a/Source/Core/GeometryPipeline.js +++ b/Source/Core/GeometryPipeline.js @@ -136,7 +136,7 @@ define([ * @exception {DeveloperError} geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN. * * @example - * geometry = GeometryPipeline.toWireframe(geometry); + * geometry = Cesium.GeometryPipeline.toWireframe(geometry); */ GeometryPipeline.toWireframe = function(geometry) { if (!defined(geometry)) { @@ -181,7 +181,7 @@ define([ * @exception {DeveloperError} geometry.attributes must have an attribute with the same name as the attributeName parameter. * * @example - * var geometry = GeometryPipeline.createLineSegmentsForVectors(instance.geometry, 'binormal', 100000.0), + * var geometry = Cesium.GeometryPipeline.createLineSegmentsForVectors(instance.geometry, 'binormal', 100000.0), */ GeometryPipeline.createLineSegmentsForVectors = function(geometry, attributeName, length) { if (!defined(geometry)) { @@ -247,7 +247,7 @@ define([ * @exception {DeveloperError} geometry is required. * * @example - * var attributeIndices = GeometryPipeline.createAttributeIndices(geometry); + * var attributeIndices = Cesium.GeometryPipeline.createAttributeIndices(geometry); * // Example output * // { * // 'position' : 0, @@ -321,7 +321,7 @@ define([ * @exception {DeveloperError} Each attribute array in geometry.attributes must have the same number of attributes. * * @example - * geometry = GeometryPipeline.reorderForPreVertexCache(geometry); + * geometry = Cesium.GeometryPipeline.reorderForPreVertexCache(geometry); * * @see GeometryPipeline.reorderForPostVertexCache */ @@ -407,7 +407,7 @@ define([ * @exception {DeveloperError} cacheCapacity must be greater than two. * * @example - * geometry = GeometryPipeline.reorderForPostVertexCache(geometry); + * geometry = Cesium.GeometryPipeline.reorderForPostVertexCache(geometry); * * @see GeometryPipeline.reorderForPreVertexCache * @see @@ -491,7 +491,7 @@ define([ * @exception {DeveloperError} All geometry attribute lists must have the same number of attributes. * * @example - * var geometries = GeometryPipeline.fitToUnsignedShortIndices(geometry); + * var geometries = Cesium.GeometryPipeline.fitToUnsignedShortIndices(geometry); */ GeometryPipeline.fitToUnsignedShortIndices = function(geometry) { if (!defined(geometry)) { @@ -600,7 +600,7 @@ define([ * @exception {DeveloperError} Could not project a point to 2D. * * @example - * geometry = GeometryPipeline.projectTo2D(geometry, 'position', 'position3D', 'position2D'); + * geometry = Cesium.GeometryPipeline.projectTo2D(geometry, 'position', 'position3D', 'position2D'); */ GeometryPipeline.projectTo2D = function(geometry, attributeName, attributeName3D, attributeName2D, projection) { if (!defined(geometry)) { @@ -692,7 +692,7 @@ define([ * @exception {DeveloperError} The attribute componentDatatype must be ComponentDatatype.DOUBLE. * * @example - * geometry = GeometryPipeline.encodeAttribute(geometry, 'position3D', 'position3DHigh', 'position3DLow'); + * geometry = Cesium.GeometryPipeline.encodeAttribute(geometry, 'position3D', 'position3DHigh', 'position3DLow'); * * @see EncodedCartesian3 */ @@ -796,9 +796,9 @@ define([ * * @example * for (var i = 0; i < instances.length; ++i) { - * GeometryPipeline.transformToWorldCoordinates(instances[i]); + * Cesium.GeometryPipeline.transformToWorldCoordinates(instances[i]); * } - * var geometry = GeometryPipeline.combine(instances); + * var geometry = Cesium.GeometryPipeline.combine(instances); * * @see GeometryPipeline.combine */ @@ -915,9 +915,9 @@ define([ * * @example * for (var i = 0; i < instances.length; ++i) { - * GeometryPipeline.transformToWorldCoordinates(instances[i]); + * Cesium.GeometryPipeline.transformToWorldCoordinates(instances[i]); * } - * var geometry = GeometryPipeline.combine(instances); + * var geometry = Cesium.GeometryPipeline.combine(instances); * * @see GeometryPipeline.transformToWorldCoordinates */ @@ -1064,7 +1064,7 @@ define([ * @exception {DeveloperError} geometry.primitiveType must be {@link PrimitiveType.TRIANGLES}. * * @example - * GeometryPipeline.computeNormal(geometry); + * Cesium.GeometryPipeline.computeNormal(geometry); */ GeometryPipeline.computeNormal = function(geometry) { if (!defined(geometry)) { @@ -1216,7 +1216,7 @@ define([ * @exception {DeveloperError} geometry.primitiveType must be {@link PrimitiveType.TRIANGLES}. * * @example - * GeometryPipeline.computeBinormalAndTangent(geometry); + * Cesium.GeometryPipeline.computeBinormalAndTangent(geometry); */ GeometryPipeline.computeBinormalAndTangent = function(geometry) { if (!defined(geometry)) { @@ -1902,7 +1902,7 @@ define([ * @exception {DeveloperError} geometry is required. * * @example - * geometry = GeometryPipeline.wrapLongitude(geometry); + * geometry = Cesium.GeometryPipeline.wrapLongitude(geometry); */ GeometryPipeline.wrapLongitude = function(geometry) { if (!defined(geometry)) { diff --git a/Source/Core/HeightmapTessellator.js b/Source/Core/HeightmapTessellator.js index c1d949c2ec31..2de39dc7a492 100644 --- a/Source/Core/HeightmapTessellator.js +++ b/Source/Core/HeightmapTessellator.js @@ -93,7 +93,7 @@ define([ * var height = 5; * var vertices = new Float32Array(width * height * 6); * var description = ; - * HeightmapTessellator.computeVertices({ + * Cesium.HeightmapTessellator.computeVertices({ * vertices : vertices, * heightmap : [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0], * width : width, diff --git a/Source/Core/HermiteSpline.js b/Source/Core/HermiteSpline.js index 56cda1163bcf..8823fb98dd45 100644 --- a/Source/Core/HermiteSpline.js +++ b/Source/Core/HermiteSpline.js @@ -194,14 +194,14 @@ define([ * @example * // Example 1. * // Create a natural cubic spline above the earth from Philadelphia to Los Angeles. - * var spline = new HermiteSpline({ + * var spline = new Cesium.HermiteSpline({ * times : [ 0.0, 1.5, 3.0, 4.5, 6.0 ], * points : [ - * new Cartesian3(1235398.0, -4810983.0, 4146266.0), - * new Cartesian3(1372574.0, -5345182.0, 4606657.0), - * new Cartesian3(-757983.0, -5542796.0, 4514323.0), - * new Cartesian3(-2821260.0, -5248423.0, 4021290.0), - * new Cartesian3(-2539788.0, -4724797.0, 3620093.0) + * new Cesium.Cartesian3(1235398.0, -4810983.0, 4146266.0), + * new Cesium.Cartesian3(1372574.0, -5345182.0, 4606657.0), + * new Cesium.Cartesian3(-757983.0, -5542796.0, 4514323.0), + * new Cesium.Cartesian3(-2821260.0, -5248423.0, 4021290.0), + * new Cesium.Cartesian3(-2539788.0, -4724797.0, 3620093.0) * ] * }); * @@ -209,22 +209,22 @@ define([ * // Create a Catmull-Rom spline above the earth from Philadelphia to Los Angeles. * var times = [ 0.0, 1.5, 3.0, 4.5, 6.0 ]; * var points : [ - * new Cartesian3(1235398.0, -4810983.0, 4146266.0), - * new Cartesian3(1372574.0, -5345182.0, 4606657.0), - * new Cartesian3(-757983.0, -5542796.0, 4514323.0), - * new Cartesian3(-2821260.0, -5248423.0, 4021290.0), - * new Cartesian3(-2539788.0, -4724797.0, 3620093.0) + * new Cesium.Cartesian3(1235398.0, -4810983.0, 4146266.0), + * new Cesium.Cartesian3(1372574.0, -5345182.0, 4606657.0), + * new Cesium.Cartesian3(-757983.0, -5542796.0, 4514323.0), + * new Cesium.Cartesian3(-2821260.0, -5248423.0, 4021290.0), + * new Cesium.Cartesian3(-2539788.0, -4724797.0, 3620093.0) * ]; * * // Add tangents * var tangents = new Array(points.length); - * tangents[0] = new Cartesian3(1125196, -161816, 270551); + * tangents[0] = new Cesium.Cartesian3(1125196, -161816, 270551); * for (var i = 1; i < tangents.length - 1; ++i) { - * tangents[i] = Cartesian3.multiplyByScalar(Cartesian3.subtract(controlPoints[i + 1].point, controlPoints[i - 1].point), 0.5); + * tangents[i] = Cesium.Cartesian3.multiplyByScalar(Cesium.Cartesian3.subtract(controlPoints[i + 1].point, controlPoints[i - 1].point), 0.5); * } - * tangents[tangents.length - 1] = new Cartesian3(1165345, 112641, 47281); + * tangents[tangents.length - 1] = new Cesium.Cartesian3(1165345, 112641, 47281); * - * var spline = new HermiteSpline({ + * var spline = new Cesium.HermiteSpline({ * times : times, * points : points, * tangents : tangents @@ -324,14 +324,14 @@ define([ * * @example * // spline above the earth from Philadelphia to Los Angeles - * var spline = new HermiteSpline({ + * var spline = new Cesium.HermiteSpline({ * times : [ 0.0, 1.5, 3.0, 4.5, 6.0 ], * points : [ - * new Cartesian3(1235398.0, -4810983.0, 4146266.0), - * new Cartesian3(1372574.0, -5345182.0, 4606657.0), - * new Cartesian3(-757983.0, -5542796.0, 4514323.0), - * new Cartesian3(-2821260.0, -5248423.0, 4021290.0), - * new Cartesian3(-2539788.0, -4724797.0, 3620093.0) + * new Cesium.Cartesian3(1235398.0, -4810983.0, 4146266.0), + * new Cesium.Cartesian3(1372574.0, -5345182.0, 4606657.0), + * new Cesium.Cartesian3(-757983.0, -5542796.0, 4514323.0), + * new Cesium.Cartesian3(-2821260.0, -5248423.0, 4021290.0), + * new Cesium.Cartesian3(-2539788.0, -4724797.0, 3620093.0) * ] * }); * diff --git a/Source/Core/IndexDatatype.js b/Source/Core/IndexDatatype.js index b93f2f00cd61..ec941c4fd137 100644 --- a/Source/Core/IndexDatatype.js +++ b/Source/Core/IndexDatatype.js @@ -56,7 +56,7 @@ define([ * * @example * // Returns 2 - * var size = IndexDatatype.getSizeInBytes(IndexDatatype.UNSIGNED_SHORT); + * var size = Cesium.IndexDatatype.getSizeInBytes(Cesium.IndexDatatype.UNSIGNED_SHORT); */ IndexDatatype.getSizeInBytes = function(indexDatatype) { switch(indexDatatype) { @@ -79,8 +79,8 @@ define([ * @returns {Boolean} true if the provided index datatype is a valid value; otherwise, false. * * @example - * if (!IndexDatatype.validate(indexDatatype)) { - * throw new DeveloperError('indexDatatype must be a valid value.'); + * if (!Cesium.IndexDatatype.validate(indexDatatype)) { + * throw new Cesium.DeveloperError('indexDatatype must be a valid value.'); * } */ IndexDatatype.validate = function(indexDatatype) { @@ -102,7 +102,7 @@ define([ * @exception {DeveloperError} center is required. * * @example - * this.indices = IndexDatatype.createTypedArray(positions.length / 3, numberOfIndices); + * this.indices = Cesium.IndexDatatype.createTypedArray(positions.length / 3, numberOfIndices); */ IndexDatatype.createTypedArray = function(numberOfVertices, indicesLengthOrArray) { if (!defined(numberOfVertices)) { diff --git a/Source/Core/IntersectionTests.js b/Source/Core/IntersectionTests.js index 850bbb12c1b9..1c1826a8080d 100644 --- a/Source/Core/IntersectionTests.js +++ b/Source/Core/IntersectionTests.js @@ -372,15 +372,15 @@ define([ * @exception {DeveloperError} plane is required. * * @example - * var origin = ellipsoid.cartographicToCartesian(Cartographic.fromDegrees(-75.59777, 40.03883, 0.0)); + * var origin = ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-75.59777, 40.03883, 0.0)); * var normal = ellipsoid.geodeticSurfaceNormal(origin); - * var plane = Plane.fromPointNormal(origin, normal); + * var plane = Cesium.Plane.fromPointNormal(origin, normal); * - * var p0 = new Cartesian3(...); - * var p1 = new Cartesian3(...); + * var p0 = new Cesium.Cartesian3(...); + * var p1 = new Cesium.Cartesian3(...); * * // find the intersection of the line segment from p0 to p1 and the tangent plane at origin. - * var intersection = IntersectionTests.lineSegmentPlane(p0, p1, plane); + * var intersection = Cesium.IntersectionTests.lineSegmentPlane(p0, p1, plane); */ IntersectionTests.lineSegmentPlane = function(endPoint0, endPoint1, plane, result) { if (!defined(endPoint0)) { @@ -435,16 +435,16 @@ define([ * @exception {DeveloperError} p0, p1, p2, and plane are required. * * @example - * var origin = ellipsoid.cartographicToCartesian(Cartographic.fromDegrees(-75.59777, 40.03883, 0.0)); + * var origin = ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-75.59777, 40.03883, 0.0)); * var normal = ellipsoid.geodeticSurfaceNormal(origin); - * var plane = Plane.fromPointNormal(origin, normal); + * var plane = Cesium.Plane.fromPointNormal(origin, normal); * - * var p0 = new Cartesian3(...); - * var p1 = new Cartesian3(...); - * var p2 = new Cartesian3(...); + * var p0 = new Cesium.Cartesian3(...); + * var p1 = new Cesium.Cartesian3(...); + * var p2 = new Cesium.Cartesian3(...); * * // convert the triangle composed of points (p0, p1, p2) to three triangles that don't cross the plane - * var triangles = IntersectionTests.lineSegmentPlane(p0, p1, p2, plane); + * var triangles = Cesium.IntersectionTests.lineSegmentPlane(p0, p1, p2, plane); * */ IntersectionTests.trianglePlaneIntersection = function(p0, p1, p2, plane) { diff --git a/Source/Core/JulianDate.js b/Source/Core/JulianDate.js index 58fea7dbae73..13ef55c409bd 100644 --- a/Source/Core/JulianDate.js +++ b/Source/Core/JulianDate.js @@ -242,12 +242,12 @@ define([ * * @example * // Example 1. Construct a JulianDate representing the current system time. - * var julianDate = new JulianDate(); + * var julianDate = new Cesium.JulianDate(); * * // Example 2. Construct a JulianDate from a Julian day number and seconds of the day. * var julianDayNumber = 2448257; // January 1, 1991 * var secondsOfDay = 21600; // 06:00:00 - * var julianDate = new JulianDate(julianDayNumber, secondsOfDay, TimeStandard.UTC); + * var julianDate = new Cesium.JulianDate(julianDayNumber, secondsOfDay, Cesium.TimeStandard.UTC); */ var JulianDate = function(julianDayNumber, julianSecondsOfDay, timeStandard) { this._julianDayNumber = undefined; @@ -336,7 +336,7 @@ define([ * @example * // Construct a JulianDate specifying the UTC time standard * var date = new Date('January 1, 2011 12:00:00 EST'); - * var julianDate = JulianDate.fromDate(date, TimeStandard.UTC); + * var julianDate = Cesium.JulianDate.fromDate(date, Cesium.TimeStandard.UTC); */ JulianDate.fromDate = function(date, timeStandard) { if (!(date instanceof Date) || isNaN(date.getTime())) { @@ -368,11 +368,11 @@ define([ * * @example * // Example 1. Construct a JulianDate in UTC at April 24th, 2012 6:08PM UTC - * var julianDate = JulianDate.fromIso8601('2012-04-24T18:08Z'); + * var julianDate = Cesium.JulianDate.fromIso8601('2012-04-24T18:08Z'); * // Example 2. Construct a JulianDate in local time April 24th, 2012 12:00 AM - * var localDay = JulianDate.fromIso8601('2012-04-24'); + * var localDay = Cesium.JulianDate.fromIso8601('2012-04-24'); * // Example 3. Construct a JulianDate 5 hours behind UTC April 24th, 2012 5:00 pm UTC - * var localDay = JulianDate.fromIso8601('2012-04-24T12:00-05:00'); + * var localDay = Cesium.JulianDate.fromIso8601('2012-04-24T12:00-05:00'); */ JulianDate.fromIso8601 = function(iso8601String) { if (typeof iso8601String !== 'string') { @@ -633,7 +633,7 @@ define([ * * @example * // Construct a date which corresponds to January 1, 1991 06:00:00 UTC. - * var julianDate = JulianDate.fromTotalDays(2448257.75, TimeStandard.UTC); + * var julianDate = Cesium.JulianDate.fromTotalDays(2448257.75, Cesium.TimeStandard.UTC); */ JulianDate.fromTotalDays = function(totalDays, timeStandard) { if (totalDays === null || isNaN(totalDays)) { @@ -887,8 +887,8 @@ define([ * @see JulianDate#getDaysDifference * * @example - * var start = JulianDate.fromDate(new Date('July 4, 2011 12:00:00')); - * var end = JulianDate.fromDate(new Date('July 5, 2011 12:01:00')); + * var start = Cesium.JulianDate.fromDate(new Date('July 4, 2011 12:00:00')); + * var end = Cesium.JulianDate.fromDate(new Date('July 5, 2011 12:01:00')); * var difference = start.getSecondsDifference(end); // 86460.0 seconds */ JulianDate.prototype.getSecondsDifference = function(other) { @@ -912,8 +912,8 @@ define([ * @see JulianDate#getDaysDifference * * @example - * var start = JulianDate.fromDate(new Date('July 4, 2011 12:00:00')); - * var end = JulianDate.fromDate(new Date('July 5, 2011 12:01:00')); + * var start = Cesium.JulianDate.fromDate(new Date('July 4, 2011 12:00:00')); + * var end = Cesium.JulianDate.fromDate(new Date('July 5, 2011 12:01:00')); * var difference = start.getMinutesDifference(end); // 1441.0 minutes */ JulianDate.prototype.getMinutesDifference = function(other) { @@ -934,8 +934,8 @@ define([ * @see JulianDate#getMinutesDifference * * @example - * var start = JulianDate.fromDate(new Date('July 4, 2011 12:00:00')); - * var end = JulianDate.fromDate(new Date('July 5, 2011 14:24:00')); + * var start = Cesium.JulianDate.fromDate(new Date('July 4, 2011 12:00:00')); + * var end = Cesium.JulianDate.fromDate(new Date('July 5, 2011 14:24:00')); * var difference = start.getDaysDifference(end); // 1.1 days */ JulianDate.prototype.getDaysDifference = function(other) { @@ -958,7 +958,7 @@ define([ * * @example * var date = new Date('August 1, 2012 12:00:00 UTC'); - * var julianDate = JulianDate.fromDate(date); + * var julianDate = Cesium.JulianDate.fromDate(date); * var difference = julianDate.getTaiMinusUtc(); //35 */ JulianDate.prototype.getTaiMinusUtc = function() { @@ -996,7 +996,7 @@ define([ * var date = new Date(); * date.setUTCFullYear(2011, 6, 4); // July 4, 2011 @ 12:00:00 UTC * date.setUTCHours(12, 0, 00, 0); - * var start = JulianDate.fromDate(date); + * var start = Cesium.JulianDate.fromDate(date); * var end = start.addSeconds(95); // July 4, 2011 @ 12:01:35 UTC */ JulianDate.prototype.addSeconds = function(seconds, result) { @@ -1026,7 +1026,7 @@ define([ * var date = new Date(); * date.setUTCFullYear(2011, 6, 4); // July 4, 2011 @ 12:00 UTC * date.setUTCHours(12, 0, 0, 0); - * var start = JulianDate.fromDate(date); + * var start = Cesium.JulianDate.fromDate(date); * var end = start.addMinutes(65); // July 4, 2011 @ 13:05 UTC */ JulianDate.prototype.addMinutes = function(duration) { @@ -1057,7 +1057,7 @@ define([ * var date = new Date(); * date.setUTCFullYear(2011, 6, 4); // July 4, 2011 @ 12:00 UTC * date.setUTCHours(12, 0, 0, 0); - * var start = JulianDate.fromDate(date); + * var start = Cesium.JulianDate.fromDate(date); * var end = start.addHours(6); // July 4, 2011 @ 18:00 UTC */ JulianDate.prototype.addHours = function(duration) { @@ -1088,7 +1088,7 @@ define([ * var date = new Date(); * date.setUTCFullYear(2011, 6, 4); // July 4, 2011 @ 12:00 UTC * date.setUTCHours(12, 0, 0, 0); - * var start = JulianDate.fromDate(date); + * var start = Cesium.JulianDate.fromDate(date); * var end = start.addDays(5); // July 9, 2011 @ 12:00 UTC */ JulianDate.prototype.addDays = function(duration) { @@ -1113,8 +1113,8 @@ define([ * @see JulianDate#greaterThanOrEquals * * @example - * var start = JulianDate.fromDate(new Date('July 6, 1991 12:00:00')); - * var end = JulianDate.fromDate(new Date('July 6, 2011 12:01:00')); + * var start = Cesium.JulianDate.fromDate(new Date('July 6, 1991 12:00:00')); + * var end = Cesium.JulianDate.fromDate(new Date('July 6, 2011 12:01:00')); * start.lessThan(end); // true */ JulianDate.prototype.lessThan = function(other) { @@ -1135,8 +1135,8 @@ define([ * @see JulianDate#greaterThanOrEquals * * @example - * var start = JulianDate.fromDate(new Date('July 6, 1991 12:00:00')); - * var end = JulianDate.fromDate(new Date('July 6, 2011 12:00:00')); + * var start = Cesium.JulianDate.fromDate(new Date('July 6, 1991 12:00:00')); + * var end = Cesium.JulianDate.fromDate(new Date('July 6, 2011 12:00:00')); * start.lessThanOrEquals(end); // true */ JulianDate.prototype.lessThanOrEquals = function(other) { @@ -1157,8 +1157,8 @@ define([ * @see JulianDate#greaterThanOrEquals * * @example - * var start = JulianDate.fromDate(new Date('July 6, 1991 12:00:00')); - * var end = JulianDate.fromDate(new Date('July 6, 2011 12:01:00')); + * var start = Cesium.JulianDate.fromDate(new Date('July 6, 1991 12:00:00')); + * var end = Cesium.JulianDate.fromDate(new Date('July 6, 2011 12:01:00')); * end.greaterThan(start); // true */ JulianDate.prototype.greaterThan = function(other) { @@ -1179,8 +1179,8 @@ define([ * @see JulianDate#greaterThan * * @example - * var start = JulianDate.fromDate(new Date('July 6, 1991 12:00:00')); - * var end = JulianDate.fromDate(new Date('July 6, 2011 12:00:00')); + * var start = Cesium.JulianDate.fromDate(new Date('July 6, 1991 12:00:00')); + * var end = Cesium.JulianDate.fromDate(new Date('July 6, 2011 12:00:00')); * end.greaterThanOrEquals(start); // true */ JulianDate.prototype.greaterThanOrEquals = function(other) { @@ -1214,8 +1214,8 @@ define([ * @see JulianDate#equalsEpsilon * * @example - * var original = JulianDate.fromDate(new Date('July 4, 2011 12:00:00')); - * var clone = JulianDate.fromDate(new Date('July 4, 2011 12:00:00')); + * var original = Cesium.JulianDate.fromDate(new Date('July 4, 2011 12:00:00')); + * var clone = Cesium.JulianDate.fromDate(new Date('July 4, 2011 12:00:00')); * original.equals(clone); // true */ JulianDate.prototype.equals = function(other) { @@ -1240,8 +1240,8 @@ define([ * @see JulianDate#equals * * @example - * var original = JulianDate.fromDate(new Date('July 4, 2011 12:00:00')); - * var clone = JulianDate.fromDate(new Date('July 4, 2011 12:00:01')); + * var original = Cesium.JulianDate.fromDate(new Date('July 4, 2011 12:00:00')); + * var clone = Cesium.JulianDate.fromDate(new Date('July 4, 2011 12:00:01')); * original.equalsEpsilon(clone, 2); // true */ JulianDate.prototype.equalsEpsilon = function(other, epsilon) { diff --git a/Source/Core/LeapSecond.js b/Source/Core/LeapSecond.js index 210544eb46ac..f40558badb2f 100644 --- a/Source/Core/LeapSecond.js +++ b/Source/Core/LeapSecond.js @@ -26,7 +26,7 @@ define([ * @example * // Example 1. Construct a LeapSecond using a JulianDate * var date = new Date('January 1, 1990 00:00:00 UTC'); - * var leapSecond = new LeapSecond(JulianDate.fromDate(date), 25.0); + * var leapSecond = new Cesium.LeapSecond(Cesium.JulianDate.fromDate(date), 25.0); * var offset = leapSecond.offset; // 25.0 * * ////////////////////////////////////////////////////////////////// @@ -71,10 +71,10 @@ define([ * @see LeapSecond.setLeapSeconds * * @example - * LeapSecond.setLeapSeconds([ - * new LeapSecond(new JulianDate(2453736, 43233.0, TimeStandard.TAI), 33), // January 1, 2006 00:00:00 UTC - * new LeapSecond(new JulianDate(2454832, 43234.0, TimeStandard.TAI), 34), // January 1, 2009 00:00:00 UTC - * new LeapSecond(new JulianDate(2456109, 43235.0, TimeStandard.TAI), 35) // July 1, 2012 00:00:00 UTC + * Cesium.LeapSecond.setLeapSeconds([ + * new Cesium.LeapSecond(new Cesium.JulianDate(2453736, 43233.0, Cesium.TimeStandard.TAI), 33), // January 1, 2006 00:00:00 UTC + * new Cesium.LeapSecond(new Cesium.JulianDate(2454832, 43234.0, Cesium.TimeStandard.TAI), 34), // January 1, 2009 00:00:00 UTC + * new Cesium.LeapSecond(new Cesium.JulianDate(2456109, 43235.0, Cesium.TimeStandard.TAI), 35) // July 1, 2012 00:00:00 UTC * ]); */ LeapSecond.setLeapSeconds = function(leapSeconds) { @@ -110,8 +110,8 @@ define([ * * @example * 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 leapSecond1 = new Cesium.LeapSecond(Cesium.JulianDate.fromDate(date), 25.0); + * var leapSecond2 = new Cesium.LeapSecond(Cesium.JulianDate.fromDate(date), 25.0); * leapSecond1.equals(leapSecond2); // true */ LeapSecond.prototype.equals = function(other) { @@ -136,9 +136,9 @@ define([ * * @example * var date = new Date('January 1, 2006 00:00:00 UTC'); - * var leapSecond1 = new LeapSecond(JulianDate.fromDate(date), 33.0); - * var leapSecond2 = new LeapSecond(JulianDate.fromDate(date), 34.0); - * LeapSecond.compareLeapSecondDate(leapSecond1, leapSecond2); // returns 0 + * var leapSecond1 = new Cesium.LeapSecond(Cesium.JulianDate.fromDate(date), 33.0); + * var leapSecond2 = new Cesium.LeapSecond(Cesium.JulianDate.fromDate(date), 34.0); + * Cesium.LeapSecond.compareLeapSecondDate(leapSecond1, leapSecond2); // returns 0 */ LeapSecond.compareLeapSecondDate = function(leapSecond1, leapSecond2) { return leapSecond1.julianDate.compareTo(leapSecond2.julianDate); diff --git a/Source/Core/LinearSpline.js b/Source/Core/LinearSpline.js index ff436d051c65..3d7bd33ce720 100644 --- a/Source/Core/LinearSpline.js +++ b/Source/Core/LinearSpline.js @@ -28,14 +28,14 @@ define([ * @exception {DeveloperError} times.length must be equal to points.length. * * @example - * var spline = new LinearSpline({ + * var spline = new Cesium.LinearSpline({ * times : [ 0.0, 1.5, 3.0, 4.5, 6.0 ], * points : [ - * new Cartesian3(1235398.0, -4810983.0, 4146266.0), - * new Cartesian3(1372574.0, -5345182.0, 4606657.0), - * new Cartesian3(-757983.0, -5542796.0, 4514323.0), - * new Cartesian3(-2821260.0, -5248423.0, 4021290.0), - * new Cartesian3(-2539788.0, -4724797.0, 3620093.0) + * new Cesium.Cartesian3(1235398.0, -4810983.0, 4146266.0), + * new Cesium.Cartesian3(1372574.0, -5345182.0, 4606657.0), + * new Cesium.Cartesian3(-757983.0, -5542796.0, 4514323.0), + * new Cesium.Cartesian3(-2821260.0, -5248423.0, 4021290.0), + * new Cesium.Cartesian3(-2539788.0, -4724797.0, 3620093.0) * ] * }); */ diff --git a/Source/Core/Math.js b/Source/Core/Math.js index df8b784e7c87..c0eed34809ed 100644 --- a/Source/Core/Math.js +++ b/Source/Core/Math.js @@ -408,7 +408,7 @@ define([ * * @example * // Convert 270 degrees to -90 degrees longitude - * var longitude = CesiumMath.convertLongitudeRange(CesiumMath.toRadians(270.0)); + * var longitude = Cesium.Math.convertLongitudeRange(Cesium.Math.toRadians(270.0)); */ CesiumMath.convertLongitudeRange = function(angle) { var twoPi = CesiumMath.TWO_PI; @@ -481,7 +481,7 @@ define([ * * @example * //Compute 7!, which is equal to 5040 - * var computedFactorial = CesiumMath.factorial(7); + * var computedFactorial = Cesium.Math.factorial(7); * * @exception {DeveloperError} A number greater than or equal to 0 is required. */ @@ -514,8 +514,8 @@ define([ * @returns {Number} The incremented number. * * @example - * var n = CesiumMath.incrementWrap(5, 10, 0); // returns 6 - * var n = CesiumMath.incrementWrap(10, 10, 0); // returns 0 + * var n = Cesium.Math.incrementWrap(5, 10, 0); // returns 6 + * var n = Cesium.Math.incrementWrap(10, 10, 0); // returns 0 * * @exception {DeveloperError} Maximum value must be greater than minimum value. */ @@ -547,8 +547,8 @@ define([ * @exception {DeveloperError} A number greater than or equal to 0 is required. * * @example - * var t = CesiumMath.isPowerOfTwo(16); // true - * var f = CesiumMath.isPowerOfTwo(20); // false + * var t = Cesium.Math.isPowerOfTwo(16); // true + * var f = Cesium.Math.isPowerOfTwo(20); // false */ CesiumMath.isPowerOfTwo = function(n) { //>>includeStart('debug', pragmas.debug); @@ -572,8 +572,8 @@ define([ * @exception {DeveloperError} A number greater than or equal to 0 is required. * * @example - * var n = CesiumMath.nextPowerOfTwo(29); // 32 - * var m = CesiumMath.nextPowerOfTwo(32); // 32 + * var n = Cesium.Math.nextPowerOfTwo(29); // 32 + * var m = Cesium.Math.nextPowerOfTwo(32); // 32 */ CesiumMath.nextPowerOfTwo = function(n) { //>>includeStart('debug', pragmas.debug); diff --git a/Source/Core/Matrix2.js b/Source/Core/Matrix2.js index f945b08b3cdd..c83f2236f0b1 100644 --- a/Source/Core/Matrix2.js +++ b/Source/Core/Matrix2.js @@ -79,11 +79,11 @@ define([ * // [1.0, 2.0] * * var v = [1.0, 1.0, 2.0, 2.0]; - * var m = Matrix2.fromArray(v); + * var m = Cesium.Matrix2.fromArray(v); * * // Create same Matrix2 with using an offset into an array * var v2 = [0.0, 0.0, 1.0, 1.0, 2.0, 2.0]; - * var m2 = Matrix2.fromArray(v2, 2); + * var m2 = Cesium.Matrix2.fromArray(v2, 2); */ Matrix2.fromArray = function(array, startingIndex, result) { //>>includeStart('debug', pragmas.debug); @@ -169,7 +169,7 @@ define([ * // Creates * // [7.0, 0.0] * // [0.0, 8.0] - * var m = Matrix2.fromScale(new Cartesian2(7.0, 8.0)); + * var m = Cesium.Matrix2.fromScale(new Cesium.Cartesian2(7.0, 8.0)); */ Matrix2.fromScale = function(scale, result) { //>>includeStart('debug', pragmas.debug); @@ -205,7 +205,7 @@ define([ * // Creates * // [2.0, 0.0] * // [0.0, 2.0] - * var m = Matrix2.fromUniformScale(2.0); + * var m = Cesium.Matrix2.fromUniformScale(2.0); */ Matrix2.fromUniformScale = function(scale, result) { //>>includeStart('debug', pragmas.debug); @@ -239,9 +239,9 @@ define([ * * @example * // Rotate a point 45 degrees counterclockwise. - * var p = new Cartesian2(5, 6); - * var m = Matrix2.fromRotation(CesiumMath.toRadians(45.0)); - * var rotated = Matrix2.multiplyByVector(m, p); + * var p = new Cesium.Cartesian2(5, 6); + * var m = Cesium.Matrix2.fromRotation(Cesium.Math.toRadians(45.0)); + * var rotated = Cesium.Matrix2.multiplyByVector(m, p); */ Matrix2.fromRotation = function(angle, result) { //>>includeStart('debug', pragmas.debug); @@ -305,8 +305,8 @@ define([ * @exception {DeveloperError} column is required and must be 0 or 1. * * @example - * var myMatrix = new Matrix2(); - * var column1Row0Index = Matrix2.getElementIndex(1, 0); + * var myMatrix = new Cesium.Matrix2(); + * var column1Row0Index = Cesium.Matrix2.getElementIndex(1, 0); * var column1Row0 = myMatrix[column1Row0Index] * myMatrix[column1Row0Index] = 10.0; */ @@ -721,7 +721,7 @@ define([ * @memberof Matrix2 * * @example - * var matrix = new Matrix2(); + * var matrix = new Cesium.Matrix2(); * matrix[Matrix2.COLUMN0ROW0] = 5.0; //set column 0, row 0 to 5.0 */ Matrix2.COLUMN0ROW0 = 0; @@ -731,7 +731,7 @@ define([ * @memberof Matrix2 * * @example - * var matrix = new Matrix2(); + * var matrix = new Cesium.Matrix2(); * matrix[Matrix2.COLUMN0ROW1] = 5.0; //set column 0, row 1 to 5.0 */ Matrix2.COLUMN0ROW1 = 1; @@ -741,7 +741,7 @@ define([ * @memberof Matrix2 * * @example - * var matrix = new Matrix2(); + * var matrix = new Cesium.Matrix2(); * matrix[Matrix2.COLUMN1ROW0] = 5.0; //set column 1, row 0 to 5.0 */ Matrix2.COLUMN1ROW0 = 2; @@ -751,7 +751,7 @@ define([ * @memberof Matrix2 * * @example - * var matrix = new Matrix2(); + * var matrix = new Cesium.Matrix2(); * matrix[Matrix2.COLUMN1ROW1] = 5.0; //set column 1, row 1 to 5.0 */ Matrix2.COLUMN1ROW1 = 3; diff --git a/Source/Core/Matrix3.js b/Source/Core/Matrix3.js index abffa8612eac..1e271a12725b 100644 --- a/Source/Core/Matrix3.js +++ b/Source/Core/Matrix3.js @@ -101,11 +101,11 @@ define([ * // [1.0, 2.0, 3.0] * * var v = [1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0]; - * var m = Matrix3.fromArray(v); + * var m = Cesium.Matrix3.fromArray(v); * * // Create same Matrix3 with using an offset into an array * var v2 = [0.0, 0.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0]; - * var m2 = Matrix3.fromArray(v2, 2); + * var m2 = Cesium.Matrix3.fromArray(v2, 2); */ Matrix3.fromArray = function(array, startingIndex, result) { //>>includeStart('debug', pragmas.debug); @@ -259,7 +259,7 @@ define([ * // [7.0, 0.0, 0.0] * // [0.0, 8.0, 0.0] * // [0.0, 0.0, 9.0] - * var m = Matrix3.fromScale(new Cartesian3(7.0, 8.0, 9.0)); + * var m = Cesium.Matrix3.fromScale(new Cesium.Cartesian3(7.0, 8.0, 9.0)); */ Matrix3.fromScale = function(scale, result) { //>>includeStart('debug', pragmas.debug); @@ -302,7 +302,7 @@ define([ * // [2.0, 0.0, 0.0] * // [0.0, 2.0, 0.0] * // [0.0, 0.0, 2.0] - * var m = Matrix3.fromUniformScale(2.0); + * var m = Cesium.Matrix3.fromUniformScale(2.0); */ Matrix3.fromUniformScale = function(scale, result) { //>>includeStart('debug', pragmas.debug); @@ -342,9 +342,9 @@ define([ * * @example * // Rotate a point 45 degrees counterclockwise around the x-axis. - * var p = new Cartesian3(5, 6, 7); - * var m = Matrix3.fromRotationX(CesiumMath.toRadians(45.0)); - * var rotated = Matrix3.multiplyByVector(m, p); + * var p = new Cesium.Cartesian3(5, 6, 7); + * var m = Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(45.0)); + * var rotated = Cesium.Matrix3.multiplyByVector(m, p); */ Matrix3.fromRotationX = function(angle, result) { //>>includeStart('debug', pragmas.debug); @@ -388,9 +388,9 @@ define([ * * @example * // Rotate a point 45 degrees counterclockwise around the y-axis. - * var p = new Cartesian3(5, 6, 7); - * var m = Matrix3.fromRotationY(CesiumMath.toRadians(45.0)); - * var rotated = Matrix3.multiplyByVector(m, p); + * var p = new Cesium.Cartesian3(5, 6, 7); + * var m = Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(45.0)); + * var rotated = Cesium.Matrix3.multiplyByVector(m, p); */ Matrix3.fromRotationY = function(angle, result) { //>>includeStart('debug', pragmas.debug); @@ -434,9 +434,9 @@ define([ * * @example * // Rotate a point 45 degrees counterclockwise around the z-axis. - * var p = new Cartesian3(5, 6, 7); - * var m = Matrix3.fromRotationZ(CesiumMath.toRadians(45.0)); - * var rotated = Matrix3.multiplyByVector(m, p); + * var p = new Cesium.Cartesian3(5, 6, 7); + * var m = Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(45.0)); + * var rotated = Cesium.Matrix3.multiplyByVector(m, p); */ Matrix3.fromRotationZ = function(angle, result) { //>>includeStart('debug', pragmas.debug); @@ -513,8 +513,8 @@ define([ * @exception {DeveloperError} column is required and must be 0, 1, or 2. * * @example - * var myMatrix = new Matrix3(); - * var column1Row0Index = Matrix3.getElementIndex(1, 0); + * var myMatrix = new Cesium.Matrix3(); + * var column1Row0Index = Cesium.Matrix3.getElementIndex(1, 0); * var column1Row0 = myMatrix[column1Row0Index] * myMatrix[column1Row0Index] = 10.0; */ @@ -991,18 +991,18 @@ define([ * @example * var a = //... symetric matrix * var result = { - * unitary : new Matrix3(), - * diagonal : new Matrix3() + * unitary : new Cesium.Matrix3(), + * diagonal : new Cesium.Matrix3() * }; - * Matrix3.getEigenDecomposition(a, result); + * Cesium.Matrix3.getEigenDecomposition(a, result); * - * var unitaryTranspose = Matrix3.transpose(result.unitary); - * var b = Matrix.multiply(result.unitary, result.diagonal); - * Matrix3.multiply(b, unitaryTranspose, b); // b is now equal to a + * var unitaryTranspose = Cesium.Matrix3.transpose(result.unitary); + * var b = Cesium.Matrix3.multiply(result.unitary, result.diagonal); + * Cesium.Matrix3.multiply(b, unitaryTranspose, b); // b is now equal to a * - * var lambda = Matrix3.getColumn(result.diagonal, 0).x; // first eigenvalue - * var v = Matrix3.getColumn(result.unitary, 0); // first eigenvector - * var c = Cartesian3.multiplyByScalar(v, lambda); // equal to Matrix3.multiplyByVector(a, v) + * var lambda = Cesium.Matrix3.getColumn(result.diagonal, 0).x; // first eigenvalue + * var v = Cesium.Matrix3.getColumn(result.unitary, 0); // first eigenvector + * var c = Cesium.Cartesian3.multiplyByScalar(v, lambda); // equal to Cesium.Matrix3.multiplyByVector(a, v) */ Matrix3.getEigenDecomposition = function(matrix, result) { //>>includeStart('debug', pragmas.debug); diff --git a/Source/Core/Matrix4.js b/Source/Core/Matrix4.js index 73fbce34ca3b..ef622153fcea 100644 --- a/Source/Core/Matrix4.js +++ b/Source/Core/Matrix4.js @@ -139,11 +139,11 @@ define([ * // [1.0, 2.0, 3.0, 4.0] * * var v = [1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, 3.0, 4.0, 4.0, 4.0, 4.0]; - * var m = Matrix4.fromArray(v); + * var m = Cesium.Matrix4.fromArray(v); * * // Create same Matrix4 with using an offset into an array * var v2 = [0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, 3.0, 4.0, 4.0, 4.0, 4.0]; - * var m2 = Matrix4.fromArray(v2, 2); + * var m2 = Cesium.Matrix4.fromArray(v2, 2); */ Matrix4.fromArray = function(array, startingIndex, result) { //>>includeStart('debug', pragmas.debug); @@ -309,10 +309,10 @@ define([ * @exception {DeveloperError} scale is required. * * @example - * result = Matrix4.fromTranslationQuaternionRotationScale( - * new Cartesian3(1.0, 2.0, 3.0), // translation - * Quaternion.IDENTITY, // rotation - * new Cartesian3(7.0, 8.0, 9.0), // scale + * result = Cesium.Matrix4.fromTranslationQuaternionRotationScale( + * new Cesium.Cartesian3(1.0, 2.0, 3.0), // translation + * Cesium.Quaternion.IDENTITY, // rotation + * new Cesium.Cartesian3(7.0, 8.0, 9.0), // scale * result); */ Matrix4.fromTranslationQuaternionRotationScale = function(translation, rotation, scale, result) { @@ -411,7 +411,7 @@ define([ * // [0.0, 8.0, 0.0, 0.0] * // [0.0, 0.0, 9.0, 0.0] * // [0.0, 0.0, 0.0, 1.0] - * var m = Matrix4.fromScale(new Cartesian3(7.0, 8.0, 9.0)); + * var m = Cesium.Matrix4.fromScale(new Cartesian3(7.0, 8.0, 9.0)); */ Matrix4.fromScale = function(scale, result) { //>>includeStart('debug', pragmas.debug); @@ -463,7 +463,7 @@ define([ * // [0.0, 2.0, 0.0, 0.0] * // [0.0, 0.0, 2.0, 0.0] * // [0.0, 0.0, 0.0, 1.0] - * var m = Matrix4.fromScale(2.0); + * var m = Cesium.Matrix4.fromScale(2.0); */ Matrix4.fromUniformScale = function(scale, result) { //>>includeStart('debug', pragmas.debug); @@ -910,7 +910,7 @@ define([ * * @example * // Example 1. Create viewport transformation using an explicit viewport and depth range. - * var m = Matrix4.computeViewportTransformation({ + * var m = Cesium.Matrix4.computeViewportTransformation({ * x : 0.0, * y : 0.0, * width : 1024.0, @@ -918,7 +918,7 @@ define([ * }, 0.0, 1.0); * * // Example 2. Create viewport transformation using the context's viewport. - * var m = Matrix4.computeViewportTransformation(context.getViewport()); + * var m = Cesium.Matrix4.computeViewportTransformation(context.getViewport()); */ Matrix4.computeViewportTransformation = function(viewport, nearDepthRange, farDepthRange, result) { viewport = defaultValue(viewport, defaultValue.EMPTY_OBJECT); @@ -983,7 +983,7 @@ define([ * // [11.0, 15.0, 19.0, 23.0] * // [12.0, 16.0, 20.0, 24.0] * // [13.0, 17.0, 21.0, 25.0] - * var a = Matrix4.toArray(m); + * var a = Cesium.Matrix4.toArray(m); * * // m remains the same * //creates a = [10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0] @@ -1033,8 +1033,8 @@ define([ * @exception {DeveloperError} column is required and must be 0, 1, 2, or 3. * * @example - * var myMatrix = new Matrix4(); - * var column1Row0Index = Matrix4.getElementIndex(1, 0); + * var myMatrix = new Cesium.Matrix4(); + * var column1Row0Index = Cesium.Matrix4.getElementIndex(1, 0); * var column1Row0 = myMatrix[column1Row0Index] * myMatrix[column1Row0Index] = 10.0; */ @@ -1073,11 +1073,11 @@ define([ * // [22.0, 23.0, 24.0, 25.0] * * //Example 1: Creates an instance of Cartesian - * var a = Matrix4.getColumn(m, 2); + * var a = Cesium.Matrix4.getColumn(m, 2); * * //Example 2: Sets values for Cartesian instance - * var a = new Cartesian4(); - * Matrix4.getColumn(m, 2, a); + * var a = new Cesium.Cartesian4(); + * Cesium.Matrix4.getColumn(m, 2, a); * * // a.x = 12.0; a.y = 16.0; a.z = 20.0; a.w = 24.0; * @@ -1132,7 +1132,7 @@ define([ * // [18.0, 19.0, 20.0, 21.0] * // [22.0, 23.0, 24.0, 25.0] * - * var a = Matrix4.setColumn(m, 2, new Cartesian4(99.0, 98.0, 97.0, 96.0)); + * var a = Cesium.Matrix4.setColumn(m, 2, new Cartesian4(99.0, 98.0, 97.0, 96.0)); * * // m remains the same * // a = [10.0, 11.0, 99.0, 13.0] @@ -1185,11 +1185,11 @@ define([ * // [22.0, 23.0, 24.0, 25.0] * * //Example 1: Returns an instance of Cartesian - * var a = Matrix4.getRow(m, 2); + * var a = Cesium.Matrix4.getRow(m, 2); * * //Example 1: Sets values for a Cartesian instance * var a = new Cartesian4(); - * Matrix4.getRow(m, 2, a); + * Cesium.Matrix4.getRow(m, 2, a); * * // a.x = 18.0; a.y = 19.0; a.z = 20.0; a.w = 21.0; */ @@ -1242,7 +1242,7 @@ define([ * // [18.0, 19.0, 20.0, 21.0] * // [22.0, 23.0, 24.0, 25.0] * - * var a = Matrix4.setRow(m, 2, new Cartesian4(99.0, 98.0, 97.0, 96.0)); + * var a = Cesium.Matrix4.setRow(m, 2, new Cartesian4(99.0, 98.0, 97.0, 96.0)); * * // m remains the same * // a = [10.0, 11.0, 12.0, 13.0] @@ -1392,9 +1392,9 @@ define([ * @exception {DeveloperError} right is required. * * @example - * var m1 = new Matrix4(1.0, 6.0, 7.0, 0.0, 2.0, 5.0, 8.0, 0.0, 3.0, 4.0, 9.0, 0.0, 0.0, 0.0, 0.0, 1.0]; - * var m2 = Transforms.eastNorthUpToFixedFrame(new Cartesian3(1.0, 1.0, 1.0)); - * var m3 = Matrix4.multiplyTransformation(m1, m2); + * var m1 = new Cesium.Matrix4(1.0, 6.0, 7.0, 0.0, 2.0, 5.0, 8.0, 0.0, 3.0, 4.0, 9.0, 0.0, 0.0, 0.0, 0.0, 1.0]; + * var m2 = Cesium.Transforms.eastNorthUpToFixedFrame(new Cesium.Cartesian3(1.0, 1.0, 1.0)); + * var m3 = Cesium.Matrix4.multiplyTransformation(m1, m2); */ Matrix4.multiplyTransformation = function(left, right, result) { //>>includeStart('debug', pragmas.debug); @@ -1492,8 +1492,8 @@ define([ * @see Matrix4#fromTranslation * * @example - * // Instead of Matrix4.multiply(m, Matrix4.fromTranslation(position), m); - * Matrix4.multiplyByTranslation(m, position, m); + * // Instead of Matrix4.multiply(m, Cesium.Matrix4.fromTranslation(position), m); + * Cesium.Matrix4.multiplyByTranslation(m, position, m); */ Matrix4.multiplyByTranslation = function(matrix, translation, result) { //>>includeStart('debug', pragmas.debug); @@ -1561,8 +1561,8 @@ define([ * @see Matrix4#multiplyByScale * * @example - * // Instead of Matrix4.multiply(m, Matrix4.fromUniformScale(scale), m); - * Matrix4.multiplyByUniformScale(m, scale, m); + * // Instead of Matrix4.multiply(m, Cesium.Matrix4.fromUniformScale(scale), m); + * Cesium.Matrix4.multiplyByUniformScale(m, scale, m); */ Matrix4.multiplyByUniformScale = function(matrix, scale, result) { //>>includeStart('debug', pragmas.debug); @@ -1597,8 +1597,8 @@ define([ * @see Matrix4#multiplyByUniformScale * * @example - * // Instead of Matrix4.multiply(m, Matrix4.fromScale(scale), m); - * Matrix4.multiplyByUniformScale(m, scale, m); + * // Instead of Matrix4.multiply(m, Cesium.Matrix4.fromScale(scale), m); + * Cesium.Matrix4.multiplyByUniformScale(m, scale, m); */ Matrix4.multiplyByScale = function(matrix, scale, result) { //>>includeStart('debug', pragmas.debug); @@ -1702,11 +1702,11 @@ define([ * @exception {DeveloperError} matrix is required. * * @example - * Cartesian3 p = new Cartesian3(1.0, 2.0, 3.0); - * Matrix4.multiplyByPointAsVector(matrix, p, result); + * var p = new Cesium.Cartesian3(1.0, 2.0, 3.0); + * Cesium.Matrix4.multiplyByPointAsVector(matrix, p, result); * // A shortcut for * // Cartesian3 p = ... - * // Matrix4.multiplyByVector(matrix, new Cartesian4(p.x, p.y, p.z, 0.0), result); + * // Cesium.Matrix4.multiplyByVector(matrix, new Cesium.Cartesian4(p.x, p.y, p.z, 0.0), result); */ Matrix4.multiplyByPointAsVector = function(matrix, cartesian, result) { //>>includeStart('debug', pragmas.debug); @@ -1749,8 +1749,8 @@ define([ * @exception {DeveloperError} matrix is required. * * @example - * Cartesian3 p = new Cartesian3(1.0, 2.0, 3.0); - * Matrix4.multiplyByPoint(matrix, p, result); + * var p = new Cesium.Cartesian3(1.0, 2.0, 3.0); + * Cesium.Matrix4.multiplyByPoint(matrix, p, result); */ Matrix4.multiplyByPoint = function(matrix, cartesian, result) { //>>includeStart('debug', pragmas.debug); @@ -1799,7 +1799,7 @@ define([ * // [18.0, 19.0, 20.0, 21.0] * // [22.0, 23.0, 24.0, 25.0] * - * var a = Matrix4.multiplyByScalar(m, -2); + * var a = Cesium.Matrix4.multiplyByScalar(m, -2); * * // m remains the same * // a = [-20.0, -22.0, -24.0, -26.0] @@ -1860,7 +1860,7 @@ define([ * // [18.0, 19.0, 20.0, 21.0] * // [22.0, 23.0, 24.0, 25.0] * - * var a = Matrix4.negate(m); + * var a = Cesium.Matrix4.negate(m); * * // m remains the same * // a = [-10.0, -11.0, -12.0, -13.0] @@ -1918,7 +1918,7 @@ define([ * // [18.0, 19.0, 20.0, 21.0] * // [22.0, 23.0, 24.0, 25.0] * - * var a = Matrix4.negate(m); + * var a = Cesium.Matrix4.negate(m); * * // m remains the same * // a = [10.0, 14.0, 18.0, 22.0] @@ -2034,7 +2034,7 @@ define([ * // [12.0, 16.0, 20.0, 24.0] * // [13.0, 17.0, 21.0, 25.0] * - * if(Matrix4.equals(a,b)) { + * if(Cesium.Matrix4.equals(a,b)) { * console.log("Both matrices are equal"); * } else { * console.log("They are not equal"); @@ -2091,7 +2091,7 @@ define([ * // [12.0, 16.0, 20.0, 24.0] * // [13.0, 17.0, 21.0, 25.0] * - * if(Matrix4.equalsEpsilon(a,b,0.1)){ + * if(Cesium.Matrix4.equalsEpsilon(a,b,0.1)){ * console.log("Difference between both the matrices is less than 0.1"); * } else { * console.log("Difference between both the matrices is not less than 0.1"); @@ -2176,8 +2176,8 @@ define([ * // [12.0, 16.0, 20.0, 24.0] * // [13.0, 17.0, 21.0, 25.0] * - * var b = new Matrix3(); - * Matrix4.getRotation(m,b); + * var b = new Cesium.Matrix3(); + * Cesium.Matrix4.getRotation(m,b); * * // b = [10.0, 14.0, 18.0] * // [11.0, 15.0, 19.0] diff --git a/Source/Core/ObjectOrientedBoundingBox.js b/Source/Core/ObjectOrientedBoundingBox.js index 454661be5b2a..021b81961209 100644 --- a/Source/Core/ObjectOrientedBoundingBox.js +++ b/Source/Core/ObjectOrientedBoundingBox.js @@ -30,11 +30,11 @@ define([ * * @example * // Create an ObjectOrientedBoundingBox using a transformation matrix, a position where the box will be translated, and a scale. - * var rotation = Matrix3.clone(Matrix3.IDENTITY); - * var translation = new Cartesian3(1,0,0); - * var scale = new Cartesian3(0,5,0); + * var rotation = Cesium.Matrix3.clone(Cesium.Matrix3.IDENTITY); + * var translation = new Cesium.Cartesian3(1,0,0); + * var scale = new Cesium.Cartesian3(0,5,0); * - * var oobb = new ObjectOrientedBoundingBox(rotation, translation, scale); + * var oobb = new Cesium.ObjectOrientedBoundingBox(rotation, translation, scale); * * @see ObjectOrientedBoundingBox.fromPoints * @see ObjectOrientedBoundingBox.fromBoundingRectangle @@ -85,7 +85,7 @@ define([ * * @example * // Compute an object oriented bounding box enclosing two points. - * var box = ObjectOrientedBoundingBox.fromPoints([new Cartesian3(2, 0, 0), new Cartesian3(-2, 0, 0)]); + * var box = Cesium.ObjectOrientedBoundingBox.fromPoints([new Cesium.Cartesian3(2, 0, 0), new Cesium.Cartesian3(-2, 0, 0)]); */ ObjectOrientedBoundingBox.fromPoints = function(positions, result) { if (!defined(result)) { @@ -184,7 +184,7 @@ define([ * * @example * // Compute an object oriented bounding box enclosing two points. - * var box = ObjectOrientedBoundingBox.fromBoundingRectangle(boundingRectangle, 0.0); + * var box = Cesium.ObjectOrientedBoundingBox.fromBoundingRectangle(boundingRectangle, 0.0); */ ObjectOrientedBoundingBox.fromBoundingRectangle = function(boundingRectangle, rotation, result) { if (!defined(boundingRectangle)) { diff --git a/Source/Core/Occluder.js b/Source/Core/Occluder.js index 08b20112f470..72313e191c79 100644 --- a/Source/Core/Occluder.js +++ b/Source/Core/Occluder.js @@ -36,9 +36,9 @@ define([ * * @example * // Construct an occluder one unit away from the origin with a radius of one. - * var cameraPosition = new Cartesian3.ZERO; - * var occluderBoundingSphere = new BoundingSphere(new Cartesian3(0, 0, -1), 1); - * var occluder = new Occluder(occluderBoundingSphere, cameraPosition); + * var cameraPosition = new Cesium.Cartesian3.ZERO; + * var occluderBoundingSphere = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -1), 1); + * var occluder = new Cesium.Occluder(occluderBoundingSphere, cameraPosition); */ var Occluder = function(occluderBoundingSphere, cameraPosition) { if (!defined(occluderBoundingSphere)) { @@ -165,10 +165,10 @@ define([ * @returns {boolean} true if the occludee is visible; otherwise false. * * @example - * var cameraPosition = new Cartesian3(0, 0, 0); - * var littleSphere = new BoundingSphere(new Cartesian3(0, 0, -1), 0.25); - * var occluder = new Occluder(littleSphere, cameraPosition); - * var point = new Cartesian3(0, 0, -3); + * var cameraPosition = new Cesium.Cartesian3(0, 0, 0); + * var littleSphere = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -1), 0.25); + * var occluder = new Cesium.Occluder(littleSphere, cameraPosition); + * var point = new Cesium.Cartesian3(0, 0, -3); * occluder.isPointVisible(point); //returns true * * @see Occluder#getVisibility @@ -199,10 +199,10 @@ define([ * @returns {boolean} true if the occludee is visible; otherwise false. * * @example - * var cameraPosition = new Cartesian3(0, 0, 0); - * var littleSphere = new BoundingSphere(new Cartesian3(0, 0, -1), 0.25); - * var occluder = new Occluder(littleSphere, cameraPosition); - * var bigSphere = new BoundingSphere(new Cartesian3(0, 0, -3), 1); + * var cameraPosition = new Cesium.Cartesian3(0, 0, 0); + * var littleSphere = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -1), 0.25); + * var occluder = new Cesium.Occluder(littleSphere, cameraPosition); + * var bigSphere = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -3), 1); * occluder.isBoundingSphereVisible(bigSphere); //returns true * * @see Occluder#getVisibility @@ -260,10 +260,10 @@ define([ * Visibility.PARTIAL if the occludee is partially visible, or * Visibility.FULL if the occludee is fully visible. * @example - * 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 = new Cartesian3(0, 0, 0); - * var occluder = new Occluder(sphere1, cameraPosition); + * var sphere1 = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -1.5), 0.5); + * var sphere2 = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -2.5), 0.5); + * var cameraPosition = new Cesium.Cartesian3(0, 0, 0); + * var occluder = new Cesium.Occluder(sphere1, cameraPosition); * occluder.getVisibility(sphere2); //returns Visibility.NONE * * @see Occluder#isVisible @@ -341,11 +341,11 @@ define([ * which is a boolean value. * * @example - * var cameraPosition = new Cartesian3(0, 0, 0); - * var occluderBoundingSphere = new BoundingSphere(new Cartesian3(0, 0, -8), 2); - * var occluder = new Occluder(occluderBoundingSphere, cameraPosition); - * var positions = [new Cartesian3(-0.25, 0, -5.3), new Cartesian3(0.25, 0, -5.3)]; - * var tileOccluderSphere = BoundingSphere.fromPoints(positions); + * var cameraPosition = new Cesium.Cartesian3(0, 0, 0); + * var occluderBoundingSphere = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -8), 2); + * var occluder = new Cesium.Occluder(occluderBoundingSphere, cameraPosition); + * var positions = [new Cesium.Cartesian3(-0.25, 0, -5.3), new Cesium.Cartesian3(0.25, 0, -5.3)]; + * var tileOccluderSphere = Cesium.BoundingSphere.fromPoints(positions); * var occludeePosition = tileOccluderSphere.center; * var occludeePt = occluder.getOccludeePoint(occluderBoundingSphere, occludeePosition, positions); * diff --git a/Source/Core/Plane.js b/Source/Core/Plane.js index d262d8bdfd3d..98a3e9632752 100644 --- a/Source/Core/Plane.js +++ b/Source/Core/Plane.js @@ -33,7 +33,7 @@ define([ * * @example * // The plane x=0 - * var plane = new Plane(Cartesian3.UNIT_X, 0.0); + * var plane = new Cesium.Plane(Cesium.Cartesian3.UNIT_X, 0.0); */ var Plane = function(normal, distance) { if (!defined(normal)) { @@ -76,9 +76,9 @@ define([ * @exception {DeveloperError} normal is required. * * @example - * var point = ellipsoid.cartographicToCartesian(Cartographic.fromDegrees(-72.0, 40.0)); + * var point = ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-72.0, 40.0)); * var normal = ellipsoid.geodeticSurfaceNormal(point); - * var tangentPlane = Plane.fromPointNormal(point, normal); + * var tangentPlane = Cesium.Plane.fromPointNormal(point, normal); */ Plane.fromPointNormal = function(point, normal, result) { if (!defined(point)) { diff --git a/Source/Core/PolygonGeometry.js b/Source/Core/PolygonGeometry.js index ae618afaf1bb..58ba2fa49e59 100644 --- a/Source/Core/PolygonGeometry.js +++ b/Source/Core/PolygonGeometry.js @@ -480,48 +480,48 @@ define([ * * @example * // 1. create a polygon from points - * var polygon = new PolygonGeometry({ + * var polygon = new Cesium.PolygonGeometry({ * polygonHierarchy : { * positions : ellipsoid.cartographicArrayToCartesianArray([ - * Cartographic.fromDegrees(-72.0, 40.0), - * Cartographic.fromDegrees(-70.0, 35.0), - * Cartographic.fromDegrees(-75.0, 30.0), - * Cartographic.fromDegrees(-70.0, 30.0), - * Cartographic.fromDegrees(-68.0, 40.0) + * Cesium.Cartographic.fromDegrees(-72.0, 40.0), + * Cesium.Cartographic.fromDegrees(-70.0, 35.0), + * Cesium.Cartographic.fromDegrees(-75.0, 30.0), + * Cesium.Cartographic.fromDegrees(-70.0, 30.0), + * Cesium.Cartographic.fromDegrees(-68.0, 40.0) * ]) * } * }); - * var geometry = PolygonGeometry.createGeometry(polygon); + * var geometry = Cesium.PolygonGeometry.createGeometry(polygon); * * // 2. create a nested polygon with holes - * var polygonWithHole = new PolygonGeometry({ + * var polygonWithHole = new Cesium.PolygonGeometry({ * polygonHierarchy : { * positions : ellipsoid.cartographicArrayToCartesianArray([ - * Cartographic.fromDegrees(-109.0, 30.0), - * Cartographic.fromDegrees(-95.0, 30.0), - * Cartographic.fromDegrees(-95.0, 40.0), - * Cartographic.fromDegrees(-109.0, 40.0) + * Cesium.Cartographic.fromDegrees(-109.0, 30.0), + * Cesium.Cartographic.fromDegrees(-95.0, 30.0), + * Cesium.Cartographic.fromDegrees(-95.0, 40.0), + * Cesium.Cartographic.fromDegrees(-109.0, 40.0) * ]), * holes : [{ * positions : ellipsoid.cartographicArrayToCartesianArray([ - * Cartographic.fromDegrees(-107.0, 31.0), - * Cartographic.fromDegrees(-107.0, 39.0), - * Cartographic.fromDegrees(-97.0, 39.0), - * Cartographic.fromDegrees(-97.0, 31.0) + * Cesium.Cartographic.fromDegrees(-107.0, 31.0), + * Cesium.Cartographic.fromDegrees(-107.0, 39.0), + * Cesium.Cartographic.fromDegrees(-97.0, 39.0), + * Cesium.Cartographic.fromDegrees(-97.0, 31.0) * ]), * holes : [{ * positions : ellipsoid.cartographicArrayToCartesianArray([ - * Cartographic.fromDegrees(-105.0, 33.0), - * Cartographic.fromDegrees(-99.0, 33.0), - * Cartographic.fromDegrees(-99.0, 37.0), - * Cartographic.fromDegrees(-105.0, 37.0) + * Cesium.Cartographic.fromDegrees(-105.0, 33.0), + * Cesium.Cartographic.fromDegrees(-99.0, 33.0), + * Cesium.Cartographic.fromDegrees(-99.0, 37.0), + * Cesium.Cartographic.fromDegrees(-105.0, 37.0) * ]), * holes : [{ * positions : ellipsoid.cartographicArrayToCartesianArray([ - * Cartographic.fromDegrees(-103.0, 34.0), - * Cartographic.fromDegrees(-101.0, 34.0), - * Cartographic.fromDegrees(-101.0, 36.0), - * Cartographic.fromDegrees(-103.0, 36.0) + * Cesium.Cartographic.fromDegrees(-103.0, 34.0), + * Cesium.Cartographic.fromDegrees(-101.0, 34.0), + * Cesium.Cartographic.fromDegrees(-101.0, 36.0), + * Cesium.Cartographic.fromDegrees(-103.0, 36.0) * ]) * }] * }] @@ -598,16 +598,16 @@ define([ * * @example * // create a polygon from points - * var polygon = PolygonGeometry.fromPositions({ + * var polygon = Cesium.PolygonGeometry.fromPositions({ * positions : ellipsoid.cartographicArrayToCartesianArray([ - * Cartographic.fromDegrees(-72.0, 40.0), - * Cartographic.fromDegrees(-70.0, 35.0), - * Cartographic.fromDegrees(-75.0, 30.0), - * Cartographic.fromDegrees(-70.0, 30.0), - * Cartographic.fromDegrees(-68.0, 40.0) + * Cesium.Cartographic.fromDegrees(-72.0, 40.0), + * Cesium.Cartographic.fromDegrees(-70.0, 35.0), + * Cesium.Cartographic.fromDegrees(-75.0, 30.0), + * Cesium.Cartographic.fromDegrees(-70.0, 30.0), + * Cesium.Cartographic.fromDegrees(-68.0, 40.0) * ]) * }); - * var geometry = PolygonGeometry.createGeometry(polygon); + * var geometry = Cesium.PolygonGeometry.createGeometry(polygon); */ PolygonGeometry.fromPositions = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/Core/PolygonOutlineGeometry.js b/Source/Core/PolygonOutlineGeometry.js index 165a0c01f75a..1eae7d3ed5ba 100644 --- a/Source/Core/PolygonOutlineGeometry.js +++ b/Source/Core/PolygonOutlineGeometry.js @@ -202,48 +202,48 @@ define([ * * @example * // 1. create a polygon outline from points - * var polygon = new PolygonOutlineGeometry({ + * var polygon = new Cesium.PolygonOutlineGeometry({ * polygonHierarchy : { * positions : ellipsoid.cartographicArrayToCartesianArray([ - * Cartographic.fromDegrees(-72.0, 40.0), - * Cartographic.fromDegrees(-70.0, 35.0), - * Cartographic.fromDegrees(-75.0, 30.0), - * Cartographic.fromDegrees(-70.0, 30.0), - * Cartographic.fromDegrees(-68.0, 40.0) + * Cesium.Cartographic.fromDegrees(-72.0, 40.0), + * Cesium.Cartographic.fromDegrees(-70.0, 35.0), + * Cesium.Cartographic.fromDegrees(-75.0, 30.0), + * Cesium.Cartographic.fromDegrees(-70.0, 30.0), + * Cesium.Cartographic.fromDegrees(-68.0, 40.0) * ]) * } * }); - * var geometry = PolygonOutlineGeometry.createGeometry(polygon); + * var geometry = Cesium.PolygonOutlineGeometry.createGeometry(polygon); * * // 2. create a nested polygon with holes outline - * var polygonWithHole = new PolygonOutlineGeometry({ + * var polygonWithHole = new Cesium.PolygonOutlineGeometry({ * polygonHierarchy : { * positions : ellipsoid.cartographicArrayToCartesianArray([ - * Cartographic.fromDegrees(-109.0, 30.0), - * Cartographic.fromDegrees(-95.0, 30.0), - * Cartographic.fromDegrees(-95.0, 40.0), - * Cartographic.fromDegrees(-109.0, 40.0) + * Cesium.Cartographic.fromDegrees(-109.0, 30.0), + * Cesium.Cartographic.fromDegrees(-95.0, 30.0), + * Cesium.Cartographic.fromDegrees(-95.0, 40.0), + * Cesium.Cartographic.fromDegrees(-109.0, 40.0) * ]), * holes : [{ * positions : ellipsoid.cartographicArrayToCartesianArray([ - * Cartographic.fromDegrees(-107.0, 31.0), - * Cartographic.fromDegrees(-107.0, 39.0), - * Cartographic.fromDegrees(-97.0, 39.0), - * Cartographic.fromDegrees(-97.0, 31.0) + * Cesium.Cartographic.fromDegrees(-107.0, 31.0), + * Cesium.Cartographic.fromDegrees(-107.0, 39.0), + * Cesium.Cartographic.fromDegrees(-97.0, 39.0), + * Cesium.Cartographic.fromDegrees(-97.0, 31.0) * ]), * holes : [{ * positions : ellipsoid.cartographicArrayToCartesianArray([ - * Cartographic.fromDegrees(-105.0, 33.0), - * Cartographic.fromDegrees(-99.0, 33.0), - * Cartographic.fromDegrees(-99.0, 37.0), - * Cartographic.fromDegrees(-105.0, 37.0) + * Cesium.Cartographic.fromDegrees(-105.0, 33.0), + * Cesium.Cartographic.fromDegrees(-99.0, 33.0), + * Cesium.Cartographic.fromDegrees(-99.0, 37.0), + * Cesium.Cartographic.fromDegrees(-105.0, 37.0) * ]), * holes : [{ * positions : ellipsoid.cartographicArrayToCartesianArray([ - * Cartographic.fromDegrees(-103.0, 34.0), - * Cartographic.fromDegrees(-101.0, 34.0), - * Cartographic.fromDegrees(-101.0, 36.0), - * Cartographic.fromDegrees(-103.0, 36.0) + * Cesium.Cartographic.fromDegrees(-103.0, 34.0), + * Cesium.Cartographic.fromDegrees(-101.0, 34.0), + * Cesium.Cartographic.fromDegrees(-101.0, 36.0), + * Cesium.Cartographic.fromDegrees(-103.0, 36.0) * ]) * }] * }] @@ -315,16 +315,16 @@ define([ * * @example * // create a polygon from points - * var polygon = PolygonOutlineGeometry.fromPositions({ + * var polygon = Cesium.PolygonOutlineGeometry.fromPositions({ * positions : ellipsoid.cartographicArrayToCartesianArray([ - * Cartographic.fromDegrees(-72.0, 40.0), - * Cartographic.fromDegrees(-70.0, 35.0), - * Cartographic.fromDegrees(-75.0, 30.0), - * Cartographic.fromDegrees(-70.0, 30.0), - * Cartographic.fromDegrees(-68.0, 40.0) + * Cesium.Cartographic.fromDegrees(-72.0, 40.0), + * Cesium.Cartographic.fromDegrees(-70.0, 35.0), + * Cesium.Cartographic.fromDegrees(-75.0, 30.0), + * Cesium.Cartographic.fromDegrees(-70.0, 30.0), + * Cesium.Cartographic.fromDegrees(-68.0, 40.0) * ]) * }); - * var geometry = PolygonOutlineGeometry.createGeometry(polygon); + * var geometry = Cesium.PolygonOutlineGeometry.createGeometry(polygon); */ PolygonOutlineGeometry.fromPositions = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/Core/PolygonPipeline.js b/Source/Core/PolygonPipeline.js index f82f4d7c19d6..982ae113173b 100644 --- a/Source/Core/PolygonPipeline.js +++ b/Source/Core/PolygonPipeline.js @@ -1127,7 +1127,7 @@ define([ * * @example * // Simplifying a polygon with multiple holes. - * outerRing = PolygonPipeline.eliminateHoles(outerRing, innerRings); + * outerRing = Cesium.PolygonPipeline.eliminateHoles(outerRing, innerRings); * polygon.setPositions(outerRing); */ eliminateHoles : function(outerRing, innerRings, ellipsoid) { diff --git a/Source/Core/PolylineGeometry.js b/Source/Core/PolylineGeometry.js index 82a392580840..02ad8ee398c3 100644 --- a/Source/Core/PolylineGeometry.js +++ b/Source/Core/PolylineGeometry.js @@ -52,15 +52,15 @@ define([ * * @example * // A polyline with two connected line segments - * var polyline = new PolylineGeometry({ + * var polyline = new Cesium.PolylineGeometry({ * positions : ellipsoid.cartographicArrayToCartesianArray([ - * Cartographic.fromDegrees(0.0, 0.0), - * Cartographic.fromDegrees(5.0, 0.0), - * Cartographic.fromDegrees(5.0, 5.0) + * Cesium.Cartographic.fromDegrees(0.0, 0.0), + * Cesium.Cartographic.fromDegrees(5.0, 0.0), + * Cesium.Cartographic.fromDegrees(5.0, 5.0) * ]), * width : 10.0 * }); - * var geometry = PolylineGeometry.createGeometry(polyline); + * var geometry = Cesium.PolylineGeometry.createGeometry(polyline); */ var PolylineGeometry = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/Core/PolylinePipeline.js b/Source/Core/PolylinePipeline.js index 8f6f6324f961..a3f356eaf658 100644 --- a/Source/Core/PolylinePipeline.js +++ b/Source/Core/PolylinePipeline.js @@ -112,11 +112,11 @@ define([ * @see PolylineCollection * * @example - * var polylines = new PolylineCollection(); + * var polylines = new Cesium.PolylineCollection(); * var polyline = polylines.add(...); * var positions = polyline.getPositions(); * var modelMatrix = polylines.modelMatrix; - * var segments = PolylinePipeline.wrapLongitude(positions, modelMatrix); + * var segments = Cesium.PolylinePipeline.wrapLongitude(positions, modelMatrix); */ PolylinePipeline.wrapLongitude = function(positions, modelMatrix) { var cartesians = []; @@ -189,10 +189,10 @@ define([ * @example * // Returns [(1.0, 1.0, 1.0), (2.0, 2.0, 2.0)] * var positions = [ - * new Cartesian3(1.0, 1.0, 1.0), - * new Cartesian3(1.0, 1.0, 1.0), - * new Cartesian3(2.0, 2.0, 2.0)]; - * var nonDuplicatePositions = PolylinePipeline.removeDuplicates(positions); + * new Cesium.Cartesian3(1.0, 1.0, 1.0), + * new Cesium.Cartesian3(1.0, 1.0, 1.0), + * new Cesium.Cartesian3(2.0, 2.0, 2.0)]; + * var nonDuplicatePositions = Cesium.PolylinePipeline.removeDuplicates(positions); */ PolylinePipeline.removeDuplicates = function(positions) { if (!defined(positions )) { @@ -234,12 +234,12 @@ define([ * * @example * var positions = ellipsoid.cartographicArrayToCartesianArray([ - * Cartographic.fromDegrees(-105.0, 40.0), - * Cartographic.fromDegrees(-100.0, 38.0), - * Cartographic.fromDegrees(-105.0, 35.0), - * Cartographic.fromDegrees(-100.0, 32.0) + * Cesium.Cartographic.fromDegrees(-105.0, 40.0), + * Cesium.Cartographic.fromDegrees(-100.0, 38.0), + * Cesium.Cartographic.fromDegrees(-105.0, 35.0), + * Cesium.Cartographic.fromDegrees(-100.0, 32.0) * ])); - * var surfacePositions = PolylinePipeline.scaleToSurface(positions); + * var surfacePositions = Cesium.PolylinePipeline.scaleToSurface(positions); */ PolylinePipeline.scaleToSurface = function(positions, granularity, ellipsoid) { if (!defined(positions)) { @@ -288,7 +288,7 @@ define([ * var positions = [p1.x, p1.y, p1.z, p2.x, p2.y, p2.z]; * var heights = [1000, 1000, 2000, 2000]; * - * var raisedPositions = PolylinePipeline.scaleToGeodeticHeight(positions, heights); + * var raisedPositions = Cesium.PolylinePipeline.scaleToGeodeticHeight(positions, heights); */ PolylinePipeline.scaleToGeodeticHeight = function(positions, height, ellipsoid, result) { if (!defined(positions)) { diff --git a/Source/Core/PolylineVolumeGeometry.js b/Source/Core/PolylineVolumeGeometry.js index 70d315be8055..9bb79ca06927 100644 --- a/Source/Core/PolylineVolumeGeometry.js +++ b/Source/Core/PolylineVolumeGeometry.js @@ -194,13 +194,13 @@ define([ * @see PolylineVolumeGeometry#createGeometry * * @example - * var volume = new PolylineVolumeGeometry({ - * vertexFormat : VertexFormat.POSITION_ONLY, + * var volume = new Cesium.PolylineVolumeGeometry({ + * vertexFormat : Cesium.VertexFormat.POSITION_ONLY, * polylinePositions : ellipsoid.cartographicArrayToCartesianArray([ - * Cartographic.fromDegrees(-72.0, 40.0), - * Cartographic.fromDegrees(-70.0, 35.0) + * Cesium.Cartographic.fromDegrees(-72.0, 40.0), + * Cesium.Cartographic.fromDegrees(-70.0, 35.0) * ]), - * shapePositions : Shapes.compute2DCircle(100000.0) + * shapePositions : Cesium.Shapes.compute2DCircle(100000.0) * }); */ var PolylineVolumeGeometry = function(options) { diff --git a/Source/Core/PolylineVolumeOutlineGeometry.js b/Source/Core/PolylineVolumeOutlineGeometry.js index 28fd389e53d8..c07b03b55e47 100644 --- a/Source/Core/PolylineVolumeOutlineGeometry.js +++ b/Source/Core/PolylineVolumeOutlineGeometry.js @@ -111,12 +111,12 @@ define([ * @see PolylineVolumeOutlineGeometry#createGeometry * * @example - * var volumeOutline = new PolylineVolumeOutlineGeometry({ + * var volumeOutline = new Cesium.PolylineVolumeOutlineGeometry({ * polylinePositions : ellipsoid.cartographicArrayToCartesianArray([ - * Cartographic.fromDegrees(-72.0, 40.0), - * Cartographic.fromDegrees(-70.0, 35.0) + * Cesium.Cartographic.fromDegrees(-72.0, 40.0), + * Cesium.Cartographic.fromDegrees(-70.0, 35.0) * ]), - * shapePositions : Shapes.compute2DCircle(100000.0) + * shapePositions : Cesium.Shapes.compute2DCircle(100000.0) * }); */ var PolylineVolumeOutlineGeometry = function(options) { diff --git a/Source/Core/Quaternion.js b/Source/Core/Quaternion.js index 8a0b05cb33ff..89da257651df 100644 --- a/Source/Core/Quaternion.js +++ b/Source/Core/Quaternion.js @@ -950,13 +950,13 @@ define([ * * @example * // 1. compute the squad interpolation between two quaternions on a curve - * var s0 = Quaternion.innerQuadrangle(quaternions[i - 1], quaternions[i], quaternions[i + 1]); - * var s1 = Quaternion.innerQuadrangle(quaternions[i], quaternions[i + 1], quaternions[i + 2]); - * var q = Quaternion.squad(quaternions[i], quaternions[i + 1], s0, s1, t); + * var s0 = Cesium.Quaternion.innerQuadrangle(quaternions[i - 1], quaternions[i], quaternions[i + 1]); + * var s1 = Cesium.Quaternion.innerQuadrangle(quaternions[i], quaternions[i + 1], quaternions[i + 2]); + * var q = Cesium.Quaternion.squad(quaternions[i], quaternions[i + 1], s0, s1, t); * * // 2. compute the squad interpolation as above but where the first quaternion is a end point. - * var s1 = Quaternion.innerQuadrangle(quaternions[0], quaternions[1], quaternions[2]); - * var q = Quaternion.squad(quaternions[0], quaternions[1], quaternions[0], s1, t); + * var s1 = Cesium.Quaternion.innerQuadrangle(quaternions[0], quaternions[1], quaternions[2]); + * var q = Cesium.Quaternion.squad(quaternions[0], quaternions[1], quaternions[0], s1, t); */ Quaternion.squad = function(q0, q1, s0, s1, t, result) { //>>includeStart('debug', pragmas.debug); diff --git a/Source/Core/Ray.js b/Source/Core/Ray.js index 714ebba1d565..f7ee0c17d143 100644 --- a/Source/Core/Ray.js +++ b/Source/Core/Ray.js @@ -50,7 +50,7 @@ define([ * * @example * //Get the first intersection point of a ray and an ellipsoid. - * var intersection = IntersectionTests.rayEllipsoid(ray, ellipsoid); + * var intersection = Cesium.IntersectionTests.rayEllipsoid(ray, ellipsoid); * var point = ray.getPoint(intersection.start); */ Ray.prototype.getPoint = function(t, result) { diff --git a/Source/Core/Shapes.js b/Source/Core/Shapes.js index e07be4fce26d..ffbd17ae944d 100644 --- a/Source/Core/Shapes.js +++ b/Source/Core/Shapes.js @@ -100,10 +100,10 @@ define([ * * @example * // Create a polyline of a circle - * var polyline = new Polyline(); - * polyline.setPositions(Shapes.computeCircleBoundary( + * var polyline = new Cesium.Polyline(); + * polyline.setPositions(Cesium.Shapes.computeCircleBoundary( * ellipsoid, ellipsoid.cartographicToCartesian( - * Cartographic.fromDegrees(-75.59777, 40.03883, 0.0)), 100000.0)); + * Cesium.Cartographic.fromDegrees(-75.59777, 40.03883, 0.0)), 100000.0)); */ computeCircleBoundary : function(ellipsoid, center, radius, granularity) { if (!defined(ellipsoid) || !defined(center) || !defined(radius)) { @@ -151,10 +151,10 @@ define([ * * @example * // Create a filled ellipse. - * var polygon = new Polygon(); - * polygon.setPositions(Shapes.computeEllipseBoundary( + * var polygon = new Cesium.Polygon(); + * polygon.setPositions(Cesium.Shapes.computeEllipseBoundary( * ellipsoid, ellipsoid.cartographicToCartesian( - * Cartographic.fromDegrees(-75.59777, 40.03883)), 500000.0, 300000.0, Math.toRadians(60))); + * Cesium.Cartographic.fromDegrees(-75.59777, 40.03883)), 500000.0, 300000.0, Cesium.Math.toRadians(60))); */ computeEllipseBoundary : function(ellipsoid, center, semiMajorAxis, semiMinorAxis, rotation, granularity) { if (!defined(ellipsoid) || !defined(center) || !defined(semiMajorAxis) || !defined(semiMinorAxis)) { @@ -240,7 +240,7 @@ define([ * @returns The set of points that form the ellipse's boundary. * * @example - * var circle = Shapes.compute2DCircle(100000.0); + * var circle = Cesium.Shapes.compute2DCircle(100000.0); */ compute2DCircle : function(radius, granularity) { radius = defaultValue(radius, 1.0); diff --git a/Source/Core/ShowGeometryInstanceAttribute.js b/Source/Core/ShowGeometryInstanceAttribute.js index a51ee9b549ef..56900c718d8c 100644 --- a/Source/Core/ShowGeometryInstanceAttribute.js +++ b/Source/Core/ShowGeometryInstanceAttribute.js @@ -20,16 +20,16 @@ define([ * @param {Boolean} [show=true] Determines if the geometry instance will be shown. * * @example - * var instance = new GeometryInstance({ - * geometry : new BoxGeometry({ - * vertexFormat : VertexFormat.POSITION_AND_NORMAL, - * dimensions : new Cartesian3(1000000.0, 1000000.0, 500000.0) + * var instance = new Cesium.GeometryInstance({ + * geometry : new Cesium.BoxGeometry({ + * vertexFormat : Cesium.VertexFormat.POSITION_AND_NORMAL, + * dimensions : new Cesium.Cartesian3(1000000.0, 1000000.0, 500000.0) * }), - * modelMatrix : Matrix4.multiplyByTranslation(Transforms.eastNorthUpToFixedFrame( - * ellipsoid.cartographicToCartesian(Cartographic.fromDegrees(-75.59777, 40.03883))), new Cartesian3(0.0, 0.0, 1000000.0)), + * modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame( + * ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-75.59777, 40.03883))), new Cesium.Cartesian3(0.0, 0.0, 1000000.0)), * id : 'box', * attributes : { - * show : new ShowGeometryInstanceAttribute(false) + * show : new Cesium.ShowGeometryInstanceAttribute(false) * } * }); * @@ -97,7 +97,7 @@ define([ * * @example * var attributes = primitive.getGeometryInstanceAttributes('an id'); - * attributes.show = ShowGeometryInstanceAttribute.toValue(true, attributes.show); + * attributes.show = Cesium.ShowGeometryInstanceAttribute.toValue(true, attributes.show); */ ShowGeometryInstanceAttribute.toValue = function(show, result) { if (!defined(show)) { diff --git a/Source/Core/SimplePolylineGeometry.js b/Source/Core/SimplePolylineGeometry.js index 1975e2bb8845..c81b25b5982b 100644 --- a/Source/Core/SimplePolylineGeometry.js +++ b/Source/Core/SimplePolylineGeometry.js @@ -45,14 +45,14 @@ define([ * * @example * // A polyline with two connected line segments - * var polyline = new SimplePolylineGeometry({ + * var polyline = new Cesium.SimplePolylineGeometry({ * positions : ellipsoid.cartographicArrayToCartesianArray([ - * Cartographic.fromDegrees(0.0, 0.0), - * Cartographic.fromDegrees(5.0, 0.0), - * Cartographic.fromDegrees(5.0, 5.0) + * Cesium.Cartographic.fromDegrees(0.0, 0.0), + * Cesium.Cartographic.fromDegrees(5.0, 0.0), + * Cesium.Cartographic.fromDegrees(5.0, 5.0) * ]) * }); - * var geometry = SimplePolylineGeometry.createGeometry(polyline); + * var geometry = Cesium.SimplePolylineGeometry.createGeometry(polyline); */ var SimplePolylineGeometry = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/Core/SphereGeometry.js b/Source/Core/SphereGeometry.js index 26cca938bd78..0d06f18fdf6c 100644 --- a/Source/Core/SphereGeometry.js +++ b/Source/Core/SphereGeometry.js @@ -26,11 +26,11 @@ define([ * @see SphereGeometry#createGeometry * * @example - * var sphere = new SphereGeometry({ + * var sphere = new Cesium.SphereGeometry({ * radius : 100.0, - * vertexFormat : VertexFormat.POSITION_ONLY + * vertexFormat : Cesium.VertexFormat.POSITION_ONLY * }); - * var geometry = SphereGeometry.createGeometry(sphere); + * var geometry = Cesium.SphereGeometry.createGeometry(sphere); */ var SphereGeometry = function(options) { var radius = defaultValue(options.radius, 1.0); diff --git a/Source/Core/SphereOutlineGeometry.js b/Source/Core/SphereOutlineGeometry.js index f44ff894297e..f21c4463538f 100644 --- a/Source/Core/SphereOutlineGeometry.js +++ b/Source/Core/SphereOutlineGeometry.js @@ -25,12 +25,12 @@ define([ * @exception {DeveloperError} options.subdivisions must be greater than or equal to zero. * * @example - * var sphere = new SphereOutlineGeometry({ + * var sphere = new Cesium.SphereOutlineGeometry({ * radius : 100.0, * stackPartitions : 6, * slicePartitions: 5 * }); - * var geometry = SphereOutlineGeometry.createGeometry(sphere); + * var geometry = Cesium.SphereOutlineGeometry.createGeometry(sphere); */ var SphereOutlineGeometry = function(options) { var radius = defaultValue(options.radius, 1.0); diff --git a/Source/Core/TaskProcessor.js b/Source/Core/TaskProcessor.js index 99b0f50008e0..d69ec72574d0 100644 --- a/Source/Core/TaskProcessor.js +++ b/Source/Core/TaskProcessor.js @@ -135,15 +135,15 @@ define([ * if there are too many active tasks, * * @example - * var taskProcessor = new TaskProcessor('myWorkerName'); + * var taskProcessor = new Cesium.TaskProcessor('myWorkerName'); * var promise = taskProcessor.scheduleTask({ * someParameter : true, * another : 'hello' * }); - * if (!defined(promise)) { + * if (!Cesium.defined(promise)) { * // too many active tasks - try again later * } else { - * when(promise, function(result) { + * Cesium.when(promise, function(result) { * // use the result of the task * }); * } diff --git a/Source/Core/TimeInterval.js b/Source/Core/TimeInterval.js index 941499517895..30358b7c91ef 100644 --- a/Source/Core/TimeInterval.js +++ b/Source/Core/TimeInterval.js @@ -35,7 +35,7 @@ define([ * * @example * // Construct an Timeinterval closed on one end with a Color payload. - * var interval = new TimeInterval(JulianDate.fromTotalDays(1000), JulianDate.fromTotalDays(1001), true, false, Color.WHITE); + * var interval = new Cesium.TimeInterval(Cesium.JulianDate.fromTotalDays(1000), Cesium.JulianDate.fromTotalDays(1001), true, false, Cesium.Color.WHITE); */ var TimeInterval = function(start, stop, isStartIncluded, isStopIncluded, data) { if (!defined(start)) { @@ -101,7 +101,7 @@ define([ * * @example * // Construct an open Timeinterval with a Cartesian data payload. - * var interval = TimeInterval.fromIso8601('2012-03-15T11:02:24.55Z/2012-03-15T12:28:24.03Z', false, false, new Cartesian3(1,2,3)); + * var interval = Cesium.TimeInterval.fromIso8601('2012-03-15T11:02:24.55Z/2012-03-15T12:28:24.03Z', false, false, new Cesium.Cartesian3(1,2,3)); */ TimeInterval.fromIso8601 = function(iso8601String, isStartIncluded, isStopIncluded, data) { var iso8601Interval = iso8601String.split('/'); diff --git a/Source/Core/Tipsify.js b/Source/Core/Tipsify.js index 3c2d7df032b1..1c56914eb487 100644 --- a/Source/Core/Tipsify.js +++ b/Source/Core/Tipsify.js @@ -42,7 +42,7 @@ define([ * var indices = [0, 1, 2, 3, 4, 5]; * var maxIndex = 5; * var cacheSize = 3; - * var acmr = Tipsify.calculateACMR({indices : indices, maxIndex : maxIndex, cacheSize : cacheSize}); + * var acmr = Cesium.Tipsify.calculateACMR({indices : indices, maxIndex : maxIndex, cacheSize : cacheSize}); */ Tipsify.calculateACMR = function(description) { description = defaultValue(description, defaultValue.EMPTY_OBJECT); @@ -117,7 +117,7 @@ define([ * var indices = [0, 1, 2, 3, 4, 5]; * var maxIndex = 5; * var cacheSize = 3; - * var reorderedIndices = Tipsify.tipsify({indices : indices, maxIndex : maxIndex, cacheSize : cacheSize}); + * var reorderedIndices = Cesium.Tipsify.tipsify({indices : indices, maxIndex : maxIndex, cacheSize : cacheSize}); */ Tipsify.tipsify = function(description) { description = defaultValue(description, defaultValue.EMPTY_OBJECT); diff --git a/Source/Core/Transforms.js b/Source/Core/Transforms.js index 589eaef8a9fe..63248514b380 100644 --- a/Source/Core/Transforms.js +++ b/Source/Core/Transforms.js @@ -67,9 +67,9 @@ define([ * * @example * // Get the transform from local east-north-up at cartographic (0.0, 0.0) to Earth's fixed frame. - * var ellipsoid = Ellipsoid.WGS84; - * var center = ellipsoid.cartographicToCartesian(Cartographic.ZERO); - * var transform = Transforms.eastNorthUpToFixedFrame(center); + * var ellipsoid = Cesium.Ellipsoid.WGS84; + * var center = ellipsoid.cartographicToCartesian(Cesium.Cartographic.ZERO); + * var transform = Cesium.Transforms.eastNorthUpToFixedFrame(center); */ Transforms.eastNorthUpToFixedFrame = function(origin, ellipsoid, result) { //>>includeStart('debug', pragmas.debug); @@ -173,9 +173,9 @@ define([ * * @example * // Get the transform from local north-east-down at cartographic (0.0, 0.0) to Earth's fixed frame. - * var ellipsoid = Ellipsoid.WGS84; - * var center = ellipsoid.cartographicToCartesian(Cartographic.ZERO); - * var transform = Transforms.northEastDownToFixedFrame(center); + * var ellipsoid = Cesium.Ellipsoid.WGS84; + * var center = ellipsoid.cartographicToCartesian(Cesium.Cartographic.ZERO); + * var transform = Cesium.Transforms.northEastDownToFixedFrame(center); */ Transforms.northEastDownToFixedFrame = function(origin, ellipsoid, result) { //>>includeStart('debug', pragmas.debug); @@ -277,11 +277,11 @@ define([ * @example * //Set the view to in the inertial frame. * function updateAndRender() { - * var now = new JulianDate(); + * var now = new Cesium.JulianDate(); * scene.initializeFrame(); - * scene.getCamera().transform = Matrix4.fromRotationTranslation(Transforms.computeTemeToPseudoFixedMatrix(now), Cartesian3.ZERO); + * scene.getCamera().transform = Cesium.Matrix4.fromRotationTranslation(Cesium.Transforms.computeTemeToPseudoFixedMatrix(now), Cesium.Cartesian3.ZERO); * scene.render(); - * requestAnimationFrame(updateAndRender); + * Cesium.requestAnimationFrame(updateAndRender); * } * updateAndRender(); */ @@ -378,7 +378,7 @@ define([ * @see when * * @example - * var interval = new TimeInterval(...); + * var interval = new Cesium.TimeInterval(...); * when(preloadIcrfFixed(interval), function() { * // the data is now loaded * }); @@ -416,14 +416,14 @@ define([ * @example * //Set the view to the inertial frame. * function updateAndRender() { - * var now = new JulianDate(); + * var now = new Cesium.JulianDate(); * scene.initializeFrame(); - * var icrfToFixed = Transforms.computeIcrfToFixedMatrix(now); - * if (defined(icrfToFixed)) { - * scene.getCamera().transform = Matrix4.fromRotationTranslation(icrfToFixed, Cartesian3.ZERO); + * var icrfToFixed = Cesium.Transforms.computeIcrfToFixedMatrix(now); + * if (Cesium.defined(icrfToFixed)) { + * scene.getCamera().transform = Cesium.Matrix4.fromRotationTranslation(icrfToFixed, Cesium.Cartesian3.ZERO); * } * scene.render(); - * requestAnimationFrame(updateAndRender); + * Cesium.requestAnimationFrame(updateAndRender); * } * updateAndRender(); */ @@ -467,12 +467,12 @@ define([ * * @example * // Transform a point from the ICRF axes to the Fixed axes. - * var now = new JulianDate(); - * var pointInFixed = new Cartesian3(...); - * var fixedToIcrf = Transforms.computeIcrfToFixedMatrix(now); + * var now = new Cesium.JulianDate(); + * var pointInFixed = new Cesium.Cartesian3(...); + * var fixedToIcrf = Cesium.Transforms.computeIcrfToFixedMatrix(now); * var pointInInertial; - * if (defined(fixedToIcrf)) { - * pointInInertial = Matrix3.multiplyByVector(fixedToIcrf, pointInFixed); + * if (Cesium.defined(fixedToIcrf)) { + * pointInInertial = Cesium.Matrix3.multiplyByVector(fixedToIcrf, pointInFixed); * } */ Transforms.computeFixedToIcrfMatrix = function(date, result) { diff --git a/Source/Core/TridiagonalSystemSolver.js b/Source/Core/TridiagonalSystemSolver.js index e26bb83cdaec..f41838bb4ec1 100644 --- a/Source/Core/TridiagonalSystemSolver.js +++ b/Source/Core/TridiagonalSystemSolver.js @@ -42,14 +42,14 @@ define([ * var diagonal = [2.0, 4.0, 4.0, 4.0, 2.0]; * var upperDiagonal = [1.0, 1.0, 1.0, 1.0]; * var rightHandSide = [ - * new Cartesian3(410757.0, -1595711.0, 1375302.0), - * new Cartesian3(-5986705.0, -2190640.0, 1099600.0), - * new Cartesian3(-12593180.0, 288588.0, -1755549.0), - * new Cartesian3(-5349898.0, 2457005.0, -2685438.0), - * new Cartesian3(845820.0, 1573488.0, -1205591.0) + * new Cesium.Cartesian3(410757.0, -1595711.0, 1375302.0), + * new Cesium.Cartesian3(-5986705.0, -2190640.0, 1099600.0), + * new Cesium.Cartesian3(-12593180.0, 288588.0, -1755549.0), + * new Cesium.Cartesian3(-5349898.0, 2457005.0, -2685438.0), + * new Cesium.Cartesian3(845820.0, 1573488.0, -1205591.0) * ]; * - * var solution = TridiagonalSystemSolver.solve(lowerDiagonal, diagonal, upperDiagonal, rightHandSide); + * var solution = Cesium.TridiagonalSystemSolver.solve(lowerDiagonal, diagonal, upperDiagonal, rightHandSide); */ TridiagonalSystemSolver.solve = function(lower, diagonal, upper, right) { if (!defined(lower) || !(lower instanceof Array)) { diff --git a/Source/Core/VertexFormat.js b/Source/Core/VertexFormat.js index 6cf0197673ac..0e9e2b8d6903 100644 --- a/Source/Core/VertexFormat.js +++ b/Source/Core/VertexFormat.js @@ -19,7 +19,7 @@ define([ * * @example * // Create a vertex format with position and 2D texture coordinate attributes. - * var format = new VertexFormat({ + * var format = new Cesium.VertexFormat({ * position : true, * st : true * }); diff --git a/Source/Core/WallGeometry.js b/Source/Core/WallGeometry.js index 872311e1fbab..9d6727ef0670 100644 --- a/Source/Core/WallGeometry.js +++ b/Source/Core/WallGeometry.js @@ -67,18 +67,18 @@ define([ * * @example * var positions = [ - * Cartographic.fromDegrees(19.0, 47.0, 10000.0), - * Cartographic.fromDegrees(19.0, 48.0, 10000.0), - * Cartographic.fromDegrees(20.0, 48.0, 10000.0), - * Cartographic.fromDegrees(20.0, 47.0, 10000.0), - * Cartographic.fromDegrees(19.0, 47.0, 10000.0) + * Cesium.Cartographic.fromDegrees(19.0, 47.0, 10000.0), + * Cesium.Cartographic.fromDegrees(19.0, 48.0, 10000.0), + * Cesium.Cartographic.fromDegrees(20.0, 48.0, 10000.0), + * Cesium.Cartographic.fromDegrees(20.0, 47.0, 10000.0), + * Cesium.Cartographic.fromDegrees(19.0, 47.0, 10000.0) * ]; * * // create a wall that spans from ground level to 10000 meters - * var wall = new WallGeometry({ + * var wall = new Cesium.WallGeometry({ * positions : ellipsoid.cartographicArrayToCartesianArray(positions) * }); - * var geometry = WallGeometry.createGeometry(wall); + * var geometry = Cesium.WallGeometry.createGeometry(wall); */ var WallGeometry = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); @@ -132,20 +132,20 @@ define([ * * @example * var positions = [ - * Cartographic.fromDegrees(19.0, 47.0, 10000.0), - * Cartographic.fromDegrees(19.0, 48.0, 10000.0), - * Cartographic.fromDegrees(20.0, 48.0, 10000.0), - * Cartographic.fromDegrees(20.0, 47.0, 10000.0), - * Cartographic.fromDegrees(19.0, 47.0, 10000.0) + * Cesium.Cartographic.fromDegrees(19.0, 47.0, 10000.0), + * Cesium.Cartographic.fromDegrees(19.0, 48.0, 10000.0), + * Cesium.Cartographic.fromDegrees(20.0, 48.0, 10000.0), + * Cesium.Cartographic.fromDegrees(20.0, 47.0, 10000.0), + * Cesium.Cartographic.fromDegrees(19.0, 47.0, 10000.0) * ]; * * // create a wall that spans from 10000 meters to 20000 meters - * var wall = WallGeometry.fromConstantHeights({ + * var wall = Cesium.WallGeometry.fromConstantHeights({ * positions : ellipsoid.cartographicArrayToCartesianArray(positions), * minimumHeight : 20000.0, * maximumHeight : 10000.0 * }); - * var geometry = WallGeometry.createGeometry(wall); + * var geometry = Cesium.WallGeometry.createGeometry(wall); */ WallGeometry.fromConstantHeights = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/Core/WallOutlineGeometry.js b/Source/Core/WallOutlineGeometry.js index a95a70b82904..8bbec74ded3e 100644 --- a/Source/Core/WallOutlineGeometry.js +++ b/Source/Core/WallOutlineGeometry.js @@ -60,18 +60,18 @@ define([ * * @example * var positions = [ - * Cartographic.fromDegrees(19.0, 47.0, 10000.0), - * Cartographic.fromDegrees(19.0, 48.0, 10000.0), - * Cartographic.fromDegrees(20.0, 48.0, 10000.0), - * Cartographic.fromDegrees(20.0, 47.0, 10000.0), - * Cartographic.fromDegrees(19.0, 47.0, 10000.0) + * Cesium.Cartographic.fromDegrees(19.0, 47.0, 10000.0), + * Cesium.Cartographic.fromDegrees(19.0, 48.0, 10000.0), + * Cesium.Cartographic.fromDegrees(20.0, 48.0, 10000.0), + * Cesium.Cartographic.fromDegrees(20.0, 47.0, 10000.0), + * Cesium.Cartographic.fromDegrees(19.0, 47.0, 10000.0) * ]; * * // create a wall outline that spans from ground level to 10000 meters - * var wall = new WallOutlineGeometry({ + * var wall = new Cesium.WallOutlineGeometry({ * positions : ellipsoid.cartographicArrayToCartesianArray(positions) * }); - * var geometry = WallOutlineGeometry.createGeometry(wall); + * var geometry = Cesium.WallOutlineGeometry.createGeometry(wall); */ var WallOutlineGeometry = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); @@ -122,20 +122,20 @@ define([ * * @example * var positions = [ - * Cartographic.fromDegrees(19.0, 47.0, 10000.0), - * Cartographic.fromDegrees(19.0, 48.0, 10000.0), - * Cartographic.fromDegrees(20.0, 48.0, 10000.0), - * Cartographic.fromDegrees(20.0, 47.0, 10000.0), - * Cartographic.fromDegrees(19.0, 47.0, 10000.0) + * Cesium.Cartographic.fromDegrees(19.0, 47.0, 10000.0), + * Cesium.Cartographic.fromDegrees(19.0, 48.0, 10000.0), + * Cesium.Cartographic.fromDegrees(20.0, 48.0, 10000.0), + * Cesium.Cartographic.fromDegrees(20.0, 47.0, 10000.0), + * Cesium.Cartographic.fromDegrees(19.0, 47.0, 10000.0) * ]; * * // create a wall that spans from 10000 meters to 20000 meters - * var wall = WallOutlineGeometry.fromConstantHeights({ + * var wall = Cesium.WallOutlineGeometry.fromConstantHeights({ * positions : ellipsoid.cartographicArrayToCartesianArray(positions), * minimumHeight : 20000.0, * maximumHeight : 10000.0 * }); - * var geometry = WallOutlineGeometry.createGeometry(wall); + * var geometry = Cesium.WallOutlineGeometry.createGeometry(wall); */ WallOutlineGeometry.fromConstantHeights = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/Core/barycentricCoordinates.js b/Source/Core/barycentricCoordinates.js index fb6d5564d833..6dd979123ed2 100644 --- a/Source/Core/barycentricCoordinates.js +++ b/Source/Core/barycentricCoordinates.js @@ -32,11 +32,11 @@ define([ * * @example * // Returns Cartesian3.UNIT_X - * var p = new Cartesian3(-1.0, 0.0, 0.0); - * var b = barycentricCoordinates(p, - * new Cartesian3(-1.0, 0.0, 0.0), - * new Cartesian3( 1.0, 0.0, 0.0), - * new Cartesian3( 0.0, 1.0, 1.0)); + * var p = new Cesium.Cartesian3(-1.0, 0.0, 0.0); + * var b = Cesium.barycentricCoordinates(p, + * new Cesium.Cartesian3(-1.0, 0.0, 0.0), + * new Cesium.Cartesian3( 1.0, 0.0, 0.0), + * new Cesium.Cartesian3( 0.0, 1.0, 1.0)); */ var barycentricCoordinates = function(point, p0, p1, p2, result) { if (!defined(point) || !defined(p0) || !defined(p1) || !defined(p2)) { diff --git a/Source/Core/binarySearch.js b/Source/Core/binarySearch.js index 0b4b45ffc4a9..0cf08f595768 100644 --- a/Source/Core/binarySearch.js +++ b/Source/Core/binarySearch.js @@ -36,7 +36,7 @@ define([ * return a - b; * }; * var numbers = [0, 2, 4, 6, 8]; - * var index = binarySearch(numbers, 6, comparator); // 3 + * var index = Cesium.binarySearch(numbers, 6, comparator); // 3 */ var binarySearch = function(array, itemToFind, comparator) { if (!defined(array)) { diff --git a/Source/Core/combine.js b/Source/Core/combine.js index 2d770074367c..2f8f363eacd7 100644 --- a/Source/Core/combine.js +++ b/Source/Core/combine.js @@ -29,7 +29,7 @@ define([ * value2 : 11 * } * } - * var final = combine([object1,object2, object3], true, true); + * var final = Cesium.combine([object1,object2, object3], true, true); * * // final === { * // one : 1, diff --git a/Source/Core/createGuid.js b/Source/Core/createGuid.js index bbc06d2b7c3e..e64a57bac818 100644 --- a/Source/Core/createGuid.js +++ b/Source/Core/createGuid.js @@ -10,7 +10,7 @@ define(function() { * @see RFC 4122 A Universally Unique IDentifier (UUID) URN Namespace * * @example - * this.guid = createGuid(); + * this.guid = Cesium.createGuid(); */ var createGuid = function() { // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript diff --git a/Source/Core/defaultValue.js b/Source/Core/defaultValue.js index a82942ed5722..68c56d044099 100644 --- a/Source/Core/defaultValue.js +++ b/Source/Core/defaultValue.js @@ -12,7 +12,7 @@ define([ * @exports defaultValue * * @example - * param = defaultValue(param, 'default'); + * param = Cesium.defaultValue(param, 'default'); */ var defaultValue = function(a, b) { if (a !== undefined) { diff --git a/Source/Core/defined.js b/Source/Core/defined.js index f65e5c8e83e9..f1ddbc3fee0b 100644 --- a/Source/Core/defined.js +++ b/Source/Core/defined.js @@ -8,7 +8,7 @@ define(function() { * @exports defined * * @example - * if (defined(positions)) { + * if (Cesium.defined(positions)) { * doSomething(); * } else { * doSomethingElse(); diff --git a/Source/Core/destroyObject.js b/Source/Core/destroyObject.js index 47691a874540..f780d7aad325 100644 --- a/Source/Core/destroyObject.js +++ b/Source/Core/destroyObject.js @@ -34,7 +34,7 @@ define([ * // How a texture would destroy itself. * this.destroy = function () { * _gl.deleteTexture(_texture); - * return destroyObject(this); + * return Cesium.destroyObject(this); * }; */ var destroyObject = function(object, message) { diff --git a/Source/Core/getFilenameFromUri.js b/Source/Core/getFilenameFromUri.js index 93043539b047..24261f1d57d0 100644 --- a/Source/Core/getFilenameFromUri.js +++ b/Source/Core/getFilenameFromUri.js @@ -19,7 +19,7 @@ define(['./defined', * * @example * //fileName will be"simple.czml"; - * var fileName = getFilenameFromUri('/Gallery/simple.czml?value=true&example=false'); + * var fileName = Cesium.getFilenameFromUri('/Gallery/simple.czml?value=true&example=false'); */ var getFilenameFromUri = function(uri) { if (!defined(uri)) { diff --git a/Source/Core/isLeapYear.js b/Source/Core/isLeapYear.js index 575cfbcae098..5eb9046f8559 100644 --- a/Source/Core/isLeapYear.js +++ b/Source/Core/isLeapYear.js @@ -17,7 +17,7 @@ define([ * @exception {DeveloperError} year is required and must be a number. * * @example - * var leapYear = isLeapYear(2000); // true + * var leapYear = Cesium.isLeapYear(2000); // true */ function isLeapYear(year) { if (year === null || isNaN(year)) { diff --git a/Source/Core/jsonp.js b/Source/Core/jsonp.js index ec77c56b3cef..075c9a6d6263 100644 --- a/Source/Core/jsonp.js +++ b/Source/Core/jsonp.js @@ -31,7 +31,7 @@ define([ * * @example * // load a data asynchronously - * jsonp('some/webservice').then(function(data) { + * Cesium.jsonp('some/webservice').then(function(data) { * // use the loaded data * }, function() { * // an error occurred diff --git a/Source/Core/loadArrayBuffer.js b/Source/Core/loadArrayBuffer.js index 9b836a3a0018..cb1f88093c79 100644 --- a/Source/Core/loadArrayBuffer.js +++ b/Source/Core/loadArrayBuffer.js @@ -23,7 +23,7 @@ define([ * * @example * // load a single URL asynchronously - * loadArrayBuffer('some/url').then(function(arrayBuffer) { + * Cesium.loadArrayBuffer('some/url').then(function(arrayBuffer) { * // use the data * }, function() { * // an error occurred diff --git a/Source/Core/loadBlob.js b/Source/Core/loadBlob.js index d62bb8c00648..8e6b3f21cd93 100644 --- a/Source/Core/loadBlob.js +++ b/Source/Core/loadBlob.js @@ -23,7 +23,7 @@ define([ * * @example * // load a single URL asynchronously - * loadBlob('some/url').then(function(blob) { + * Cesium.loadBlob('some/url').then(function(blob) { * // use the data * }, function() { * // an error occurred diff --git a/Source/Core/loadImage.js b/Source/Core/loadImage.js index 58f2d686b1bf..54cfd39ac17f 100644 --- a/Source/Core/loadImage.js +++ b/Source/Core/loadImage.js @@ -33,7 +33,7 @@ define([ * * @example * // load a single image asynchronously - * loadImage('some/image/url.png').then(function(image) { + * Cesium.loadImage('some/image/url.png').then(function(image) { * // use the loaded image * }, function() { * // an error occurred diff --git a/Source/Core/loadImageViaBlob.js b/Source/Core/loadImageViaBlob.js index 506589b34918..385699d56ecf 100644 --- a/Source/Core/loadImageViaBlob.js +++ b/Source/Core/loadImageViaBlob.js @@ -32,7 +32,7 @@ define([ * * @example * // load a single image asynchronously - * loadImageViaBlob('some/image/url.png').then(function(image) { + * Cesium.loadImageViaBlob('some/image/url.png').then(function(image) { * var blob = image.blob; * // use the loaded image or XHR * }, function() { diff --git a/Source/Core/loadJson.js b/Source/Core/loadJson.js index d390c2759817..b89d4dcac310 100644 --- a/Source/Core/loadJson.js +++ b/Source/Core/loadJson.js @@ -35,7 +35,7 @@ define([ * @exception {DeveloperError} url is required. * * @example - * loadJson('http://someUrl.com/someJson.txt').then(function(jsonData) { + * Cesium.loadJson('http://someUrl.com/someJson.txt').then(function(jsonData) { * //Do something with the JSON object * }, function() { * // an error occurred diff --git a/Source/Core/loadText.js b/Source/Core/loadText.js index a523678064e9..ebeca198204e 100644 --- a/Source/Core/loadText.js +++ b/Source/Core/loadText.js @@ -21,7 +21,7 @@ define([ * * @example * // load text from a URL, setting a custom header - * loadText('http://someUrl.com/someJson.txt', { + * Cesium.loadText('http://someUrl.com/someJson.txt', { * 'X-Custom-Header' : 'some value' * }).then(function(text) { * //Do something with the text diff --git a/Source/Core/loadWithXhr.js b/Source/Core/loadWithXhr.js index 2cc782a38ce3..0144a9fc2848 100644 --- a/Source/Core/loadWithXhr.js +++ b/Source/Core/loadWithXhr.js @@ -42,7 +42,7 @@ define([ * * @example * // Load a single URL asynchronously. In real code, you should use loadBlob instead. - * loadWithXhr({ + * Cesium.loadWithXhr({ * url : 'some/url', * responseType : 'blob' * }).then(function(blob) { diff --git a/Source/Core/pointInsideTriangle.js b/Source/Core/pointInsideTriangle.js index 0da28229b6b6..243c5bc6f784 100644 --- a/Source/Core/pointInsideTriangle.js +++ b/Source/Core/pointInsideTriangle.js @@ -27,11 +27,11 @@ define([ * * @example * // Returns true - * var p = new Cartesian2(0.25, 0.25); - * var b = pointInsideTriangle(p, - * new Cartesian2(0.0, 0.0), - * new Cartesian2(1.0, 0.0), - * new Cartesian2(0.0, 1.0)); + * var p = new Cesium.Cartesian2(0.25, 0.25); + * var b = Cesium.pointInsideTriangle(p, + * new Cesium.Cartesian2(0.0, 0.0), + * new Cesium.Cartesian2(1.0, 0.0), + * new Cesium.Cartesian2(0.0, 1.0)); */ var pointInsideTriangle = function(point, p0, p1, p2) { barycentricCoordinates(point, p0, p1, p2, coords); diff --git a/Source/Core/requestAnimationFrame.js b/Source/Core/requestAnimationFrame.js index 4fbef6fe566b..2fed43ad1f98 100644 --- a/Source/Core/requestAnimationFrame.js +++ b/Source/Core/requestAnimationFrame.js @@ -49,7 +49,7 @@ define(['./defined'], function(defined) { * // tick callback function is called for every animation frame. * function tick() { * scene.render(); - * requestAnimationFrame(tick); + * Cesium.requestAnimationFrame(tick); * } * tick(); * diff --git a/Source/Core/throttleRequestByServer.js b/Source/Core/throttleRequestByServer.js index 4bcc089f1dae..5b6371f3eb4a 100644 --- a/Source/Core/throttleRequestByServer.js +++ b/Source/Core/throttleRequestByServer.js @@ -40,15 +40,15 @@ define([ * * @example * // throttle requests for an image - * var promise = throttleRequestsByServer( + * var promise = Cesium.throttleRequestByServer( * 'http://madeupserver.agi.com/myImage.png', * function(url) { - * return loadImage(url); + * return Cesium.loadImage(url); * }); - * if (!defined(promise)) { + * if (!Cesium.defined(promise)) { * // too many active requests, try again later. * } else { - * when(promise, function(image) { + * Cesium.when(promise, function(image) { * // handle loaded image * }); * } diff --git a/Source/DynamicScene/CompositeProperty.js b/Source/DynamicScene/CompositeProperty.js index f54f5a3141ee..ea1fa07b429d 100644 --- a/Source/DynamicScene/CompositeProperty.js +++ b/Source/DynamicScene/CompositeProperty.js @@ -32,9 +32,9 @@ define([ * //where the property is valid on August 1st, 2012 and uses a constant * //property for the first half of the day and a sampled property for the * //remaining half. - * var composite = new CompositeProperty(); - * composite.intervals.addInterval(TimeInterval.fromIso8601('2012-08-01T00:00:00.00Z/2012-08-01T12:00:00.00Z', true, true, constantProperty)); - * composite.intervals.addInterval(TimeInterval.fromIso8601('2012-08-01T12:00:00.00Z/2012-08-02T00:00:00.00Z', false, false, sampledProperty)); + * var composite = new Cesium.CompositeProperty(); + * composite.intervals.addInterval(Cesium.TimeInterval.fromIso8601('2012-08-01T00:00:00.00Z/2012-08-01T12:00:00.00Z', true, true, constantProperty)); + * composite.intervals.addInterval(Cesium.TimeInterval.fromIso8601('2012-08-01T12:00:00.00Z/2012-08-02T00:00:00.00Z', false, false, sampledProperty)); */ var CompositeProperty = function() { this._intervals = new TimeIntervalCollection(); diff --git a/Source/DynamicScene/ConstantPositionProperty.js b/Source/DynamicScene/ConstantPositionProperty.js index 7aee17e8d1c7..cb6045ebde78 100644 --- a/Source/DynamicScene/ConstantPositionProperty.js +++ b/Source/DynamicScene/ConstantPositionProperty.js @@ -35,7 +35,7 @@ define([ * * @example * //Create a constant position in the inertial frame. - * var constantProperty = new ConstantPositionProperty(new Cartesian3(-4225824.0, 1261219.0, -5148934.0), ReferenceFrame.INERTIAL); + * var constantProperty = new Cesium.ConstantPositionProperty(new Cesium.Cartesian3(-4225824.0, 1261219.0, -5148934.0), Cesium.ReferenceFrame.INERTIAL); */ var ConstantPositionProperty = function(value, referenceFrame) { this._property = new ConstantProperty(value); diff --git a/Source/DynamicScene/GeoJsonDataSource.js b/Source/DynamicScene/GeoJsonDataSource.js index 2f3a4ef2d5bb..406af83a3d44 100644 --- a/Source/DynamicScene/GeoJsonDataSource.js +++ b/Source/DynamicScene/GeoJsonDataSource.js @@ -203,11 +203,11 @@ define([ * * @example * //Use a billboard instead of a point. - * var dataSource = new GeoJsonDataSource(); + * var dataSource = new Cesium.GeoJsonDataSource(); * var defaultPoint = dataSource.defaulPoint; * defaultPoint.point = undefined; - * var billboard = new DynamicBillboard(); - * billboard.image = new ConstantProperty('image.png'); + * var billboard = new Cesium.DynamicBillboard(); + * billboard.image = new Cesium.ConstantProperty('image.png'); * defaultPoint.billboard = billboard; * dataSource.loadUrl('sample.geojson'); */ diff --git a/Source/DynamicScene/SampledProperty.js b/Source/DynamicScene/SampledProperty.js index acdd0fa4e095..e4aaf5a43b8f 100644 --- a/Source/DynamicScene/SampledProperty.js +++ b/Source/DynamicScene/SampledProperty.js @@ -131,35 +131,35 @@ define([ * * @example * //Create a linearly interpolated Cartesian2 - * var property = new SampledProperty(Cartesian2); + * var property = new Cesium.SampledProperty(Cesium.Cartesian2); * property.interpolationDegree = 1; * property.interpolationAlgorithm = LinearApproximation; * * //Populate it with data - * property.addSample(JulianDate.fromIso8601(`2012-08-01T00:00:00.00Z`), new Cartesian2(0, 0)); - * property.addSample(JulianDate.fromIso8601(`2012-08-02T00:00:00.00Z`), new Cartesian2(4, 7)); + * property.addSample(Cesium.JulianDate.fromIso8601(`2012-08-01T00:00:00.00Z`), new Cesium.Cartesian2(0, 0)); + * property.addSample(Cesium.JulianDate.fromIso8601(`2012-08-02T00:00:00.00Z`), new Cesium.Cartesian2(4, 7)); * * //Retrieve an interpolated value - * var result = property.getValue(JulianDate.fromIso8601(`2012-08-01T12:00:00.00Z`)); + * var result = property.getValue(Cesium.JulianDate.fromIso8601(`2012-08-01T12:00:00.00Z`)); * * @example * //Create a simple numeric SampledProperty that uses third degree Hermite Polynomial Approximation - * var property = new SampledProperty(Number); + * var property = new Cesium.SampledProperty(Number); * property.interpolationDegree = 3; - * property.interpolationAlgorithm = HermitePolynomialApproximation; + * property.interpolationAlgorithm = Cesium.HermitePolynomialApproximation; * * //Populate it with data - * property.addSample(JulianDate.fromIso8601(`2012-08-01T00:00:00.00Z`), 1.0); - * property.addSample(JulianDate.fromIso8601(`2012-08-01T00:01:00.00Z`), 6.0); - * property.addSample(JulianDate.fromIso8601(`2012-08-01T00:02:00.00Z`), 12.0); - * property.addSample(JulianDate.fromIso8601(`2012-08-01T00:03:30.00Z`), 5.0); - * property.addSample(JulianDate.fromIso8601(`2012-08-01T00:06:30.00Z`), 2.0); + * property.addSample(Cesium.JulianDate.fromIso8601(`2012-08-01T00:00:00.00Z`), 1.0); + * property.addSample(Cesium.JulianDate.fromIso8601(`2012-08-01T00:01:00.00Z`), 6.0); + * property.addSample(Cesium.JulianDate.fromIso8601(`2012-08-01T00:02:00.00Z`), 12.0); + * property.addSample(Cesium.JulianDate.fromIso8601(`2012-08-01T00:03:30.00Z`), 5.0); + * property.addSample(Cesium.JulianDate.fromIso8601(`2012-08-01T00:06:30.00Z`), 2.0); * * //Samples can be added in any order. - * property.addSample(JulianDate.fromIso8601(`2012-08-01T00:00:30.00Z`), 6.2); + * property.addSample(Cesium.JulianDate.fromIso8601(`2012-08-01T00:00:30.00Z`), 6.2); * * //Retrieve an interpolated value - * var result = property.getValue(JulianDate.fromIso8601(`2012-08-01T00:02:34.00Z`)); + * var result = property.getValue(Cesium.JulianDate.fromIso8601(`2012-08-01T00:02:34.00Z`)); */ var SampledProperty = function(type) { if (!defined(type)) { diff --git a/Source/DynamicScene/TimeIntervalCollectionProperty.js b/Source/DynamicScene/TimeIntervalCollectionProperty.js index 9682a00d6571..713b6c88c7b0 100644 --- a/Source/DynamicScene/TimeIntervalCollectionProperty.js +++ b/Source/DynamicScene/TimeIntervalCollectionProperty.js @@ -31,11 +31,11 @@ define([ * @example * //Create a Cartesian2 interval property which contains data on August 1st, 2012 * //and uses a different value every 6 hours. - * var composite = new TimeIntervalCollectionProperty(); - * composite.intervals.addInterval(TimeInterval.fromIso8601('2012-08-01T00:00:00.00Z/2012-08-01T06:00:00.00Z', true, false, new Cartesian2(2.0, 3.4))); - * composite.intervals.addInterval(TimeInterval.fromIso8601('2012-08-01T06:00:00.00Z/2012-08-01T12:00:00.00Z', true, false, new Cartesian2(12.0, 2.7))); - * composite.intervals.addInterval(TimeInterval.fromIso8601('2012-08-01T12:00:00.00Z/2012-08-01T18:00:00.00Z', true, false, new Cartesian2(5.0, 12.4))); - * composite.intervals.addInterval(TimeInterval.fromIso8601('2012-08-01T18:00:00.00Z/2012-08-02T00:00:00.00Z', true, true, new Cartesian2(85.0, 4.1))); + * var composite = new Cesium.TimeIntervalCollectionProperty(); + * composite.intervals.addInterval(Cesium.TimeInterval.fromIso8601('2012-08-01T00:00:00.00Z/2012-08-01T06:00:00.00Z', true, false, new Cesium.Cartesian2(2.0, 3.4))); + * composite.intervals.addInterval(Cesium.TimeInterval.fromIso8601('2012-08-01T06:00:00.00Z/2012-08-01T12:00:00.00Z', true, false, new Cesium.Cartesian2(12.0, 2.7))); + * composite.intervals.addInterval(Cesium.TimeInterval.fromIso8601('2012-08-01T12:00:00.00Z/2012-08-01T18:00:00.00Z', true, false, new Cesium.Cartesian2(5.0, 12.4))); + * composite.intervals.addInterval(Cesium.TimeInterval.fromIso8601('2012-08-01T18:00:00.00Z/2012-08-02T00:00:00.00Z', true, true, new Cesium.Cartesian2(85.0, 4.1))); * * @example * //Create a TimeIntervalCollectionProperty that contains user-defined objects. @@ -50,9 +50,9 @@ define([ * value : value.value * }; * } - * var composite = new TimeIntervalCollectionProperty(cloneMyObject); - * composite.intervals.addInterval(TimeInterval.fromIso8601('2012-08-01T00:00:00.00Z/2012-08-01T06:00:00.00Z', true, false, myObject)); - * composite.intervals.addInterval(TimeInterval.fromIso8601('2012-08-01T06:00:00.00Z/2012-08-01T12:00:00.00Z', true, false, myObject2)); + * var composite = new Cesium.TimeIntervalCollectionProperty(cloneMyObject); + * composite.intervals.addInterval(Cesium.TimeInterval.fromIso8601('2012-08-01T00:00:00.00Z/2012-08-01T06:00:00.00Z', true, false, myObject)); + * composite.intervals.addInterval(Cesium.TimeInterval.fromIso8601('2012-08-01T06:00:00.00Z/2012-08-01T12:00:00.00Z', true, false, myObject2)); */ var TimeIntervalCollectionProperty = function() { this._intervals = new TimeIntervalCollection(); diff --git a/Source/Renderer/CubeMap.js b/Source/Renderer/CubeMap.js index 86fba6323c3f..910fecf3d9b3 100644 --- a/Source/Renderer/CubeMap.js +++ b/Source/Renderer/CubeMap.js @@ -149,7 +149,7 @@ define([ * // minification when the cube map is sampled. * cubeMap.generateMipmap(); * cubeMap.setSampler(context.createSampler({ - * minificationFilter : TextureMinificationFilter.NEAREST_MIPMAP_LINEAR + * minificationFilter : Cesium.TextureMinificationFilter.NEAREST_MIPMAP_LINEAR * })); */ CubeMap.prototype.generateMipmap = function(hint) { diff --git a/Source/Renderer/ShaderProgram.js b/Source/Renderer/ShaderProgram.js index 21f2bd509ccb..16786f5b924d 100644 --- a/Source/Renderer/ShaderProgram.js +++ b/Source/Renderer/ShaderProgram.js @@ -230,18 +230,18 @@ define([ * var mvp = sp.getAllUniforms().u_mvp; * console.log(mvp.getName()); // 'u_mvp' * console.log(mvp.getDatatype().name); // 'FLOAT_MAT4' - * mvp.value = Matrix4.IDENTITY; + * mvp.value = Cesium.Matrix4.IDENTITY; * * ////////////////////////////////////////////////////////////////////// * * // Example 2. Setting values for a GLSL array uniform * // GLSL: uniform float u_float[2]; - * sp.getAllUniforms().u_float.value = new Cartesian2(1.0, 2.0); + * sp.getAllUniforms().u_float.value = new Cesium.Cartesian2(1.0, 2.0); * * // GLSL: uniform vec4 u_vec4[2]; * sp.getAllUniforms().u_vec4.value = [ - * Cartesian4.UNIT_X, - * Cartesian4.UNIT_Y + * Cesium.Cartesian4.UNIT_X, + * Cesium.Cartesian4.UNIT_Y * ]; * * ////////////////////////////////////////////////////////////////////// @@ -267,26 +267,26 @@ define([ * sp.getAllUniforms().u_float.value = 1.0; * * // GLSL: uniform vec4 u_vec4; - * sp.getAllUniforms().u_vec4.value = Cartesian4.ZERO; + * sp.getAllUniforms().u_vec4.value = Cesium.Cartesian4.ZERO; * * // GLSL: uniform bvec4 u_bvec4; - * sp.getAllUniforms().u_bvec4.value = new Cartesian4(true, true, true, true); + * sp.getAllUniforms().u_bvec4.value = new Cesium.Cartesian4(true, true, true, true); * * // GLSL: uniform mat4 u_mat4; - * sp.getAllUniforms().u_mat4.value = Matrix4.IDENTITY; + * sp.getAllUniforms().u_mat4.value = Cesium.Matrix4.IDENTITY; * * // GLSL: uniform sampler2D u_texture; * sp.getAllUniforms().u_texture.value = context.createTexture2D(...); * * // GLSL: uniform vec2 u_vec2[2]; * sp.getAllUniforms().u_vec2.value = [ - * new Cartesian2(1.0, 2.0), - * new Cartesian2(3.0, 4.0) + * new Cesium.Cartesian2(1.0, 2.0), + * new Cesium.Cartesian2(3.0, 4.0) * ]; * * // GLSL: uniform struct { float f; vec4 v; } u_struct; * sp.getAllUniforms()['u_struct.f'].value = 1.0; - * sp.getAllUniforms()['u_struct.v'].value = new Cartesian4(1.0, 2.0, 3.0, 4.0); + * sp.getAllUniforms()['u_struct.v'].value = new Cesium.Cartesian4(1.0, 2.0, 3.0, 4.0); */ this.value = uniformValue; diff --git a/Source/Renderer/VertexArray.js b/Source/Renderer/VertexArray.js index 888ddbe41908..ccf74f7647e5 100644 --- a/Source/Renderer/VertexArray.js +++ b/Source/Renderer/VertexArray.js @@ -298,7 +298,7 @@ define([ * // Destroying the vertex array implicitly calls destroy for each of its vertex * // buffers and its index buffer. * var vertexBuffer = context.createVertexBuffer(new Float32Array([0, 0, 0]), - * BufferUsage.STATIC_DRAW); + * Cesium.BufferUsage.STATIC_DRAW); * var vertexArray = context.createVertexArray({ * vertexBuffer : vertexBuffer, * componentsPerAttribute : 3 diff --git a/Source/Renderer/createShaderSource.js b/Source/Renderer/createShaderSource.js index 7b3f0815b9bf..8f38d2bb088e 100644 --- a/Source/Renderer/createShaderSource.js +++ b/Source/Renderer/createShaderSource.js @@ -34,7 +34,7 @@ define([ * * @example * // 1. Prepend #defines to a shader - * var source = createShaderSource({ + * var source = Cesium.createShaderSource({ * defines : ['WHITE'], * sources : ['void main() { \n#ifdef WHITE\n gl_FragColor = vec4(1.0); \n#else\n gl_FragColor = vec4(0.0); \n#endif\n }'] * }); diff --git a/Source/Renderer/loadCubeMap.js b/Source/Renderer/loadCubeMap.js index 7b2805a9ecd6..26e87d5a2f9a 100644 --- a/Source/Renderer/loadCubeMap.js +++ b/Source/Renderer/loadCubeMap.js @@ -29,7 +29,7 @@ define([ * @exception {DeveloperError} urls is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties. * * @example - * loadCubeMap(context, { + * Cesium.loadCubeMap(context, { * positiveX : 'skybox_px.png', * negativeX : 'skybox_nx.png', * positiveY : 'skybox_py.png', diff --git a/Source/Scene/ArcGisMapServerImageryProvider.js b/Source/Scene/ArcGisMapServerImageryProvider.js index 9e5a2a88214c..d5a68924d1be 100644 --- a/Source/Scene/ArcGisMapServerImageryProvider.js +++ b/Source/Scene/ArcGisMapServerImageryProvider.js @@ -67,7 +67,7 @@ define([ * @see Cross-Origin Resource Sharing * * @example - * var esri = new ArcGisMapServerImageryProvider({ + * var esri = new Cesium.ArcGisMapServerImageryProvider({ * url: 'http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer' * }); */ diff --git a/Source/Scene/Billboard.js b/Source/Scene/Billboard.js index ef32ac2081b4..d560372a32a4 100644 --- a/Source/Scene/Billboard.js +++ b/Source/Scene/Billboard.js @@ -211,7 +211,7 @@ define([ * * @example * // Example 1. Set a billboard's position using a Cartesian3. - * b.setPosition(new Cartesian3(1.0, 2.0, 3.0)); + * b.setPosition(new Cesium.Cartesian3(1.0, 2.0, 3.0)); * * // Example 2. Set a billboard's position using an object literal. * b.setPosition({ @@ -342,7 +342,7 @@ define([ * // Set a billboard's scaleByDistance to scale by 1.5 when the * // camera is 1500 meters from the billboard and disappear as * // the camera distance approaches 8.0e6 meters. - * b.setScaleByDistance(new NearFarScalar(1.5e2, 1.5, 8.0e6, 0.0)); + * b.setScaleByDistance(new Cesium.NearFarScalar(1.5e2, 1.5, 8.0e6, 0.0)); * * // Example 2. * // disable scaling by distance @@ -395,7 +395,7 @@ define([ * // Set a billboard's translucency to 1.0 when the * // camera is 1500 meters from the billboard and disappear as * // the camera distance approaches 8.0e6 meters. - * b.setTranslucencyByDistance(new NearFarScalar(1.5e2, 1.0, 8.0e6, 0.0)); + * b.setTranslucencyByDistance(new Cesium.NearFarScalar(1.5e2, 1.0, 8.0e6, 0.0)); * * // Example 2. * // disable translucency by distance @@ -452,8 +452,8 @@ define([ * // Set a billboard's pixel offset scale to 0.0 when the * // camera is 1500 meters from the billboard and scale pixel offset to 10.0 pixels * // in the y direction the camera distance approaches 8.0e6 meters. - * b.setPixelOffset(new Cartesian2(0.0, 1.0); - * b.setPixelOffsetScaleByDistance(new NearFarScalar(1.5e2, 0.0, 8.0e6, 10.0)); + * b.setPixelOffset(new Cesium.Cartesian2(0.0, 1.0); + * b.setPixelOffsetScaleByDistance(new Cesium.NearFarScalar(1.5e2, 0.0, 8.0e6, 10.0)); * * // Example 2. * // disable pixel offset by distance @@ -562,8 +562,8 @@ define([ * * @example * // Use a bottom, left origin - * b.setHorizontalOrigin(HorizontalOrigin.LEFT); - * b.setVerticalOrigin(VerticalOrigin.BOTTOM); + * b.setHorizontalOrigin(Cesium.HorizontalOrigin.LEFT); + * b.setVerticalOrigin(Cesium.VerticalOrigin.BOTTOM); */ Billboard.prototype.setHorizontalOrigin = function(value) { if (!defined(value)) { @@ -608,8 +608,8 @@ define([ * * @example * // Use a bottom, left origin - * b.setHorizontalOrigin(HorizontalOrigin.LEFT); - * b.setVerticalOrigin(VerticalOrigin.BOTTOM); + * b.setHorizontalOrigin(Cesium.HorizontalOrigin.LEFT); + * b.setVerticalOrigin(Cesium.VerticalOrigin.BOTTOM); */ Billboard.prototype.setVerticalOrigin = function(value) { if (!defined(value)) { @@ -839,7 +839,7 @@ define([ * @example * // Example 1. * // Have the billboard up vector point north - * billboard.setAlignedAxis(Cartesian3.UNIT_Z); + * billboard.setAlignedAxis(Cesium.Cartesian3.UNIT_Z); * * // Example 2. * // Have the billboard point east. @@ -848,7 +848,7 @@ define([ * * // Example 3. * // Reset the aligned axis - * billboard.setAlignedAxis(Cartesian3.ZERO); + * billboard.setAlignedAxis(Cesium.Cartesian3.ZERO); */ Billboard.prototype.setAlignedAxis = function(value) { if (!defined(value)) { diff --git a/Source/Scene/BillboardCollection.js b/Source/Scene/BillboardCollection.js index 5844eb065ef9..f178ec1c4184 100644 --- a/Source/Scene/BillboardCollection.js +++ b/Source/Scene/BillboardCollection.js @@ -125,7 +125,7 @@ define([ * * @example * // Create a billboard collection with two billboards - * var billboards = new BillboardCollection(); + * var billboards = new Cesium.BillboardCollection(); * var atlas = context.createTextureAtlas({images : images}); * billboards.setTextureAtlas(atlas); * billboards.add({ @@ -203,12 +203,12 @@ define([ * @see czm_model * * @example - * var center = ellipsoid.cartographicToCartesian(Cartographic.fromDegrees(-75.59777, 40.03883)); - * billboards.modelMatrix = Transforms.eastNorthUpToFixedFrame(center); - * billboards.add({ imageIndex: 0, position : new Cartesian3(0.0, 0.0, 0.0) }); // center - * billboards.add({ imageIndex: 0, position : new Cartesian3(1000000.0, 0.0, 0.0) }); // east - * billboards.add({ imageIndex: 0, position : new Cartesian3(0.0, 1000000.0, 0.0) }); // north - * billboards.add({ imageIndex: 0, position : new Cartesian3(0.0, 0.0, 1000000.0) }); // up + * var center = ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-75.59777, 40.03883)); + * billboards.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center); + * billboards.add({ imageIndex: 0, position : new Cesium.Cartesian3(0.0, 0.0, 0.0) }); // center + * billboards.add({ imageIndex: 0, position : new Cesium.Cartesian3(1000000.0, 0.0, 0.0) }); // east + * billboards.add({ imageIndex: 0, position : new Cesium.Cartesian3(0.0, 1000000.0, 0.0) }); // north + * billboards.add({ imageIndex: 0, position : new Cesium.Cartesian3(0.0, 0.0, 1000000.0) }); // up * ]); */ this.modelMatrix = Matrix4.clone(defaultValue(options.modelMatrix, Matrix4.IDENTITY)); @@ -280,20 +280,20 @@ define([ * // Example 1: Add a billboard, specifying all the default values. * var b = billboards.add({ * show : true, - * position : Cartesian3.ZERO, - * pixelOffset : Cartesian2.ZERO, - * eyeOffset : Cartesian3.ZERO, - * horizontalOrigin : HorizontalOrigin.CENTER, - * verticalOrigin : VerticalOrigin.CENTER, + * position : Cesium.Cartesian3.ZERO, + * pixelOffset : Cesium.Cartesian2.ZERO, + * eyeOffset : Cesium.Cartesian3.ZERO, + * horizontalOrigin : Cesium.HorizontalOrigin.CENTER, + * verticalOrigin : Cesium.VerticalOrigin.CENTER, * scale : 1.0, * imageIndex : 0, - * color : Color.WHITE, + * color : Cesium.Color.WHITE, * id : undefined * }); * * // Example 2: Specify only the billboard's cartographic position. * var b = billboards.add({ - * position : ellipsoid.cartographicToCartesian(new Cartographic(longitude, latitude, height)) + * position : ellipsoid.cartographicToCartesian(new Cesium.Cartographic(longitude, latitude, height)) * }); */ BillboardCollection.prototype.add = function(billboard) { @@ -513,7 +513,7 @@ define([ * // Assigns a texture atlas with two images to a billboard collection. * // Two billboards, each referring to one of the images, are then * // added to the collection. - * var billboards = new BillboardCollection(); + * var billboards = new Cesium.BillboardCollection(); * var images = [image0, image1]; * var atlas = context.createTextureAtlas({images : images}); * billboards.setTextureAtlas(atlas); diff --git a/Source/Scene/BingMapsImageryProvider.js b/Source/Scene/BingMapsImageryProvider.js index 80eb88a65ea8..af15b4eeb643 100644 --- a/Source/Scene/BingMapsImageryProvider.js +++ b/Source/Scene/BingMapsImageryProvider.js @@ -73,10 +73,10 @@ define([ * @see Cross-Origin Resource Sharing * * @example - * var bing = new BingMapsImageryProvider({ + * var bing = new Cesium.BingMapsImageryProvider({ * url : 'http://dev.virtualearth.net', * key : 'get-yours-at-https://www.bingmapsportal.com/', - * mapStyle : BingMapsStyle.AERIAL + * mapStyle : Cesium.BingMapsStyle.AERIAL * }); */ var BingMapsImageryProvider = function BingMapsImageryProvider(description) { diff --git a/Source/Scene/Camera.js b/Source/Scene/Camera.js index c606b4a64b8a..188318430913 100644 --- a/Source/Scene/Camera.js +++ b/Source/Scene/Camera.js @@ -42,11 +42,11 @@ define([ * @example * // Create a camera looking down the negative z-axis, positioned at the origin, * // with a field of view of 60 degrees, and 1:1 aspect ratio. - * var camera = new Camera(context); - * camera.position = new Cartesian3(); - * camera.direction = Cartesian3.negate(Cartesian3.UNIT_Z); - * camera.up = Cartesian3.clone(Cartesian3.UNIT_Y); - * camera.frustum.fovy = CesiumMath.PI_OVER_THREE; + * var camera = new Cesium.Camera(context); + * camera.position = new Cesium.Cartesian3(); + * camera.direction = Cesium.Cartesian3.negate(Cesium.Cartesian3.UNIT_Z); + * camera.up = Cesium.Cartesian3.clone(Cesium.Cartesian3.UNIT_Y); + * camera.frustum.fovy = Cesium.Math.PI_OVER_THREE; * camera.frustum.near = 1.0; * camera.frustum.far = 2.0; * diff --git a/Source/Scene/CameraController.js b/Source/Scene/CameraController.js index 27ab11d60572..19fd2a45062a 100644 --- a/Source/Scene/CameraController.js +++ b/Source/Scene/CameraController.js @@ -476,7 +476,7 @@ define([ * @example * // Rotate about a point on the earth. * var center = ellipsoid.cartographicToCartesian(cartographic); - * var transform = Matrix4.fromTranslation(center); + * var transform = Cesium.Matrix4.fromTranslation(center); * controller.rotate(axis, angle, transform); */ CameraController.prototype.rotate = function(axis, angle, transform) { diff --git a/Source/Scene/CompositePrimitive.js b/Source/Scene/CompositePrimitive.js index a63e51d5ee83..a50af004f281 100644 --- a/Source/Scene/CompositePrimitive.js +++ b/Source/Scene/CompositePrimitive.js @@ -21,18 +21,18 @@ define([ * * @example * // Example 1. Add primitives to a composite. - * var primitives = new CompositePrimitive(); - * primitives.setCentralBody(new CentralBody()); + * var primitives = new Cesium.CompositePrimitive(); + * primitives.setCentralBody(new Cesium.CentralBody()); * primitives.add(billboards); * primitives.add(labels); * * ////////////////////////////////////////////////////////////////// * * // Example 2. Create composites of composites. - * var children = new CompositePrimitive(); + * var children = new Cesium.CompositePrimitive(); * children.add(billboards); * - * var parent = new CompositePrimitive(); + * var parent = new Cesium.CompositePrimitive(); * parent.add(children); // Add composite * parent.add(labels); // Add regular primitive */ @@ -53,7 +53,7 @@ define([ * * @example * // Example 1. Primitives are destroyed by default. - * var primitives = new CompositePrimitive(); + * var primitives = new Cesium.CompositePrimitive(); * primitives.add(labels); * primitives = primitives.destroy(); * var b = labels.isDestroyed(); // true @@ -61,7 +61,7 @@ define([ * ////////////////////////////////////////////////////////////////// * * // Example 2. Do not destroy primitives in a composite. - * var primitives = new CompositePrimitive(); + * var primitives = new Cesium.CompositePrimitive(); * primitives.destroyPrimitives = false; * primitives.add(labels); * primitives = primitives.destroy(); @@ -103,8 +103,8 @@ define([ * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called. * * @example - * var primitives = new CompositePrimitive(); - * primitives.setCentralBody(new CentralBody()); + * var primitives = new Cesium.CompositePrimitive(); + * primitives.setCentralBody(new Cesium.CentralBody()); */ CompositePrimitive.prototype.setCentralBody = function(centralBody) { this._centralBody = this.destroyPrimitives && this._centralBody && this._centralBody.destroy(); diff --git a/Source/Scene/Credit.js b/Source/Scene/Credit.js index 4840021db224..1b92ba853869 100644 --- a/Source/Scene/Credit.js +++ b/Source/Scene/Credit.js @@ -19,7 +19,7 @@ define([ * * @example * //Create a credit with a tooltip, image and link - * var credit = new Credit('Cesium', '/images/cesium_logo.png', 'http://cesiumjs.org/'); + * var credit = new Cesium.Credit('Cesium', '/images/cesium_logo.png', 'http://cesiumjs.org/'); */ var Credit = function(text, imageUrl, link) { diff --git a/Source/Scene/CreditDisplay.js b/Source/Scene/CreditDisplay.js index cf0f7cf82d95..9be7ff1fdf78 100644 --- a/Source/Scene/CreditDisplay.js +++ b/Source/Scene/CreditDisplay.js @@ -146,7 +146,7 @@ define([ * @constructor * * @example - * var CreditDisplay = new CreditDisplay(creditContainer); + * var creditDisplay = new Cesium.CreditDisplay(creditContainer); */ var CreditDisplay = function(container, delimiter) { diff --git a/Source/Scene/CustomSensorVolume.js b/Source/Scene/CustomSensorVolume.js index 1f884d06ed29..f024dc7ac9fb 100644 --- a/Source/Scene/CustomSensorVolume.js +++ b/Source/Scene/CustomSensorVolume.js @@ -178,8 +178,8 @@ define([ * @example * // The sensor's vertex is located on the surface at -75.59777 degrees longitude and 40.03883 degrees latitude. * // The sensor's opens upward, along the surface normal. - * var center = ellipsoid.cartographicToCartesian(Cartographic.fromDegrees(-75.59777, 40.03883)); - * sensor.modelMatrix = Transforms.eastNorthUpToFixedFrame(center); + * var center = ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-75.59777, 40.03883)); + * sensor.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center); */ this.modelMatrix = Matrix4.clone(defaultValue(options.modelMatrix, Matrix4.IDENTITY)); this._modelMatrix = new Matrix4(); @@ -223,10 +223,10 @@ define([ * * @example * // 1. Change the color of the default material to yellow - * sensor.material.uniforms.color = new Color(1.0, 1.0, 0.0, 1.0); + * sensor.material.uniforms.color = new Cesium.Color(1.0, 1.0, 0.0, 1.0); * * // 2. Change material to horizontal stripes - * sensor.material = Material.fromType(Material.StripeType); + * sensor.material = Cesium.Material.fromType(Material.StripeType); * * @see Fabric */ diff --git a/Source/Scene/DebugAppearance.js b/Source/Scene/DebugAppearance.js index fc5519b03180..ef6c36eb642f 100644 --- a/Source/Scene/DebugAppearance.js +++ b/Source/Scene/DebugAppearance.js @@ -32,9 +32,9 @@ define([ * @exception {DeveloperError} options.glslDatatype must be float, vec2, vec3, or vec4. * * @example - * var primitive = new Primitive({ + * var primitive = new Cesium.Primitive({ * geometryInstances : // ... - * appearance : new DebugAppearance({ + * appearance : new Cesium.DebugAppearance({ * attributeName : 'normal' * }) * }); diff --git a/Source/Scene/DebugModelMatrixPrimitive.js b/Source/Scene/DebugModelMatrixPrimitive.js index 4fc4dd0aee4e..1ea5d08bee6a 100644 --- a/Source/Scene/DebugModelMatrixPrimitive.js +++ b/Source/Scene/DebugModelMatrixPrimitive.js @@ -44,7 +44,7 @@ define([ * @param {Object} [options.id=undefined] A user-defined object to return when the instance is picked with {@link Scene#pick} * * @example - * primitives.add(new DebugModelMatrixPrimitive({ + * primitives.add(new Cesium.DebugModelMatrixPrimitive({ * modelMatrix : primitive.modelMatrix, // primitive to debug * length : 100000.0, * width : 10.0 diff --git a/Source/Scene/EllipsoidPrimitive.js b/Source/Scene/EllipsoidPrimitive.js index d267d4ababd4..3404052cfe6b 100644 --- a/Source/Scene/EllipsoidPrimitive.js +++ b/Source/Scene/EllipsoidPrimitive.js @@ -66,19 +66,19 @@ define([ * * @example * // 1. Create a sphere using the ellipsoid primitive - * primitives.add(new EllipsoidPrimitive({ + * primitives.add(new Cesium.EllipsoidPrimitive({ * center : ellipsoid.cartographicToCartesian( - * Cartographic.fromDegrees(-75.0, 40.0, 500000.0)), - * radii : new Cartesian3(500000.0, 500000.0, 500000.0) + * Cesium.Cartographic.fromDegrees(-75.0, 40.0, 500000.0)), + * radii : new Cesium.Cartesian3(500000.0, 500000.0, 500000.0) * })); * * @example * // 2. Create a tall ellipsoid in an east-north-up reference frame - * var e = new EllipsoidPrimitive(); - * e.modelMatrix = Transforms.eastNorthUpToFixedFrame( + * var e = new Cesium.EllipsoidPrimitive(); + * e.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame( * ellipsoid.cartographicToCartesian( - * Cartographic.fromDegrees(-95.0, 40.0, 200000.0))); - * e.radii = new Cartesian3(100000.0, 100000.0, 200000.0); + * Cesium.Cartographic.fromDegrees(-95.0, 40.0, 200000.0))); + * e.radii = new Cesium.Cartesian3(100000.0, 100000.0, 200000.0); * primitives.add(e); * * @demo Cesium Sandcastle Volumes Demo @@ -112,7 +112,7 @@ define([ * * @example * // A sphere with a radius of 2.0 - * e.radii = new Cartesian3(2.0, 2.0, 2.0); + * e.radii = new Cesium.Cartesian3(2.0, 2.0, 2.0); * * @see EllipsoidPrimitive#modelMatrix */ @@ -134,8 +134,8 @@ define([ * * @example * var origin = ellipsoid.cartographicToCartesian( - * Cartographic.fromDegrees(-95.0, 40.0, 200000.0)); - * e.modelMatrix = Transforms.eastNorthUpToFixedFrame(origin); + * Cesium.Cartographic.fromDegrees(-95.0, 40.0, 200000.0)); + * e.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin); * * @see Transforms.eastNorthUpToFixedFrame * @see czm_model @@ -164,10 +164,10 @@ define([ * * @example * // 1. Change the color of the default material to yellow - * e.material.uniforms.color = new Color(1.0, 1.0, 0.0, 1.0); + * e.material.uniforms.color = new Cesium.Color(1.0, 1.0, 0.0, 1.0); * * // 2. Change material to horizontal stripes - * e.material = Material.fromType(Material.StripeType); + * e.material = Cesium.Material.fromType(Material.StripeType); * * @see Fabric */ diff --git a/Source/Scene/EllipsoidSurfaceAppearance.js b/Source/Scene/EllipsoidSurfaceAppearance.js index fd62d43eb6c7..3628c5114359 100644 --- a/Source/Scene/EllipsoidSurfaceAppearance.js +++ b/Source/Scene/EllipsoidSurfaceAppearance.js @@ -37,15 +37,15 @@ define([ * @param {RenderState} [options.renderState=undefined] Optional render state to override the default render state. * * @example - * var primitive = new Primitive({ - * geometryInstances : new GeometryInstance({ - * geometry : new PolygonGeometry({ - * vertexFormat : EllipsoidSurfaceAppearance.VERTEX_FORMAT, + * var primitive = new Cesium.Primitive({ + * geometryInstances : new Cesium.GeometryInstance({ + * geometry : new Cesium.PolygonGeometry({ + * vertexFormat : Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT, * // ... * }) * }), - * appearance : new EllipsoidSurfaceAppearance({ - * material : Material.fromType('Stripe') + * appearance : new Cesium.EllipsoidSurfaceAppearance({ + * material : Cesium.Material.fromType('Stripe') * }) * }); * diff --git a/Source/Scene/ExtentPrimitive.js b/Source/Scene/ExtentPrimitive.js index d54a90329a57..391572754d71 100644 --- a/Source/Scene/ExtentPrimitive.js +++ b/Source/Scene/ExtentPrimitive.js @@ -48,8 +48,8 @@ define([ * @param {Boolean} [options.debugShowBoundingVolume=false] For debugging only. Determines if the primitive's commands' bounding spheres are shown. * * @example - * var extentPrimitive = new ExtentPrimitive({ - * extent : Extent.fromDegrees(0.0, 20.0, 10.0, 30.0) + * var extentPrimitive = new Cesium.ExtentPrimitive({ + * extent : Cesium.Extent.fromDegrees(0.0, 20.0, 10.0, 30.0) * }); * primitives.add(extentPrimitive); */ @@ -143,10 +143,10 @@ define([ * * @example * // 1. Change the color of the default material to yellow - * extent.material.uniforms.color = new Color(1.0, 1.0, 0.0, 1.0); + * extent.material.uniforms.color = new Cesium.Color(1.0, 1.0, 0.0, 1.0); * * // 2. Change material to horizontal stripes - * extent.material = Material.fromType(Material.StripeType); + * extent.material = Cesium.Material.fromType(Material.StripeType); * * @see Fabric */ diff --git a/Source/Scene/GoogleEarthImageryProvider.js b/Source/Scene/GoogleEarthImageryProvider.js index f67a5d8a56f4..488e24cca7a8 100644 --- a/Source/Scene/GoogleEarthImageryProvider.js +++ b/Source/Scene/GoogleEarthImageryProvider.js @@ -88,7 +88,7 @@ define([ * @see Cross-Origin Resource Sharing * * @example - * var google = new GoogleEarthImageryProvider({ + * var google = new Cesium.GoogleEarthImageryProvider({ * url : 'http://earth.localdomain', * channel : 1008 * }); diff --git a/Source/Scene/HeightmapTerrainData.js b/Source/Scene/HeightmapTerrainData.js index 33df96b33e68..f097d6533aa4 100644 --- a/Source/Scene/HeightmapTerrainData.js +++ b/Source/Scene/HeightmapTerrainData.js @@ -76,8 +76,8 @@ define([ * var heightBuffer = new Uint16Array(buffer, 0, that._heightmapWidth * that._heightmapWidth); * var childTileMask = new Uint8Array(buffer, heightBuffer.byteLength, 1)[0]; * var waterMask = new Uint8Array(buffer, heightBuffer.byteLength + 1, buffer.byteLength - heightBuffer.byteLength - 1); - * var structure = HeightmapTessellator.DEFAULT_STRUCTURE; - * var terrainData = new HeightmapTerrainData({ + * var structure = Cesium.HeightmapTessellator.DEFAULT_STRUCTURE; + * var terrainData = new Cesium.HeightmapTerrainData({ * buffer : heightBuffer, * width : 65, * height : 65, diff --git a/Source/Scene/Label.js b/Source/Scene/Label.js index 63161aaa202f..4bc07ba33a3a 100644 --- a/Source/Scene/Label.js +++ b/Source/Scene/Label.js @@ -167,7 +167,7 @@ define([ * * @example * // Example 1. Set a label's position using a Cartesian3. - * l.setPosition(new Cartesian3(1.0, 2.0, 3.0)); + * l.setPosition(new Cesium.Cartesian3(1.0, 2.0, 3.0)); * * ////////////////////////////////////////////////////////////////// * @@ -502,7 +502,7 @@ define([ * // Set a label's translucencyByDistance to 1.0 when the * // camera is 1500 meters from the label and disappear as * // the camera distance approaches 8.0e6 meters. - * text.setTranslucencyByDistance(new NearFarScalar(1.5e2, 1.0, 8.0e6, 0.0)); + * text.setTranslucencyByDistance(new Cesium.NearFarScalar(1.5e2, 1.0, 8.0e6, 0.0)); * * // Example 2. * // disable translucency by distance @@ -559,8 +559,8 @@ define([ * // Set a label's pixel offset scale to 0.0 when the * // camera is 1500 meters from the label and scale pixel offset to 10.0 pixels * // in the y direction the camera distance approaches 8.0e6 meters. - * text.setPixelOffset(new Cartesian2(0.0, 1.0); - * text.setPixelOffsetScaleByDistance(new NearFarScalar(1.5e2, 0.0, 8.0e6, 10.0)); + * text.setPixelOffset(new Cesium.Cartesian2(0.0, 1.0); + * text.setPixelOffsetScaleByDistance(new Cesium.NearFarScalar(1.5e2, 0.0, 8.0e6, 10.0)); * * // Example 2. * // disable pixel offset by distance @@ -676,8 +676,8 @@ define([ * * @example * // Use a top, right origin - * l.setHorizontalOrigin(HorizontalOrigin.RIGHT); - * l.setVerticalOrigin(VerticalOrigin.TOP); + * l.setHorizontalOrigin(Cesium.HorizontalOrigin.RIGHT); + * l.setVerticalOrigin(Cesium.VerticalOrigin.TOP); */ Label.prototype.setHorizontalOrigin = function(value) { if (!defined(value)) { @@ -722,8 +722,8 @@ define([ * * @example * // Use a top, right origin - * l.setHorizontalOrigin(HorizontalOrigin.RIGHT); - * l.setVerticalOrigin(VerticalOrigin.TOP); + * l.setHorizontalOrigin(Cesium.HorizontalOrigin.RIGHT); + * l.setVerticalOrigin(Cesium.VerticalOrigin.TOP); */ Label.prototype.setVerticalOrigin = function(value) { if (!defined(value)) { diff --git a/Source/Scene/LabelCollection.js b/Source/Scene/LabelCollection.js index a135c62a1c9f..0f7984bace59 100644 --- a/Source/Scene/LabelCollection.js +++ b/Source/Scene/LabelCollection.js @@ -288,7 +288,7 @@ define([ * * @example * // Create a label collection with two labels - * var labels = new LabelCollection(); + * var labels = new Cesium.LabelCollection(); * labels.add({ * position : { x : 1.0, y : 2.0, z : 3.0 }, * text : 'A label' @@ -328,22 +328,22 @@ define([ * @see czm_model * * @example - * var center = ellipsoid.cartographicToCartesian(Cartographic.fromDegrees(-75.59777, 40.03883)); - * labels.modelMatrix = Transforms.eastNorthUpToFixedFrame(center); + * var center = ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-75.59777, 40.03883)); + * labels.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center); * labels.add({ - * position : new Cartesian3(0.0, 0.0, 0.0), + * position : new Cesium.Cartesian3(0.0, 0.0, 0.0), * text : 'Center' * }); * labels.add({ - * position : new Cartesian3(1000000.0, 0.0, 0.0), + * position : new Cesium.Cartesian3(1000000.0, 0.0, 0.0), * text : 'East' * }); * labels.add({ - * position : new Cartesian3(0.0, 1000000.0, 0.0), + * position : new Cesium.Cartesian3(0.0, 1000000.0, 0.0), * text : 'North' * }); * labels.add({ - * position : new Cartesian3(0.0, 0.0, 1000000.0), + * position : new Cesium.Cartesian3(0.0, 0.0, 1000000.0), * text : 'Up' * }); */ @@ -388,23 +388,23 @@ define([ * // Example 1: Add a label, specifying all the default values. * var l = labels.add({ * show : true, - * position : Cartesian3.ZERO, + * position : Cesium.Cartesian3.ZERO, * text : '', * font : '30px sans-serif', * fillColor : 'white', * outlineColor : 'white', - * style : LabelStyle.FILL, - * pixelOffset : Cartesian2.ZERO, - * eyeOffset : Cartesian3.ZERO, - * horizontalOrigin : HorizontalOrigin.LEFT, - * verticalOrigin : VerticalOrigin.BOTTOM, + * style : Cesium.LabelStyle.FILL, + * pixelOffset : Cesium.Cartesian2.ZERO, + * eyeOffset : Cesium.Cartesian3.ZERO, + * horizontalOrigin : Cesium.HorizontalOrigin.LEFT, + * verticalOrigin : Cesium.VerticalOrigin.BOTTOM, * scale : 1.0 * }); * * // Example 2: Specify only the label's cartographic position, * // text, and font. * var l = labels.add({ - * position : ellipsoid.cartographicToCartesian(new Cartographic(longitude, latitude, height)), + * position : ellipsoid.cartographicToCartesian(new Cesium.Cartographic(longitude, latitude, height)), * text : 'Hello World', * font : '24px Helvetica', * }); diff --git a/Source/Scene/Material.js b/Source/Scene/Material.js index 8ba19df2a2ba..8bd7736440ae 100644 --- a/Source/Scene/Material.js +++ b/Source/Scene/Material.js @@ -256,18 +256,18 @@ define([ * * @example * // Create a color material with fromType: - * polygon.material = Material.fromType('Color'); - * polygon.material.uniforms.color = new Color(1.0, 1.0, 0.0, 1.0); + * polygon.material = Cesium.Material.fromType('Color'); + * polygon.material.uniforms.color = new Cesium.Color(1.0, 1.0, 0.0, 1.0); * * // Create the default material: - * polygon.material = new Material(); + * polygon.material = new Cesium.Material(); * * // Create a color material with full Fabric notation: - * polygon.material = new Material({ + * polygon.material = new Cesium.Material({ * fabric : { * type : 'Color', * uniforms : { - * color : new Color(1.0, 1.0, 0.0, 1.0) + * color : new Cesium.Color(1.0, 1.0, 0.0, 1.0) * } * } * }); @@ -355,7 +355,7 @@ define([ * @exception {DeveloperError} material with that type does not exist. * * @example - * var material = Material.fromType('Color'); + * var material = Cesium.Material.fromType('Color'); * material.uniforms.color = vec4(1.0, 0.0, 0.0, 1.0); */ Material.fromType = function(type) { diff --git a/Source/Scene/MaterialAppearance.js b/Source/Scene/MaterialAppearance.js index 7baf1ebabdf6..e8851d670737 100644 --- a/Source/Scene/MaterialAppearance.js +++ b/Source/Scene/MaterialAppearance.js @@ -45,15 +45,15 @@ define([ * @param {RenderState} [options.renderState=undefined] Optional render state to override the default render state. * * @example - * var primitive = new Primitive({ - * geometryInstances : new GeometryInstance({ - * geometry : new WallGeometry({ - materialSupport : MaterialAppearance.MaterialSupport.BASIC.vertexFormat, + * var primitive = new Cesium.Primitive({ + * geometryInstances : new Cesium.GeometryInstance({ + * geometry : new Cesium.WallGeometry({ + materialSupport : Cesium.MaterialAppearance.MaterialSupport.BASIC.vertexFormat, * // ... * }) * }), - * appearance : new MaterialAppearance({ - * material : Material.fromType('Color'), + * appearance : new Cesium.MaterialAppearance({ + * material : Cesium.Material.fromType('Color'), * faceForward : true * }) * }); diff --git a/Source/Scene/Moon.js b/Source/Scene/Moon.js index 9223ccc1ede6..ae9cf007f6da 100644 --- a/Source/Scene/Moon.js +++ b/Source/Scene/Moon.js @@ -40,7 +40,7 @@ define([ * @param {Boolean} [options.onlySunLighting=true] Use the sun as the only light source. * * @example - * scene.moon = new Moon(); + * scene.moon = new Cesium.Moon(); */ var Moon = function(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/Scene/OpenStreetMapImageryProvider.js b/Source/Scene/OpenStreetMapImageryProvider.js index e14cd69e0e09..4d47d85963ca 100644 --- a/Source/Scene/OpenStreetMapImageryProvider.js +++ b/Source/Scene/OpenStreetMapImageryProvider.js @@ -47,7 +47,7 @@ define([ * * @example * // OpenStreetMap tile provider - * var osm = new OpenStreetMapImageryProvider({ + * var osm = new Cesium.OpenStreetMapImageryProvider({ * url : 'http://tile.openstreetmap.org/' * }); */ diff --git a/Source/Scene/OrthographicFrustum.js b/Source/Scene/OrthographicFrustum.js index 3c3b1186b1e2..8dfd978d9b18 100644 --- a/Source/Scene/OrthographicFrustum.js +++ b/Source/Scene/OrthographicFrustum.js @@ -31,8 +31,8 @@ define([ * @example * var maxRadii = ellipsoid.getMaximumRadius(); * - * var frustum = new OrthographicFrustum(); - * frustum.right = maxRadii * CesiumMath.PI; + * var frustum = new Cesium.OrthographicFrustum(); + * frustum.right = maxRadii * Cesium.Math.PI; * frustum.left = -c.frustum.right; * frustum.top = c.frustum.right * (canvas.clientHeight / canvas.clientWidth); * frustum.bottom = -c.frustum.top; @@ -289,7 +289,7 @@ define([ * @example * // Example 1 * // Get the width and height of a pixel. - * var pixelSize = camera.frustum.getPixelSize(new Cartesian2(canvas.clientWidth, canvas.clientHeight)); + * var pixelSize = camera.frustum.getPixelSize(new Cesium.Cartesian2(canvas.clientWidth, canvas.clientHeight)); */ OrthographicFrustum.prototype.getPixelSize = function(drawingBufferDimensions, distance, result) { update(this); diff --git a/Source/Scene/PerInstanceColorAppearance.js b/Source/Scene/PerInstanceColorAppearance.js index 0b1c1149eaa7..07aa7f20d8e1 100644 --- a/Source/Scene/PerInstanceColorAppearance.js +++ b/Source/Scene/PerInstanceColorAppearance.js @@ -35,42 +35,42 @@ define([ * * @example * // A solid white line segment - * var primitive = new Primitive({ - * geometryInstances : new GeometryInstance({ - * geometry : new SimplePolylineGeometry({ + * var primitive = new Cesium.Primitive({ + * geometryInstances : new Cesium.GeometryInstance({ + * geometry : new Cesium.SimplePolylineGeometry({ * positions : ellipsoid.cartographicArrayToCartesianArray([ - * Cartographic.fromDegrees(0.0, 0.0), - * Cartographic.fromDegrees(5.0, 0.0) + * Cesium.Cartographic.fromDegrees(0.0, 0.0), + * Cesium.Cartographic.fromDegrees(5.0, 0.0) * ]) * }), * attributes : { - * color : Cesium.ColorGeometryInstanceAttribute.fromColor(new Color(1.0, 1.0, 1.0, 1.0)) + * color : Cesium.ColorGeometryInstanceAttribute.fromColor(new Cesium.Color(1.0, 1.0, 1.0, 1.0)) * } * }), - * appearance : new PerInstanceColorAppearance({ + * appearance : new Cesium.PerInstanceColorAppearance({ * flat : true, * translucent : false * }) * })); * * // Two extents in a primitive, each with a different color - * var instance = new GeometryInstance({ - * geometry : new ExtentGeometry({ - * extent : Extent.fromDegrees(0.0, 20.0, 10.0, 30.0) + * var instance = new Cesium.GeometryInstance({ + * geometry : new Cesium.ExtentGeometry({ + * extent : Cesium.Extent.fromDegrees(0.0, 20.0, 10.0, 30.0) * }), - * color : new Color(1.0, 0.0, 0.0, 0.5) + * color : new Cesium.Color(1.0, 0.0, 0.0, 0.5) * }); * - * var anotherInstance = new GeometryInstance({ - * geometry : new ExtentGeometry({ - * extent : Extent.fromDegrees(0.0, 40.0, 10.0, 50.0) + * var anotherInstance = new Cesium.GeometryInstance({ + * geometry : new Cesium.ExtentGeometry({ + * extent : Cesium.Extent.fromDegrees(0.0, 40.0, 10.0, 50.0) * }), - * color : new Color(0.0, 0.0, 1.0, 0.5) + * color : new Cesium.Color(0.0, 0.0, 1.0, 0.5) * }); * - * var extentPrimitive = new Primitive({ + * var extentPrimitive = new Cesium.Primitive({ * geometryInstances : [instance, anotherInstance], - * appearance : new PerInstanceColorAppearance() + * appearance : new Cesium.PerInstanceColorAppearance() * }); */ var PerInstanceColorAppearance = function(options) { diff --git a/Source/Scene/PerformanceDisplay.js b/Source/Scene/PerformanceDisplay.js index f32dd417c28f..9755e92872ab 100644 --- a/Source/Scene/PerformanceDisplay.js +++ b/Source/Scene/PerformanceDisplay.js @@ -38,7 +38,7 @@ define([ * @param {BoundingRectangle} [description.rectangle] The position and size of the display, relative to the top left corner. * * @example - * scene.getPrimitives().add(new PerformanceDisplay()); + * scene.getPrimitives().add(new Cesium.PerformanceDisplay()); */ var PerformanceDisplay = function(description) { description = defaultValue(description, defaultValue.EMPTY_OBJECT); diff --git a/Source/Scene/PerspectiveFrustum.js b/Source/Scene/PerspectiveFrustum.js index 2fe998e1cc42..dc9274870342 100644 --- a/Source/Scene/PerspectiveFrustum.js +++ b/Source/Scene/PerspectiveFrustum.js @@ -23,8 +23,8 @@ define([ * @see PerspectiveOffCenterFrustum * * @example - * var frustum = new PerspectiveFrustum(); - * frustum.fovy = CesiumMath.PI_OVER_THREE; + * var frustum = new Cesium.PerspectiveFrustum(); + * frustum.fovy = Cesium.Math.PI_OVER_THREE; * frustum.aspectRatio = canvas.clientWidth / canvas.clientHeight; * frustum.near = 1.0; * frustum.far = 2.0; @@ -186,9 +186,9 @@ define([ * // For example, get the size of a pixel of an image on a billboard. * var position = camera.position; * var direction = camera.direction; - * var toCenter = Cartesian3.subtract(primitive.boundingVolume.center, position); // vector from camera to a primitive - * var toCenterProj = Cartesian3.multiplyByScalar(direction, Cartesian3.dot(direction, toCenter)); // project vector onto camera direction vector - * var distance = Cartesian3.magnitude(toCenterProj); + * var toCenter = Cesium.Cartesian3.subtract(primitive.boundingVolume.center, position); // vector from camera to a primitive + * var toCenterProj = Cesium.Cartesian3.multiplyByScalar(direction, Cesium.Cartesian3.dot(direction, toCenter)); // project vector onto camera direction vector + * var distance = Cesium.Cartesian3.magnitude(toCenterProj); * var pixelSize = camera.frustum.getPixelSize({ * width : canvas.clientWidth, * height : canvas.clientHeight diff --git a/Source/Scene/PerspectiveOffCenterFrustum.js b/Source/Scene/PerspectiveOffCenterFrustum.js index eec2b7c44831..cabfdf3bf4d2 100644 --- a/Source/Scene/PerspectiveOffCenterFrustum.js +++ b/Source/Scene/PerspectiveOffCenterFrustum.js @@ -33,7 +33,7 @@ define([ * @see PerspectiveFrustum * * @example - * var frustum = new PerspectiveOffCenterFrustum(); + * var frustum = new Cesium.PerspectiveOffCenterFrustum(); * frustum.right = 1.0; * frustum.left = -1.0; * frustum.top = 1.0; @@ -335,10 +335,10 @@ define([ * // For example, get the size of a pixel of an image on a billboard. * var position = camera.position; * var direction = camera.direction; - * var toCenter = Cartesian3.subtract(primitive.boundingVolume.center, position); // vector from camera to a primitive - * var toCenterProj = Cartesian3.multiplyByScalar(direction, Cartesian3.dot(direction, toCenter)); // project vector onto camera direction vector - * var distance = Cartesian3.magnitude(toCenterProj); - * var pixelSize = camera.frustum.getPixelSize(new Cartesian2(canvas.clientWidth, canvas.clientHeight), distance); + * var toCenter = Cesium.Cartesian3.subtract(primitive.boundingVolume.center, position); // vector from camera to a primitive + * var toCenterProj = Cesium.Cartesian3.multiplyByScalar(direction, Cesium.Cartesian3.dot(direction, toCenter)); // project vector onto camera direction vector + * var distance = Cesium.Cartesian3.magnitude(toCenterProj); + * var pixelSize = camera.frustum.getPixelSize(new Cesium.Cartesian2(canvas.clientWidth, canvas.clientHeight), distance); */ PerspectiveOffCenterFrustum.prototype.getPixelSize = function(drawingBufferDimensions, distance, result) { update(this); diff --git a/Source/Scene/Polygon.js b/Source/Scene/Polygon.js index 4ec763f432ed..e7de344440a5 100644 --- a/Source/Scene/Polygon.js +++ b/Source/Scene/Polygon.js @@ -50,16 +50,16 @@ define([ * * @example * // Example 1 - * var polygon = new Polygon({ + * var polygon = new Cesium.Polygon({ * positions : [ - * ellipsoid.cartographicToCartesian(new Cartographic(...)), - * ellipsoid.cartographicToCartesian(new Cartographic(...)), - * ellipsoid.cartographicToCartesian(new Cartographic(...)) + * ellipsoid.cartographicToCartesian(new Cesium.Cartographic(...)), + * ellipsoid.cartographicToCartesian(new Cesium.Cartographic(...)), + * ellipsoid.cartographicToCartesian(new Cesium.Cartographic(...)) * ] * }); * * // Example 2 - * var polygon = new Polygon(); + * var polygon = new Cesium.Polygon(); * polygon.material.uniforms.color = { * red : 1.0, * green : 0.0, @@ -67,9 +67,9 @@ define([ * alpha : 1.0 * }; * polygon.setPositions([ - * ellipsoid.cartographicToCartesian(new Cartographic(...)), - * ellipsoid.cartographicToCartesian(new Cartographic(...)), - * ellipsoid.cartographicToCartesian(new Cartographic(...)) + * ellipsoid.cartographicToCartesian(new Cesium.Cartographic(...)), + * ellipsoid.cartographicToCartesian(new Cesium.Cartographic(...)), + * ellipsoid.cartographicToCartesian(new Cesium.Cartographic(...)) * ]); * * @demo Cesium Sandcastle Polygons Demo @@ -143,10 +143,10 @@ define([ * * @example * // 1. Change the color of the default material to yellow - * polygon.material.uniforms.color = new Color(1.0, 1.0, 0.0, 1.0); + * polygon.material.uniforms.color = new Cesium.Color(1.0, 1.0, 0.0, 1.0); * * // 2. Change material to horizontal stripes - * polygon.material = Material.fromType( Material.StripeType); + * polygon.material = Cesium.Material.fromType( Material.StripeType); * * @see Fabric */ @@ -228,9 +228,9 @@ define([ * * @example * polygon.setPositions([ - * ellipsoid.cartographicToCartesian(new Cartographic(...)), - * ellipsoid.cartographicToCartesian(new Cartographic(...)), - * ellipsoid.cartographicToCartesian(new Cartographic(...)) + * ellipsoid.cartographicToCartesian(new Cesium.Cartographic(...)), + * ellipsoid.cartographicToCartesian(new Cesium.Cartographic(...)), + * ellipsoid.cartographicToCartesian(new Cesium.Cartographic(...)) * ]); */ Polygon.prototype.setPositions = function(positions) { @@ -278,15 +278,15 @@ define([ * // A triangle within a triangle * var hierarchy = { * positions : [ - * new Cartesian3(-634066.5629045101, -4608738.034138676, 4348640.761750969), - * new Cartesian3(-1321523.0597310204, -5108871.981065817, 3570395.2500986718), - * new Cartesian3(46839.74837473363, -5303481.972379478, 3530933.5841716) + * new Cesium.Cartesian3(-634066.5629045101, -4608738.034138676, 4348640.761750969), + * new Cesium.Cartesian3(-1321523.0597310204, -5108871.981065817, 3570395.2500986718), + * new Cesium.Cartesian3(46839.74837473363, -5303481.972379478, 3530933.5841716) * ], * holes : [{ * positions :[ - * new Cartesian3(-646079.44483647, -4811233.11175887, 4123187.2266941597), - * new Cartesian3(-1024015.4454943262, -5072141.413164587, 3716492.6173834214), - * new Cartesian3(-234678.22583880965, -5189078.820849883, 3688809.059214336) + * new Cesium.Cartesian3(-646079.44483647, -4811233.11175887, 4123187.2266941597), + * new Cesium.Cartesian3(-1024015.4454943262, -5072141.413164587, 3716492.6173834214), + * new Cesium.Cartesian3(-234678.22583880965, -5189078.820849883, 3688809.059214336) * ] * }] * }; diff --git a/Source/Scene/Polyline.js b/Source/Scene/Polyline.js index 013a44dc55d6..617760abf563 100644 --- a/Source/Scene/Polyline.js +++ b/Source/Scene/Polyline.js @@ -150,9 +150,9 @@ define([ * @example * polyline.setPositions( * ellipsoid.cartographicArrayToCartesianArray([ - * new Cartographic3(...), - * new Cartographic3(...), - * new Cartographic3(...) + * new Cesium.Cartographic(...), + * new Cesium.Cartographic(...), + * new Cesium.Cartographic(...) * ]) * ); */ diff --git a/Source/Scene/PolylineCollection.js b/Source/Scene/PolylineCollection.js index d8d2dafc64f7..91d797fb9801 100644 --- a/Source/Scene/PolylineCollection.js +++ b/Source/Scene/PolylineCollection.js @@ -111,20 +111,20 @@ define([ * * @example * // Create a polyline collection with two polylines - * var polylines = new PolylineCollection(undefined); + * var polylines = new Cesium.PolylineCollection(undefined); * polylines.add({positions:ellipsoid.cartographicDegreesToCartesians([ - * new Cartographic2(-75.10, 39.57), - * new Cartographic2(-77.02, 38.53), - * new Cartographic2(-80.50, 35.14), - * new Cartographic2(-80.12, 25.46)]), + * new Cesium.Cartographic2(-75.10, 39.57), + * new Cesium.Cartographic2(-77.02, 38.53), + * new Cesium.Cartographic2(-80.50, 35.14), + * new Cesium.Cartographic2(-80.12, 25.46)]), * width:2 * }); * * polylines.add({positions:ellipsoid.cartographicDegreesToCartesians([ - * new Cartographic2(-73.10, 37.57), - * new Cartographic2(-75.02, 36.53), - * new Cartographic2(-78.50, 33.14), - * new Cartographic2(-78.12, 23.46)]), + * new Cesium.Cartographic2(-73.10, 37.57), + * new Cesium.Cartographic2(-75.02, 36.53), + * new Cesium.Cartographic2(-78.50, 33.14), + * new Cesium.Cartographic2(-78.12, 23.46)]), * width:4 * }); * @@ -215,8 +215,8 @@ define([ * var p = polylines.add({ * show : true, * positions : ellipsoid.cartographicDegreesToCartesians([ - * new Cartographic2(-75.10, 39.57), - * new Cartographic2(-77.02, 38.53)]), + * new Cesium.Cartographic2(-75.10, 39.57), + * new Cesium.Cartographic2(-77.02, 38.53)]), * width : 1 * }); * diff --git a/Source/Scene/PolylineColorAppearance.js b/Source/Scene/PolylineColorAppearance.js index 19d6deaae30d..f40d82d12a07 100644 --- a/Source/Scene/PolylineColorAppearance.js +++ b/Source/Scene/PolylineColorAppearance.js @@ -32,21 +32,21 @@ define([ * * @example * // A solid white line segment - * var primitive = new Primitive({ - * geometryInstances : new GeometryInstance({ - * geometry : new PolylineGeometry({ + * var primitive = new Cesium.Primitive({ + * geometryInstances : new Cesium.GeometryInstance({ + * geometry : new Cesium.PolylineGeometry({ * positions : ellipsoid.cartographicArrayToCartesianArray([ - * Cartographic.fromDegrees(0.0, 0.0), - * Cartographic.fromDegrees(5.0, 0.0) + * Cesium.Cartographic.fromDegrees(0.0, 0.0), + * Cesium.Cartographic.fromDegrees(5.0, 0.0) * ]), * width : 10.0, - * vertexFormat : PolylineColorApperance.VERTEX_FORMAT + * vertexFormat : Cesium.PolylineColorApperance.VERTEX_FORMAT * }), * attributes : { - * color : Cesium.ColorGeometryInstanceAttribute.fromColor(new Color(1.0, 1.0, 1.0, 1.0)) + * color : Cesium.ColorGeometryInstanceAttribute.fromColor(new Cesium.Color(1.0, 1.0, 1.0, 1.0)) * } * }), - * appearance : new PolylineColorAppearance({ + * appearance : new Cesium.PolylineColorAppearance({ * translucent : false * }) * })); diff --git a/Source/Scene/PolylineMaterialAppearance.js b/Source/Scene/PolylineMaterialAppearance.js index c15a53cc21e0..a085b5b82fc3 100644 --- a/Source/Scene/PolylineMaterialAppearance.js +++ b/Source/Scene/PolylineMaterialAppearance.js @@ -34,19 +34,19 @@ define([ * @param {RenderState} [options.renderState=undefined] Optional render state to override the default render state. * * @example - * var primitive = new Primitive({ - * geometryInstances : new GeometryInstance({ - * geometry : new PolylineGeometry({ + * var primitive = new Cesium.Primitive({ + * geometryInstances : new Cesium.GeometryInstance({ + * geometry : new Cesium.PolylineGeometry({ * positions : ellipsoid.cartographicArrayToCartesianArray([ - * Cartographic.fromDegrees(0.0, 0.0), - * Cartographic.fromDegrees(5.0, 0.0) + * Cesium.Cartographic.fromDegrees(0.0, 0.0), + * Cesium.Cartographic.fromDegrees(5.0, 0.0) * ]), * width : 10.0, - * vertexFormat : PolylineMaterialAppearance.VERTEX_FORMAT + * vertexFormat : Cesium.PolylineMaterialAppearance.VERTEX_FORMAT * }) * }), - * appearance : new PolylineMaterialAppearance({ - * material : Material.fromType('Color') + * appearance : new Cesium.PolylineMaterialAppearance({ + * material : Cesium.Material.fromType('Color') * }) * })); * diff --git a/Source/Scene/Primitive.js b/Source/Scene/Primitive.js index b9405ef3e962..877daa872b77 100644 --- a/Source/Scene/Primitive.js +++ b/Source/Scene/Primitive.js @@ -93,73 +93,73 @@ define([ * * @example * // 1. Draw a translucent ellipse on the surface with a checkerboard pattern - * var instance = new GeometryInstance({ - * geometry : new EllipseGeometry({ - * vertexFormat : VertexFormat.POSITION_AND_ST, + * var instance = new Cesium.GeometryInstance({ + * geometry : new Cesium.EllipseGeometry({ + * vertexFormat : Cesium.VertexFormat.POSITION_AND_ST, * ellipsoid : ellipsoid, - * center : ellipsoid.cartographicToCartesian(Cartographic.fromDegrees(-100, 20)), + * center : ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-100, 20)), * semiMinorAxis : 500000.0, * semiMajorAxis : 1000000.0, - * rotation : CesiumMath.PI_OVER_FOUR + * rotation : Cesium.Math.PI_OVER_FOUR * }), * id : 'object returned when this instance is picked and to get/set per-instance attributes' * }); - * var primitive = new Primitive({ + * var primitive = new Cesium.Primitive({ * geometryInstances : instance, - * appearance : new EllipsoidSurfaceAppearance({ - * material : Material.fromType('Checkerboard') + * appearance : new Cesium.EllipsoidSurfaceAppearance({ + * material : Cesium.Material.fromType('Checkerboard') * }) * }); * scene.getPrimitives().add(primitive); * * // 2. Draw different instances each with a unique color - * var extentInstance = new GeometryInstance({ - * geometry : new ExtentGeometry({ - * vertexFormat : VertexFormat.POSITION_AND_NORMAL, - * extent : new Extent( - * CesiumMath.toRadians(-140.0), - * CesiumMath.toRadians(30.0), - * CesiumMath.toRadians(-100.0), - * CesiumMath.toRadians(40.0)) + * var extentInstance = new Cesium.GeometryInstance({ + * geometry : new Cesium.ExtentGeometry({ + * vertexFormat : Cesium.VertexFormat.POSITION_AND_NORMAL, + * extent : new Cesium.Extent( + * Cesium.Math.toRadians(-140.0), + * Cesium.Math.toRadians(30.0), + * Cesium.Math.toRadians(-100.0), + * Cesium.Math.toRadians(40.0)) * }), * id : 'extent', * attribute : { - * color : new ColorGeometryInstanceAttribute(0.0, 1.0, 1.0, 0.5) + * color : new Cesium.ColorGeometryInstanceAttribute(0.0, 1.0, 1.0, 0.5) * } * }); - * var ellipsoidInstance = new GeometryInstance({ - * geometry : new EllipsoidGeometry({ - * vertexFormat : VertexFormat.POSITION_AND_NORMAL, - * radii : new Cartesian3(500000.0, 500000.0, 1000000.0) + * var ellipsoidInstance = new Cesium.GeometryInstance({ + * geometry : new Cesium.EllipsoidGeometry({ + * vertexFormat : Cesium.VertexFormat.POSITION_AND_NORMAL, + * radii : new Cesium.Cartesian3(500000.0, 500000.0, 1000000.0) * }), - * modelMatrix : Matrix4.multiplyByTranslation(Transforms.eastNorthUpToFixedFrame( - * ellipsoid.cartographicToCartesian(Cartographic.fromDegrees(-95.59777, 40.03883))), new Cartesian3(0.0, 0.0, 500000.0)), + * modelMatrix : Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame( + * ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-95.59777, 40.03883))), new Cesium.Cartesian3(0.0, 0.0, 500000.0)), * id : 'ellipsoid', * attribute : { - * color : ColorGeometryInstanceAttribute.fromColor(Color.AQUA) + * color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.AQUA) * } * }); - * var primitive = new Primitive({ + * var primitive = new Cesium.Primitive({ * geometryInstances : [extentInstance, ellipsoidInstance], - * appearance : new PerInstanceColorAppearance() + * appearance : new Cesium.PerInstanceColorAppearance() * }); * scene.getPrimitives().add(primitive); * * // 3. Create the geometry on the main thread. - * var primitive = new Primitive({ - * geometryInstances : new GeometryInstance({ - * geometry : EllipsoidGeometry.createGeometry(new EllipsoidGeometry({ - * vertexFormat : VertexFormat.POSITION_AND_NORMAL, - * radii : new Cartesian3(500000.0, 500000.0, 1000000.0) + * var primitive = new Cesium.Primitive({ + * geometryInstances : new Cesium.GeometryInstance({ + * geometry : Cesium.EllipsoidGeometry.createGeometry(new Cesium.EllipsoidGeometry({ + * vertexFormat : Cesium.VertexFormat.POSITION_AND_NORMAL, + * radii : new Cesium.Cartesian3(500000.0, 500000.0, 1000000.0) * })), - * modelMatrix : Matrix4.multiplyByTranslation(Transforms.eastNorthUpToFixedFrame( - * ellipsoid.cartographicToCartesian(Cartographic.fromDegrees(-95.59777, 40.03883))), new Cartesian3(0.0, 0.0, 500000.0)), + * modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame( + * ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-95.59777, 40.03883))), new Cesium.Cartesian3(0.0, 0.0, 500000.0)), * id : 'ellipsoid', * attribute : { - * color : ColorGeometryInstanceAttribute.fromColor(Color.AQUA) + * color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.AQUA) * } * }), - * appearance : new PerInstanceColorAppearance() + * appearance : new Cesium.PerInstanceColorAppearance() * }); * scene.getPrimitives().add(primitive); * @@ -210,8 +210,8 @@ define([ * * @example * var origin = ellipsoid.cartographicToCartesian( - * Cartographic.fromDegrees(-95.0, 40.0, 200000.0)); - * p.modelMatrix = Transforms.eastNorthUpToFixedFrame(origin); + * Cesium.Cartographic.fromDegrees(-95.0, 40.0, 200000.0)); + * p.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin); * * @see czm_model */ @@ -977,8 +977,8 @@ define([ * * @example * var attributes = primitive.getGeometryInstanceAttributes('an id'); - * attributes.color = ColorGeometryInstanceAttribute.toValue(Color.AQUA); - * attributes.show = ShowGeometryInstanceAttribute.toValue(true); + * attributes.color = Cesium.ColorGeometryInstanceAttribute.toValue(Cesium.Color.AQUA); + * attributes.show = Cesium.ShowGeometryInstanceAttribute.toValue(true); */ Primitive.prototype.getGeometryInstanceAttributes = function(id) { if (!defined(id)) { diff --git a/Source/Scene/RectangularPyramidSensorVolume.js b/Source/Scene/RectangularPyramidSensorVolume.js index 1443f8a87d15..eafa01210d71 100644 --- a/Source/Scene/RectangularPyramidSensorVolume.js +++ b/Source/Scene/RectangularPyramidSensorVolume.js @@ -107,8 +107,8 @@ define([ * @example * // The sensor's vertex is located on the surface at -75.59777 degrees longitude and 40.03883 degrees latitude. * // The sensor's opens upward, along the surface normal. - * var center = ellipsoid.cartographicToCartesian(Cartographic.fromDegrees(-75.59777, 40.03883)); - * sensor.modelMatrix = Transforms.eastNorthUpToFixedFrame(center); + * var center = ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-75.59777, 40.03883)); + * sensor.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center); */ this.modelMatrix = Matrix4.clone(defaultValue(options.modelMatrix, Matrix4.IDENTITY)); @@ -163,10 +163,10 @@ define([ * * @example * // 1. Change the color of the default material to yellow - * sensor.material.uniforms.color = new Color(1.0, 1.0, 0.0, 1.0); + * sensor.material.uniforms.color = new Cesium.Color(1.0, 1.0, 0.0, 1.0); * * // 2. Change material to horizontal stripes - * sensor.material = Material.fromType(Material.StripeType); + * sensor.material = Cesium.Material.fromType(Cesium.Material.StripeType); * * @see Fabric */ diff --git a/Source/Scene/Scene.js b/Source/Scene/Scene.js index 764943fca802..4580c4899d0c 100644 --- a/Source/Scene/Scene.js +++ b/Source/Scene/Scene.js @@ -103,7 +103,7 @@ define([ * * @example * // Create scene without anisotropic texture filtering - * var scene = new Scene(canvas, { + * var scene = new Cesium.Scene(canvas, { * allowTextureFilterAnisotropic : false * }); */ @@ -255,7 +255,7 @@ define([ * }; * * // Execute only the billboard's commands. That is, only draw the billboard. - * var billboards = new BillboardCollection(); + * var billboards = new Cesium.BillboardCollection(); * scene.debugCommandFilter = function(command) { * return command.owner === billboards; * }; @@ -1065,7 +1065,7 @@ define([ * @exception {DeveloperError} windowPosition is undefined. * * @example - * var pickedObjects = Scene.drillPick(new Cartesian2(100.0, 200.0)); + * var pickedObjects = Cesium.Scene.drillPick(new Cesium.Cartesian2(100.0, 200.0)); */ Scene.prototype.drillPick = function(windowPosition) { // PERFORMANCE_IDEA: This function calls each primitive's update for each pass. Instead diff --git a/Source/Scene/SceneTransforms.js b/Source/Scene/SceneTransforms.js index 90ba598d4ad3..d84019010fc1 100644 --- a/Source/Scene/SceneTransforms.js +++ b/Source/Scene/SceneTransforms.js @@ -52,7 +52,7 @@ define([ * // Output the window position of longitude/latitude (0, 0) every time the mouse moves. * var scene = widget.scene; * var ellipsoid = widget.centralBody.getEllipsoid(); - * var position = ellipsoid.cartographicToCartesian(new Cartographic(0.0, 0.0)); + * var position = ellipsoid.cartographicToCartesian(new Cesium.Cartographic(0.0, 0.0)); * var handler = new Cesium.ScreenSpaceEventHandler(scene.getCanvas()); * handler.setInputAction(function(movement) { * console.log(Cesium.SceneTransforms.wgs84ToWindowCoordinates(scene, position)); @@ -101,7 +101,7 @@ define([ * // Output the window position of longitude/latitude (0, 0) every time the mouse moves. * var scene = widget.scene; * var ellipsoid = widget.centralBody.getEllipsoid(); - * var position = ellipsoid.cartographicToCartesian(new Cartographic(0.0, 0.0)); + * var position = ellipsoid.cartographicToCartesian(new Cesium.Cartographic(0.0, 0.0)); * var handler = new Cesium.ScreenSpaceEventHandler(scene.getCanvas()); * handler.setInputAction(function(movement) { * console.log(Cesium.SceneTransforms.wgs84ToWindowCoordinates(scene, position)); diff --git a/Source/Scene/SkyAtmosphere.js b/Source/Scene/SkyAtmosphere.js index 3d360102ed0d..59bb89cd3aab 100644 --- a/Source/Scene/SkyAtmosphere.js +++ b/Source/Scene/SkyAtmosphere.js @@ -49,7 +49,7 @@ define([ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid that the atmosphere is drawn around. * * @example - * scene.skyAtmosphere = new SkyAtmosphere(); + * scene.skyAtmosphere = new Cesium.SkyAtmosphere(); * * @see Scene.skyAtmosphere */ diff --git a/Source/Scene/SkyBox.js b/Source/Scene/SkyBox.js index f1a05cad7caf..b8fc227de9df 100644 --- a/Source/Scene/SkyBox.js +++ b/Source/Scene/SkyBox.js @@ -50,7 +50,7 @@ define([ * @param {Boolean} [options.show=true] Determines if this primitive will be shown. * * @example - * scene.skyBox = new SkyBox({ + * scene.skyBox = new Cesium.SkyBox({ * sources : { * positiveX : 'skybox_px.png', * negativeX : 'skybox_nx.png', diff --git a/Source/Scene/TileMapServiceImageryProvider.js b/Source/Scene/TileMapServiceImageryProvider.js index 2abb4e05b36e..bbf8073d0ffb 100644 --- a/Source/Scene/TileMapServiceImageryProvider.js +++ b/Source/Scene/TileMapServiceImageryProvider.js @@ -61,7 +61,7 @@ define([ * * @example * // TileMapService tile provider - * var tms = new TileMapServiceImageryProvider({ + * var tms = new Cesium.TileMapServiceImageryProvider({ * url : '../images/cesium_maptiler/Cesium_Logo_Color', * fileExtension: 'png', * maximumLevel: 4, diff --git a/Source/Scene/VRTheWorldTerrainProvider.js b/Source/Scene/VRTheWorldTerrainProvider.js index 908e50ff0580..be00ae68b508 100644 --- a/Source/Scene/VRTheWorldTerrainProvider.js +++ b/Source/Scene/VRTheWorldTerrainProvider.js @@ -58,7 +58,7 @@ define([ * @see TerrainProvider * * @example - * var terrainProvider = new VRTheWorldTerrainProvider({ + * var terrainProvider = new Cesium.VRTheWorldTerrainProvider({ * url : 'http://www.vr-theworld.com/vr-theworld/tiles1.0.0/73/' * }); * centralBody.terrainProvider = terrainProvider; diff --git a/Source/Scene/ViewportQuad.js b/Source/Scene/ViewportQuad.js index 821387369c67..a121481bd7f2 100644 --- a/Source/Scene/ViewportQuad.js +++ b/Source/Scene/ViewportQuad.js @@ -47,8 +47,8 @@ define([ * @param {Material} [material] The {@link Material} defining the surface appearance of the viewport quad. * * @example - * var viewportQuad = new ViewportQuad(new BoundingRectangle(0, 0, 80, 40)); - * viewportQuad.material.uniforms.color = new Color(1.0, 0.0, 0.0, 1.0); + * var viewportQuad = new Cesium.ViewportQuad(new Cesium.BoundingRectangle(0, 0, 80, 40)); + * viewportQuad.material.uniforms.color = new Cesium.Color(1.0, 0.0, 0.0, 1.0); */ var ViewportQuad = function(rectangle, material) { @@ -76,7 +76,7 @@ define([ * @type {BoundingRectangle} * * @example - * viewportQuad.rectangle = new BoundingRectangle(0, 0, 80, 40); + * viewportQuad.rectangle = new Cesium.BoundingRectangle(0, 0, 80, 40); */ this.rectangle = BoundingRectangle.clone(rectangle); @@ -96,10 +96,10 @@ define([ * * @example * // 1. Change the color of the default material to yellow - * viewportQuad.material.uniforms.color = new Color(1.0, 1.0, 0.0, 1.0); + * viewportQuad.material.uniforms.color = new Cesium.Color(1.0, 1.0, 0.0, 1.0); * * // 2. Change material to horizontal stripes - * viewportQuad.material = Material.fromType(Material.StripeType); + * viewportQuad.material = Cesium.Material.fromType(Material.StripeType); * * @see Fabric */ diff --git a/Source/Scene/WebMapServiceImageryProvider.js b/Source/Scene/WebMapServiceImageryProvider.js index c8d68afadd2c..6a8d72c60b09 100644 --- a/Source/Scene/WebMapServiceImageryProvider.js +++ b/Source/Scene/WebMapServiceImageryProvider.js @@ -53,7 +53,7 @@ define([ * @see Cross-Origin Resource Sharing * * @example - * var provider = new WebMapServiceImageryProvider({ + * var provider = new Cesium.WebMapServiceImageryProvider({ * url: 'http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer', * layers : '0', * proxy: new Cesium.DefaultProxy('/proxy/') diff --git a/Source/Scene/createTangentSpaceDebugPrimitive.js b/Source/Scene/createTangentSpaceDebugPrimitive.js index 5a1332a64688..8367ba08b455 100644 --- a/Source/Scene/createTangentSpaceDebugPrimitive.js +++ b/Source/Scene/createTangentSpaceDebugPrimitive.js @@ -39,7 +39,7 @@ define([ * @exception {DeveloperError} options.geometry.attributes.position is required. * * @example - * scene.getPrimitives().add(createTangentSpaceDebugPrimitive({ + * scene.getPrimitives().add(Cesium.createTangentSpaceDebugPrimitive({ * geometry : instance.geometry, * length : 100000.0, * modelMatrix : instance.modelMatrix diff --git a/Source/Scene/sampleTerrain.js b/Source/Scene/sampleTerrain.js index 7b471e2966b8..9d9e64e122f2 100644 --- a/Source/Scene/sampleTerrain.js +++ b/Source/Scene/sampleTerrain.js @@ -31,15 +31,15 @@ define([ * * @example * // Query the terrain height of two Cartographic positions - * var terrainProvider = new CesiumTerrainProvider({ + * var terrainProvider = new Cesium.CesiumTerrainProvider({ * url : 'http://cesiumjs.org/smallterrain' * }); * var positions = [ - * Cartographic.fromDegrees(86.925145, 27.988257), - * Cartographic.fromDegrees(87.0, 28.0) + * Cesium.Cartographic.fromDegrees(86.925145, 27.988257), + * Cesium.Cartographic.fromDegrees(87.0, 28.0) * ]; - * var promise = sampleTerrain(terrainProvider, 11, positions); - * when(promise, function(updatedPositions) { + * var promise = Cesium.sampleTerrain(terrainProvider, 11, positions); + * Cesium.when(promise, function(updatedPositions) { * // positions[0].height and positions[1].height have been updated. * // updatedPositions is just a reference to positions. * }); diff --git a/Source/Workers/createTaskProcessorWorker.js b/Source/Workers/createTaskProcessorWorker.js index 82f599976740..29aed69c15bd 100644 --- a/Source/Workers/createTaskProcessorWorker.js +++ b/Source/Workers/createTaskProcessorWorker.js @@ -25,7 +25,7 @@ define([ * return result; * } * - * return createTaskProcessorWorker(doCalculation); + * return Cesium.createTaskProcessorWorker(doCalculation); * // the resulting function is compatible with TaskProcessor * * @see TaskProcessor