@thatopen/services 0.18.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/built-in/index.d.ts +58 -0
- package/dist/cli/commands/mcp.d.ts +3 -0
- package/dist/cli/lib/cli-client.d.ts +13 -0
- package/dist/cli/lib/config.d.ts +2 -0
- package/dist/cli/lib/zip.test.d.ts +1 -0
- package/dist/cli.js +21439 -424
- package/dist/cli.js.map +1 -0
- package/dist/core/client.d.ts +24 -6
- package/dist/core/examples/history.d.ts +4 -0
- package/dist/core/history.d.ts +204 -0
- package/dist/core/platform-client.d.ts +17 -1
- package/dist/core/recipes.d.ts +98 -0
- package/dist/index.cjs.js +3 -2
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +1671 -1217
- package/dist/index.es.js.map +1 -0
- package/dist/types/base.d.ts +9 -1
- package/dist/types/notifications.d.ts +4 -2
- package/docs/ai-quickstart.md +62 -7
- package/docs/cli/mcp.md +41 -0
- package/docs/cli/paths.json +4 -0
- package/docs/client/paths.json +4 -0
- package/docs/platform-token.md +1 -1
- package/package.json +4 -2
- package/src/built-in/GISManager/example.ts +29 -0
- package/src/built-in/UIManager/src/settings-panel/example.ts +4 -1
- package/src/built-in/index.ts +58 -0
- package/src/cli/templates/app/README.md +1 -1
- package/src/core/examples/history.ts +103 -0
package/README.md
CHANGED
|
@@ -32,6 +32,10 @@ To use beta engine libraries instead of the stable ones, see:
|
|
|
32
32
|
|
|
33
33
|
Once scaffolded, open `AGENTS.md` in the scaffolded project root — it has everything needed to start building.
|
|
34
34
|
|
|
35
|
+
Reading this repository without a scaffolded project (as a person or an AI agent)? The same
|
|
36
|
+
guide lives here: [`resources/AGENTS.md`](./resources/AGENTS.md), alongside
|
|
37
|
+
[`docs/ai-quickstart.md`](./docs/ai-quickstart.md) for the zero-to-running-app path.
|
|
38
|
+
|
|
35
39
|
## Beta engine libraries (Founding Members)
|
|
36
40
|
|
|
37
41
|
Founding Members get early access to the private beta engine libraries (`@thatopen-platform/*-beta`). The CLI configures access automatically — no npm account or manual token needed.
|
package/dist/built-in/index.d.ts
CHANGED
|
@@ -1650,6 +1650,64 @@ declare class _GISManager extends OBC.Component {
|
|
|
1650
1650
|
private _tilesOpacity;
|
|
1651
1651
|
private _fadeTarget;
|
|
1652
1652
|
private _fadeQuad;
|
|
1653
|
+
private _horizonTarget;
|
|
1654
|
+
private _horizonQuad;
|
|
1655
|
+
/**
|
|
1656
|
+
* Fraction (0–1) of the camera's far distance over which the 3D tiles dissolve
|
|
1657
|
+
* into what is behind them, instead of ending in a hard edge at the far plane:
|
|
1658
|
+
* the tiles are fully visible up to `far * (1 - horizonFade)` and fully
|
|
1659
|
+
* transparent at `far`. Default 0.8. `0` turns it off (opaque tiles are drawn
|
|
1660
|
+
* straight into the frame at opacity 1, as before). Combines with
|
|
1661
|
+
* `setTilesOpacity`: final alpha = opacity × fade. Deferred hosts only — where
|
|
1662
|
+
* the tiles are added to the scene directly there is no fade. Vector layers
|
|
1663
|
+
* are not faded.
|
|
1664
|
+
*/
|
|
1665
|
+
horizonFade: number;
|
|
1666
|
+
private readonly _far;
|
|
1667
|
+
private _farCameras;
|
|
1668
|
+
/**
|
|
1669
|
+
* Far plane (distance) the world's cameras get while the 3D tiles are loaded, so
|
|
1670
|
+
* the map reaches the horizon. Default `10000`. Changing it while the map is
|
|
1671
|
+
* loaded takes effect immediately. `horizonFade` is a fraction of this far while
|
|
1672
|
+
* the map is loaded (with `0.8`, the map fades from 2 km to 10 km).
|
|
1673
|
+
*
|
|
1674
|
+
* The camera's own far plane (e.g. the Settings panel's "Far plane") is
|
|
1675
|
+
* overridden while the map is loaded: it is remembered, not applied, and comes
|
|
1676
|
+
* back when the map is unloaded. Code that grows the far plane itself while the
|
|
1677
|
+
* map is loaded still works: a larger far than `mapFar` is left alone, and is
|
|
1678
|
+
* kept on unload.
|
|
1679
|
+
*/
|
|
1680
|
+
get mapFar(): number;
|
|
1681
|
+
set mapFar(far: number);
|
|
1682
|
+
/** True while the map owns the cameras' far plane (the 3D tiles are loaded). */
|
|
1683
|
+
get farOverridden(): boolean;
|
|
1684
|
+
/** The far plane the user asked for, remembered while `farOverridden` (otherwise the cameras hold it). */
|
|
1685
|
+
get userCameraFar(): number;
|
|
1686
|
+
/** Records the far plane the user wants; not applied until the map is unloaded. Only meaningful while `farOverridden`. */
|
|
1687
|
+
setUserCameraFar(far: number): void;
|
|
1688
|
+
private _resolveFarCameras;
|
|
1689
|
+
/**
|
|
1690
|
+
* Shows a sky gradient behind everything while the 3D tiles are loaded: the
|
|
1691
|
+
* empty background (pixels nothing has drawn to) goes from `skyHorizonColor` at
|
|
1692
|
+
* the horizon to `skyZenithColor` straight up, so the tiles, dissolving with
|
|
1693
|
+
* `horizonFade`, melt into the horizon colour. Below the horizon it is the
|
|
1694
|
+
* horizon colour; an orthographic camera sees one flat colour. Default `true`;
|
|
1695
|
+
* `false` leaves the background untouched. Deferred hosts only — elsewhere
|
|
1696
|
+
* there is no sky. Drawn behind the vector layers and the tiles.
|
|
1697
|
+
*/
|
|
1698
|
+
sky: boolean;
|
|
1699
|
+
private readonly _skyHorizon;
|
|
1700
|
+
private readonly _skyZenith;
|
|
1701
|
+
private _skyHorizonColor;
|
|
1702
|
+
private _skyZenithColor;
|
|
1703
|
+
private _skyPass;
|
|
1704
|
+
private static _setSkyRgb;
|
|
1705
|
+
/** Sky colour at the horizon (any CSS colour string, hex number or `THREE.Color`). Default `"#d7e3ee"`, a light hazy blue. */
|
|
1706
|
+
get skyHorizonColor(): THREE.ColorRepresentation;
|
|
1707
|
+
set skyHorizonColor(color: THREE.ColorRepresentation);
|
|
1708
|
+
/** Sky colour straight up. Default `"#6a9bd1"`, a deeper blue. */
|
|
1709
|
+
get skyZenithColor(): THREE.ColorRepresentation;
|
|
1710
|
+
set skyZenithColor(color: THREE.ColorRepresentation);
|
|
1653
1711
|
private _passRegistered;
|
|
1654
1712
|
private _ensureOcclusionPass;
|
|
1655
1713
|
private readonly _occlusion;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EngineServicesClient } from '../../core/client';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The one way the CLI builds a client.
|
|
5
|
+
*
|
|
6
|
+
* Every CLI client sends its platform token as `Authorization: Bearer`
|
|
7
|
+
* instead of `?accessToken=`. The CLI holds long-lived API tokens, and the
|
|
8
|
+
* query form reproduces them in proxy logs, error bodies and anything a user
|
|
9
|
+
* pastes while asking for help. Requires a backend that accepts bearer
|
|
10
|
+
* platform tokens (deployed 2026-10); older backends answer 401, in which
|
|
11
|
+
* case upgrading the platform comes first, not flipping this off.
|
|
12
|
+
*/
|
|
13
|
+
export declare function cliClient(accessToken: string, apiUrl: string): EngineServicesClient;
|
package/dist/cli/lib/config.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ export interface ThatOpenLocalConfig {
|
|
|
15
15
|
itemType?: ProjectType;
|
|
16
16
|
/** Path to an icon file (PNG, WebP, or ICO) uploaded on publish. */
|
|
17
17
|
iconPath?: string;
|
|
18
|
+
/** Project the first publish lands the app/component in (see `--project-id`). */
|
|
19
|
+
projectId?: string;
|
|
18
20
|
/** Whether this project uses beta engine libraries (@thatopen-platform/*-beta). */
|
|
19
21
|
beta?: boolean;
|
|
20
22
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|