Skip to content

Commit

Permalink
Merge branch 'main' into tileset-get-height
Browse files Browse the repository at this point in the history
  • Loading branch information
ggetz committed Dec 6, 2023
2 parents c95f426 + 2a57a89 commit 91fb0c7
Show file tree
Hide file tree
Showing 33 changed files with 225 additions and 658 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,22 @@ jobs:
- uses: ./.github/actions/verify-package
- name: deploy to s3
if: ${{ env.AWS_ACCESS_KEY_ID != '' }}
run: npm run deploy-s3 -- -b "cesium-public-builds" -d cesium/$BRANCH -c 'no-cache' --confirm
run: |
aws s3 sync . s3://cesium-public-builds/cesium/$BRANCH/ \
--cache-control "no-cache" \
--exclude ".git/*" \
--exclude ".concierge/*" \
--exclude ".github/*" \
--exclude ".husky/*" \
--exclude ".vscode/*" \
--exclude "Build/Coverage/*" \
--exclude "Build/CesiumDev/*" \
--exclude "Build/Specs/e2e" \
--exclude "Documentation/*" \
--exclude "node_modules/*" \
--exclude "scripts/*" \
--exclude "Tools/*" \
--delete
- name: set status
if: ${{ env.AWS_ACCESS_KEY_ID != '' }}
run: npm run deploy-status -- --status success --message Deployed
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,10 @@ jobs:
run: npm run build-apps
- name: deploy to cesium.com
if: ${{ env.AWS_ACCESS_KEY_ID != '' }}
run: npm run deploy-s3 -- -b "cesium.com-next" -c 'public, max-age=1800' --skip --confirm
run: |
curl -LO $(curl https://api.github.com/repos/CesiumGS/cesium/releases/latest -H "Authorization: ${GITHUB_TOKEN}" | jq -r '.assets[0].browser_download_url')
unzip Cesium-$(cat package.json | jq -r '.version' | sed 's/\.0$//').zip -d Build/release/ -x "Apps"
aws s3 sync Build/release/ s3://cesium-website/cesiumjs/releases/$(cat package.json | jq -r '.version' | sed 's/\.0$//')/ --cache-control "public, max-age=1800" --delete
aws s3 sync Build/Documentation/ s3://cesium-website/cesiumjs/ref-doc/ --cache-control "public, max-age=1800" --delete
aws s3 sync Build/CesiumViewer/ s3://cesium-website/cesiumjs/cesium-viewer/ --cache-control "public, max-age=1800" --delete
aws s3 sync Build/Sandcastle/ s3://cesium-sandcastle-website/ --cache-control "public, max-age=1800" --delete
8 changes: 7 additions & 1 deletion .slackbot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,11 @@ releaseSchedule:
- ggetz, 3/1/2023
- jjhembd, 4/3/2023
- ggetz, 5/1/2023
-jjhembd, 6/1/2023
- jjhembd, 6/1/2023
- ggetz, 7/1/2023
- jjhembd, 8/1/2023
- ggetz, 9/1/2023
- jjhembd, 10/1/2023
- ggetz, 11/1/2023
- jjhembd, 12/1/2023
- ggetz, 1/2/2024
18 changes: 18 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Change Log

### 1.113 - 2024-01-02

#### @cesium/engine

##### Fixes :wrench:

- Changes the default `RequestScheduler.maximumRequestsPerServer` from 6 to 18. This should improve performance on HTTP/2 servers and above [#11627](https://github.com/CesiumGS/cesium/issues/11627)
- Corrected JSDoc and Typescript definitions that marked optional arguments as required in `ImageryProvider` constructor [#11625](https://github.com/CesiumGS/cesium/issues/11625)

### 1.112 - 2023-12-01

#### @cesium/engine

##### Fixes :wrench:

- Fixed terrain lockups in `requestTileGeometry` by ensuring promise handling aligns with CesiumJS's expectations. [#11630](https://github.com/CesiumGS/cesium/pull/11630)
- Corrected JSDoc and Typescript definitions that marked optional arguments as required in `Cesium3dTileset.fromIonAssetId` [#11623](https://github.com/CesiumGS/cesium/issues/11623), and `IonImageryProvider.fromAssetId` [#11624](https://github.com/CesiumGS/cesium/issues/11624)

### 1.111 - 2023-11-01

#### @cesium/engine
Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ Our code is our lifeblood so maintaining CesiumJS's high code quality is importa
- If this is your first contribution to CesiumJS, add your name to [CONTRIBUTORS.md](https://github.com/CesiumGS/cesium/blob/main/CONTRIBUTORS.md).
- For an overview of our workflow see [github pull request workflows](https://cesium.com/blog/2013/10/08/github-pull-request-workflows/).
- Pull request tips
- After you open a pull request, the friendly [cesium-concierge](https://github.com/CesiumGS/cesium-concierge) bot will comment with a short automated review. At least one human will also review your pull request.
- If your pull request fixes an existing issue, include a link to the issue in the description (like this: [#1](https://github.com/CesiumGS/cesium/issues/1)). Likewise, if your pull request fixes an issue reported on the Cesium forum, include a link to the thread.
- If your pull request fixes an existing issue, include a link to the issue in the description (like this: "Fixes [#1](https://github.com/CesiumGS/cesium/issues/1)"). Likewise, if your pull request fixes an issue reported on the Cesium forum, include a link to the thread.
- If your pull request needs additional work, include a [task list](https://github.com/blog/1375%0A-task-lists-in-gfm-issues-pulls-comments).
- Once you are done making new commits to address feedback, add a comment to the pull request such as `"this is ready"` since GitHub doesn't notify us about commits.
- Code and tests
Expand Down
5 changes: 5 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
- [Daniel Krupka](https://github.com/krupkad)
- [Jeshurun Hembd](https://github.com/jjhembd)
- [Mia Tang](https://github.com/miatang13)
- [Mark Dane](https://github.com/angrycat9000)
- [jjspace](https://github.com/jjspace)
- [Northrop Grumman](http://www.northropgrumman.com)
- [Joseph Stein](https://github.com/nahgrin)
- [EOX IT Services GmbH](https://eox.at)
Expand All @@ -184,6 +186,9 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
- [Robert Irving](https://github.com/robert-irving-snc)
- [General Atomics CCRi](https://www.ga-ccri.com/)
- [matthias-ccri](https://github.com/matthias-ccri)
- [Terradepth, Inc.](https://www.terradepth.com/)
- [Marc Johnson](https://github.com/marcejohnson)
- [Jacob Frazer](https://github.com/coderjake91)

## [Individual CLA](Documentation/Contributors/CLAs/individual-contributor-license-agreement-v1.0.pdf)

Expand Down
5 changes: 2 additions & 3 deletions Documentation/Contributors/BuildGuide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ Here's the full set of scripts and what they do.
- `test-webgl-validation` - Runs all tests with Karma and enables low-level WebGL validation
- `test-release` - Runs all tests on the minified release version of built Cesium
- **Deployment scripts**
- `deploy-s3` - Deploys the built CesiumJS files, the npm package, and the zip file to Amazon S3. This requires having credentials set up for the S3 bucket to which you are deploying
- `deploy-status` - Sets the deployment statuses in GitHub, for use in CI
- `deploy-set-version` - Sets the version of `package.json`, for use in CI

Expand Down Expand Up @@ -179,7 +178,7 @@ aws s3 sync ./Build/Coverage s3://cesium-public-builds/cesium/$BRANCH/Build/Cove
```

```yml
npm run deploy-s3 -- -b "cesium-public-builds" -d cesium/$BRANCH -c 'no-cache' --confirm
aws s3 sync Build/unzipped/ s3://cesium-public-builds/cesium/$BRANCH/Build/ --cache-control "no-cache" --delete
```

- In `gulpfile.js`, edit the following line:
Expand All @@ -188,7 +187,7 @@ npm run deploy-s3 -- -b "cesium-public-builds" -d cesium/$BRANCH -c 'no-cache' -
const devDeployUrl = "https://ci-builds.cesium.com/cesium/";
```

- Edit the URL to match the URL of the S3 bucket specified in the previous step.
- Edit the URL to match the URL hosting the S3 bucket specified in the previous step.

### Configure S3 Credentials

Expand Down
2 changes: 1 addition & 1 deletion Documentation/Contributors/CodeReviewGuide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This guide describes best practices for code reviewers.

- It is ultimately the responsibility of the pull request opener to get their changes merged. They should champion their code being merged and should bump the PR or `@mention` a specific developer if it is not getting the necessary attention.
- GitHub has great [tools for code reviews in pull requests](https://help.github.com/articles/using-pull-requests/#reviewing-proposed-changes) that you should become familiar with.
- We need a CLA for any contribution. If we don't have a CLA for the contributor who opened the pull request (or, more precisely, any contributor to the branch), the Cesium Concierge will ask for one. If you receive no updates, politely ask for one before reviewing the pull request ([example](https://github.com/CesiumGS/cesium/pull/2918#issuecomment-127805425)).
- We need a CLA for any contribution. If we don't have a CLA for the contributor who opened the pull request (or, more precisely, any contributor to the branch), we will ask for one. If you receive no updates, politely ask for one before reviewing the pull request ([example](https://github.com/CesiumGS/cesium/pull/2918#issuecomment-127805425)).
- Most pull requests require additional work, minor or major, before being merged. Sometime pull requests are submitted incomplete for early feedback. Include a [task list](https://github.com/blog/1375%0A-task-lists-in-gfm-issues-pulls-comments) covering the steps that must be completed before merging.
- Anyone is encouraged to review any pull request that interests them. However, someone familiar with the changed code should ultimately merge it.
- It's OK to provide a few comments without taking responsibility for the final merge, for example commenting on the state of the public API or a Sandcastle example. However, be explicit that you will not be reviewing again. This sometimes happens when a reviewer wants to take a quick look at the public API or code examples but not all the implementation details.
Expand Down
56 changes: 20 additions & 36 deletions Documentation/Contributors/CodingGuide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ A few more naming conventions are introduced below along with their design patte

## Linting

For syntax and style guidelines, we use the ESLint recommended settings (the list of rules can be found [here](http://eslint.org/docs/rules/)) as a base and extend it with additional rules via a shared config Node module, [eslint-config-cesium](https://www.npmjs.com/package/eslint-config-cesium). This package is maintained as a part of the Cesium repository and is also used throughout the Cesium ecosystem. For a list of which rules are enabled, look in [index.js](https://github.com/CesiumGS/cesium/blob/main/Tools/eslint-config-cesium/index.js), [browser.js](https://github.com/CesiumGS/eslint-config-cesium/blob/main/browser.js), and [node.js](https://github.com/CesiumGS/eslint-config-cesium/blob/main/node.js).
For syntax and style guidelines, we use the ESLint recommended settings (the list of rules can be found [here](http://eslint.org/docs/rules/)) as a base and extend it with additional rules via a shared config Node module, [eslint-config-cesium](https://www.npmjs.com/package/eslint-config-cesium). This package is maintained as a part of the Cesium repository and is also used throughout the Cesium ecosystem. For an up to date list of which rules are enabled, look in [index.js](https://github.com/CesiumGS/eslint-config-cesium/blob/main/index.js), [browser.js](https://github.com/CesiumGS/eslint-config-cesium/blob/main/browser.js), and [node.js](https://github.com/CesiumGS/eslint-config-cesium/blob/main/node.js). Below are listed some specific rules to keep in mind

**General rules:**

Expand All @@ -136,14 +136,11 @@ For syntax and style guidelines, we use the ESLint recommended settings (the lis
- [no-trailing-spaces](http://eslint.org/docs/rules/no-trailing-spaces)
- [no-lonely-if](http://eslint.org/docs/rules/no-lonely-if)
- [quotes](http://eslint.org/docs/rules/quotes) to enforce using single-quotes
- [no-sequences](http://eslint.org/docs/rules/no-sequences)
- [no-unused-expressions](http://eslint.org/docs/rules/no-unused-expressions)

**Node-specific rules:**

- [global-require](http://eslint.org/docs/rules/global-require)
- [no-buffer-constructor](http://eslint.org/docs/rules/no-buffer-constructor)
- [no-new-require](http://eslint.org/docs/rules/no-new-require)
- [n/no-new-require](https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-new-require.md)

**[Disabling Rules with Inline Comments](http://eslint.org/docs/user-guide/configuring#disabling-rules-with-inline-comments)**

Expand All @@ -169,21 +166,13 @@ try {
## Units

- Cesium uses SI units:
- meters for distances,
- radians for angles, and
- seconds for time durations.
- meters for distances
- radians for angles
- seconds for time durations
- If a function has a parameter with a non-standard unit, such as degrees, put the unit in the function name, e.g.,

```javascript
Cartesian3.fromDegrees = function (
longitude,
latitude,
height,
ellipsoid,
result
) {
/* ... */
};
Cartesian3.fromDegrees(); // Not Cartesin3.fromAngle()
```

## Basic Code Construction
Expand Down Expand Up @@ -256,7 +245,7 @@ console.log(i); // i is undefined here. Never use a variable before it is decla
let i = 0.0;
```

- A `const` variables is preferred when a value is not updated. This ensures immutability.
- A `const` variable is preferred when a value is not updated. This ensures immutability.

- :speedboat: Avoid redundant nested property access. This

Expand Down Expand Up @@ -294,31 +283,26 @@ function radiiEquals(left, right) {
```

- Use `undefined` instead of `null`.
- Test if a variable is defined using Cesium's `defined` function, e.g.,
- Test if a variable is defined using Cesium's `defined` function. It checks specifically for `undefined` and `null` values allowing _falsy_ values to be defined, e.g.,

```javascript
const v = undefined;
if (defined(v)) {
// False
}
defined(undefined); // False
defined(null); // False

const u = {};
if (defined(u)) {
// True
}
defined({}); // True
defined(""); // True
defined(0); // True
```

- Use `Object.freeze` function to create enums, e.g.,

```javascript
const ModelAnimationState = {
STOPPED: 0,
ANIMATING: 1,
};

const ModelAnimationState = {
STOPPED : 0,
ANIMATING : 1
};

return Object.freeze(ModelAnimationState);
});
return Object.freeze(ModelAnimationState);
```

- Use descriptive comments for non-obvious code, e.g.,
Expand Down Expand Up @@ -491,7 +475,7 @@ Some common sensible defaults are

### Throwing Exceptions

Use the functions of Cesium's [Check](https://github.com/CesiumGS/cesium/blob/main/Source/Core/Check.js) class to throw a `DeveloperError` when the user has a coding error. The most common errors are parameters that are missing, have the wrong type or are out of rangers of the wrong type or are out of range.
Use the functions of Cesium's [Check](https://github.com/CesiumGS/cesium/blob/main/Source/Core/Check.js) class to throw a `DeveloperError` when the user has a coding error. The most common errors are parameters that are missing, have the wrong type or are out of range.

- For example, to check that a parameter is defined and is an object:

Expand Down Expand Up @@ -681,7 +665,7 @@ Functions that start with `to` return a new type of object, e.g.,

```javascript
Cartesian3.prototype.toString = function () {
return "(${this.x}, ${this.y}, ${this.z})";
return `(${this.x}, ${this.y}, ${this.z})`;
};
```

Expand Down
11 changes: 6 additions & 5 deletions Documentation/Contributors/DocumentationGuide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Generally, just follow the patterns that are already in comparable parts of the

## Building the Doc

The reference doc is written in JavaScript code comments using [JSDoc3](http://usejsdoc.org/index.html) tags. At the command line, build the doc from the root CesiumJS directory by running the following:
The reference doc is written in JavaScript code comments using [JSDoc3](https://jsdoc.app/) tags. At the command line, build the doc from the root CesiumJS directory by running the following:

```bash
npm run build-docs
Expand All @@ -50,7 +50,7 @@ npm start

## Basics

Consider one of the simplest functions in CesiumJS, `defined`:
Consider one of the simplest functions in CesiumJS, [`defined`](../../../packages/engine/Source/Core/defined.js):

```javascript
/**
Expand All @@ -67,7 +67,7 @@ Consider one of the simplest functions in CesiumJS, `defined`:
* }
*/
function defined(value) {
return value !== undefined;
return value !== undefined && value !== null;
}
```

Expand All @@ -80,7 +80,7 @@ The above reference doc is built into the following:

![Documentation for defined](defined.jpg)

This guide describes best practices for writing doc. For complete details on JSDoc tags, see their [documentation](http://usejsdoc.org/index.html).
This guide describes best practices for writing doc. For complete details on JSDoc tags, see their [documentation](https://jsdoc.app/).

## Parameters

Expand Down Expand Up @@ -116,13 +116,14 @@ As a complete example,
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
*/
Matrix4.fromRotationTranslation = function(rotation, translation, result) {
Matrix4.fromRotationTranslation = function (rotation, translation, result) {
// ..
```
generates
![Function Documentation](fromRotationTranslation.jpg)
The CesiumJS classes in the `Type` column are links to their doc.
## `options` Parameters
Expand Down
4 changes: 2 additions & 2 deletions Documentation/Contributors/PerformanceTestingGuide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ detail will be loaded.

For performance testing, we want a reasonably detailed scene without hitting
out-of-memory problems or the test taking a long time. Decrease
`maximumScreenSpaceError` to as needed. For example:
`maximumScreenSpaceError` as needed. For example:

```js
tileset.maximumScreenSpaceError = 4;
```

### How to measure elapsed time

In the browser, measuring elapsed time is quite simple using `performance.now()`:
In the browser, measuring elapsed time is quite simple using [`performance.now()`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/now):

```js
const start = performance.now();
Expand Down
Binary file not shown.
6 changes: 2 additions & 4 deletions Specs/test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@

const assert = require("node:assert");
const {
CesiumTerrainProvider,
Cartographic,
createWorldTerrainAsync,
sampleTerrain,
} = require("cesium");

async function test() {
const provider = await CesiumTerrainProvider.fromUrl(
"https://s3.amazonaws.com/cesiumjs/smallTerrain"
);
const provider = await createWorldTerrainAsync();
const results = await sampleTerrain(provider, 11, [
Cartographic.fromDegrees(86.925145, 27.988257),
Cartographic.fromDegrees(87.0, 28.0),
Expand Down
6 changes: 2 additions & 4 deletions Specs/test.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { Cartographic, CesiumTerrainProvider, sampleTerrain } from "cesium";
import { Cartographic, createWorldTerrainAsync, sampleTerrain } from "cesium";
import assert from "node:assert";

// NodeJS smoke screen test

async function test() {
const provider = await CesiumTerrainProvider.fromUrl(
"https://s3.amazonaws.com/cesiumjs/smallTerrain"
);
const provider = await createWorldTerrainAsync();
const results = await sampleTerrain(provider, 11, [
Cartographic.fromDegrees(86.925145, 27.988257),
Cartographic.fromDegrees(87.0, 28.0),
Expand Down
2 changes: 1 addition & 1 deletion ThirdParty.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"license": [
"MIT"
],
"version": "0.19.0",
"version": "0.20.0",
"url": "https://www.npmjs.com/package/meshoptimizer"
},
{
Expand Down
Loading

0 comments on commit 91fb0c7

Please sign in to comment.