Skip to content

Commit

Permalink
Merge pull request CesiumGS#1 from CesiumGS/master
Browse files Browse the repository at this point in the history
merge
  • Loading branch information
ligaofeng0901 committed Mar 3, 2021
2 parents 4318b83 + 71340cc commit 199424c
Show file tree
Hide file tree
Showing 139 changed files with 9,462 additions and 14,479 deletions.
2 changes: 2 additions & 0 deletions .concierge/templates/pullRequestOpened.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ Thanks for the pull request @{{ userName }}!
{{#if errorCla}}
* :grey_exclamation: There was an error checking the CLA! If this is your first contribution, please send in a [Contributor License Agreement](https://github.com/CesiumGS/cesium/blob/master/CONTRIBUTING.md#contributor-license-agreement-cla).
* Maintainers, this was the error I ran into while attempting to process the CLA check. Please resolve it to continue CLA checking.
* You'll need to [manually check for a submitted CLA](https://github.com/CesiumGS/cesium/blob/master/Documentation/Contributors/CLAs/README.md)
```
{{ errorCla }}
```
{{else}}
{{#if askForCla}}
* :x: Missing CLA.
* Please send in a [Contributor License Agreement](https://github.com/CesiumGS/cesium/blob/master/CONTRIBUTING.md#contributor-license-agreement-cla) (CLA) and comment back here to let us know to check this!
* Maintainers, [here's how to check](https://github.com/CesiumGS/cesium/blob/master/Documentation/Contributors/CLAs/README.md) for a submitted CLA.
{{else}}
* :heavy_check_mark: Signed CLA found.
{{/if}}
Expand Down
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ Apps/Sandcastle/jsHintOptions.js
Apps/Sandcastle/gallery/gallery-index.js
Source/Core/buildModuleUrl.js
Specs/spec-main.js
index.release.html
27 changes: 9 additions & 18 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
{
"extends": ["./Tools/eslint-config-cesium/browser.js", "prettier"],
"plugins": [
"html"
"extends": [
"./Tools/eslint-config-cesium/node.js",
"prettier"
],
"rules": {
"no-unused-vars": ["error", {"vars": "all", "args": "none"}]
"env": {
"node": true,
"es6": true
},
"overrides": [
{
"files": [
"index.cjs",
"server.cjs",
"gulpfile.js",
"Source/Workers/transferTypedArrayTest.js"
],
"parserOptions": {
"sourceType": "script"
}
}
]
"parserOptions": {
"ecmaVersion": 2019
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ yarn.lock
# WebStorm user-specific
.idea/workspace.xml
.idea/tasks.xml
.idea/shelf
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/Cesium-*.zip
/Documentation
/favicon.ico
/gulpfile.js
/gulpfile.cjs
/index.html
/index.release.html
/launches
Expand Down
22 changes: 12 additions & 10 deletions .slackbot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# List of Slack usernames (not GitHub) for the Cesium Concierge Slackbot to send release reminders for.
releaseSchedule:
mamato: 3/2/2020
oshehata: 4/1/2020
lilleyse: 5/1/2020
ian: 6/1/2020
sam.suhag: 7/1/2020
sam.vargas: 8/3/2020
kevin: 9/1/2020
mamato: 10/1/2020
oshehata: 11/2/2020
lilleyse: 12/1/2020
- gary, 1/4/2021
- ian, 2/1/2021
- kevin, 3/1/2021
- sam.vargas, 4/1/2021
- mamato, 5/3/2021
- oshehata, 6/1/2021
- bao, 7/1/2021
- lilleyse, 8/2/2021
- sam.suhag, 9/1/2021
- peter, 10/1/2021
- eli, 11/1/2021
- erixen, 12/1/2021
3 changes: 3 additions & 0 deletions Apps/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../Source/.eslintrc.json"
}
Binary file not shown.
Binary file modified Apps/SampleData/models/GroundVehicle/GroundVehicle.glb
Binary file not shown.
2 changes: 1 addition & 1 deletion Apps/Sandcastle/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../.eslintrc.json",
"extends": "../.eslintrc.json",
"env": {
"amd": true
},
Expand Down
189 changes: 78 additions & 111 deletions Apps/Sandcastle/CesiumSandcastle.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ require({
"dojo/promise/all",
"dojo/query",
"dojo/when",
"dojo/Deferred",
"dojo/request/script",
"Sandcastle/LinkButton",
"ThirdParty/clipboard.min",
Expand Down Expand Up @@ -94,7 +93,6 @@ require({
all,
query,
when,
Deferred,
dojoscript,
LinkButton,
ClipboardJS,
Expand Down Expand Up @@ -853,51 +851,45 @@ require({
var parser = new DOMParser();
var doc = parser.parseFromString(demo.code, "text/html");

return waitForDoc(doc, function () {
return doc.querySelector('script[id="cesium_sandcastle_script"]');
}).then(function () {
var script = doc.querySelector(
'script[id="cesium_sandcastle_script"]'
var script = doc.querySelector('script[id="cesium_sandcastle_script"]');
if (!script) {
appendConsole(
"consoleError",
"Error reading source file: " + demo.name,
true
);
if (!script) {
appendConsole(
"consoleError",
"Error reading source file: " + demo.name,
true
);
return;
}
return;
}

var scriptMatch = scriptCodeRegex.exec(script.textContent);
if (!scriptMatch) {
appendConsole(
"consoleError",
"Error reading source file: " + demo.name,
true
);
return;
}
var scriptMatch = scriptCodeRegex.exec(script.textContent);
if (!scriptMatch) {
appendConsole(
"consoleError",
"Error reading source file: " + demo.name,
true
);
return;
}

var scriptCode = scriptMatch[1];
scriptCode = scriptCode.replace(/^ {8}/gm, ""); //Account for Prettier spacing
var scriptCode = scriptMatch[1];
scriptCode = scriptCode.replace(/^ {8}/gm, ""); //Account for Prettier spacing

var htmlText = "";
var childIndex = 0;
var childNode = doc.body.childNodes[childIndex];
while (
childIndex < doc.body.childNodes.length &&
childNode !== script
) {
htmlText +=
childNode.nodeType === 1
? childNode.outerHTML
: childNode.nodeValue;
childNode = doc.body.childNodes[++childIndex];
}
htmlText = htmlText.replace(/^\s+/, "");
var htmlText = "";
var childIndex = 0;
var childNode = doc.body.childNodes[childIndex];
while (
childIndex < doc.body.childNodes.length &&
childNode !== script
) {
htmlText +=
childNode.nodeType === 1
? childNode.outerHTML
: childNode.nodeValue;
childNode = doc.body.childNodes[++childIndex];
}
htmlText = htmlText.replace(/^\s+/, "");

applyLoadedDemo(scriptCode, htmlText);
});
applyLoadedDemo(scriptCode, htmlText);
}
});
}
Expand Down Expand Up @@ -1232,82 +1224,57 @@ require({
});
}

// Work around Chrome 79 bug: https://github.com/CesiumGS/cesium/issues/8460
function waitForDoc(doc, test) {
var deferred = new Deferred();
if (test()) {
deferred.resolve(doc);
} else {
var counter = 1;
setTimeout(function () {
if (test() || counter++ > 10) {
deferred.resolve(doc);
}
}, 100 * counter);
}
return deferred.promise;
}

var newInLabel = "New in " + VERSION;
function loadDemoFromFile(demo) {
return requestDemo(demo.name)
.then(function (value) {
// Store the file contents for later searching.
demo.code = value;
return requestDemo(demo.name).then(function (value) {
// Store the file contents for later searching.
demo.code = value;

var parser = new DOMParser();
var doc = parser.parseFromString(value, "text/html");
return waitForDoc(doc, function () {
return doc.body.getAttribute("data-sandcastle-bucket");
});
})
.then(function (doc) {
var bucket = doc.body.getAttribute("data-sandcastle-bucket");
demo.bucket = bucket ? bucket : "bucket-requirejs.html";

var descriptionMeta = doc.querySelector('meta[name="description"]');
var description =
descriptionMeta && descriptionMeta.getAttribute("content");
demo.description = description ? description : "";

var labelsMeta = doc.querySelector(
'meta[name="cesium-sandcastle-labels"]'
);
var labels = labelsMeta && labelsMeta.getAttribute("content");
if (demo.isNew) {
demo.label = labels ? labels + "," + newInLabel : newInLabel;
} else {
demo.label = labels ? labels : "";
}
var parser = new DOMParser();
var doc = parser.parseFromString(value, "text/html");

// Select the demo to load upon opening based on the query parameter.
if (defined(queryObject.src)) {
if (demo.name === queryObject.src.replace(".html", "")) {
loadFromGallery(demo).then(function () {
window.history.replaceState(
demo,
demo.name,
getPushStateUrl(demo)
);
if (defined(queryObject.gist)) {
document.title = "Gist Import - Cesium Sandcastle";
} else {
document.title = demo.name + " - Cesium Sandcastle";
}
});
}
}
var bucket = doc.body.getAttribute("data-sandcastle-bucket");
demo.bucket = bucket ? bucket : "bucket-requirejs.html";

// Create a tooltip containing the demo's description.
demoTooltips[demo.name] = new TooltipDialog({
id: demo.name + "TooltipDialog",
style: "width: 200px; font-size: 12px;",
content: demo.description.replace(/\\n/g, "<br/>"),
});
var descriptionMeta = doc.querySelector('meta[name="description"]');
var description =
descriptionMeta && descriptionMeta.getAttribute("content");
demo.description = description ? description : "";

addFileToTab(demo);
return demo;
var labelsMeta = doc.querySelector(
'meta[name="cesium-sandcastle-labels"]'
);
var labels = labelsMeta && labelsMeta.getAttribute("content");
if (demo.isNew) {
demo.label = labels ? labels + "," + newInLabel : newInLabel;
} else {
demo.label = labels ? labels : "";
}

// Select the demo to load upon opening based on the query parameter.
if (defined(queryObject.src)) {
if (demo.name === queryObject.src.replace(".html", "")) {
loadFromGallery(demo).then(function () {
window.history.replaceState(demo, demo.name, getPushStateUrl(demo));
if (defined(queryObject.gist)) {
document.title = "Gist Import - Cesium Sandcastle";
} else {
document.title = demo.name + " - Cesium Sandcastle";
}
});
}
}

// Create a tooltip containing the demo's description.
demoTooltips[demo.name] = new TooltipDialog({
id: demo.name + "TooltipDialog",
style: "width: 200px; font-size: 12px;",
content: demo.description.replace(/\\n/g, "<br/>"),
});

addFileToTab(demo);
return demo;
});
}

var loading = true;
Expand Down
9 changes: 9 additions & 0 deletions Apps/Sandcastle/gallery/3D Models.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@
);
},
},
{
text: "Drone",
onselect: function () {
createModel(
"../../SampleData/models/CesiumDrone/CesiumDrone.glb",
150.0
);
},
},
{
text: "Ground Vehicle",
onselect: function () {
Expand Down
1 change: 0 additions & 1 deletion Apps/Sandcastle/gallery/3D Tiles Clipping Planes.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
var viewer = new Cesium.Viewer("cesiumContainer", {
infoBox: false,
selectionIndicator: false,
terrainProvider: Cesium.createWorldTerrain(),
});
var scene = viewer.scene;

Expand Down
Loading

0 comments on commit 199424c

Please sign in to comment.