diff --git a/.gitignore b/.gitignore index ebdbdcfb19c8..8c1ca44ffb4c 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ Thumbs.db /Apps/CesiumViewer/Gallery/gallery-index.js /Apps/Sandcastle/jsHintOptions.js -/Apps/Sandcastle/.jshintrc /Apps/Sandcastle/gallery/gallery-index.js /Source/Cesium.js diff --git a/.jshintrc b/.jshintrc index 41bbea9cc9b4..9d360ee6532f 100644 --- a/.jshintrc +++ b/.jshintrc @@ -3,26 +3,26 @@ "camelcase": false, "curly": true, "eqeqeq": true, - "es3": true, "forin": true, + "freeze": true, "immed": true, - "latedef": true, + "latedef": false, "newcap": true, "noarg": true, - "noempty": false, + "noempty": true, + "nonbsp": true, "nonew": true, "plusplus": false, "quotmark": false, - "regexp": false, "undef": true, - "unused": false, + "unused": "vars", "strict": true, - "trailing": true, "asi": false, "boss": false, "debug": false, "eqnull": false, "esnext": false, + "moz": false, "evil": false, "expr": false, "funcscope": false, @@ -32,15 +32,31 @@ "laxbreak": false, "laxcomma": false, "loopfunc": false, - "moz": false, "multistr": true, + "noyield": false, + "notypeof": false, "proto": false, - "regexdash": false, "scripturl": false, - "smarttabs": false, "shadow": false, "sub": false, "supernew": false, + "validthis": false, "browser": true, - "predef": [ "JSON" ] + "browserify": false, + "couch": false, + "devel": true, + "dojo": false, + "jasmine": true, + "jquery": false, + "mocha": true, + "mootools": false, + "node": false, + "nonstandard": false, + "prototypejs": false, + "qunit": false, + "rhino": false, + "shelljs": false, + "worker": false, + "wsh": false, + "yui": false } \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 2dfa93e1b8e5..27cf02d7e417 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: node_js node_js: - - "0.10" + - "0.12" sudo: false script: - npm run jsHint && npm run release diff --git a/Apps/.jshintrc b/Apps/.jshintrc new file mode 100644 index 000000000000..24762c7dc745 --- /dev/null +++ b/Apps/.jshintrc @@ -0,0 +1,4 @@ +{ + "extends": "../.jshintrc", + "jasmine": false +} diff --git a/Apps/Sandcastle/.jshintrc b/Apps/Sandcastle/.jshintrc new file mode 100644 index 000000000000..6941e70549df --- /dev/null +++ b/Apps/Sandcastle/.jshintrc @@ -0,0 +1,12 @@ +{ + "extends": "../.jshintrc", + "jasmine": false, + "unused": false, + "predef": [ + "JSON", + "require", + "console", + "Sandcastle", + "Cesium" + ] +} diff --git a/Apps/Sandcastle/CesiumSandcastle.js b/Apps/Sandcastle/CesiumSandcastle.js index eb3522f3c92e..0365a7b5b19f 100644 --- a/Apps/Sandcastle/CesiumSandcastle.js +++ b/Apps/Sandcastle/CesiumSandcastle.js @@ -1,4 +1,4 @@ -/*global require,Blob,CodeMirror,JSHINT*/ +/*global require,Blob,JSHINT*/ /*global gallery_demos*/// defined by gallery/gallery-index.js, created by build /*global sandcastleJsHintOptions*/// defined by jsHintOptions.js, created by build require({ diff --git a/Apps/Sandcastle/gallery/Cesium Inspector.html b/Apps/Sandcastle/gallery/Cesium Inspector.html index 8c0a58ed10ca..ad804d476a55 100644 --- a/Apps/Sandcastle/gallery/Cesium Inspector.html +++ b/Apps/Sandcastle/gallery/Cesium Inspector.html @@ -35,7 +35,6 @@ var scene = viewer.scene; var globe = scene.globe; globe.depthTestAgainstTerrain = true; -var ellipsoid = globe.ellipsoid; var cesiumTerrainProviderHeightmaps = new Cesium.CesiumTerrainProvider({ url : '//assets.agi.com/stk-terrain/world', diff --git a/Apps/Sandcastle/gallery/Picking.html b/Apps/Sandcastle/gallery/Picking.html index 8655d47583ec..6616cd00b9fe 100644 --- a/Apps/Sandcastle/gallery/Picking.html +++ b/Apps/Sandcastle/gallery/Picking.html @@ -36,7 +36,6 @@ var handler; Sandcastle.addDefaultToolbarButton('Show Cartographic Position on Mouse Over', function() { - var ellipsoid = scene.globe.ellipsoid; var entity = viewer.entities.add({ label : { show : false @@ -46,9 +45,9 @@ // Mouse over the globe to see the cartographic position handler = new Cesium.ScreenSpaceEventHandler(scene.canvas); handler.setInputAction(function(movement) { - var cartesian = viewer.camera.pickEllipsoid(movement.endPosition, ellipsoid); + var cartesian = viewer.camera.pickEllipsoid(movement.endPosition, scene.globe.ellipsoid); if (cartesian) { - var cartographic = ellipsoid.cartesianToCartographic(cartesian); + var cartographic = Cesium.Cartographic.fromCartesian(cartesian); var longitudeString = Cesium.Math.toDegrees(cartographic.longitude).toFixed(2); var latitudeString = Cesium.Math.toDegrees(cartographic.latitude).toFixed(2); @@ -145,8 +144,6 @@ }); Sandcastle.addToolbarButton('Pick position', function() { - var ellipsoid = scene.globe.ellipsoid; - var modelEntity = viewer.entities.add({ name : 'milktruck', position : Cesium.Cartesian3.fromDegrees(-123.0744619, 44.0503706), @@ -174,7 +171,7 @@ var cartesian = viewer.scene.pickPosition(movement.endPosition); if (Cesium.defined(cartesian)) { - var cartographic = ellipsoid.cartesianToCartographic(cartesian); + var cartographic = Cesium.Cartographic.fromCartesian(cartesian); var longitudeString = Cesium.Math.toDegrees(cartographic.longitude).toFixed(2); var latitudeString = Cesium.Math.toDegrees(cartographic.latitude).toFixed(2); var heightString = cartographic.height.toFixed(2); diff --git a/Apps/Sandcastle/gallery/Terrain Exaggeration.html b/Apps/Sandcastle/gallery/Terrain Exaggeration.html new file mode 100644 index 000000000000..6ea88244b425 --- /dev/null +++ b/Apps/Sandcastle/gallery/Terrain Exaggeration.html @@ -0,0 +1,92 @@ + + +
+ + + + + +