Skip to content

Commit

Permalink
Merge tag '1.125' into cesium.com
Browse files Browse the repository at this point in the history
1.125 release
  • Loading branch information
ggetz committed Jan 2, 2025
2 parents 7fcded2 + 0717fcf commit d2d7dea
Show file tree
Hide file tree
Showing 41 changed files with 895 additions and 253 deletions.
19 changes: 19 additions & 0 deletions .github/actions/check-for-CLA/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,22 @@ const postCommentOnPullRequest = async (hasSignedCLA, errorFoundOnCLACheck) => {
);
};

const addLabelToPullRequest = async () => {
const octokit = new Octokit();

return octokit.request(
`POST /repos/${PULL_REQUST_INFO.owner}/${PULL_REQUST_INFO.repoName}/issues/${PULL_REQUST_INFO.id}/labels`,
{
labels: ["PR - Needs Signed CLA"],
headers: {
authorization: `bearer ${PULL_REQUST_INFO.gitHubToken}`,
accept: "application/vnd.github+json",
"X-GitHub-Api-Version": "2022-11-28",
},
},
);
};

const main = async () => {
let hasSignedCLA;
let errorFoundOnCLACheck;
Expand All @@ -153,6 +169,9 @@ const main = async () => {
}

await postCommentOnPullRequest(hasSignedCLA, errorFoundOnCLACheck);
if (!hasSignedCLA) {
await addLabelToPullRequest();
}
};

main();
6 changes: 3 additions & 3 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: node index.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PULL_REQUEST_ID: ${{ github.event.number }}
PULL_REQUEST_ID: ${{ github.event.number }}
GOOGLE_KEYS: ${{ secrets.GOOGLE_KEYS }}
INDIVIDUAL_CLA_SHEET_ID: ${{ secrets.INDIVIDUAL_CLA_SHEET_ID }}
CORPORATE_CLA_SHEET_ID: ${{ secrets.CORPORATE_CLA_SHEET_ID }}
INDIVIDUAL_CLA_SHEET_ID: ${{ secrets.INDIVIDUAL_CLA_SHEET_ID }}
CORPORATE_CLA_SHEET_ID: ${{ secrets.CORPORATE_CLA_SHEET_ID }}
11 changes: 0 additions & 11 deletions .slackbot.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@
"3DTILES",
"aabb",
"Amato",
"basisu",
"bathymetric",
"bitangent",
"bitangents",
"bivariate",
"Bourke",
"brdf",
"cartesians",
"carto",
"cartographics",
"cesiumjs",
"comms",
Expand All @@ -62,6 +64,7 @@
"iife",
"lerp",
"Lilli",
"maki",
"MAXAR",
"minifiers",
"mipmapped",
Expand Down Expand Up @@ -92,6 +95,7 @@
"unregisters",
"unrenderable",
"voxel",
"VVLH",
"WEBG",
"xdescribe"
]
Expand Down
184 changes: 184 additions & 0 deletions Apps/Sandcastle/gallery/iTwin Feature Service.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
<!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="Use Viewer to start building new applications or easily embed Cesium into existing applications."
/>
<meta name="cesium-sandcastle-labels" content="Beginner, Showcases" />
<title>iTwin Feature Service</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script type="module" src="../load-cesium-es6.js"></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 id="layers"></div>
</div>
<script id="cesium_sandcastle_script">
window.startup = async function (Cesium) {
"use strict";
//Sandcastle_Begin
const serviceResponse = await fetch("https://api.cesium.com/itwin/token");
const { access_token: token } = await serviceResponse.json();

Cesium.ITwinPlatform.defaultAccessToken = token;

const iTwinId = "04ba725f-f3c0-4f30-8014-a4488cbd612d";

const viewer = new Cesium.Viewer("cesiumContainer", {
geocoder: false,
sceneModePicker: false,
homeButton: false,
timeline: false,
animation: false,
});
viewer.baseLayerPicker.viewModel.selectedImagery =
viewer.baseLayerPicker.viewModel.imageryProviderViewModels[2];

const birdsEyeView = {
destination: new Cesium.Cartesian3(
-1525359.4318772827,
6191643.528984093,
148851.5321709012,
),
orientation: new Cesium.HeadingPitchRoll(
0.16657338935967037,
-0.7943050121851765,
6.283180723449992,
),
duration: 0,
easingFunction: Cesium.EasingFunction.LINEAR_NONE,
};
viewer.scene.camera.flyTo(birdsEyeView);

// Load feature service geojson files
const points = await Cesium.ITwinData.createDataSourceForRealityDataId(
iTwinId,
"57b975f6-fd92-42ba-8014-79911ed606d1",
);
const lines = await Cesium.ITwinData.createDataSourceForRealityDataId(
iTwinId,
"1099c53f-c568-48a3-a57c-0230a6f37229",
);
const areas = await Cesium.ITwinData.createDataSourceForRealityDataId(
iTwinId,
"21eaf0d0-ab90-400f-97cf-adc455b29a78",
);

// Add some styling to the lines and points to differentiate types
const pinBuilder = new Cesium.PinBuilder();
points.entities.values.forEach(async (entity) => {
const styleByType = {
Tree: { color: Cesium.Color.GREEN, icon: "park2" },
Lamp_post: { color: Cesium.Color.WHITE, icon: "lighthouse" },
Traffic_light: { color: Cesium.Color.CRIMSON, icon: "circle-stroked" },
Arrow_Marking: { color: Cesium.Color.YELLOW, icon: "car" },
Road_Sign: { color: Cesium.Color.ORANGE, icon: "triangle" },
};
const type = entity.properties.Type?.getValue();
if (Cesium.defined(type) && Cesium.defined(styleByType[type])) {
const { color, icon } = styleByType[type];
const canvas = await pinBuilder.fromMakiIconId(icon, color, 48);
entity.billboard.image = canvas.toDataURL();
entity.billboard.verticalOrigin = Cesium.VerticalOrigin.BOTTOM;
}
});
lines.entities.values.forEach((entity) => {
const lineColorsByType = {
Contours: Cesium.Color.CRIMSON,
Lane_Marking: Cesium.Color.CYAN,
Kerb: Cesium.Color.BLUEVIOLET,
Chevron_marking: Cesium.Color.DARKORANGE,
Turning_pocket: Cesium.Color.DEEPPINK,
Yellow_Box: Cesium.Color.GOLD,
};
const type = entity.properties.Type?.getValue();
if (Cesium.defined(type) && Cesium.defined(lineColorsByType[type])) {
entity.polyline.material = lineColorsByType[type];
}
});

// add the geojsons to the viewer
viewer.dataSources.add(points);
viewer.dataSources.add(lines);
viewer.dataSources.add(areas);

// Create tileset of the reality data mesh and pointcloud
const realityMeshId = "62e4432d-621d-489a-87ff-1fc56a2b5369";
const realityMesh = await Cesium.ITwinData.createTilesetForRealityDataId(
iTwinId,
realityMeshId,
);
viewer.scene.primitives.add(realityMesh);
const pointcloudId = "ebf2ee74-f0de-4cd6-a311-19a169c55fdc";
const pointcloud = await Cesium.ITwinData.createTilesetForRealityDataId(
iTwinId,
pointcloudId,
);
// increase the size of the pointcloud points and turn on attenuation to
// make them more visible in the viewer
pointcloud.maximumScreenSpaceError = 1;
pointcloud.pointCloudShading.attenuation = true;
pointcloud.style = new Cesium.Cesium3DTileStyle({
pointSize: 5.0,
});
pointcloud.show = false;
viewer.scene.primitives.add(pointcloud);

Sandcastle.addToolbarButton(
"Toggle Points",
() => (points.show = !points.show),
"layers",
);
Sandcastle.addToolbarButton(
"Toggle Lines",
() => (lines.show = !lines.show),
"layers",
);
Sandcastle.addToolbarButton(
"Toggle Areas",
() => (areas.show = !areas.show),
"layers",
);
Sandcastle.addToolbarButton(
"Toggle Reality Mesh",
() => (realityMesh.show = !realityMesh.show),
"layers",
);
Sandcastle.addToolbarButton(
"Toggle Pointcloud",
() => (pointcloud.show = !pointcloud.show),
"layers",
);

Sandcastle.addToolbarButton("Birdseye View", () => {
viewer.scene.camera.flyTo(birdsEyeView);
});
Sandcastle.addToolbarButton("Zoom to Pointcloud", () => {
pointcloud.show = true;
viewer.zoomTo(pointcloud);
});
//Sandcastle_End
Sandcastle.finishedLoading();
};
if (typeof Cesium !== "undefined") {
window.startupCalled = true;
window.startup(Cesium).catch((error) => {
"use strict";
console.error(error);
});
}
</script>
</body>
</html>
Binary file added Apps/Sandcastle/gallery/iTwin Feature Service.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 16 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
# Change Log

### 1.125 - 2025-01-02

#### @cesium/engine

##### Additions :tada:

- Expanded integration with the [iTwin Platform](https://developer.bentley.com/) to load GeoJSON and KML data from the Reality Management API. Use `ITwinData.createDataSourceForRealityDataId` to load data as either GeoJSON or KML`. [#12344](https://github.com/CesiumGS/cesium/pull/12344)
- Added `environmentMapOptions` to `ModelGraphics`. For performance reasons by default, the environment map will not update if the entity position change. If environment map updates based on entity position are desired, provide an appropriate `environmentMapOptions.maximumPositionEpsilon` value. [#12358](https://github.com/CesiumGS/cesium/pull/12358)

##### Fixes :wrench:

- Reduced memory usage and performance bottlenecks when using environment maps with models. [#12356](https://github.com/CesiumGS/cesium/issues/12356)
- Fixed `JulianDate` to always generate valid ISO strings for fractional milliseconds. [#12345](https://github.com/CesiumGS/cesium/pull/12345)
- Fixed intermittent z-fighting issue. [#12337](https://github.com/CesiumGS/cesium/issues/12337)

### 1.124 - 2024-12-02

#### @cesium/engine

##### Additions :tada:

- Added an integration with the [iTwin Platform](https://developer.bentley.com/) to load iModels as 3D Tiles. Use `ITwinPlatform.defaultAccessToken` to set the access token. Use `ITwinData.createTilesetFromIModelId(iModelId)` to load the iModel as a `Cesium3DTileset`. [#12289](https://github.com/CesiumGS/cesium/pull/12289)
- Added an integration with the [iTwin Platform](https://developer.bentley.com/) to load Reality Data terrain meshes. Use `ITwinPlatform.defaultAccessToken` to set the access token. Then use `ITwinData.createTilesetForRealityDataId(iTwinId, dataId)` to load terrain meshes as a `Cesium3DTileset` [#12334](https://github.com/CesiumGS/cesium/pull/12334)
- Added `getSample` to `SampledProperty` to get the time of samples. [#12253](https://github.com/CesiumGS/cesium/pull/12253)
- Added `Entity.trackingReferenceFrame` property to allow tracking entities in various reference frames. [#12194](https://github.com/CesiumGS/cesium/pull/12194), [#12314](https://github.com/CesiumGS/cesium/pull/12314)
- `TrackingReferenceFrame.AUTODETECT` (default): uses either VVLH or ENU depending on entity's dynamic. Use `TrackingReferenceFrame.ENU` if your camera orientation flips abruptly from time to time.
Expand Down Expand Up @@ -89,9 +105,6 @@
- Fix flickering issue caused by bounding sphere retrieval being blocked by the bounding sphere of another entity. [#12230](https://github.com/CesiumGS/cesium/pull/12230)
- Fixed `ImageBasedLighting.imageBasedLightingFactor` not affecting lighting. [#12129](https://github.com/CesiumGS/cesium/pull/12129)
- Fix error with normalization of corner points for lines and corridors with collinear points. [#12255](https://github.com/CesiumGS/cesium/pull/12255)

##### Fixes :wrench:

- Properly handle `offset` and `scale` properties when picking metadata from property textures. [#12237](https://github.com/CesiumGS/cesium/pull/12237)

### 1.122 - 2024-10-01
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Contributors/ReleaseGuide/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release Guide

We release Cesium on the first work day of every month. [This file](../../../.slackbot.yml) outlines the release schedule and the developer responsible for each month's release.
We release Cesium on the first work day of every month. The [Release Schedule](./ReleaseSchedule.md) outlines the release schedule and the developer responsible for each month's release.

There is no release manager; instead, our community shares the responsibility. Any committer can create the release for a given month, and at any point, they can pass the responsibility to someone else, or someone else can ask for it. This spreads knowledge, avoids stratification, avoids a single point of failure, and is beautifully unstructured ([more info](https://community.cesium.com/t/cesium-releases/45)).

Expand Down
16 changes: 16 additions & 0 deletions Documentation/Contributors/ReleaseGuide/ReleaseSchedule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Release Schedule

| Date | User |
| --------- | ---------------- |
| 1/2/2025 | `@ggetz` |
| 2/3/2025 | `@jjhembd` |
| 3/3/2025 | `@lukemckinstry` |
| 4/1/2025 | `@jjspace` |
| 5/1/2025 | `@ggetz` |
| 6/2/2025 | `@jjhembd` |
| 7/1/2025 | `@lukemckinstry` |
| 8/1/2025 | `@jjspace` |
| 9/1/2025 | `@ggetz` |
| 10/1/2025 | `@jjhembd` |
| 11/3/2025 | `@lukemckinstry` |
| 12/1/2025 | `@jjspace` |
20 changes: 16 additions & 4 deletions Documentation/Contributors/TestingGuide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -441,22 +441,34 @@ In addition to testing success cases, we also test all failure cases. The custom
```javascript
it("fromDegrees throws with no latitude", function () {
expect(function () {
Cartesian3.fromDegrees(0.0);
}).toThrowDeveloperError();
Cartesian3.fromDegrees(0.0, undefined);
}).toThrowDeveloperError(
"Expected latitude to be typeof number, actual typeof was undefined",
);
});
```

Above, `Cartesian3.fromDegrees` is expected to throw a `DeveloperError` because it expects longitude and latitude arguments, and only longitude is provided.

Tips:
#### Tips

- When testing for exceptions it is recommended to test for the expected error message to verify that the test is triggering the correct error. This can be achieved either with the full error message, like above, or with a regular expression that will match the error message like this:

```javascript
it("fromDegrees throws with no latitude", function () {
expect(function () {
Cartesian3.fromDegrees(0.0, undefined);
}).toThrowDeveloperError(/Expected latitude to be/);
});
```

- When testing for exceptions, put only code that is expected to trigger the exception inside the function passed to `expect()`, in case setup code unintentionally throws an exception.
- To verify the right exception is thrown, it is often useful to comment out the `expect` call when first running the test, for example:

```javascript
it("fromDegrees throws with no latitude", function () {
// expect(function() {
Cartesian3.fromDegrees(0.0);
Cartesian3.fromDegrees(0.0, undefined);
// }).toThrowDeveloperError();
});
```
Expand Down
Loading

0 comments on commit d2d7dea

Please sign in to comment.