@openglobus/og 0.28.7 → 1.0.0-rc2
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/LICENSE.md +218 -4
- package/README.md +31 -18
- package/lib/Deferred.d.ts +2 -2
- package/lib/Events.d.ts +1 -1
- package/lib/Globe.d.ts +8 -5
- package/lib/Object3d.d.ts +17 -14
- package/lib/Popup.d.ts +2 -2
- package/lib/assets/LabelWorker.worker-DYd7xn3M.js.map +1 -0
- package/lib/assets/PlainSegmentWorker.worker-JsKldq-e.js.map +1 -0
- package/lib/assets/TerrainWorker.worker-CqUJvMOv.js.map +1 -0
- package/lib/bv/index.d.ts +2 -2
- package/lib/camera/Camera.d.ts +280 -27
- package/lib/camera/Frustum.d.ts +100 -15
- package/lib/camera/PlanetCamera.d.ts +93 -8
- package/lib/camera/index.d.ts +2 -2
- package/lib/control/CameraFrameComposer.d.ts +2 -2
- package/lib/control/CameraFrameHandler.d.ts +1 -1
- package/lib/control/CompassButton.d.ts +2 -2
- package/lib/control/EarthCoordinates.d.ts +5 -2
- package/lib/control/FramebufferPreview.d.ts +3 -3
- package/lib/control/GeoImageDragControl.d.ts +1 -1
- package/lib/control/LayerAnimation.d.ts +2 -2
- package/lib/control/LayerSwitcher.d.ts +3 -0
- package/lib/control/Lighting.d.ts +4 -2
- package/lib/control/Navigation.d.ts +15 -11
- package/lib/control/OrthoSwitcher.d.ts +18 -0
- package/lib/control/SimpleTouchNavigation.d.ts +44 -0
- package/lib/control/Sun.d.ts +4 -2
- package/lib/control/TouchNavigation.d.ts +4 -8
- package/lib/control/atmosphere/Atmosphere.d.ts +2 -0
- package/lib/control/atmosphere/AtmosphereConfig.d.ts +2 -6
- package/lib/control/cameraDepthHandler/CameraDepthHandler.d.ts +17 -3
- package/lib/control/cameraDepthHandler/camera_depth.d.ts +2 -2
- package/lib/control/drawing/LineStringDrawingScene.d.ts +1 -0
- package/lib/control/drawing/PolygonDrawingScene.d.ts +14 -14
- package/lib/control/elevationProfile/ElevationProfile.d.ts +1 -1
- package/lib/control/elevationProfile/ElevationProfileLegend.d.ts +1 -1
- package/lib/control/elevationProfile/ElevationProfileScene.d.ts +9 -12
- package/lib/control/elevationProfile/ElevationProfileView.d.ts +16 -5
- package/lib/control/entityEditor/EntityEditor.d.ts +19 -0
- package/lib/control/{geoObjectEditor/GeoObjectEditorDialog.d.ts → entityEditor/EntityEditorDialog.d.ts} +9 -8
- package/lib/control/{geoObjectEditor/GeoObjectEditorScene.d.ts → entityEditor/EntityEditorScene.d.ts} +12 -12
- package/lib/control/{geoObjectEditor → entityEditor}/colors.d.ts +2 -2
- package/lib/control/entityTree/EntityTree.d.ts +46 -0
- package/lib/control/entityTree/EntityTreeView.d.ts +24 -0
- package/lib/control/heightRuler/HeightRulerScene.d.ts +3 -2
- package/lib/control/index.d.ts +5 -3
- package/lib/control/ruler/RulerScene.d.ts +8 -8
- package/lib/control/selection/SelectionScene.d.ts +6 -6
- package/lib/control/timeline/TimelineControl.d.ts +2 -2
- package/lib/control/timeline/TimelineModel.d.ts +1 -1
- package/lib/control/timeline/TimelineView.d.ts +52 -13
- package/lib/control/visibleExtent/segment.d.ts +7 -0
- package/lib/ellipsoid/index.d.ts +4 -4
- package/lib/entity/Entity.d.ts +114 -100
- package/lib/entity/EntityCollection.d.ts +95 -70
- package/lib/entity/{BaseBillboard.d.ts → billboard/BaseBillboard.d.ts} +16 -17
- package/lib/entity/{BaseBillboardHandler.d.ts → billboard/BaseBillboardHandler.d.ts} +24 -9
- package/lib/entity/{Billboard.d.ts → billboard/Billboard.d.ts} +11 -7
- package/lib/entity/{BillboardHandler.d.ts → billboard/BillboardHandler.d.ts} +1 -1
- package/lib/entity/{GeoObject.d.ts → geoObject/GeoObject.d.ts} +7 -6
- package/lib/entity/{GeoObjectHandler.d.ts → geoObject/GeoObjectHandler.d.ts} +29 -11
- package/lib/entity/{InstanceData.d.ts → geoObject/InstanceData.d.ts} +18 -13
- package/lib/entity/{Geometry.d.ts → geometry/Geometry.d.ts} +10 -10
- package/lib/entity/{GeometryHandler.d.ts → geometry/GeometryHandler.d.ts} +7 -7
- package/lib/entity/index.d.ts +8 -8
- package/lib/entity/{Label.d.ts → label/Label.d.ts} +12 -13
- package/lib/entity/{LabelHandler.d.ts → label/LabelHandler.d.ts} +31 -7
- package/lib/entity/{LabelWorker.d.ts → label/LabelWorker.d.ts} +3 -3
- package/lib/entity/{PointCloud.d.ts → pointCloud/PointCloud.d.ts} +18 -12
- package/lib/entity/{PointCloudHandler.d.ts → pointCloud/PointCloudHandler.d.ts} +4 -4
- package/lib/entity/polyline/Polyline.d.ts +242 -0
- package/lib/entity/polyline/PolylineBatchRenderer.d.ts +443 -0
- package/lib/entity/{PolylineHandler.d.ts → polyline/PolylineHandler.d.ts} +19 -7
- package/lib/entity/{Ray.d.ts → ray/Ray.d.ts} +27 -9
- package/lib/entity/{RayHandler.d.ts → ray/RayHandler.d.ts} +18 -8
- package/lib/entity/{Strip.d.ts → strip/Strip.d.ts} +21 -17
- package/lib/entity/{StripHandler.d.ts → strip/StripHandler.d.ts} +11 -6
- package/lib/index.d.ts +47 -42
- package/lib/layer/BaseGeoImage.d.ts +20 -17
- package/lib/layer/CanvasTiles.d.ts +14 -12
- package/lib/layer/GeoImage.d.ts +1 -1
- package/lib/layer/GeoTexture2d.d.ts +2 -2
- package/lib/layer/KML.d.ts +19 -18
- package/lib/layer/Layer.d.ts +72 -53
- package/lib/layer/Vector.d.ts +47 -30
- package/lib/layer/WMS.d.ts +1 -1
- package/lib/layer/XYZ.d.ts +11 -12
- package/lib/layer/index.d.ts +12 -12
- package/lib/math/Line2.d.ts +1 -1
- package/lib/math/Line3.d.ts +1 -1
- package/lib/math/Mat3.d.ts +3 -13
- package/lib/math/Mat4.d.ts +16 -10
- package/lib/math/Plane.d.ts +1 -1
- package/lib/math/Quat.d.ts +14 -12
- package/lib/math/Ray.d.ts +4 -3
- package/lib/math/Vec2.d.ts +25 -17
- package/lib/math/Vec3.d.ts +33 -31
- package/lib/math/Vec4.d.ts +1 -1
- package/lib/math/coder.d.ts +1 -1
- package/lib/math/index.d.ts +13 -14
- package/lib/mercator.d.ts +4 -4
- package/lib/og.css +1 -1
- package/lib/og.es.js +1 -1
- package/lib/og.es.js.map +1 -1
- package/lib/quadTree/EntityCollectionNode.d.ts +10 -10
- package/lib/quadTree/EntityCollectionsTreeStrategy.d.ts +5 -5
- package/lib/quadTree/QuadTreeStrategy.d.ts +3 -4
- package/lib/quadTree/earth/EarthEntityCollectionNodeLonLat.d.ts +4 -4
- package/lib/quadTree/earth/EarthEntityCollectionsTreeStrategy.d.ts +4 -4
- package/lib/renderer/AtmosphereDeferredShading.d.ts +12 -0
- package/lib/renderer/IDeferredShadingPass.d.ts +8 -0
- package/lib/renderer/ITransparencyPass.d.ts +8 -0
- package/lib/renderer/PhongDeferredShading.d.ts +16 -0
- package/lib/renderer/Renderer.d.ts +166 -99
- package/lib/renderer/RendererEvents.d.ts +15 -5
- package/lib/renderer/WOITPass.d.ts +14 -0
- package/lib/res/fonts/Ephesis-Regular.json +1 -0
- package/lib/res/fonts/Ephesis-Regular.png +0 -0
- package/lib/res/fonts/Karla-Bold.json +1 -0
- package/lib/res/fonts/Karla-Bold.png +0 -0
- package/lib/res/fonts/Karla-Italic.json +1 -0
- package/lib/res/fonts/Karla-Italic.png +0 -0
- package/lib/res/fonts/Karla-Light.json +1 -0
- package/lib/res/fonts/Karla-Light.png +0 -0
- package/lib/res/fonts/Karla-Medium.json +1 -0
- package/lib/res/fonts/Karla-Medium.png +0 -0
- package/lib/res/fonts/Roboto-Regular.json +1 -37147
- package/lib/res/fonts/Roboto-Regular.png +0 -0
- package/lib/res/fonts/arial.json +1 -4321
- package/lib/res/fonts/arial.png +0 -0
- package/lib/res/night-4326.png +0 -0
- package/lib/res/night.png +0 -0
- package/lib/scene/AltitudeNearPlaneStrategy.d.ts +17 -0
- package/lib/scene/Axes.d.ts +4 -3
- package/lib/scene/Planet.d.ts +244 -69
- package/lib/scene/{RenderNode.d.ts → Scene.d.ts} +49 -46
- package/lib/scene/SkyBox.d.ts +5 -3
- package/lib/scene/index.d.ts +2 -2
- package/lib/segment/Segment.d.ts +29 -15
- package/lib/segment/SegmentLonLat.d.ts +0 -1
- package/lib/shadeModeConstants.d.ts +7 -0
- package/lib/shaders/applyDeferredDepth.d.ts +2 -0
- package/lib/shaders/atmos/atmos.d.ts +3 -3
- package/lib/shaders/billboard/billboard.d.ts +4 -3
- package/lib/shaders/deferredShading/deferredShading.d.ts +2 -0
- package/lib/shaders/deferredShading/deferredShadingAtmos.d.ts +3 -0
- package/lib/shaders/depth.d.ts +2 -2
- package/lib/shaders/geo_object/geo_object.d.ts +8 -4
- package/lib/shaders/label/label.d.ts +4 -4
- package/lib/shaders/pointCloud.d.ts +2 -2
- package/lib/shaders/polyline/polyline.d.ts +7 -3
- package/lib/shaders/ray/ray.d.ts +3 -2
- package/lib/shaders/screenFrame.d.ts +2 -2
- package/lib/shaders/segment/segment.d.ts +7 -0
- package/lib/shaders/skybox.d.ts +2 -2
- package/lib/shaders/strip/strip.d.ts +3 -0
- package/lib/shaders/tone_mapping/toneMapping.d.ts +2 -2
- package/lib/shaders/weightedOITResolve.d.ts +2 -0
- package/lib/terrain/BilTerrain.d.ts +1 -1
- package/lib/terrain/EmptyTerrain.d.ts +5 -6
- package/lib/terrain/GlobusTerrain.d.ts +18 -23
- package/lib/terrain/RgbTerrain.d.ts +8 -8
- package/lib/terrain/index.d.ts +5 -5
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/ui/Button.d.ts +7 -5
- package/lib/ui/ButtonGroup.d.ts +1 -1
- package/lib/ui/Checkbox.d.ts +2 -2
- package/lib/ui/Color.d.ts +2 -2
- package/lib/ui/Dialog.d.ts +30 -3
- package/lib/ui/Input.d.ts +7 -2
- package/lib/ui/Slider.d.ts +5 -2
- package/lib/ui/ToggleButton.d.ts +2 -2
- package/lib/ui/View.d.ts +1 -1
- package/lib/ui/icons.d.ts +1 -1
- package/lib/ui/index.d.ts +9 -9
- package/lib/utils/FontAtlas.d.ts +57 -8
- package/lib/utils/GeoImageCreator.d.ts +2 -2
- package/lib/utils/ImagesCacheManager.d.ts +3 -3
- package/lib/utils/Loader.d.ts +2 -2
- package/lib/utils/PlainSegmentWorker.d.ts +2 -2
- package/lib/utils/TerrainWorker.d.ts +2 -2
- package/lib/utils/TextureAtlas.d.ts +7 -2
- package/lib/utils/TextureResourceManager.d.ts +162 -0
- package/lib/utils/VectorTileCreator.d.ts +1 -1
- package/lib/utils/colorSpace.d.ts +9 -0
- package/lib/utils/gltf/gltfParser.d.ts +9 -2
- package/lib/utils/gltf/types.d.ts +20 -2
- package/lib/utils/shared.d.ts +11 -5
- package/lib/utils/textureResourceMeta.d.ts +9 -0
- package/lib/webgl/BaseFramebuffer.d.ts +7 -0
- package/lib/webgl/Framebuffer.d.ts +9 -6
- package/lib/webgl/Handler.d.ts +81 -99
- package/lib/webgl/ShaderProgram.d.ts +190 -0
- package/lib/webgl/index.d.ts +2 -2
- package/lib/webgl/variableHandlers.d.ts +2 -1
- package/package.json +77 -76
- package/lib/assets/LabelWorker.worker-BT1uJgYn.js.map +0 -1
- package/lib/assets/PlainSegmentWorker.worker-CT1cj8jj.js.map +0 -1
- package/lib/assets/TerrainWorker.worker-DmikdfB2.js.map +0 -1
- package/lib/control/OldMouseNavigation.d.ts +0 -65
- package/lib/control/ZoomControl.d.ts +0 -28
- package/lib/control/geoObjectEditor/GeoObjectEditor.d.ts +0 -13
- package/lib/control/visibleExtent/drawnode.d.ts +0 -7
- package/lib/entity/Polyline.d.ts +0 -417
- package/lib/light/LightSource.d.ts +0 -36
- package/lib/res/fonts/Roboto-Regular.ttf.cfg +0 -1340
- package/lib/res/fonts/Roboto-Regular.ttf.png +0 -0
- package/lib/res/fonts/arial.ttf.cfg +0 -1570
- package/lib/res/fonts/arial.ttf.png +0 -0
- package/lib/scene/BaseNode.d.ts +0 -61
- package/lib/shaders/drawnode/drawnode.d.ts +0 -8
- package/lib/webgl/Program.d.ts +0 -161
- package/lib/webgl/ProgramController.d.ts +0 -87
- /package/lib/control/{geoObjectEditor → entityEditor}/ArrowEntity.d.ts +0 -0
- /package/lib/control/{geoObjectEditor → entityEditor}/AxisTrackEntity.d.ts +0 -0
- /package/lib/control/{geoObjectEditor → entityEditor}/MoveAxisEntity.d.ts +0 -0
- /package/lib/control/{geoObjectEditor → entityEditor}/MovePlaneEntity.d.ts +0 -0
- /package/lib/control/{geoObjectEditor → entityEditor}/RotateEntity.d.ts +0 -0
- /package/lib/entity/{LabelWorker.worker.d.ts → label/LabelWorker.worker.d.ts} +0 -0
|
@@ -1,78 +1,88 @@
|
|
|
1
|
-
import { BillboardHandler } from "./BillboardHandler";
|
|
1
|
+
import { BillboardHandler } from "./billboard/BillboardHandler";
|
|
2
2
|
import type { EventsHandler } from "../Events";
|
|
3
|
-
import { Entity } from "./Entity";
|
|
3
|
+
import type { Entity } from "./Entity";
|
|
4
4
|
import { Ellipsoid } from "../ellipsoid/Ellipsoid";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { Extent } from "../Extent";
|
|
6
|
+
import type { EntityCollectionNode } from "../quadTree/EntityCollectionNode";
|
|
7
|
+
import { GeoObjectHandler } from "./geoObject/GeoObjectHandler";
|
|
8
|
+
import { LabelHandler } from "./label/LabelHandler";
|
|
8
9
|
import { Vec3 } from "../math/Vec3";
|
|
9
10
|
import type { NumberArray3 } from "../math/Vec3";
|
|
10
|
-
import { PointCloudHandler } from "./PointCloudHandler";
|
|
11
|
-
import { PolylineHandler } from "./PolylineHandler";
|
|
12
|
-
import { RayHandler } from "./RayHandler";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
11
|
+
import { PointCloudHandler } from "./pointCloud/PointCloudHandler";
|
|
12
|
+
import { PolylineHandler } from "./polyline/PolylineHandler";
|
|
13
|
+
import { RayHandler } from "./ray/RayHandler";
|
|
14
|
+
import { Scene } from "../scene/Scene";
|
|
15
|
+
import type { Node } from "../quadTree/Node";
|
|
16
|
+
import { StripHandler } from "./strip/StripHandler";
|
|
17
|
+
import type { Vector } from "../layer/Vector";
|
|
18
|
+
import { type ShadeMode, type ShadeModeInput } from "../shadeModeConstants";
|
|
16
19
|
export type EntityCollectionEvents = EventsHandler<EntityCollectionEventList>;
|
|
17
20
|
interface IEntityCollectionParams {
|
|
18
|
-
|
|
21
|
+
depthOffset?: number;
|
|
19
22
|
visibility?: boolean;
|
|
20
23
|
labelMaxLetters?: number;
|
|
21
24
|
pickingEnabled?: boolean;
|
|
22
25
|
scaleByDistance?: NumberArray3;
|
|
23
26
|
pickingScale?: number | NumberArray3;
|
|
24
27
|
opacity?: number;
|
|
25
|
-
|
|
28
|
+
shadeMode?: ShadeModeInput;
|
|
26
29
|
entities?: Entity[];
|
|
27
30
|
depthOrder?: number;
|
|
31
|
+
disableCullFace?: boolean;
|
|
28
32
|
}
|
|
29
33
|
/**
|
|
30
34
|
* An observable collection of og.Entity instances where each entity has a unique id.
|
|
31
|
-
* Entity collection
|
|
35
|
+
* Entity collection provides handlers for each type of entity like billboard, label or 3ds object.
|
|
32
36
|
* @constructor
|
|
33
37
|
* @param {Object} [options] - Entity options:
|
|
34
38
|
* @param {Array.<Entity>} [options.entities] - Entities array.
|
|
35
39
|
* @param {boolean} [options.visibility=true] - Entity visibility.
|
|
40
|
+
* @param {number} [options.labelMaxLetters] - Maximum label letters per line used by the label handler.
|
|
41
|
+
* @param {boolean} [options.pickingEnabled] - Enables/disables picking for all entity handlers.
|
|
36
42
|
* @param {Array.<number>} [options.scaleByDistance] - Entity scale by distance parameters. (exactly 3 entries)
|
|
37
43
|
* First index - near distance to the entity, after entity becomes full scale.
|
|
38
44
|
* Second index - far distance to the entity, when entity becomes zero scale.
|
|
39
45
|
* Third index - far distance to the entity, when entity becomes invisible.
|
|
46
|
+
* @param {number|Array.<number>} [options.pickingScale] - Picking scale value or xyz scale array.
|
|
40
47
|
* @param {number} [options.opacity] - Entity global opacity.
|
|
41
|
-
* @param {
|
|
42
|
-
* @param {
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* @
|
|
46
|
-
*
|
|
47
|
-
* @fires
|
|
48
|
-
* @fires
|
|
49
|
-
* @fires
|
|
50
|
-
* @fires
|
|
51
|
-
* @fires
|
|
52
|
-
* @fires
|
|
53
|
-
* @fires
|
|
54
|
-
* @fires
|
|
55
|
-
* @fires
|
|
56
|
-
* @fires
|
|
57
|
-
* @fires
|
|
58
|
-
* @fires
|
|
59
|
-
* @fires
|
|
60
|
-
* @fires
|
|
61
|
-
* @fires
|
|
62
|
-
* @fires
|
|
63
|
-
* @fires
|
|
64
|
-
* @fires
|
|
65
|
-
* @fires
|
|
66
|
-
* @fires
|
|
67
|
-
* @fires
|
|
68
|
-
* @fires
|
|
69
|
-
* @fires
|
|
70
|
-
* @fires
|
|
71
|
-
* @fires
|
|
72
|
-
* @fires
|
|
73
|
-
* @fires
|
|
74
|
-
* @fires
|
|
75
|
-
* @fires
|
|
48
|
+
* @param {number|string} [options.shadeMode=1] - Geo object shading mode: `0|none|unlit`, `0.5|phong`, `1|pbr`.
|
|
49
|
+
* @param {number} [options.depthOrder=0] - Rendering order for grouped vector layer collections.
|
|
50
|
+
* @param {Number} [options.depthOffset=0.0] - Signed world-space depth offset along the camera ray.
|
|
51
|
+
* Negative values move geometry closer to the camera, positive values move it farther.
|
|
52
|
+
* @param {boolean} [options.disableCullFace=false] - Disables back-face culling for geo object rendering.
|
|
53
|
+
* //@fires entitymove
|
|
54
|
+
* @fires draw
|
|
55
|
+
* @fires drawend
|
|
56
|
+
* @fires add
|
|
57
|
+
* @fires remove
|
|
58
|
+
* @fires entityadd
|
|
59
|
+
* @fires entityremove
|
|
60
|
+
* @fires visibilitychange
|
|
61
|
+
* @fires mousemove
|
|
62
|
+
* @fires mouseenter
|
|
63
|
+
* @fires mouseleave
|
|
64
|
+
* @fires lclick
|
|
65
|
+
* @fires rclick
|
|
66
|
+
* @fires mclick
|
|
67
|
+
* @fires ldblclick
|
|
68
|
+
* @fires rdblclick
|
|
69
|
+
* @fires mdblclick
|
|
70
|
+
* @fires lup
|
|
71
|
+
* @fires rup
|
|
72
|
+
* @fires mup
|
|
73
|
+
* @fires ldown
|
|
74
|
+
* @fires rdown
|
|
75
|
+
* @fires mdown
|
|
76
|
+
* @fires lhold
|
|
77
|
+
* @fires rhold
|
|
78
|
+
* @fires mhold
|
|
79
|
+
* @fires mousewheel
|
|
80
|
+
* @fires touchmove
|
|
81
|
+
* @fires touchstart
|
|
82
|
+
* @fires touchend
|
|
83
|
+
* @fires doubletouch
|
|
84
|
+
* @fires touchleave
|
|
85
|
+
* @fires touchenter
|
|
76
86
|
*/
|
|
77
87
|
declare class EntityCollection {
|
|
78
88
|
static __counter__: number;
|
|
@@ -85,9 +95,9 @@ declare class EntityCollection {
|
|
|
85
95
|
/**
|
|
86
96
|
* Render node context.
|
|
87
97
|
* @public
|
|
88
|
-
* @type {
|
|
98
|
+
* @type {Scene}
|
|
89
99
|
*/
|
|
90
|
-
|
|
100
|
+
scene: Scene | null;
|
|
91
101
|
/**
|
|
92
102
|
* Visibility option.
|
|
93
103
|
* @public
|
|
@@ -95,11 +105,13 @@ declare class EntityCollection {
|
|
|
95
105
|
*/
|
|
96
106
|
_visibility: boolean;
|
|
97
107
|
/**
|
|
98
|
-
*
|
|
108
|
+
* Signed world-space depth offset along the camera ray.
|
|
109
|
+
* Negative values move geometry closer to the camera, positive values move it farther.
|
|
110
|
+
* 0.0 means no offset.
|
|
99
111
|
* @public
|
|
100
112
|
* @type {Number}
|
|
101
113
|
*/
|
|
102
|
-
|
|
114
|
+
depthOffset: number;
|
|
103
115
|
/**
|
|
104
116
|
* Billboards handler
|
|
105
117
|
* @public
|
|
@@ -181,15 +193,22 @@ declare class EntityCollection {
|
|
|
181
193
|
*/
|
|
182
194
|
_layer?: Vector;
|
|
183
195
|
_quadNode?: EntityCollectionNode;
|
|
184
|
-
|
|
196
|
+
_shadeMode: ShadeMode;
|
|
197
|
+
/**
|
|
198
|
+
* Disables `gl.CULL_FACE` for geo objects rendering passes (opaque/transparent).
|
|
199
|
+
* Useful for rendering models with inverted/inconsistent triangle winding.
|
|
200
|
+
* @public
|
|
201
|
+
* @type {boolean}
|
|
202
|
+
*/
|
|
203
|
+
disableCullFace: boolean;
|
|
185
204
|
protected _depthOrder: number;
|
|
186
205
|
constructor(options?: IEntityCollectionParams);
|
|
187
206
|
get depthOrder(): number;
|
|
188
207
|
set depthOrder(depghOrder: number);
|
|
189
208
|
isEmpty(): boolean;
|
|
190
209
|
get id(): number;
|
|
191
|
-
get
|
|
192
|
-
set
|
|
210
|
+
get shadeMode(): ShadeMode;
|
|
211
|
+
set shadeMode(m: ShadeModeInput);
|
|
193
212
|
isEqual(ec: EntityCollection | null): boolean;
|
|
194
213
|
/**
|
|
195
214
|
* Sets collection visibility.
|
|
@@ -200,7 +219,7 @@ declare class EntityCollection {
|
|
|
200
219
|
/**
|
|
201
220
|
* Returns collection visibility.
|
|
202
221
|
* @public
|
|
203
|
-
* @returns {boolean}
|
|
222
|
+
* @returns {boolean} Collection visibility flag.
|
|
204
223
|
*/
|
|
205
224
|
getVisibility(): boolean;
|
|
206
225
|
/**
|
|
@@ -218,7 +237,7 @@ declare class EntityCollection {
|
|
|
218
237
|
/**
|
|
219
238
|
* Gets collection opacity.
|
|
220
239
|
* @public
|
|
221
|
-
* @returns {number}
|
|
240
|
+
* @returns {number} Collection opacity.
|
|
222
241
|
*/
|
|
223
242
|
getOpacity(): number;
|
|
224
243
|
/**
|
|
@@ -229,27 +248,33 @@ declare class EntityCollection {
|
|
|
229
248
|
* @param {number} [farInvisible] - Entity visibility distance.
|
|
230
249
|
*/
|
|
231
250
|
setScaleByDistance(near: number, far: number, farInvisible?: number): void;
|
|
251
|
+
setVisibleSphere(p: Vec3, r: number): void;
|
|
252
|
+
/**
|
|
253
|
+
* Aligns collection entities to terrain.
|
|
254
|
+
* Currently applies to polyline entities.
|
|
255
|
+
*/
|
|
256
|
+
applyTerrainCollision(nodes: Node[], visibleExtent: Extent): void;
|
|
232
257
|
appendChildEntity(entity: Entity): void;
|
|
233
258
|
protected _addRecursively(entity: Entity): void;
|
|
234
259
|
/**
|
|
235
260
|
* Adds entity to the collection and returns collection.
|
|
236
261
|
* @public
|
|
237
262
|
* @param {Entity} entity - Entity.
|
|
238
|
-
* @returns {EntityCollection}
|
|
263
|
+
* @returns {EntityCollection} Current collection instance.
|
|
239
264
|
*/
|
|
240
265
|
add(entity: Entity): EntityCollection;
|
|
241
266
|
/**
|
|
242
267
|
* Adds entities array to the collection and returns collection.
|
|
243
268
|
* @public
|
|
244
269
|
* @param {Array.<Entity>} entities - Entities array.
|
|
245
|
-
* @returns {EntityCollection}
|
|
270
|
+
* @returns {EntityCollection} Current collection instance.
|
|
246
271
|
*/
|
|
247
272
|
addEntities(entities: Entity[]): EntityCollection;
|
|
248
273
|
/**
|
|
249
|
-
* Returns true if the entity belongs this collection, otherwise returns false.
|
|
274
|
+
* Returns true if the entity belongs to this collection, otherwise returns false.
|
|
250
275
|
* @public
|
|
251
276
|
* @param {Entity} entity - Entity.
|
|
252
|
-
* @returns {boolean}
|
|
277
|
+
* @returns {boolean} `true` if the entity belongs to this collection.
|
|
253
278
|
*/
|
|
254
279
|
belongs(entity: Entity): boolean;
|
|
255
280
|
protected _removeRecursively(entity: Entity): void;
|
|
@@ -276,17 +301,17 @@ declare class EntityCollection {
|
|
|
276
301
|
/**
|
|
277
302
|
* Adds this collection to render node.
|
|
278
303
|
* @public
|
|
279
|
-
* @param {
|
|
280
|
-
* @param {boolean} [isHidden] -
|
|
281
|
-
* @returns {EntityCollection}
|
|
304
|
+
* @param {Scene} scene - Render node.
|
|
305
|
+
* @param {boolean} [isHidden] - Used in vector layers with planet-specific rendering.
|
|
306
|
+
* @returns {EntityCollection} Current collection instance.
|
|
282
307
|
*/
|
|
283
|
-
addTo(
|
|
308
|
+
addTo(scene: Scene, isHidden?: boolean): this;
|
|
284
309
|
/**
|
|
285
|
-
* This function is called in the
|
|
310
|
+
* This function is called in the Scene assign function.
|
|
286
311
|
* @public
|
|
287
|
-
* @param {
|
|
312
|
+
* @param {Scene} scene
|
|
288
313
|
*/
|
|
289
|
-
|
|
314
|
+
bindScene(scene: Scene): void;
|
|
290
315
|
protected _onChangeRelativeCenter: (c: Vec3) => void;
|
|
291
316
|
/**
|
|
292
317
|
* Updates coordinates all lonLat entities in collection after collection attached to the planet node.
|
|
@@ -317,7 +342,7 @@ declare class EntityCollection {
|
|
|
317
342
|
/**
|
|
318
343
|
* Gets entity array.
|
|
319
344
|
* @public
|
|
320
|
-
* @returns {Array.<Entity>}
|
|
345
|
+
* @returns {Array.<Entity>} Entity array copy.
|
|
321
346
|
*/
|
|
322
347
|
getEntities(): Entity[];
|
|
323
348
|
/**
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Entity } from "
|
|
2
|
-
import { Vec2 } from "
|
|
3
|
-
import { Vec3 } from "
|
|
4
|
-
import { Vec4 } from "
|
|
5
|
-
import type { NumberArray2 } from "
|
|
6
|
-
import type { NumberArray3 } from "
|
|
7
|
-
import type { NumberArray4 } from "
|
|
1
|
+
import { Entity } from "../Entity";
|
|
2
|
+
import { Vec2 } from "../../math/Vec2";
|
|
3
|
+
import { Vec3 } from "../../math/Vec3";
|
|
4
|
+
import { Vec4 } from "../../math/Vec4";
|
|
5
|
+
import type { NumberArray2 } from "../../math/Vec2";
|
|
6
|
+
import type { NumberArray3 } from "../../math/Vec3";
|
|
7
|
+
import type { NumberArray4 } from "../../math/Vec4";
|
|
8
8
|
import { BaseBillboardHandler } from "./BaseBillboardHandler";
|
|
9
9
|
export interface IBaseBillboardParams {
|
|
10
10
|
position?: NumberArray3 | Vec3;
|
|
11
11
|
rotation?: number;
|
|
12
12
|
color?: string | NumberArray4 | Vec4;
|
|
13
13
|
alignedAxis?: NumberArray3 | Vec3;
|
|
14
|
-
offset?: NumberArray2 |
|
|
14
|
+
offset?: NumberArray2 | Vec2;
|
|
15
15
|
visibility?: boolean;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
@@ -22,7 +22,7 @@ export interface IBaseBillboardParams {
|
|
|
22
22
|
* @param {number} [options.rotation] - Screen angle rotation.
|
|
23
23
|
* @param {Vec4|string|Array.<number>} [options.color] - Billboard color.
|
|
24
24
|
* @param {Vec3|Array.<number>} [options.alignedAxis] - Billboard aligned vector.
|
|
25
|
-
* @param {
|
|
25
|
+
* @param {Vec2|Array.<number>} [options.offset] - Billboard center screen offset.
|
|
26
26
|
* @param {boolean} [options.visibility] - Visibility.
|
|
27
27
|
*/
|
|
28
28
|
declare class BaseBillboard {
|
|
@@ -55,11 +55,11 @@ declare class BaseBillboard {
|
|
|
55
55
|
*/
|
|
56
56
|
protected _alignedAxis: Vec3;
|
|
57
57
|
/**
|
|
58
|
-
* Billboard center screen space offset.
|
|
58
|
+
* Billboard center screen space offset.
|
|
59
59
|
* @public
|
|
60
|
-
* @type {
|
|
60
|
+
* @type {Vec2}
|
|
61
61
|
*/
|
|
62
|
-
_offset:
|
|
62
|
+
_offset: Vec2;
|
|
63
63
|
/**
|
|
64
64
|
* Billboard visibility.
|
|
65
65
|
* @protected
|
|
@@ -117,21 +117,20 @@ declare class BaseBillboard {
|
|
|
117
117
|
* @public
|
|
118
118
|
* @param {number} x - X offset.
|
|
119
119
|
* @param {number} y - Y offset.
|
|
120
|
-
* @param {number} [z] - Z offset.
|
|
121
120
|
*/
|
|
122
|
-
setOffset(x: number, y: number
|
|
121
|
+
setOffset(x: number, y: number): void;
|
|
123
122
|
/**
|
|
124
123
|
* Sets screen space offset.
|
|
125
124
|
* @public
|
|
126
125
|
* @param {Vec2} offset - Offset size.
|
|
127
126
|
*/
|
|
128
|
-
|
|
127
|
+
setOffset2v(offset: Vec2): void;
|
|
129
128
|
/**
|
|
130
129
|
* Returns billboard screen space offset size.
|
|
131
130
|
* @public
|
|
132
|
-
* @returns {
|
|
131
|
+
* @returns {Vec2}
|
|
133
132
|
*/
|
|
134
|
-
getOffset():
|
|
133
|
+
getOffset(): Vec2;
|
|
135
134
|
/**
|
|
136
135
|
* Sets billboard screen space rotation in radians.
|
|
137
136
|
* @public
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import type { TypedArray } from "
|
|
2
|
-
import { EntityCollection } from "
|
|
3
|
-
import { Renderer } from "
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
1
|
+
import type { TypedArray } from "../../utils/shared";
|
|
2
|
+
import { EntityCollection } from "../EntityCollection";
|
|
3
|
+
import { Renderer } from "../../renderer/Renderer";
|
|
4
|
+
import { Vec2 } from "../../math/Vec2";
|
|
5
|
+
import { Vec3 } from "../../math/Vec3";
|
|
6
|
+
import { Vec4 } from "../../math/Vec4";
|
|
7
|
+
import type { WebGLBufferExt } from "../../webgl/Handler";
|
|
8
|
+
import type { ShaderProgram } from "../../webgl/ShaderProgram";
|
|
7
9
|
import { BaseBillboard } from "./BaseBillboard";
|
|
8
10
|
/**
|
|
9
11
|
* @class BaseBillboardHandler
|
|
@@ -20,6 +22,7 @@ declare class BaseBillboardHandler {
|
|
|
20
22
|
_entityCollection: EntityCollection;
|
|
21
23
|
protected _renderer: Renderer | null;
|
|
22
24
|
protected _billboards: BaseBillboard[];
|
|
25
|
+
protected _opaqueCounterIndex: number;
|
|
23
26
|
protected _positionHighBuffer: WebGLBufferExt | null;
|
|
24
27
|
protected _positionLowBuffer: WebGLBufferExt | null;
|
|
25
28
|
protected _sizeBuffer: WebGLBufferExt | null;
|
|
@@ -40,9 +43,16 @@ declare class BaseBillboardHandler {
|
|
|
40
43
|
protected _pickingColorArr: Float32Array;
|
|
41
44
|
protected _buffersUpdateCallbacks: Function[];
|
|
42
45
|
protected _changedBuffers: boolean[];
|
|
46
|
+
protected _configureDepthPass(depthWrite: boolean): void;
|
|
47
|
+
protected _restoreDepthPass(depthWrite: boolean): void;
|
|
43
48
|
constructor(entityCollection: EntityCollection);
|
|
44
49
|
isEqual(handler: BaseBillboardHandler): boolean;
|
|
45
50
|
static concArr(dest: number[], curr: number[]): void;
|
|
51
|
+
protected _isBillboardOpaque(billboard: BaseBillboard): boolean;
|
|
52
|
+
protected _swapArrayItems(arr: Float32Array, itemSize: number, firstIndex: number, secondIndex: number): void;
|
|
53
|
+
protected _swapBillboardData(firstIndex: number, secondIndex: number): void;
|
|
54
|
+
protected _insertBillboardByOpacity(billboardIndex: number, isOpaque: boolean): void;
|
|
55
|
+
protected _updateBillboardOpacityState(billboardIndex: number, isOpaque: boolean): boolean;
|
|
46
56
|
initProgram(): void;
|
|
47
57
|
setRenderer(renderer: Renderer): void;
|
|
48
58
|
refresh(): void;
|
|
@@ -51,9 +61,14 @@ declare class BaseBillboardHandler {
|
|
|
51
61
|
protected _deleteBuffers(): void;
|
|
52
62
|
update(): void;
|
|
53
63
|
add(billboard: BaseBillboard): void;
|
|
54
|
-
protected _displayPASS(): void;
|
|
64
|
+
protected _displayPASS(startBillboardIndex: number, endBillboardIndex: number, billboardProgram: ShaderProgram, depthWrite?: boolean): void;
|
|
55
65
|
protected _pickingPASS(): void;
|
|
56
|
-
|
|
66
|
+
drawForward(): void;
|
|
67
|
+
protected _getOpaqueProgram(): ShaderProgram;
|
|
68
|
+
protected _getTransparentProgram(): ShaderProgram;
|
|
69
|
+
drawOpaque(): void;
|
|
70
|
+
drawTransparent(): void;
|
|
71
|
+
drawTransparentForward(): void;
|
|
57
72
|
drawPicking(): void;
|
|
58
73
|
reindexBillboardsArray(startIndex: number): void;
|
|
59
74
|
protected _removeBillboard(billboard: BaseBillboard): void;
|
|
@@ -62,7 +77,7 @@ declare class BaseBillboardHandler {
|
|
|
62
77
|
setPositionArr(index: number, positionHigh: Vec3, positionLow: Vec3): void;
|
|
63
78
|
setPickingColorArr(index: number, color: Vec3): void;
|
|
64
79
|
setSizeArr(index: number, width: number, height: number): void;
|
|
65
|
-
setOffsetArr(index: number, offset:
|
|
80
|
+
setOffsetArr(index: number, offset: Vec2): void;
|
|
66
81
|
setRgbaArr(index: number, rgba: Vec4): void;
|
|
67
82
|
setRotationArr(index: number, rotation: number): void;
|
|
68
83
|
setTexCoordArr(index: number, tcoordArr: number[] | TypedArray): void;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { BaseBillboard } from "./BaseBillboard";
|
|
2
2
|
import type { IBaseBillboardParams } from "./BaseBillboard";
|
|
3
3
|
import { BillboardHandler } from "./BillboardHandler";
|
|
4
|
-
import type { HTMLImageElementExt } from "
|
|
4
|
+
import type { HTMLImageElementExt } from "../../utils/ImagesCacheManager";
|
|
5
5
|
export interface IBillboardParams extends IBaseBillboardParams {
|
|
6
6
|
src?: string;
|
|
7
7
|
image?: HTMLImageElement;
|
|
8
|
-
size?: [number, number];
|
|
9
|
-
width?: number;
|
|
10
|
-
height?: number;
|
|
8
|
+
size?: [number, number] | null;
|
|
9
|
+
width?: number | null;
|
|
10
|
+
height?: number | null;
|
|
11
|
+
scale?: number | null;
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
13
14
|
* Represents basic quad billboard image.
|
|
@@ -18,7 +19,7 @@ export interface IBillboardParams extends IBaseBillboardParams {
|
|
|
18
19
|
* @param {number} [options.rotation] - Screen angle rotation.
|
|
19
20
|
* @param {Vec4|string|Array.<number>} [options.color] - Billboard color.
|
|
20
21
|
* @param {Vec3|Array.<number>} [options.alignedAxis] - Billboard aligned vector.
|
|
21
|
-
* @param {
|
|
22
|
+
* @param {Vec2|Array.<number>} [options.offset] - Billboard center screen offset.
|
|
22
23
|
* @param {boolean} [options.visibility] - Visibility.
|
|
23
24
|
* @param {string} [options.src] - Billboard image url source.
|
|
24
25
|
* @param {Image} [options.image] - Billboard image object.
|
|
@@ -39,9 +40,9 @@ declare class Billboard extends BaseBillboard {
|
|
|
39
40
|
* @protected
|
|
40
41
|
* @type {Object}
|
|
41
42
|
*/
|
|
42
|
-
protected _image: HTMLImageElement & {
|
|
43
|
+
protected _image: (HTMLImageElement & {
|
|
43
44
|
__nodeIndex?: number;
|
|
44
|
-
} | null;
|
|
45
|
+
}) | null;
|
|
45
46
|
protected _scale: number;
|
|
46
47
|
/**
|
|
47
48
|
* Billboard screen width.
|
|
@@ -56,6 +57,7 @@ declare class Billboard extends BaseBillboard {
|
|
|
56
57
|
*/
|
|
57
58
|
_height: number;
|
|
58
59
|
constructor(options?: IBillboardParams);
|
|
60
|
+
protected _applyImageSize(image: HTMLImageElementExt | HTMLImageElement | null): void;
|
|
59
61
|
/**
|
|
60
62
|
* Sets billboard image url source.
|
|
61
63
|
* @public
|
|
@@ -77,6 +79,8 @@ declare class Billboard extends BaseBillboard {
|
|
|
77
79
|
* @param {number} height - Billboard height.
|
|
78
80
|
*/
|
|
79
81
|
setSize(width: number, height: number): void;
|
|
82
|
+
getScale(): number;
|
|
83
|
+
setOffset(x: number, y: number): void;
|
|
80
84
|
/**
|
|
81
85
|
* Returns billboard screen size.
|
|
82
86
|
* @public
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Entity } from "
|
|
2
|
-
import { Quat
|
|
1
|
+
import { Entity } from "../Entity";
|
|
2
|
+
import { Quat } from "../../math/Quat";
|
|
3
|
+
import { Vec3, type NumberArray3 } from "../../math/Vec3";
|
|
4
|
+
import { Vec4, type NumberArray4 } from "../../math/Vec4";
|
|
3
5
|
import { GeoObjectHandler } from "./GeoObjectHandler";
|
|
4
6
|
import { InstanceData } from "./InstanceData";
|
|
5
|
-
import
|
|
6
|
-
import type { NumberArray4 } from "../math/Vec4";
|
|
7
|
-
import { Object3d } from "../Object3d";
|
|
7
|
+
import { Object3d } from "../../Object3d";
|
|
8
8
|
export declare const LOCAL_FORWARD: Vec3;
|
|
9
9
|
/**
|
|
10
10
|
* Interface for GeoObject parameters.
|
|
11
|
-
* @
|
|
11
|
+
* @interface IGeoObjectParams
|
|
12
12
|
* @property {Object3d} [object3d] - 3D object associated with the geo object.
|
|
13
13
|
* @property {string} [objSrc] - Source url of the 3D object.
|
|
14
14
|
* @property {string} [tag] - Unique instancing drawing identifier tag.
|
|
@@ -153,6 +153,7 @@ declare class GeoObject {
|
|
|
153
153
|
* @param {boolean} visibility - Visibility flag.
|
|
154
154
|
*/
|
|
155
155
|
setVisibility(visibility: boolean): void;
|
|
156
|
+
get instanceData(): InstanceData | null;
|
|
156
157
|
/**
|
|
157
158
|
* Returns geo object visibility.
|
|
158
159
|
* @public
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { TypedArray } from "../../utils/shared";
|
|
2
|
+
import type { EntityCollection } from "../EntityCollection";
|
|
2
3
|
import { GeoObject } from "./GeoObject";
|
|
3
|
-
import { Vec3 } from "
|
|
4
|
-
import { Vec4 } from "
|
|
5
|
-
import { Quat } from "
|
|
6
|
-
import { Object3d } from "
|
|
4
|
+
import { Vec3 } from "../../math/Vec3";
|
|
5
|
+
import { Vec4 } from "../../math/Vec4";
|
|
6
|
+
import { Quat } from "../../math/Quat";
|
|
7
|
+
import { Object3d } from "../../Object3d";
|
|
7
8
|
import { InstanceData } from "./InstanceData";
|
|
8
|
-
import { Renderer } from "
|
|
9
|
-
import {
|
|
9
|
+
import type { Renderer } from "../../renderer/Renderer";
|
|
10
|
+
import type { Scene } from "../../scene/Scene";
|
|
11
|
+
import type { ShaderProgram } from "../../webgl/ShaderProgram";
|
|
10
12
|
export declare const VERTEX_BUFFER = 0;
|
|
11
13
|
export declare const RTC_POSITION_BUFFER = 1;
|
|
12
14
|
export declare const RGBA_BUFFER = 2;
|
|
@@ -29,7 +31,7 @@ export declare class GeoObjectHandler {
|
|
|
29
31
|
*/
|
|
30
32
|
pickingEnabled: boolean;
|
|
31
33
|
protected _entityCollection: EntityCollection;
|
|
32
|
-
|
|
34
|
+
_scene: Scene | null;
|
|
33
35
|
_renderer: Renderer | null;
|
|
34
36
|
protected _geoObjects: GeoObject[];
|
|
35
37
|
protected _instanceDataMap: Map<string, InstanceData>;
|
|
@@ -38,18 +40,32 @@ export declare class GeoObjectHandler {
|
|
|
38
40
|
protected _relativeCenter: Vec3;
|
|
39
41
|
protected _rtcEyePositionHigh: Float32Array;
|
|
40
42
|
protected _rtcEyePositionLow: Float32Array;
|
|
43
|
+
/**
|
|
44
|
+
* @param {EntityCollection} entityCollection - Parent entity collection.
|
|
45
|
+
*/
|
|
41
46
|
constructor(entityCollection: EntityCollection);
|
|
47
|
+
protected _isOpaqueAlpha(alpha: number): boolean;
|
|
48
|
+
protected _markPerInstanceBuffersChanged(tagData: InstanceData): void;
|
|
49
|
+
protected _swapArrayItems(arr: number[] | TypedArray, itemSize: number, firstIndex: number, secondIndex: number): void;
|
|
50
|
+
protected _swapInstanceData(tagData: InstanceData, firstIndex: number, secondIndex: number): void;
|
|
51
|
+
protected _insertInstanceByOpacity(tagData: InstanceData, instanceIndex: number, isOpaque: boolean): void;
|
|
52
|
+
protected _updateInstanceOpacityState(tagData: InstanceData, instanceIndex: number, isOpaque: boolean): boolean;
|
|
42
53
|
initProgram(): void;
|
|
43
|
-
|
|
54
|
+
bindScene(scene: Scene): void;
|
|
44
55
|
setColorTextureTag(src: string | HTMLImageElement, tag: string): void;
|
|
45
56
|
setNormalTextureTag(src: string | HTMLImageElement, tag: string): void;
|
|
46
57
|
setMetallicRoughnessTextureTag(src: string | HTMLImageElement, tag: string): void;
|
|
58
|
+
setAmbientOcclusionTextureTag(src: string | HTMLImageElement, tag: string): void;
|
|
47
59
|
setObjectSrc(src: string, tag: string): void;
|
|
48
60
|
_updateInstanceData(object: Object3d, tag: string): void;
|
|
49
61
|
protected _addGeoObjectToArray(geoObject: GeoObject): void;
|
|
50
|
-
protected _bindCommon(): void;
|
|
62
|
+
protected _bindCommon(p: ShaderProgram): void;
|
|
63
|
+
protected _bindForwardParams(p: ShaderProgram): void;
|
|
64
|
+
protected _bindAtmosphereParams(p: ShaderProgram): void;
|
|
51
65
|
_displayOpaquePASS(): void;
|
|
52
66
|
_displayTransparentPASS(): void;
|
|
67
|
+
_displayTransparentForwardPASS(): void;
|
|
68
|
+
_displayForwardPASS(): void;
|
|
53
69
|
protected _depthPASS(): void;
|
|
54
70
|
drawDepth(): void;
|
|
55
71
|
drawPicking(): void;
|
|
@@ -69,8 +85,10 @@ export declare class GeoObjectHandler {
|
|
|
69
85
|
getRTCPosition(pos: Vec3, rtcPositionHigh: Vec3, rtcPositionLow: Vec3): void;
|
|
70
86
|
setRelativeCenter(c: Vec3): void;
|
|
71
87
|
protected _updateRTCEyePosition(): void;
|
|
72
|
-
|
|
88
|
+
drawForward(): void;
|
|
89
|
+
drawOpaque(): void;
|
|
73
90
|
drawTransparent(): void;
|
|
91
|
+
drawTransparentForward(): void;
|
|
74
92
|
add(geoObject: GeoObject): void;
|
|
75
93
|
remove(geoObject: GeoObject): void;
|
|
76
94
|
_clearDataTagQueue(): void;
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
import { GeoObject } from "./GeoObject";
|
|
2
|
-
import type { WebGLBufferExt, WebGLTextureExt } from "
|
|
3
|
-
import type { TypedArray } from "
|
|
4
|
-
import {
|
|
2
|
+
import type { WebGLBufferExt, WebGLTextureExt } from "../../webgl/Handler";
|
|
3
|
+
import type { TypedArray } from "../../utils/shared";
|
|
4
|
+
import { ShaderProgram } from "../../webgl/ShaderProgram";
|
|
5
5
|
import { GeoObjectHandler } from "./GeoObjectHandler";
|
|
6
6
|
export declare class InstanceData {
|
|
7
7
|
isFree: boolean;
|
|
8
8
|
_geoObjectHandler: GeoObjectHandler;
|
|
9
9
|
geoObjects: GeoObject[];
|
|
10
10
|
numInstances: number;
|
|
11
|
+
_opaqueInstanceCount: number;
|
|
11
12
|
_colorTexture: WebGLTextureExt | null;
|
|
12
13
|
_normalTexture: WebGLTextureExt | null;
|
|
14
|
+
_ambientOcclusionTexture: WebGLTextureExt | null;
|
|
13
15
|
_metallicRoughnessTexture: WebGLTextureExt | null;
|
|
14
16
|
_colorTextureSrc: string | null;
|
|
15
17
|
_normalTextureSrc: string | null;
|
|
18
|
+
_ambientOcclusionTextureSrc: string | null;
|
|
16
19
|
_metallicRoughnessTextureSrc: string | null;
|
|
17
20
|
_colorTextureImage: HTMLImageElement | null;
|
|
18
21
|
_normalTextureImage: HTMLImageElement | null;
|
|
22
|
+
_ambientOcclusionTextureImage: HTMLImageElement | null;
|
|
19
23
|
_metallicRoughnessTextureImage: HTMLImageElement | null;
|
|
20
24
|
_objectSrc?: string;
|
|
21
25
|
_sizeArr: number[] | TypedArray;
|
|
@@ -46,20 +50,20 @@ export declare class InstanceData {
|
|
|
46
50
|
_localPositionBuffer: WebGLBufferExt | null;
|
|
47
51
|
_buffersUpdateCallbacks: Function[];
|
|
48
52
|
_changedBuffers: boolean[];
|
|
49
|
-
|
|
50
|
-
_materialShininess: number;
|
|
53
|
+
_materialProperties: Float32Array;
|
|
51
54
|
constructor(geoObjectHandler: GeoObjectHandler);
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
drawTransparent(p:
|
|
59
|
-
protected _drawElementsInstanced(p:
|
|
55
|
+
setMetallic(metallic: number): void;
|
|
56
|
+
setRoughness(roughness: number): void;
|
|
57
|
+
setAmbientOcclusion(ambientOcclusion: number): void;
|
|
58
|
+
setMaterialProperties(ambientOcclusion: number, roughness: number, metallic: number): void;
|
|
59
|
+
drawOpaque(p: ShaderProgram): void;
|
|
60
|
+
drawForwardAll(p: ShaderProgram): void;
|
|
61
|
+
drawTransparent(p: ShaderProgram): void;
|
|
62
|
+
protected _drawElementsInstanced(p: ShaderProgram, startInstance: number, instanceCount: number): void;
|
|
60
63
|
loadColorTexture(): Promise<void>;
|
|
61
64
|
loadNormalTexture(): Promise<void>;
|
|
62
65
|
loadMetallicRoughnessTexture(): Promise<void>;
|
|
66
|
+
loadAmbientOcclusionTexture(): Promise<void>;
|
|
63
67
|
clear(): void;
|
|
64
68
|
_deleteBuffers(): void;
|
|
65
69
|
createVertexBuffer(): void;
|
|
@@ -79,4 +83,5 @@ export declare class InstanceData {
|
|
|
79
83
|
private _createColorTexture;
|
|
80
84
|
private _createNormalTexture;
|
|
81
85
|
private _createMetallicRoughnessTexture;
|
|
86
|
+
private _createAmbientOcclusionTexture;
|
|
82
87
|
}
|