vis-core 0.30.0-beta.8 → 0.30.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/dist/index.d.ts +1779 -11
- package/dist/index.js +22 -5366
- package/package.json +28 -25
- package/dist/accessToken.d.ts +0 -5
- package/dist/detect/Benchmark.d.ts +0 -17
- package/dist/detect/WebGL.d.ts +0 -23
- package/dist/detect/d/blocklistedGPUS.d.ts +0 -1
- package/dist/detect/d/tier0GPU.d.ts +0 -2
- package/dist/detect/d/types.d.ts +0 -1
- package/dist/detect/index.d.ts +0 -20
- package/dist/editor/command/AddMaterial.d.ts +0 -20
- package/dist/editor/command/AddObject.d.ts +0 -15
- package/dist/editor/command/AddVis.d.ts +0 -12
- package/dist/editor/command/Command.d.ts +0 -19
- package/dist/editor/command/Commands.d.ts +0 -24
- package/dist/editor/command/CopyMaterial.d.ts +0 -13
- package/dist/editor/command/CopyObject.d.ts +0 -16
- package/dist/editor/command/RemoveMaterial.d.ts +0 -13
- package/dist/editor/command/RemoveObject.d.ts +0 -13
- package/dist/editor/command/SetColor.d.ts +0 -12
- package/dist/editor/command/SetGeometry.d.ts +0 -13
- package/dist/editor/command/SetMaterial.d.ts +0 -12
- package/dist/editor/command/SetMaterialColor.d.ts +0 -14
- package/dist/editor/command/SetMaterialMap.d.ts +0 -17
- package/dist/editor/command/SetMaterialMapVector.d.ts +0 -15
- package/dist/editor/command/SetMaterialRange.d.ts +0 -14
- package/dist/editor/command/SetMaterialValue.d.ts +0 -14
- package/dist/editor/command/SetMaterialVector.d.ts +0 -14
- package/dist/editor/command/SetObjectMaterial.d.ts +0 -15
- package/dist/editor/command/SetPosition.d.ts +0 -12
- package/dist/editor/command/SetRotation.d.ts +0 -11
- package/dist/editor/command/SetScale.d.ts +0 -11
- package/dist/editor/command/SetSceenMap.d.ts +0 -4
- package/dist/editor/command/SetSetting.d.ts +0 -14
- package/dist/editor/command/SetTarget.d.ts +0 -12
- package/dist/editor/command/SetValue.d.ts +0 -14
- package/dist/editor/command/SetVector.d.ts +0 -14
- package/dist/editor/config.d.ts +0 -20
- package/dist/editor/helper.d.ts +0 -1
- package/dist/editor/history.d.ts +0 -77
- package/dist/editor/hooks.d.ts +0 -24
- package/dist/editor/index.d.ts +0 -87
- package/dist/editor/viewport.d.ts +0 -44
- package/dist/fix.d.ts +0 -0
- package/dist/getVisConfig.d.ts +0 -22
- package/dist/index.module.js +0 -145150
- package/dist/utils/animation.d.ts +0 -51
- package/dist/utils/base64ArrayBuffer.d.ts +0 -2
- package/dist/utils/compareVersion.d.ts +0 -2
- package/dist/utils/e.d.ts +0 -2
- package/dist/utils/fixVideoTexture.d.ts +0 -1
- package/dist/utils/jsonFetch.d.ts +0 -8
- package/dist/utils/observeScale.d.ts +0 -1
- package/dist/utils/png2webp.d.ts +0 -1
- package/dist/version.d.ts +0 -2
- package/dist/vis/all/json/china/china.d.ts +0 -104
- package/dist/vis/all/json/continents/continents.d.ts +0 -210
- package/dist/vis/all/json/index.d.ts +0 -20
- package/dist/vis/all/json/world/world.d.ts +0 -42
- package/dist/vis/all/objects/Arc/index.d.ts +0 -43
- package/dist/vis/all/objects/Arc/utils.d.ts +0 -6
- package/dist/vis/all/objects/Box.d.ts +0 -4
- package/dist/vis/all/objects/Capsule.d.ts +0 -4
- package/dist/vis/all/objects/Circle.d.ts +0 -4
- package/dist/vis/all/objects/CrossPlane.d.ts +0 -12
- package/dist/vis/all/objects/Cylinder.d.ts +0 -4
- package/dist/vis/all/objects/Dodecahedron.d.ts +0 -4
- package/dist/vis/all/objects/Icosahedron.d.ts +0 -4
- package/dist/vis/all/objects/Lathe.d.ts +0 -4
- package/dist/vis/all/objects/Light.d.ts +0 -6
- package/dist/vis/all/objects/Model.d.ts +0 -68
- package/dist/vis/all/objects/Octahedron.d.ts +0 -4
- package/dist/vis/all/objects/Plane.d.ts +0 -4
- package/dist/vis/all/objects/PlaneShadow.d.ts +0 -4
- package/dist/vis/all/objects/Point.d.ts +0 -15
- package/dist/vis/all/objects/Ring.d.ts +0 -4
- package/dist/vis/all/objects/Sphere.d.ts +0 -8
- package/dist/vis/all/objects/Sprite.d.ts +0 -5
- package/dist/vis/all/objects/Tetrahedron.d.ts +0 -4
- package/dist/vis/all/objects/Torus.d.ts +0 -4
- package/dist/vis/all/objects/TorusKnot.d.ts +0 -4
- package/dist/vis/all/objects/Tube.d.ts +0 -13
- package/dist/vis/all/objects/index.d.ts +0 -77
- package/dist/vis/base/camera.d.ts +0 -24
- package/dist/vis/base/event.d.ts +0 -11
- package/dist/vis/base/index.d.ts +0 -123
- package/dist/vis/city/index.d.ts +0 -118
- package/dist/vis/city/objects/area/index.d.ts +0 -23
- package/dist/vis/city/objects/building/index.d.ts +0 -28
- package/dist/vis/city/objects/index.d.ts +0 -43
- package/dist/vis/city/objects/plane/Water.d.ts +0 -1
- package/dist/vis/city/objects/plane/Water2.d.ts +0 -68
- package/dist/vis/city/objects/plane/index.d.ts +0 -19
- package/dist/vis/city/objects/road/index.d.ts +0 -23
- package/dist/vis/city/objects/target/index.d.ts +0 -25
- package/dist/vis/earth/index.d.ts +0 -86
- package/dist/vis/earth/objects/SphereShadow.d.ts +0 -10
- package/dist/vis/earth/objects/earth/index.d.ts +0 -11
- package/dist/vis/earth/objects/index.d.ts +0 -39
- package/dist/vis/earth/styles/base.d.ts +0 -2
- package/dist/vis/earth/styles/chinaPlate.d.ts +0 -2
- package/dist/vis/earth/styles/countryPlate.d.ts +0 -2
- package/dist/vis/earth/styles/index.d.ts +0 -3
- package/dist/vis/index.d.ts +0 -4
- package/dist/vis/map/city.d.ts +0 -5
- package/dist/vis/map/el.d.ts +0 -1
- package/dist/vis/map/index.d.ts +0 -294
- package/dist/vis/map/objects/ContinentsBg.d.ts +0 -18
- package/dist/vis/map/objects/Mountain.d.ts +0 -30
- package/dist/vis/map/objects/PlaneMap.d.ts +0 -87
- package/dist/vis/map/objects/index.d.ts +0 -41
- package/dist/vis/map/styles/base.d.ts +0 -2
- package/dist/vis/map/styles/china.d.ts +0 -2
- package/dist/vis/map/styles/index.d.ts +0 -6
- package/dist/vis/map/styles/map2/base.d.ts +0 -2
- package/dist/vis/map/styles/map2/city350000.d.ts +0 -2
- package/dist/vis/map/styles/map2/cityOnMap.d.ts +0 -2
- package/dist/vis/map/styles/world.d.ts +0 -2
- package/dist/vis/map/styles/worldPacificCentre.d.ts +0 -2
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BaseObject } from 'gl-draw';
|
|
2
|
-
import * as THREE from 'three';
|
|
3
|
-
interface Options {
|
|
4
|
-
path?: THREE.Curve<THREE.Vector3>;
|
|
5
|
-
radius?: number;
|
|
6
|
-
multiplyScalar?: number;
|
|
7
|
-
}
|
|
8
|
-
export default class extends BaseObject {
|
|
9
|
-
options: Options;
|
|
10
|
-
constructor(options: Options);
|
|
11
|
-
create(): void;
|
|
12
|
-
}
|
|
13
|
-
export {};
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { Lead } from 'gl-draw';
|
|
2
|
-
import { Node, Line, Line2, ExtrudePolygon, Group, ConicPolygon } from 'gl-draw/dist/objects';
|
|
3
|
-
import Light from './Light';
|
|
4
|
-
import Point from './Point';
|
|
5
|
-
import Arc from './Arc';
|
|
6
|
-
import CrossPlane from './CrossPlane';
|
|
7
|
-
import PlaneShadow from './PlaneShadow';
|
|
8
|
-
import Model from './Model';
|
|
9
|
-
import Box from './Box';
|
|
10
|
-
import Capsule from './Capsule';
|
|
11
|
-
import Circle from './Circle';
|
|
12
|
-
import Cylinder from './Cylinder';
|
|
13
|
-
import Dodecahedron from './Dodecahedron';
|
|
14
|
-
import Icosahedron from './Icosahedron';
|
|
15
|
-
import Lathe from './Lathe';
|
|
16
|
-
import Octahedron from './Octahedron';
|
|
17
|
-
import Plane from './Plane';
|
|
18
|
-
import Ring from './Ring';
|
|
19
|
-
import Sphere from './Sphere';
|
|
20
|
-
import Sprite from './Sprite';
|
|
21
|
-
import Tetrahedron from './Tetrahedron';
|
|
22
|
-
import Torus from './Torus';
|
|
23
|
-
import TorusKnot from './TorusKnot';
|
|
24
|
-
import Tube from './Tube';
|
|
25
|
-
export declare const expObjs: {
|
|
26
|
-
Plane: typeof Plane;
|
|
27
|
-
CrossPlane: typeof CrossPlane;
|
|
28
|
-
PlaneShadow: typeof PlaneShadow;
|
|
29
|
-
Ring: typeof Ring;
|
|
30
|
-
Sphere: typeof Sphere;
|
|
31
|
-
Sprite: typeof Sprite;
|
|
32
|
-
Tetrahedron: typeof Tetrahedron;
|
|
33
|
-
Torus: typeof Torus;
|
|
34
|
-
TorusKnot: typeof TorusKnot;
|
|
35
|
-
Tube: typeof Tube;
|
|
36
|
-
Box: typeof Box;
|
|
37
|
-
Capsule: typeof Capsule;
|
|
38
|
-
Circle: typeof Circle;
|
|
39
|
-
Cylinder: typeof Cylinder;
|
|
40
|
-
Dodecahedron: typeof Dodecahedron;
|
|
41
|
-
Icosahedron: typeof Icosahedron;
|
|
42
|
-
Lathe: typeof Lathe;
|
|
43
|
-
Octahedron: typeof Octahedron;
|
|
44
|
-
};
|
|
45
|
-
export declare const prefabType: string[];
|
|
46
|
-
declare const objs: {
|
|
47
|
-
Plane: typeof Plane;
|
|
48
|
-
CrossPlane: typeof CrossPlane;
|
|
49
|
-
PlaneShadow: typeof PlaneShadow;
|
|
50
|
-
Ring: typeof Ring;
|
|
51
|
-
Sphere: typeof Sphere;
|
|
52
|
-
Sprite: typeof Sprite;
|
|
53
|
-
Tetrahedron: typeof Tetrahedron;
|
|
54
|
-
Torus: typeof Torus;
|
|
55
|
-
TorusKnot: typeof TorusKnot;
|
|
56
|
-
Tube: typeof Tube;
|
|
57
|
-
Box: typeof Box;
|
|
58
|
-
Capsule: typeof Capsule;
|
|
59
|
-
Circle: typeof Circle;
|
|
60
|
-
Cylinder: typeof Cylinder;
|
|
61
|
-
Dodecahedron: typeof Dodecahedron;
|
|
62
|
-
Icosahedron: typeof Icosahedron;
|
|
63
|
-
Lathe: typeof Lathe;
|
|
64
|
-
Octahedron: typeof Octahedron;
|
|
65
|
-
Node: typeof Node;
|
|
66
|
-
Line: typeof Line;
|
|
67
|
-
Line2: typeof Line2;
|
|
68
|
-
ExtrudePolygon: typeof ExtrudePolygon;
|
|
69
|
-
ConicPolygon: typeof ConicPolygon;
|
|
70
|
-
Group: typeof Group;
|
|
71
|
-
Light: typeof Light;
|
|
72
|
-
Point: typeof Point;
|
|
73
|
-
Arc: typeof Arc;
|
|
74
|
-
Model: typeof Model;
|
|
75
|
-
};
|
|
76
|
-
export default objs;
|
|
77
|
-
export type d = Lead<typeof objs>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import Pencil, { BaseObject } from 'gl-draw';
|
|
2
|
-
import * as THREE from 'three';
|
|
3
|
-
import Event from "./event";
|
|
4
|
-
export default class Camera extends Event {
|
|
5
|
-
container: HTMLElement;
|
|
6
|
-
pencil: Pencil;
|
|
7
|
-
cameraState: Record<string, number[]>;
|
|
8
|
-
setSaveCamera(type: string): void;
|
|
9
|
-
useSaveCamera(type: string, enableTransition?: boolean): Promise<boolean>;
|
|
10
|
-
lookAt(positionX: number, positionY: number, positionZ: number, targetX: number, targetY: number, targetZ: number, enableTransition?: boolean, smoothTime?: number): Promise<void>;
|
|
11
|
-
truck(x: number, y: number, enableTransition?: boolean, smoothTime?: number): Promise<void>;
|
|
12
|
-
dollyTo(distance: number | `+=${number}` | `-=${number}` | `*=${number}` | `/=${number}`, enableTransition?: boolean, smoothTime?: number): Promise<void>;
|
|
13
|
-
absoluteAngle(targetAngle: number, sourceAngle: number): number;
|
|
14
|
-
lookAtTarget(ops: {
|
|
15
|
-
target?: THREE.Vector3;
|
|
16
|
-
distance?: number;
|
|
17
|
-
polarAngle?: number;
|
|
18
|
-
azimuthAngle?: number;
|
|
19
|
-
}, enableTransition?: boolean, smoothTime?: number): Promise<void>;
|
|
20
|
-
paddingInCssPixel(obj: BaseObject, top: number, right: number, bottom: number, left: number, enableTransition: boolean): Promise<void[]>;
|
|
21
|
-
resetCamera(enableTransition?: boolean, smoothTime?: number): Promise<void>;
|
|
22
|
-
unproject(e: MouseEvent, targetZ?: number): THREE.Vector3;
|
|
23
|
-
dispose(): void;
|
|
24
|
-
}
|
package/dist/vis/base/event.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from 'events';
|
|
2
|
-
export default class Event {
|
|
3
|
-
event: EventEmitter;
|
|
4
|
-
private eventHandlers;
|
|
5
|
-
on: (eventName: string | symbol, listener: (...args: any[]) => void) => EventEmitter;
|
|
6
|
-
emit: (eventName: string | symbol, ...args: any[]) => boolean;
|
|
7
|
-
addListener(node: HTMLElement, event: string, handler: (e: MouseEvent) => void, capture?: boolean): void;
|
|
8
|
-
removeListener(targetNode: HTMLElement | '', event: string): void;
|
|
9
|
-
removeAllListeners(): void;
|
|
10
|
-
dispose(): void;
|
|
11
|
-
}
|
package/dist/vis/base/index.d.ts
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import leadObjs from "../all/objects";
|
|
2
|
-
import type Arc from "../all/objects/Arc";
|
|
3
|
-
import Pencil, { type BaseObject, type Lead } from 'gl-draw';
|
|
4
|
-
import type { PickFunctionsItem } from 'gl-draw/dist/core/Lead/Pick';
|
|
5
|
-
import type { Line, Node } from 'gl-draw/dist/objects';
|
|
6
|
-
import { Wk } from 'gl-draw/dist/plugins';
|
|
7
|
-
import * as THREE from 'three';
|
|
8
|
-
import { RoomEnvironment } from 'three/examples/jsm/environments/RoomEnvironment';
|
|
9
|
-
import Editor from "../../editor";
|
|
10
|
-
import Camera from "./camera";
|
|
11
|
-
export interface BaseOptions {
|
|
12
|
-
container: HTMLElement;
|
|
13
|
-
assetsPrefix?: string;
|
|
14
|
-
css2DContainer?: HTMLElement;
|
|
15
|
-
pencil?: any;
|
|
16
|
-
pencil2?: any;
|
|
17
|
-
pencilConfig?: Record<string, any>;
|
|
18
|
-
disableInitShow?: boolean;
|
|
19
|
-
editor?: boolean;
|
|
20
|
-
logarithmicDepthBuffer?: boolean;
|
|
21
|
-
tier?: number;
|
|
22
|
-
observeParentScale?: boolean;
|
|
23
|
-
[key: string]: any;
|
|
24
|
-
}
|
|
25
|
-
export default class Base extends Camera {
|
|
26
|
-
static VisName: string;
|
|
27
|
-
playing: boolean;
|
|
28
|
-
leftTruck: boolean;
|
|
29
|
-
options: BaseOptions;
|
|
30
|
-
showState: boolean;
|
|
31
|
-
settings: Record<string, any>;
|
|
32
|
-
delLoadArr?: string[];
|
|
33
|
-
extendsOptions: Record<string, any>;
|
|
34
|
-
leadObjs: {
|
|
35
|
-
Plane: typeof import("../all/objects/Plane").default;
|
|
36
|
-
CrossPlane: typeof import("../all/objects/CrossPlane").default;
|
|
37
|
-
PlaneShadow: typeof import("../all/objects/PlaneShadow").default;
|
|
38
|
-
Ring: typeof import("../all/objects/Ring").default;
|
|
39
|
-
Sphere: typeof import("../all/objects/Sphere").default;
|
|
40
|
-
Sprite: typeof import("../all/objects/Sprite").default;
|
|
41
|
-
Tetrahedron: typeof import("../all/objects/Tetrahedron").default;
|
|
42
|
-
Torus: typeof import("../all/objects/Torus").default;
|
|
43
|
-
TorusKnot: typeof import("../all/objects/TorusKnot").default;
|
|
44
|
-
Tube: typeof import("../all/objects/Tube").default;
|
|
45
|
-
Box: typeof import("../all/objects/Box").default;
|
|
46
|
-
Capsule: typeof import("../all/objects/Capsule").default;
|
|
47
|
-
Circle: typeof import("../all/objects/Circle").default;
|
|
48
|
-
Cylinder: typeof import("../all/objects/Cylinder").default;
|
|
49
|
-
Dodecahedron: typeof import("../all/objects/Dodecahedron").default;
|
|
50
|
-
Icosahedron: typeof import("../all/objects/Icosahedron").default;
|
|
51
|
-
Lathe: typeof import("../all/objects/Lathe").default;
|
|
52
|
-
Octahedron: typeof import("../all/objects/Octahedron").default;
|
|
53
|
-
Node: typeof Node;
|
|
54
|
-
Line: typeof Line;
|
|
55
|
-
Line2: typeof import("gl-draw/dist/objects").Line2;
|
|
56
|
-
ExtrudePolygon: typeof import("gl-draw/dist/objects").ExtrudePolygon;
|
|
57
|
-
ConicPolygon: typeof import("gl-draw/dist/objects").ConicPolygon;
|
|
58
|
-
Group: typeof import("gl-draw/dist/objects").Group;
|
|
59
|
-
Light: typeof import("../all/objects/Light").default;
|
|
60
|
-
Point: typeof import("../all/objects/Point").default;
|
|
61
|
-
Arc: typeof Arc;
|
|
62
|
-
Model: typeof import("../all/objects/Model").default;
|
|
63
|
-
};
|
|
64
|
-
lead: Lead<typeof leadObjs>;
|
|
65
|
-
mList: Pencil['mList'];
|
|
66
|
-
get loader(): import("gl-draw/dist/core/Loader/Loader").default;
|
|
67
|
-
get worker(): Wk;
|
|
68
|
-
tier0: boolean;
|
|
69
|
-
pmremGenerator: THREE.PMREMGenerator | null;
|
|
70
|
-
re: RoomEnvironment | null;
|
|
71
|
-
roomEnvMap?: THREE.Texture;
|
|
72
|
-
visName: string;
|
|
73
|
-
editor?: Editor;
|
|
74
|
-
publicDir: Record<string, string>;
|
|
75
|
-
constructor(options: BaseOptions);
|
|
76
|
-
private showDetectRes;
|
|
77
|
-
setOptions(options: Record<string, any>): void;
|
|
78
|
-
_baseObjectByUuid: Editor['baseObjectByUuid'];
|
|
79
|
-
_objectByUuid: Editor['objectByUuid'];
|
|
80
|
-
get fromJSON(): (jsonOrUrl: Record<string, any> | string, hooks?: Record<string, any>) => Promise<Record<string, any>>;
|
|
81
|
-
get baseObjectByUuid(): {
|
|
82
|
-
(key: `arc${string}`): Arc;
|
|
83
|
-
(key: `sprite${string}`): import("../all/objects/Sprite").default;
|
|
84
|
-
(key: string): BaseObject;
|
|
85
|
-
};
|
|
86
|
-
get objectByUuid(): (key: string) => THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap> | undefined;
|
|
87
|
-
get getDataURL(): () => string;
|
|
88
|
-
loaderAdd(...args: any): void;
|
|
89
|
-
initMaterial(...args: any): Promise<void>;
|
|
90
|
-
initVis(...args: any): Promise<void>;
|
|
91
|
-
init(...args: any[]): Promise<void>;
|
|
92
|
-
private observeScale;
|
|
93
|
-
initPencil(): Promise<void>;
|
|
94
|
-
private sceneActive;
|
|
95
|
-
setSceneActive(): void;
|
|
96
|
-
initCameraUserData(): void;
|
|
97
|
-
initSceneUserData(): void;
|
|
98
|
-
initBaseObjectUserData(baseObject: BaseObject): void;
|
|
99
|
-
addCSS3DRenderer(): void;
|
|
100
|
-
initSettingsObj?: Record<string, any>;
|
|
101
|
-
mouseButtonsActiveStore: Record<string, any> | null;
|
|
102
|
-
initSettings(): void;
|
|
103
|
-
handleSetting(key: string, value: any): Promise<any>;
|
|
104
|
-
show(): void;
|
|
105
|
-
showAction(): void;
|
|
106
|
-
hide(): void;
|
|
107
|
-
addCSS2D(dom: HTMLElement, options?: {
|
|
108
|
-
display?: string;
|
|
109
|
-
onTop?: number;
|
|
110
|
-
}): Promise<Node>;
|
|
111
|
-
addCSS3D(dom: HTMLElement, options?: {
|
|
112
|
-
display?: string;
|
|
113
|
-
onTop?: number;
|
|
114
|
-
type?: '3d' | '3dSprite';
|
|
115
|
-
}): Promise<Node>;
|
|
116
|
-
getRoomEnvMap(): THREE.Texture<unknown>;
|
|
117
|
-
handlePick(objArr: PickFunctionsItem['objArr'], type: PickFunctionsItem['type'], cb: PickFunctionsItem['cb']): void;
|
|
118
|
-
getScreenPosition(x: number, y: number, z: number): {
|
|
119
|
-
x: number;
|
|
120
|
-
y: number;
|
|
121
|
-
};
|
|
122
|
-
dispose(): void;
|
|
123
|
-
}
|
package/dist/vis/city/index.d.ts
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import Base, { type BaseOptions } from "../base";
|
|
2
|
-
import leadObjs from "./objects";
|
|
3
|
-
import { type BaseObject, type Lead } from 'gl-draw';
|
|
4
|
-
import { type Group } from 'gl-draw/dist/objects';
|
|
5
|
-
import { getProjection } from 'gl-draw/dist/utils';
|
|
6
|
-
import * as THREE from 'three';
|
|
7
|
-
import type Building from './objects/building';
|
|
8
|
-
import type Road from './objects/road';
|
|
9
|
-
interface CityOptions extends BaseOptions {
|
|
10
|
-
adcode: number;
|
|
11
|
-
jsonName: string;
|
|
12
|
-
cacheKey?: string;
|
|
13
|
-
center?: [number, number];
|
|
14
|
-
fitTo?: boolean;
|
|
15
|
-
coordtransformFunc?: (lng: number, lat: number) => {
|
|
16
|
-
longitude: number;
|
|
17
|
-
latitude: number;
|
|
18
|
-
};
|
|
19
|
-
plane?: boolean;
|
|
20
|
-
grey?: boolean;
|
|
21
|
-
showBuilding?: boolean;
|
|
22
|
-
buildingSideGradient?: boolean;
|
|
23
|
-
buildingHasSide?: boolean;
|
|
24
|
-
showRoad?: boolean;
|
|
25
|
-
showGrassland?: boolean;
|
|
26
|
-
showRiver?: boolean;
|
|
27
|
-
setWaterMaterial?: boolean;
|
|
28
|
-
ssao?: boolean;
|
|
29
|
-
}
|
|
30
|
-
export default class extends Base {
|
|
31
|
-
static VisName: string;
|
|
32
|
-
leadObjs: {
|
|
33
|
-
Building: typeof Building;
|
|
34
|
-
Road: typeof Road;
|
|
35
|
-
Area: typeof import("./objects/area").default;
|
|
36
|
-
CityPlane: typeof import("./objects/plane").default;
|
|
37
|
-
Target: typeof import("./objects/target").default;
|
|
38
|
-
Plane: typeof import("../all/objects/Plane").default;
|
|
39
|
-
CrossPlane: typeof import("../all/objects/CrossPlane").default;
|
|
40
|
-
PlaneShadow: typeof import("../all/objects/PlaneShadow").default;
|
|
41
|
-
Ring: typeof import("../all/objects/Ring").default;
|
|
42
|
-
Sphere: typeof import("../all/objects/Sphere").default;
|
|
43
|
-
Sprite: typeof import("../all/objects/Sprite").default;
|
|
44
|
-
Tetrahedron: typeof import("../all/objects/Tetrahedron").default;
|
|
45
|
-
Torus: typeof import("../all/objects/Torus").default;
|
|
46
|
-
TorusKnot: typeof import("../all/objects/TorusKnot").default;
|
|
47
|
-
Tube: typeof import("../all/objects/Tube").default;
|
|
48
|
-
Box: typeof import("../all/objects/Box").default;
|
|
49
|
-
Capsule: typeof import("../all/objects/Capsule").default;
|
|
50
|
-
Circle: typeof import("../all/objects/Circle").default;
|
|
51
|
-
Cylinder: typeof import("../all/objects/Cylinder").default;
|
|
52
|
-
Dodecahedron: typeof import("../all/objects/Dodecahedron").default;
|
|
53
|
-
Icosahedron: typeof import("../all/objects/Icosahedron").default;
|
|
54
|
-
Lathe: typeof import("../all/objects/Lathe").default;
|
|
55
|
-
Octahedron: typeof import("../all/objects/Octahedron").default;
|
|
56
|
-
Node: typeof import("gl-draw/dist/objects").Node;
|
|
57
|
-
Line: typeof import("gl-draw/dist/objects").Line;
|
|
58
|
-
Line2: typeof import("gl-draw/dist/objects").Line2;
|
|
59
|
-
ExtrudePolygon: typeof import("gl-draw/dist/objects").ExtrudePolygon;
|
|
60
|
-
ConicPolygon: typeof import("gl-draw/dist/objects").ConicPolygon;
|
|
61
|
-
Group: typeof Group;
|
|
62
|
-
Light: typeof import("../all/objects/Light").default;
|
|
63
|
-
Point: typeof import("../all/objects/Point").default;
|
|
64
|
-
Arc: typeof import("../all/objects/Arc").default;
|
|
65
|
-
Model: typeof import("../all/objects/Model").default;
|
|
66
|
-
};
|
|
67
|
-
lead: Lead<typeof leadObjs>;
|
|
68
|
-
adcode: number;
|
|
69
|
-
pcenter: [number, number];
|
|
70
|
-
pscale: number;
|
|
71
|
-
projection: ReturnType<typeof getProjection>;
|
|
72
|
-
options: CityOptions;
|
|
73
|
-
group: Group;
|
|
74
|
-
outAreaGroup: Group;
|
|
75
|
-
building: Building;
|
|
76
|
-
road: Road;
|
|
77
|
-
setOptions(options: CityOptions): void;
|
|
78
|
-
multiplyScalar: number;
|
|
79
|
-
loaderAdd(): void;
|
|
80
|
-
loaderAddJson(jsonName: string): void;
|
|
81
|
-
initMaterial(): Promise<void>;
|
|
82
|
-
disableSSAO(): void;
|
|
83
|
-
enabledSSAO(): void;
|
|
84
|
-
init(): Promise<void>;
|
|
85
|
-
getInvert(vector3: THREE.Vector3): any;
|
|
86
|
-
fitTo(obj: BaseObject, enableTransition?: boolean): Promise<void>;
|
|
87
|
-
initVis(): Promise<void>;
|
|
88
|
-
drawBuilding(options?: {
|
|
89
|
-
json?: {
|
|
90
|
-
features: any[];
|
|
91
|
-
};
|
|
92
|
-
meters?: number;
|
|
93
|
-
grey?: boolean;
|
|
94
|
-
sideGradient?: boolean;
|
|
95
|
-
hasSide?: boolean;
|
|
96
|
-
}): Promise<Building | undefined>;
|
|
97
|
-
drawArea(options?: {
|
|
98
|
-
json?: {
|
|
99
|
-
features: any[];
|
|
100
|
-
};
|
|
101
|
-
type?: 'river' | 'grassland';
|
|
102
|
-
oArr?: number[];
|
|
103
|
-
grey?: boolean;
|
|
104
|
-
}): Promise<import("./objects/area").default | undefined>;
|
|
105
|
-
drawRoad(options?: {
|
|
106
|
-
json?: {
|
|
107
|
-
features: any[];
|
|
108
|
-
};
|
|
109
|
-
meters?: number;
|
|
110
|
-
z?: number;
|
|
111
|
-
grey?: boolean;
|
|
112
|
-
}): Promise<Road | undefined>;
|
|
113
|
-
getWorldPosition(longitude: number, latitude: number): {
|
|
114
|
-
x: any;
|
|
115
|
-
y: number;
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { BaseObject } from 'gl-draw';
|
|
2
|
-
import type { ExtrudePolygon } from 'gl-draw/dist/objects';
|
|
3
|
-
import type * as THREE from 'three';
|
|
4
|
-
interface Options {
|
|
5
|
-
json: {
|
|
6
|
-
features: any[];
|
|
7
|
-
};
|
|
8
|
-
projection: {
|
|
9
|
-
center: [number, number];
|
|
10
|
-
scale: number;
|
|
11
|
-
};
|
|
12
|
-
material: THREE.Material;
|
|
13
|
-
type: string;
|
|
14
|
-
cacheKey?: string;
|
|
15
|
-
oArr?: number[];
|
|
16
|
-
}
|
|
17
|
-
export default class extends BaseObject {
|
|
18
|
-
options: Options;
|
|
19
|
-
area: ExtrudePolygon[];
|
|
20
|
-
constructor(options: Options);
|
|
21
|
-
create(): Promise<void>;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { BaseObject } from 'gl-draw';
|
|
2
|
-
import * as THREE from 'three';
|
|
3
|
-
interface Options {
|
|
4
|
-
json: {
|
|
5
|
-
features: any[];
|
|
6
|
-
};
|
|
7
|
-
projection: {
|
|
8
|
-
center: [number, number];
|
|
9
|
-
scale: number;
|
|
10
|
-
};
|
|
11
|
-
cacheKey?: string;
|
|
12
|
-
material?: THREE.Material | THREE.Material[];
|
|
13
|
-
meters?: number;
|
|
14
|
-
hasSide?: boolean;
|
|
15
|
-
sideGradient?: boolean;
|
|
16
|
-
grey?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export default class extends BaseObject {
|
|
19
|
-
options: Options;
|
|
20
|
-
constructor(options: Options);
|
|
21
|
-
create(): Promise<void>;
|
|
22
|
-
worldPositionZ: {
|
|
23
|
-
value: number;
|
|
24
|
-
};
|
|
25
|
-
sideGradient(color?: string, maxGradientHeight?: number): void;
|
|
26
|
-
update(): void;
|
|
27
|
-
}
|
|
28
|
-
export {};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Lead } from 'gl-draw';
|
|
2
|
-
import Building from './building';
|
|
3
|
-
import Road from './road';
|
|
4
|
-
import Area from './area';
|
|
5
|
-
import CityPlane from './plane';
|
|
6
|
-
import Target from './target';
|
|
7
|
-
declare const objs: {
|
|
8
|
-
Building: typeof Building;
|
|
9
|
-
Road: typeof Road;
|
|
10
|
-
Area: typeof Area;
|
|
11
|
-
CityPlane: typeof CityPlane;
|
|
12
|
-
Target: typeof Target;
|
|
13
|
-
Plane: typeof import("../../all/objects/Plane").default;
|
|
14
|
-
CrossPlane: typeof import("../../all/objects/CrossPlane").default;
|
|
15
|
-
PlaneShadow: typeof import("../../all/objects/PlaneShadow").default;
|
|
16
|
-
Ring: typeof import("../../all/objects/Ring").default;
|
|
17
|
-
Sphere: typeof import("../../all/objects/Sphere").default;
|
|
18
|
-
Sprite: typeof import("../../all/objects/Sprite").default;
|
|
19
|
-
Tetrahedron: typeof import("../../all/objects/Tetrahedron").default;
|
|
20
|
-
Torus: typeof import("../../all/objects/Torus").default;
|
|
21
|
-
TorusKnot: typeof import("../../all/objects/TorusKnot").default;
|
|
22
|
-
Tube: typeof import("../../all/objects/Tube").default;
|
|
23
|
-
Box: typeof import("../../all/objects/Box").default;
|
|
24
|
-
Capsule: typeof import("../../all/objects/Capsule").default;
|
|
25
|
-
Circle: typeof import("../../all/objects/Circle").default;
|
|
26
|
-
Cylinder: typeof import("../../all/objects/Cylinder").default;
|
|
27
|
-
Dodecahedron: typeof import("../../all/objects/Dodecahedron").default;
|
|
28
|
-
Icosahedron: typeof import("../../all/objects/Icosahedron").default;
|
|
29
|
-
Lathe: typeof import("../../all/objects/Lathe").default;
|
|
30
|
-
Octahedron: typeof import("../../all/objects/Octahedron").default;
|
|
31
|
-
Node: typeof import("gl-draw/dist/objects").Node;
|
|
32
|
-
Line: typeof import("gl-draw/dist/objects").Line;
|
|
33
|
-
Line2: typeof import("gl-draw/dist/objects").Line2;
|
|
34
|
-
ExtrudePolygon: typeof import("gl-draw/dist/objects").ExtrudePolygon;
|
|
35
|
-
ConicPolygon: typeof import("gl-draw/dist/objects").ConicPolygon;
|
|
36
|
-
Group: typeof import("gl-draw/dist/objects").Group;
|
|
37
|
-
Light: typeof import("../../all/objects/Light").default;
|
|
38
|
-
Point: typeof import("../../all/objects/Point").default;
|
|
39
|
-
Arc: typeof import("../../all/objects/Arc").default;
|
|
40
|
-
Model: typeof import("../../all/objects/Model").default;
|
|
41
|
-
};
|
|
42
|
-
export default objs;
|
|
43
|
-
export type d = Lead<typeof objs>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function setWaterMaterial(object: any, options?: {}): void;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* References:
|
|
3
|
-
* https://alex.vlachos.com/graphics/Vlachos-SIGGRAPH10-WaterFlow.pdf
|
|
4
|
-
* http://graphicsrunner.blogspot.de/2010/08/water-using-flow-maps.html
|
|
5
|
-
*
|
|
6
|
-
*/
|
|
7
|
-
export class Water extends Mesh<import("three").BufferGeometry<import("three").NormalBufferAttributes, import("three").BufferGeometryEventMap>, import("three").Material | import("three").Material[], import("three").Object3DEventMap> {
|
|
8
|
-
constructor(geometry: any, options?: {});
|
|
9
|
-
isWater: boolean;
|
|
10
|
-
type: string;
|
|
11
|
-
}
|
|
12
|
-
export namespace Water {
|
|
13
|
-
namespace WaterShader {
|
|
14
|
-
let name: string;
|
|
15
|
-
namespace uniforms {
|
|
16
|
-
namespace color {
|
|
17
|
-
let type: string;
|
|
18
|
-
let value: null;
|
|
19
|
-
}
|
|
20
|
-
namespace reflectivity {
|
|
21
|
-
let type_1: string;
|
|
22
|
-
export { type_1 as type };
|
|
23
|
-
let value_1: number;
|
|
24
|
-
export { value_1 as value };
|
|
25
|
-
}
|
|
26
|
-
namespace tReflectionMap {
|
|
27
|
-
let type_2: string;
|
|
28
|
-
export { type_2 as type };
|
|
29
|
-
let value_2: null;
|
|
30
|
-
export { value_2 as value };
|
|
31
|
-
}
|
|
32
|
-
namespace tRefractionMap {
|
|
33
|
-
let type_3: string;
|
|
34
|
-
export { type_3 as type };
|
|
35
|
-
let value_3: null;
|
|
36
|
-
export { value_3 as value };
|
|
37
|
-
}
|
|
38
|
-
namespace tNormalMap0 {
|
|
39
|
-
let type_4: string;
|
|
40
|
-
export { type_4 as type };
|
|
41
|
-
let value_4: null;
|
|
42
|
-
export { value_4 as value };
|
|
43
|
-
}
|
|
44
|
-
namespace tNormalMap1 {
|
|
45
|
-
let type_5: string;
|
|
46
|
-
export { type_5 as type };
|
|
47
|
-
let value_5: null;
|
|
48
|
-
export { value_5 as value };
|
|
49
|
-
}
|
|
50
|
-
namespace textureMatrix {
|
|
51
|
-
let type_6: string;
|
|
52
|
-
export { type_6 as type };
|
|
53
|
-
let value_6: null;
|
|
54
|
-
export { value_6 as value };
|
|
55
|
-
}
|
|
56
|
-
namespace config {
|
|
57
|
-
let type_7: string;
|
|
58
|
-
export { type_7 as type };
|
|
59
|
-
let value_7: Vector4;
|
|
60
|
-
export { value_7 as value };
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
let vertexShader: string;
|
|
64
|
-
let fragmentShader: string;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
import { Mesh } from 'three';
|
|
68
|
-
import { Vector4 } from 'three';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import { BaseObject } from 'gl-draw';
|
|
3
|
-
import { Water } from './Water2';
|
|
4
|
-
interface Options {
|
|
5
|
-
width: number;
|
|
6
|
-
height: number;
|
|
7
|
-
material?: THREE.Material;
|
|
8
|
-
color?: string;
|
|
9
|
-
map?: THREE.Texture | null;
|
|
10
|
-
}
|
|
11
|
-
export default class extends BaseObject {
|
|
12
|
-
options: Options;
|
|
13
|
-
constructor(options: Options);
|
|
14
|
-
plane: THREE.PlaneGeometry;
|
|
15
|
-
water?: Water;
|
|
16
|
-
create(): Promise<void>;
|
|
17
|
-
addWater(): void;
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { BaseObject } from 'gl-draw';
|
|
2
|
-
import type { Line } from 'gl-draw/dist/objects';
|
|
3
|
-
interface Options {
|
|
4
|
-
json: {
|
|
5
|
-
features: any[];
|
|
6
|
-
};
|
|
7
|
-
projection: {
|
|
8
|
-
center: [number, number];
|
|
9
|
-
scale: number;
|
|
10
|
-
};
|
|
11
|
-
cacheKey?: string;
|
|
12
|
-
meters?: number;
|
|
13
|
-
grey?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export default class extends BaseObject {
|
|
16
|
-
options: Options;
|
|
17
|
-
constructor(options: Options);
|
|
18
|
-
linePrimary: Line[];
|
|
19
|
-
lineSecondary: Line[];
|
|
20
|
-
create(): Promise<void>;
|
|
21
|
-
dispose(): void;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { BaseObject } from 'gl-draw';
|
|
2
|
-
import * as THREE from 'three';
|
|
3
|
-
import * as TWEEN from '@tweenjs/tween.js';
|
|
4
|
-
interface Opt {
|
|
5
|
-
scale?: number;
|
|
6
|
-
}
|
|
7
|
-
export default class extends BaseObject {
|
|
8
|
-
options: Opt;
|
|
9
|
-
time: {
|
|
10
|
-
value: number;
|
|
11
|
-
};
|
|
12
|
-
offset: THREE.Vector2;
|
|
13
|
-
timer: NodeJS.Timeout | null;
|
|
14
|
-
inTween: TWEEN.Tween<any> | null;
|
|
15
|
-
outTween: TWEEN.Tween<any> | null;
|
|
16
|
-
constructor(options: Opt);
|
|
17
|
-
createWave(color: string): THREE.Mesh<THREE.PlaneGeometry, THREE.ShaderMaterial, THREE.Object3DEventMap>;
|
|
18
|
-
createRipple(texture: THREE.Texture): THREE.Mesh<THREE.CylinderGeometry, THREE.ShaderMaterial, THREE.Object3DEventMap>;
|
|
19
|
-
createCylinder(texture: THREE.Texture): THREE.Object3D<THREE.Object3DEventMap>;
|
|
20
|
-
createTorus(color: string): THREE.Mesh<THREE.TorusGeometry, THREE.MeshBasicMaterial, THREE.Object3DEventMap>;
|
|
21
|
-
create(): Promise<void>;
|
|
22
|
-
erase(): void;
|
|
23
|
-
update(delta: number, elapsed: number): void;
|
|
24
|
-
}
|
|
25
|
-
export {};
|