Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into omh1280-no_else_return
Browse files Browse the repository at this point in the history
  • Loading branch information
mramato committed Jun 19, 2017
2 parents 6dfbd6f + f020d97 commit fb7d8d6
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 2 deletions.
68 changes: 68 additions & 0 deletions Apps/Sandcastle/gallery/Clock.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta name="description" content="Configure the Viewer clock.">
<meta name="cesium-sandcastle-labels" content="Beginner">
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script>
<script type="text/javascript">
require.config({
baseUrl : '../../../Source',
waitSeconds : 60
});
</script>
</head>
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html">
<style>
@import url(../templates/bucket.css);
</style>
<div id="cesiumContainer" class="fullSize"></div>
<div id="loadingOverlay"><h1>Loading...</h1></div>
<div id="toolbar"></div>
<script id="cesium_sandcastle_script">
function startup(Cesium) {
'use strict';
//Sandcastle_Begin
// Create a clock that loops on Christmas day 2013 and runs in 4000x real time.
var clock = new Cesium.Clock({
startTime : Cesium.JulianDate.fromIso8601("2013-12-25"),
currentTime : Cesium.JulianDate.fromIso8601("2013-12-25"),
stopTime : Cesium.JulianDate.fromIso8601("2013-12-26"),
clockRange : Cesium.ClockRange.LOOP_STOP, // loop when we hit the end time
clockStep : Cesium.ClockStep.SYSTEM_CLOCK_MULTIPLIER,
multiplier : 4000 // how much time to advance each tick
});

var viewer = new Cesium.Viewer('cesiumContainer', {
clockViewModel : new Cesium.ClockViewModel(clock)
});

viewer.scene.globe.enableLighting = true;

Sandcastle.addToolbarButton('Reset Current Time', function() {
var resetTime = viewer.clockViewModel.startTime;
viewer.clockViewModel.currentTime = resetTime;
viewer.timeline.updateFromClock();
});

Sandcastle.addToolbarButton('Slow Down Clock', function() {
viewer.clockViewModel.multiplier /= 2;
});

Sandcastle.addToolbarButton('Speed Up Clock', function() {
viewer.clockViewModel.multiplier *= 2;
});//Sandcastle_End
Sandcastle.finishedLoading();
}
if (typeof Cesium !== "undefined") {
startup(Cesium);
} else if (typeof require === "function") {
require(["Cesium"], startup);
}
</script>
</body>
</html>
Binary file added Apps/Sandcastle/gallery/Clock.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Change Log
* Added Sandcastle demo for ArcticDEM data. [#5224](https://github.com/AnalyticalGraphicsInc/cesium/issues/5224)
* `CzmlDataSource` and `KmlDataSource` load functions now take an optional `query` object, which will append query parameters to all network requests. [#5419](https://github.com/AnalyticalGraphicsInc/cesium/pull/5419), [#5434](https://github.com/AnalyticalGraphicsInc/cesium/pull/5434)
* Fixed geocoder bug so geocoder can accurately handle NSEW inputs [#5407] (https://github.com/AnalyticalGraphicsInc/cesium/pull/5407)
* Added a Sandcastle demo for setting time with the Clock API [#5457](https://github.com/AnalyticalGraphicsInc/cesium/pull/5457);

### 1.34 - 2017-06-01

Expand Down
2 changes: 1 addition & 1 deletion Source/DataSources/CylinderGraphics.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ define([
* Gets or sets the Property specifying the number of edges around the perimeter of the cylinder.
* @memberof CylinderGraphics.prototype
* @type {Property}
* @default 16
* @default 128
*/
slices : createPropertyDescriptor('slices'),

Expand Down
2 changes: 1 addition & 1 deletion Source/Renderer/ShaderSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ define([
// #version must be first
// defaults to #version 100 if not specified
if (defined(version)) {
result = '#version ' + version;
result = '#version ' + version + '\n';
}

if (isFragmentShader) {
Expand Down
8 changes: 8 additions & 0 deletions Specs/Renderer/ShaderSourceSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,12 @@ defineSuite([
});
}).toThrowDeveloperError();
});

it('combines #version to shader', function() {
var source = new ShaderSource({
sources : ['#version 300 es\nvoid main() {gl_FragColor = vec4(1.0); }']
});
var shaderText = source.createCombinedVertexShader();
expect(shaderText).toStartWith('#version 300 es\n');
});
});
3 changes: 3 additions & 0 deletions Tools/eslint-config-cesium/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Change Log
==========
### 2.0.0

* Enable [`no-floating-decimal`](http://eslint.org/docs/rules/no-floating-decimal)

### 1.0.0 - 2017-06-12

Expand Down
1 change: 1 addition & 0 deletions Tools/eslint-config-cesium/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module.exports = {
'no-empty': ['error'],
'no-extend-native': ['error'],
'no-extra-boolean-cast': 'off',
'no-floating-decimal': ['error'],
'no-irregular-whitespace': ['error'],
'no-new': ['error'],
'no-undef': ['error'],
Expand Down

0 comments on commit fb7d8d6

Please sign in to comment.