@openglobus/og 0.28.7 → 1.0.0-rc10
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 +33 -18
- package/lib/Deferred.d.ts +2 -2
- package/lib/Events.d.ts +1 -1
- package/lib/Globe.d.ts +22 -11
- package/lib/Object3d.d.ts +18 -15
- package/lib/Popup.d.ts +2 -2
- package/lib/assets/LabelWorker.worker-C24YLEkW.js.map +1 -0
- package/lib/assets/PlainSegmentWorker.worker-DJHXd0bF.js.map +1 -0
- package/lib/assets/TerrainWorker.worker-B4Gp0jCy.js.map +1 -0
- package/lib/bv/index.d.ts +2 -2
- package/lib/camera/Camera.d.ts +320 -33
- package/lib/camera/Frustum.d.ts +136 -15
- package/lib/camera/PlanetCamera.d.ts +114 -11
- package/lib/camera/index.d.ts +2 -2
- package/lib/control/CompassButton.d.ts +2 -2
- package/lib/control/EarthCoordinates.d.ts +5 -2
- package/lib/control/FramebufferPreview.d.ts +20 -4
- 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 +7 -2
- package/lib/control/Navigation.d.ts +27 -12
- 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/depthCamera/DepthCamera.d.ts +118 -0
- package/lib/control/depthCamera/DepthCameraHandler.d.ts +25 -0
- package/lib/control/depthCamera/depth_camera.d.ts +2 -0
- 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/CameraEditorView.d.ts +62 -0
- package/lib/control/entityEditor/EntityEditor.d.ts +20 -0
- package/lib/control/entityEditor/EntityEditorDialog.d.ts +38 -0
- package/lib/control/{geoObjectEditor/GeoObjectEditorScene.d.ts → entityEditor/EntityEditorScene.d.ts} +28 -12
- package/lib/control/{geoObjectEditor/GeoObjectEditorDialog.d.ts → entityEditor/EntityEditorView.d.ts} +22 -23
- package/lib/control/entityEditor/ProjectorEditorView.d.ts +31 -0
- package/lib/control/{geoObjectEditor → entityEditor}/RotateEntity.d.ts +5 -1
- 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 +7 -6
- 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 +19 -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 +140 -72
- 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} +32 -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} +29 -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 +59 -42
- package/lib/layer/BaseGeoImage.d.ts +20 -17
- package/lib/layer/BaseTileMaterialLayer.d.ts +36 -0
- package/lib/layer/CanvasTiles.d.ts +20 -22
- 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 +106 -37
- package/lib/layer/WMS.d.ts +1 -1
- package/lib/layer/XYZ.d.ts +14 -31
- package/lib/layer/index.d.ts +12 -12
- package/lib/math/Line2.d.ts +10 -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 +2 -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 +8 -5
- package/lib/quadTree/QuadTreeStrategy.d.ts +6 -5
- package/lib/quadTree/earth/EarthEntityCollectionNodeLonLat.d.ts +4 -4
- package/lib/quadTree/earth/EarthEntityCollectionsTreeStrategy.d.ts +7 -4
- package/lib/quadTree/equi/EquiEntityCollectionsTreeStrategy.d.ts +3 -0
- 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 +18 -0
- package/lib/renderer/Renderer.d.ts +195 -100
- package/lib/renderer/RendererEvents.d.ts +16 -5
- package/lib/renderer/WOITPass.d.ts +14 -0
- package/lib/renderer/cascadeShadows/CascadeShadowManager.d.ts +34 -0
- package/lib/renderer/cascadeShadows/CascadeShadowMap.d.ts +112 -0
- package/lib/renderer/cascadeShadows/cascade_shadow_depth.d.ts +2 -0
- package/lib/renderer/projectors/Projector.d.ts +66 -0
- package/lib/renderer/projectors/ProjectorManager.d.ts +85 -0
- package/lib/renderer/projectors/ProjectorsPass.d.ts +37 -0
- package/lib/renderer/shadows/ShadowManager.d.ts +40 -0
- package/lib/renderer/shadows/ShadowMap.d.ts +21 -0
- package/lib/renderer/textureUnits.d.ts +6 -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 +268 -72
- package/lib/scene/{RenderNode.d.ts → Scene.d.ts} +47 -51
- package/lib/scene/SkyBox.d.ts +7 -4
- package/lib/scene/index.d.ts +2 -2
- package/lib/segment/Segment.d.ts +38 -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/common/uniforms.d.ts +27 -0
- 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 +9 -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/projectorsPass/projectorsPass.d.ts +2 -0
- 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/varianceBlur.d.ts +2 -0
- package/lib/shaders/weightedOITResolve.d.ts +2 -0
- package/lib/terrain/BilTerrain.d.ts +1 -1
- package/lib/terrain/EmptyTerrain.d.ts +6 -7
- package/lib/terrain/GlobusTerrain.d.ts +18 -23
- package/lib/terrain/MapterhornTerrain.d.ts +10 -0
- package/lib/terrain/RgbTerrain.d.ts +19 -8
- package/lib/terrain/index.d.ts +10 -6
- 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 +7 -4
- package/lib/ui/Dialog.d.ts +30 -3
- package/lib/ui/Input.d.ts +19 -3
- package/lib/ui/Slider.d.ts +5 -2
- package/lib/ui/TitleBarView.d.ts +21 -0
- 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 +10 -9
- package/lib/utils/FontAtlas.d.ts +61 -10
- 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 +24 -5
- package/lib/utils/shared.d.ts +12 -5
- package/lib/utils/textureResourceMeta.d.ts +9 -0
- package/lib/webgl/BaseFramebuffer.d.ts +35 -0
- package/lib/webgl/Framebuffer.d.ts +14 -13
- package/lib/webgl/Handler.d.ts +94 -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 +79 -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/CameraFrameComposer.d.ts +0 -19
- package/lib/control/CameraFrameHandler.d.ts +0 -26
- package/lib/control/OldMouseNavigation.d.ts +0 -65
- package/lib/control/ZoomControl.d.ts +0 -28
- package/lib/control/cameraDepthHandler/CameraDepthHandler.d.ts +0 -28
- package/lib/control/cameraDepthHandler/camera_depth.d.ts +0 -2
- 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/entity/{LabelWorker.worker.d.ts → label/LabelWorker.worker.d.ts} +0 -0
|
@@ -1,78 +1,94 @@
|
|
|
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;
|
|
25
|
+
receiveProjectors?: boolean;
|
|
26
|
+
receiveShadows?: boolean;
|
|
27
|
+
receiveFrameTransparency?: boolean;
|
|
22
28
|
scaleByDistance?: NumberArray3;
|
|
23
29
|
pickingScale?: number | NumberArray3;
|
|
24
30
|
opacity?: number;
|
|
25
|
-
|
|
31
|
+
shadeMode?: ShadeModeInput;
|
|
26
32
|
entities?: Entity[];
|
|
27
33
|
depthOrder?: number;
|
|
34
|
+
disableCullFace?: boolean;
|
|
28
35
|
}
|
|
29
36
|
/**
|
|
30
37
|
* An observable collection of og.Entity instances where each entity has a unique id.
|
|
31
|
-
* Entity collection
|
|
38
|
+
* Entity collection provides handlers for each type of entity like billboard, label or 3ds object.
|
|
32
39
|
* @constructor
|
|
33
40
|
* @param {Object} [options] - Entity options:
|
|
34
41
|
* @param {Array.<Entity>} [options.entities] - Entities array.
|
|
35
42
|
* @param {boolean} [options.visibility=true] - Entity visibility.
|
|
43
|
+
* @param {number} [options.labelMaxLetters] - Maximum label letters per line used by the label handler.
|
|
44
|
+
* @param {boolean} [options.pickingEnabled] - Enables/disables picking for all entity handlers.
|
|
45
|
+
* @param {boolean} [options.receiveProjectors=true] - Enables/disables projector effect reception for this collection.
|
|
46
|
+
* @param {boolean} [options.receiveFrameTransparency=false] - Enables/disables frame transparency reception for this collection.
|
|
47
|
+
* @param {boolean} [options.receiveShadows=true] - Enables/disables shadow map reception for this collection.
|
|
36
48
|
* @param {Array.<number>} [options.scaleByDistance] - Entity scale by distance parameters. (exactly 3 entries)
|
|
37
49
|
* First index - near distance to the entity, after entity becomes full scale.
|
|
38
|
-
* Second index - far distance to the entity, when entity becomes zero scale.
|
|
39
|
-
* Third index - far distance to the entity, when entity becomes invisible.
|
|
50
|
+
* Second index - far distance to the entity, when the entity becomes zero scale.
|
|
51
|
+
* Third index - far distance to the entity, when the entity becomes invisible.
|
|
52
|
+
* @param {number|Array.<number>} [options.pickingScale] - Picking scale value or xyz scale array.
|
|
40
53
|
* @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
|
|
54
|
+
* @param {number|string} [options.shadeMode=1] - Geo object shading mode: `0|none|unlit`, `0.5|phong`, `1|pbr`.
|
|
55
|
+
* @param {number} [options.depthOrder=0] - Rendering order for grouped vector layer collections.
|
|
56
|
+
* @param {Number} [options.depthOffset=0.0] - Signed world-space depth offset along the camera ray.
|
|
57
|
+
* Negative values move geometry closer to the camera, positive values move it farther.
|
|
58
|
+
* @param {boolean} [options.disableCullFace=false] - Disables back-face culling for geo object rendering.
|
|
59
|
+
* //@fires entitymove
|
|
60
|
+
* @fires draw
|
|
61
|
+
* @fires drawend
|
|
62
|
+
* @fires add
|
|
63
|
+
* @fires remove
|
|
64
|
+
* @fires entityadd
|
|
65
|
+
* @fires entityremove
|
|
66
|
+
* @fires visibilitychange
|
|
67
|
+
* @fires mousemove
|
|
68
|
+
* @fires mouseenter
|
|
69
|
+
* @fires mouseleave
|
|
70
|
+
* @fires lclick
|
|
71
|
+
* @fires rclick
|
|
72
|
+
* @fires mclick
|
|
73
|
+
* @fires ldblclick
|
|
74
|
+
* @fires rdblclick
|
|
75
|
+
* @fires mdblclick
|
|
76
|
+
* @fires lup
|
|
77
|
+
* @fires rup
|
|
78
|
+
* @fires mup
|
|
79
|
+
* @fires ldown
|
|
80
|
+
* @fires rdown
|
|
81
|
+
* @fires mdown
|
|
82
|
+
* @fires lhold
|
|
83
|
+
* @fires rhold
|
|
84
|
+
* @fires mhold
|
|
85
|
+
* @fires mousewheel
|
|
86
|
+
* @fires touchmove
|
|
87
|
+
* @fires touchstart
|
|
88
|
+
* @fires touchend
|
|
89
|
+
* @fires doubletouch
|
|
90
|
+
* @fires touchleave
|
|
91
|
+
* @fires touchenter
|
|
76
92
|
*/
|
|
77
93
|
declare class EntityCollection {
|
|
78
94
|
static __counter__: number;
|
|
@@ -85,9 +101,9 @@ declare class EntityCollection {
|
|
|
85
101
|
/**
|
|
86
102
|
* Render node context.
|
|
87
103
|
* @public
|
|
88
|
-
* @type {
|
|
104
|
+
* @type {Scene}
|
|
89
105
|
*/
|
|
90
|
-
|
|
106
|
+
scene: Scene | null;
|
|
91
107
|
/**
|
|
92
108
|
* Visibility option.
|
|
93
109
|
* @public
|
|
@@ -95,11 +111,13 @@ declare class EntityCollection {
|
|
|
95
111
|
*/
|
|
96
112
|
_visibility: boolean;
|
|
97
113
|
/**
|
|
98
|
-
*
|
|
114
|
+
* Signed world-space depth offset along the camera ray.
|
|
115
|
+
* Negative values move geometry closer to the camera, positive values move it farther.
|
|
116
|
+
* 0.0 means no offset.
|
|
99
117
|
* @public
|
|
100
118
|
* @type {Number}
|
|
101
119
|
*/
|
|
102
|
-
|
|
120
|
+
depthOffset: number;
|
|
103
121
|
/**
|
|
104
122
|
* Billboards handler
|
|
105
123
|
* @public
|
|
@@ -181,15 +199,41 @@ declare class EntityCollection {
|
|
|
181
199
|
*/
|
|
182
200
|
_layer?: Vector;
|
|
183
201
|
_quadNode?: EntityCollectionNode;
|
|
184
|
-
|
|
202
|
+
_shadeMode: ShadeMode;
|
|
203
|
+
/**
|
|
204
|
+
* Enables/disables projector effect reception for this collection.
|
|
205
|
+
* @public
|
|
206
|
+
* @type {boolean}
|
|
207
|
+
*/
|
|
208
|
+
receiveProjectors: boolean;
|
|
209
|
+
/**
|
|
210
|
+
* Enables/disables frame transparency reception for this collection.
|
|
211
|
+
* @public
|
|
212
|
+
* @type {boolean}
|
|
213
|
+
*/
|
|
214
|
+
receiveFrameTransparency: boolean;
|
|
215
|
+
/**
|
|
216
|
+
* Enables/disables shadow map reception for this collection.
|
|
217
|
+
* Stored in the same material flags channel as projectors and frame transparency.
|
|
218
|
+
* @public
|
|
219
|
+
* @type {boolean}
|
|
220
|
+
*/
|
|
221
|
+
receiveShadows: boolean;
|
|
222
|
+
/**
|
|
223
|
+
* Disables `gl.CULL_FACE` for geo objects rendering passes (opaque/transparent).
|
|
224
|
+
* Useful for rendering models with inverted/inconsistent triangle winding.
|
|
225
|
+
* @public
|
|
226
|
+
* @type {boolean}
|
|
227
|
+
*/
|
|
228
|
+
disableCullFace: boolean;
|
|
185
229
|
protected _depthOrder: number;
|
|
186
230
|
constructor(options?: IEntityCollectionParams);
|
|
187
231
|
get depthOrder(): number;
|
|
188
232
|
set depthOrder(depghOrder: number);
|
|
189
233
|
isEmpty(): boolean;
|
|
190
234
|
get id(): number;
|
|
191
|
-
get
|
|
192
|
-
set
|
|
235
|
+
get shadeMode(): ShadeMode;
|
|
236
|
+
set shadeMode(m: ShadeModeInput);
|
|
193
237
|
isEqual(ec: EntityCollection | null): boolean;
|
|
194
238
|
/**
|
|
195
239
|
* Sets collection visibility.
|
|
@@ -200,7 +244,7 @@ declare class EntityCollection {
|
|
|
200
244
|
/**
|
|
201
245
|
* Returns collection visibility.
|
|
202
246
|
* @public
|
|
203
|
-
* @returns {boolean}
|
|
247
|
+
* @returns {boolean} Collection visibility flag.
|
|
204
248
|
*/
|
|
205
249
|
getVisibility(): boolean;
|
|
206
250
|
/**
|
|
@@ -215,10 +259,28 @@ declare class EntityCollection {
|
|
|
215
259
|
* @param {boolean} enable - Picking enable flag.
|
|
216
260
|
*/
|
|
217
261
|
setPickingEnabled(enable: boolean): void;
|
|
262
|
+
/**
|
|
263
|
+
* Sets whether this collection receives projector effects.
|
|
264
|
+
* @public
|
|
265
|
+
* @param {boolean} enable - `true` to receive projector effects, `false` to ignore them.
|
|
266
|
+
*/
|
|
267
|
+
setReceiveProjectors(enable: boolean): void;
|
|
268
|
+
/**
|
|
269
|
+
* Sets whether this collection receives frame transparency.
|
|
270
|
+
* @public
|
|
271
|
+
* @param {boolean} enable - `true` to receive frame transparency, `false` to ignore it.
|
|
272
|
+
*/
|
|
273
|
+
setReceiveFrameTransparency(enable: boolean): void;
|
|
274
|
+
/**
|
|
275
|
+
* Sets whether this collection receives shadow map effects.
|
|
276
|
+
* @public
|
|
277
|
+
* @param {boolean} enable - `true` to receive shadow map effects, `false` to ignore them.
|
|
278
|
+
*/
|
|
279
|
+
setReceiveShadows(enable: boolean): void;
|
|
218
280
|
/**
|
|
219
281
|
* Gets collection opacity.
|
|
220
282
|
* @public
|
|
221
|
-
* @returns {number}
|
|
283
|
+
* @returns {number} Collection opacity.
|
|
222
284
|
*/
|
|
223
285
|
getOpacity(): number;
|
|
224
286
|
/**
|
|
@@ -229,27 +291,33 @@ declare class EntityCollection {
|
|
|
229
291
|
* @param {number} [farInvisible] - Entity visibility distance.
|
|
230
292
|
*/
|
|
231
293
|
setScaleByDistance(near: number, far: number, farInvisible?: number): void;
|
|
294
|
+
setVisibleSphere(p: Vec3, r: number): void;
|
|
295
|
+
/**
|
|
296
|
+
* Aligns collection entities to terrain.
|
|
297
|
+
* Currently applies to polyline entities.
|
|
298
|
+
*/
|
|
299
|
+
applyTerrainCollision(nodes: Node[], visibleExtent: Extent): void;
|
|
232
300
|
appendChildEntity(entity: Entity): void;
|
|
233
301
|
protected _addRecursively(entity: Entity): void;
|
|
234
302
|
/**
|
|
235
303
|
* Adds entity to the collection and returns collection.
|
|
236
304
|
* @public
|
|
237
305
|
* @param {Entity} entity - Entity.
|
|
238
|
-
* @returns {EntityCollection}
|
|
306
|
+
* @returns {EntityCollection} Current collection instance.
|
|
239
307
|
*/
|
|
240
308
|
add(entity: Entity): EntityCollection;
|
|
241
309
|
/**
|
|
242
310
|
* Adds entities array to the collection and returns collection.
|
|
243
311
|
* @public
|
|
244
312
|
* @param {Array.<Entity>} entities - Entities array.
|
|
245
|
-
* @returns {EntityCollection}
|
|
313
|
+
* @returns {EntityCollection} Current collection instance.
|
|
246
314
|
*/
|
|
247
315
|
addEntities(entities: Entity[]): EntityCollection;
|
|
248
316
|
/**
|
|
249
|
-
* Returns true if the entity belongs this collection, otherwise returns false.
|
|
317
|
+
* Returns true if the entity belongs to this collection, otherwise returns false.
|
|
250
318
|
* @public
|
|
251
319
|
* @param {Entity} entity - Entity.
|
|
252
|
-
* @returns {boolean}
|
|
320
|
+
* @returns {boolean} `true` if the entity belongs to this collection.
|
|
253
321
|
*/
|
|
254
322
|
belongs(entity: Entity): boolean;
|
|
255
323
|
protected _removeRecursively(entity: Entity): void;
|
|
@@ -276,17 +344,17 @@ declare class EntityCollection {
|
|
|
276
344
|
/**
|
|
277
345
|
* Adds this collection to render node.
|
|
278
346
|
* @public
|
|
279
|
-
* @param {
|
|
280
|
-
* @param {boolean} [isHidden] -
|
|
281
|
-
* @returns {EntityCollection}
|
|
347
|
+
* @param {Scene} scene - Render node.
|
|
348
|
+
* @param {boolean} [isHidden] - Used in vector layers with planet-specific rendering.
|
|
349
|
+
* @returns {EntityCollection} Current collection instance.
|
|
282
350
|
*/
|
|
283
|
-
addTo(
|
|
351
|
+
addTo(scene: Scene, isHidden?: boolean): this;
|
|
284
352
|
/**
|
|
285
|
-
* This function is called in the
|
|
353
|
+
* This function is called in the Scene assign function.
|
|
286
354
|
* @public
|
|
287
|
-
* @param {
|
|
355
|
+
* @param {Scene} scene
|
|
288
356
|
*/
|
|
289
|
-
|
|
357
|
+
bindScene(scene: Scene): void;
|
|
290
358
|
protected _onChangeRelativeCenter: (c: Vec3) => void;
|
|
291
359
|
/**
|
|
292
360
|
* Updates coordinates all lonLat entities in collection after collection attached to the planet node.
|
|
@@ -317,7 +385,7 @@ declare class EntityCollection {
|
|
|
317
385
|
/**
|
|
318
386
|
* Gets entity array.
|
|
319
387
|
* @public
|
|
320
|
-
* @returns {Array.<Entity>}
|
|
388
|
+
* @returns {Array.<Entity>} Entity array copy.
|
|
321
389
|
*/
|
|
322
390
|
getEntities(): Entity[];
|
|
323
391
|
/**
|
|
@@ -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,15 @@
|
|
|
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 { Camera } from "../../camera/Camera";
|
|
12
|
+
import type { ShaderProgram } from "../../webgl/ShaderProgram";
|
|
10
13
|
export declare const VERTEX_BUFFER = 0;
|
|
11
14
|
export declare const RTC_POSITION_BUFFER = 1;
|
|
12
15
|
export declare const RGBA_BUFFER = 2;
|
|
@@ -29,7 +32,7 @@ export declare class GeoObjectHandler {
|
|
|
29
32
|
*/
|
|
30
33
|
pickingEnabled: boolean;
|
|
31
34
|
protected _entityCollection: EntityCollection;
|
|
32
|
-
|
|
35
|
+
_scene: Scene | null;
|
|
33
36
|
_renderer: Renderer | null;
|
|
34
37
|
protected _geoObjects: GeoObject[];
|
|
35
38
|
protected _instanceDataMap: Map<string, InstanceData>;
|
|
@@ -38,20 +41,36 @@ export declare class GeoObjectHandler {
|
|
|
38
41
|
protected _relativeCenter: Vec3;
|
|
39
42
|
protected _rtcEyePositionHigh: Float32Array;
|
|
40
43
|
protected _rtcEyePositionLow: Float32Array;
|
|
44
|
+
/**
|
|
45
|
+
* @param {EntityCollection} entityCollection - Parent entity collection.
|
|
46
|
+
*/
|
|
41
47
|
constructor(entityCollection: EntityCollection);
|
|
48
|
+
protected _isOpaqueAlpha(alpha: number): boolean;
|
|
49
|
+
protected _markPerInstanceBuffersChanged(tagData: InstanceData): void;
|
|
50
|
+
protected _swapArrayItems(arr: number[] | TypedArray, itemSize: number, firstIndex: number, secondIndex: number): void;
|
|
51
|
+
protected _swapInstanceData(tagData: InstanceData, firstIndex: number, secondIndex: number): void;
|
|
52
|
+
protected _insertInstanceByOpacity(tagData: InstanceData, instanceIndex: number, isOpaque: boolean): void;
|
|
53
|
+
protected _updateInstanceOpacityState(tagData: InstanceData, instanceIndex: number, isOpaque: boolean): boolean;
|
|
42
54
|
initProgram(): void;
|
|
43
|
-
|
|
55
|
+
bindScene(scene: Scene): void;
|
|
44
56
|
setColorTextureTag(src: string | HTMLImageElement, tag: string): void;
|
|
45
57
|
setNormalTextureTag(src: string | HTMLImageElement, tag: string): void;
|
|
46
58
|
setMetallicRoughnessTextureTag(src: string | HTMLImageElement, tag: string): void;
|
|
59
|
+
setAmbientOcclusionTextureTag(src: string | HTMLImageElement, tag: string): void;
|
|
47
60
|
setObjectSrc(src: string, tag: string): void;
|
|
48
61
|
_updateInstanceData(object: Object3d, tag: string): void;
|
|
49
62
|
protected _addGeoObjectToArray(geoObject: GeoObject): void;
|
|
50
|
-
protected _bindCommon(): void;
|
|
63
|
+
protected _bindCommon(p: ShaderProgram): void;
|
|
64
|
+
protected _bindForwardParams(p: ShaderProgram): void;
|
|
65
|
+
protected _bindAtmosphereParams(p: ShaderProgram): void;
|
|
51
66
|
_displayOpaquePASS(): void;
|
|
52
67
|
_displayTransparentPASS(): void;
|
|
68
|
+
_displayTransparentForwardPASS(): void;
|
|
69
|
+
_displayForwardPASS(): void;
|
|
53
70
|
protected _depthPASS(): void;
|
|
54
71
|
drawDepth(): void;
|
|
72
|
+
protected _depthCameraPASS(camera: Camera): void;
|
|
73
|
+
drawDepthCameraPass(camera: Camera): void;
|
|
55
74
|
drawPicking(): void;
|
|
56
75
|
protected _pickingPASS(): void;
|
|
57
76
|
setQRotArr(tagData: InstanceData, tagDataIndex: number, qRot: Quat): void;
|
|
@@ -69,8 +88,10 @@ export declare class GeoObjectHandler {
|
|
|
69
88
|
getRTCPosition(pos: Vec3, rtcPositionHigh: Vec3, rtcPositionLow: Vec3): void;
|
|
70
89
|
setRelativeCenter(c: Vec3): void;
|
|
71
90
|
protected _updateRTCEyePosition(): void;
|
|
72
|
-
|
|
91
|
+
drawForward(): void;
|
|
92
|
+
drawOpaque(): void;
|
|
73
93
|
drawTransparent(): void;
|
|
94
|
+
drawTransparentForward(): void;
|
|
74
95
|
add(geoObject: GeoObject): void;
|
|
75
96
|
remove(geoObject: GeoObject): void;
|
|
76
97
|
_clearDataTagQueue(): void;
|