Skip to content

Commit da25689

Browse files
committed
Merge remote-tracking branch 'origin/main' into DanielZ/feat/vector-3dtiles-polygon
2 parents dcf3746 + 9fda7ab commit da25689

14 files changed

Lines changed: 1479 additions & 0 deletions

File tree

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- Fixed the "Data attribution" credit link and the credit lightbox not being usable with a keyboard. Both the link and the lightbox close button are now focusable and can be activated with `Enter` or `Space`, the lightbox is exposed as a modal dialog and can be dismissed with `Escape`, and focus is moved into the lightbox when it opens and restored when it closes. [#13670](https://github.com/CesiumGS/cesium/issues/13670)
1616
- Fixed feature ID textures ignoring the wrap mode declared by the glTF sampler. Forcing nearest filtering no longer replaces `wrapS` and `wrapT` with `CLAMP_TO_EDGE`. [#11574](https://github.com/CesiumGS/cesium/issues/11574)
1717
- Fixed vertical exaggeration for models and tilesets with existing scale factors, so they now exaggerate proportionally to the rest of the scene. [#13518](https://github.com/CesiumGS/cesium/pull/13518)
18+
- Added experimental `IonSnapService` for server-side snap-to-geometry against iModel-backed Cesium ion assets, and the `SnapService` interface it implements. [#13682](https://github.com/CesiumGS/cesium/pull/13682)
1819

1920
## 1.144 - 2026-08-01
2021

packages/engine/Source/Core/IonResource.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,11 @@ function addClientHeaders(headers = {}) {
270270
return headers;
271271
}
272272

273+
/**
274+
* @private
275+
**/
276+
IonResource._addClientHeaders = addClientHeaders;
277+
273278
function retryCallback(that, error) {
274279
const ionRoot = that._ionRoot ?? that;
275280
const endpointResource = ionRoot._ionEndpointResource;
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/**
2+
* The type of geometry a snap resolved to, reported by {@link IonSnapService#snap}
3+
* as {@link IonSnapService.Result} <code>geometryType</code>. Values match the iTwin.js
4+
* {@link https://www.itwinjs.org/reference/core-frontend/locatingelements/hitgeomtype/|HitGeomType} enum.
5+
*
6+
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
7+
*
8+
* @enum {number}
9+
*/
10+
const IonSnapGeometryType = {
11+
/**
12+
* No geometry type.
13+
* @type {number}
14+
* @constant
15+
*/
16+
NONE: 0,
17+
/**
18+
* A point.
19+
* @type {number}
20+
* @constant
21+
*/
22+
POINT: 1,
23+
/**
24+
* A line segment.
25+
* @type {number}
26+
* @constant
27+
*/
28+
SEGMENT: 2,
29+
/**
30+
* A curve.
31+
* @type {number}
32+
* @constant
33+
*/
34+
CURVE: 3,
35+
/**
36+
* An arc.
37+
* @type {number}
38+
* @constant
39+
*/
40+
ARC: 4,
41+
/**
42+
* A surface.
43+
* <p>
44+
* With {@link IonSnapMode} <code>NEAREST</code>, this value indicates
45+
* the snap tracked the surface under the cursor because no edge was within
46+
* the snap aperture. This means the snap point was not pulled to an edge.
47+
* Edge snaps report one of the other types along with the edge geometry in
48+
* {@link IonSnapService.Result} <code>curve</code>, which is absent when
49+
* tracking a surface.
50+
* </p>
51+
* @type {number}
52+
* @constant
53+
*/
54+
SURFACE: 5,
55+
};
56+
57+
Object.freeze(IonSnapGeometryType);
58+
59+
export default IonSnapGeometryType;
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* How close a snap result is to the cursor, reported by {@link IonSnapService#snap}
3+
* as {@link IonSnapService.Result} <code>heat</code>. Values match the iTwin.js
4+
* {@link https://www.itwinjs.org/reference/core-frontend/locatingelements/snapheat/|SnapHeat} enum.
5+
*
6+
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
7+
*
8+
* @enum {number}
9+
*/
10+
const IonSnapHeat = {
11+
/**
12+
* The snap is not close to the cursor.
13+
* @type {number}
14+
* @constant
15+
*/
16+
NONE: 0,
17+
/**
18+
* The snap is of interest, but outside the snap aperture.
19+
* @type {number}
20+
* @constant
21+
*/
22+
NOT_IN_RANGE: 1,
23+
/**
24+
* The snap point is within the snap aperture of the close point in view space.
25+
* @type {number}
26+
* @constant
27+
*/
28+
IN_RANGE: 2,
29+
};
30+
31+
Object.freeze(IonSnapHeat);
32+
33+
export default IonSnapHeat;
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/**
2+
* The snap modes supported by {@link IonSnapService#snap}. These follow the
3+
* MicroStation snap mode semantics; see the
4+
* {@link https://docs.bentley.com/LiveContent/web/MicroStation%20Help-v27/en/GUID-77D54C0B-D6FF-13DA-5EC8-3196330F5244.html|MicroStation documentation}
5+
* for reference.
6+
*
7+
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
8+
*
9+
* @enum {number}
10+
*/
11+
const IonSnapMode = {
12+
/**
13+
* Snaps to the point on the element nearest to the cursor. When the cursor
14+
* is farther than the snap aperture from an edge, tracks the surface under
15+
* the cursor instead.
16+
* @type {number}
17+
* @constant
18+
*/
19+
NEAREST: 1,
20+
/**
21+
* Snaps to the nearest of the element's keypoints. Keypoints are defined by
22+
* the element's geometry type and the snap divisor.
23+
* <p>
24+
* On linear elements, keypoints are regularly spaced along each segment:
25+
* the number of keypoints on a segment is one greater than the snap
26+
* divisor, and a segment's midpoint is a keypoint only when the divisor is
27+
* even. The ion API does not currently accept a snap divisor, so the
28+
* server's default divisor applies.
29+
* </p>
30+
* @type {number}
31+
* @constant
32+
*/
33+
NEAREST_KEYPOINT: 2,
34+
/**
35+
* Snaps to the center of elements that have centers (such as circles and
36+
* arcs). For other elements, may snap to the centroid.
37+
* @type {number}
38+
* @constant
39+
*/
40+
CENTER: 8,
41+
};
42+
43+
Object.freeze(IonSnapMode);
44+
45+
export default IonSnapMode;
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/**
2+
* The type of the parent geometry a snap resolved to, reported by
3+
* {@link IonSnapService#snap} as {@link IonSnapService.Result} <code>parentGeometryType</code>.
4+
* Values match the iTwin.js
5+
* {@link https://www.itwinjs.org/reference/core-frontend/locatingelements/hitparentgeomtype/|HitParentGeomType} enum.
6+
*
7+
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
8+
*
9+
* @enum {number}
10+
*/
11+
const IonSnapParentGeometryType = {
12+
/**
13+
* No parent geometry type.
14+
* @type {number}
15+
* @constant
16+
*/
17+
NONE: 0,
18+
/**
19+
* A wire body.
20+
* @type {number}
21+
* @constant
22+
*/
23+
WIRE: 1,
24+
/**
25+
* A sheet body.
26+
* @type {number}
27+
* @constant
28+
*/
29+
SHEET: 2,
30+
/**
31+
* A solid body.
32+
* @type {number}
33+
* @constant
34+
*/
35+
SOLID: 3,
36+
/**
37+
* A mesh.
38+
* @type {number}
39+
* @constant
40+
*/
41+
MESH: 4,
42+
/**
43+
* Text.
44+
* @type {number}
45+
* @constant
46+
*/
47+
TEXT: 5,
48+
};
49+
50+
Object.freeze(IonSnapParentGeometryType);
51+
52+
export default IonSnapParentGeometryType;

0 commit comments

Comments
 (0)