Skip to content

Commit

Permalink
[itowns] release 2.43.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Desplandis committed Apr 24, 2024
1 parent b8d1466 commit f41678e
Show file tree
Hide file tree
Showing 13 changed files with 69 additions and 40 deletions.
3 changes: 2 additions & 1 deletion types/itowns/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"private": true,
"name": "@types/itowns",
"version": "2.42.9999",
"version": "2.43.9999",
"projects": [
"https://itowns.github.io/"
],
"type": "module",
"dependencies": {
"@types/three": "*"
},
Expand Down
2 changes: 2 additions & 0 deletions types/itowns/src/Core/View.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export default class View extends THREE.EventDispatcher<THREE.Event> {
// controls?: any; // TODO: References in dispose
// tileLayer: any; // TODO: References in readDepthBuffer

render: () => void;

get renderer(): THREE.WebGLRenderer;
get camera3D(): THREE.Camera;

Expand Down
2 changes: 2 additions & 0 deletions types/itowns/src/Layer/EntwinePointTileLayer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import Extent from "../Core/Geographic/Extent";
import PointCloudLayer, { PointCloudLayerOptions } from "./PointCloudLayer";

export interface EntwinePointTileLayerOptions extends PointCloudLayerOptions {}

declare class EntwinePointTileLayer extends PointCloudLayer {
constructor(id: string, config: PointCloudLayerOptions);

Expand Down
2 changes: 2 additions & 0 deletions types/itowns/src/Layer/GeoidLayer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import Layer, { LayerOptions } from "./Layer";

export function geoidLayerIsVisible(tilelayer: any): boolean;

export interface GeoidLayerOptions extends LayerOptions {}

// TODO: Define public API
declare class GeoidLayer extends Layer {
constructor(id: string, config?: LayerOptions);
Expand Down
2 changes: 1 addition & 1 deletion types/itowns/src/Layer/LabelLayer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Extent from "../Core/Geographic/Extent";
import Label from "../Core/Label";
import GeometryLayer from "./GeometryLayer";

type LabelLayerOptions = any;
export type LabelLayerOptions = any;

// TODO: Define public API
declare class LabelLayer extends GeometryLayer {
Expand Down
5 changes: 5 additions & 0 deletions types/itowns/src/Layer/PointCloudLayer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ interface PointCloudLayer {
mode: PNTS_MODE;
minIntensityRange: number;
maxIntensityRange: number;
minElevationRange?: number;
maxElevationRange?: number;
minAngleRange?: number;
maxAngleRange?: number;

}

export type PointCloudLayerOptions = Partial<PointCloudLayer> & GeometryLayerOptions; // TODO: check output type
Expand Down
4 changes: 3 additions & 1 deletion types/itowns/src/Layer/PotreeLayer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import PointCloudLayer, { PointCloudLayerOptions } from "./PointCloudLayer";
// import PotreeNode from "../Core/PotreeNode";
import Extent from "../Core/Geographic/Extent";

export interface PotreeLayerOptions extends PointCloudLayerOptions {}

declare class PotreeLayer extends PointCloudLayer {
constructor(id: string, config: PointCloudLayerOptions);
constructor(id: string, config: PotreeLayerOptions);

readonly isPotreeLayer: boolean;

Expand Down
3 changes: 3 additions & 0 deletions types/itowns/src/Layer/TiledGeometryLayer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ declare class TiledGeometryLayer extends GeometryLayer {
level0Nodes: any[];
colorLayersOrder?: any[];

get hideSkirt(): boolean;
set hideSkirt(value: boolean);

preUpdate(
context: object,
sources: Set</* GeometryLayer | TileMesh */ any>,
Expand Down
57 changes: 29 additions & 28 deletions types/itowns/src/Main.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ export { default as StreetControls } from "./Controls/StreetControls";
export { default as Feature2Mesh } from "./Converter/Feature2Mesh";
export { MAIN_LOOP_EVENTS } from "./Core/MainLoop";
export { default as Ellipsoid, ellipsoidSizes } from "./Core/Math/Ellipsoid";
export { default as GlobeView, GLOBE_VIEW_EVENTS } from "./Core/Prefab/GlobeView";
export { default as PlanarView } from "./Core/Prefab/PlanarView";
export { default as GlobeView, GLOBE_VIEW_EVENTS, GlobeViewOptions } from "./Core/Prefab/GlobeView";
export { default as PlanarView, PlanarViewOptions } from "./Core/Prefab/PlanarView";
export { default as Capabilities } from "./Core/System/Capabilities";
export { default as View } from "./Core/View";
export { default as View, ViewOptions } from "./Core/View";
export { VIEW_EVENTS } from "./Core/View";
export { default as FeatureProcessing } from "./Process/FeatureProcessing";
export {
Expand All @@ -36,6 +36,7 @@ export {
PNTS_MODE,
PNTS_SHAPE,
PNTS_SIZE_MODE,
PointsMaterialOptions,
} from "./Renderer/PointsMaterial";
export { default as ShaderChunk } from "./Renderer/Shader/ShaderChunk";
export { default as CameraUtils } from "./Utils/CameraUtils";
Expand All @@ -51,44 +52,44 @@ export { default as Style } from "./Core/Style";
// Layers provided by default in iTowns
// A custom layer should at least implements Layer
// See http://www.itowns-project.org/itowns/docs/#api/Layer/Layer
export { default as GlobeLayer } from "./Core/Prefab/Globe/GlobeLayer";
export { default as PlanarLayer } from "./Core/Prefab/Planar/PlanarLayer";
export { default as GlobeLayer, GlobeLayerOptions } from "./Core/Prefab/Globe/GlobeLayer";
export { default as PlanarLayer, PlanarLayerOptions } from "./Core/Prefab/Planar/PlanarLayer";
export { C3DTILES_LAYER_EVENTS, default as C3DTilesLayer } from "./Layer/C3DTilesLayer";
export { default as ColorLayer } from "./Layer/ColorLayer";
export { default as ElevationLayer } from "./Layer/ElevationLayer";
export { default as EntwinePointTileLayer } from "./Layer/EntwinePointTileLayer";
export { default as FeatureGeometryLayer } from "./Layer/FeatureGeometryLayer";
export { default as GeoidLayer } from "./Layer/GeoidLayer";
export { default as GeometryLayer } from "./Layer/GeometryLayer";
export { default as LabelLayer } from "./Layer/LabelLayer";
export { default as Layer, ImageryLayers } from "./Layer/Layer";
export { default as ColorLayer, ColorLayerOptions } from "./Layer/ColorLayer";
export { default as ElevationLayer, ElevationLayerOptions } from "./Layer/ElevationLayer";
export { default as EntwinePointTileLayer, EntwinePointTileLayerOptions } from "./Layer/EntwinePointTileLayer";
export { default as FeatureGeometryLayer, FeatureGeometryLayerOptions } from "./Layer/FeatureGeometryLayer";
export { default as GeoidLayer, GeoidLayerOptions } from "./Layer/GeoidLayer";
export { default as GeometryLayer, GeometryLayerOptions } from "./Layer/GeometryLayer";
export { default as LabelLayer, LabelLayerOptions } from "./Layer/LabelLayer";
export { default as Layer, ImageryLayers, LayerOptions } from "./Layer/Layer";
export {
STRATEGY_DICHOTOMY,
STRATEGY_GROUP,
STRATEGY_MIN_NETWORK_TRAFFIC,
STRATEGY_PROGRESSIVE,
} from "./Layer/LayerUpdateStrategy";
export { default as OrientedImageLayer } from "./Layer/OrientedImageLayer";
export { default as PointCloudLayer } from "./Layer/PointCloudLayer";
export { default as PotreeLayer } from "./Layer/PotreeLayer";
export { default as TiledGeometryLayer } from "./Layer/TiledGeometryLayer";
export { default as OrientedImageLayer, OrientedImageLayerOptions } from "./Layer/OrientedImageLayer";
export { default as PointCloudLayer, PointCloudLayerOptions } from "./Layer/PointCloudLayer";
export { default as PotreeLayer, PotreeLayerOptions } from "./Layer/PotreeLayer";
export { default as TiledGeometryLayer, TiledGeometryLayerOptions } from "./Layer/TiledGeometryLayer";
export { default as ColorLayersOrdering } from "./Renderer/ColorLayersOrdering";

// Sources provided by default in iTowns
// A custom source should at least implements Source
// See http://www.itowns-project.org/itowns/docs/#api/Source/Source
export { default as C3DTilesIonSource } from "./Source/C3DTilesIonSource";
export { default as C3DTilesSource } from "./Source/C3DTilesSource";
export { default as EntwinePointTileSource } from "./Source/EntwinePointTileSource";
export { default as FileSource } from "./Source/FileSource";
export { default as C3DTilesIonSource, C3DTilesIonSourceOptions } from "./Source/C3DTilesIonSource";
export { default as C3DTilesSource, C3DTilesSourceOptions } from "./Source/C3DTilesSource";
export { default as EntwinePointTileSource, EntwinePointTileSourceOptions } from "./Source/EntwinePointTileSource";
export { default as FileSource, FileSourceOptions } from "./Source/FileSource";
export { default as OrientedImageSource } from "./Source/OrientedImageSource";
export { default as PotreeSource } from "./Source/PotreeSource";
export { default as Source } from "./Source/Source";
export { default as TMSSource } from "./Source/TMSSource";
export { default as VectorTilesSource } from "./Source/VectorTilesSource";
export { default as WFSSource } from "./Source/WFSSource";
export { default as WMSSource } from "./Source/WMSSource";
export { default as WMTSSource } from "./Source/WMTSSource";
export { default as PotreeSource, PotreeSourceOptions } from "./Source/PotreeSource";
export { default as Source, SourceOptions } from "./Source/Source";
export { default as TMSSource, TMSSourceOptions } from "./Source/TMSSource";
export { default as VectorTilesSource, VectorTilesSourceOptions } from "./Source/VectorTilesSource";
export { default as WFSSource, WFSSourceOptions } from "./Source/WFSSource";
export { default as WMSSource, WMSSourceOptions } from "./Source/WMSSource";
export { default as WMTSSource, WMTSSourceOptions } from "./Source/WMTSSource";

// Parsers provided by default in iTowns
// Custom parser can be implemented as wanted, as long as the main function
Expand Down
6 changes: 4 additions & 2 deletions types/itowns/src/Renderer/Camera.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import * as THREE from "three";
import Coordinates from "../Core/Geographic/Coordinates";

type CameraLike = THREE.OrthographicCamera | THREE.PerspectiveCamera;

export type CameraOptions =
| { cameraThree: THREE.Camera }
| { cameraThree: CameraLike }
| { type: CAMERA_TYPE };

export enum CAMERA_TYPE {
Expand All @@ -25,7 +27,7 @@ declare class Camera {
);

crs: string;
camera3D: THREE.Camera; // TODO: type wizardry =P
camera3D: CameraLike; // TODO: type wizardry =P
width: number;
height: number;

Expand Down
10 changes: 9 additions & 1 deletion types/itowns/src/Renderer/PointsMaterial.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ export enum PNTS_MODE {
COLOR = 0,
INTENSITY = 1,
CLASSIFICATION = 2,
NORMAL = 3,
ELEVATION = 3,
RETURN_NUMBER = 4,
RETURN_TYPE = 5,
RETURN_COUNT = 6,
POINT_SOURCE_ID = 7,
SCAN_ANGLE = 8,
NORMAL = 9,
}

export enum PNTS_SHAPE {
Expand Down Expand Up @@ -55,6 +61,8 @@ declare class PointsMaterial extends THREE.RawShaderMaterial {
sizeMode: PNTS_SIZE_MODE;
classification: Classification;
intensityRange: THREE.Vector2;
elevationRange: THREE.Vector2;
angleRange: THREE.Vector2;
picking: boolean;
overlayColor: THREE.Vector4;
applyOpacityClassication: boolean;
Expand Down
10 changes: 6 additions & 4 deletions types/itowns/src/Source/EntwinePointTileSource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import * as THREE from "three";
import Extent from "../Core/Geographic/Extent";
import Source, { SourceOptions } from "./Source";

interface EntwinePointTileSourceOptions extends SourceOptions {
colorDepth?: 8 | 16 | "auto";
type ColorDepth = 8 | 16;

export interface EntwinePointTileSourceOptions extends SourceOptions {
colorDepth?: ColorDepth;
}

interface ParsingOptionsLAS {
in?: {
colorDepth?: 8 | 16 | "auto";
colorDepth?: ColorDepth;
};
out?: {
skip?: number;
Expand All @@ -28,7 +30,7 @@ declare class EntwinePointTileSource extends Source {

readonly isEntwinePointTileSource: boolean;

colorDepth?: 8 | 16 | "auto";
colorDepth?: ColorDepth;
extension: "laz" | "bin";
spacing: number;
boundsConforming: [number, number, number, number, number, number];
Expand Down
3 changes: 1 addition & 2 deletions types/itowns/test/3DTiles25D.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ proj4.defs(
);

// Define geographic extent: CRS, min/max X, min/max Y
const extent = new itowns.Extent(
"EPSG:3946",
const extent = new itowns.Extent('EPSG:3946',
1837816.94334,
1847692.32501,
5170036.4587,
Expand Down

0 comments on commit f41678e

Please sign in to comment.